[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACYkzJ6q53qwEvTjvNP_d5O+ytQM=jFVRQ9PV2+ie6Ah5VDnRA@mail.gmail.com>
Date: Mon, 25 Jan 2021 18:49:26 +0100
From: KP Singh <kpsingh@...nel.org>
To: Mikko Ylinen <mikko.ylinen@...ux.intel.com>
Cc: bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
KP Singh <kpsingh@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH] bpf: Drop disabled LSM hooks from the sleepable set
On Mon, Jan 25, 2021 at 7:55 AM Mikko Ylinen
<mikko.ylinen@...ux.intel.com> wrote:
>
> On Sat, Jan 23, 2021 at 12:50:21AM +0100, KP Singh wrote:
> > On Fri, Jan 22, 2021 at 11:33 PM KP Singh <kpsingh@...nel.org> wrote:
> > >
> > > On Fri, Jan 22, 2021 at 1:32 PM Mikko Ylinen
> > > <mikko.ylinen@...ux.intel.com> wrote:
> > > >
> > > > Networking LSM hooks are conditionally enabled and when building the new
> > > > sleepable BPF LSM hooks with the networking LSM hooks disabled, the
> > > > following build error occurs:
> > > >
> > > > BTFIDS vmlinux
> > > > FAILED unresolved symbol bpf_lsm_socket_socketpair
> > > >
[...]
>
> Agree, a way to get the set automatically created makes sense. But the
> extra parameter to LSM_HOOK macro would be BPF specific, right?
>
The information about whether the hook "must not sleep" has been
mentioned sporadically in comments and
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/lsm_hooks.h#n920
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/lsm_hooks.h#n594
I think it would be generally useful for the framework to actually provide this
in the definition in the hook and then ensure (by calling
might_sleep() for hooks
that can sleep).
- KP
> -- Regards, Mikko
Powered by blists - more mailing lists