2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-13 08:04:45 +08:00
linux-next/arch/metag/lib
James Hogan 2257211942 metag/usercopy: Fix alignment error checking
Fix the error checking of the alignment adjustment code in
raw_copy_from_user(), which mistakenly considers it safe to skip the
error check when aligning the source buffer on a 2 or 4 byte boundary.

If the destination buffer was unaligned it may have started to copy
using byte or word accesses, which could well be at the start of a new
(valid) source page. This would result in it appearing to have copied 1
or 2 bytes at the end of the first (invalid) page rather than none at
all.

Fixes: 373cd784d0 ("metag: Memory handling")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Cc: stable@vger.kernel.org
2017-04-05 14:49:36 +01:00
..
ashldi3.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
ashrdi3.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
checksum.c metag: move EXPORT_SYMBOL(csum_partial) to metag_ksyms.c 2013-07-04 10:00:02 +01:00
clear_page.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
cmpdi2.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
copy_page.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
delay.c metag: Optimised library functions 2013-03-02 20:09:52 +00:00
div64.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
divsi3.S metag: Fix typos 2016-07-15 09:55:49 +01:00
ip_fast_csum.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
lshrdi3.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
Makefile metag: Build infrastructure 2013-03-02 20:09:54 +00:00
memcpy.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
memmove.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
memset.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
modsi3.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
muldi3.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
ucmpdi2.S metag: Optimised library functions 2013-03-02 20:09:52 +00:00
usercopy.c metag/usercopy: Fix alignment error checking 2017-04-05 14:49:36 +01:00