linux/tools
Daniel Borkmann baa802d2aa selftests/bpf: Add test for writes to .rodata
Add a small test to write a (verification-time) fixed vs unknown but
bounded-sized buffer into .rodata BPF map and assert that both get
rejected.

  # ./vmtest.sh -- ./test_progs -t verifier_const
  [...]
  ./test_progs -t verifier_const
  [    1.418717] tsc: Refined TSC clocksource calibration: 3407.994 MHz
  [    1.419113] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcde90a1, max_idle_ns: 440795222066 ns
  [    1.419972] clocksource: Switched to clocksource tsc
  [    1.449596] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.449958] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  #475/1   verifier_const/rodata/strtol: write rejected:OK
  #475/2   verifier_const/bss/strtol: write accepted:OK
  #475/3   verifier_const/data/strtol: write accepted:OK
  #475/4   verifier_const/rodata/mtu: write rejected:OK
  #475/5   verifier_const/bss/mtu: write accepted:OK
  #475/6   verifier_const/data/mtu: write accepted:OK
  #475/7   verifier_const/rodata/mark: write with unknown reg rejected:OK
  #475/8   verifier_const/rodata/mark: write with unknown reg rejected:OK
  #475     verifier_const:OK
  #476/1   verifier_const_or/constant register |= constant should keep constant type:OK
  #476/2   verifier_const_or/constant register |= constant should not bypass stack boundary checks:OK
  #476/3   verifier_const_or/constant register |= constant register should keep constant type:OK
  #476/4   verifier_const_or/constant register |= constant register should not bypass stack boundary checks:OK
  #476     verifier_const_or:OK
  Summary: 2/12 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241021152809.33343-4-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-10-22 15:42:56 -07:00
..
accounting
arch linux_kselftest-fixes-6.12-rc3 2024-10-11 16:12:45 -07:00
bootconfig
bpf bpftool: Fix undefined behavior in qsort(NULL, 0, ...) 2024-09-10 11:40:55 -07:00
build perf build: Fix build feature-dwarf_getlocations fail for old libdw 2024-10-02 18:21:49 -03:00
certs
cgroup
counter
crypto
debugging
firewire
firmware
gpio tools: gpio: rm .*.cmd on make clean 2024-09-02 12:27:35 +02:00
hv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
iio tools: iio: rm .*.cmd when make clean 2024-09-05 19:27:13 +01:00
include BPF fixes: 2024-10-18 16:27:14 -07:00
kvm/kvm_stat
laptop
leds
lib memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
memory-model tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt 2024-09-13 23:56:44 -07:00
mm Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
net NFSD 6.12 Release Notes 2024-09-23 12:01:45 -07:00
objtool LoongArch changes for v6.12 2024-09-27 10:14:35 -07:00
pci tools: PCI: Remove unused BILLION macro 2024-09-13 22:37:06 +00:00
pcmcia
perf perf tools fixes for v6.12: 2024-10-08 10:43:22 -07:00
power linux-cpupower-6.12-rc1-fixes 2024-09-24 12:57:46 -07:00
rcu
sched_ext sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED 2024-10-07 10:16:18 -10:00
scripts
sound
spi spi: spidev_fdx: Fix the wrong format specifier 2024-09-04 16:50:33 +01:00
testing selftests/bpf: Add test for writes to .rodata 2024-10-22 15:42:56 -07:00
thermal
time
tracing rtla: Fix the help text in osnoise and timerlat top tools 2024-10-03 16:43:22 -04:00
usb tools: usb: p9_fwd: add usb gadget packet forwarder script 2024-09-03 09:57:08 +02:00
verification
virtio tools/virtio:Fix the wrong format specifier 2024-09-10 02:51:48 -04:00
wmi
workqueue
writeback
Makefile