Re: [PATCH v8 3/9] seccomp: introduce writer locking

2014-06-27 Thread Kees Cook
On Wed, Jun 25, 2014 at 11:07 AM, Oleg Nesterov wrote: > On 06/24, Kees Cook wrote: >> >> +static void copy_seccomp(struct task_struct *p) >> +{ >> +#ifdef CONFIG_SECCOMP >> + /* >> + * Must be called with sighand->lock held, which is common to >> + * all threads in the group. Regard

Re: [PATCH v8 3/9] seccomp: introduce writer locking

2014-06-25 Thread Oleg Nesterov
On 06/25, Oleg Nesterov wrote: > > On 06/24, Kees Cook wrote: > > > > +static void copy_seccomp(struct task_struct *p) > > +{ > > +#ifdef CONFIG_SECCOMP > > + /* > > +* Must be called with sighand->lock held, which is common to > > +* all threads in the group. Regardless, nothing special

Re: [PATCH v8 3/9] seccomp: introduce writer locking

2014-06-25 Thread Oleg Nesterov
On 06/24, Kees Cook wrote: > > +static void copy_seccomp(struct task_struct *p) > +{ > +#ifdef CONFIG_SECCOMP > + /* > + * Must be called with sighand->lock held, which is common to > + * all threads in the group. Regardless, nothing special is > + * needed for the child since it

Re: [PATCH v8 3/9] seccomp: introduce writer locking

2014-06-25 Thread Oleg Nesterov
On 06/24, Kees Cook wrote: > > @@ -524,6 +529,8 @@ static long seccomp_set_mode(unsigned long seccomp_mode, > char __user *filter) > } > #endif > > + spin_lock_irqsave(¤t->sighand->siglock, irqflags); > + Well, I won't argue if you prefer to use _irqsave "just in case". But irqs must