diff options
| author | Matt Turner <mattst88@gmail.com> | 2026-10-18 10:22:01 -0400 |
|---|---|---|
| committer | Magnus Lindholm <linmag7@gmail.com> | 2026-10-18 20:09:29 +0200 |
| commit | bceba446fa2bc66a905ec0bbf6fd80e98701c1d1 (patch) | |
| tree | b73673c83ff0e55ab715ac0a74b04ea5ea8ddb95 /tools/perf/scripts/python | |
| parent | b9fad53a62776359d3bb607bd0ba66e37d198260 (diff) | |
| download | linux-bceba446fa2bc66a905ec0bbf6fd80e98701c1d1.tar.gz linux-bceba446fa2bc66a905ec0bbf6fd80e98701c1d1.zip | |
alpha: fix stale user_stack_pointer()
PALcode keeps the user stack pointer in the PCB, not the trap frame, so
pt_regs->usp is only valid where entry code stores it: entSys,
do_entArith() and do_entIF(). Interrupts, page faults and unaligned
traps leave it stale, and ptrace and /proc/<pid>/syscall read it
through user_stack_pointer().
A user-mode pt_regs is at the top of its task's stack, so find the
thread_info from it and use rdusp() for current or pcb.usp otherwise,
as KSTK_ESP() and the regset code already do.
Fixes: 8a2857bc2b30 ("alpha: enable regset-based ptrace and core dumps")
Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Acked-by: Ian Rogers <irogers@google.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Link: https://lore.kernel.org/r/20261018-alpha-perf-regs-v3-v3-1-52be85332c57@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
