linux/include
Linus Torvalds ac351de9dd BACKPORT: make 'user_access_begin()' do 'access_ok()'
upstream commit 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.

Bug: 135368228
Change-Id: I4ca0e4566ea080fa148c5e768bb1a0b6f7201c01
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-09-12 11:28:03 +00:00
..
acpi
asm-generic This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
clocksource
crypto crypto: speck - remove Speck 2019-04-03 15:25:12 -07:00
drm This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
dt-bindings
keys keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
kvm KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:47:59 +02:00
linux BACKPORT: make 'user_access_begin()' do 'access_ok()' 2019-09-12 11:28:03 +00:00
math-emu
media media: vb2: add waiting_in_dqbuf flag 2019-05-31 06:46:04 -07:00
memory
misc
net This is the 4.19.72 stable release 2019-09-10 10:48:21 +01:00
pcmcia
ras
rdma IB/mlx5: Report correctly tag matching rendezvous capability 2019-07-26 09:14:27 +02:00
scsi scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:52:27 +02:00
soc
sound ALSA: compress: Fix regression on compressed capture streams 2019-08-16 10:12:47 +02:00
target scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough 2019-01-26 09:32:38 +01:00
trace This is the 4.19.69 stable release 2019-09-02 17:39:29 +02:00
uapi UPSTREAM: dma-buf: add DMA_BUF_SET_NAME ioctls 2019-08-19 23:08:58 +00:00
video udlfb: introduce a rendering mutex 2019-05-25 18:23:30 +02:00
xen xen/events: fix binding user event channels to cpus 2019-07-26 09:14:25 +02:00