]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ima: simplify conditional statement to improve performance
authorDmitry Kasatkin <d.kasatkin@samsung.com>
Fri, 22 Aug 2014 06:43:55 +0000 (09:43 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 9 Sep 2014 14:28:47 +0000 (10:28 -0400)
commitf68c05f4d2d4e19c40f4ac1e769cc0a2f9f544a0
tree07370f5d985fbb1235044660937b27d9b04a4a8c
parent65d98f3be25f7ee96af655f97e153d3d8d3d8ef9
ima: simplify conditional statement to improve performance

Precede bit testing before string comparison makes code
faster. Also refactor statement as a single line pointer
assignment. Logic is following: we set 'xattr_ptr' to read
xattr value when we will do appraisal or in any case when
measurement template is other than 'ima'.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_main.c