linux-stable/tools/testing
Mark Brown f7205229ee 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-24 09:58:22 +02:00
..
crypto/chacha20-s390 crypto: s390 - add crypto library interface for ChaCha20 2022-05-13 17:24:49 +08:00
cxl tools/testing/cxl: Fix cxl_hdm_decode_init() calling convention 2022-08-25 11:45:24 +02:00
fault-injection
ktest
kunit kunit: tool: Use qemu-system-i386 for i386 runs 2022-05-18 17:03:54 -06:00
memblock memblock tests: remove completed TODO item 2022-05-09 13:10:58 +03:00
nvdimm dax: introduce DAX_RECOVERY_WRITE dax access mode 2022-05-16 13:35:56 -07:00
radix-tree tools: Add kmem_cache_alloc_lru() 2022-04-22 14:24:28 -04:00
scatterlist
selftests kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT 2022-10-24 09:58:22 +02:00
vsock af_vsock: SOCK_SEQPACKET broken buffer test 2022-03-18 15:13:19 +00:00