All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
	will@kernel.org, yeoreum.yun@arm.com
Subject: Re: [PATCH] arm64: process: Fix context switching MTE store-only tag check
Date: Wed, 19 Aug 2026 16:24:51 +0100	[thread overview]
Message-ID: <aoXKwwpJGO44cWVD@e129823.arm.com> (raw)
In-Reply-To: <20260819144859.5447-1-vladimir.murzin@arm.com>


> SCTLR_EL1.TCSO0 is set when user opt-in for MTE store-only tag check
> mode. However, it is not part of SCTLR_USER_MASK which imply that on
> context switch we never clear SCTLR_EL1.TCSO0, so we are leaking that
> setting into another task.
> Fix that by including SCTLR_EL1_TCSO0_MASK into SCTLR_USER_MASK
> 
> Fixes: 4d51ff5bba00 ("arm64/kernel: Support store-only mte tag check")
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
>  arch/arm64/include/asm/processor.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
> index c2a627f39314..6dfbcacd9ba0 100644
> --- a/arch/arm64/include/asm/processor.h
> +++ b/arch/arm64/include/asm/processor.h
> @@ -264,7 +264,7 @@ static inline void task_set_sve_vl_onexec(struct task_struct *task,
>  
>  #define SCTLR_USER_MASK                                                        \
>  	(SCTLR_ELx_ENIA | SCTLR_ELx_ENIB | SCTLR_ELx_ENDA | SCTLR_ELx_ENDB |   \
> -	 SCTLR_EL1_TCF0_MASK)
> +	 SCTLR_EL1_TCF0_MASK | SCTLR_EL1_TCSO0_MASK)
>  
>  static inline void arch_thread_struct_whitelist(unsigned long *offset,
>  						unsigned long *size)
> -- 
> 2.34.1

Oops, Sorry for this.

Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
-- 
Sincerely,
Yeoreum Yun


  reply	other threads:[~2026-08-19 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 14:48 [PATCH] arm64: process: Fix context switching MTE store-only tag check Vladimir Murzin
2026-08-19 15:24 ` Yeoreum Yun [this message]
2026-08-19 15:44 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoXKwwpJGO44cWVD@e129823.arm.com \
    --to=yeoreum.yun@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.