Skip to content

x86: Support shstk via prctl

Bill Roberts bpf linux-kselftest lkml 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 0 repliesNew
  2. v46 patches 0 repliesSuperseded
  3. v35 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches4 repliesSuperseded
v12 patches10 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selftests/x86: fix Makefile dependenciestools/testing/selftests/x86/Makefile+3 -30 replies
2/6selftests/x86: fix fork bugtools/testing/selftests/x86/test_shadow_stack.c+5 -00 replies
3/6selftests/x86: add shadow stack lock testtools/testing/selftests/x86/test_shadow_stack.c+38 -00 replies
4/6x86/shstk: support via prctlarch/x86/kernel/shstk.c+80 -00 replies
5/6selftests/x86: support header files in extra-filestools/testing/selftests/x86/Makefile+1 -10 replies
6/6selftests/x86: add generic prctl shadow stack testtools/testing/selftests/x86/Makefile tools/testing/selftests/x86/shadow_stack.c tools/testing/selftests/x86/shadow_stack.h +2 more+1322 -12050 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/6] x86: Support shstk via prctl

This is a continuation of:
https://lore.kernel.org/lkml/[email protected]/

FWIW, x86 maintainers and Rick, I structured this series so that the initial bug fixes and additional test (patches 1-3) can be taken independently of the prctl() enablement. If there are concerns with the remaining patches that require further work, this allows the fixes and additional test to be merged without waiting for the rest of the series.

History:
- v1: Initial patches
- v2: NAKed by author
- Refactor the test suite
- v3:
- Fix an existing fork bug pointed out by Sashiko
- Fix a state rollback issue
- Fix Makefile dependencies
- Add a test for shadow stack state locking
- Refactor the arch_prctl and prctl tests into separate entry points using a shared test implementation
- v4:
- Fix rollback state logic
- v5:
- Expand commit messages to explain behavior and implementation rationale
- Move unsigned long status to the beginning of the function
- Shorten the comment in arch_set_shadow_stack_status()
- Rewrite the WRSS comment in imperative mood
- Remove an unrelated whitespace change in test_shadow_stack.c

Bill Roberts (6):
selftests/x86: fix Makefile dependencies selftests/x86: fix fork bug
selftests/x86: add shadow stack lock test x86/shstk: support via prctl selftests/x86: support header files in extra-files selftests/x86: add generic prctl shadow stack test

 arch/x86/kernel/shstk.c                       |   80 +
 tools/testing/selftests/x86/Makefile          |   12 +-
 tools/testing/selftests/x86/shadow_stack.c    | 1287 +++++++++++++++++
 tools/testing/selftests/x86/shadow_stack.h    |   14 +
 .../testing/selftests/x86/test_shadow_stack.c | 1167 +--------------
 .../selftests/x86/test_shadow_stack_prctl.c   |   12 +
 6 files changed, 1406 insertions(+), 1166 deletions(-)
 create mode 100644 tools/testing/selftests/x86/shadow_stack.c
 create mode 100644 tools/testing/selftests/x86/shadow_stack.h
 create mode 100644 tools/testing/selftests/x86/test_shadow_stack_prctl.c
Signature · 1 line
2.55.0