bpf/selftests: Test PTR_TO_RDONLY_MEM
authorHao Luo <haoluo@google.com>
Fri, 17 Dec 2021 00:31:52 +0000 (16:31 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 18 Dec 2021 21:27:41 +0000 (13:27 -0800)
commit9497c458c10b049438ef6e6ddda898edbc3ec6a8
treebc4fe9822abbf115f8c1183461bc9fdcb96f9212
parent216e3cd2f28dbbf1fe86848e0e29e6693b9f0a20
bpf/selftests: Test PTR_TO_RDONLY_MEM

This test verifies that a ksym of non-struct can not be directly
updated.

Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-10-haoluo@google.com
tools/testing/selftests/bpf/prog_tests/ksyms_btf.c
tools/testing/selftests/bpf/progs/test_ksyms_btf_write_check.c [new file with mode: 0644]