1
0
Fork 0
alistair23-linux/include
Linus Torvalds 594cc251fd make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.

But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being implied by other operations or
similar.  Which makes it very hard to verify that the access has
actually been range-checked.

If you use the unsafe direct user accesses, hardware features (either
SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged
Access Never - on ARM) do force you to use user_access_begin().  But
nothing really forces the range check.

By putting the range check into user_access_begin(), we actually force
people to do the right thing (tm), and the range check vill be visible
near the actual accesses.  We have way too long a history of people
trying to avoid them.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-04 12:56:09 -08:00
..
acpi Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-26 17:03:51 -08:00
asm-generic Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
clocksource
crypto crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
drm Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next 2018-12-13 10:06:34 +10:00
dt-bindings Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-01-02 18:56:59 -08:00
keys
kvm KVM: arm/arm64: Remove arch timer workqueue 2018-12-19 17:47:07 +00:00
linux make 'user_access_begin()' do 'access_ok()' 2019-01-04 12:56:09 -08:00
math-emu
media media fixes for v4.20-rc8 2018-12-25 13:11:30 -08:00
memory
misc
net Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
pcmcia
ras
rdma IB/core: uverbs copy to struct or zero helper 2018-12-20 15:18:18 -07:00
scsi 4.21 merge window pull request 2018-12-28 14:57:10 -08:00
soc ARM: SoC driver updates 2018-12-31 17:32:35 -08:00
sound ALSA: HD-Audio: SKL+: force HDaudio legacy or SKL+ driver selection 2018-12-19 18:07:23 +01:00
target
trace NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
uapi virtio, vhost: features, fixes, cleanups 2019-01-02 18:54:45 -08:00
video drm/exynos: fimd: Make pixel blend mode configurable 2018-12-14 15:46:15 +09:00
xen xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00