Thread (4 messages) 4 messages, 4 authors, 2017-03-24
DORMANTno replies

[PATCH 1/2] LSM: Initialize security_hook_heads upon registration.

From: casey@schaufler-ca.com (Casey Schaufler)
Date: 2017-03-24 15:35:00

On 3/23/2017 8:54 PM, James Morris wrote:
On Wed, 22 Mar 2017, Tetsuo Handa wrote:
quoted
"struct security_hook_heads" is an array of "struct list_head"
where elements can be initialized just before registration.

We might introduce different "struct security_hook_heads" for built-in
LSM modules and dynamically loadable LSM modules when we start allowing
dynamically loadable LSM modules. But even if we decide to use different
lists, there is no need to waste 350+ lines for initialization. Let's
initialize "struct security_hook_heads" just before registration.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Nice cleanup, applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next

with edited changelog.
Sigh. All that beautiful keyboard work for naught. ;)

I hope we don't start getting complaints from automatic
code checkers and kernel newbees because of the assumption
that a struct with a bunch of the same elements is the
same as an array. Or worse, the compiler for some quirky
architecture. I suppose if that happens we can always
put it back.

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help