]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: do not disable /dev/null device access in cgroup dev test
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Wed, 31 Jul 2024 06:37:25 +0000 (08:37 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 31 Jul 2024 17:00:20 +0000 (10:00 -0700)
commitba6a9018502eecb94e67001deeb48406fa71f916
tree0b4c17d66a0178bcbc80290fb9675eb4e732cccc
parent92cc2456e9775dc4333fb4aa430763ae4ac2f2d9
selftests/bpf: do not disable /dev/null device access in cgroup dev test

test_dev_cgroup currently loads a small bpf program allowing any access on
urandom and zero devices, disabling access to any other device. It makes
migrating this test to test_progs impossible, since this one manipulates
extensively /dev/null.

Allow /dev/null manipulation in dev_cgroup program to make its usage in
test_progs framework possible. Update test_dev_cgroup.c as well to match
this change while it has not been removed.

Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20240731-convert_dev_cgroup-v4-1-849425d90de6@bootlin.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/progs/dev_cgroup.c
tools/testing/selftests/bpf/test_dev_cgroup.c