| 42155a8e | 01-Oct-2024 |
Mark Brown <[email protected]> |
kselftest/arm64: Always run signals tests with GCS enabled
Since it is not possible to return from the function that enabled GCS without disabling GCS it is very inconvenient to use the signal handl
kselftest/arm64: Always run signals tests with GCS enabled
Since it is not possible to return from the function that enabled GCS without disabling GCS it is very inconvenient to use the signal handling tests to cover GCS when GCS is not enabled by the toolchain and runtime, something that no current distribution does. Since none of the testcases do anything with stacks that would cause problems with GCS we can sidestep this issue by unconditionally enabling GCS on startup and exiting with a call to exit() rather than a return from main().
Reviewed-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 956573ac | 01-Oct-2024 |
Mark Brown <[email protected]> |
kselftest/arm64: Allow signals tests to specify an expected si_code
Currently we ignore si_code unless the expected signal is a SIGSEGV, in which case we enforce it being SEGV_ACCERR. Allow test cas
kselftest/arm64: Allow signals tests to specify an expected si_code
Currently we ignore si_code unless the expected signal is a SIGSEGV, in which case we enforce it being SEGV_ACCERR. Allow test cases to specify exactly which si_code should be generated so we can validate this, and test for other segfault codes.
Reviewed-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 0d426f7d | 01-Oct-2024 |
Mark Brown <[email protected]> |
kselftest/arm64: Add framework support for GCS to signal handling tests
Teach the framework about the GCS signal context, avoiding warnings on the unknown context.
Reviewed-by: Thiago Jung Bauerman
kselftest/arm64: Add framework support for GCS to signal handling tests
Teach the framework about the GCS signal context, avoiding warnings on the unknown context.
Reviewed-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| d3c6e5b1 | 22-Aug-2024 |
Joey Gouly <[email protected]> |
kselftest/arm64: parse POE_MAGIC in a signal frame
Teach the signal frame parsing about the new POE frame, avoids warning when it is generated.
Signed-off-by: Joey Gouly <[email protected]> Cc: Ca
kselftest/arm64: parse POE_MAGIC in a signal frame
Teach the signal frame parsing about the new POE frame, avoids warning when it is generated.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| f5b5ea51 | 22-Aug-2024 |
Joey Gouly <[email protected]> |
selftests: mm: make protection_keys test work on arm64
The encoding of the pkey register differs on arm64, than on x86/ppc. On those platforms, a bit in the register is used to disable permissions,
selftests: mm: make protection_keys test work on arm64
The encoding of the pkey register differs on arm64, than on x86/ppc. On those platforms, a bit in the register is used to disable permissions, for arm64, a bit enabled in the register indicates that the permission is allowed.
This drops two asserts of the form: assert(read_pkey_reg() <= orig_pkey_reg); Because on arm64 this doesn't hold, due to the encoding.
The pkey must be reset to both access allow and write allow in the signal handler. pkey_access_allow() works currently for PowerPC as the PKEY_DISABLE_ACCESS and PKEY_DISABLE_WRITE have overlapping bits set.
Access to the uc_mcontext is abstracted, as arm64 has a different structure.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Acked-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| 6f031533 | 29-Aug-2024 |
Mark Brown <[email protected]> |
kselftest/arm64: Actually test SME vector length changes via sigreturn
The test case for SME vector length changes via sigreturn use a bit too much cut'n'paste and only actually changed the SVE vect
kselftest/arm64: Actually test SME vector length changes via sigreturn
The test case for SME vector length changes via sigreturn use a bit too much cut'n'paste and only actually changed the SVE vector length in the test itself. Andre's recent factoring out of the initialisation code caused this to be exposed and the test to start failing. Fix the test to actually cover the thing it's supposed to test.
Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Tested-by: Andre Przywara <[email protected]> Link: https://lore.kernel.org/r/20240829-arm64-sme-signal-vl-change-test-v1-1-42d7534cb818@kernel.org Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| 2c4192c0 | 02-Feb-2023 |
Mark Brown <[email protected]> |
kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests
During early development a dependedncy was added on having FA64 available so we could use the full FPSIMD register set in the signal ha
kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests
During early development a dependedncy was added on having FA64 available so we could use the full FPSIMD register set in the signal handler which got copied over into the SSVE+ZA registers test case. Subsequently the ABI was finialised so the handler is run with streaming mode disabled meaning this is redundant but the dependency was never removed, do so now.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/20230202-arm64-kselftest-sve-za-fa64-v1-1-5c5f3dabe441@kernel.org Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 6012b820 | 02-Feb-2023 |
Mark Brown <[email protected]> |
kselftest/arm64: Copy whole EXTRA context
When copying the EXTRA context our calculation of the amount of data we need to copy is incorrect, we only calculate the amount of data needed within uc_mco
kselftest/arm64: Copy whole EXTRA context
When copying the EXTRA context our calculation of the amount of data we need to copy is incorrect, we only calculate the amount of data needed within uc_mcontext.__reserved, not taking account of the fixed portion of the context. Add in the offset of the reserved data so that we copy everything we should.
This will only cause test failures in cases where the last context in the EXTRA context is smaller than the missing data since we don't currently validate any of the register data and all the buffers we copy into are statically allocated so default to zero meaning that if we walk beyond the end of what we copied we'll encounter what looks like a context with magic and length both 0 which is a valid terminator record.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| a7db82f1 | 31-Jan-2023 |
Mark Brown <[email protected]> |
kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional
kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL in the newly added ssve_za_regs test.
Fixes: bc69da5ff087 ("kselftest/arm64: Verify simultaneous SSVE and ZA context generation") Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/20230131-arm64-kselftest-sig-sme-no-128-v1-2-d47c13dc8e1e@kernel.org Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 5f389238 | 31-Jan-2023 |
Mark Brown <[email protected]> |
kselftest/arm64: Fix enumeration of systems without 128 bit SME
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't
kselftest/arm64: Fix enumeration of systems without 128 bit SME
The current signal handling tests for SME do not account for the fact that unlike SVE all SME vector lengths are optional so we can't guarantee that we will encounter the minimum possible VL, they will hang enumerating VLs on such systems. Abort enumeration when we find the lowest VL.
Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/20230131-arm64-kselftest-sig-sme-no-128-v1-1-d47c13dc8e1e@kernel.org Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|