aboutsummaryrefslogtreecommitdiff
path: root/lib/syscall.c
diff options
context:
space:
mode:
authorHelge Deller <[email protected]>2017-03-29 21:41:05 +0200
committerHelge Deller <[email protected]>2017-03-29 21:49:02 +0200
commit554bfeceb8a22d448cd986fc9efce25e833278a1 (patch)
treeaeb334dd59c20362c8457f3a2a71b902430092c5 /lib/syscall.c
parentfe82203b63e598c34d96e846dea49679a726fc7a (diff)
parisc: Fix access fault handling in pa_memcpy()
pa_memcpy() is the major memcpy implementation in the parisc kernel which is used to do any kind of userspace/kernel memory copies. Al Viro noticed various bugs in the implementation of pa_mempcy(), most notably that in case of faults it may report back to have copied more bytes than it actually did. Fixing those bugs is quite hard in the C-implementation, because the compiler is messing around with the registers and we are not guaranteed that specific variables are always in the same processor registers. This makes proper fault handling complicated. This patch implements pa_memcpy() in assembler. That way we have correct fault handling and adding a 64-bit copy routine was quite easy. Runtime tested with 32- and 64bit kernels. Reported-by: Al Viro <[email protected]> Cc: <[email protected]> # v4.9+ Signed-off-by: John David Anglin <[email protected]> Signed-off-by: Helge Deller <[email protected]>
Diffstat (limited to 'lib/syscall.c')
0 files changed, 0 insertions, 0 deletions