mbox series

[v2,00/10] kselftest/arm64: EXTRA_CONTEXT related fixes

Message ID 20220829160703.874492-1-broonie@kernel.org (mailing list archive)
Headers show
Series kselftest/arm64: EXTRA_CONTEXT related fixes | expand

Message

Mark Brown Aug. 29, 2022, 4:06 p.m. UTC
The arm64 architecture originally made the signal context a fixed size
structure containing a linked list of records with the various kinds of
register and other state which may be present. When SVE was implemented
it was realised that it supported implementations with more state than
could fit in that structure so a new record type EXTRA_CONTEXT was
introduced allowing the signal context to be extended beyond the
original size. Unfortunately the signal handling tests can not cope with
these EXTRA_CONTEXT records at all - some support was implemented but it
simply never worked.

v2:
 - Rebase onto v6.0-rc3

Mark Brown (10):
  kselftest/arm64: Enumerate SME rather than SVE vector lengths for
    za_regs
  kselftest/arm64: Validate signal ucontext in place
  kselftest/arm64: Fix validatation termination record after
    EXTRA_CONTEXT
  kselftest/arm64: Fix validation of EXTRA_CONTEXT signal context
    location
  kselftest/arm64: Remove unneeded protype for validate_extra_context()
  kselftest/arm64: Only validate each signal context once
  kselftest/arm64: Validate contents of EXTRA_CONTEXT blocks
  kselftest/arm64: Preserve any EXTRA_CONTEXT in handle_signal_copyctx()
  kselftest/arm64: Allow larger buffers in get_signal_context()
  kselftest/arm64: Include larger SVE and SME VLs in signal tests

 .../arm64/signal/test_signals_utils.c         | 59 +++++++++++++++++--
 .../arm64/signal/test_signals_utils.h         |  5 +-
 .../testcases/fake_sigreturn_bad_magic.c      |  2 +-
 .../testcases/fake_sigreturn_bad_size.c       |  2 +-
 .../fake_sigreturn_bad_size_for_magic0.c      |  2 +-
 .../fake_sigreturn_duplicated_fpsimd.c        |  2 +-
 .../testcases/fake_sigreturn_misaligned_sp.c  |  2 +-
 .../testcases/fake_sigreturn_missing_fpsimd.c |  2 +-
 .../testcases/fake_sigreturn_sme_change_vl.c  |  2 +-
 .../testcases/fake_sigreturn_sve_change_vl.c  |  2 +-
 .../selftests/arm64/signal/testcases/sme_vl.c |  2 +-
 .../arm64/signal/testcases/ssve_regs.c        | 25 +++-----
 .../arm64/signal/testcases/sve_regs.c         | 23 +++-----
 .../selftests/arm64/signal/testcases/sve_vl.c |  2 +-
 .../arm64/signal/testcases/testcases.c        | 48 +++++++++++----
 .../arm64/signal/testcases/testcases.h        |  9 ++-
 .../arm64/signal/testcases/za_regs.c          | 28 ++++-----
 17 files changed, 137 insertions(+), 80 deletions(-)


base-commit: b90cb1053190353cc30f0fef0ef1f378ccc063c5

Comments

Catalin Marinas Sept. 6, 2022, 5:44 p.m. UTC | #1
On Mon, 29 Aug 2022 17:06:53 +0100, Mark Brown wrote:
> The arm64 architecture originally made the signal context a fixed size
> structure containing a linked list of records with the various kinds of
> register and other state which may be present. When SVE was implemented
> it was realised that it supported implementations with more state than
> could fit in that structure so a new record type EXTRA_CONTEXT was
> introduced allowing the signal context to be extended beyond the
> original size. Unfortunately the signal handling tests can not cope with
> these EXTRA_CONTEXT records at all - some support was implemented but it
> simply never worked.
> 
> [...]

Applied to arm64 (for-next/kselftest), thanks!

[01/10] kselftest/arm64: Enumerate SME rather than SVE vector lengths for za_regs
        https://git.kernel.org/arm64/c/b3321fbd7fa2
[02/10] kselftest/arm64: Validate signal ucontext in place
        https://git.kernel.org/arm64/c/b97ff4f3ad95
[03/10] kselftest/arm64: Fix validatation termination record after EXTRA_CONTEXT
        https://git.kernel.org/arm64/c/909e2105c748
[04/10] kselftest/arm64: Fix validation of EXTRA_CONTEXT signal context location
        https://git.kernel.org/arm64/c/a934077a3f94
[05/10] kselftest/arm64: Remove unneeded protype for validate_extra_context()
        https://git.kernel.org/arm64/c/e374ab27e738
[06/10] kselftest/arm64: Only validate each signal context once
        https://git.kernel.org/arm64/c/b9731674ec9c
[07/10] kselftest/arm64: Validate contents of EXTRA_CONTEXT blocks
        https://git.kernel.org/arm64/c/3df95c1efeaf
[08/10] kselftest/arm64: Preserve any EXTRA_CONTEXT in handle_signal_copyctx()
        https://git.kernel.org/arm64/c/91f48fb9f82b
[09/10] kselftest/arm64: Allow larger buffers in get_signal_context()
        https://git.kernel.org/arm64/c/5f6539724421
[10/10] kselftest/arm64: Include larger SVE and SME VLs in signal tests
        https://git.kernel.org/arm64/c/7384bddbe246