From nobody Mon Apr 6 09:20:38 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 68D973B4E88; Thu, 19 Mar 2026 21:59:23 +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=1773957564; cv=none; b=JSqS4ZCkr8G2kNL5PXb+0O6wm8QdI0w4tZ18XOyL0/jBMgXUNLc9AZUzqZRnJ6OLcuBPMv8NpoTzyxWZzpxxn+uuz2E0mO6rrhjA1Zk2MfJYBGHY3tTJSzMhFAEUci7wMeqRouTI0Y41A1NMJpNelhiWuGjodhuAms7aSd4KzIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773957564; c=relaxed/simple; bh=ZQZMZTCHN7o/FIO20wJvMNbs9aPWQQ74kJmri50NRyo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=axuK3HxXyBYHXYi9yxWAVrFwZvh5kETdT2l/tDqFMluoZV7DQi811p31dpe4Vs2TvcYM0ztppd92ZWzE1m5avlrTAq18AU4eoGQQ011Enk20u7j6D78xj3kkbN+wDKrSPveG4gwhryzOUEtn2+IhiAHdhLHTriG+Td5RJPyQe+E= 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=U5UBwIX3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=juQPQJtr; 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="U5UBwIX3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="juQPQJtr" Date: Thu, 19 Mar 2026 21:59:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773957562; 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=nJqG6E9AgBkEPhqeNCOGwUkOFtZ/tLDMBdBYZJbCs4w=; b=U5UBwIX3gGEVuhbC6hKbzo7fSGFmUpSsr1X2gBaKSfLe2gnsuq+7/6UmpiK2AIO8KhC0Xv 3XxC8iKGtf8Oyf+nUoe/2fIWpOkaa1q3lQ05ko26hz/Uk7vv7HtXVot6oiO8DNE4hjWIN2 XexrNi4o6x5+9K24TXgO3AVnka0KYGrkgHBN/rOb0ifd5Rkz5II0MXL/nHAaMOsfq5Ct1N 788BieGQOrk5V16Psc8LaJKvDOGX/Sai9e7rVLJrIlqL+V/sHhWqpRayj9fOzoK1xbuBGc 6irbZrpBN7NrqueBKhEdPD4Epi+z7RHMqrOX523GBuwAyWPze23G24jLI4gSKg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773957562; 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=nJqG6E9AgBkEPhqeNCOGwUkOFtZ/tLDMBdBYZJbCs4w=; b=juQPQJtrn2MkiAR1QpqTwAdh37JBR+HJRkCF8jBICVXyq4AleMsos18qnbNwDt/G6zqD4t sKx3Pb3e9Mlw4GCQ== 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/vsyscall: Disable LASS if vsyscall mode is set to EMULATE Cc: Sohil Mehta , Dave Hansen , Rick Edgecombe , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260305214026.3887452-5-sohil.mehta@intel.com> References: <20260305214026.3887452-5-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: <177395756056.1647592.15765007509352645067.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: 07a11b1501042ee087a7cadd39dfea52ca12bf25 Gitweb: https://git.kernel.org/tip/07a11b1501042ee087a7cadd39dfea52c= a12bf25 Author: Sohil Mehta AuthorDate: Thu, 05 Mar 2026 13:40:25 -08:00 Committer: Dave Hansen CommitterDate: Thu, 05 Mar 2026 13:49:26 -08:00 x86/vsyscall: Disable LASS if vsyscall mode is set to EMULATE The EMULATE mode of vsyscall maps the vsyscall page with a high kernel address directly into user address space. Reading the vsyscall page in EMULATE mode would cause LASS to trigger a #GP. Fixing the LASS violation in EMULATE mode would require complex instruction decoding because the resulting #GP does include the necessary error information, and the vsyscall address is not readily available in the RIP. The EMULATE mode has been deprecated since 2022 and can only be enabled using the command line parameter vsyscall=3Demulate. See commit bf00745e7791 ("x86/vsyscall: Remove CONFIG_LEGACY_VSYSCALL_EMULATE") for details. At this point, no one is expected to be using this insecure mode. The rare usages that need it obviously do not care about security. Disable LASS when EMULATE mode is requested to avoid breaking legacy user software. Also, update the vsyscall documentation to reflect this. LASS will only be supported if vsyscall mode is set to XONLY (default) or NONE. Signed-off-by: Sohil Mehta Signed-off-by: Dave Hansen Reviewed-by: Rick Edgecombe Reviewed-by: Dave Hansen Link: https://patch.msgid.link/20260305214026.3887452-5-sohil.mehta@intel.c= om --- Documentation/admin-guide/kernel-parameters.txt | 4 +++- arch/x86/entry/vsyscall/vsyscall_64.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index cb850e5..64df2c5 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -8376,7 +8376,9 @@ Kernel parameters =20 emulate Vsyscalls turn into traps and are emulated reasonably safely. The vsyscall page is - readable. + readable. This disables the Linear + Address Space Separation (LASS) security + feature and makes the system less secure. =20 xonly [default] Vsyscalls turn into traps and are emulated reasonably safely. The vsyscall diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscal= l/vsyscall_64.c index b34c876..215ae07 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -62,6 +62,11 @@ static int __init vsyscall_setup(char *str) else return -EINVAL; =20 + if (cpu_feature_enabled(X86_FEATURE_LASS) && vsyscall_mode =3D=3D EMULAT= E) { + setup_clear_cpu_cap(X86_FEATURE_LASS); + pr_warn_once("x86/cpu: Disabling LASS due to vsyscall=3Demulate\n"); + } + return 0; } =20