Re: [PATCH 21/24] alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM

From: Magnus Lindholm

Date: Thu Sep 03 2026 - 01:49:10 EST


Hi Matt,

On Tue, Sep 1, 2026 at 5:51 PM Matt Turner <mattst88@xxxxxxxxx> wrote:
>
> activate_mm() on Alpha calls __load_new_mm_context() which assigns a
> new ASID and invokes PALcode swpctx. On SMP, an interrupt arriving
> between the ASID update and the page table switch could see
> inconsistent state. Ensure activate_mm() is called with interrupts
> disabled during exec.
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>
> ---
> arch/alpha/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git ./arch/alpha/Kconfig ./arch/alpha/Kconfig
> index 827b224f2f8a..bda8443a7323 100644
> --- ./arch/alpha/Kconfig
> +++ ./arch/alpha/Kconfig
> @@ -37,6 +37,7 @@ config ALPHA
> select GENERIC_PCI_IOMAP
> select AUTO_IRQ_AFFINITY if SMP
> select GENERIC_IRQ_SHOW
> + select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
> select ARCH_WANT_IPC_PARSE_VERSION
> select ARCH_WANT_LD_ORPHAN_WARN
> select ARCH_HAVE_NMI_SAFE_CMPXCHG
> --
> 2.54.0
>

I tested this on a two-CPU Alpha UP2000. I ran 20,000 successive
execve() operations pinned to each online CPU. All executions completed
successfully, with no MMU, ASN, or page-table errors in the kernel log.

Tested-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Magnus Lindholm <linmag7@xxxxxxxxx>

Magnus