]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/cpu: Warn louder about the {set,clear}cpuid boot parameters
authorBrendan Jackman <jackmanb@google.com>
Mon, 3 Mar 2025 15:45:38 +0000 (15:45 +0000)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Mar 2025 10:15:03 +0000 (11:15 +0100)
commit681955761bf6845241c6d33e2fb222f5e92c8b89
tree72d11f43be056f9f1a98eca50605ac22582e60c1
parent27c3b452c1a554483ac692702639c826602d1089
x86/cpu: Warn louder about the {set,clear}cpuid boot parameters

Commit 814165e9fd1f6 ("x86/cpu: Add the 'setcpuid=' boot parameter")
recently expanded the user's ability to break their system horribly by
overriding effective CPU flags. This was reflected with updates to the
documentation to try and make people aware that this is dangerous.

To further reduce the risk of users mistaking this for a "real feature",
and try to help them figure out why their kernel is tainted if they do
use it:

- Upgrade the existing printk to pr_warn, to help ensure kernel logs
  reflect what changes are in effect.

- Print an extra warning that tries to be as dramatic as possible, while
  also highlighting the fact that it tainted the kernel.

Suggested-by: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20250303-setcpuid-taint-louder-v1-2-8d255032cb4c@google.com
arch/x86/kernel/cpu/common.c