[Regression] failed to compile seccomp test from ubuntu_kernel_selftests

Bug #1840932 reported by Po-Hsu Lin on 2019-08-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Undecided
Unassigned
linux (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[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.

-------------------------------------------
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-1040-gke 4.15.0-1040.42
ProcVersionSignature: Ubuntu 4.15.0-1040.42-gke 4.15.18
Uname: Linux 4.15.0-1040-gke x86_64
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
Date: Wed Aug 21 14:33:19 2019
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-signed-gke-4.15
UpgradeStatus: No upgrade log present (probably fresh install)

CVE References

Po-Hsu Lin (cypressyew) wrote :
affects: linux-signed-gke-4.15 (Ubuntu) → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1840932

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Bionic):
status: New → Incomplete
Po-Hsu Lin (cypressyew) wrote :
tags: added: sru-20190812 ubuntu-kernel-selftests
Changed in linux (Ubuntu Bionic):
status: Incomplete → Confirmed
Po-Hsu Lin (cypressyew) on 2019-08-21
description: updated
Changed in linux (Ubuntu Bionic):
status: Confirmed → In Progress
Po-Hsu Lin (cypressyew) wrote :

Commit in comment #3 is not the right one, we have already got that.

description: updated

The commit in comment #3 is actually not applied to the bionic tree.

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.

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

description: updated
Stefan Bader (smb) on 2019-08-22
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :
Download full text (235.3 KiB)

This bug was fixed in the package linux - 4.15.0-60.67

---------------
linux (4.15.0-60.67) bionic; urgency=medium

  * bionic/linux: 4.15.0-60.67 -proposed tracker (LP: #1841086)

  * [Regression] net test from ubuntu_kernel_selftests failed due to bpf test
    compilation issue (LP: #1840935)
    - SAUCE: Fix "bpf: relax verifier restriction on BPF_MOV | BPF_ALU"

  * [Regression] failed to compile seccomp test from ubuntu_kernel_selftests
    (LP: #1840932)
    - Revert "selftests: skip seccomp get_metadata test if not real root"

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis

linux (4.15.0-59.66) bionic; urgency=medium

  * bionic/linux: 4.15.0-59.66 -proposed tracker (LP: #1840006)

  * zfs not completely removed from bionic tree (LP: #1840051)
    - SAUCE: (noup) remove completely the zfs code

  * Packaging resync (LP: #1786013)
    - [Packaging] update helper scripts

  * [18.04 FEAT] Enhanced hardware support (LP: #1836857)
    - s390: report new CPU capabilities
    - s390: add alignment hints to vector load and store

  * [18.04 FEAT] Enhanced CPU-MF hardware counters - kernel part (LP: #1836860)
    - s390/cpum_cf: Add support for CPU-MF SVN 6
    - s390/cpumf: Add extended counter set definitions for model 8561 and 8562

  * ideapad_laptop disables WiFi/BT radios on Lenovo Y540 (LP: #1837136)
    - platform/x86: ideapad-laptop: Remove no_hw_rfkill_list

  * Stacked onexec transitions fail when under NO NEW PRIVS restrictions
    (LP: #1839037)
    - SAUCE: apparmor: fix nnp subset check failure when, stacking

  * bcache: bch_allocator_thread(): hung task timeout (LP: #1784665) // Tight
    timeout for bcache removal causes spurious failures (LP: #1796292)
    - SAUCE: bcache: fix deadlock in bcache_allocator

  * bcache: bch_allocator_thread(): hung task timeout (LP: #1784665)
    - bcache: never writeback a discard operation
    - bcache: improve bcache_reboot()
    - bcache: fix writeback target calc on large devices
    - bcache: add journal statistic
    - bcache: fix high CPU occupancy during journal
    - bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set
    - bcache: fix incorrect sysfs output value of strip size
    - bcache: fix error return value in memory shrink
    - bcache: fix using of loop variable in memory shrink
    - bcache: Fix indentation
    - bcache: Add __printf annotation to __bch_check_keys()
    - bcache: Annotate switch fall-through
    - bcache: Fix kernel-doc warnings
    - bcache: Remove an unused variable
    - bcache: Suppress more warnings about set-but-not-used variables
    - bcache: Reduce the number of sparse complaints about lock imbalances
    - bcache: Fix a compiler warning in bcache_device_init()
    - bcache: Move couple of string arrays to sysfs.c
    - bcache: Move couple of functions to sysfs.c
    - bcache: Replace bch_read_string_list() by __sysfs_match_string()

  * linux hwe i386 kernel 5.0.0-21.22~18.04.1 crashes on Lenovo x220
    (LP: #1838115)
    - x86/mm: Check for pfn instead of page in vmalloc_sync_one()
    - x86/mm: Sync also unmappings in vmalloc_sync_all()
    - mm/vmalloc.c: add priority threshold to __purge_vmap_area_lazy()...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers