Message ID | 20230728-arm64-signal-memcpy-fix-v4-0-0c1290db5d46@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | kselfest/arm64: Fix a SVE memcpy() issue and use tools/include | expand |
On Fri, 28 Jul 2023 00:26:11 +0100, Mark Brown wrote: > 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. > > [...] Applied to arm64 (for-next/selftests), thanks! [1/6] kselftest/arm64: Exit streaming mode after collecting signal context https://git.kernel.org/arm64/c/d6da04b6fbab [2/6] tools compiler.h: Add OPTIMIZER_HIDE_VAR() https://git.kernel.org/arm64/c/e5d51a665021 [3/6] tools include: Add some common function attributes https://git.kernel.org/arm64/c/51e6ac1fa451 [4/6] kselftest/arm64: Make the tools/include headers available https://git.kernel.org/arm64/c/35d7bc983a74 [5/6] kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton https://git.kernel.org/arm64/c/db7a89f706d6 [6/6] kselftest/arm64: Use the tools/include compiler.h rather than our own https://git.kernel.org/arm64/c/672dbf97f612 Cheers,
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@kernel.org> --- 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@kernel.org 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@kernel.org Changes in v2: - Rebase onto v6.5-rc1. - Link to v1: https://lore.kernel.org/r/20230628-arm64-signal-memcpy-fix-v1-1-db3e0300829e@kernel.org --- 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,