linux-uconsole/tools/testing/selftests
Mark Brown 451ce2521c kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT
[ Upstream commit 5c152c2f66 ]

When arm64 signal context data overflows the base struct sigcontext it gets
placed in an extra buffer pointed to by a record of type EXTRA_CONTEXT in
the base struct sigcontext which is required to be the last record in the
base struct sigframe. The current validation code attempts to check this
by using GET_RESV_NEXT_HEAD() to step forward from the current record to
the next but that is a macro which assumes it is being provided with a
struct _aarch64_ctx and uses the size there to skip forward to the next
record. Instead validate_extra_context() passes it a struct extra_context
which has a separate size field. This compiles but results in us trying
to validate a termination record in completely the wrong place, at best
failing validation and at worst just segfaulting. Fix this by passing
the struct _aarch64_ctx we meant to into the macro.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220829160703.874492-4-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:25:51 +02:00
..
android
arm64 kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT 2022-10-26 13:25:51 +02:00
bpf selftests/bpf: fix a test for snprintf() overflow 2022-08-21 15:15:47 +02:00
breakpoints
capabilities
cgroup kseltest/cgroup: Make test_stress.sh work if run interactively 2022-06-09 10:21:30 +02:00
clone3 selftests: fixup build warnings in pidfd / clone3 tests 2022-02-23 12:01:06 +01:00
core selftests/core: fix conflicting types compile error for close_range() 2021-11-18 14:04:01 +01:00
cpu-hotplug
cpufreq
dmabuf-heaps kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir 2021-03-04 11:38:05 +01:00
drivers selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer 2022-05-12 12:25:42 +02:00
efivarfs
exec selftests/exec: Add non-regular to TEST_GEN_PROGS 2022-02-23 12:01:03 +01:00
filesystems
firmware selftests: firmware: Fix ignored return val of asprintf() warn 2021-09-18 13:40:20 +02:00
fpu
ftrace selftests/kprobe: Do not test for GRP/ without event failures 2022-08-25 11:38:16 +02:00
futex selftests: futex: Use variable MAKE instead of make 2022-02-08 18:30:39 +01:00
gpio selftests/gpio: Fix build when source tree is read only 2021-06-03 09:00:31 +02:00
ia64
intel_pstate
ipc
ir
kcmp
kexec
kmod
kselftest tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
kvm selftests: kvm: set rax before vmcall 2022-08-21 15:16:03 +02:00
lib
livepatch
lkdtm selftests/lkdtm: Fix expected text for CR4 pinning 2021-07-19 09:45:00 +02:00
locking
media_tests
membarrier
memfd selftests/memfd: clean up mapping in mfd_fail_write 2022-03-16 14:16:01 +01:00
memory-hotplug
mincore selftests: skip mincore.check_file_mmap when fs lacks needed support 2022-02-23 12:00:59 +01:00
mount
mqueue testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-20 09:23:17 +02:00
net selftests: Fix the if conditions of in test_extra_filter() 2022-10-05 10:38:42 +02:00
netfilter selftests: netfilter: correct PKTGEN_SCRIPT_PATHS in nft_concat_range.sh 2022-06-29 08:59:48 +02:00
nsfs
ntb
openat2 selftests: openat2: Skip testcases that fail with EOPNOTSUPP 2022-02-23 12:00:59 +01:00
pid_namespace
pidfd selftests: fixup build warnings in pidfd / clone3 tests 2022-02-23 12:01:06 +01:00
powerpc selftests/powerpc/spectre_v2: Return skip code when miss_percent is high 2022-01-27 10:54:23 +01:00
prctl
proc
pstore
ptp
ptrace
rcutorture
resctrl selftests/resctrl: Fix null pointer dereference on open failed 2022-06-09 10:21:03 +02:00
rseq selftests/rseq: Change type of rseq_offset to ptrdiff_t 2022-07-07 17:52:22 +02:00
rtc selftests: rtc: Increase test timeout so that all tests run 2022-02-23 12:00:58 +01:00
safesetid
seccomp selftests/seccomp: Fix compile warning when CC=clang 2022-08-21 15:15:37 +02:00
sigaltstack
size
sparc64
splice selftests: splice: Adjust for handler fallback removal 2021-07-14 16:56:42 +02:00
static_keys
sync
sysctl
tc-testing tc-testing: fix list handling 2021-07-14 16:56:26 +02:00
timens
timers selftests: timers: clocksource-switch: fix passing errors from child 2022-08-21 15:15:47 +02:00
tmpfs
tpm2 selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle 2022-10-26 13:25:44 +02:00
uevent
user
vDSO
vm selftests: vm: Makefile: rename TARGETS to VMTARGETS 2022-05-18 10:23:44 +02:00
watchdog
wireguard wireguard: device: reset peer src endpoint when netns exits 2021-12-08 09:03:22 +01:00
x86 selftests, x86: fix how check_cc.sh is being invoked 2022-04-08 14:40:04 +02:00
zram selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-02-23 12:00:58 +01:00
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h kselftest: signal all child processes 2022-02-23 12:00:58 +01:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: be sure to make khdr before other targets 2021-10-09 14:40:57 +02:00
Makefile
run_kselftest.sh selftests/run_kselftest.sh: fix dry-run typo 2020-12-30 11:53:07 +01:00