BPF_[AND|OR|XOR|FETCH|XCHG|CMPXCHG] in net:test_bpf.sh from ubuntu_kernel_selftests failed on K-5.19 P9

Bug #2001618 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
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Po-Hsu Lin

Bug Description

[Impact]
The BPF_AND, BPF_OR, BPF_XOR, BPF_FETCH, BPF_XCHG and BPF_CMPXCHG related tests will fail in net:test_bpf test from ubuntu_kernel_selftests as they are not supported.

 test_bpf: #361 BPF_ATOMIC | BPF_W, BPF_AND: Test: 0x12 & 0xab = 0x02
 eBPF filter atomic op code c3 (@3) unsupported
 FAIL to select_runtime err=-524
 ...
 test_bpf: #365 BPF_ATOMIC | BPF_W, BPF_AND | BPF_FETCH: Test: 0x12 & 0xab = 0x02
 eBPF filter atomic op code c3 (@3) unsupported
 FAIL to select_runtime err=-524
 ...
 test_bpf: #377 BPF_ATOMIC | BPF_W, BPF_OR: Test: 0x12 | 0xab = 0xbb FAIL to select_runtime err=-524
 ...
 test_bpf: #393 BPF_ATOMIC | BPF_W, BPF_XOR: Test: 0x12 ^ 0xab = 0xb9 FAIL to select_runtime err=-524
 ...
 test_bpf: #409 BPF_ATOMIC | BPF_W, BPF_XCHG: Test: 0x12 xchg 0xab = 0xab
 eBPF filter atomic op code c3 (@3) unsupported
 FAIL to select_runtime err=-524
 ...
 test_bpf: #417 BPF_ATOMIC | BPF_W, BPF_CMPXCHG: Test successful return
 eBPF filter atomic op code c3 (@3) unsupported
 FAIL to select_runtime err=-524
 ...
 test_bpf: Summary: 894 PASSED, 132 FAILED, [882/882 JIT'ed]

Please find attachment for the complete test log.

[Fix]
* 6511270911 powerpc/bpf/64: add support for BPF_ATOMIC bitwise operations
* dbe6e2456f powerpc/bpf/64: add support for atomic fetch operations
* 1e82dfaa78 powerpc/bpf/64: Add instructions for atomic_[cmp]xchg
These patches can be cherry-picked into Kinetic kernel.

[Test]
Test kernel can be found here:
https://people.canonical.com/~phlin/kernel/lp-2001618-ppcbpf/

Steps:
1. Reboot with the patched kernel
2. Run:
  sudo dmesg -C
  sudo modprobe test_bpf
  sudo dmesg

Tested with Power9 node baltar, with the patched kernel there will be no failure reported by the test_bpf:
  test_bpf: Summary: 1026 PASSED, 0 FAILED, [1014/1014 JIT'ed]

[Where problems could occur]
This patchset just broaden the BPF operations support on ppc64, we might see some new failures when using these instruction somewhere in the future.

Cascardo: The existing atomic operations may regress as well, since they now produce different code.

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

Complete test log for the test_bpf failure.

Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Po-Hsu Lin (cypressyew)
description: updated
Changed in linux (Ubuntu Kinetic):
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Kinetic):
status: New → In Progress
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: New → Fix Released
Po-Hsu Lin (cypressyew)
description: updated
Changed in linux (Ubuntu Kinetic):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.19.0-30.31 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-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

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: kernel-spammed-kinetic-linux verification-needed-kinetic
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Test passed with Kinetic linux/5.19.0-30.31 on P9 node "baltar":
test_bpf: Summary: 1026 PASSED, 0 FAILED, [1014/1014 JIT'ed]
test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
test_bpf: test_skb_segment: Summary: 2 PASSED, 0 FAILED

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hint removed, marking this as Fix-released in U-K-T

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (32.9 KiB)

This bug was fixed in the package linux - 5.19.0-31.32

---------------
linux (5.19.0-31.32) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-31.32 -proposed tracker (LP: #2003423)

  * amdgpu: framebuffer is destroyed and the screen freezes with unsupported IP
    blocks (LP: #2003524)
    - drm/amd: Delay removal of the firmware framebuffer

  * Revoke & rotate to new signing key (LP: #2002812)
    - [Packaging] Revoke and rotate to new signing key

linux (5.19.0-30.31) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-30.31 -proposed tracker (LP: #2001756)

  * Packaging resync (LP: #1786013)
    - [Packaging] update helper scripts
    - debian/dkms-versions -- update from kernel-versions (main/2023.01.02)

  * Add some ACPI device IDs for Intel HID device (LP: #1995453)
    - platform/x86/intel/hid: Add some ACPI device IDs

  * Fix iosm: WWAN cannot build the connection (DW5823e) (LP: #1998115)
    - net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled
    - [Config] CONFIG_IOSM update annotations on arm64 armhf ppc64el s390x riscv64

  * BPF_[AND|OR|XOR|FETCH|XCHG|CMPXCHG] in net:test_bpf.sh from
    ubuntu_kernel_selftests failed on K-5.19 P9 (LP: #2001618)
    - powerpc/bpf/64: add support for BPF_ATOMIC bitwise operations
    - powerpc/bpf/64: add support for atomic fetch operations
    - powerpc/bpf/64: Add instructions for atomic_[cmp]xchg

  * [DEP-8] Run ADT regression suite for lowlatency kernels Jammy and later
    (LP: #1999528)
    - [DEP-8] Fix regression suite to run on lowlatency

  * Kinetic update: upstream stable patchset 2022-12-15 (LP: #1999828)
    - serial: ar933x: Deassert Transmit Enable on ->rs485_config()
    - KVM: x86: Trace re-injected exceptions
    - RDMA/cma: Use output interface for net_dev check
    - IB/hfi1: Correctly move list in sc_disable()
    - RDMA/hns: Disable local invalidate operation
    - NFSv4: Fix a potential state reclaim deadlock
    - NFSv4.1: Handle RECLAIM_COMPLETE trunking errors
    - NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
    - SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed
    - NFSv4.2: Fixup CLONE dest file size for zero-length count
    - nfs4: Fix kmemleak when allocate slot failed
    - net: dsa: Fix possible memory leaks in dsa_loop_init()
    - RDMA/core: Fix null-ptr-deref in ib_core_cleanup()
    - RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
    - net: dsa: fall back to default tagger if we can't load the one from DT
    - nfc: fdp: Fix potential memory leak in fdp_nci_send()
    - nfc: nxp-nci: Fix potential memory leak in nxp_nci_send()
    - nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
    - nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
    - net: fec: fix improper use of NETDEV_TX_BUSY
    - ata: pata_legacy: fix pdc20230_set_piomode()
    - net: sched: Fix use after free in red_enqueue()
    - net: tun: fix bugs for oversize packet when napi frags enabled
    - netfilter: nf_tables: netlink notifier might race to release objects
    - netfilter: nf_tables: release flow rule object from commit path
    - ipvs: use explicitly signed chars
    - ipvs: fix WARNING i...

Changed in linux (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws/5.19.0-1020.21 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-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

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: kernel-spammed-kinetic-linux-aws verification-needed-kinetic
removed: verification-done-kinetic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-lowlatency-hwe-5.19/5.19.0-1017.18~22.04.1 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-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

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: kernel-spammed-jammy-linux-lowlatency-hwe-5.19 verification-needed-jammy
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

We don't have PowerPC for AWS / lowlatency.

tags: added: verification-done-jammy
removed: verification-needed-jammy
tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-riscv/5.19.0-1013.14 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-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

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: kernel-spammed-kinetic-linux-riscv verification-needed-kinetic
removed: verification-done-kinetic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.19.0-1021.22 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-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

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: kernel-spammed-kinetic-linux-azure
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

We don't have PowerPC for riscv / azure.

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for linux-lowlatency-hwe-5.19 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-riscv-5.19/5.19.0-1015.16~22.04.1 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-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

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: kernel-spammed-jammy-linux-riscv-5.19 verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

No PowerPC for riscv.

tags: added: verification-done-jammy
removed: verification-needed-jammy
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.