lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110920171341.GA22317@redhat.com>
Date:	Tue, 20 Sep 2011 19:13:41 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>
Cc:	"Serge E. Hallyn" <serge@...lyn.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	"Serge E. Hallyn" <serge.hallyn@...onical.com>,
	lkml <linux-kernel@...r.kernel.org>, richard@....at,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 2/2] creds: __task_cred(current) doesn't need
	rcu_read_lock_held()

On 09/20, David Howells wrote:
>
> Oleg Nesterov <oleg@...hat.com> wrote:
>
> > > > -	rcu_dereference_protected(current->cred, 1)
> > >
> > > and:
> > >
> > > > -		rcu_dereference_check(__t->real_cred, 0);		\
> > >
> > > you'll notice they aren't quite the same in one very fundamental way.
> >
> > Do you mean that this patch adds the unnecessary ACCESS_ONCE +
> > smp_read_barrier_depends() to current_cred() or I missed something
> > else?
>
> Something else.  The current_cred() uses ->cred:

Argh!!! I am soooo stupid.

Thanks a lot for the quick NACK!


So. This patch shouldn't touch current_cred().

But this also means, in theory it is not good to assume that
send_signal() can use __task_cred(current) instead of current_cred(),
although I doubt very much that someone can do override_creds() +
kill(SEND_SIG_NOINFO). So the change in __task_cred() is probably not
really good too.

Thanks.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ