From nobody Wed Apr 1 12:37:23 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 BE57C3D75B8; Tue, 31 Mar 2026 08:02:09 +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=1774944131; cv=none; b=FU9T2v/FsdDaFuVip/FLgztnDbBnSv75OUWD50nk/WmDOJmYx5C5Mx5fAT7uE021xy5QJzZAKKqM24uvKgHoy3411HvaqvLq18g+rmklC1Pnop7mLqWeNniuyPgIQ27M+ulukFddqsW1/3GNAAiA0Xe2lGOzEz11Bpzphy4skg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774944131; c=relaxed/simple; bh=7i0M3EiN/OhujEEahhXEfHuzEkj1afAUjxhvVI3PbEk=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=F5i7XVwz7FdRblbty1VNN5r2LDnjZ23P6FVDEmN1asGxnwU34JpxMZpvD/ABohrWbxKnreJteifTxOmeKDrHFiknKuRDN9+ZX7oy4m2GmP8/r3YxAFf8TMjhMBWRsnj4E+gGnaY3xrAyLgqs7KJLn9hC1zxFW7UqVa3cBL+NAmg= 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=UjP8XjMu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sOvLYwac; 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="UjP8XjMu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sOvLYwac" Date: Tue, 31 Mar 2026 08:02:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774944127; 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=mEvdWaCYLpYGpvTiQOA5nM2XvS64BFxTUqmaeN/YC+Q=; b=UjP8XjMuLGkLgliHJ7VhN+hO4QGojWu8cz6pzgeJFmpwrT5IahHKWCu8kyTIPIlYwRek3Z 8wHojGjgJJq+Sa/nG6nLHT16+2Cg2FPmes1JrPcitp+043O1PcFtzVnTO7W8Y3XBD0Y3d6 lnDZzCco9G0ikF2XPYHGsWzLLpDeDl3dneXRMCPTakAZxD8/Ez0JoHQ/A3dB+uB86Bi3x2 W/fA5WZr2XZyad7L1FgdtSMTegypgkbobSfapJVikA/jKt0SHtZ3DthkrlLTpv/7oCVVVq 0bnzXtSj6bWCNLCYOjpfubvn5Jc+xnKET7uIXJXo1nJcY7XUOY8vPQdD/s0o8A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774944127; 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=mEvdWaCYLpYGpvTiQOA5nM2XvS64BFxTUqmaeN/YC+Q=; b=sOvLYwac/GtddQHnchtYelUJwObSpbON40XY54YGoCBOQyKXcWVOeCYv7UWwKjaIsH/eZT Gneqc9uIJXoC2DAA== From: "tip-bot2 for Uros Bizjak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/asm] x86/process/64: Use savesegment() in __show_regs() instead of inline asm Cc: Uros Bizjak , Ingo Molnar , "H. Peter Anvin" , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260330085938.67985-2-ubizjak@gmail.com> References: <20260330085938.67985-2-ubizjak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177494412647.1647592.1867311756360960371.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/asm branch of tip: Commit-ID: 81310ce4287a23b8ff6e8684de73cfaae88782ca Gitweb: https://git.kernel.org/tip/81310ce4287a23b8ff6e8684de73cfaae= 88782ca Author: Uros Bizjak AuthorDate: Mon, 30 Mar 2026 10:59:21 +02:00 Committer: Ingo Molnar CommitterDate: Tue, 31 Mar 2026 09:50:10 +02:00 x86/process/64: Use savesegment() in __show_regs() instead of inline asm Replace direct 'movl' instructions for DS, ES, FS, and GS read in __show_regs() with the savesegment() helper. This improves readability, consistency, and ensures proper handling of segment registers on x86_64. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://patch.msgid.link/20260330085938.67985-2-ubizjak@gmail.com --- arch/x86/kernel/process_64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 08e72f4..b85e715 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -104,10 +104,10 @@ void __show_regs(struct pt_regs *regs, enum show_regs= _mode mode, return; } =20 - asm("movl %%ds,%0" : "=3Dr" (ds)); - asm("movl %%es,%0" : "=3Dr" (es)); - asm("movl %%fs,%0" : "=3Dr" (fsindex)); - asm("movl %%gs,%0" : "=3Dr" (gsindex)); + savesegment(ds, ds); + savesegment(es, es); + savesegment(fs, fsindex); + savesegment(gs, gsindex); =20 rdmsrq(MSR_FS_BASE, fs); rdmsrq(MSR_GS_BASE, gs);