Disable ftrace of sbi functions

Bug #1940426 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-riscv (Ubuntu)
Undecided
Unassigned
Hirsute
Undecided
Unassigned
linux-riscv-5.11 (Ubuntu)
Undecided
Unassigned
Focal
High
Unassigned

Bug Description

[Impact]

 * A kernel build can fail to boot with Oops and illegal instruction as seen at https://bugs.launchpad.net/ubuntu/+source/linux-riscv-5.11/+bug/1934548 on Unmatched board.

 * One cannot frace functions, used in frace setup. On RISC-V these are sbi calls to firmware from sbi.c which were not excluded for tracing. Similar functions on other arches are already excluded.

 * Previously we have identified one call that was racing and causing failure to boot and marked it for notrace. But the upstream solution is to disable all functions in sbi.c which was implemented in v5.12 but did not make it to stable/earlier trees.

 * Note that this failure to boot is racy, meaning some lucky builds of kernel always boot or always fail, as was observed on Unmatched.

[Test Plan]

 * Kernel should boot on baremetal Unmatched, Unleashed, and qemu

[Where problems could occur]

 * This patch disables profiling and tracing of sbi.c function calls. Previously it was possible to trace them, somewhat, either successfully in a racy manner or to cause a kernel panic.

CVE References

affects: linux-riscv-5.11 (Ubuntu) → linux-riscv (Ubuntu)
no longer affects: linux-riscv-5.11 (Ubuntu Hirsute)
Changed in linux-riscv-5.11 (Ubuntu):
status: New → Invalid
Changed in linux-riscv-5.11 (Ubuntu Focal):
status: New → Confirmed
Changed in linux-riscv (Ubuntu Hirsute):
status: New → Confirmed
no longer affects: linux-riscv (Ubuntu Focal)
Changed in linux-riscv (Ubuntu):
status: New → Fix Released
Stefan Bader (smb)
Changed in linux-riscv-5.11 (Ubuntu Focal):
importance: Undecided → High
Stefan Bader (smb)
Changed in linux-riscv-5.11 (Ubuntu Focal):
status: Confirmed → 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-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

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-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (63.0 KiB)

This bug was fixed in the package linux-riscv-5.11 - 5.11.0-1018.19~20.04.2

---------------
linux-riscv-5.11 (5.11.0-1018.19~20.04.2) focal; urgency=medium

  * focal/linux-riscv-5.11: 5.11.0-1018.19~20.04.2 -proposed tracker
    (LP: #1939766)

  [ Ubuntu: 5.11.0-1018.19 ]

  * hirsute/linux-riscv: 5.11.0-1018.19 -proposed tracker (LP: #1939767)
  * Hirsute update: upstream stable patchset 2021-07-28 (LP: #1938340)
    - riscv: updateconfigs for PSTORE_BLK (BROKEN)
  * Support builtin revoked certificates (LP: #1932029)
    - [Config] riscv: Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys
  * Hirsute update: upstream stable patchset 2021-07-19 (LP: #1936863)
    - [Config] riscv: enable CONFIG_SYSTEM_REVOCATION_LIST
  * Disable ftrace of sbi functions (LP: #1940426)
    - riscv: Fixup wrong ftrace remove cflag
    - riscv: Fixup patch_text panic in ftrace
    - Revert "UBUNTU: SAUCE: RISC-V: prevent sbi_send_cpumask_ipi race with
      ftrace"
  * hirsute/linux: 5.11.0-33.35 -proposed tracker (LP: #1940101)
  * libvirtd fails to create VM (LP: #1940107)
    - sched: Stop PF_NO_SETAFFINITY from being inherited by various init system
      threads
  * hirsute/linux: 5.11.0-32.34 -proposed tracker (LP: #1939769)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.08.16)
  * CVE-2021-3656
    - SAUCE: KVM: nSVM: always intercept VMLOAD/VMSAVE when nested
  * CVE-2021-3653
    - SAUCE: KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl
  * [regression] USB device is not detected during boot (LP: #1939638)
    - SAUCE: Revert "usb: core: reduce power-on-good delay time of root hub"
  * Support builtin revoked certificates (LP: #1932029)
    - [Packaging] build canonical-revoked-certs.pem from branch/arch certs
    - [Packaging] Revoke 2012 UEFI signing certificate as built-in
    - [Config] Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys
  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679)
    - SAUCE: integrity: add informational messages when revoking certs
  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679) // CVE-2020-26541 when certificates are revoked via
    MokListXRT.
    - SAUCE: integrity: Load mokx certs from the EFI MOK config table
  * Include product_sku info to modalias (LP: #1938143)
    - firmware/dmi: Include product_sku info to modalias
  * Fix Ethernet not working by hotplug - RTL8106E (LP: #1930645)
    - net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT
    - SAUCE: r8169: Use PHY_POLL when RTL8106E enable ASPM
  * [SRU][H/OEM-5.10/OEM-5.13/U] Fix system hang after unplug tbt dock
    (LP: #1938689)
    - SAUCE: igc: fix page fault when thunderbolt is unplugged
  * [Regression] Audio card [8086:9d71] not detected after upgrade from linux
    5.4 to 5.8 (LP: #1915117)
    - [Config] set CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC to y
  * Backlight (screen brightness) on Lenovo P14s AMD Gen2 inop (LP: #1934557)
    - drm/amdgpu/display: only enable aux backlight control for OLED panels
  * Touchpad not working with ASUS TUF F15 (LP: #1937056)
    - pinctrl:...

Changed in linux-riscv-5.11 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (62.9 KiB)

This bug was fixed in the package linux-riscv - 5.11.0-1018.19

---------------
linux-riscv (5.11.0-1018.19) hirsute; urgency=medium

  * hirsute/linux-riscv: 5.11.0-1018.19 -proposed tracker (LP: #1939767)

  * Hirsute update: upstream stable patchset 2021-07-28 (LP: #1938340)
    - riscv: updateconfigs for PSTORE_BLK (BROKEN)

  * Support builtin revoked certificates (LP: #1932029)
    - [Config] riscv: Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys

  * Hirsute update: upstream stable patchset 2021-07-19 (LP: #1936863)
    - [Config] riscv: enable CONFIG_SYSTEM_REVOCATION_LIST

  * Disable ftrace of sbi functions (LP: #1940426)
    - riscv: Fixup wrong ftrace remove cflag
    - riscv: Fixup patch_text panic in ftrace
    - Revert "UBUNTU: SAUCE: RISC-V: prevent sbi_send_cpumask_ipi race with
      ftrace"

  [ Ubuntu: 5.11.0-33.35 ]

  * hirsute/linux: 5.11.0-33.35 -proposed tracker (LP: #1940101)
  * libvirtd fails to create VM (LP: #1940107)
    - sched: Stop PF_NO_SETAFFINITY from being inherited by various init system
      threads

  [ Ubuntu: 5.11.0-32.34 ]

  * hirsute/linux: 5.11.0-32.34 -proposed tracker (LP: #1939769)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.08.16)
  * CVE-2021-3656
    - SAUCE: KVM: nSVM: always intercept VMLOAD/VMSAVE when nested
  * CVE-2021-3653
    - SAUCE: KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl
  * [regression] USB device is not detected during boot (LP: #1939638)
    - SAUCE: Revert "usb: core: reduce power-on-good delay time of root hub"
  * Support builtin revoked certificates (LP: #1932029)
    - [Packaging] build canonical-revoked-certs.pem from branch/arch certs
    - [Packaging] Revoke 2012 UEFI signing certificate as built-in
    - [Config] Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys
  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679)
    - SAUCE: integrity: add informational messages when revoking certs
  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679) // CVE-2020-26541 when certificates are revoked via
    MokListXRT.
    - SAUCE: integrity: Load mokx certs from the EFI MOK config table
  * Include product_sku info to modalias (LP: #1938143)
    - firmware/dmi: Include product_sku info to modalias
  * Fix Ethernet not working by hotplug - RTL8106E (LP: #1930645)
    - net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT
    - SAUCE: r8169: Use PHY_POLL when RTL8106E enable ASPM
  * [SRU][H/OEM-5.10/OEM-5.13/U] Fix system hang after unplug tbt dock
    (LP: #1938689)
    - SAUCE: igc: fix page fault when thunderbolt is unplugged
  * [Regression] Audio card [8086:9d71] not detected after upgrade from linux
    5.4 to 5.8 (LP: #1915117)
    - [Config] set CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC to y
  * Backlight (screen brightness) on Lenovo P14s AMD Gen2 inop (LP: #1934557)
    - drm/amdgpu/display: only enable aux backlight control for OLED panels
  * Touchpad not working with ASUS TUF F15 (LP: #1937056)
    - pinctrl: tigerlake: Fix GPIO mapping for newer version of software
  * dev_forward_skb: d...

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

Other bug subscribers