** Description changed:

  When we build seccomp testsuite on resolute:linux-oem-7.0, we had the
  following build error.
- 
  
  4478  03:54:42 DEBUG| Running 'make -C linux/tools/testing/selftests 
TARGETS=seccomp'
  4479  03:54:42 DEBUG| [stdout] make: Entering directory 
'/home/ubuntu/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests'
  4480  03:54:42 DEBUG| [stdout] CC seccomp_bpf
  4481  03:54:42 ERROR| [stderr] seccomp_bpf.c: In function ‘UPROBE_setup’:
  4482  03:54:42 ERROR| [stderr] seccomp_bpf.c:5175:74: error: pointer type 
mismatch in conditional expression [-Wincompatible-pointer-types]
  4483  03:54:42 ERROR| [stderr] 5175 | offset = 
get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
  4484  03:54:42 ERROR| [stderr] | ^
  4485  03:54:42 ERROR| [stderr] seccomp_bpf.c:5175:57: note: first expression 
has type ‘int (*)(void)’
  4486  03:54:42 ERROR| [stderr] 5175 | offset = 
get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
  4487  03:54:42 ERROR| [stderr] | ^~~~~~~~~~~~~~~~
  4488  03:54:42 ERROR| [stderr] seccomp_bpf.c:5175:76: note: second expression 
has type ‘int (__attribute__((nocf_check)) *)(void)’
  4489  03:54:42 ERROR| [stderr] 5175 | offset = 
get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe);
  4490  03:54:42 ERROR| [stderr] | ^~~~~~~~~~~~~
  4491  03:54:42 ERROR| [stderr] make[1]: *** [../lib.mk:225: 
/home/ubuntu/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/seccomp/seccomp_bpf]
 Error 1
  4492  03:54:42 DEBUG| [stdout] make: Leaving directory 
'/home/ubuntu/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests'
  4493  03:54:42 ERROR| [stderr] make: *** [Makefile:212: all] Error 2
+ 
+ 
+ [Steps to Reproduce]
+ 1. Use an amd64 host. The defect is gated on x86_64 + CET (-fcf-protection,
+    default on Ubuntu) AND a compiler where -Wincompatible-pointer-types is an
+    error by default, i.e. gcc >= 14:
+      - resolute/26.04 -> default gcc-15, reproduces directly.
+ 2. Install the build dependencies the test harness uses:
+      sudo apt install build-essential libcap-dev pkg-config
+      # full suite also pulls: bc fuse kernel-wedge libfuse-dev
+ 
+ 3. Obtain the linux-oem-7.0 source at the affected version
+    (git tag Ubuntu-oem-7.0-7.0.0-1006.6, or "apt source linux-oem-7.0").
+ 
+ 4. Build the seccomp target exactly as the harness does:
+      cd <linux-oem-7.0-source>
+      # faithful (matches the test machine, gcc-15):
+      make -C tools/testing/selftests TARGETS=seccomp
+      # on noble, force the newer compiler to trigger the error:
+      make -C tools/testing/selftests TARGETS=seccomp CC=gcc-14
+ 
+ [Expected Result]
+ The seccomp target builds; seccomp_bpf binaries are
+ produced and the tests execute.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2156837

Title:
  seccomp_bpf fails to build on linux-oem-7.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2156837/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to