linux/arch/x86
Linus Torvalds de9e478b9d x86: fix SMAP in 32-bit environments
In commit 11f1a4b975 ("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>
2016-02-23 16:25:20 -08:00
..
boot UBSAN: run-time undefined behavior sanity checker 2016-01-20 17:09:18 -08:00
configs Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-09-04 15:49:32 -07:00
crypto crypto: chacha20-ssse3 - Align stack pointer to 64 bytes 2016-01-25 21:47:45 +08:00
entry UBSAN: run-time undefined behavior sanity checker 2016-01-20 17:09:18 -08:00
ia32 Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 21:05:40 -08:00
include x86: fix SMAP in 32-bit environments 2016-02-23 16:25:20 -08:00
kernel perf/x86/amd/uncore: Plug reference leak 2016-02-17 08:36:09 +01:00
kvm kvm: rename pfn_t to kvm_pfn_t 2016-01-15 17:56:32 -08:00
lguest Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-11 16:26:03 -08:00
lib x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache() 2016-02-17 09:10:23 +01:00
math-emu Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-03 21:05:40 -08:00
mm Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-02-20 09:32:40 -08:00
net bpf, x86: detect/optimize loading 0 immediates 2015-12-18 16:04:51 -05:00
oprofile
pci Xen bug fixes for 4.5-rc5 2016-02-22 13:57:01 -08:00
platform Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-31 16:17:19 -08:00
power x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume 2015-11-26 10:04:53 +01:00
purgatory
ras x86/ras/mce_amd_inj: Inject bank 4 errors on the NBC 2015-10-12 16:15:48 +02:00
realmode UBSAN: run-time undefined behavior sanity checker 2016-01-20 17:09:18 -08:00
tools
um virtio: barrier rework+fixes 2016-01-18 16:44:24 -08:00
video
xen xen: features and fixes for 4.5-rc0 2016-01-12 13:05:36 -08:00
.gitignore
Kbuild x86/asm/entry, x86/vdso: Move the vDSO code to arch/x86/entry/vdso/ 2015-06-03 18:51:37 +02:00
Kconfig hpet: Drop stale URLs 2016-02-17 09:39:56 +01:00
Kconfig.cpu x86/Kconfig/cpus: Fix/complete CPU type help texts 2015-10-21 11:12:56 +02:00
Kconfig.debug libnvdimm for 4.5 2016-01-13 19:15:14 -08:00
Makefile Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-11-04 09:11:12 -08:00
Makefile.um
Makefile_32.cpu