lkml.org 
[lkml]   [2007]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] binfmt_elf: core dump masking support
On Tue 2007-01-23 13:42:00, Kawai, Hidehiro wrote:
> Hi,
>
> >>>(run echo 1 > coremask, echo 0 > coremask in a loop while dumping
> >>>core. Do you have enough locking to make it work as expected?)
> >>
> >>Currently, any lock isn't acquired. But I think the kernel only
> >>have to preserve the coremask setting in a local variable at the
> >>begining of core dumping. I'm going to do this in the next version.
> >
> > No, I do not think that is enough. At minimum, you'd need atomic_t
> > variable. But I'd recomend against it. Playing with locking is tricky.
>
> Why do you think it is not enough? I think that any locking is not
> needed.

You are wrong.

> unsigned int mask = current->mm->coremask;

Not a valid C; coremask can change from another cpu.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-25 10:21    [W:0.130 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site