BACKPORT: Smack: Improve access check performance
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 23 May 2013 01:43:03 +0000 (18:43 -0700)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:25 +0000 (14:57 +0200)
commit59de740b33ff1fba6acf4f5143cb94782f8afc57
tree524e89613c8ab1a7349dceca8b614a80679a7872
parent9f918d06afd2c87587fe5805dddad704086893c2
BACKPORT: Smack: Improve access check performance

Each Smack label that the kernel has seen is added to a
list of labels. The list of access rules for a given subject
label hangs off of the label list entry for the label.
This patch changes the structures that contain subject
labels to point at the label list entry rather that the
label itself. Doing so removes a label list lookup in
smk_access() that was accounting for the largest single
chunk of Smack overhead.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
(cherry-picked from upstream 2f823ff8bec03a1e6f9e11fd0c4d54e4c7d09532)
security/smack/smack.h
security/smack/smack_access.c
security/smack/smack_lsm.c
security/smack/smackfs.c