Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Jinjie Ruan <ruanjinjie@huawei.com>,
	Thomas Gleixner <tglx@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 4/5] entry: Remove unused syscall argument from syscall_trace_enter()
Date: Tue,  8 Sep 2026 08:20:29 -0400	[thread overview]
Message-ID: <20260908122030.2052577-4-sashal@kernel.org> (raw)
In-Reply-To: <20260908122030.2052577-1-sashal@kernel.org>

From: Jinjie Ruan <ruanjinjie@huawei.com>

[ Upstream commit 03150a9f84b328f5c724b8ed9ff8600c2d7e2d7b ]

The 'syscall' argument of syscall_trace_enter() is immediately overwritten
before any real use and serves only as a local variable, so drop the
parameter.

No functional change intended.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260128031934.3906955-2-ruanjinjie@huawei.com

[ sashal: Reduced backport -- upstream 03150a9f84b32 touches 2 file(s), this
  backport carries 1. Not backported here:
  kernel/entry/syscall-common.c
  This note is generated from the file lists only; see the resolution record
  for the reasoning. ]

Stable-dep-of: 4a3591287fb7 ("entry: Fix seccomp bypass after ptrace with TSYNC")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/entry-common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index 0d5dc199ed8ca..0f672ee152dfc 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -53,10 +53,10 @@ bool syscall_user_dispatch(struct pt_regs *regs);
 long syscall_enter_audit(struct pt_regs *regs, long syscall,
 			 unsigned long work);
 
-static __always_inline long syscall_trace_enter(struct pt_regs *regs, long syscall,
+static __always_inline long syscall_trace_enter(struct pt_regs *regs,
 						unsigned long work)
 {
-	long ret = 0;
+	long syscall, ret = 0;
 
 	/*
 	 * Handle Syscall User Dispatch.  This must comes first, since
@@ -116,7 +116,7 @@ static __always_inline long syscall_enter_from_user_mode_work(struct pt_regs *re
 	unsigned long work = READ_ONCE(current_thread_info()->syscall_work);
 
 	if (work & SYSCALL_WORK_ENTER)
-		syscall = syscall_trace_enter(regs, syscall, work);
+		syscall = syscall_trace_enter(regs, work);
 
 	return syscall;
 }
-- 
2.53.0


  parent reply	other threads:[~2026-09-08 12:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 13:40 FAILED: patch "[PATCH] entry: Fix seccomp bypass after ptrace with TSYNC" failed to apply to 6.1-stable tree gregkh
2026-09-08 12:20 ` [PATCH 6.1.y 1/5] entry: Inline syscall_exit_to_user_mode() Sasha Levin
2026-09-08 12:20   ` [PATCH 6.1.y 2/5] entry: Split generic entry into generic exception and syscall entry Sasha Levin
2026-09-08 12:20   ` [PATCH 6.1.y 3/5] entry: Remove syscall_enter_from_user_mode_prepare() Sasha Levin
2026-09-08 12:20   ` Sasha Levin [this message]
2026-09-08 12:20   ` [PATCH 6.1.y 5/5] entry: Fix seccomp bypass after ptrace with TSYNC Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260908122030.2052577-4-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox