Insert test_bpf module will report 4 failures for ubuntu_bpf_jit on X s390x

Bug #1768452 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Po-Hsu Lin
Disco
Fix Released
Medium
Unassigned

Bug Description

== SRU Justification ==
In the ubuntu_bpf_jit test, it will insert the test_bpf module to perform the test. There will be 4 failures reported on s390x instances by the test, 3 of them were simply because they cannot be jited on s390x:
  * test_bpf: #243 BPF_MAXINSNS: Ctx heavy transformations FAIL to prog_create err=-524 len=4096
  * test_bpf: #244 BPF_MAXINSNS: Call heavy transformations FAIL to prog_create err=-524 len=4096
  * test_bpf: #249 BPF_MAXINSNS: ld_abs+get_processor_id FAIL to prog_create err=-524 len=4096

(For another failure "ld_abs+vlan_push/pop" please check bug 1868243)

== Fix ==
* 3203c901 (test_bpf: flag tests that cannot be jited on s390)
Only Xenial needs this patch, and it needs to be backported to Xenial
as some test case does not exist.

== Test ==
Test kernel could be found here:
https://people.canonical.com/~phlin/kernel/lp-1768452-bpf-jit/

The test will be marked as pass with the patched kernel:
test_bpf: #243 BPF_MAXINSNS: Ctx heavy transformations PASS
test_bpf: #244 BPF_MAXINSNS: Call heavy transformations PASS
test_bpf: #249 BPF_MAXINSNS: ld_abs+get_processor_id PASS

== Regression Potential ==
Low, change limited to the test_bpf module itself and specific to s390x, no impact to real functions.

== Original Bug Report ==
After the test_bpf insert issue for Xenial was fixed in bug 1765698

But it looks like the s390x needs some extra work.
$ sudo modprobe test_bpf
modprobe: ERROR: could not insert 'test_bpf': Invalid argument

4 tests failed here:
  test_bpf: #243 BPF_MAXINSNS: Ctx heavy transformations FAIL to prog_create err=-524 len=4096
  test_bpf: #244 BPF_MAXINSNS: Call heavy transformations FAIL to prog_create err=-524 len=4096
  test_bpf: #249 BPF_MAXINSNS: ld_abs+get_processor_id FAIL to prog_create err=-524 len=4096
  test_bpf: #250 BPF_MAXINSNS: ld_abs+vlan_push/pop FAIL to select_runtime err=-524

Complete test result:
https://pastebin.ubuntu.com/p/zMDwVjwF7X/

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-123-generic 4.4.0-123.147
ProcVersionSignature: Ubuntu 4.4.0-123.147-generic 4.4.128
Uname: Linux 4.4.0-123-generic s390x
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access '/dev/snd/': No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.1-0ubuntu2.16
Architecture: s390x
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Wed May 2 03:45:22 2018
HibernationDevice: RESUME=UUID=f578fa27-1d57-41c9-bb1d-7ff64c1c9345
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb: Error: command ['lsusb'] failed with exit code 1:
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: Error: [Errno 2] No such file or directory: '/proc/fb'
ProcKernelCmdLine: root=UUID=f26894a2-496d-4891-aa9a-f66344c77779 crashkernel=196M BOOT_IMAGE=0
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-123-generic N/A
 linux-backports-modules-4.4.0-123-generic N/A
 linux-firmware 1.157.17
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)

CVE References

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu Xenial):
status: New → Triaged
Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in linux (Ubuntu Xenial):
importance: Undecided → Medium
tags: added: kernel-da-key
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: Unable to insert test_bpf module on Xenial s390x
Changed in ubuntu-kernel-tests:
status: New → Won't Fix
Changed in linux (Ubuntu):
status: Triaged → Invalid
Changed in linux (Ubuntu Xenial):
status: Triaged → Invalid
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Re-open this bus, as it's for ubuntu_bpf_jit test, the patch mentioned in #3 is for the ubuntu_bpf test.

Will need to check if we need to blacklist Xenial for this as well (probably not, as we don't have it blacklisted at the very beginning)

Changed in linux (Ubuntu):
status: Invalid → Confirmed
Changed in ubuntu-kernel-tests:
status: Won't Fix → Confirmed
Changed in linux (Ubuntu Xenial):
status: Invalid → Confirmed
Po-Hsu Lin (cypressyew)
summary: - Unable to insert test_bpf module on Xenial s390x
+ Unable to insert test_bpf module for ubuntu_bpf_jit on Xenial s390x
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: Unable to insert test_bpf module for ubuntu_bpf_jit on Xenial s390x

Checked on Disco, it will fail with the same error message.

$ cat /boot/config-5.0.0-8-generic | grep CONFIG_TEST_BPF
CONFIG_TEST_BPF=m

It looks like all the test have passed but jited as well.:

$ sudo modprobe test_bpf
....
test_bpf: Summary: 377 PASSED, 1 FAILED, [362/362 JIT'ed]

Please find the attachment for dmesg output.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

BTW for Disco, it's complaining about 1 Failure, but I can't see any in the dmesg output.

For Xenial LPAR, the failure is a bit different:

There are 4 failures:
[508578.608193] test_bpf: #243 BPF_MAXINSNS: Ctx heavy transformations FAIL to prog_create err=-524 len=4096
[508578.609417] test_bpf: #244 BPF_MAXINSNS: Call heavy transformations FAIL to prog_create err=-524 len=4096
...
[508578.684174] test_bpf: #249 BPF_MAXINSNS: ld_abs+get_processor_id FAIL to prog_create err=-524 len=4096
[508578.685440] test_bpf: #250 BPF_MAXINSNS: ld_abs+vlan_push/pop FAIL to select_runtime err=-524

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This has passed on Cosmic zVM.

Sean Feole (sfeole)
summary: - Unable to insert test_bpf module for ubuntu_bpf_jit on Xenial s390x
+ Unable to insert test_bpf module for ubuntu_bpf_jit s390x
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: Unable to insert test_bpf module for ubuntu_bpf_jit s390x

For Disco (no failure but reported 1 failed), please refer to bug 1827845

As it's different from this report, I will mark it as fix-released for Disco here.

Changed in linux (Ubuntu Disco):
status: Confirmed → Fix Released
summary: - Unable to insert test_bpf module for ubuntu_bpf_jit s390x
+ Insert test_bpf module will report 4 failures for ubuntu_bpf_jit on X
+ s390x
Brad Figg (brad-figg)
tags: added: cscc
Sean Feole (sfeole)
Changed in ubuntu-kernel-tests:
status: Confirmed → Triaged
tags: added: sru-20200106
Po-Hsu Lin (cypressyew)
tags: added: sru-20200217
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Xenial):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew)
description: updated
tags: added: sru-20200316
Changed in linux (Ubuntu Xenial):
status: Confirmed → In Progress
Changed in ubuntu-kernel-tests:
status: Triaged → In Progress
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Changed in linux (Ubuntu Xenial):
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-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

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-xenial
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

247. 04/07 11:10:34 DEBUG| utils:0153| [stdout] [ 89.844896] test_bpf: #243 BPF_MAXINSNS: Ctx heavy transformations PASS
248. 04/07 11:10:34 DEBUG| utils:0153| [stdout] [ 89.846168] test_bpf: #244 BPF_MAXINSNS: Call heavy transformations PASS
04/07 11:10:34 DEBUG| utils:0153| [stdout] [ 89.930042] test_bpf: #249 BPF_MAXINSNS: ld_abs+get_processor_id PASS

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (17.6 KiB)

This bug was fixed in the package linux - 4.4.0-178.208

---------------
linux (4.4.0-178.208) xenial; urgency=medium

  * xenial/linux: 4.4.0-178.208 -proposed tracker (LP: #1870660)

  * CVE-2019-19768
    - blktrace: Protect q->blk_trace with RCU
    - blktrace: fix dereference after null check

  * Multiple Kexec in AWS Nitro instances fail (LP: #1869948)
    - net: ena: Add PCI shutdown handler to allow safe kexec

  * Insert test_bpf module will report 4 failures for ubuntu_bpf_jit on X s390x
    (LP: #1768452)
    - test_bpf: flag tests that cannot be jited on s390

  * Mounting LVM snapshots with xfs can hit kernel BUG in nvme driver
    (LP: #1869229)
    - block: fix bio_will_gap() for first bvec with offset

  * Xenial update: 4.4.217 upstream stable release (LP: #1868629)
    - NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array
    - r8152: check disconnect status after long sleep
    - net: nfc: fix bounds checking bugs on "pipe"
    - bnxt_en: reinitialize IRQs when MTU is modified
    - fib: add missing attribute validation for tun_id
    - nl802154: add missing attribute validation
    - nl802154: add missing attribute validation for dev_type
    - team: add missing attribute validation for port ifindex
    - team: add missing attribute validation for array index
    - nfc: add missing attribute validation for SE API
    - nfc: add missing attribute validation for vendor subcommand
    - ipvlan: add cond_resched_rcu() while processing muticast backlog
    - ipvlan: do not add hardware address of master to its unicast filter list
    - ipvlan: egress mcast packets are not exceptional
    - ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast()
    - ipvlan: don't deref eth hdr before checking it's set
    - macvlan: add cond_resched() during multicast processing
    - net: fec: validate the new settings in fec_enet_set_coalesce()
    - slip: make slhc_compress() more robust against malicious packets
    - bonding/alb: make sure arp header is pulled before accessing it
    - net: fq: add missing attribute validation for orphan mask
    - iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn +
      add_taint
    - drm/amd/display: remove duplicated assignment to grph_obj_type
    - gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache
    - KVM: x86: clear stale x86_emulate_ctxt->intercept value
    - ARC: define __ALIGN_STR and __ALIGN symbols for ARC
    - efi: Fix a race and a buffer overflow while reading efivars via sysfs
    - iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
    - iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page
    - nl80211: add missing attribute validation for critical protocol indication
    - nl80211: add missing attribute validation for channel switch
    - netfilter: cthelper: add missing attribute validation for cthelper
    - iommu/vt-d: Fix the wrong printing in RHSA parsing
    - iommu/vt-d: Ignore devices with out-of-spec domain number
    - ipv6: restrict IPV6_ADDRFORM operation
    - efi: Add a sanity check to efivar_store_raw()
    - batman-adv: Fix invalid read while copying bat_iv.bcast_own
    - batman-adv: Only p...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → 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.