summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRam Muthiah <rammuthiah@google.com>2019-05-21 18:15:21 -0700
committerAmit Pundir <amit.pundir@linaro.org>2019-09-16 13:09:02 +0530
commit7e3fcd6fc7555f1be6d3b49597713fb45455a331 (patch)
treef8386fa5472b13ed9d091ea6c1138050c6049679 /arch
parent2d4af036b9d84707656cd0e5749b72303ab1acc0 (diff)
ANDROID: Four part revert of asm-goto usage [2/4]
Revert "x86/uaccess: Don't leak the AC flag into __put_user() value evaluation" This reverts commit 2a418cf3f5f1caf911af288e978d61c9844b0695. Bug: 120440614 Bug: 132629930 Change-Id: Ib177230b39d1247060f425205d63d65065ed936a Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/uaccess.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 29920ffb5df1..c647784dd0c4 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -282,7 +282,7 @@ do { \
__put_user_goto(x, ptr, "l", "k", "ir", label); \
break; \
case 8: \
- __put_user_goto_u64(x, ptr, label); \
+ __put_user_goto_u64((__typeof__(*ptr))(x), ptr, label); \
break; \
default: \
__put_user_bad(); \
@@ -429,10 +429,8 @@ do { \
({ \
__label__ __pu_label; \
int __pu_err = -EFAULT; \
- __typeof__(*(ptr)) __pu_val; \
- __pu_val = x; \
__uaccess_begin(); \
- __put_user_size(__pu_val, (ptr), (size), __pu_label); \
+ __put_user_size((x), (ptr), (size), __pu_label); \
__pu_err = 0; \
__pu_label: \
__uaccess_end(); \