From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (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 8B1D24A2E2E for ; Tue, 15 Sep 2026 11:59:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.4.254 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789473599; cv=none; b=YvwkRI2jKj/qdznQqgqrv53l7eEVmyRAZedQLZXe26aRptFFGVpXy6FloeZHjMc1C1wtpLaOyJ3n2X1JlktnEeaCbuKIxKUZ54RBX7wtC4cdALPt8zIbAik3CmGdHNWHZEZ85ylJHu0gNiCirUXtBf/9KoVxZfyst/CzmQFmrfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789473599; c=relaxed/simple; bh=LV6KjSBSCoMl1BpNEbGW5jNdELn3H1EoTm8/n0WGG8s=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=mHOe3GF0osusjEUE3BzgxktsvAndQpZiphfe3hET8dxIB2dSJ/5Gq5A8ezFmpgGnMdS8pazvV+ZqAC84lMtUZTSXDn5v9QbdKzfCKAdl1MZSmdZEClG7zP1geSsnun5QF8Mx+4mDbcix6bkVg/Rm7OTrD/T2ywz6bZ9CJNl5TGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LuDfDBIp; arc=none smtp.client-ip=172.105.4.254 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LuDfDBIp" Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 9A98B602BE; Tue, 15 Sep 2026 11:59:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B93C1F00893; Tue, 15 Sep 2026 11:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789473596; bh=XROzleDAWNHKip4xHBVteIb0cCuN7FAQoMQU9zewp/g=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LuDfDBIpgc+rUudqugD7YWLMIYTyPSh1djqeFTSZvIqwl+MCFr2F9Jod5sQ3BdeBH Fs4P2kaC4Rq/e2WctPCUaANEEugIP/+ZEAefkQjg3r930Bx3+wPmgnd43osNu5U8C9 EyuNiUbu78gNfTdrTeVFFD2nhC1r5SHLm94AIfGff4/9p19OhtUCSOkAUYL8ijEd9H l9DN/Fa9wQdaggqiklG21wysLrbu7J9tNRHYcAgnuhIFYUQdGWbvPhv23a8BBnteix dj3Dz8036WkGhtwkv8ziLkCVxCa1RZBk5Y1nQhcVea1ZYeF0cF/u11/S008mj3HeiR /EId/I6+w1CIA== From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC POC 05/50] ARM: commit fds on syscall exit Reply-To: sashiko-reviews@lists.linux.dev To: "Christian Brauner" , "Linus Torvalds" Cc: linux-um@lists.infradead.org, linux-openrisc@vger.kernel.org, "Michael S. Tsirkin" , "Peter Zijlstra" , bpf@vger.kernel.org, linux-csky@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-gpio@vger.kernel.org, "Eugenio Perez" , virtualization@lists.linux.dev, "Jan Kara" , "Oleg Nesterov" , linux-hyperv@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-alpha@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-snps-arc@lists.infradead.org, linux-parisc@vger.kernel.org, io-uring@vger.kernel.org, "Ingo Molnar" , kvm@vger.kernel.org, "Jens Axboe" , "David Airlie" , linuxppc-dev@lists.ozlabs.org, "Alexander Viro" , "Jann Horn" , linux-sh@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?b?Q2hyaXN0aWFuIEJyYXVuZXIgKEFtdXRhYmxlKQ==?= , kexec@lists.infradead.org In-Reply-To: <20260915-work-fd-reserve-unify-folded-v1-5-4d5217d6b246@kernel.org> References: <20260915-work-fd-reserve-unify-folded-v1-0-4d5217d6b246@kernel.org> <20260915-work-fd-reserve-unify-folded-v1-5-4d5217d6b246@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 15 Sep 2026 11:59:54 +0000 Message-Id: <20260915115954.7B93C1F00893@smtp.kernel.org> Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] arm: redundant TIF_FD_SLOTS check due to bit-shift overlap -- commit bdf52635177f575c1b58cdb7e902386551a36647 Author: Christian Brauner ARM: commit fds on syscall exit Add TIF_FD_SLOTS and test it where the syscall return path decides between the syscall work and the plain work pending slow path. A task that reserved descriptors goes through __sys_trace_return_nosave where syscall_trace_exit() commits them before audit and the ptrace exit stop. > diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-commo= n.S > index 88336a1292bb7..59a70d90b0b61 100644 > --- a/arch/arm/kernel/entry-common.S > +++ b/arch/arm/kernel/entry-common.S [ ... ] > @@ -83,6 +83,8 @@ ENDPROC(ret_fast_syscall) > =20 > tst r1, #_TIF_SYSCALL_WORK > bne __sys_trace_return_nosave > + tst r1, #(_TIF_FD_SLOTS << 16) @ r1 holds TI_FLAGS << 16 > + bne __sys_trace_return_nosave [Severity: Low] Is this newly added check reachable? The preceding tst r1, #_TIF_SYSCALL_WORK instruction appears to intercept the branch because it inadvertently catches this condition. In ret_fast_syscall, r1 is loaded with TI_FLAGS << 16. TIF_FD_SLOTS is bit 5, so shifting it by 16 places it at bit 21 in r1. _TIF_SYSCALL_WORK naturally includes bit 21 (_TIF_SYSCALL_AUDIT). Because of this bit-shift overlap, the first test against _TIF_SYSCALL_WORK will evaluate to non-zero whenever TIF_FD_SLOTS is set. This means the branch to __sys_trace_return_nosave is taken early, making the new tst instruction unreachable dead code. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260915-work-fd-re= serve-unify-folded-v1-0-4d5217d6b246@kernel.org?part=3D5