public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: David Howells <dhowells@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] asm-generic: {get,put}_user ptr argument evaluate only 1 time
Date: Wed, 22 Jul 2015 15:09:01 +0900	[thread overview]
Message-ID: <87lhe867wi.wl-ysato@users.sourceforge.jp> (raw)
In-Reply-To: <21799.1437487573@warthog.procyon.org.uk>

On Tue, 21 Jul 2015 23:06:13 +0900,
David Howells wrote:
> 
> Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> 
> >  #define get_user(x, ptr)					\
> >  ({								\
> > +	uintptr_t __uip = (uintptr_t)(ptr);			\
> 
> const?

OK.

> >  	might_fault();						\
> > -	access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ?		\
> > -		__get_user(x, ptr) :				\
> > +	access_ok(VERIFY_READ, __uip, sizeof(*ptr)) ?		\
> > +		__get_user((x), (__typeof__(*ptr) *)__uip) :	\
> >  		-EFAULT;					\
> >  })
> 
> Would it be better to use void* instead of uintptr_t?

No reason.
I'll changed void*

Thanks.

> David

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

  parent reply	other threads:[~2015-07-22  6:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16  5:15 [PATCH] asm-generic: {get,put}_user ptr argument evaluate only 1 time Yoshinori Sato
2015-07-16  5:15 ` Yoshinori Sato
2015-07-16  6:40 ` Geert Uytterhoeven
2015-07-16  6:40   ` Geert Uytterhoeven
2015-07-16 13:33   ` Yoshinori Sato
2015-07-16 14:15 ` Arnd Bergmann
2015-07-17  3:27   ` Yoshinori Sato
2015-07-16 14:16 ` [PATCH v2] " Yoshinori Sato
2015-07-21  6:14 ` [PATCH v3] " Yoshinori Sato
2015-07-21 14:06   ` David Howells
2015-07-21 14:06     ` David Howells
2015-07-22  6:09     ` Yoshinori Sato [this message]
2015-07-22 14:52 ` [PATCH v4] " Yoshinori Sato
2015-07-22 22:24   ` David Howells
2015-07-22 22:24     ` David Howells
2015-07-23 17:55 ` [PATCH v5] " Yoshinori Sato

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=87lhe867wi.wl-ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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