|
|
Subscribe / Log in / New account

Sharing page tables with mshare()

Sharing page tables with mshare()

Posted May 22, 2024 22:29 UTC (Wed) by TheJH (subscriber, #101155)
Parent article: Sharing page tables with mshare()

This could also be fun as a sandboxing technology - you could use mshare() to set up two processes such that some of the address space of process A is mirrored over into a sandboxed process B, and so process A can map memory on process B's behalf, and process B doesn't need the ability to memory-map files by itself anymore.

Almost like the KVM interface where host userspace can map memory into the guest with ioctls, but without all the hardware virtualization complications.


to post comments

Sharing page tables with mshare()

Posted May 22, 2024 22:37 UTC (Wed) by TheJH (subscriber, #101155) [Link] (1 responses)

I guess in a way, both KVM and IOMMUv2 are sort of doing a more flexible version of this already, with their mmu-notifier-based mirroring of one process' page tables into other processes? But with the differences that they don't involve creating extra mm_structs, and that the mirroring is a one-way thing.

Sharing page tables with mshare()

Posted May 22, 2024 22:39 UTC (Wed) by TheJH (subscriber, #101155) [Link]

s/into other processes/into other contexts/


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds