OpenCloudOS-Kernel/tools/testing/selftests/powerpc/ptrace
Ravi Bangoria ac23452405 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 <pedromfc@linux.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200902042945.129369-9-ravi.bangoria@linux.ibm.com
2020-09-15 22:13:21 +10:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile selftests/powerpc/ptrace: Fix out-of-tree build 2018-10-31 23:56:19 +11:00
child.h selftests/powerpc: Add ptrace tests for Protection Key registers 2018-05-28 18:46:35 +10:00
core-pkey.c selftests/powerpc: Fix pkey access right updates 2020-06-30 14:37:47 +10:00
perf-hwbreak.c powerpc/watchpoint: Add DAR outside test in perf-hwbreak.c selftest 2019-11-13 16:58:04 +11:00
ptrace-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-gpr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-hwbreak.c selftests/powerpc: Tests for kernel accessing user memory 2020-09-15 22:13:21 +10:00
ptrace-pkey.c selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value 2020-07-22 00:01:06 +10:00
ptrace-syscall.c selftests/powerpc: New PTRACE_SYSEMU test 2018-10-03 15:40:04 +10:00
ptrace-tar.c selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
ptrace-tar.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-spd-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-spd-tar.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-spd-vsx.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-spr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-tar.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-vsx.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-vsx.c selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
ptrace-vsx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00