[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F1D417CF-8E33-4C65-9F91-FB391ABA5774@fb.com>
Date: Thu, 5 Nov 2020 18:45:15 +0000
From: Song Liu <songliubraving@...com>
To: KP Singh <kpsingh@...omium.org>
CC: open list <linux-kernel@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin Lau <kafai@...com>, Paul Turner <pjt@...gle.com>,
Jann Horn <jannh@...gle.com>, Hao Luo <haoluo@...gle.com>
Subject: Re: [PATCH bpf-next v4 1/9] bpf: Allow LSM programs to use bpf spin
locks
> On Nov 5, 2020, at 6:47 AM, KP Singh <kpsingh@...omium.org> wrote:
>
> From: KP Singh <kpsingh@...gle.com>
>
> Usage of spin locks was not allowed for tracing programs due to
> insufficient preemption checks. The verifier does not currently prevent
> LSM programs from using spin locks, but the helpers are not exposed
> via bpf_lsm_func_proto.
>
> Based on the discussion in [1], non-sleepable LSM programs should be
> able to use bpf_spin_{lock, unlock}.
>
> Sleepable LSM programs can be preempted which means that allowng spin
> locks will need more work (disabling preemption and the verifier
> ensuring that no sleepable helpers are called when a spin lock is held).
>
> [1]: https://lore.kernel.org/bpf/20201103153132.2717326-1-kpsingh@chromium.org/T/#md601a053229287659071600d3483523f752cd2fb
>
> Signed-off-by: KP Singh <kpsingh@...gle.com>
Acked-by: Song Liu <songliubraving@...com>
[...]
Powered by blists - more mailing lists