[Devel] [PATCH hci-8.1 0/8] mm: keep DMA-pinned MADV_DOEXEC memory working across exec
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Nov 4 22:21:16 MSK 2026
On Wed, 14 Oct 2026 19:11:03 +0200, Konstantin Khorenko wrote:
> mm: keep DMA-pinned MADV_DOEXEC memory working across exec
>
> VSTOR-149847: memory preserved across exec with MADV_DOEXEC loses its
> connection to long-term pins (VFIO DMA, io_uring fixed buffers) after a
> live-update exec, because the copy into the new mm write protects the
> pages and the first write in the new image copies them away from the
> pins. Applies on top of "mm, binfmt_elf: two fixes also posted to
> mainline".
> http://lore.virtuozzo.com/20261014-b4-prep-khorenko-vstor-149847-1-upstream-fixes-v1-0-7fde9ffbebe9@virtuozzo.com
>
> [...]
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.18.vz10, thanks!
[1/8] oracle/mm: fix VM_BUG_ON hit when preserving memory
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/6a7a30845788
[2/8] oracle/mm: hold the source mmap write lock when copying PTEs
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/a23730a3edab
[3/8] oracle/mm: do not write protect COW mappings when preserving across exec
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/624d454834fd
[4/8] oracle/mm: write protect preserved PTEs but keep them exclusive
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/ef3f917e118a
[5/8] oracle/mm: set MMF_HAS_PINNED on the mm receiving preserved pages
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/b187ad4af7ef
[6/8] oracle/mm: zap the preserved ranges of the old mm after copying them
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/7969d34b2578
[7/8] exec: protect preserved memory against surviving shared-mm tasks
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/f6b7a0cfa0ba
[8/8] selftests/mm: test memory preservation across exec
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/d2f2c741fe35
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list