public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] x86/pkeys: update PKRU to enable pkey 0 before
@ 2024-04-25 18:05 Aruna Ramakrishna
  2024-04-25 18:05 ` [PATCH v3 1/4] x86/pkeys: Signal handling function interface changes to accept PKRU as a parameter Aruna Ramakrishna
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Aruna Ramakrishna @ 2024-04-25 18:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, dave.hansen, tglx, mingo, keith.lucas, aruna.ramakrishna

This version incorporates feedback from Ingo Molnar and Dave Hansen,
and adds a few test cases that exercise this flow.

v3 updates:
- Split the original patch into 3:
	- function interface changes
	- helper functions
	- functional change to write pkru on sigframe
- Enable all pkeys before XSAVE - i.e. wrpkru(0), rather than assuming
that the alt sig stack is always protected by pkey 0.
- Add a few test cases in pkey_sighandler_tests.c.

I had some trouble adding these tests to
tools/testing/selftests/mm/protection_keys.c, so they're in a separate
file.

Aruna Ramakrishna (4):
  x86/pkeys: Signal handling function interface changes to accept PKRU
    as a parameter
  x86/pkeys: Add helper functions to update PKRU on sigframe
  x86/pkeys: Update PKRU to enable all pkeys before XSAVE
  selftests/mm: Add new testcases for pkeys

 arch/x86/include/asm/fpu/signal.h             |   3 +-
 arch/x86/include/asm/sighandling.h            |  10 +-
 arch/x86/kernel/fpu/signal.c                  |  45 ++-
 arch/x86/kernel/fpu/xstate.c                  |  13 +
 arch/x86/kernel/fpu/xstate.h                  |   1 +
 arch/x86/kernel/signal.c                      |  33 +-
 arch/x86/kernel/signal_32.c                   |   8 +-
 arch/x86/kernel/signal_64.c                   |   9 +-
 tools/testing/selftests/mm/Makefile           |   2 +
 tools/testing/selftests/mm/pkey-helpers.h     |  11 +-
 .../selftests/mm/pkey_sighandler_tests.c      | 315 ++++++++++++++++++
 tools/testing/selftests/mm/protection_keys.c  |  10 -
 12 files changed, 422 insertions(+), 38 deletions(-)
 create mode 100644 tools/testing/selftests/mm/pkey_sighandler_tests.c

-- 
2.39.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-05-08 12:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-25 18:05 [PATCH v3 0/4] x86/pkeys: update PKRU to enable pkey 0 before Aruna Ramakrishna
2024-04-25 18:05 ` [PATCH v3 1/4] x86/pkeys: Signal handling function interface changes to accept PKRU as a parameter Aruna Ramakrishna
2024-05-07 12:16   ` Thomas Gleixner
2024-04-25 18:05 ` [PATCH v3 2/4] x86/pkeys: Add helper functions to update PKRU on sigframe Aruna Ramakrishna
2024-05-07 16:16   ` Thomas Gleixner
2024-05-07 17:15     ` Aruna Ramakrishna
2024-04-25 18:05 ` [PATCH v3 3/4] x86/pkeys: Update PKRU to enable all pkeys before XSAVE Aruna Ramakrishna
2024-05-07 16:47   ` Thomas Gleixner
2024-05-07 17:34     ` Aruna Ramakrishna
2024-05-08 12:52       ` Thomas Gleixner
2024-04-25 18:05 ` [PATCH v3 4/4] selftests/mm: Add new testcases for pkeys Aruna Ramakrishna
2024-05-07  3:17   ` kernel test robot
2024-05-07 12:05   ` Thomas Gleixner
2024-05-07 16:56     ` Thomas Gleixner
2024-05-07 18:04       ` Aruna Ramakrishna
2024-05-08 12:55         ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox