From nobody Sat Jul 25 19:29: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 60C78444716; Tue, 14 Jul 2026 15:01:42 +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=1784041303; cv=none; b=Iq74U6DNGWvHLcj37OglmdbYBYa/AuGAJS93Nj6ow/bkTtVQqZ/NEjlZhfYynW4iqhThEyHforMHmwx84KLgo9L4P/VAbyLFF1w/4cYpZw6h/QUpDuKqQrCNTlzHxVyOKYMUgAbDHDMpBWUJlp11fKNUuBrnnSp3ZCOjKbowlJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784041303; c=relaxed/simple; bh=sdRXe3oJAbeun1OD5AHkqFau+ViLjAa9mfEGWABAicE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=q7wJKZRRjfoL3iezVPWYhpNMdW0CfOOx6ewNGAfXkKpgLt/iM/KW/kvKsOow2dJP+yn4xBpfDD+aq3vAWSZaXb/fvIrsRZACPGSiI0SDlzDTKHjd+zjuxiPqBsa0mAkjysfKGiXeX8BMdYNBtaT1fSYe7+7GGTHE8JIswuT/QZI= 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=VBoR27Jk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3kPreJ+K; 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="VBoR27Jk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3kPreJ+K" Date: Tue, 14 Jul 2026 15:01:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784041300; 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=WMbiEuIK9pdpFmsYVtnKay2V3niuJjlXTpyDf4iy4cw=; b=VBoR27JkDTL3KYAfs+cGdaUYy7jeDyb3jzS5idSwj9mdPzPI64aBtL5mJNGzkRbQgXUUEj yBifQsjq9yQ/4U+2oR6pa6TRyiC8pdB3X47DSw01wa5bHZ1QWBi79hQtPQoRapvF7s8WdK 8ELev4nR3y97zaOcnLmArGTnyOWUZSlmDHzunjsleNLuW/nU3etThFNDOsB0kj4zCQQLWy Ao1IIN2WWcPE+ar7BqXJdrWu31uxaDGvWO1za0KZgm85JrxyAMnzKnhBP88FuYPrGMQ+vW Hu5ID5KG7kwPHnMFUfbvoHvd83+ixniMfNaJ2CC95vg3JuQFFtDC6R2z57QAjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784041300; 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=WMbiEuIK9pdpFmsYVtnKay2V3niuJjlXTpyDf4iy4cw=; b=3kPreJ+Kh+IC+zPtWYBYPGy/aUtPQBijkymyWewFfkvepUCbE0AvgIAdwj3xXcss9jJODf qtjVeiT68phRlgBA== 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: Rework trace_syscall_enter() Cc: Thomas Gleixner , msuchanek@suse.de, Jinjie Ruan , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260712141346.639115923@kernel.org> References: <20260712141346.639115923@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178404129925.1844600.2647463423522057557.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: 8bbaa0524675a8bd21b8aaed7538b6896d83b22c Gitweb: https://git.kernel.org/tip/8bbaa0524675a8bd21b8aaed7538b6896= d83b22c Author: Thomas Gleixner AuthorDate: Sun, 12 Jul 2026 23:25:22 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 14 Jul 2026 16:57:16 +02:00 entry: Rework trace_syscall_enter() Reread the syscall number from pt_regs and stop returning the eventually modified syscall number. That moves the reread to the end of syscall_trace_enter() and prepares for moving it to the call site. No functional change. Signed-off-by: Thomas Gleixner Tested-by: Michal Such=C3=A1nek Reviewed-by: Jinjie Ruan Link: https://patch.msgid.link/20260712141346.639115923@kernel.org --- include/linux/entry-common.h | 10 ++++------ kernel/entry/syscall-common.c | 9 ++------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 78cfeeb..38d1484 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -58,7 +58,7 @@ static __always_inline bool arch_ptrace_report_syscall_pe= rmit_entry(struct pt_re } #endif =20 -long trace_syscall_enter(struct pt_regs *regs, long syscall); +void trace_syscall_enter(struct pt_regs *regs); void trace_syscall_exit(struct pt_regs *regs, long ret); void syscall_enter_audit(struct pt_regs *regs); =20 @@ -99,16 +99,14 @@ static __always_inline long syscall_trace_enter(struct = pt_regs *regs, unsigned l return -1L; } =20 - /* Either of the above might have changed the syscall number */ - syscall =3D syscall_get_nr(current, regs); - if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT)) - syscall =3D trace_syscall_enter(regs, syscall); + trace_syscall_enter(regs); =20 if (unlikely(audit_context())) syscall_enter_audit(regs); =20 - return syscall; + /* Either of the above might have changed the syscall number */ + return syscall_get_nr(current, regs); } =20 /** diff --git a/kernel/entry/syscall-common.c b/kernel/entry/syscall-common.c index b3cde6f..b8eac9e 100644 --- a/kernel/entry/syscall-common.c +++ b/kernel/entry/syscall-common.c @@ -8,14 +8,9 @@ =20 /* Out of line to prevent tracepoint code duplication */ =20 -long trace_syscall_enter(struct pt_regs *regs, long syscall) +void trace_syscall_enter(struct pt_regs *regs) { - trace_sys_enter(regs, syscall); - /* - * Probes or BPF hooks in the tracepoint may have changed the - * system call number. Reread it. - */ - return syscall_get_nr(current, regs); + trace_sys_enter(regs, syscall_get_nr(current, regs)); } =20 void trace_syscall_exit(struct pt_regs *regs, long ret)