linux/arch/powerpc/kernel/ptrace
Nicholas Piggin db30144b5c powerpc: Use set_trap() and avoid open-coding trap masking
The pt_regs.trap field keeps 4 low bits for some metadata about the
trap or how it was handled, which is masked off in order to test the
architectural trap number.

Add a set_trap() accessor to set this, equivalent to TRAP() for
returning it. This is actually not quite the equivalent of TRAP()
because it always clears the low bits, which may be harmless if
it can only be updated via ptrace syscall, but it seems dangerous.

In fact settting TRAP from ptrace doesn't seem like a great idea
so maybe it's better deleted.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Make it a static inline rather than a shouty macro]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200507121332.2233629-2-mpe@ellerman.id.au
2020-05-15 11:58:54 +10:00
..
Makefile powerpc/64: make buildable without CONFIG_COMPAT 2020-04-03 00:10:00 +11:00
ptrace32.c
ptrace-adv.c powerpc/ptrace: create ppc_gethwdinfo() 2020-04-01 14:30:49 +11:00
ptrace-altivec.c powerpc/ptrace: split out ALTIVEC related functions. 2020-04-01 14:30:48 +11:00
ptrace-decl.h powerpc/ptrace: create ppc_gethwdinfo() 2020-04-01 14:30:49 +11:00
ptrace-noadv.c powerpc/ptrace: create ppc_gethwdinfo() 2020-04-01 14:30:49 +11:00
ptrace-novsx.c powerpc/ptrace: split out VSX related functions. 2020-04-01 14:30:48 +11:00
ptrace-spe.c powerpc/ptrace: split out SPE related functions. 2020-04-01 14:30:48 +11:00
ptrace-tm.c powerpc: Use set_trap() and avoid open-coding trap masking 2020-05-15 11:58:54 +10:00
ptrace-view.c powerpc: Use set_trap() and avoid open-coding trap masking 2020-05-15 11:58:54 +10:00
ptrace-vsx.c powerpc/ptrace: split out VSX related functions. 2020-04-01 14:30:48 +11:00
ptrace.c powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c 2020-04-01 14:30:49 +11:00