APPLIED: [HIRSUTE][linux-riscv][PATCH v2 0/3] Disable ftrace of sbi functions

Stefan Bader stefan.bader at canonical.com
Wed Aug 18 14:25:05 UTC 2021


On 18.08.21 14:14, Dimitri John Ledkov wrote:
> [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.
> 
> BugLink: https://bugs.launchpad.net/bugs/1940426
> 
> Changes since v1:
>   * Use a new buglink
>   * Add buglink to all patches
> 
> Dimitri John Ledkov (1):
>    Revert "UBUNTU: SAUCE: RISC-V: prevent sbi_send_cpumask_ipi race with
>      ftrace"
> 
> Guo Ren (2):
>    riscv: Fixup wrong ftrace remove cflag
>    riscv: Fixup patch_text panic in ftrace
> 
>   arch/riscv/kernel/Makefile | 5 +++--
>   arch/riscv/kernel/sbi.c    | 2 +-
>   arch/riscv/mm/Makefile     | 3 ++-
>   3 files changed, 6 insertions(+), 4 deletions(-)
> 

Applied to hirsute:linux-riscv/master. Thanks.

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210818/dfbc1991/attachment.sig>


More information about the kernel-team mailing list