public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 3/3] x86/microcode: Taint and warn on late loading
Date: Wed, 25 May 2022 17:28:01 +0200	[thread overview]
Message-ID: <Yo5LAenZIsYmM9Ie@zn.tnic> (raw)
In-Reply-To: <4644ff0530ba40948ed1f0e2e45a24d8@intel.com>

On Wed, May 25, 2022 at 02:50:59PM +0000, Luck, Tony wrote:
> Are taint flags in such short supply that you couldn't create a new
> one?

Yes, they can be as many as there are letters in the english alphabet,
it seems:

struct taint_flag {
        char c_true;    /* character printed when tainted */
	^^^^^^^^^^^^

and there are already

#define TAINT_FLAGS_COUNT               18

in use.

> The OUT_OF_SPEC one already seems to be used in some dubious
> ways:
> 1) Command line argument to clear a X86_FEATURES bit
> 2) Forcing PAE
> 3) Writing to an MSR not on the "approved" list
> 
> As you add more ways to set this taint bit, it becomes less useful
> for debugging ...

Look at the other taint flags - they're set in a bunch of different
places so it is hard to unambiguously decide where the taint was set. If
we wanna use it for debugging, then the taint_flag struct above should
probably save the caller address which set the taint... or something to
that effect.

> since now you have to dig into which of the possible cases set the bit
> to decide whether it might have contributed to the OOPS.

So I'm still not convinced this should have a special taint flag.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2022-05-25 15:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 18:53 [RFC PATCH 0/3] x86/microcode: Drop old interface and default-disable late loading Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 1/3] x86/microcode: Rip out the OLD_INTERFACE Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 2/3] x86/microcode: Default-disable late loading Borislav Petkov
2022-05-27 10:37   ` Ingo Molnar
2022-05-27 10:58     ` Borislav Petkov
2022-05-24 18:53 ` [RFC PATCH 3/3] x86/microcode: Taint and warn on " Borislav Petkov
2022-05-25  1:03   ` Luck, Tony
2022-05-25  6:59     ` Peter Zijlstra
2022-05-25  7:37       ` Borislav Petkov
2022-05-25 14:50         ` Luck, Tony
2022-05-25 15:28           ` Borislav Petkov [this message]
2022-05-25 15:40             ` Luck, Tony
2022-05-25 16:00               ` Borislav Petkov
2022-05-26 12:11                 ` Taint addresses Borislav Petkov
2022-05-26 16:41                   ` Luck, Tony
2022-05-27  9:45                     ` Borislav Petkov
2022-05-25 10:03   ` [RFC PATCH 3/3] x86/microcode: Taint and warn on late loading Peter Zijlstra
2022-05-25 12:52     ` [RFC PATCH -v2] " Borislav Petkov
2022-05-25 13:55 ` [PATCH 4/3] x86/microcode: Remove unnecessary perf callback default-disable " 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=Yo5LAenZIsYmM9Ie@zn.tnic \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    --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