[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d1aa493b9e7441194677855de560544@AcuMS.aculab.com>
Date: Tue, 30 Mar 2021 22:10:13 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Christoph Hellwig' <hch@....de>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>
CC: "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/3] MIPS: uaccess: Remove get_fs/set_fs call sites
From: Christoph Hellwig
> Sent: 30 March 2021 18:50
>
> On Tue, Mar 30, 2021 at 07:26:59PM +0200, Thomas Bogendoerfer wrote:
> > +#define __get_data(x, ptr, u) \
> > + (((u) == true) ? __get_udata((x), (ptr), sizeof(*(ptr))) : \
> > + __get_kdata((x), (ptr), sizeof(*(ptr))))
> > +
>
> I'm a little worried about exposing this in uaccess.h. Can you
> have local helpers insted, preferably strongly typed for their
> specific use cases?
For things that aren't performance critical it may be worth
using a structure that contains both a kernel and user address
(one of which will be NULL) and passing the offset as a separate
parameter.
(That might have been better for the socket option buffer.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists