From nobody Sat Jul 25 23:06:01 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 32F723AD51C; Sun, 12 Jul 2026 12:44:06 +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=1783860252; cv=none; b=YnAjtKxk06rAxq7YdSE+zP4S5ppYglTILhj5+k+IlGCvAUfJa893z//EvlC5UzREHqIP0Nu5nCEKntiUxRz1O9afMYttI5hRESknamh85v2N8dpKrE6jwl7kFDqC/PWNhSOAyeyDhkdvHEoFQ4tbYiIjp0eDNnIjOfC15+gOH4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783860252; c=relaxed/simple; bh=TTFjaglYRd+uKcZSujbfqwq1YhnhJfmUdxFz4wQdM6U=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=CobBIe06qH3LYqhoYwNHwPEDby1b+/n9KAIOiIEfBnrnLKgZ/OulAc4OJfqP6ohDN6MWiSUVliUmZ1QNSqPhAYro+BXwaW7zo1V9IlChWU/vpZiWdxpp1cGc7kH3P7IEQHt1tbrKx+qvRbgXng83jnEcQWOH8dj/ZMXtcsO3/cw= 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=VMrNcRE2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OAHJ12R9; 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="VMrNcRE2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OAHJ12R9" Date: Sun, 12 Jul 2026 12:44:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783860242; 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=f6XTOQ9gOa1OcicDR9rPAQF4u0jMJg6waCxloX7OC8w=; b=VMrNcRE21FN6mQjf78/FKKVfvVAFt5hU2182y0GxIo5AWODqq3p0vhxSIZ55hpl8wfYU08 uJzcaX8ggIb5A/ERP2Bt9lxuWD9FuOxe3d2KnriNqMTXxweujd0yotMX5xt+9+rxRxlpDk avf2Kf2OSOcf685FR8E18Ex+XbHoWOb84kP9uggp5jKl4tCHQ8Xfb3C5sEQkumXJU0YjGt FXiAxDrLRA/Pf4qThBMu8KHDzbtWN/lhdJ7wq7RS39IFrlR0LNAiE1BICzybq3H+7nKbnJ t8l7EkcbVnqTXJJ2Rn2LikEJMmId2YvZm061MAHlfc96Qc+x/OJJ/RHNnFtkLg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783860242; 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=f6XTOQ9gOa1OcicDR9rPAQF4u0jMJg6waCxloX7OC8w=; b=OAHJ12R9Og3b1SpA5+JUTsYymTDhVpdA1PBFZmkkvNps/eoX8LlvqT4tX8NyH9F8225WmG CW8zfWy2YFyQeOBw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/entry] entry: Use syscall number instead of rereading it Cc: Thomas Gleixner , "Mukesh Kumar Chaurasiya (IBM)" , Radu Rendec , Jinjie Ruan , philmd@oss.qualcomm.com, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260707190254.181086755@kernel.org> References: <20260707190254.181086755@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178386024091.1844600.12038801060764636502.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 core/entry branch of tip: Commit-ID: 8af25d0a2e465f3cb73c47c605fddd1664ee79b2 Gitweb: https://git.kernel.org/tip/8af25d0a2e465f3cb73c47c605fddd166= 4ee79b2 Author: Thomas Gleixner AuthorDate: Tue, 07 Jul 2026 21:06:36 +02:00 Committer: Thomas Gleixner CommitterDate: Sun, 12 Jul 2026 12:38:01 +02:00 entry: Use syscall number instead of rereading it rseq_syscall_enter_work() is invoked before the syscall number can be modified. So there is no point in rereading it from pt_regs. Signed-off-by: Thomas Gleixner Tested-by: Mukesh Kumar Chaurasiya (IBM) Reviewed-by: Radu Rendec Reviewed-by: Jinjie Ruan Reviewed-by: Mukesh Kumar Chaurasiya (IBM) Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://patch.msgid.link/20260707190254.181086755@kernel.org --- include/linux/entry-common.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index c0f6464..c837352 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -70,9 +70,10 @@ static inline void syscall_enter_audit(struct pt_regs *r= egs, long syscall) } } =20 -static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsi= gned long work) +static __always_inline long syscall_trace_enter(struct pt_regs *regs, unsi= gned long work, + long syscall) { - long syscall, ret =3D 0; + long ret =3D 0; =20 /* * Handle Syscall User Dispatch. This must comes first, since @@ -90,7 +91,7 @@ static __always_inline long syscall_trace_enter(struct pt= _regs *regs, unsigned l * through hrtimer_interrupt(). */ if (work & SYSCALL_WORK_SYSCALL_RSEQ_SLICE) - rseq_syscall_enter_work(syscall_get_nr(current, regs)); + rseq_syscall_enter_work(syscall); =20 /* Handle ptrace */ if (work & (SYSCALL_WORK_SYSCALL_TRACE | SYSCALL_WORK_SYSCALL_EMU)) { @@ -145,7 +146,7 @@ static __always_inline long syscall_enter_from_user_mod= e_work(struct pt_regs *re unsigned long work =3D READ_ONCE(current_thread_info()->syscall_work); =20 if (work & SYSCALL_WORK_ENTER) - syscall =3D syscall_trace_enter(regs, work); + syscall =3D syscall_trace_enter(regs, work, syscall); =20 return syscall; }