public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Sneddon <daniel.sneddon@linux.intel.com>
To: Jonathan Corbet <corbet@lwn.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org
Cc: hpa@zytor.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, pawan.kumar.gupta@linux.intel.com
Subject: [PATCH 0/2] VERW based clean-up
Date: Mon, 28 Oct 2024 16:50:33 -0700	[thread overview]
Message-ID: <cover.1730158506.git.daniel.sneddon@linux.intel.com> (raw)

There are several mitigations that use the VERW instruction to clean
up internal CPU buffers.  Currently, each of these mitigations is
treated independently, but if VERW is needed for one of the
mitigations, it's on for all of them. This can lead to some confusion
if a user tries to disable one of the mitigations, but it is left
enabled for one of the others. The user needs to disable all 4 VERW-
based mitigations. Warn the user when one or more VERW mitigations are
disabled but not all of them. While we're messing with VERW
mitigations, might as well simplify them and remove the need to call
each of them twice.

V2:
Dropped the new knob previously introduced in the first patch (Borislav)
Add warning if not all 4 mitigations states match (Borislav)
Removed extra comment (Josh)
Code clean-up (Josh)


Daniel Sneddon (2):
  x86/bugs: Check VERW mitigations for consistency
  x86/bugs: Clean-up verw mitigations

 arch/x86/include/asm/processor.h |   2 +-
 arch/x86/kernel/cpu/bugs.c       | 206 +++++++++++++------------------
 2 files changed, 90 insertions(+), 118 deletions(-)

-- 
2.25.1


             reply	other threads:[~2024-10-28 23:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 23:50 Daniel Sneddon [this message]
2024-10-28 23:50 ` [PATCH 1/2] x86/bugs: Check VERW mitigations for consistency Daniel Sneddon
2024-10-29 11:39   ` Borislav Petkov
2024-10-29 14:35     ` Daniel Sneddon
2024-10-29 16:32   ` Nikolay Borisov
2024-10-29 16:34     ` Daniel Sneddon
2024-10-28 23:50 ` [PATCH 2/2] x86/bugs: Clean-up verw mitigations Daniel Sneddon
2024-10-29 11:37   ` Borislav Petkov
2024-10-29 14:40     ` Daniel Sneddon
2024-10-29 15:00       ` Borislav Petkov
2024-10-29 15:33         ` Daniel Sneddon
2024-10-29 16:37           ` Borislav Petkov
2024-10-29 16:39             ` Daniel Sneddon
2024-10-28 23:53 ` [PATCH 0/2] VERW based clean-up Daniel Sneddon

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=cover.1730158506.git.daniel.sneddon@linux.intel.com \
    --to=daniel.sneddon@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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