diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-23 22:58:52 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-24 00:25:20 (GMT) |
commit | de9e478b9d49f3a0214310d921450cf5bb4a21e6 (patch) | |
tree | c93f837c7541bd021b72a492b2ddd701ef796b3d /drivers/spi/spi-davinci.c | |
parent | 4de8ebeff8ddefaceeb7fc6a9b1a514fc9624509 (diff) | |
download | linux-de9e478b9d49f3a0214310d921450cf5bb4a21e6.tar.xz |
x86: fix SMAP in 32-bit environments
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>
Diffstat (limited to 'drivers/spi/spi-davinci.c')
0 files changed, 0 insertions, 0 deletions