aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/cyc_complexity_plugin.c
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2019-02-05 14:28:44 -0800
committerAlexei Starovoitov <[email protected]>2019-02-05 18:31:22 -0800
commit206dafb0a3a1defec131be77b7c3e14b2731fdf1 (patch)
tree0a9a39f6a927ee431faaf43da6105e00b62d2da0 /scripts/gcc-plugins/cyc_complexity_plugin.c
parent90d304b7f7a1c9ab6cdce54d65c55e5c722f0d25 (diff)
tools/bpf: fix a selftest test_btf failure
Commit 9c651127445c ("selftests/btf: add initial BTF dedup tests") added dedup tests in test_btf.c. It broke the raw test: BTF raw test[71] (func proto (Bad arg name_off)): btf_raw_create:2905:FAIL Error getting string #65535, strs_cnt:1 The test itself encodes invalid func_proto parameter name offset 0xffffFFFF as a negative test for the kernel. The above commit changed the meaning of that offset and resulted in a user space error. #define NAME_NTH(N) (0xffff0000 | N) #define IS_NAME_NTH(X) ((X & 0xffff0000) == 0xffff0000) #define GET_NAME_NTH_IDX(X) (X & 0x0000ffff) Currently, the kernel permits maximum name offset 0xffff. Set the test name off as 0x0fffFFFF to trigger the kernel verification failure. Cc: Andrii Nakryiko <[email protected]> Fixes: 9c651127445c ("selftests/btf: add initial BTF dedup tests") Signed-off-by: Yonghong Song <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions