projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
979c2c4
)
selftests/x86/fsgsbase: Add a missing memory constraint
author
Andy Lutomirski
<luto@kernel.org>
Fri, 26 Jun 2020 17:24:28 +0000
(10:24 -0700)
committer
Thomas Gleixner
<tglx@linutronix.de>
Wed, 1 Jul 2020 13:27:20 +0000
(15:27 +0200)
The manual call to set_thread_area() via int $0x80 was missing any
indication that the descriptor was a pointer, causing gcc to
occasionally generate wrong code. Add the missing constraint.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link:
https://lkml.kernel.org/r/432968af67259ca92d68b774a731aff468eae610.1593192140.git.luto@kernel.org
tools/testing/selftests/x86/fsgsbase.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/x86/fsgsbase.c
b/tools/testing/selftests/x86/fsgsbase.c
index
f47495d
..
9983195
100644
(file)
--- a/
tools/testing/selftests/x86/fsgsbase.c
+++ b/
tools/testing/selftests/x86/fsgsbase.c
@@
-285,7
+285,8
@@
static unsigned short load_gs(void)
/* 32-bit set_thread_area */
long ret;
asm volatile ("int $0x80"
- : "=a" (ret) : "a" (243), "b" (low_desc)
+ : "=a" (ret), "+m" (*low_desc)
+ : "a" (243), "b" (low_desc)
: "r8", "r9", "r10", "r11");
memcpy(&desc, low_desc, sizeof(desc));
munmap(low_desc, sizeof(desc));