diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-06-23 14:01:30 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-06-23 17:49:45 +0200 |
commit | ce578f16348b003675c928a1992498b33b515f18 (patch) | |
tree | 7ea531705d199ab7a0c34261f8071594f7ad53be /arch/x86/kernel/fpu/init.c | |
parent | x86/pkeys: Revert a5eff7259790 ("x86/pkeys: Add PKRU value to init_fpstate") (diff) | |
download | linux-dev-ce578f16348b003675c928a1992498b33b515f18.tar.xz linux-dev-ce578f16348b003675c928a1992498b33b515f18.zip |
x86/fpu: Mark various FPU state variables __ro_after_init
Nothing modifies these after booting.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20210623121451.611751529@linutronix.de
Diffstat (limited to 'arch/x86/kernel/fpu/init.c')
-rw-r--r-- | arch/x86/kernel/fpu/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index 701f196d7c68..95aa1090ea72 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -89,7 +89,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c) /* * Boot time FPU feature detection code: */ -unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; +unsigned int mxcsr_feature_mask __ro_after_init = 0xffffffffu; EXPORT_SYMBOL_GPL(mxcsr_feature_mask); static void __init fpu__init_system_mxcsr(void) @@ -135,7 +135,7 @@ static void __init fpu__init_system_generic(void) * This is inherent to the XSAVE architecture which puts all state * components into a single, continuous memory block: */ -unsigned int fpu_kernel_xstate_size; +unsigned int fpu_kernel_xstate_size __ro_after_init; EXPORT_SYMBOL_GPL(fpu_kernel_xstate_size); /* Get alignment of the TYPE. */ |