1
0
Fork 0
alistair23-linux/arch
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
..
alpha Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arm Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
arm64 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
c6x Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
csky Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
h8300 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
hexagon Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
ia64 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
m68k Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
microblaze Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
mips Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
nds32 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
nios2 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
openrisc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
parisc Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
powerpc Fix access_ok() fallout for sparc32 and powerpc 2019-01-04 09:58:25 -08:00
riscv Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
s390 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sh Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sparc Fix access_ok() fallout for sparc32 and powerpc 2019-01-04 09:58:25 -08:00
um Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
unicore32 Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
x86 make 'user_access_begin()' do 'access_ok()' 2019-01-04 12:56:09 -08:00
xtensa Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
.gitignore
Kconfig New gcc plugin: stackleak 2018-11-01 11:46:27 -07:00