[RFT PATCH] ARM: vfp: Fix broken softirq handling with instrumentation enabled
Frederic Weisbecker
frederic at kernel.org
Tue Mar 14 06:12:54 PDT 2023
Le Tue, Mar 14, 2023 at 01:57:43PM +0100, Ard Biesheuvel a écrit :
> diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
> index 9a89264cdcc0b46e..9555c0a1c46fd47b 100644
> --- a/arch/arm/vfp/entry.S
> +++ b/arch/arm/vfp/entry.S
> @@ -22,7 +22,23 @@
> @ IRQs enabled.
> @
> ENTRY(do_vfp)
> - local_bh_disable r10, r4
> +#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS)
> + mov r4, r0 @ stash r0, r2, lr
> + mov r5, r2
> + mov r6, lr
> +
> + adr r0, .
> + mov r1, #SOFTIRQ_DISABLE_OFFSET
> + bl __local_bh_disable_ip
> +
> + mov r0, r4 @ restore r0, r2, lr
> + mov r2, r5
> + mov lr, r6
> +#else
> + ldr r4, [r10, #TI_PREEMPT]
> + add r4, r4, #SOFTIRQ_DISABLE_OFFSET
> + str r4, [r10, #TI_PREEMPT]
> +#endi
I suggest you avoid taking any risk and unconditionally call
__local_bh_disable_ip(). You never know what will be added to softirq
APIs in the future.
For example you're missing the CONFIG_DEBUG_PREEMPT part.
Thanks.
>
More information about the linux-arm-kernel
mailing list