Skip to content

selftests, powerpc, x86 : Memory Protection Keys

Ram Pai linux-arch linux-kselftest linux-mm linuxppc-dev 20 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v14 Latest22 patches 16 repliesIn review
  2. v13 posting 3/324 patches 24 repliesSuperseded
  3. v13 posting 2/32 of 3 patches 4 repliesSuperseded
Earlier versions · 17
VersionPostedPatchesRepliesStatus
v13 posting 1/33 patches0 repliesSuperseded
v12 posting 2/222 patches26 repliesSuperseded
v12 posting 1/23 patches8 repliesSuperseded
v113 patches5 repliesSuperseded
v10 posting 4/424 patches0 repliesSuperseded
v10 posting 3/42 patches0 repliesSuperseded
v10 posting 2/42 of 27 patches1 replySuperseded
v10 posting 1/427 patches8 repliesSuperseded
v951 patches24 repliesSuperseded
v7 RFC posting 2/225 patches41 repliesSuperseded
v7 RFC posting 1/225 patches0 repliesSuperseded
v6 RFC62 patches40 repliesSuperseded
v5 RFC38 patches53 repliesSuperseded
v4 RFC17 patches7 repliesSuperseded
v3 RFC23 patches6 repliesSuperseded
v2 RFC12 patches43 repliesSuperseded
v1 RFC7 patches15 repliesSuperseded

Patches in v14 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22selftests/x86: Move protecton key selftest to arch neutral directorytools/testing/selftests/vm/.gitignore tools/testing/selftests/vm/Makefile tools/testing/selftests/vm/pkey-helpers.h +4 more+1706 -17051 reply
2/22selftests/vm: rename all references to pkru to a generic nametools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/protection_keys.c+169 -1540 replies
3/22selftests/vm: move generic definitions to header filetools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/protection_keys.c+30 -321 reply
4/22selftests/vm: move arch-specific definitions to arch-specific headertools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-x86.h tools/testing/selftests/vm/protection_keys.c+162 -1521 reply
5/22selftests/vm: Make gcc check arguments of sigsafe_printf()tools/testing/selftests/vm/pkey-helpers.h+4 -00 replies
6/22selftests/vm: typecast the pkey registertools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-x86.h tools/testing/selftests/vm/protection_keys.c+73 -531 reply
7/22selftests/vm: generic function to handle shadow key registertools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-x86.h tools/testing/selftests/vm/protection_keys.c+56 -121 reply
8/22selftests/vm: fix the wrong assert in pkey_disable_set()tools/testing/selftests/vm/protection_keys.c+1 -11 reply
9/22selftests/vm: fixed bugs in pkey_disable_clear()tools/testing/selftests/vm/protection_keys.c+2 -21 reply
10/22selftests/vm: fix alloc_random_pkey() to make it really randomtools/testing/selftests/vm/protection_keys.c+5 -11 reply
11/22selftests/vm: introduce two arch independent abstractiontools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-x86.h tools/testing/selftests/vm/protection_keys.c+14 -31 reply
12/22selftests/vm: pkey register should match shadow pkeytools/testing/selftests/vm/protection_keys.c+2 -21 reply
13/22selftests/vm: generic cleanuptools/testing/selftests/vm/protection_keys.c+43 -211 reply
14/22selftests/vm: Introduce generic abstractionstools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-powerpc.h tools/testing/selftests/vm/pkey-x86.h +1 more+153 -231 reply
15/22selftests/vm: powerpc implementation to check support for pkeytools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-powerpc.h tools/testing/selftests/vm/pkey-x86.h +1 more+23 -101 reply
16/22selftests/vm: fix an assertion in test_pkey_alloc_exhaust()tools/testing/selftests/vm/protection_keys.c+4 -81 reply
17/22selftests/vm: associate key on a mapped page and detect access violationtools/testing/selftests/vm/protection_keys.c+19 -00 replies
18/22selftests/vm: associate key on a mapped page and detect write violationtools/testing/selftests/vm/protection_keys.c+12 -00 replies
19/22selftests/vm: detect write violation on a mapped access-denied-key pagetools/testing/selftests/vm/protection_keys.c+13 -00 replies
20/22selftests/vm: testcases must restore pkey-permissionstools/testing/selftests/vm/protection_keys.c+5 -01 reply
21/22selftests/vm: sub-page allocatortools/testing/selftests/vm/pkey-helpers.h tools/testing/selftests/vm/pkey-powerpc.h tools/testing/selftests/vm/pkey-x86.h +1 more+37 -00 replies
22/22selftests/vm: test correct behavior of pkey-0tools/testing/selftests/vm/protection_keys.c+64 -21 reply

Reviews trailers per patch

11 of 22 patches have a Reviewed-by or Acked-by.

PatchIngo MolnarDave Hansen
1/22A-b A-b
2/22R-b
3/22A-b
4/22A-b
5/22
6/22A-b
7/22
8/22
9/22A-b
10/22A-b
11/22R-b
12/22
13/22
14/22
15/22
16/22
17/22A-b
18/22A-b
19/22A-b
20/22
21/22
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v14 thread

Cover letter [PATCH v14 00/22] selftests, powerpc, x86 : Memory Protection Keys

Memory protection keys enables an application to protect its address space from inadvertent access by its own code.

This feature is now enabled on powerpc architecture and integrated in 4.16-rc1. The patches move the selftests to arch neutral directory and enhance their test coverage.

Test
----
Verified for correctness on powerpc and on x86.

History:
-------
version 14:
(1) incorporated another round of comments from Dave Hansen.

version 13:
(1) Incorporated comments for Dave Hansen.
(2) Added one more test for correct pkey-0 behavior.

version 12:
(1) fixed the offset of pkey field in the siginfo structure for x86_64 and powerpc. And tries to use the actual field if the headers have it defined.

version 11:
(1) fixed a deadlock in the ptrace testcase.

version 10 and prior:
(1) moved the testcase to arch neutral directory
(2) split the changes into incremental patches.

Ram Pai (20):
selftests/x86: Move protecton key selftest to arch neutral directory selftests/vm: rename all references to pkru to a generic name selftests/vm: move generic definitions to header file selftests/vm: typecast the pkey register
selftests/vm: generic function to handle shadow key register selftests/vm: fix the wrong assert in pkey_disable_set() selftests/vm: fixed bugs in pkey_disable_clear() selftests/vm: fix alloc_random_pkey() to make it really random selftests/vm: introduce two arch independent abstraction selftests/vm: pkey register should match shadow pkey selftests/vm: generic cleanup
selftests/vm: Introduce generic abstractions selftests/vm: powerpc implementation to check support for pkey selftests/vm: fix an assertion in test_pkey_alloc_exhaust() selftests/vm: associate key on a mapped page and detect access
violation
selftests/vm: associate key on a mapped page and detect write
violation
selftests/vm: detect write violation on a mapped access-denied-key
page
selftests/vm: testcases must restore pkey-permissions selftests/vm: sub-page allocator
selftests/vm: test correct behavior of pkey-0

Thiago Jung Bauermann (2):
selftests/vm: move arch-specific definitions to arch-specific header selftests/vm: Make gcc check arguments of sigsafe_printf()

 tools/testing/selftests/vm/.gitignore         |    1 +
 tools/testing/selftests/vm/Makefile           |    1 +
 tools/testing/selftests/vm/pkey-helpers.h     |  214 ++++
 tools/testing/selftests/vm/pkey-powerpc.h     |  128 ++
 tools/testing/selftests/vm/pkey-x86.h         |  184 +++
 tools/testing/selftests/vm/protection_keys.c  | 1593 +++++++++++++++++++++++++
 tools/testing/selftests/x86/.gitignore        |    1 -
 tools/testing/selftests/x86/pkey-helpers.h    |  219 ----
 tools/testing/selftests/x86/protection_keys.c | 1485 -----------------------
 9 files changed, 2121 insertions(+), 1705 deletions(-)
 create mode 100644 tools/testing/selftests/vm/pkey-helpers.h
 create mode 100644 tools/testing/selftests/vm/pkey-powerpc.h
 create mode 100644 tools/testing/selftests/vm/pkey-x86.h
 create mode 100644 tools/testing/selftests/vm/protection_keys.c
 delete mode 100644 tools/testing/selftests/x86/pkey-helpers.h
 delete mode 100644 tools/testing/selftests/x86/protection_keys.c