diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-10-10 20:55:35 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-10-14 14:14:21 -0700 |
commit | c9c63f3c7a9081e4768291514991d3208ae8a697 (patch) | |
tree | bfd6f2c748194fe121d0d638a35954ded1e56b63 /arch/xtensa/kernel | |
parent | c0437642966fd32b827034af6f00eecd80b89325 (diff) |
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