Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr()
@ 2026-10-07 17:45 Bradley Morgan
  2026-10-09 10:37 ` Vladimir Murzin
  0 siblings, 1 reply; 3+ messages in thread
From: Bradley Morgan @ 2026-10-07 17:45 UTC (permalink / raw)
  To: catalin.marinas, will; +Cc: mark.rutland, linux-arm-kernel, linux-kernel, brads

mte_set_kernel_gcr() takes a tmp2 argument the macro never uses. It
used to, the body passed \tmp and \tmp2 to mte_set_gcr, then
commit 82868247897b ("arm64: kasan: mte: use a constant kernel
GCR_EL1 value") swapped that for

    mov     \tmp, KERNEL_GCR_EL1

and tmp2 stayed in the declaration and in the one caller, which
passes x23 for it.

Drop it, both places.

Signed-off-by: Bradley Morgan <brads@mainlining.org>
---
Resending, the first send's body got mangled.

 arch/arm64/kernel/entry.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index f63049ac32dc..c3106dee61e1 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -171,7 +171,7 @@ alternative_else_nop_endif
 #endif
 	.endm
 
-	.macro mte_set_kernel_gcr, tmp, tmp2
+	.macro mte_set_kernel_gcr, tmp
 #ifdef CONFIG_KASAN_HW_TAGS
 alternative_cb	ARM64_ALWAYS_SYSTEM, kasan_hw_tags_enable
 	b	1f
@@ -258,7 +258,7 @@ alternative_else_nop_endif
 
 	apply_ssbd 1, x22, x23
 
-	mte_set_kernel_gcr x22, x23
+	mte_set_kernel_gcr x22
 
 	/*
 	 * Any non-self-synchronizing system register updates required for
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr()
  2026-10-07 17:45 [PATCH RESEND] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr() Bradley Morgan
@ 2026-10-09 10:37 ` Vladimir Murzin
  2026-10-09 15:01   ` Bradley Morgan
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Murzin @ 2026-10-09 10:37 UTC (permalink / raw)
  To: Bradley Morgan, catalin.marinas, will
  Cc: mark.rutland, linux-arm-kernel, linux-kernel

On 10/7/26 18:45, Bradley Morgan wrote:
> mte_set_kernel_gcr() takes a tmp2 argument the macro never uses. It
> used to, the body passed \tmp and \tmp2 to mte_set_gcr, then
> commit 82868247897b ("arm64: kasan: mte: use a constant kernel
> GCR_EL1 value") swapped that for
> 
>     mov     \tmp, KERNEL_GCR_EL1
> 
> and tmp2 stayed in the declaration and in the one caller, which
> passes x23 for it.
> 
> Drop it, both places.
> 
> Signed-off-by: Bradley Morgan <brads@mainlining.org>
> ---
> Resending, the first send's body got mangled.
> 
>  arch/arm64/kernel/entry.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index f63049ac32dc..c3106dee61e1 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -171,7 +171,7 @@ alternative_else_nop_endif
>  #endif
>  	.endm
>  
> -	.macro mte_set_kernel_gcr, tmp, tmp2
> +	.macro mte_set_kernel_gcr, tmp
>  #ifdef CONFIG_KASAN_HW_TAGS
>  alternative_cb	ARM64_ALWAYS_SYSTEM, kasan_hw_tags_enable
>  	b	1f
> @@ -258,7 +258,7 @@ alternative_else_nop_endif
>  
>  	apply_ssbd 1, x22, x23
>  
> -	mte_set_kernel_gcr x22, x23
> +	mte_set_kernel_gcr x22
>  
>  	/*
>  	 * Any non-self-synchronizing system register updates required for
> -- 2.53.0
> 

Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr()
  2026-10-09 10:37 ` Vladimir Murzin
@ 2026-10-09 15:01   ` Bradley Morgan
  0 siblings, 0 replies; 3+ messages in thread
From: Bradley Morgan @ 2026-10-09 15:01 UTC (permalink / raw)
  To: Vladimir Murzin, catalin.marinas, will
  Cc: mark.rutland, linux-arm-kernel, linux-kernel

On 9 October 2026 11:37:45 BST, Vladimir Murzin <vladimir.murzin@arm.com>
wrote:
>On 10/7/26 18:45, Bradley Morgan wrote:
>> mte_set_kernel_gcr() takes a tmp2 argument the macro never uses. It
>> used to, the body passed \tmp and \tmp2 to mte_set_gcr, then
>> commit 82868247897b ("arm64: kasan: mte: use a constant kernel
>> GCR_EL1 value") swapped that for
>> 
>>     mov     \tmp, KERNEL_GCR_EL1
>> 
>> and tmp2 stayed in the declaration and in the one caller, which
>> passes x23 for it.
>> 
>> Drop it, both places.
>> 
>> Signed-off-by: Bradley Morgan <brads@mainlining.org>
>> ---
>> Resending, the first send's body got mangled.
>> 
>>  arch/arm64/kernel/entry.S | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
>> index f63049ac32dc..c3106dee61e1 100644
>> --- a/arch/arm64/kernel/entry.S
>> +++ b/arch/arm64/kernel/entry.S
>> @@ -171,7 +171,7 @@ alternative_else_nop_endif
>>  #endif
>>  	.endm
>>  
>> -	.macro mte_set_kernel_gcr, tmp, tmp2
>> +	.macro mte_set_kernel_gcr, tmp
>>  #ifdef CONFIG_KASAN_HW_TAGS
>>  alternative_cb	ARM64_ALWAYS_SYSTEM, kasan_hw_tags_enable
>>  	b	1f
>> @@ -258,7 +258,7 @@ alternative_else_nop_endif
>>  
>>  	apply_ssbd 1, x22, x23
>>  
>> -	mte_set_kernel_gcr x22, x23
>> +	mte_set_kernel_gcr x22
>>  
>>  	/*
>>  	 * Any non-self-synchronizing system register updates required for
>> -- 2.53.0
>> 
>
>Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>


cheers, sorry for the oopsie on 1/1

--- Thanks!
"I'm not a very positive person" - Linus torvalds


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-09 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 17:45 [PATCH RESEND] arm64: entry: drop the unused tmp2 argument of mte_set_kernel_gcr() Bradley Morgan
2026-10-09 10:37 ` Vladimir Murzin
2026-10-09 15:01   ` Bradley Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox