Skip to content

bpf: Fix errors in verifying a union

Yafang Shao bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesApplied 4/4
  2. v12 patches 3 repliesSuperseded

Changes from the cover letter

- bpf: Introduce union trusted
https://lore.kernel.org/bpf/[email protected]/
- bpf: Fix errors in verifying a union
https://lore.kernel.org/bpf/[email protected]/

Patches in v2 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: Fix an error around PTR_UNTRUSTEDkernel/bpf/btf.c kernel/bpf/verifier.c+14 -110 repliesApplied
2/4selftests/bpf: Add selftests for nested_trusttools/testing/selftests/bpf/progs/nested_trust_failure.c tools/testing/selftests/bpf/progs/nested_trust_success.c+31 -00 repliesApplied
3/4bpf: Fix an error in verifying a field in a unionkernel/bpf/btf.c+1 -10 repliesApplied
4/4selftests/bpf: Add selftest for PTR_UNTRUSTEDtools/testing/selftests/bpf/prog_tests/ptr_untrusted.c tools/testing/selftests/bpf/progs/test_ptr_untrusted.c+65 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/4] bpf: Fix errors in verifying a union

From: root <[email protected]>

Patch #1: Fix an issue found in code review Patch #2: Selftest for #1
Patch #3: Fix an issue found in our dev server Patch #4: Selftest for #3

Changes:
- bpf: Introduce union trusted
https://lore.kernel.org/bpf/[email protected]/
- bpf: Fix errors in verifying a union
https://lore.kernel.org/bpf/[email protected]/

Yafang Shao (4):
bpf: Fix an error around PTR_UNTRUSTED selftests/bpf: Add selftests for nested_trust
bpf: Fix an error in verifying a field in a union selftests/bpf: Add selftest for PTR_UNTRUSTED

 kernel/bpf/btf.c                              | 22 ++++++------
 kernel/bpf/verifier.c                         |  5 +++
 .../selftests/bpf/prog_tests/ptr_untrusted.c  | 36 +++++++++++++++++++
 .../bpf/progs/nested_trust_failure.c          | 16 +++++++++
 .../bpf/progs/nested_trust_success.c          | 15 ++++++++
 .../selftests/bpf/progs/test_ptr_untrusted.c  | 29 +++++++++++++++
 6 files changed, 111 insertions(+), 12 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/ptr_untrusted.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_ptr_untrusted.c
Signature · 1 line
2.39.3