[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200810280918.m9S9Icre029090@burp.tkv.asdf.org>
Date: Tue, 28 Oct 2008 11:18:38 +0200
From: Markku Savela <msa@...h.iki.fi>
To: linux-kernel@...r.kernel.org
Subject: Silly questions: how can those security_ops->foo(...) calls work when entries seem to be NULL?
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists