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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26244C4332F for ; Tue, 29 Nov 2022 17:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236674AbiK2Rmp (ORCPT ); Tue, 29 Nov 2022 12:42:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236679AbiK2Rmn (ORCPT ); Tue, 29 Nov 2022 12:42:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBF521901F; Tue, 29 Nov 2022 09:42:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 95822B8129E; Tue, 29 Nov 2022 17:42:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88D66C433C1; Tue, 29 Nov 2022 17:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669743759; bh=3+jgbqIH2MJTIsVHlcxt6FoqC9JTTWJi5HGZCaZxgug=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=QUm6mA5J8FMakXMYs9TxR1saaYz2xtuB1WQ4vJJERTQPls5BaIPHVnOKz8jZIo9kT XulObDx1A347icJCI3BmL1Pf+V0Y6vDE7c7GJVgCQGxPvlvdctmnzKGaymxCYNMyXQ dKw/DfIH615h0CSbluMrGHtANR4WOUzVKajaI/Lk7UG43sRTDV3681zTOgmNB5PA42 4z8cYl3L4lhD0Mvd0OcboC2hB3hl3nwz3MNA3jwsaSJnlHZe8k2mACwlMT6PMRhQUD 9V/1JVeknQRJ/G2/votnmVuu78OlhM7g7yW8UlJERa2tg+7VQlKisF3sYHT8GaId68 G+E9LkyPR/ygQ== Message-ID: Subject: Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag From: Jeff Layton To: Christoph Hellwig , Benjamin Coddington Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Reisner , Lars Ellenberg , Christoph =?ISO-8859-1?Q?B=F6hmwalder?= , Jens Axboe , Josef Bacik , Keith Busch , Sagi Grimberg , Lee Duncan , Chris Leech , Mike Christie , "James E.J. Bottomley" , "Martin K. Petersen" , Valentina Manea , Shuah Khan , Greg Kroah-Hartman , David Howells , Marc Dionne , Steve French , Christine Caulfield , David Teigland , Mark Fasheh , Joel Becker , Joseph Qi , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ilya Dryomov , Xiubo Li , Trond Myklebust , Anna Schumaker , Chuck Lever , drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, nbd@other.debian.org, linux-nvme@lists.infradead.org, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org Date: Tue, 29 Nov 2022 12:42:33 -0500 In-Reply-To: <20221129140242.GA15747@lst.de> References: <20221129140242.GA15747@lst.de> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.1 (3.46.1-1.fc37) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org On Tue, 2022-11-29 at 15:02 +0100, Christoph Hellwig wrote: > Hmm. Having to set a flag to not accidentally corrupt per-task > state seems a bit fragile. Wouldn't it make sense to find a way to opt > into the feature only for sockets created from the syscall layer? I agree that that would be cleaner. task_frag should have been an opt-in thing all along. That change regressed all of the in-kernel users of sockets. Where would be the right place to set that flag for only userland sockets? A lot of the in-kernel socket users hook into the socket API at a fairly high-level. 9P and CIFS, for instance, call __sock_create. We could set it in the syscall handlers (and maybe in iouring) I suppose, but that seems like the wrong thing to do too. In the absence of a clean place to do this, I think we're going to be stuck doing it the way Ben has proposed... --=20 Jeff Layton