linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Shubham Bansal <illusionist.neo@gmail.com>,
	bpf@vger.kernel.org, jpalus@fastmail.com,
	regressions@lists.linux.dev,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [BUG] null pointer dereference when loading bpf_preload on Raspberry Pi
Date: Mon, 13 Jun 2022 12:12:02 +0100	[thread overview]
Message-ID: <YqcbgmTmezGM0VPr@shell.armlinux.org.uk> (raw)
In-Reply-To: <f038d6f9-b96b-0749-111c-33ac8939a1c0@i2se.com>

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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-13 11:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12 22:22 [BUG] null pointer dereference when loading bpf_preload on Raspberry Pi Stefan Wahren
2022-06-13 11:12 ` Russell King (Oracle) [this message]
2022-06-13 14:42   ` Stefan Wahren
2022-06-15  6:11 ` Stefan Wahren
2022-06-15  8:31   ` Peter Robinson
2022-06-15  9:57     ` Stefan Wahren
2022-06-15 10:07       ` Peter Robinson
2022-06-19 17:06 ` Thorsten Leemhuis
2022-09-03 14:17   ` Stefan Wahren
2022-09-03 14:44     ` Stefan Wahren
2022-09-04  9:28       ` Thorsten Leemhuis
2022-07-04 12:42 ` Thorsten Leemhuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqcbgmTmezGM0VPr@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=illusionist.neo@gmail.com \
    --cc=jpalus@fastmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=regressions@lists.linux.dev \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).