[BUG] null pointer dereference when loading bpf_preload on Raspberry Pi
Russell King (Oracle)
linux at armlinux.org.uk
Mon Jun 13 04:12:02 PDT 2022
On Mon, Jun 13, 2022 at 12:22:47AM +0200, Stefan Wahren wrote:
> It would be nice to get a hint, how to narrow down or which commit might
> trigger this issue.
The standard way? git bisect?
So it happens on 5.18.0 and 5.18.3. Presumably it didn't happen with
5.17?
I've tried to trace the code but failed - skel_map_create() doesn't seem
to feature anywhere obvious in my kernels.
It looks to me like some BPF code is being loaded by the bpf_reload
module and is being run. I'm guessing that the BPF code is calling
bpf_sys_bpf, but as I can't find skel_map_create() that's all it is,
a guess.
It looks like copy_from_bpfptr() which calls copy_from_sockptr_offset()
is passing in a source pointer of 0x0048. I'm guessing this is the value
of the pointer that is passed into bpf_sys_bpf() - that's another guess,
there's no information on that in the backtraces.
So, there's really not much to go on here to debug the oops as the
kernel has printed... I'd say its pretty much undebuggable from just
the kernel oops.
Maybe someone on the bpf list will have a better idea.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list