mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Sohil Mehta" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Sohil Mehta <sohil.mehta@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin (Intel)" <hpa@zytor.com>,
	"Maciej Wieczor-Retman" <maciej.wieczor-retman@intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cpu] x86/cpu: Remove LASS restriction on vsyscall emulation
Date: Thu, 19 Mar 2026 22:59:23 -0000	[thread overview]
Message-ID: <177396116354.1647592.6305628253357589313.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260309181029.398498-6-sohil.mehta@intel.com>

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     584d752b8a1f0ee3a7d5a831e55623c10e7ca0ee
Gitweb:        https://git.kernel.org/tip/584d752b8a1f0ee3a7d5a831e55623c10e7ca0ee
Author:        Sohil Mehta <sohil.mehta@intel.com>
AuthorDate:    Mon, 09 Mar 2026 11:10:29 -07:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Thu, 19 Mar 2026 15:11:13 -07:00

x86/cpu: Remove LASS restriction on vsyscall emulation

Vsyscall emulation has two modes of operation: XONLY and EMULATE. The
default XONLY mode is now supported with a LASS-triggered #GP. OTOH,
LASS is disabled if someone requests the deprecated EMULATE mode via the
vsyscall=emulate command line option. So, remove the restriction on LASS
when the overall vsyscall emulation support is compiled in.

As a result, there is no need for setup_lass() anymore. LASS is enabled
by default through a late_initcall().

Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by:
Tested-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Link: https://patch.msgid.link/20260309181029.398498-6-sohil.mehta@intel.com
---
 arch/x86/kernel/cpu/common.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 3557f0e..02472fc 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -406,20 +406,6 @@ out:
 	cr4_clear_bits(X86_CR4_UMIP);
 }
 
-static __always_inline void setup_lass(struct cpuinfo_x86 *c)
-{
-	if (!cpu_feature_enabled(X86_FEATURE_LASS))
-		return;
-
-	/*
-	 * Legacy vsyscall page access causes a #GP when LASS is active.
-	 * Disable LASS because the #GP handler doesn't support vsyscall
-	 * emulation.
-	 */
-	if (IS_ENABLED(CONFIG_X86_VSYSCALL_EMULATION))
-		setup_clear_cpu_cap(X86_FEATURE_LASS);
-}
-
 static int enable_lass(unsigned int cpu)
 {
 	cr4_set_bits(X86_CR4_LASS);
@@ -2061,7 +2047,6 @@ static void identify_cpu(struct cpuinfo_x86 *c)
 	setup_smep(c);
 	setup_smap(c);
 	setup_umip(c);
-	setup_lass(c);
 
 	/* Enable FSGSBASE instructions if available. */
 	if (cpu_has(c, X86_FEATURE_FSGSBASE)) {

  reply	other threads:[~2026-03-19 22:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 18:10 [PATCH v3 0/5] x86: Enable LASS support with vsyscall=xonly mode Sohil Mehta
2026-03-09 18:10 ` [PATCH v3 1/5] x86/vsyscall: Reorganize the page fault emulation code Sohil Mehta
2026-03-19 22:59   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2026-03-09 18:10 ` [PATCH v3 2/5] x86/traps: Consolidate user fixups in the #GP handler Sohil Mehta
2026-03-19 22:59   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2026-03-09 18:10 ` [PATCH v3 3/5] x86/vsyscall: Restore vsyscall=xonly mode under LASS Sohil Mehta
2026-03-19 22:59   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2026-03-09 18:10 ` [PATCH v3 4/5] x86/vsyscall: Disable LASS if vsyscall mode is set to EMULATE Sohil Mehta
2026-03-19 22:59   ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta
2026-03-09 18:10 ` [PATCH v3 5/5] x86/cpu: Remove LASS restriction on vsyscall emulation Sohil Mehta
2026-03-19 22:59   ` tip-bot2 for Sohil Mehta [this message]
2026-03-19 18:46 ` [PATCH v3 0/5] x86: Enable LASS support with vsyscall=xonly mode Sohil Mehta
  -- strict thread matches above, loose matches on Subject: below --
2026-03-05 21:40 [PATCH v2 5/5] x86/cpu: Remove LASS restriction on vsyscall emulation Sohil Mehta
2026-03-19 21:59 ` [tip: x86/cpu] " tip-bot2 for Sohil Mehta

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=177396116354.1647592.6305628253357589313.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=sohil.mehta@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

all inboxes | Powered by JetHome®