[PATCH 0/4] selftests/vm/pkeys: Bug fixes and a new test

From: Dave Hansen
Date: Fri Jun 11 2021 - 12:41:58 EST


There has been a lot of activity on the x86 front around the XSAVE
architecture which is used to context-switch processor state (among
other things). In addition, AMD has recently joined the protection
keys club by adding processor support for PKU.

The AMD implementation helped uncover a kernel bug around the PKRU
"init state", which actually applied to Intel's implementation but
was just harder to hit. This series adds a test which is expected
to help find this class of bug both on AMD and Intel. All the work
around pkeys on x86 also uncovered a few bugs in the selftest.

Any testing of this new code (especially from my powerpc friends)
would be appreciated.

Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ram Pai <linuxram@xxxxxxxxxx>
Cc: Sandipan Das <sandipan@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Florian Weimer <fweimer@xxxxxxxxxx>
Cc: "Desnes A. Nunes do Rosario" <desnesn@xxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxx>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: Michal Suchanek <msuchanek@xxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Cc: x86@xxxxxxxxxx