]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: inline avc_audit() and avc_has_perm_noaudit() into caller
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 31 Mar 2012 18:12:57 +0000 (11:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 31 Mar 2012 18:24:22 +0000 (11:24 -0700)
commit20a4060f9b1fd3a80dbebc60eb51fb32f38ac73e
treee4c2ea0b8c432645d1a28bdb694939b1e2891b30
parent8653b5cdc40e64b5556a6d70d944e0acfcbdd0a6
selinux: inline avc_audit() and avc_has_perm_noaudit() into caller

Now that all the slow-path code is gone from these functions, we can
inline them into the main caller - avc_has_perm_flags().

Now the compiler can see that 'avc' is allocated on the stack for this
case, which helps register pressure a bit.  It also actually shrinks the
total stack frame, because the stack frame that avc_has_perm_flags()
always needed (for that 'avc' allocation) is now sufficient for the
inlined functions too.

Inlining isn't bad - but mindless inlining of cold code (see the
previous commit) is.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/selinux/avc.c