[PATCH v4 0/6] kselfest/arm64: Fix a SVE memcpy() issue and use tools/include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Will noticed that with newer toolchains memcpy() ends up being
implemented with SVE instructions, breaking the signals tests when in
streaming mode.  We fixed this by using an open coded version of
OPTIMZER_HIDE_VAR(), but in the process it was noticed that some of the
selftests are using the tools/include headers and it might be nice to
share things there.  We also have a custom compiler.h in the BTI tests.

Update the tools/include headers to have what we need, pull them into
the arm64 selftests build and make use of them in the signals and BTI
tests.  Since the resulting changes are a bit invasive for a fix we keep
an initial patch using the open coding, updating and replacing that
later.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
Changes in v4:
- Roll in a refactoring to include and use the tools/include headers.
- Link to v3: https://lore.kernel.org/r/20230720-arm64-signal-memcpy-fix-v3-1-08aed2385d68@xxxxxxxxxx

Changes in v3:
- Open code OPTIMISER_HIDE_VAR() instead of the memory clobber.
- Link to v2: https://lore.kernel.org/r/20230712-arm64-signal-memcpy-fix-v2-1-494f7025caf6@xxxxxxxxxx

Changes in v2:
- Rebase onto v6.5-rc1.
- Link to v1: https://lore.kernel.org/r/20230628-arm64-signal-memcpy-fix-v1-1-db3e0300829e@xxxxxxxxxx

---
Mark Brown (6):
      kselftest/arm64: Exit streaming mode after collecting signal context
      tools compiler.h: Add OPTIMIZER_HIDE_VAR()
      tools include: Add some common function attributes
      kselftest/arm64: Make the tools/include headers available
      kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton
      kselftest/arm64: Use the tools/include compiler.h rather than our own

 tools/include/linux/compiler.h                     | 18 +++++++++++++++
 tools/testing/selftests/arm64/Makefile             |  2 ++
 tools/testing/selftests/arm64/bti/compiler.h       | 21 -----------------
 tools/testing/selftests/arm64/bti/system.c         |  4 +---
 tools/testing/selftests/arm64/bti/system.h         |  4 ++--
 tools/testing/selftests/arm64/bti/test.c           |  1 -
 .../selftests/arm64/signal/test_signals_utils.h    | 27 +++++++++++++++++++++-
 7 files changed, 49 insertions(+), 28 deletions(-)
---
base-commit: 6eaae198076080886b9e7d57f4ae06fa782f90ef
change-id: 20230628-arm64-signal-memcpy-fix-7de3b3c8fa10

Best regards,
-- 
Mark Brown <broonie@xxxxxxxxxx>




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux