Skip to content

powerpc/pkeys: fixes to pkeys

Ram Pai linuxppc-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 1 replyIn review
  2. v26 patches 25 repliesSuperseded
  3. v15 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9powerpc/pkeys: Give all threads control of their key permissionsarch/powerpc/mm/pkeys.c+26 -181 reply
2/9powerpc/pkeys: Deny read/write/execute by defaultarch/powerpc/mm/pkeys.c+3 -50 replies
3/9powerpc/pkeys: key allocation/deallocation must not change pkey registersarch/powerpc/include/asm/pkeys.h arch/powerpc/mm/pkeys.c+0 -380 replies
4/9powerpc/pkeys: Save the pkey registers before forkarch/powerpc/kernel/process.c+1 -00 replies
5/9powerpc/pkeys: fix calculation of total pkeys.arch/powerpc/mm/pkeys.c+1 -10 replies
6/9powerpc/pkeys: Preallocate execute-only keyarch/powerpc/mm/pkeys.c+18 -450 replies
7/9powerpc/pkeys: make protection key 0 less specialarch/powerpc/include/asm/pkeys.h arch/powerpc/mm/pkeys.c+32 -160 replies
8/9powerpc/core-pkeys: execute-permission on keys are disabled by defaulttools/testing/selftests/powerpc/ptrace/core-pkey.c+4 -00 replies
9/9powerpc/ptrace-pkeys: execute-permission on keys are disabled by defaulttools/testing/selftests/powerpc/ptrace/ptrace-pkey.c+5 -00 replies

Reviews trailers per patch

3 of 9 patches have a Reviewed-by or Acked-by.

PatchFlorian WeimerThiago Jung Bauermann
1/9T-b
2/9
3/9R-b
4/9
5/9
6/9
7/9
8/9R-b
9/9R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/9] powerpc/pkeys: fixes to pkeys

Assortment of fixes to pkey to match its behavior to that on x86.

Patch 1 makes pkey consumable in multithreaded applications.

Patch 2 Deny, by default, permissions on all unallocated keys.

Patch 3 pkey allocation/free must not change pkey registers.

Patch 4 fixes fork to inherit the key attributes.

Patch 5 A off-by-one bug made one key unusable. Fixes it.

Patch 6 Makes pkey-0 less special.

Patch 7 fix to core-pkeys selftest to capture the modified behavior

Patch 8 fix to ptrace-pkeys selftest to capture the modified behavior

The above patch series is successfully verified using pkey selftests, on both powerpc and x86.

Ram Pai (9):
powerpc/pkeys: Give all threads control of their key permissions powerpc/pkeys: Deny read/write/execute by default powerpc/pkeys: key allocation/deallocation must not change pkey
registers
powerpc/pkeys: Save the pkey registers before fork powerpc/pkeys: fix calculation of total pkeys. powerpc/pkeys: Preallocate execute-only key powerpc/pkeys: make protection key 0 less special powerpc/core-pkeys: execute-permission on keys are disabled by
default
powerpc/ptrace-pkeys: execute-permission on keys are disabled by
default

 arch/powerpc/include/asm/pkeys.h                   |   40 +++---
 arch/powerpc/kernel/process.c                      |    1 +
 arch/powerpc/mm/pkeys.c                            |  141 +++++++-------------
 tools/testing/selftests/powerpc/ptrace/core-pkey.c |    4 +
 .../testing/selftests/powerpc/ptrace/ptrace-pkey.c |    5 +
 5 files changed, 79 insertions(+), 112 deletions(-)