[SRU][Bionic][PATCH 0/1] Fix for ubuntu_kernel_selftests seccomp build failure (LP: #1840932)

Kleber Sacilotto de Souza kleber.souza at canonical.com
Thu Aug 22 13:34:41 UTC 2019


BugLink: https://bugs.launchpad.net/bugs/1840932

[Impact]
Commit c33a23ff8ffc (selftests: skip seccomp get_metadata test if not real root)
in Bionic tree

Is causing compilation error for the seccomp test in ubuntu_kernel_selftests:

$ sudo make -C tools/testing/selftests TARGETS=seccomp run_tests
make: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'
make[1]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/seccomp'
gcc -Wl,-no-as-needed -Wall seccomp_bpf.c -lpthread -o seccomp_bpf
seccomp_bpf.c: In function ‘syscall_restart’:
seccomp_bpf.c:2685:3: warning: implicit declaration of function ‘XFAIL’; did you mean ‘EFAULT’?
[-Wimplicit-function-declaration]
   XFAIL(return, "get_metadata requires real root");
   ^~~~~
   EFAULT
seccomp_bpf.c:2685:9: error: expected expression before ‘return’
   XFAIL(return, "get_metadata requires real root");
         ^~~~~~
Makefile:12: recipe for target 'seccomp_bpf' failed
make[1]: *** [seccomp_bpf] Error 1
make[1]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/seccomp'
Makefile:73: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests'

[Fix]
Commit upstream 3aa415dd2128 (selftests: skip seccomp get_metadata test if not
real root) depends on d057dc4e35e1 (seccomp: add a selftest for get_metadata),
but the latter has been reverted on bionic as part of bug #1837664. The
get_metadata testcase doesn't exist anymore, the backport of the patch ended
up changing syscall_restart instead.

So the best solution is to revert c33a23ff8ffc, which is not needed and is
causing trouble.

[Test Case]
Run the seccomp kernel selftests.

[Regression potential]
No regression potential. The commit introduced a regression by being wrongly
backported, so reverting it will fix the issue and has no risk.

Kleber Sacilotto de Souza (1):
  Revert "selftests: skip seccomp get_metadata test if not real root"

 tools/testing/selftests/seccomp/seccomp_bpf.c | 6 ------
 1 file changed, 6 deletions(-)

-- 
2.17.1




More information about the kernel-team mailing list