Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f3946b4 authored by Steven J. Magnani's avatar Steven J. Magnani Committed by Michal Simek
Browse files

microblaze: Fix /dev/zero corruption from __clear_user()



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: default avatarSteven J. Magnani <steve@digidescorp.com>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
CC: stable@kernel.org
parent 6f205a4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment