<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/microblaze/include/asm/uaccess.h, branch v3.6.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>microblaze: mm: Fix lowmem max memory size limits</title>
<updated>2012-03-23T08:28:10+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2011-12-19T12:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=83a92529c1789f86481190743a6bb09f31ec39a8'/>
<id>83a92529c1789f86481190743a6bb09f31ec39a8</id>
<content type='text'>
Use CONFIG_LOWMEM_SIZE if system has larger ram size.
For system with larger ram size, enable HIGMEM support.

Also setup limitation for memblock and use memblock
allocation in lowmem region.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use CONFIG_LOWMEM_SIZE if system has larger ram size.
For system with larger ram size, enable HIGMEM support.

Also setup limitation for memblock and use memblock
allocation in lowmem region.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: Fix access_ok macro</title>
<updated>2011-10-14T10:24:27+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2011-07-28T13:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41b7602ed17a6bbb3b3d33087c39ef5c3a5589c7'/>
<id>41b7602ed17a6bbb3b3d33087c39ef5c3a5589c7</id>
<content type='text'>
There is the problem with bit OR (|) because for
some combination is addr | size | addr+size equal
to seq.

For standard kernel setting (kernel starts at 0xC0000000)
is seq for user space 0xBFFFFFFF and everything below
this limit is fine.

But even address 0xBFFFFFFF is fine because it
is below kernel space.

Signed-off-by: Andrew Fedonczuk &lt;andrew.fedonczuk@ericsson.com&gt;
Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is the problem with bit OR (|) because for
some combination is addr | size | addr+size equal
to seq.

For standard kernel setting (kernel starts at 0xC0000000)
is seq for user space 0xBFFFFFFF and everything below
this limit is fine.

But even address 0xBFFFFFFF is fine because it
is below kernel space.

Signed-off-by: Andrew Fedonczuk &lt;andrew.fedonczuk@ericsson.com&gt;
Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: Fix /dev/zero corruption from __clear_user()</title>
<updated>2011-03-09T07:09:59+00:00</updated>
<author>
<name>Steven J. Magnani</name>
<email>steve@digidescorp.com</email>
</author>
<published>2011-02-10T18:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f3946b421395ff853bc0bcdab9c26b50ebbba8f'/>
<id>6f3946b421395ff853bc0bcdab9c26b50ebbba8f</id>
<content type='text'>
A userland read of more than PAGE_SIZE bytes from /dev/zero results in
(a) not all of the bytes returned being zero, and
(b) memory corruption due to zeroing of bytes beyond the user buffer.

This is caused by improper constraints on the assembly __clear_user function.
The constrints don't indicate to the compiler that the pointer argument is
modified. Since the function is inline, this results in double-incrementing
of the pointer when __clear_user() is invoked through a multi-page read() of
/dev/zero.

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
CC: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A userland read of more than PAGE_SIZE bytes from /dev/zero results in
(a) not all of the bytes returned being zero, and
(b) memory corruption due to zeroing of bytes beyond the user buffer.

This is caused by improper constraints on the assembly __clear_user function.
The constrints don't indicate to the compiler that the pointer argument is
modified. Since the function is inline, this results in double-incrementing
of the pointer when __clear_user() is invoked through a multi-page read() of
/dev/zero.

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
CC: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: Fix __copy_to/from_user_inatomic macros</title>
<updated>2010-08-02T08:44:03+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-05-20T08:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d7ec6ee59e78140bf01c7d0d009ea39ab6b3b59'/>
<id>8d7ec6ee59e78140bf01c7d0d009ea39ab6b3b59</id>
<content type='text'>
__copy_to/from_user_inatomic should call __copy_to/from_user
because there is not necessary to check access because of kernel function.

might_sleep in copy_to/from_user macros is causing problems
in debug sessions too (CONFIG_DEBUG_SPINLOCK_SLEEP).

BUG: sleeping function called from invalid context at
.../arch/microblaze/include/asm/uaccess.h:388
in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper
1 lock held by swapper/1:
 #0:  (&amp;p-&gt;cred_guard_mutex){......}, at: [&lt;c00d4b90&gt;] prepare_bprm_creds+0x2c/0x88
Kernel Stack:
...

Call Trace:
[&lt;c0006bd4&gt;] microblaze_unwind+0x7c/0x94
[&lt;c0006684&gt;] show_stack+0xf4/0x190
[&lt;c0006730&gt;] dump_stack+0x10/0x30
[&lt;c00103a0&gt;] __might_sleep+0x12c/0x160
[&lt;c0090de4&gt;] file_read_actor+0x1d8/0x2a8
[&lt;c0091568&gt;] generic_file_aio_read+0x6b4/0xa64
[&lt;c00cd778&gt;] do_sync_read+0xac/0x110
[&lt;c00ce254&gt;] vfs_read+0xc8/0x160
[&lt;c00d585c&gt;] kernel_read+0x38/0x64
[&lt;c00d5984&gt;] prepare_binprm+0xfc/0x130
[&lt;c00d6430&gt;] do_execve+0x228/0x370
[&lt;c000614c&gt;] microblaze_execve+0x58/0xa4

caused by file_read_actor (mm/filemap.c) which calls
__copy_to_user_inatomic.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__copy_to/from_user_inatomic should call __copy_to/from_user
because there is not necessary to check access because of kernel function.

might_sleep in copy_to/from_user macros is causing problems
in debug sessions too (CONFIG_DEBUG_SPINLOCK_SLEEP).

BUG: sleeping function called from invalid context at
.../arch/microblaze/include/asm/uaccess.h:388
in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper
1 lock held by swapper/1:
 #0:  (&amp;p-&gt;cred_guard_mutex){......}, at: [&lt;c00d4b90&gt;] prepare_bprm_creds+0x2c/0x88
Kernel Stack:
...

Call Trace:
[&lt;c0006bd4&gt;] microblaze_unwind+0x7c/0x94
[&lt;c0006684&gt;] show_stack+0xf4/0x190
[&lt;c0006730&gt;] dump_stack+0x10/0x30
[&lt;c00103a0&gt;] __might_sleep+0x12c/0x160
[&lt;c0090de4&gt;] file_read_actor+0x1d8/0x2a8
[&lt;c0091568&gt;] generic_file_aio_read+0x6b4/0xa64
[&lt;c00cd778&gt;] do_sync_read+0xac/0x110
[&lt;c00ce254&gt;] vfs_read+0xc8/0x160
[&lt;c00d585c&gt;] kernel_read+0x38/0x64
[&lt;c00d5984&gt;] prepare_binprm+0xfc/0x130
[&lt;c00d6430&gt;] do_execve+0x228/0x370
[&lt;c000614c&gt;] microblaze_execve+0x58/0xa4

caused by file_read_actor (mm/filemap.c) which calls
__copy_to_user_inatomic.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: fix get_user/put_user side-effects</title>
<updated>2010-05-13T07:21:14+00:00</updated>
<author>
<name>Steven J. Magnani</name>
<email>steve@digidescorp.com</email>
</author>
<published>2010-05-06T21:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=538722ca3b762023ac65cec214901a1ebff8b575'/>
<id>538722ca3b762023ac65cec214901a1ebff8b575</id>
<content type='text'>
The Microblaze implementations of get_user() and (MMU) put_user() evaluate
the address argument more than once. This causes unexpected side-effects for
invocations that include increment operators, i.e. get_user(foo, bar++).

This patch also removes the distinction between MMU and noMMU put_user().

Without the patch:
  $ echo 1234567890 &gt; /proc/sys/kernel/core_pattern
  $ cat /proc/sys/kernel/core_pattern
  12345

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Microblaze implementations of get_user() and (MMU) put_user() evaluate
the address argument more than once. This causes unexpected side-effects for
invocations that include increment operators, i.e. get_user(foo, bar++).

This patch also removes the distinction between MMU and noMMU put_user().

Without the patch:
  $ echo 1234567890 &gt; /proc/sys/kernel/core_pattern
  $ cat /proc/sys/kernel/core_pattern
  12345

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: uaccess: Sync strlen, strnlen, copy_to/from_user</title>
<updated>2010-04-01T06:38:23+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-03-22T17:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=89ae9753aef160c2f7bcecec21a7c4a6bc4c9b9b'/>
<id>89ae9753aef160c2f7bcecec21a7c4a6bc4c9b9b</id>
<content type='text'>
Last sync.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Last sync.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: uaccess: Unify __copy_tofrom_user</title>
<updated>2010-04-01T06:38:22+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-03-22T17:39:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94804a9b3d0e62096a52fb62afcea32b899380c5'/>
<id>94804a9b3d0e62096a52fb62afcea32b899380c5</id>
<content type='text'>
Move to generic location.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move to generic location.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: uaccess: Move functions to generic location</title>
<updated>2010-04-01T06:38:22+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-03-22T17:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cca79120c253451220e589a104bdeb57e4901871'/>
<id>cca79120c253451220e589a104bdeb57e4901871</id>
<content type='text'>
noMMU and MMU use them.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
noMMU and MMU use them.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: uaccess: Fix put_user for noMMU</title>
<updated>2010-04-01T06:38:22+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-03-22T15:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef4e277b5d86e56db650137de0b1cd16ded32498'/>
<id>ef4e277b5d86e56db650137de0b1cd16ded32498</id>
<content type='text'>
Here is small regression on dhrystone tests and I think
that on all benchmarking tests. It is due to better checking
mechanism in put_user macro

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Here is small regression on dhrystone tests and I think
that on all benchmarking tests. It is due to better checking
mechanism in put_user macro

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>microblaze: uaccess: Fix get_user macro for noMMU</title>
<updated>2010-04-01T06:38:22+00:00</updated>
<author>
<name>Michal Simek</name>
<email>monstr@monstr.eu</email>
</author>
<published>2010-03-08T09:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3a6d77245efe062993284fd1c2f7510d9a90efe1'/>
<id>3a6d77245efe062993284fd1c2f7510d9a90efe1</id>
<content type='text'>
Use unified version.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use unified version.

Signed-off-by: Michal Simek &lt;monstr@monstr.eu&gt;
</pre>
</div>
</content>
</entry>
</feed>
