<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/asm-generic/uaccess.h, branch v3.10.97</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.97</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.10.97'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-02-11T14:30:32Z</updated>
<entry>
<title>asm-generic: uaccess: Allow arches to over-ride __{get,put}_user_fn()</title>
<updated>2013-02-11T14:30:32Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-01-18T09:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=05d88a493746819821733e07bed918a6e09f735b'/>
<id>urn:sha1:05d88a493746819821733e07bed918a6e09f735b</id>
<content type='text'>
As of now these default to calling the arch provided __copy_{to,from}_user()
routines which being general purpose (w.r.t buffer alignment and lengths)
would lead to alignment checks in generated code (for arches which don't
support unaligned load/stores).

Given that in this case we already know that data involved is "unit"
sized and aligned, using the vanilla copy backend is a bit wasteful.

This change thus allows arches to over-ride the aforementioned routines.

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic headers: uaccess.h to conditionally define segment_eq()</title>
<updated>2013-02-11T14:30:31Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-01-18T09:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10a6007bda48e3524e24ce1ad46dc7be1add6a0e'/>
<id>urn:sha1:10a6007bda48e3524e24ce1ad46dc7be1add6a0e</id>
<content type='text'>
This is because mm_segment_t is exported by arch code, while seqment_eq
assumes it will have .seg element.

Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>fix default __strnlen_user macro</title>
<updated>2011-10-06T23:47:12Z</updated>
<author>
<name>Mark Salter</name>
<email>msalter@redhat.com</email>
</author>
<published>2011-10-04T13:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=830f5800acae17b972d264ab65fe54a7f10c1d82'/>
<id>urn:sha1:830f5800acae17b972d264ab65fe54a7f10c1d82</id>
<content type='text'>
The existing __strnlen_user macro simply resolved to strnlen. However, the
count returned by strnlen_user should include the NULL byte. This patch
fixes the __strnlen_user macro to include the NULL byte in the count.

Signed-off-by: Mark Salter &lt;msalter@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic headers: add arch-specific __strnlen_user calling in uaccess.h</title>
<updated>2011-03-17T01:19:05Z</updated>
<author>
<name>GuanXuetao</name>
<email>gxt@mprc.pku.edu.cn</email>
</author>
<published>2011-01-15T10:08:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7f509a9ef7af0d6ac852d49eb87ed2b9857821cc'/>
<id>urn:sha1:7f509a9ef7af0d6ac852d49eb87ed2b9857821cc</id>
<content type='text'>
This patch changes the implementation of strnlen_user in include/asm-generic/uaccess.h.
Originally, it calls strlen() function directly, which may not correctly handle the access of
user space in most mmu-enabled architectures.
New __strnlen_user is added for using as an architecture specific function.

Signed-off-by: Guan Xuetao &lt;gxt@mprc.pku.edu.cn&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic: uaccess: fix up local access_ok() usage</title>
<updated>2009-06-19T12:58:08Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2009-06-14T06:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a9ede5b355aabd667ed690f858c925a23927027b'/>
<id>urn:sha1:a9ede5b355aabd667ed690f858c925a23927027b</id>
<content type='text'>
There's no reason that I can see to use the short __access_ok() form
directly when the access_ok() is clearer in intent and for most people,
expands to the same C code (i.e. always specify the first field -- access
type).  Not all no-mmu systems lack memory protection, so the read/write
could feasibly be checked.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic: uaccess: add missing access_ok() check to strnlen_user()</title>
<updated>2009-06-19T12:58:07Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2009-06-14T06:00:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9844813f226f6d07e1544e915529cb88f4fcb868'/>
<id>urn:sha1:9844813f226f6d07e1544e915529cb88f4fcb868</id>
<content type='text'>
The strnlen_user() function was missing a access_ok() check on the pointer
given.  We've had cases on Blackfin systems where test programs caused
kernel crashes here because userspace passed up a NULL/-1 pointer and the
kernel gladly attempted to run strlen() on it.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic: add a generic uaccess.h</title>
<updated>2009-06-11T19:02:50Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2009-05-13T22:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eed417ddd52146f446595b5a7d8f21b1814b95b7'/>
<id>urn:sha1:eed417ddd52146f446595b5a7d8f21b1814b95b7</id>
<content type='text'>
Based on discussions with Michal Simek and code
from m68knommu and h8300, this version of uaccess.h
should be usable by most architectures, by overriding
some parts of it.

Simple NOMMU architectures can use it out of
the box, but a minimal __access_ok() should be
added there as well.

Cc: Michal Simek &lt;monstr@monstr.eu&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic: rename page.h and uaccess.h</title>
<updated>2009-06-11T19:02:17Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2009-05-13T22:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5b17e1cd8928ae65932758ce6478ac6d3e9a86b2'/>
<id>urn:sha1:5b17e1cd8928ae65932758ce6478ac6d3e9a86b2</id>
<content type='text'>
The current asm-generic/page.h only contains the get_order
function, and asm-generic/uaccess.h only implements
unaligned accesses. This renames the file to getorder.h
and uaccess-unaligned.h to make room for new page.h
and uaccess.h file that will be usable by all simple
(e.g. nommu) architectures.

Signed-off-by: Remis Lima Baima &lt;remis.developer@googlemail.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>[UACCESS]: Fix typo in generic __get_user_unaligned().</title>
<updated>2004-08-27T06:45:44Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@nuts.davemloft.net</email>
</author>
<published>2004-08-27T06:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=926c137ba55da581d091ff4c91d51357ee3af8f1'/>
<id>urn:sha1:926c137ba55da581d091ff4c91d51357ee3af8f1</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@redhat.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix copying of unaligned data across user/kernel boundary</title>
<updated>2004-08-27T03:43:14Z</updated>
<author>
<name>Arun Sharma</name>
<email>arun.sharma@intel.com</email>
</author>
<published>2004-08-27T03:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce18373907856aedaa6251ff3cdd1340ee4af29a'/>
<id>urn:sha1:ce18373907856aedaa6251ff3cdd1340ee4af29a</id>
<content type='text'>
32 bit compatibility code sometimes needs to copy unaligned data across
kernel/user boundary and currently there is no architecture independent API
to do it.

(1) Introduce new APIs __{get,put}_user_unaligned. These APIs are
    necessary because the optimal way to copy unaligned data across
    kernel/user boundary is different on different architectures.
    Some architectures don't even care about alignment.
    On some __put_user is faster than __copy_to_user for small sizes.
(2) Optimize __{get,put}_user_unaligned for ia64, x86-64, s390, ppc64.
(3) Fix compat_filldir64() which is broken on big-endian machines

Thanks to Arnd Bergmann &lt;arnd@arndb.de&gt; for his help.

Signed-off-by: Gordon Jin &lt;gordon.jin@intel.com&gt;
Signed-off-by: Arun Sharma &lt;arun.sharma@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
