BPF selftests compilation failure due to selftests-bpf-initialize-operation-name-before-use.patch
Hi Sasha,
I am running into BPF selftests compilation error on 6.18 (but it possibly affect other branches as well, haven't check) due to selftests-bpf-initialize-operation-name-before-use.patch currently sitting in stable-queue:
/tmp/work/linux-stable/linux-stable/tools/testing/selftests/bpf/prog_tests/verifier_log.c: In function ‘verif_btf_log_subtest’:/tmp/work/linux-stable/linux-stable/tools/testing/selftests/bpf/prog_tests/verifier_log.c:320:9: error: implicit declaration of function ‘strscpy’; did you mean ‘strlcpy’? [-Werror=implicit-function-declaration]
320 | strscpy(op_name, "log_fixed", sizeof(op_name));
| ^~~~~~~
| strlcpyCan you pick up commit 63c49efc987a ("selftests/bpf: Add simple strscpy() implementation") along? I think that should be enough to fix the build failure.
Greg KH
maintainerQuoted 9 lines · Shung-Hsi Yu
Hi Sasha,
I am running into BPF selftests compilation error on 6.18 (but it possibly affect other branches as well, haven't check) due to selftests-bpf-initialize-operation-name-before-use.patch currently sitting in stable-queue:
/tmp/work/linux-stable/linux-stable/tools/testing/selftests/bpf/prog_tests/verifier_log.c: In function ‘verif_btf_log_subtest’:/tmp/work/linux-stable/linux-stable/tools/testing/selftests/bpf/prog_tests/verifier_log.c:320:9: error: implicit declaration of function ‘strscpy’; did you mean ‘strlcpy’? [-Werror=implicit-function-declaration]
Quoted 7 lines
320 | strscpy(op_name, "log_fixed", sizeof(op_name)); | ^~~~~~~ | strlcpyCan you pick up commit
63c49efc987a("selftests/bpf: Add simplestrscpy()implementation") along? I think that should be enough to fix the build failure.
Now applied, thanks.
greg k-h
Sasha Levin
maintainerQuoted 3 lines
Can you pick up commit
63c49efc987a("selftests/bpf: Add simplestrscpy()implementation") along? I think that should be enough to fix the build failure.
Greg has already picked it up for 6.18, which covers the tree you hit.
The offending selftests patch is also queued for 6.12 and 6.6, and you were right that they're affected too. Unfortunately 63c49efc987a doesn't apply there as-is: it depends on 9a6a6a319157 ("tools/testing:
add linux/args.h header and fix radix, VMA tests"), which isn't in either tree.
Could you send adapted backports of the strscpy helper for 6.12.y and 6.6.y? I'll hold off on those branches until then.
Signature · 2 lines
Thanks, Sasha
Quoted 10 lines · Sasha Levin
Quoted 3 lines
Can you pick up commit
63c49efc987a("selftests/bpf: Add simplestrscpy()implementation") along? I think that should be enough to fix the build failure.Greg has already picked it up for 6.18, which covers the tree you hit.
The offending selftests patch is also queued for 6.12 and 6.6, and you were right that they're affected too. Unfortunately
63c49efc987adoesn't apply there as-is: it depends on9a6a6a319157("tools/testing: addlinux/args.hheader and fix radix, VMA tests"), which isn't in either tree.Could you send adapted backports of the strscpy helper for 6.12.y and 6.6.y? I'll hold off on those branches until then.
Ack, I can give it a try.