LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Silly questions: how can those security_ops->foo(...) calls work when entries seem to be NULL?
@ 2008-10-28 9:18 Markku Savela
0 siblings, 0 replies; 2+ messages in thread
From: Markku Savela @ 2008-10-28 9:18 UTC (permalink / raw)
Can someone point me to the explanation?
- the "register_security" just loads the pointer to "security_ops"
- most LSM modules only define subset of the function pointers, and as
far as I can tell, the rest are NULL.
- however, all security calls just seem to call blindly
"security_ops->foo(...)" without caring wether the function is NULL.
Just curious: how does this magic work?
Does same magic work for all "ops" tables in the kernel? Might get
size and speed reduction if need to test for the NULL function pointer
is removed -- at a huge cost of uncertainty, because all NULL pointer
function deferences would then go undetected.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-28 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <brSUc-4iRemail@example.com>
2008-10-28 9:33 ` Silly questions: how can those security_ops->foo(...) calls work when entries seem to be NULL? Markku Savela
2008-10-28 9:18 Markku Savela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).