[SRU][R][PATCH 0/1] UBUNTU: SAUCE: selftests/seccomp fix compilation issue for amd64
Mehmet Basaran
mehmet.basaran at canonical.com
Mon May 25 09:59:06 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2154174
SRU Justification:
[Impact]
ubuntu_kernel_selftests:seccomp_build test fails for amd64 due to compilation
issues:
seccomp_bpf.c: In function ‘UPROBE_setup’:
seccomp_bpf.c:5175:74: error: pointer type mismatch in conditional expression [-Wincompatible-pointer-types]
5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
| ^
seccomp_bpf.c:5175:57: note: first expression has type ‘int (*)(void)’
5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
| ^~~~~~~~~~~~~~~~
seccomp_bpf.c:5175:76: note: second expression has type ‘int (__attribute__((nocf_check)) *)(void)’
5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
| ^~~~~~~~~~~~~
[Fix]
get_uprobe_offset() implicity casts functions pointers to (void *), make
it explicit to resolve the issue.
[Test Plan]
Verified ubuntu_kernel_selftests:seccomp_build test compiled sucessfully with the change.
[Where problems could occur]
The fix is minimal and only applied to selftests/seccomp. Semantically, fix doesn't change anything for this test as casts are now explicitly done instead. So, there shouldn't be any problems.
Mehmet Basaran (1):
UBUNTU: SAUCE: selftests/seccomp fix compilation issue for amd64
tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.43.0
More information about the kernel-team
mailing list