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=1796388183; b=Uy46Fy5cAX4t1QSutauYRENfu8udflHo4z6sh7NXgTlYvyhxbwPkcPof/4Qv+h6W3yTM 1bB81aydV+uDEakAfiW0c57us7dg83zJ52C0vJJYSegNIxB3Pf4GOdpVVd3vq0M/2kJXS ft46u2egVNA1punKauaWafwR9zdmKXIVBV9WB+YlfnfJLo8hdXfYqr7/FnaHqUo5FLzNL u4BTqj9mCW7nhXs/WeEyjINaSXwzlbPlvWlxGu3lqJ0IPjeNflexJuzS54QKdJXWBeRFx DnbO1DZGGvBpZRpuNYX6aap2gO4I1sa+pas3BKxeTDznmZ3+8ZUC2urTRjKNjMDNJLA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388183; 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=uHwehHH88ABh8uE2FkuSeNgIJA5vUWynBmW++mNVhcM=; b=Hn1Fiyha0fbm4t/WdwgsHZZylgEu3AoL22oTAZHMlV8MnJbiQy6IfvkU0OatTXt2HXLD nmLpPz3om8+tugX5P3OPeMrmFTxYEbP6kYUr+W0GYMu1dT/NfxG/ECLxNoMP4HQz+HmJw 5DAo7wWVeN/LoXHaDNVQAQfN45Vkb0yPvXWFThc21a/i1XvWCjEeHEGh3brUD99SbRgtA uOsyEvlDv+JNphROP3GDYaY+ZFL8+kpIYhqGYcqTGFEgQZNn0dQEgnGP5INWR2GXyFhMA lZ2iaujINLHhVgYXvHAjMcjXfuVZ7yE77hY30vfz6TZW7n0JLOIK9P6VM+V+Ex4ebcA== 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=cMqeSeBa; 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 55A8A606A322; Fri, 4 Dec 2026 12:43:03 +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=cMqeSeBa Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC27C1F00897; Fri, 4 Dec 2026 12:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388183; bh=uHwehHH88ABh8uE2FkuSeNgIJA5vUWynBmW++mNVhcM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cMqeSeBaDN4lArWuoqeNzWcj6FJYFJW8Xog9ygxGh8e1plSyeqMSJo6a6ZiKjzutk t4+I1OwFTncAOOFL516qA8qxdJdlI8yI/jIhgGWxqS3ZmpEjd7gy9RuYoigEYT7QOK 9dSJeUtkAEGcfj0/Zk/PdAFMyvNiyhBqP9axXhGk= 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.1 0516/1059] arm64: ptrace: dont warn on missing siginfo in a group-stop Date: Fri, 4 Dec 2026 19:00:47 +0900 Message-ID: <20261204100657.603359726@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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 @@ -577,8 +577,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; /*