[PATCH v1 00/10] kselftest/arm64: EXTRA_CONTEXT related fixes

Mark Brown broonie at kernel.org
Mon Aug 15 06:32:26 PDT 2022


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.

This series contains one fix for the actual kernel, rasing an arbatrary
limit which can be exceeded by SME systems, and an overhaul of the
handling of EXTRA_CONTEXT in the signal tests which fixes issues which
would cause spurious failures when one was encountered and then extends
the tests to handle the contents of an EXTRA_CONTEXT record. This allows
removal of the limits on validation of signal contexts for larger SVE
and SME vector lengths from the existing test code.

The separately sent kernel fix "arm64/signal: Raise limit on stack
frames" is needed for these tests to pass, tests for larger SME vector
lengths trigger the issue it fixes.  The fixes for baseline issues were
previously sent separately.

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: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
-- 
2.30.2




More information about the linux-arm-kernel mailing list