crash in bpf_check() on kernel-7.0.x

Helge Deller <[email protected]>
Newsgroups org.kernel.vger.linux-parisc,org.kernel.vger.bpf
Message-ID <[email protected]>
The 7.0 stable kernels crash when starting systemd on the 32-bit parisc architecture:

[   45.422328]       _______________________________
[   45.422328]      < Your System ate a SPARC! Gah! >
[   45.422328]       -------------------------------
[   45.422328]              \   ^__^
[   45.422328]                  (__)\       )\/\
[   45.422328]                   U  ||----w |
[   45.422328]                      ||     ||
[   45.424088] systemd (pid 1): Protection id trap (code 7)
[   45.425190] CPU: 0 UID: 0 PID: 1 Comm: systemd Tainted: G            E       7.0.10+ #3160 VOLUNTARY
[   45.426202] Hardware name: 9000/778/B160L
[   45.426667]
[   45.431345] IASQ: 00000000 00000000 IAOQ: 11151878 1115187c
[   45.431705]  IIR: baadf00d    ISR: 00000000  IOR: 11151878
[   45.432067]  CPU:        0   CR30: 12e5d7c0 CR31: 00000000
[   45.432499]  ORIG_R28: 00000000
[   45.432748]  IAOQ[0]: 0x11151878
[   45.433659]  IAOQ[1]: 0x1115187c
[   45.433917]  RP(r2): bpf_check+0x1bd0/0x3abc
[   45.434416] Backtrace:
[   45.435179]  [<10536ad8>] ktime_get_with_offset+0xcc/0x234
[   45.435866]  [<1063b8cc>] bpf_prog_load+0x720/0xcd0
[   45.436280]  [<1063dd18>] __sys_bpf+0xd44/0x277c
[   45.436590]  [<1063ffb0>] sys_bpf+0x30/0x8c
[   45.436879]  [<10416334>] syscall_exit+0x0/0x10
[   45.437241]
[   45.437575] CPU: 0 UID: 0 PID: 1 Comm: systemd Tainted: G            E       7.0.10+ #3160 VOLUNTARY
[   45.437748] Tainted: [E]=UNSIGNED_MODULE
[   45.437782] Hardware name: 9000/778/B160L
[   45.437909] Backtrace:
[   45.437927]  [<1041c878>] show_stack+0x54/0x78
[   45.437962]  [<10411b78>] dump_stack_lvl+0x80/0xc8
[   45.438000]  [<10411bdc>] dump_stack+0x1c/0x2c
[   45.438034]  [<1041c9c4>] die_if_kernel+0xf8/0x1b0
[   45.438067]  [<1041cf0c>] handle_interruption+0x490/0x93c
[   45.438159]  [<10536ad8>] ktime_get_with_offset+0xcc/0x234
[   45.438196]  [<1063b8cc>] bpf_prog_load+0x720/0xcd0
[   45.438228]  [<1063dd18>] __sys_bpf+0xd44/0x277c
[   45.438267]  [<1063ffb0>] sys_bpf+0x30/0x8c
[   45.438298]  [<10416334>] syscall_exit+0x0/0x10

My findings so far:
- Adding some printk() inside the bpf_check() function avoids the crashes, so it might be a timing issue.
- No crashes for the same kernel on 64-bit parisc.
- The 7.1-rc kernels don't crash either.
- I completely disabled the parisc JIT compiler -> still crashes.
- (Maybe unrelated:) CONFIG_TIME_NS is not set on the 32-bit parisc arch in 7.0, but it's set in 7.1.

Any idea what might trigger this crash, or which patch might be missing in 7.0-stable?

Helge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.