Revision 18bc7bd523e0fc5be8d76bf84bde733a97a8c375 authored by Andy Lutomirski on 10 August 2016, 09:29:14 UTC, committed by Ingo Molnar on 11 August 2016, 09:15:00 UTC
The initialization process for trampoline_cr4_features and
mmu_cr4_features was confusing.  The intent is for mmu_cr4_features
and *trampoline_cr4_features to stay in sync, but
trampoline_cr4_features is NULL until setup_real_mode() runs.  The
old code synchronized *trampoline_cr4_features *twice*, once in
setup_real_mode() and once in setup_arch().  It also initialized
mmu_cr4_features in setup_real_mode(), which causes the actual value
of mmu_cr4_features to potentially depend on when setup_real_mode()
is called.

With this patch, mmu_cr4_features is initialized directly in
setup_arch(), and *trampoline_cr4_features is synchronized to
mmu_cr4_features when the trampoline is set up.

After this patch, it should be safe to defer setup_real_mode().

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mario Limonciello <mario_limonciello@dell.com>
Cc: Matt Fleming <mfleming@suse.de>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/d48a263f9912389b957dd495a7127b009259ffe0.1470821230.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 007b756
History
File Mode Size
internal
ablk_helper.h -rw-r--r-- 734 bytes
aead.h -rw-r--r-- 18.8 KB
aes.h -rw-r--r-- 1019 bytes
akcipher.h -rw-r--r-- 11.5 KB
algapi.h -rw-r--r-- 12.8 KB
authenc.h -rw-r--r-- 845 bytes
b128ops.h -rw-r--r-- 2.4 KB
blowfish.h -rw-r--r-- 376 bytes
cast5.h -rw-r--r-- 551 bytes
cast6.h -rw-r--r-- 597 bytes
cast_common.h -rw-r--r-- 193 bytes
chacha20.h -rw-r--r-- 642 bytes
cryptd.h -rw-r--r-- 2.1 KB
crypto_wq.h -rw-r--r-- 122 bytes
ctr.h -rw-r--r-- 524 bytes
des.h -rw-r--r-- 503 bytes
dh.h -rw-r--r-- 823 bytes
drbg.h -rw-r--r-- 8.9 KB
ecdh.h -rw-r--r-- 845 bytes
gf128mul.h -rw-r--r-- 8.0 KB
hash.h -rw-r--r-- 30.8 KB
hash_info.h -rw-r--r-- 1.1 KB
if_alg.h -rw-r--r-- 2.5 KB
kpp.h -rw-r--r-- 8.8 KB
lrw.h -rw-r--r-- 1.2 KB
mcryptd.h -rw-r--r-- 2.3 KB
md5.h -rw-r--r-- 458 bytes
null.h -rw-r--r-- 530 bytes
padlock.h -rw-r--r-- 649 bytes
pcrypt.h -rw-r--r-- 1.4 KB
pkcs7.h -rw-r--r-- 1.2 KB
poly1305.h -rw-r--r-- 977 bytes
public_key.h -rw-r--r-- 1.7 KB
rng.h -rw-r--r-- 6.6 KB
scatterwalk.h -rw-r--r-- 3.7 KB
serpent.h -rw-r--r-- 673 bytes
sha.h -rw-r--r-- 2.8 KB
sha1_base.h -rw-r--r-- 2.5 KB
sha256_base.h -rw-r--r-- 3.0 KB
sha3.h -rw-r--r-- 665 bytes
sha512_base.h -rw-r--r-- 3.2 KB
skcipher.h -rw-r--r-- 19.6 KB
twofish.h -rw-r--r-- 716 bytes
vmac.h -rw-r--r-- 2.1 KB
xts.h -rw-r--r-- 1.2 KB

back to top