* Re: __get_user_unaligned return value
[not found] <alpine.DEB.2.00.0906141211590.24169@vinegar-pot.mit.edu>
@ 2009-06-14 19:44 ` Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2009-06-14 19:44 UTC (permalink / raw)
To: Anders Kaseorg; +Cc: Arun Sharma, David S. Miller, linux-arch, tony.luck
On Sunday 14 June 2009, Anders Kaseorg wrote:
> The __get_user_unaligned macro in include/asm/uaccess-unaligned.h returns
> the wrong value, since the ? -EFAULT : 0 is not on the last line of the
> statement expression:
>
> #define __get_user_unaligned(x, ptr) \
> ({ \
> __typeof__ (*(ptr)) __x; \
> __copy_from_user(&__x, (ptr), sizeof(*(ptr))) ? -EFAULT : 0; \
> (x) = __x; \
> })
>
> I couldn’t find any callers, so I’m not sure whether the macro should be
> patched or just removed.
Not sure either. __put_user_unaligned() still only has the one user that
Arun added back in 2.6.9, and I don't think we ever added any code that used
__get_user_unaligned(). That bug would probably have been noticed.
Even __put_user_unaligned only matters on ia64, because the only user of
that function is actually accessing aligned data on everything besides
x86-64 and ia64, and x86-64 does not even care.
I'm tempted to just rip out both _unaligned functions and to add a new
put_user_compat_u64() on ia64, and put a default into include/linux/uaccess.h
that just calls put_user() for everyone else.
Arnd <><
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-14 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alpine.DEB.2.00.0906141211590.24169@vinegar-pot.mit.edu>
2009-06-14 19:44 ` __get_user_unaligned return value Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.