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]
Date:	Tue, 18 May 2010 14:50:47 +0100
From:	David Howells <dhowells@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	dhowells@...hat.com, Andrew Morton <akpm@...ux-foundation.org>,
	Andrew Tridgell <tridge@...ba.org>,
	Eric Paris <eparis@...isplace.org>,
	Jakub Jelinek <jakub@...hat.com>,
	James Morris <jmorris@...ei.org>,
	Roland McGrath <roland@...hat.com>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] signals: check_kill_permission: don't check creds if same_thread_group()

Oleg Nesterov <oleg@...hat.com> wrote:

> Yes, but both current_cred() and same_thread_group(current, t) call
> get_current(), and gcc doesn't cache the result because we call
> audit_signal_info() in between.

Sorry, yes.  I was reading get_current() as current_cred() for some reason.

However, you are _still_ calling get_current() twice...  So that bit of your
changelog isn't really correct.

In fact, get_current() should be __attribute_const__ since it can't change
whilst you're looking at it, except within switch_to(), probably in a piece of
assembly code, so gcc should be free to cache it as long as it likes.

David
--
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