[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200722080724.GB26864@lst.de>
Date: Wed, 22 Jul 2020 10:07:24 +0200
From: 'Christoph Hellwig' <hch@....de>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Christoph Hellwig' <hch@....de>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Eric Dumazet <edumazet@...gle.com>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
"coreteam@...filter.org" <coreteam@...filter.org>,
"linux-sctp@...r.kernel.org" <linux-sctp@...r.kernel.org>,
"linux-hams@...r.kernel.org" <linux-hams@...r.kernel.org>,
"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"bridge@...ts.linux-foundation.org"
<bridge@...ts.linux-foundation.org>,
"linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
"dccp@...r.kernel.org" <dccp@...r.kernel.org>,
"linux-decnet-user@...ts.sourceforge.net"
<linux-decnet-user@...ts.sourceforge.net>,
"linux-wpan@...r.kernel.org" <linux-wpan@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"mptcp@...ts.01.org" <mptcp@...ts.01.org>,
"lvs-devel@...r.kernel.org" <lvs-devel@...r.kernel.org>,
"rds-devel@....oracle.com" <rds-devel@....oracle.com>,
"linux-afs@...ts.infradead.org" <linux-afs@...ts.infradead.org>,
"tipc-discussion@...ts.sourceforge.net"
<tipc-discussion@...ts.sourceforge.net>,
"linux-x25@...r.kernel.org" <linux-x25@...r.kernel.org>
Subject: Re: get rid of the address_space override in setsockopt
On Tue, Jul 21, 2020 at 10:26:58AM +0000, David Laight wrote:
> From: Christoph Hellwig
> > Sent: 20 July 2020 13:47
> >
> > setsockopt is the last place in architecture-independ code that still
> > uses set_fs to force the uaccess routines to operate on kernel pointers.
> >
> > This series adds a new sockptr_t type that can contained either a kernel
> > or user pointer, and which has accessors that do the right thing, and
> > then uses it for setsockopt, starting by refactoring some low-level
> > helpers and moving them over to it before finally doing the main
> > setsockopt method.
>
> Another 'gotcha' ...
>
> On an least some architectures (possibly only m68k) IIRC all structures
> are actually passed by reference.
> (This used to be true for sparc - but it may have changed in the
> last 30 years.)
Tough luck for ABIs wit suboptimal calling conventions. At least we can
do the right thing for those that do not have the problem.
Powered by blists - more mailing lists