From nobody Mon Apr 6 09:49:45 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6935439DBF9; Thu, 19 Mar 2026 22:59:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773961168; cv=none; b=K7SlAIx++ppAuBVyr6mQ1ZGw3pliDmCeEs+fyfOaEhCikZR12/WI9rnYvxeidAYvTweuLpkhcQn3SVe/QQKkFKUXp5HrL24mQGva3/0I4dzC6ScvmzKFPiKULAPxNXcL6tFKTJ1QCXtPCij6ruHyWVRU7spmGOmCq2pXb1bfgA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773961168; c=relaxed/simple; bh=P53Fjbc2SXhYcSCWhJ2VRhcQpENb7gDb2C3N6xNet3k=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=h0hxhspiKojzbipJ5dUj2xPQ3HhaVHQIa4F9Tw5uWQ1piOp6wb8cFzRwwmCc35QlkhT8fs4grKjsnWdLNpL8ZVvwxJ+PAaMSFNX1nvRlezFaHHawyEPRHf7t15SmMIsHfECiVt4HTfrbQ9k1HHOtVkmjT6uNIKvtw02xnEnVGac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=I23ip2bL; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=v2pl/bWn; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="I23ip2bL"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="v2pl/bWn" Date: Thu, 19 Mar 2026 22:59:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773961165; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ujaIwsl1Evo7bGks2XBtx+Z6HSgu4Youu3ynl8xnU0w=; b=I23ip2bLbUfkDxfWebD0Gj/ATGG+C071f1+25BY9IMcu9JF905p57TlABxnj/EcotgPVJ0 kGxfVeyO6L90njCIsl9mGCCDumOjrziR624VMXlZ1UWPYq79kiuvnFbxfZKLat5RsvC0v3 xo5Fm9NLZ3jPmiheoC5Ha43mM7xYve/6t6htGmpt/vZjkduu6qmBN3XeWiwf1sZr1CuEQS pps2/ug6WXLUjmWhVt4XT9KV1/l34vplRQLkL+mareiER2fCKiu5HZK0y/OMaujVkPV6R2 kDv7fUiMgE6+Vq63vYNK1+eTMzW5r5u2thLvxnf0eccyf0IDcdctbogSns+mzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773961165; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ujaIwsl1Evo7bGks2XBtx+Z6HSgu4Youu3ynl8xnU0w=; b=v2pl/bWnf4r4CkdH9dDerh4AyZbiJeVtgfOD1yRKgwtWG11XGXtIJIm7LJ5xNM/vKu6tzi cMci+VNubM/S5+BA== From: "tip-bot2 for Sohil Mehta" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/cpu: Remove LASS restriction on vsyscall emulation Cc: Sohil Mehta , Dave Hansen , "H. Peter Anvin (Intel)" , "Maciej Wieczor-Retman" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260309181029.398498-6-sohil.mehta@intel.com> References: <20260309181029.398498-6-sohil.mehta@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177396116354.1647592.6305628253357589313.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 584d752b8a1f0ee3a7d5a831e55623c10e7ca0ee Gitweb: https://git.kernel.org/tip/584d752b8a1f0ee3a7d5a831e55623c10= e7ca0ee Author: Sohil Mehta AuthorDate: Mon, 09 Mar 2026 11:10:29 -07:00 Committer: Dave Hansen 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=3Demulate 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 Signed-off-by: Dave Hansen Reviewed-by: Dave Hansen Reviewed-by: H. Peter Anvin (Intel) Reviewed-by: Tested-by: Maciej Wieczor-Retman 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); } =20 -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); =20 /* Enable FSGSBASE instructions if available. */ if (cpu_has(c, X86_FEATURE_FSGSBASE)) {