From nobody Sat Jul 25 02:13:00 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 A30A24657F3; Mon, 20 Jul 2026 18:43:47 +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=1784573029; cv=none; b=Y7JYrKMagIIIannfnzaxd5Lb5hBmHSOjCMWWvGdUBK6/U8VEHA3ryizH/TJVcnEUBZM50wltUGnVbFRk6EiDdw3U/R+gqi2u7vBp2lHsk2W9J9UoYKf3/JVnXXdZ4xIovRaEG+CI+4OJ7+Ocikoh9gbCUXPhUY5aIr8Znq9tmjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784573029; c=relaxed/simple; bh=bHWzbjCc1zxWeBZdeMH0C0nnZ6w+pDUIAuz1NbYA8zE=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=EgGyYQku2wq0rg2R0EPb6GUO/IJzd6iIRaV3kPcheP/GrEwy2zsCM1w5uoY+mLMebJtOO4kmwMFFnyOUWp/HNBtyvdlJiAgc0AfBRfpqODAkneaicoQabtpiWYHVM7AkA/IBRhTYUv+vOB5d/UNaDEdAXvc62edlqxs4AzANBww= 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=cpQwDmv4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=avanGQtR; 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="cpQwDmv4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="avanGQtR" Date: Mon, 20 Jul 2026 18:43:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1784573020; 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=7c499uJHAqSw0eR++hyUAWbNJU/Vovvn+f/+j+aZEfg=; b=cpQwDmv4e3aMj++Yfy3XfyH1TUkYhUnd1Y+R5GPCCsmFBzhklA/5g5xEJ8Oyc8uBdOzkGI or1qK3ZcDKfdYHRTtwHvZu1Ooty7Rmn/1evM4dJbFJ1XHCDUU/Pj4XS6ktuZhUskQ2WWte mUZEJR4uSFdP4it/E/g0hIWoM5v0RP67SOhjAc5o6hgyVauw2w+O4dC7BPIPURJrVXEn1Z jjY2+lkXQD6SqeyBLZME96s25wVZfjI/w12rKhSlKT57JkzmFOSfF6mioT/DOM74Hf3kaY HDR6+orPg/YTcMLmMFNEDg4CIf5a6KTO3384oOBuJUyWorq5ON+H6rwGcvMYtA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1784573020; 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=7c499uJHAqSw0eR++hyUAWbNJU/Vovvn+f/+j+aZEfg=; b=avanGQtRu3SBMntDtvHy8cNGSdWanfg2S02XImUhSHCYZ5jpHLjQ1W8BljJUj7JPUZ3yHg 1RWgmolrmmemmcBw== 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: <178457301876.2943223.5919155742664381737.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: dfc98c7a46424683326c8d8ffc70e81548c59fdb Gitweb: https://git.kernel.org/tip/dfc98c7a46424683326c8d8ffc70e8154= 8c59fdb Author: Thomas Gleixner AuthorDate: Sun, 12 Jul 2026 23:25:22 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 20 Jul 2026 20:38:40 +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)