summaryrefslogtreecommitdiff
path: root/net/ethtool
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-01-15 18:42:38 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-25 15:36:00 -0800
commit53cea04da86144205befe78c2217f86f067c0b18 (patch)
tree37db1404af7c748ba4cf8137edcd49f79f27e539 /net/ethtool
parent99719bb0c281e3a8aac07b881ab8eaf53a270988 (diff)
downloadlinux-53cea04da86144205befe78c2217f86f067c0b18.tar.gz
linux-53cea04da86144205befe78c2217f86f067c0b18.tar.bz2
linux-53cea04da86144205befe78c2217f86f067c0b18.zip
arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace
[ Upstream commit b7c510d049049409e8945b932f4b0b357fa17415 ] When writing ZA we currently unconditionally flush the buffer used to store it as part of ensuring that it is allocated. Since this buffer is shared with ZT0 this means that a write to ZA when PSTATE.ZA is already set will corrupt the value of ZT0 on a SME2 system. Fix this by only flushing the backing storage if PSTATE.ZA was not previously set. This will mean that short or failed writes may leave stale data in the buffer, this seems as correct as our current behaviour and unlikely to be something that userspace will rely on. Fixes: f90b529bcbe5 ("arm64/sme: Implement ZT0 ptrace support") Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240115-arm64-fix-ptrace-za-zt-v1-1-48617517028a@kernel.org Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ethtool')
0 files changed, 0 insertions, 0 deletions