diff options
| author | Ravi Bangoria <[email protected]> | 2020-09-02 09:59:45 +0530 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2020-09-15 22:13:21 +1000 |
| commit | ac234524056da4e0c081f682da3ea25cdaab737a (patch) | |
| tree | a7e2edb055bf396028cf1c39d107cf7537bc9033 /tools/perf/scripts | |
| parent | fa725cc53d353110f39a9e5b9f60d6acb2c7ff49 (diff) | |
selftests/powerpc: Tests for kernel accessing user memory
Introduce tests to cover simple scenarios where user is watching
memory which can be accessed by kernel as well. We also support
_MODE_EXACT with _SETHWDEBUG interface. Move those testcases outside
of _BP_RANGE condition. This will help to test _MODE_EXACT scenarios
when CONFIG_HAVE_HW_BREAKPOINT is not set, eg:
$ ./ptrace-hwbreak
...
PTRACE_SET_DEBUGREG, Kernel Access Userspace, len: 8: Ok
PPC_PTRACE_SETHWDEBUG, MODE_EXACT, WO, len: 1: Ok
PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RO, len: 1: Ok
PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RW, len: 1: Ok
PPC_PTRACE_SETHWDEBUG, MODE_EXACT, Kernel Access Userspace, len: 1: Ok
success: ptrace-hwbreak
Suggested-by: Pedro Miraglia Franco de Carvalho <[email protected]>
Signed-off-by: Ravi Bangoria <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions