[lkml]   [2020]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH bpf-next v5 5/7] bpf: lsm: Initialize the BPF LSM hooks
On 3/23/2020 3:12 PM, Kees Cook wrote:
> On Mon, Mar 23, 2020 at 02:58:18PM -0700, Casey Schaufler wrote:
>> That's not too terrible, I suppose. What would you be thinking for
>> the calls that do use call_int_hook()?
>> rc = call_int_hook(something, something_default, goodnesses);
>> or embedded in the macro:
>> rc = call_int_hook(something, goodnesses);
> Oh yes, good point. The hook call already knows the name, so:
> #define call_int_hook(FUNC, ...) ({ \
> int RC = FUNC#_default; \
> ...

That makes the most sense, I think. It's getting a little heavy on
hidden magic, but we do tend to have a pretty good set of eyes watching
when a new hook is proposed. I would expect the changes to call_int_hook()
and its callers should be made when default is added to LSM_HOOK, not

 \ /
  Last update: 2020-03-24 00:40    [W:0.069 / U:6.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site