Go to file
Lorenzo Stoakes 4b5f2d2016 mm: abstract merge for new VMAs into vma_merge_new_vma()
Only in mmap_region() and copy_vma() do we attempt to merge VMAs which
occupy entirely new regions of virtual memory.

We can abstract this logic and make the intent of this invocations of it
completely explicit, rather than invoking vma_merge() with an inscrutable
 wall of parameters.

This also paves the way for a simplification of the core vma_merge()
implementation, as we seek to make it entirely an implementation detail.

The VMA merge call in mmap_region() occurs only for file-backed mappings,
where each of the parameters previously specified as NULL are defaulted to
NULL in vma_init() (called by vm_area_alloc()).

This matches the previous behaviour of specifying NULL for a number of
fields, however note that prior to this call we pass the VMA to the file
system driver via call_mmap(), which may in theory adjust fields that we
pass in to vma_merge_new_vma().

Therefore we actually resolve an oversight here by allowing for the fact
that the driver may have done this.

Link: https://lkml.kernel.org/r/3dc71d17e307756a54781d4a4ce7315cf8b18bea.1697043508.git.lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-10-18 14:34:18 -07:00
Documentation hugetlb: memcg: account hugetlb-backed memory in memory controller 2023-10-18 14:34:17 -07:00
LICENSES
arch mm: delete checks for xor_unlock_is_negative_byte() 2023-10-18 14:34:17 -07:00
block block: fix kernel-doc for disk_force_media_change() 2023-09-26 00:43:34 -06:00
certs
crypto
drivers dax, kmem: calculate abstract distance with general interface 2023-10-16 15:44:39 -07:00
fs mm: abstract the vma_merge()/split_vma() pattern for mprotect() et al. 2023-10-18 14:34:18 -07:00
include mm: make vma_merge() and split_vma() internal 2023-10-18 14:34:18 -07:00
init
io_uring io_uring/fs: remove sqe->rw_flags checking from LINKAT 2023-09-29 03:07:09 -06:00
ipc
kernel sched: remove wait bookmarks 2023-10-18 14:34:18 -07:00
lib percpu_counter: extend _limited_add() to negative amounts 2023-10-18 14:34:14 -07:00
mm mm: abstract merge for new VMAs into vma_merge_new_vma() 2023-10-18 14:34:18 -07:00
net sunrpc: dynamically allocate the sunrpc_cred shrinker 2023-10-04 10:32:24 -07:00
rust
samples
scripts kbuild: remove stale code for 'source' symlink in packaging scripts 2023-10-01 23:06:06 +09:00
security
sound
tools selftests: add a selftest to verify hugetlb usage in memcg 2023-10-18 14:34:18 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: correct email aliasing for Oleksij Rempel 2023-10-18 12:12:41 -07:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS selftests: add a selftest to verify hugetlb usage in memcg 2023-10-18 14:34:18 -07:00
Makefile Linux 6.6-rc4 2023-10-01 14:15:13 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.