linux/tools/testing/selftests/powerpc/ptrace
Benjamin Gray 94ba4f2c33 selftests/powerpc: Add ptrace setup_core_pattern() null-terminator
- malloc() does not zero the buffer,
- fread() does not null-terminate it's output,
- `cat /proc/sys/kernel/core_pattern | hexdump -C` shows the file is
  not inherently null-terminated

So using string operations on the buffer is risky. Explicitly add a null
character to the end to make it safer.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221128041948.58339-3-bgray@linux.ibm.com
2022-12-02 18:04:27 +11:00
..
.gitignore powerpc/selftests: Add selftest to test concurrent perf/ptrace events 2021-04-23 01:38:03 +10: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: Add ptrace setup_core_pattern() null-terminator 2022-12-02 18:04:27 +11:00
Makefile selftests/powerpc/ptrace: Do more of ptrace-gpr in asm 2022-07-25 12:05:16 +10:00
perf-hwbreak.c selftests/powerpc: Account for offline cpus in perf-hwbreak test 2022-11-30 21:46:47 +11:00
ptrace-gpr.c selftests/powerpc/ptrace: Add peek/poke of FPRs 2022-07-25 12:05:16 +10:00
ptrace-gpr.h selftests/powerpc/ptrace: Convert to load/store doubles 2022-07-25 12:05:16 +10:00
ptrace-gpr.S selftests/powerpc/ptrace: Do more of ptrace-gpr in asm 2022-07-25 12:05:16 +10:00
ptrace-hwbreak.c selftests/powerpc: Use mfspr/mtspr macros 2022-12-02 18:04:27 +11:00
ptrace-perf-hwbreak.c powerpc/selftests: Add selftest to test concurrent perf/ptrace events 2021-04-23 01:38:03 +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 selftests/powerpc/ptrace: Convert to load/store doubles 2022-07-25 12:05:16 +10:00
ptrace-tm-spd-gpr.c selftests/powerpc/ptrace: Convert to load/store doubles 2022-07-25 12:05:16 +10:00
ptrace-tm-spd-tar.c selftests: Skip TM tests on synthetic TM implementations 2021-08-26 21:21:06 +10:00
ptrace-tm-spd-vsx.c selftests: Skip TM tests on synthetic TM implementations 2021-08-26 21:21:06 +10:00
ptrace-tm-spr.c selftests: Skip TM tests on synthetic TM implementations 2021-08-26 21:21:06 +10:00
ptrace-tm-tar.c selftests: Skip TM tests on synthetic TM implementations 2021-08-26 21:21:06 +10:00
ptrace-tm-vsx.c selftests: Skip TM tests on synthetic TM implementations 2021-08-26 21:21:06 +10: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 selftests/powerpc: Use mfspr/mtspr macros 2022-12-02 18:04:27 +11:00