mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Christoph Hellwig' <hch@lst.de>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 2/3] MIPS: uaccess: Remove get_fs/set_fs call sites
Date: Tue, 30 Mar 2021 22:10:13 +0000	[thread overview]
Message-ID: <5d1aa493b9e7441194677855de560544@AcuMS.aculab.com> (raw)
In-Reply-To: <20210330174943.GB15145@lst.de>

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)


  parent reply	other threads:[~2021-03-30 22:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 17:26 [PATCH 0/3] MIPS: Remove get_fs/set_fs Thomas Bogendoerfer
2021-03-30 17:26 ` [PATCH 1/3] MIPS: uaccess: Added __get/__put_kernel_nofault Thomas Bogendoerfer
2021-03-30 17:48   ` Christoph Hellwig
2021-03-30 20:02     ` Thomas Bogendoerfer
2021-03-30 17:26 ` [PATCH 2/3] MIPS: uaccess: Remove get_fs/set_fs call sites Thomas Bogendoerfer
2021-03-30 17:49   ` Christoph Hellwig
2021-03-30 20:02     ` Thomas Bogendoerfer
2021-03-30 22:10     ` David Laight [this message]
2021-03-30 17:27 ` [PATCH 3/3] MIPS: Remove get_fs/set_fs Thomas Bogendoerfer
2021-03-30 17:54   ` Christoph Hellwig
2021-03-31 11:41     ` Thomas Bogendoerfer
2021-03-31  1:38   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d1aa493b9e7441194677855de560544@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®