security: Update non standard hooks to use static calls
There are some LSM hooks which do not use the common pattern followed
by other LSM hooks and thus cannot use call_{int, void}_hook macros and
instead use lsm_for_each_hook macro which still results in indirect
call.
There is one additional generalizable pottern where a hook matching an
lsmid is called and the indirect calls for these are addressed with the
newly added call_hook_with_lsmid macro which internally uses an
implementation similar to call_int_hook but has an additional check that
matches the lsmid.
For the generic case the lsm_for_each_hook macro is updated to accept a
body for the for loop and this handled all cases except getselfattr
which also had to provide a prelude to execute before the callback to
the LSM.
1 file changed