]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
uaccess: fix nios2 and microblaze get_user_8()
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Feb 2022 14:37:37 +0000 (15:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:49 +0000 (13:57 +0200)
commit1188d8b12956eb03dab387d379971c13920907dc
tree32eb2a36d1d65639190622e41db5bbfe8a1da148
parentcae6a6bd99561f9994088eea3343fb672a663123
uaccess: fix nios2 and microblaze get_user_8()

[ Upstream commit a97b693c3712f040c5802f32b2d685352e08cefa ]

These two architectures implement 8-byte get_user() through
a memcpy() into a four-byte variable, which won't fit.

Use a temporary 64-bit variable instead here, and use a double
cast the way that risc-v and openrisc do to avoid compile-time
warnings.

Fixes: 6a090e97972d ("arch/microblaze: support get_user() of size 8 bytes")
Fixes: 5ccc6af5e88e ("nios2: Memory management")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/microblaze/include/asm/uaccess.h
arch/nios2/include/asm/uaccess.h