]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: poe: fix stale POR_EL0 values for ptrace
authorJoey Gouly <joey.gouly@arm.com>
Tue, 27 Jan 2026 13:39:26 +0000 (13:39 +0000)
committerWill Deacon <will@kernel.org>
Wed, 28 Jan 2026 16:39:24 +0000 (16:39 +0000)
commit1f3b950492db411e6c30ee0076b61ef2694c100a
tree1c793b83e8d14ee74c0f0fded28129bc9351f69e
parenta4e5927115f30a301f9939ed43e6a21a343e06ad
arm64: poe: fix stale POR_EL0 values for ptrace

If a process wrote to POR_EL0 and then crashed before a context switch
happened, the coredump would contain an incorrect value for POR_EL0.

The value read in poe_get() would be a stale value left in thread.por_el0.  Fix
this by reading the value from the system register, if the target thread is the
current thread.

This matches what gcs/fpsimd do.

Fixes: 175198199262 ("arm64/ptrace: add support for FEAT_POE")
Reported-by: David Spickett <david.spickett@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/ptrace.c