From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 04/26] net: add a new sockptr_t type Date: Thu, 23 Jul 2020 18:44:32 +0200 Message-ID: <20200723164432.GA20917@lst.de> References: <20200723060908.50081-1-hch@lst.de> <20200723060908.50081-5-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from verein.lst.de ([213.95.11.211]:60887 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726621AbgGWQoi (ORCPT ); Thu, 23 Jul 2020 12:44:38 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-can-owner@vger.kernel.org List-ID: To: Eric Dumazet Cc: Christoph Hellwig , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Alexey Kuznetsov , Hideaki YOSHIFUJI , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , LKML , netdev , bpf , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-sctp@vger.kernel.org, linux-hams@vger.kernel.org, linux-bluetooth@vger.kernel.org, bridge@lists.linux-foundation.org, linux-can@vger.kernel.org, dccp@vger.kernel.org, linux-decnet-user@lists.sourceforge.net, linux-wpan@vger.kernel.org, linux-s390@vger.ker On Thu, Jul 23, 2020 at 09:40:27AM -0700, Eric Dumazet wrote: > I am not sure why you chose sockptr_t for something that really seems generic. > > Or is it really meant to be exclusive to setsockopt() and/or getsockopt() ? > > If the first user of this had been futex code, we would have used > futexptr_t, I guess. It was originally intended to be generic and called uptr_t, based on me misunderstanding that Linus wanted a file operation for it, which he absolutely didn't and hate with passion. So the plan is to only use it for setsockopt for now, although there are some arguments for also using it in sendmsg/recvmsg. There is no need to use it for getsockopt.