diff options
| author | Lorenzo Stoakes <[email protected]> | 2025-04-28 15:28:15 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-05-13 06:50:48 +0000 |
| commit | dd7a6246f4fd6e8a6dcb08f1f51c899f3e0d3b83 (patch) | |
| tree | 0fc55b35d143fde8744251c100653f548e3fd1a8 /lib/xarray.c | |
| parent | mm: establish mm/vma_exec.c for shared exec/mm VMA functionality (diff) | |
| download | kernel-dd7a6246f4fd6e8a6dcb08f1f51c899f3e0d3b83.tar.gz kernel-dd7a6246f4fd6e8a6dcb08f1f51c899f3e0d3b83.zip | |
mm: abstract initial stack setup to mm subsystem
There are peculiarities within the kernel where what is very clearly mm
code is performed elsewhere arbitrarily.
This violates separation of concerns and makes it harder to refactor code
to make changes to how fundamental initialisation and operation of mm
logic is performed.
One such case is the creation of the VMA containing the initial stack upon
execve()'ing a new process. This is currently performed in
__bprm_mm_init() in fs/exec.c.
Abstract this operation to create_init_stack_vma(). This allows us to
limit use of vma allocation and free code to fork and mm only.
We previously did the same for the step at which we relocate the initial
stack VMA downwards via relocate_vma_down(), now we move the initial VMA
establishment too.
Take the opportunity to also move insert_vm_struct() to mm/vma.c as it's
no longer needed anywhere outside of mm.
Link: https://lkml.kernel.org/r/118c950ef7a8dd19ab20a23a68c3603751acd30e.1745853549.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Reviewed-by: Suren Baghdasaryan <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
Reviewed-by: Pedro Falcato <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jann Horn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions
