[Regression] net test from ubuntu_kernel_selftests failed due to bpf test compilation issue

Bug #1840935 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Sean Feole
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Commit a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) in Bionic tree

Is causing bpf test compilation failure:
$ sudo make -C tools/testing/selftests TARGETS=bpf 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/bpf'
make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
make -C ../../../lib/bpf OUTPUT=/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/
make[2]: Entering directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'
make[2]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/lib/bpf'
gcc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../../include/generated -I../../../include test_verifier.c /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/libbpf.a /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/cgroup_helpers.c -lcap -lelf -lrt -o /home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier
test_verifier.c:2173:4: error: ‘struct bpf_test’ has no member named ‘retval’
   .retval = 0,
    ^~~~~~
../lib.mk:121: recipe for target '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier' failed
make[1]: *** [/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf/test_verifier] Error 1
make[1]: Leaving directory '/home/jenkins/ubuntu-gke-4.15-bionic/tools/testing/selftests/bpf'
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]
Bionic misses 111e6b45315c (selftests/bpf: make test_verifier run most programs), which adds the 'retval' member to struct bpf_test. The fix is a SAUCE patch to remove setting '.retval = 0'.

[Test Case]
Run bpf kernel selftests.

[Regression Potential]
Low. There's a chance that not backporting 111e6b45315c (selftests/bpf: make test_verifier run most programs) will cause possible bugs on the changes added by a25d38b54163 (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) to remain uncaught.

------------------------------------------------
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 15:09:32 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

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
affects: linux-signed-gke-4.15 (Ubuntu) → linux (Ubuntu)
tags: added: sru-20190812 ubuntu-kernel-selftests
Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

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 1840935

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
Changed in linux (Ubuntu Bionic):
status: Incomplete → Confirmed
status: Confirmed → In Progress
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Commit e434b8cd (bpf: relax verifier restriction on BPF_MOV | BPF_ALU) seems to need as prerequisite:

111e6b45315c selftests/bpf: make test_verifier run most programs

description: updated
Stefan Bader (smb)
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
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
Revision history for this message
Sean Feole (sfeole) wrote :

Verified Fix Released, updating bug

Changed in ubuntu-kernel-tests:
status: New → Triaged
assignee: nobody → Sean Feole (sfeole)
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Changed in ubuntu-kernel-tests:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.