Skip to content

Commit c3cdd54

Browse files
brooniectmarinas
authored andcommitted
arm64/ptrace: Use system_supports_tpidr2() to check for TPIDR2 support
We have a separate system_supports_tpidr2() to check for TPIDR2 support but were using system_supports_sme() in tls_set(). While these are currently identical let's use the specific check instead so we don't have any surprises in future. Reported-by: Will Deacon <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent b7bfaa7 commit c3cdd54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/ptrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,15 +683,15 @@ static int tls_set(struct task_struct *target, const struct user_regset *regset,
683683
unsigned long tls[2];
684684

685685
tls[0] = target->thread.uw.tp_value;
686-
if (system_supports_sme())
686+
if (system_supports_tpidr2())
687687
tls[1] = target->thread.tpidr2_el0;
688688

689689
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, tls, 0, count);
690690
if (ret)
691691
return ret;
692692

693693
target->thread.uw.tp_value = tls[0];
694-
if (system_supports_sme())
694+
if (system_supports_tpidr2())
695695
target->thread.tpidr2_el0 = tls[1];
696696

697697
return ret;

0 commit comments

Comments
 (0)