From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385539; b=4z5S/mQBmVUSvFndw4JWz99N0O5xM6YCnvhkzOFQRZ6iROskGmqs1wbcAtuwTG4Vqz6t oxAivNZy7rh42OIRovUelT+zjNgyf8sB+xbAhpVq4fqNIX6oYofteCClzMeboA6tP9ftY G7OgphAs0Bs3Drq97fHI6ujLV2GkXLHrFDv/wThljUbW/xLvrV98fGNxgMbzaxhMEZrw2 n6tQGjsGsBu9PfqVGNrfg6GelNj8dnIHpBYk8KJHhcnc3aN5K+/Aq3NGUXp80hv/FxaWy +dC/hiOu3pPnhA3Ff0wdWCkFeGo7hAF+M9NxCuhRt7z/pVqFChXDNGQn/UaD+SNM3QA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385539; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=eI94jDH+DwwDugS19ebuZUhciMukTJWgsu2e7NbGrKo=; b=OUJzbCdOf0aZlIpEAx49QoL2kdcPvGC3Jg3THFnNt/EftBcX7LWdaqAGGX9rHldSRJXo aVtu76J/nR2jrLy9Bvlk1Q7rwWTVUs5fZI3Vd1Q009cPWLSxNCVIPHzWM4hKpdrrx0PsM za7mpOQT0yKf1MyiwX1UIaWxgoIvM734QBwnoHNTD4pT0FqTVjvzfeLZoBawIMpYVsuxB Ky9Z7aIP0vhnn/bMgoM9s3IHcNGMw/QnW751+F+1BwshWh1ehnJYb6scsqeuK4nsEkPgx q3ATz/HMEZE1iBqlX23OVXLS/6gniEzZo5Nf3cyvtAgkKJZTYpHDm8J4bmOdlJMkjhw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=NerOLZ1+; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2406D606A322; Fri, 4 Dec 2026 11:58:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=NerOLZ1+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11CD71F000C2; Fri, 4 Dec 2026 11:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385538; bh=eI94jDH+DwwDugS19ebuZUhciMukTJWgsu2e7NbGrKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NerOLZ1+m7GwSe1EClQ9XNhkbz2uMtSvFJYDV+kUPPpL2qWeIvG1NWGrAhFjhXxBu EZ1Wp/6TnN1S74/NKjpSGV0fjxfR/HyIaLFQyQSpR4nyUbIwTNGzJShbci7CNG01qc fdh/2uOCagV+BWufZPkIkInm1fDqeWzLxqE3ZYlk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Gongyi , Oleg Nesterov , Will Deacon , Catalin Marinas Subject: [PATCH 6.6 0542/1167] arm64: ptrace: dont warn on missing siginfo in a group-stop Date: Fri, 4 Dec 2026 18:59:29 +0900 Message-ID: <20261204100716.174624315@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Gongyi commit 5306f124f3171289b2ef5bac1e08aad175f66d1e upstream. PTRACE_ATTACH to a group-stopped child can enter do_jobctl_trap(), which calls ptrace_stop() without siginfo. If the tracer writes NT_ARM_SYSTEM_CALL, system_call_set() can change syscallno from NO_SYSCALL before update_syscall_orig_x0_after_ptrace() checks last_siginfo. WARN_ON_ONCE(!info) then fires for a valid ptrace stop. Keep the early return when siginfo is absent, but remove the warning. This leaves orig_x0 untouched at a non-seized group-stop and preserves the existing syscall-exit-stop handling. Fixes: 88b839ce497c ("arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry") Cc: stable@vger.kernel.org Signed-off-by: Zhao Gongyi Acked-by: Oleg Nesterov Acked-by: Will Deacon [catalin.marinas@arm.com: modified comment as per Will's suggestion] Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/ptrace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -572,8 +572,12 @@ static void update_syscall_orig_x0_after if (regs->syscallno == NO_SYSCALL) return; - /* We should only be called when target is in a ptrace stop */ - if (WARN_ON_ONCE(!info)) + /* + * For exit-stops, info is always non-NULL, but that's not true for other + * stops such as non-seized group-stops. In those cases, just return early + * as there's no need to update orig_x0 anyway. + */ + if (!info) return; /*