From: Kees Cook <keescook@chromium.org>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/6] x86/cpu: Allow feature bit names from /proc/cpuinfo in clearcpuid=
Date: Mon, 7 Feb 2022 14:04:04 -0800 [thread overview]
Message-ID: <202202071402.DEFD6C9@keescook> (raw)
In-Reply-To: <20220127115626.14179-2-bp@alien8.de>
On Thu, Jan 27, 2022 at 12:56:21PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Having to give the X86_FEATURE array indices in order to disable a
> feature bit for testing is not really user-friendly. So accept the
> feature bit names too.
>
> Some feature bits don't have names so there the array indices are still
> accepted, of course.
>
> Clearing CPUID flags is not something which should be done in production
> so taint the kernel too.
>
> An exemplary cmdline would then be something like:
>
> clearcpuid=de,440,smca,succory,bmi1,3dnow
>
> ("succory" is wrong on purpose). And it says:
>
> [ 0.000000] Clearing CPUID bits: de 13:24 smca bmi1 3dnow
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
I like the taint flag addition!
Even though it reports what it does actually clear, do you think it
might be more "friendly" to yell about unknown stuff too? i.e.:
[ 0.000000] Clearing CPUID bits: unknown bit 'succory'
[ 0.000000] Clearing CPUID bits: de 13:24 smca bmi1 3dnow
Either way:
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2022-02-07 22:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 11:56 [PATCH v2 0/6] x86/cpu: Do some janitorial work Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 1/6] x86/cpu: Allow feature bit names from /proc/cpuinfo in clearcpuid= Borislav Petkov
2022-02-07 22:04 ` Kees Cook [this message]
2022-02-08 11:54 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 2/6] x86/cpu: Remove "nosep" Borislav Petkov
2022-02-07 21:58 ` Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 3/6] x86/cpu: Remove CONFIG_X86_SMAP and "nosmap" Borislav Petkov
2022-02-07 22:07 ` Kees Cook
2022-02-08 15:06 ` Borislav Petkov
2022-02-08 21:01 ` Borislav Petkov
2022-02-09 2:56 ` Kees Cook
2022-02-09 11:53 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 4/6] x86/cpu: Remove "nosmep" Borislav Petkov
2022-02-07 22:07 ` Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 5/6] x86/cpu: Remove "noexec" Borislav Petkov
2022-02-07 22:25 ` Kees Cook
2022-02-08 17:40 ` Sean Christopherson
2022-02-08 19:56 ` Borislav Petkov
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
2022-01-27 11:56 ` [PATCH v2 6/6] x86/cpu: Remove "noclflush" Borislav Petkov
2022-02-07 22:08 ` Kees Cook
2022-04-04 18:22 ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202202071402.DEFD6C9@keescook \
--to=keescook@chromium.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox