diff options
author | Mark Brown <broonie@kernel.org> | 2022-08-29 17:07:03 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2022-09-07 14:25:47 +0100 |
commit | 31ba63426b328f99323ba44ae0f123417e80340e (patch) | |
tree | e0d1c37420aab07e38aeaa2e81566d5807b5372d /tools/testing/selftests/arm64/signal/testcases/testcases.h | |
parent | kselftest/arm64: Allow larger buffers in get_signal_context() (diff) | |
download | linux-dev-31ba63426b328f99323ba44ae0f123417e80340e.tar.xz linux-dev-31ba63426b328f99323ba44ae0f123417e80340e.zip |
kselftest/arm64: Include larger SVE and SME VLs in signal tests
Now that the core utilities for signal testing support handling data in
EXTRA_CONTEXT blocks we can test larger SVE and SME VLs which spill over
the limits in the base signal context. This is done by defining storage
for the context as a union with a ucontext_t and a buffer together with
some helpers for getting relevant sizes and offsets like we do for
fake_sigframe, this isn't the most lovely code ever but is fairly
straightforward to implement and much less invasive to the somewhat
unclear and indistinct layers of abstraction in the signal handling test
code.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220829160703.874492-11-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64/signal/testcases/testcases.h')
-rw-r--r-- | tools/testing/selftests/arm64/signal/testcases/testcases.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.h b/tools/testing/selftests/arm64/signal/testcases/testcases.h index b39f538c7be1..040afded0b76 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.h +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.h @@ -30,6 +30,13 @@ #define GET_SF_RESV_SIZE(sf) \ sizeof((sf).uc.uc_mcontext.__reserved) +#define GET_BUF_RESV_HEAD(buf) \ + (struct _aarch64_ctx *)(&(buf).uc.uc_mcontext.__reserved) + +#define GET_BUF_RESV_SIZE(buf) \ + (sizeof(buf) - sizeof(buf.uc) + \ + sizeof((buf).uc.uc_mcontext.__reserved)) + #define GET_UCP_RESV_SIZE(ucp) \ sizeof((ucp)->uc_mcontext.__reserved) |