All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/2] bpf: enforce returning 0 for fentry/fexit programs
@ 2020-05-14  5:32 Yonghong Song
  2020-05-14  5:32 ` [PATCH bpf v2 1/2] bpf: enforce returning 0 for fentry/fexit progs Yonghong Song
  2020-05-14  5:32 ` [PATCH bpf v2 2/2] selftests/bpf: enforce returning 0 for fentry/fexit programs Yonghong Song
  0 siblings, 2 replies; 7+ messages in thread
From: Yonghong Song @ 2020-05-14  5:32 UTC (permalink / raw)
  To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team

Currently, tracing fentry/fexit program return value can be anything,
and these return values are actually ignored by trampoline codes.
Let us force return value to be 0 to avoid confusion and allow
possible future extension. Patch #1 is the kernel change and
Patch #2 fixed the selftest.

Changelog:
 v1 -> v2:
   - explicitly specify expected return value ranges for all
     attach types of the tracing programs. Any unspecified attach
     type will return an error. This will force any future
     tracing attach_type to be explicit about its return value
     range (Andrii).

Yonghong Song (2):
  bpf: enforce returning 0 for fentry/fexit progs
  selftests/bpf: enforce returning 0 for fentry/fexit programs

 kernel/bpf/verifier.c                          | 18 ++++++++++++++++++
 .../selftests/bpf/progs/test_overhead.c        |  4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-05-14 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  5:32 [PATCH bpf v2 0/2] bpf: enforce returning 0 for fentry/fexit programs Yonghong Song
2020-05-14  5:32 ` [PATCH bpf v2 1/2] bpf: enforce returning 0 for fentry/fexit progs Yonghong Song
2020-05-14  6:14   ` Andrii Nakryiko
2020-05-14 14:58     ` Yonghong Song
2020-05-14 19:57       ` Alexei Starovoitov
2020-05-14  5:32 ` [PATCH bpf v2 2/2] selftests/bpf: enforce returning 0 for fentry/fexit programs Yonghong Song
2020-05-14  6:14   ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.