lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Oct 2023 18:25:58 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Douglas Anderson <dianders@...omium.org>
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Valentin Schneider <vschneid@...hat.com>,
        Chen-Yu Tsai <wenst@...omium.org>,
        D Scott Phillips <scott@...amperecomputing.com>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Sumit Garg <sumit.garg@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] arm64: smp: Don't directly call
 arch_smp_send_reschedule() for wakeup

On Mon, Oct 02, 2023 at 09:45:30AM -0700, Douglas Anderson wrote:
> In commit 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI") we
> started using a scheduler IPI to avoid a dedicated reschedule. When we
> did this, we used arch_smp_send_reschedule() directly rather than
> calling smp_send_reschedule(). The only difference is that calling
> arch_smp_send_reschedule() directly avoids tracing. Presumably we
> _don't_ want to avoid tracing here, so switch to
> smp_send_reschedule().
> 
> Fixes: 2b2d0a7a96ab ("arm64: smp: Remove dedicated wakeup IPI")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
> I don't 100% know if this is correct and I don't have any hardware
> that uses the "ACPI parking protocol", but I think it's right. My main
> incentive for this is that it makes it easier to backport pseudo-NMI
> to kernels that don't have arch_smp_send_reschedule(), but I think
> it's also more correct.
> 
> If for some reason we truly did want to avoid tracing here, please
> shout and we can drop this patch.

This should be sound, and I don't have strong feelings either way on this, so
FWIW:

Acked-by: Mark Rutland <mark.rutland@....com>

Mark.

> 
>  arch/arm64/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 0a6002243a8c..b530d8ef9c1d 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -1063,7 +1063,7 @@ void arch_send_wakeup_ipi(unsigned int cpu)
>  	 * We use a scheduler IPI to wake the CPU as this avoids the need for a
>  	 * dedicated IPI and we can safely handle spurious scheduler IPIs.
>  	 */
> -	arch_smp_send_reschedule(cpu);
> +	smp_send_reschedule(cpu);
>  }
>  #endif
>  
> -- 
> 2.42.0.582.g8ccd20d70d-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ