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

From: Dave Hansen
Date: Wed Jan 02 2019 - 17:02:47 EST

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

Cc: x86@xxxxxxxxxx
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Joerg Roedel <jroedel@xxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx