Thread (3 messages) flat view 3 messages, 2 authors, 2025-07-28

Re: [PATCH] man/man2/mremap.2: describe multiple mapping move, shrink

From: Lorenzo Stoakes <hidden>
Date: 2025-07-28 04:35:35
Also in: linux-man, linux-mm, lkml

On Fri, Jul 25, 2025 at 10:44:59PM +0200, Alejandro Colomar wrote:
Hi Lorenzo,

On Wed, Jul 23, 2025 at 06:46:34PM +0100, Lorenzo Stoakes wrote:
quoted
There is pre-existing logic that appears to be undocumented for an mremap()
shrink operation, where it turns out that the usual 'input range must span
a single mapping' requirement no longer applies.

In fact, it turns out that the input range specified by [old_address,
old_size) may span any number of mappings, as long old_address resides at
or within a mapping and [old_address, new_size) spans only a single
mapping.

Explicitly document this.

In addition, document the new behaviour introduced in Linux 6.17 whereby it
is now possible to move multiple mappings in a single operation, as long as
the operation is purely a move, that is old_size is equal to new_size and
MREMAP_FIXED is specified.
Please separate the new behavior into a separate patch.  Each patch
should change one thing only.
OK will split and send two separate patches. Since this will cause merge pain
otherwise, I'll send it as a series.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help