remarkable-linux/arch/metag
James Hogan 2c0b1df88b metag/usercopy: Fix src fixup in from user rapf loops
The fixup code to rewind the source pointer in
__asm_copy_from_user_{32,64}bit_rapf_loop() always rewound the source by
a single unit (4 or 8 bytes), however this is insufficient if the fault
didn't occur on the first load in the loop, as the source pointer will
have been incremented but nothing will have been stored until all 4
register [pairs] are loaded.

Read the LSM_STEP field of TXSTATUS (which is already loaded into a
register), a bit like the copy_to_user versions, to determine how many
iterations of MGET[DL] have taken place, all of which need rewinding.

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 15:25:07 +01:00
..
boot metag: enable building of all dtbs 2015-10-27 16:12:16 -05:00
configs
include metag/usercopy: Zero rest of buffer from copy_from_user 2017-04-05 15:25:02 +01:00
kernel sched/headers: Move task->mm handling methods to <linux/sched/mm.h> 2017-03-03 01:43:28 +01:00
lib metag/usercopy: Fix src fixup in from user rapf loops 2017-04-05 15:25:07 +01:00
mm sched/headers: Prepare to move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:38 +01:00
oprofile
tbx metag: Fix misspellings in comments. 2016-04-18 12:45:54 +02:00
Kconfig lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
Kconfig.debug
Kconfig.soc metag: remove ARCH_WANT_OPTIONAL_GPIOLIB 2016-04-26 13:39:22 +02:00
Makefile metag: use common make variables for dtb builds 2015-10-27 16:12:15 -05:00