| Message ID | 20260915-work-fd-reserve-unify-folded-v1-19-4d5217d6b246@kernel.org |
|---|---|
| State | New |
| Headers | show
Return-Path: <linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=tJOBIEX1; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Nmpj4NaF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hkfzr5nm9z1xwy for <incoming@patchwork.ozlabs.org>; Tue, 15 Sep 2026 21:34:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1qWL4T/NCLT+PbX8dwJZmdYASrFsuU5KQYrXgy0wKo4=; b=tJOBIEX1hopU5Q lC13e1Bh0H4oZhti85+aaCe+1STuUVTE/OUelWDeHOyUoOhp4dGbfOgTZPqkmc10sh4KxRQAtSWLQ 7QoM7cckBIt5NWOP5RgXQcW5CMR1ofuLhl//6oCqvteQy50ayMAqJ4k4cSEkwCdj/xdIWAxv33ONT EwfkQ/2r4t+GBQ0VAv/rPjYbM3sSmxCnuBZCf3hTcK2pnYu2a9WqKc7Io1z25djsuNKXTSuTWInT9 QF1vkpv7F317V9OxiDCtTgM55zmuptS4QXGXwOP1O34SwrPBmJi8mHYLqmuayWGFuDUBR93pgdz6U VG7zTcmQlHSNCrkOhFkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x6RQE-00000006A2t-2SSz; Tue, 15 Sep 2026 11:33:58 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x6RQ2-000000069lJ-3Uqb; Tue, 15 Sep 2026 11:33:46 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 88ED742A92; Tue, 15 Sep 2026 11:33:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32EB01F00898; Tue, 15 Sep 2026 11:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789472026; bh=fPUeEhZalZFbuqvBU8/iDG2tqjgIH/ueKLGrOGx0E/Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=Nmpj4NaFXMtUCUBJkK324vi22fpzvX6uomFULBZJOjhgDQCroZWI/8lb8hRAJVCHh 9EhYq/igSRVSJd0Z69cCAreFakLrT8v7g5ED2rGJFufV7eihjNzGDapElAJqkyWjpl lBXB4AtsKeIiuD1UD4coI3pcXNoLmTr78UlIqOkuglt9Hw0oChJkwnEGg4w0f6UJ0f E3lrRN0G+U0+0MXEDUccPLURv/tGCWrEtzl5wBa6tk79GG6qHRxEjmf3jJK1LMmPo3 /VFHB2tZrT068p2qgHGbLHusKwE8Tye3wqbBTFb6QOLjp++ERuzcM9sRPxtZnWLn1E KgqcMBfnsrMfA== From: Christian Brauner <brauner@kernel.org> Date: Tue, 15 Sep 2026 13:31:05 +0200 Subject: [PATCH RFC POC 19/50] file: require the syscall exit hook from every architecture MIME-Version: 1.0 Message-Id: <20260915-work-fd-reserve-unify-folded-v1-19-4d5217d6b246@kernel.org> References: <20260915-work-fd-reserve-unify-folded-v1-0-4d5217d6b246@kernel.org> In-Reply-To: <20260915-work-fd-reserve-unify-folded-v1-0-4d5217d6b246@kernel.org> To: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Jann Horn <jannh@google.com>, Jan Kara <jack@suse.cz>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oleg Nesterov <oleg@redhat.com>, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, bpf@vger.kernel.org, David Airlie <airlied@redhat.com>, virtualization@lists.linux.dev, kvm@vger.kernel.org, kexec@lists.infradead.org, linux-hyperv@vger.kernel.org, "Christian Brauner (Amutable)" <brauner@kernel.org> X-Mailer: b4 0.17-dev-db0b7 X-Developer-Signature: v=1; a=openpgp-sha256; l=1044; i=brauner@kernel.org; h=from:subject:message-id; bh=kO5/kQT0XZnIdRnIvngddyYIzT4ZNU9mDakuELDqlrQ=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMWSt1Kmt7K/PWBxqv33Jx9xZ93feiJvYXvn0wyGRJfor4 xvDgz5O7ChlYRDjYpAVU2RxaDcJl1vOU7HZKFMDZg4rE8gQBi5OAZjImo8M/0t6Hp5cOHfxxr5q 5ZTEWby+CmuzN2gtu/o25VNw3Kl5VQ8Z/ns2bzkbtn3/k1lfb3I0OE2bn/HePMr9P8+ZRZUPSuV nr+YCAA== X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors <linux-snps-arc.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-snps-arc>, <mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-snps-arc/> List-Post: <mailto:linux-snps-arc@lists.infradead.org> List-Help: <mailto:linux-snps-arc-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, <mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" <linux-snps-arc-bounces@lists.infradead.org> Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
| Series |
file: handle files on syscall exit
|
expand
|
> Every architecture now either uses the generic entry code or provides > TIF_FD_SLOTS. The fallback that deferred without ever committing > can go. Make it a build error instead. A new architecture can't grow > fd_prepare() callers without the syscall exit hook. > > Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org> Sashiko has reviewed this patch and found no issues. It looks great!
diff --git a/fs/file.c b/fs/file.c index 6fa481d63dcf..2b041b45f225 100644 --- a/fs/file.c +++ b/fs/file.c @@ -652,9 +652,7 @@ static void fd_release(unsigned int fd) #define fd_slots_set_work() set_thread_flag(TIF_FD_SLOTS) #define fd_slots_clear_work() clear_thread_flag(TIF_FD_SLOTS) #else -/* Nothing commits until the architecture provides the flag. */ -#define fd_slots_set_work() do { } while (0) -#define fd_slots_clear_work() do { } while (0) +#error "the syscall exit path must commit prepared file descriptors" #endif static struct fd_slot *fd_slot(struct fd_slots *slots, unsigned int idx)
Every architecture now either uses the generic entry code or provides TIF_FD_SLOTS. The fallback that deferred without ever committing can go. Make it a build error instead. A new architecture can't grow fd_prepare() callers without the syscall exit hook. Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org> --- fs/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)