linux-uconsole/include
Andrey Konovalov be21fa3044 UPSTREAM: kasan, mm, arm64: tag non slab memory allocated via pagealloc
(Upstream commit 2813b9c029).

Tag-based KASAN doesn't check memory accesses through pointers tagged with
0xff.  When page_address is used to get pointer to memory that corresponds
to some page, the tag of the resulting pointer gets set to 0xff, even
though the allocated memory might have been tagged differently.

For slab pages it's impossible to recover the correct tag to return from
page_address, since the page might contain multiple slab objects tagged
with different values, and we can't know in advance which one of them is
going to get accessed.  For non slab pages however, we can recover the tag
in page_address, since the whole page was marked with the same tag.

This patch adds tagging to non slab memory allocated with pagealloc.  To
set the tag of the pointer returned from page_address, the tag gets stored
to page->flags when the memory gets allocated.

Link: http://lkml.kernel.org/r/d758ddcef46a5abc9970182b9137e2fbee202a2c.1544099024.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 128674696
Change-Id: I500bdf42462fee0ee14495a6be51815e7e44460f
2019-09-24 17:44:13 -07: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.73 stable release 2019-09-16 09:35:02 +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 UPSTREAM: kasan, mm, arm64: tag non slab memory allocated via pagealloc 2019-09-24 17:44:13 -07:00
math-emu
media media: cec/v4l2: move V4L2 specific CEC functions to V4L2 2019-09-16 08:21:46 +02:00
memory
misc
net This is the 4.19.75 stable release 2019-09-21 07:55:26 +02: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 UPSTREAM: ALSA: pcm: add support for 352.8KHz and 384KHz sample rate 2019-09-18 20:34:13 +00: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 This is the 4.19.75 stable release 2019-09-21 07:55:26 +02: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