linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Silly questions: how can those security_ops->foo(...) calls work when entries seem to be NULL?
       [not found] <brSUc-4iR-25@gated-at.bofh.it>
@ 2008-10-28  9:33 ` Markku Savela
  0 siblings, 0 replies; 2+ messages in thread
From: Markku Savela @ 2008-10-28  9:33 UTC (permalink / raw)
  To: linux-kernel

Blah.. insert foot in mouth -- found: verify() calls
security_fixups(), which modifies the supplied table..

IMHO, misleading name for function, "verify" sort of gives impression
of non-modifying function, and thus got me fooled while reading it..

Sorry about bothering...

-- 
Markku Savela

^ permalink raw reply	[flat|nested] 2+ messages in thread

* 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)
  To: linux-kernel

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-4iR-25@gated-at.bofh.it>
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).