stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: Track contents of read-only maps as scalars
@ 2021-08-21 20:31 Rafael David Tinoco
  2021-08-21 20:31 ` Rafael David Tinoco
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael David Tinoco @ 2021-08-21 20:31 UTC (permalink / raw)
  To: stable; +Cc: rafaeldtinoco, andriin, daniel, yanivagman

During tracee-ebpf regression tests, it was discovered that a CO-RE capable
eBPF program, that relied on a kconfig BTF extern, could not be loaded with
the following error:

libbpf: prog 'tracepoint__raw_syscalls__sys_enter': failed to attach to raw
 tracepoint 'sys_enter': Invalid argument

That happened because the CONFIG_ARCH_HAS_SYSCALL_WRAPPER variable had the
wrong value, despite kconfig map existing, misleading the eBPF program
execution (which would then have different pointers, not accepted by the
verifier during load time).

I got the patch proposed here by bisecting upstream tree with the testcase
just described. I kindly ask you to include this patch in the LTS v5.4.x
series so CO-RE (Compile Once - Run Everywhere) eBPF programs, relying in
kconfig settings, can be correctly loaded in kernel series v5.4.

Link: https://github.com/aquasecurity/tracee/issues/851#issuecomment-903074596

I have tested latest 5.4 stable tree with this patch and it fixes the issue.

-rafaeldtinoco



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-01  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 20:31 [PATCH] bpf: Track contents of read-only maps as scalars Rafael David Tinoco
2021-08-21 20:31 ` Rafael David Tinoco
2021-09-01  8:41   ` Greg KH

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).