lkml.org 
[lkml]   [2015]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] asm-generic: {get,put}_user ptr argument evaluate only 1 time
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>


\
 
 \ /
  Last update: 2015-07-22 08:21    [W:0.057 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site