diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-03-26 05:27:28 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-03-29 05:38:51 +0300 |
commit | 0ef6f5c09371f17e142814e6996d6dfb8741925b (patch) | |
tree | 9a6b91596cc347a1438f4ce1db96200a5f2c1f08 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | f3a112c0c40dd96d53c8bdf3ea8d94d528f3b7b8 (diff) | |
download | linux-0ef6f5c09371f17e142814e6996d6dfb8741925b.tar.xz |
x86,rethook: Fix arch_rethook_trampoline() to generate a complete pt_regs
Currently arch_rethook_trampoline() generates an almost complete
pt_regs on-stack, everything except regs->ss that is, that currently
points to the fake return address, which is not a valid segment
descriptor.
Since interpretation of regs->[sb]p should be done in the context of
regs->ss, and we have code actually doing that (see
arch/x86/lib/insn-eval.c for instance), complete the job by also
pushing ss.
This ensures that anybody who does do look at regs->ss doesn't
mysteriously malfunction, avoiding much future pain.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/bpf/164826164851.2455864.17272661073069737350.stgit@devnote2
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions