linux-stable/arch
Mark Brown 8a33c9e15b arm64/ptrace: Ensure that the task sees ZT writes on first use
commit 2f43f549cd upstream.

When the value of ZT is set via ptrace we don't disable traps for SME.
This means that when a the task has never used SME before then the value
set via ptrace will never be seen by the target task since it will
trigger a SME access trap which will flush the register state.

Disable SME traps when setting ZT, this means we also need to allocate
storage for SVE if it is not already allocated, for the benefit of
streaming SVE.

Fixes: f90b529bcb ("arm64/sme: Implement ZT0 ptrace support")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # 6.3.x
Link: https://lore.kernel.org/r/20230816-arm64-zt-ptrace-first-use-v2-1-00aa82847e28@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-23 17:32:53 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:32:31 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-19 16:36:19 +02:00
arm ARM: dts: imx: Set default tuning step for imx6sx usdhc 2023-08-23 17:32:50 +02:00
arm64 arm64/ptrace: Ensure that the task sees ZT writes on first use 2023-08-23 17:32:53 +02:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:12:41 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:48 +02:00
loongarch loongarch/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:48 +02:00
m68k m68k/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:48 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
mips mips/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:48 +02:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
openrisc openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI 2023-07-23 13:53:45 +02:00
parisc parisc: Fix CONFIG_TLB_PTLOCK to work with lightweight spinlock checks 2023-08-23 17:32:52 +02:00
powerpc powerpc/rtas_flash: allow user copy to flash block cache objects 2023-08-23 17:32:37 +02:00
riscv riscv: uaccess: Return the number of bytes effectively not copied 2023-08-23 17:32:51 +02:00
s390 KVM: s390: fix sthyi error handling 2023-08-11 12:14:08 +02:00
sh sh/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:49 +02:00
sparc sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:04:49 +02:00
um Revert "[PATCH] uml: export symbols added by GCC hardened" 2023-08-23 17:32:29 +02:00
x86 x86/srso: Correct the mitigation status when SMT is disabled 2023-08-23 17:32:42 +02:00
xtensa init: Remove check_bugs() leftovers 2023-08-08 20:04:49 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 20:04:47 +02:00