Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag
- To: Christoph Hellwig <hch@lst.de>, Benjamin Coddington <bcodding@redhat.com>
- Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Reisner <philipp.reisner@linbit.com>, Lars Ellenberg <lars.ellenberg@linbit.com>, Christoph Böhmwalder <christoph.boehmwalder@linbit.com>, Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>, Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>, Lee Duncan <lduncan@suse.com>, Chris Leech <cleech@redhat.com>, Mike Christie <michael.christie@oracle.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Valentina Manea <valentina.manea.m@gmail.com>, Shuah Khan <shuah@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, David Howells <dhowells@redhat.com>, Marc Dionne <marc.dionne@auristor.com>, Steve French <sfrench@samba.org>, Christine Caulfield <ccaulfie@redhat.com>, David Teigland <teigland@redhat.com>, Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>, Joseph Qi <joseph.qi@linux.alibaba.com>, Eric Van Hensbergen <ericvh@gmail.com>, Latchesar Ionkov <lucho@ionkov.net>, Dominique Martinet <asmadeus@codewreck.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Ilya Dryomov <idryomov@gmail.com>, Xiubo Li <xiubli@redhat.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, Chuck Lever <chuck.lever@oracle.com>, 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
- Subject: Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag
- From: Jeff Layton <jlayton@kernel.org>
- Date: Tue, 29 Nov 2022 12:42:33 -0500
- Message-id: <[🔎] d0a8f7a5e307e201926ae8e80d629da10c706a91.camel@kernel.org>
- In-reply-to: <[🔎] 20221129140242.GA15747@lst.de>
- References: <cover.1669036433.git.bcodding@redhat.com> <c2ec184226acd21a191ccc1aa46a1d7e43ca7104.1669036433.git.bcodding@redhat.com> <[🔎] 20221129140242.GA15747@lst.de>
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...
--
Jeff Layton <jlayton@kernel.org>
Reply to: