public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org,
	Nikunj A Dadhania <nikunj@amd.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	Sohil Mehta <sohil.mehta@intel.com>,
	stable@vger.kernel.org, #@tip-bot2.tec.linutronix.de,
	6.9+@tip-bot2.tec.linutronix.de, x86@kernel.org
Subject: Re: [tip: x86/urgent] x86/cpu: Disable CR pinning during CPU bringup
Date: Wed, 18 Mar 2026 14:30:13 -0700	[thread overview]
Message-ID: <ea53e6a9-4f8a-49a8-95ea-40d2f667dc7f@intel.com> (raw)
In-Reply-To: <20260318210950.GC3739106@noisy.programming.kicks-ass.net>

On 3/18/26 14:09, Peter Zijlstra wrote:
> So currently we setup an IDT and everything, then setup the FRED MSRs,
> flip CR4_FRED and call it a day. But we could just explicitly poison all
> the IDT stuff to cause tripple faults.

We already have:

        /* Enable FRED */
        cr4_set_bits(X86_CR4_FRED);
        /* Any further IDT use is a bug */
        idt_invalidate();

which I think means that if you clear X86_CR4_FRED, you triple-fault on
the next reference to the IDT. That's a fate far worse than having the
CR-pinning code silently fix up X86_CR4_FRED.

It's arguable that having X86_CR4_FRED pinned in the first place makes
things less secure if an attacker is thwacking CR4 bits.

  reply	other threads:[~2026-03-18 21:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260318075654.1792916-3-nikunj@amd.com>
2026-03-18 18:51 ` [tip: x86/urgent] x86/cpu: Disable CR pinning during CPU bringup tip-bot2 for Dave Hansen
2026-03-18 20:47   ` Peter Zijlstra
2026-03-18 21:08     ` Borislav Petkov
2026-03-18 21:30       ` Peter Zijlstra
2026-03-18 22:01         ` Borislav Petkov
2026-03-18 21:09     ` Peter Zijlstra
2026-03-18 21:30       ` Dave Hansen [this message]
2026-03-18 22:09     ` Peter Zijlstra
2026-03-20  9:25       ` [PATCH] x86/cpu: Add comment clarifying CRn pinning Peter Zijlstra
2026-03-20 11:34         ` 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=ea53e6a9-4f8a-49a8-95ea-40d2f667dc7f@intel.com \
    --to=dave.hansen@intel.com \
    --cc=#@tip-bot2.tec.linutronix.de \
    --cc=6.9+@tip-bot2.tec.linutronix.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=nikunj@amd.com \
    --cc=peterz@infradead.org \
    --cc=sohil.mehta@intel.com \
    --cc=stable@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