remarkable-linux/security/selinux
Linus Torvalds a554bea899 selinux: don't inline slow-path code into avc_has_perm_noaudit()
The selinux AVC paths remain some of the hottest (and deepest) codepaths
at filename lookup time, and we make it worse by having the slow path
cases take up I$ and stack space even when they don't trigger.  Gcc
tends to always want to inline functions that are just called once -
never mind that this might make for slower and worse code in the caller.

So this tries to improve on it a bit by making the slow-path cases
explicitly separate functions that are marked noinline, causing gcc to
at least no longer allocate stack space for them unless they are
actually called.  It also seems to help register allocation a tiny bit,
since gcc now doesn't take the slow case code into account.

Uninlining the slow path may also allow us to inline the remaining hot
path into the one caller that actually matters: avc_has_perm_flags().
I'll have to look at that separately, but both avc_audit() and
avc_has_perm_noaudit() are now small and lean enough that inlining them
may make sense.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-31 11:24:22 -07:00
..
include Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ss selinux: sparse fix: fix several warnings in the security server cod 2012-01-05 18:52:52 -05:00
.gitignore SELinux: add .gitignore files for dynamic classes 2009-10-24 09:42:27 +08:00
avc.c selinux: don't inline slow-path code into avc_has_perm_noaudit() 2012-03-31 11:24:22 -07:00
exports.c selinux: sparse fix: include selinux.h in exports.c 2011-09-09 16:56:32 -07:00
hooks.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
Kconfig selinux: Deprecate and schedule the removal of the the compat_net functionality 2008-12-31 12:54:11 -05:00
Makefile selinux: change to new flag variable 2010-10-21 10:12:40 +11:00
netif.c doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
netlabel.c doc: Update the email address for Paul Moore in various source files 2011-08-01 17:58:33 -07:00
netlink.c selinux: sparse fix: fix warnings in netlink code 2012-01-05 18:52:51 -05:00
netnode.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
netport.c SELinux: Fix RCU deref check warning in sel_netport_insert() 2011-12-21 11:28:56 +11:00
nlmsgtab.c selinux: sparse fix: fix warnings in netlink code 2012-01-05 18:52:51 -05:00
selinuxfs.c selinux: sparse fix: fix warnings in netlink code 2012-01-05 18:52:51 -05:00
xfrm.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00