Skip to content

x86/mm/pkeys: fix user-visible pkey state destruction at fork()

Dave Hansen lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/pkeys: properly copy pkey state at fork()arch/x86/include/asm/mmu_context.h+18 -01 reply
2/2x86/selftests/pkeys: fork() to check for state being preservedtools/testing/selftests/x86/protection_keys.c+31 -102 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchThomas Gleixner
1/2R-b
2/2

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

Read the v1 thread

Cover letter [PATCH 0/2] x86/mm/pkeys: fix user-visible pkey state destruction at fork()

Hi x86 maintainers,

This is an important fix that I believe needs to be merged for 4.21. Without it, applications calling fork() can potentially double-allocate a protection key, causing lots of strange problems.

Thomas's Reviewed-by is on the the actual fix, but not the selftest.

I would also be happy to send this as a pull request if you would prefer.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Will Deacon <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Joerg Roedel <[email protected]>