commit | 62724cc5ebd7fb9113f156cbc0d2bb5e3cb0a9ae | [log] [tgz] |
---|---|---|
author | Richard Henderson <rth@twiddle.net> | Sat Mar 24 21:31:25 2012 +0100 |
committer | Richard Henderson <rth@twiddle.net> | Fri Sep 21 22:02:15 2012 +0200 |
tree | 264a6d37e963318a07ab782c7aea863c7578167e | |
parent | cfb75cb9807463ebe18b127096b48b5d0db1ce03 [diff] |
linux-user: Use memcpy in get_user/put_user. When host and target have differing alignment rules, using a cast and direct memory operation can result in SIGBUS. Use memcpy instead, which the compiler will happily optimize when alignment is satisfied. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>