summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-23 14:58:52 -0800
committerAmit Pundir <amit.pundir@linaro.org>2016-09-15 12:42:31 +0530
commit8a627afb7a4ffda3d6f87d9bcaa19b839d247f5d (patch)
tree75b7ffb72b344a9ae8aba98b9b0f5e4d016e42a1 /include/linux
parent702ea26d1f7d421a31831de98ea02e92c6782c20 (diff)
UPSTREAM: x86: fix SMAP in 32-bit environments
(cherry picked from commit de9e478b9d49f3a0214310d921450cf5bb4a21e6) In commit 11f1a4b9755f ("x86: reorganize SMAP handling in user space accesses") I changed how the stac/clac instructions were generated around the user space accesses, which then made it possible to do batched accesses efficiently for user string copies etc. However, in doing so, I completely spaced out, and didn't even think about the 32-bit case. And nobody really even seemed to notice, because SMAP doesn't even exist until modern Skylake processors, and you'd have to be crazy to run 32-bit kernels on a modern CPU. Which brings us to Andy Lutomirski. He actually tested the 32-bit kernel on new hardware, and noticed that it doesn't work. My bad. The trivial fix is to add the required uaccess begin/end markers around the raw accesses in <asm/uaccess_32.h>. I feel a bit bad about this patch, just because that header file really should be cleaned up to avoid all the duplicated code in it, and this commit just expands on the problem. But this just fixes the bug without any bigger cleanup surgery. Reported-and-tested-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Change-Id: Ic044ebfe658a13179984111d062ca3a0b1404110 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions