android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Linus Torvalds 660716ee5f
BACKPORT: 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 200630541
CVE-2018-20669

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: I1d25229cd41495b782e6f2bc67a4bb638dec4540
Reviewed-on: https://git-master.nvidia.com/r/c/linux-4.9/+/2374142
(cherry picked from commit e77a94059008f0f812474d05a9f75accecaeb583)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-4.9/+/2466485
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2026-02-04 00:23:05 +02:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:41:41 +02:00
asm-generic Merge branch 'android-4.9-q' of https://android.googlesource.com/kernel/common into lineage-20 2023-01-19 15:42:12 +01:00
clocksource
crypto Merge remote-tracking branch 'common/android-4.9-q' into android12-4.9-sdm845 2022-07-18 14:05:31 +03:00
drm Merge remote-tracking branch 'common/android-4.9-q' into android12-4.9-sdm845 2022-07-18 14:05:31 +03:00
dt-bindings clk: msm: gcc: Add support for BB_CLK3 for SDM429 2020-05-28 10:47:09 +05:30
keys
kvm
linux BACKPORT: make 'user_access_begin()' do 'access_ok()' 2026-02-04 00:23:05 +02:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-21 10:41:02 +01:00
media media: media/cec.h: add CEC_CAP_DEFAULTS 2020-06-22 22:31:02 -07:00
memory
microvisor
misc
net BACKPORT: net: fix __dst_negative_advice() race 2024-08-19 10:13:09 +03:00
pcmcia
ras
rdma IB/cma: Fix reference count leak when no ipv4 addresses are set 2020-06-03 08:16:33 +02:00
rxrpc
scsi Merge remote-tracking branch 'common/android-4.9-q' into android13-4.9-sdm845 2022-11-09 19:25:28 +02:00
soc Merge branch 'android-4.9-q' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-sdm845 2021-01-17 05:04:08 +02:00
sound Revert "ANDROID: ALSA: jack: Update supported jack switch types" 2026-01-06 16:27:45 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 11:48:41 +01:00
trace Merge branch 'linux-4.9.y' of https://kernel.googlesource.com/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable into lineage-20 2022-11-16 15:35:23 +01:00
uapi Revert "ANDROID: ALSA: jack: Update supported jack switch types" 2026-01-06 16:27:45 +02:00
video Merge remote-tracking branch 'common/android-4.9-q' into android12-4.9-sdm845 2022-09-06 06:20:26 +03:00
vservices
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 10:03:33 +01:00