linux-stable/include
Liam R. Howlett 1c87a6f82a mm: enable maple tree RCU mode by default.
commit 3dd4432549 upstream.

Use the maple tree in RCU mode for VMA tracking.

The maple tree tracks the stack and is able to update the pivot
(lower/upper boundary) in-place to allow the page fault handler to write
to the tree while holding just the mmap read lock.  This is safe as the
writes to the stack have a guard VMA which ensures there will always be
a NULL in the direction of the growth and thus will only update a pivot.

It is possible, but not recommended, to have VMAs that grow up/down
without guard VMAs.  syzbot has constructed a testcase which sets up a
VMA to grow and consume the empty space.  Overwriting the entire NULL
entry causes the tree to be altered in a way that is not safe for
concurrent readers; the readers may see a node being rewritten or one
that does not match the maple state they are using.

Enabling RCU mode allows the concurrent readers to see a stable node and
will return the expected result.

Link: https://lkml.kernel.org/r/20230227173632.3292573-9-surenb@google.com
Cc: stable@vger.kernel.org
Fixes: d4af56c5c7 ("mm: start tracking VMAs with maple tree")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: syzbot+8d95422d3537159ca390@syzkaller.appspotmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:40 +02:00
..
acpi ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type() 2023-04-13 16:55:33 +02:00
asm-generic arch: fix broken BuildID for arm64 and riscv 2023-02-25 11:25:42 +01:00
clocksource
crypto
drm drm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload() 2023-04-13 16:55:37 +02:00
dt-bindings dt-bindings: clocks: imx8mp: Add ID for usb suspend clock 2022-12-31 13:33:09 +01:00
keys
kunit kunit: fix kunit_test_init_section_suites(...) 2023-02-09 11:28:08 +01:00
kvm KVM: arm64: PMU: Align chained counter implementation with architecture pseudocode 2023-04-13 16:55:17 +02:00
linux mm: enable maple tree RCU mode by default. 2023-04-13 16:55:40 +02:00
math-emu
media media: uvcvideo: Add GUID for BGRA/X 8:8:8:8 2023-03-11 13:55:35 +01:00
memory memory: renesas-rpc-if: Split-off private data from struct rpcif 2023-03-11 13:55:17 +01:00
misc
net raw: Fix NULL deref in raw_get_next(). 2023-04-13 16:55:23 +02:00
pcmcia
ras
rdma
rv
scsi scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD 2023-03-22 13:33:43 +01:00
soc ARM: at91: pm: avoid soft resetting AC DLL 2022-11-01 12:25:19 +02:00
sound ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared 2023-03-10 09:33:23 +01:00
target
trace rcu: Fix rcu_torture_read ftrace event 2023-04-06 12:10:55 +02:00
uapi usb: uvc: Enumerate valid values for color matching 2023-03-11 13:55:38 +01:00
ufs scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096 2023-03-10 09:33:15 +01:00
vdso
video
xen x86/PVH: obtain VGA console info in Dom0 2023-04-06 12:10:39 +02:00