From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 089FAC88E53 for ; Tue, 15 Sep 2026 12:43:26 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hkhWv5msGz30M6; Tue, 15 Sep 2026 22:43:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1789473015; cv=none; b=fofrH2MZonG6+MfVW9ZnuTNKIhiYqwfvIZHbAtmsbWQN3hhcNucJkC9XrV/zHbEQYnh5gbSBha9gVzPXlgm5sXz3CUmSh+7xKoKNVLngEB1P+hTtJyOLamzPcvZ4oMvvXH977bWvIjyT/tfk5rxImuW2WbbtfhBYMen8ybeZIKzKpGM2XGaqFBcnfxfDWW2Ig7cP5zBGmNn10rQMAYie9iwbSWKqugsnZho9WI747jKqpKyx4ImggaKy0+6tYOFOBf07GuwWkjw9BzKbKMKJkm1Z6E47AfTKGelGIFidbyGOoLomtLwW3lbt20onWQU/yV0D51RQ3lxblZz14qbvGA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1789473015; c=relaxed/relaxed; bh=Wvy04NbJid/rHT9Oo2y6und5H0C/2sS7C4rNvZsUJ+M=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=hS6ymzWSwzjWWb74ymANJhxTIAPQtvNfrY7pv1WedxDF3PpC1i9JnW79LNcoVmFUBwu2FKlZcamryKR0++jZABe7mjDaCz+2sr/kBNltUEr9J3jyCzj53+GZtbpJwGtIWJJ3tWJsBsc4fvy3gkj682KFlLitRHxw1GSptIoYhWFwjSOgVX8nnnFRxEfqI9j5R4XJTLxaTzpv6arZ1Tr+Iv3zh2g5ve9kimekPvVUMnTwuZKUxu86A2OyW2H/se87fBs87sCn+pY9vKAxgNGCTY+2F/MiWcAydDfSHhfadXLk5g/x9KWmIY7Y88phNjd8w6ei1ci3/Xr5aYDjPMv+fQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FZyLQujg; dkim-atps=neutral; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FZyLQujg; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hkgLZ1xyyz2xSg for ; Tue, 15 Sep 2026 21:50:14 +1000 (AEST) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id D088C414F1; Tue, 15 Sep 2026 11:50:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA52D1F00898; Tue, 15 Sep 2026 11:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789473007; bh=Wvy04NbJid/rHT9Oo2y6und5H0C/2sS7C4rNvZsUJ+M=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=FZyLQujgrSLTLItt0atdLygYtPLJy07BtTpqJEj8tK4rCFepTR6WTdgjVU1CUaviY /2kxpiaHyjwEq8od5PpCP63amvdhTsJyZVoAXJVFzklNTY1gegcdWYDDoR+/XePScz MHrJT4NoUt8HIfXHRaVC5PMjCIQJVPlEkfbh8gaQY1dgXLLaPf3I5PVcxiOdPbdNhp egKHXLxlo+8hU8IJMPwEDm1igMoQNQ50LWjgaSmTwzy6Kkr1xxWZeZvflO3a23mVwB kOkyNkCaEN1wr6HpAzVJp/5fzNLTwrIjdFvuyd/aBdf6hTcIxBdJ3Y3aTJX6C30ppL nzwCXruPvLzow== From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC POC 09/50] m68k: commit fds on syscall exit Reply-To: sashiko-reviews@lists.linux.dev To: "Linus Torvalds" , "Christian Brauner" Cc: kexec@lists.infradead.org, linux-openrisc@vger.kernel.org, io-uring@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org, "Eugenio Perez" , linux-mm@kvack.org, linux-sh@vger.kernel.org, "Jann Horn" , virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, "David Airlie" , bpf@vger.kernel.org, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-hexagon@vger.kernel.org, linux-gpio@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-alpha@vger.kernel.org, "Ingo Molnar" , linux-um@lists.infradead.org, "Michael S. Tsirkin" , linux-parisc@vger.kernel.org, "Peter Zijlstra" , "Jan Kara" , dri-devel@lists.freedesktop.org, =?utf-8?b?Q2hy?= =?utf-8?b?aXN0aWFuIEJyYXVuZXIgKEFtdXRhYmxlKQ==?= , linux-snps-arc@lists.infradead.org, linux-csky@vger.kernel.org, "Jens Axboe" , "Oleg Nesterov" , linux-fsdevel@vger.kernel.org, "Alexander Viro" In-Reply-To: <20260915-work-fd-reserve-unify-folded-v1-9-4d5217d6b246@kernel.org> References: <20260915-work-fd-reserve-unify-folded-v1-0-4d5217d6b246@kernel.org> <20260915-work-fd-reserve-unify-folded-v1-9-4d5217d6b246@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Sep 2026 11:50:04 +0000 Message-Id: <20260915115004.CA52D1F00898@smtp.kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [High] m68k: single-step SIGTRAP lost on fd-allocating syscalls -- commit 731b1387fc76d92d165ee1f28de694e3d228627b Author: Christian Brauner m68k: commit fds on syscall exit Add TIF_FD_SLOTS and test it on the untraced return from a system call in all three entry paths. A task that reserved descriptors calls syscall_trace_leave(), which commits them before the ptrace exit stop. [ ... ] > diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S > index 338b474910f74..9e4471f681652 100644 > --- a/arch/m68k/kernel/entry.S > +++ b/arch/m68k/kernel/entry.S > @@ -229,6 +229,8 @@ ret_from_syscall: > syscall_exit_work: > btst #5,%sp@(PT_OFF_SR) | check if returning to kernel > bnes 1b | if so, skip resched, signals > + btst #4,%a1@(TINFO_FLAGS+2) | TIF_FD_SLOTS: commit descriptors > + jne do_trace_exit [Severity: High] Does this new branch cause delayed trace (single-step) SIGTRAPs to be lost?= =20 If a process is being single-stepped (TIF_DELAYED_TRACE is set) and execute= s a=20 syscall that allocates file descriptors (TIF_FD_SLOTS is set), this=20 unconditionally branches to do_trace_exit.=20 Looking at do_trace_exit, it executes syscall_trace_leave() and then direct= ly jumps to the exception return path, bypassing the jmi do_delayed_trace logi= c=20 completely.=20 This means single-stepping over a system call like open() could fail to=20 deliver the expected SIGTRAP, which might break debugger functionality. > lslw #1,%d0 > jcs do_trace_exit > jmi do_delayed_trace --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260915-work-fd-re= serve-unify-folded-v1-0-4d5217d6b246@kernel.org?part=3D9