linux/arch/mips
Lorenzo Stoakes 1944a0183c mm/vma: update do_mmap() to use vma_flags_t
The core do_mmap() function accepts a vm_flags_t parameter which it then
manipulates before passing to mmap_region() to do the heavy lifting of the
memory mapping.

Update do_mmap() to instead accept a vma_flags_t parameter, and adjust all
the logic within do_mmap() to manipulate this instead.

This is as part of the ongoing effort to convert VMA flags from a system
word size to a bitmap type which allows us to unrestrict the number of VMA
flags, as well as gain control over how VMA flag manipulation occurs.

We do not cascade these changes to all functions which accept vm_flags_t,
but rather use vma_flags_to_legacy() where necessary, specifically
deferring converting calc_vm_prot_bits(), calc_vm_flag_bits() and
__get_unmapped_area() to vma_flags_t.

Also utilise the new vma_flags_can_grow() predicate which correctly
handles the case of architectures without upward growing stacks.

As part of this change, introduce VMA_SHADOW_STACK so we can correctly
handle the case of the shadow stack not being defined.

No functional change intended.

Link: https://lore.kernel.org/20260711-b4-vma-flags-mm-v2-2-0fa2357d5431@kernel.org
Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Dave Airlie <airlied@gmail.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nico Pache <npache@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-06 18:57:01 -07:00
..
alchemy mips: select legacy gpiolib interfaces where used 2026-06-15 12:32:43 +02:00
ath25 MIPS: Switch to irq_domain_create_*() 2025-05-16 21:06:10 +02:00
ath79
bcm47xx Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bcm63xx treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
bmips mips: bmips: setup: make CBR address configurable 2024-06-27 10:44:32 +02:00
boot mips: dts: ar9132: fix wdt node name 2026-06-15 12:12:07 +02:00
cavium-octeon staging: octeon: convert cvmx_pko_status_t from typedef to plain enum 2026-05-04 16:21:34 +02:00
cobalt MIPS: Cobalt: Fix missing prototypes 2024-01-22 10:32:21 +01:00
configs MIPS: configs: Enable the current Ingenic USB PHY symbol 2026-06-29 11:37:00 +02:00
dec MIPS: DEC: Ensure RTC platform device deregistration upon failure 2026-06-29 11:27:15 +02:00
econet mips: dts: Add PCIe to EcoNet EN751221 2026-04-06 14:05:02 +02:00
fw MIPS: Fix big-endian stack argument fetching in o32 wrapper 2026-05-26 16:35:36 +02:00
generic MIPS: generic: Replace deprecated strcpy() in ocelot_detect() 2025-08-29 22:34:30 +02:00
include collected fixes for 7.2 2026-07-04 06:05:28 -10:00
ingenic
jazz MIPS/jazzdma: Provide physical address directly 2025-10-29 10:27:30 +01:00
kernel mm/vma: update do_mmap() to use vma_flags_t 2026-08-06 18:57:01 -07:00
kvm KVM generic changes for 7.0 2026-03-11 18:01:55 +01:00
lantiq Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
lib MIPS: lib: Remove '.hidden' for local symbols 2026-06-15 12:21:31 +02:00
loongson2ef MIPS: Loongson2ef: Use pcibios_align_resource() to block io range 2026-02-05 10:00:37 +01:00
loongson32 MIPS: loongson32: Switch to generic core 2025-08-29 22:34:31 +02:00
loongson64 MIPS: loongson64: add IRQ work based on self-IPI 2026-06-29 11:36:36 +02:00
math-emu mips: math-emu: replace deprecated strcpy() in me-debugfs 2025-09-12 11:56:06 +02:00
mm MIPS: mm: Add check for highmem before removing memory block 2026-06-29 11:34:57 +02:00
mobileye MIPS: Add Mobileye EyeQ6Lplus support 2026-04-13 15:31:40 +02:00
mti-malta MIPS: Malta: Fix !EVA SOC-it PCI MMIO 2025-11-11 12:58:49 +01:00
n64 mips: n64: add __iomem for writel call 2026-05-26 16:35:37 +02:00
net bpf: Pass bpf_verifier_env to JIT 2026-04-16 07:03:40 -07:00
pci Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
pic32 irqchip/irq-pic32-evic: Allow driver to be compiled with COMPILE_TEST 2026-02-24 08:15:44 +01:00
power mips: suspend: include linux/suspend.h as needed 2023-12-10 17:21:41 -08:00
ralink Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
rb532 MIPS: RB532: serial: statify setup_serial_port() 2026-05-26 16:35:36 +02:00
sgi-ip22 MIPS: ip22-gio: do not export device release function 2026-05-27 09:50:34 +02:00
sgi-ip27 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sgi-ip30 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sgi-ip32 MIPS: sgi-ip32: Replace deprecated strcpy() in plat_mem_setup() 2025-08-29 22:34:30 +02:00
sibyte mips: sibyte: add missing MODULE_DESCRIPTION() macro 2024-07-23 09:47:40 +02:00
sni MIPS: sni: Replace deprecated strcpy() in sni_console_setup() 2025-08-29 22:34:30 +02:00
tools
txx9 mips: select legacy gpiolib interfaces where used 2026-06-15 12:32:43 +02:00
vdso mips: Add build salt to the vDSO 2026-06-29 11:29:43 +02:00
Kbuild MIPS: Share generic kernel code with other architecture 2024-02-20 13:36:25 +01:00
Kbuild.platforms mips: Add EcoNet MIPS platform support 2025-05-20 08:46:58 +02:00
Kconfig - use software nodes for GPIO code 2026-06-19 07:46:16 -07:00
Kconfig.debug
Makefile MIPS: Remove unused arch/mips/crypto directory 2026-05-22 20:25:30 +08:00
Makefile.postlink kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00