Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit d5260d4

Browse files
committed
patches: linux-next: x86_64: Refresh after new uaccess.h conflict
Due to https://git.kernel.org/tip/6ae865615fc43d014da2fd1f1bba7e81ee622d1b [skip ci] Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 382ebad commit d5260d4

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

patches/linux-next/x86_64/x86-series.patch

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From aef1d9a42c562406030cb0f4ba9fab7e9b7d5145 Mon Sep 17 00:00:00 2001
1+
From 3b5f7c47389865240a781933324d165897e00abc Mon Sep 17 00:00:00 2001
22
From: Nathan Chancellor <[email protected]>
33
Date: Sat, 5 Jan 2019 11:51:39 -0700
44
Subject: [PATCH 1/2] DO-NOT-UPSTREAM: x86: Revert two commits that break the
@@ -11,7 +11,9 @@ We've been fortunate enough to get around the asm goto requirement
1111
introduced in commit e501ce957a78 ("x86: Force asm-goto") until now.
1212

1313
This is not a clean revert because of commit 2a418cf3f5f1 ("x86/uaccess:
14-
Don't leak the AC flag into __put_user() value evaluation").
14+
Don't leak the AC flag into __put_user() value evaluation") and commit
15+
6ae865615fc4 ("x86/uaccess: Dont leak the AC flag into __put_user()
16+
argument evaluation").
1517

1618
Link: https://github.com/ClangBuiltLinux/linux/issues/6
1719
Signed-off-by: Nathan Chancellor <[email protected]>
@@ -20,7 +22,7 @@ Signed-off-by: Nathan Chancellor <[email protected]>
2022
1 file changed, 41 insertions(+), 39 deletions(-)
2123

2224
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
23-
index 22ba683afdc2..9352dbef0fdd 100644
25+
index c82abd6e4ca3..5abc7e144e01 100644
2426
--- a/arch/x86/include/asm/uaccess.h
2527
+++ b/arch/x86/include/asm/uaccess.h
2628
@@ -182,14 +182,19 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
@@ -90,24 +92,25 @@ index 22ba683afdc2..9352dbef0fdd 100644
9092
break; \
9193
default: \
9294
__put_user_bad(); \
93-
@@ -425,14 +431,11 @@ do { \
95+
@@ -425,15 +431,12 @@ do { \
9496

9597
#define __put_user_nocheck(x, ptr, size) \
9698
({ \
9799
- __label__ __pu_label; \
98100
- int __pu_err = -EFAULT; \
99101
+ int __pu_err; \
100-
__typeof__(*(ptr)) __pu_val; \
101-
__pu_val = x; \
102+
__typeof__(*(ptr)) __pu_val = (x); \
103+
__typeof__(ptr) __pu_ptr = (ptr); \
104+
__typeof__(size) __pu_size = (size); \
102105
__uaccess_begin(); \
103-
- __put_user_size(__pu_val, (ptr), (size), __pu_label); \
106+
- __put_user_size(__pu_val, __pu_ptr, __pu_size, __pu_label); \
104107
- __pu_err = 0; \
105108
-__pu_label: \
106-
+ __put_user_size(__pu_val, (ptr), (size), __pu_err, -EFAULT);\
109+
+ __put_user_size(__pu_val, __pu_ptr, __pu_size, __pu_err, -EFAULT);\
107110
__uaccess_end(); \
108111
__builtin_expect(__pu_err, 0); \
109112
})
110-
@@ -457,23 +460,17 @@ struct __large_struct { unsigned long buf[100]; };
113+
@@ -458,23 +461,17 @@ struct __large_struct { unsigned long buf[100]; };
111114
* we do not write to any memory gcc knows about, so there are no
112115
* aliasing issues.
113116
*/
@@ -142,7 +145,7 @@ index 22ba683afdc2..9352dbef0fdd 100644
142145

143146
#define __put_user_asm_ex(x, addr, itype, rtype, ltype) \
144147
asm volatile("1: mov"itype" %"rtype"0,%1\n" \
145-
@@ -717,8 +714,13 @@ static __must_check __always_inline bool user_access_begin(const void __user *pt
148+
@@ -718,8 +715,13 @@ static __must_check __always_inline bool user_access_begin(const void __user *pt
146149
#define user_access_save() smap_save()
147150
#define user_access_restore(x) smap_restore(x)
148151

@@ -162,7 +165,7 @@ index 22ba683afdc2..9352dbef0fdd 100644
162165
2.21.0
163166

164167

165-
From fdd79fe62ad7170ba301686ff66750959d6d53f1 Mon Sep 17 00:00:00 2001
168+
From f272bf78754e6250c2ea118520686c5b873a114c Mon Sep 17 00:00:00 2001
166169
From: Nathan Chancellor <[email protected]>
167170
Date: Tue, 25 Sep 2018 13:32:33 -0700
168171
Subject: [PATCH 2/2] DO-NOT-UPSTREAM: x86: Avoid warnings/errors due to lack

0 commit comments

Comments
 (0)