From: Arnd Bergmann <arnd@arndb.de>
To: Anders Kaseorg <andersk@mit.edu>
Cc: Arun Sharma <arun.sharma@intel.com>,
"David S. Miller" <davem@nuts.davemloft.net>,
linux-arch@vger.kernel.org, tony.luck@intel.com
Subject: Re: __get_user_unaligned return value
Date: Sun, 14 Jun 2009 21:44:23 +0200 [thread overview]
Message-ID: <200906142144.24487.arnd@arndb.de> (raw)
In-Reply-To: <alpine.DEB.2.00.0906141211590.24169@vinegar-pot.mit.edu>
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 <><
parent reply other threads:[~2009-06-14 19:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <alpine.DEB.2.00.0906141211590.24169@vinegar-pot.mit.edu>]
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=200906142144.24487.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=andersk@mit.edu \
--cc=arun.sharma@intel.com \
--cc=davem@nuts.davemloft.net \
--cc=linux-arch@vger.kernel.org \
--cc=tony.luck@intel.com \
/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 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.