Re: [PATCH v2] kernel: bpf: stackmap: fix a possible sleep-in-atomic bug in bpf_mmap_unlock_get_irq_work()
From: Alexei Starovoitov
Date: Mon Mar 20 2023 - 11:28:07 EST
On Mon, Mar 20, 2023 at 5:28 AM Teng Qi <starmiku1207184332@xxxxxxxxx> wrote:
>
> Yeah, we got your points. There are two key questions. The first question is
> that preempt_disable() and preempt_enable() will be conflicted with vfree()
> before the mmap_read_unlock().
What does this sentence mean?
> The second question is that thousands callers
> of up_read() only make sure irqs_disabled() == false needed fixed if
> the mmap_read_unlock() is fixed.
that doesn't answer my question either.
> Detecting ebpf bugs can be challenging since it is difficult to prove that a
> bug can be triggered during runtime, as well as fixing the bug. We decided to
> give up this patch that fixes the possible sleep-in-atomic bug in
> bpf_mmap_unlock_get_irq_work(). Instead, we will focus on improving our static
> analysis tool to find ebpf-specific bugs.
Please don't.