summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pgtable.h
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior2019-04-03 18:41:43 +0200
committerBorislav Petkov2019-04-11 15:41:05 +0200
commit0556cbdc2fbcb3068e5b924a8b3d5386ae0dd27d (patch)
tree56e3d3c4b173b86c92e6d0f7174a57e37fada17a /arch/x86/include/asm/pgtable.h
parentx86/fpu: Only write PKRU if it is different from current (diff)
downloadkernel-qcow2-linux-0556cbdc2fbcb3068e5b924a8b3d5386ae0dd27d.tar.gz
kernel-qcow2-linux-0556cbdc2fbcb3068e5b924a8b3d5386ae0dd27d.tar.xz
kernel-qcow2-linux-0556cbdc2fbcb3068e5b924a8b3d5386ae0dd27d.zip
x86/pkeys: Don't check if PKRU is zero before writing it
write_pkru() checks if the current value is the same as the expected value. So instead of just checking if the current and new value is zero (and skip the write in such a case) we can benefit from that. Remove the zero check of PKRU, __write_pkru() provides such a check now. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Dave Hansen <dave.hansen@intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: "Jason A. Donenfeld" <Jason@zx2c4.com> Cc: kvm ML <kvm@vger.kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Rik van Riel <riel@surriel.com> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20190403164156.19645-15-bigeasy@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
0 files changed, 0 insertions, 0 deletions