Re: bpf_ringbuf_reserve deadlock on rt kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-06-13 12:23:46 [+0200], Dmitry Dolgov wrote:
> > On Wed, Jun 12, 2024 at 04:32:23PM GMT, Sebastian Andrzej Siewior wrote:
> >
> > > The BPF program in question is attached to sched_switch. The issue seems
> > > to be similar to a couple of syzkaller reports [1], [2], although the
> > > latter one is about nested progs, which seems to be not the case here.
> > > Talking about nested progs, applying a similar approach as in [3]
> > > reworked for bpf_ringbuf, elliminates the issue.
> > >
> > > Do I miss anything, is it a known issue? Any ideas how to address that?
> >
> > I haven't attached bpf program to trace-events so this new to me. But if
> > you BPF attach programs to trace-events then there might be more things
> > that can go wrong…
> 
> Things related to RT kernels, or something else?

Related to RT kernel. The trace-event is invoked with disabled
preemption. This means locking is limit to raw_spinlock_t and no memory
allocation are allowed. Otherwise the splat below will appear.

Sebastian





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux