aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-10-10 20:55:35 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2019-10-14 14:14:21 -0700
commitc9c63f3c7a9081e4768291514991d3208ae8a697 (patch)
treebfd6f2c748194fe121d0d638a35954ded1e56b63 /arch/xtensa/kernel
parentxtensa: clean up assembly arguments in uaccess macros (diff)
downloadlinux-dev-c9c63f3c7a9081e4768291514991d3208ae8a697.tar.xz
linux-dev-c9c63f3c7a9081e4768291514991d3208ae8a697.zip
xtensa: fix type conversion in __get_user_[no]check
__get_user_[no]check uses temporary buffer of type long to store result of __get_user_size and do sign extension on it when necessary. This doesn't work correctly for 64-bit data. Fix it by moving temporary buffer/sign extension logic to __get_user_asm. Don't do assignment of __get_user_bad result to (x) as it may not always be integer-compatible now and issue warning even when it's going to be optimized. Instead do (x) = 0; and call __get_user_bad separately. Zero initialize __x in __get_user_asm and use '+' constraint for its assembly argument, so that its value is preserved in error cases. This may add at most 1 cycle to the fast path, but saves an instruction and two padding bytes in the fixup section for each use of this macro and works for both misaligned store and store exception. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel')
0 files changed, 0 insertions, 0 deletions