# RE: \[RESEND RFC PATCH 0/5\] Remote mapping

- From: Mircea CIRJALIU - MELIU \<hidden\>
- Date: 2020-09-07 10:25:56 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2020/09/6503146
- Thread: https://ratatoskr.run/linux-mm/2020/09/6503085/t.md

```text
> From: Andy Lutomirski <luto@kernel.org>
> I think this is very clever, but I find myself wondering what happens if people
> start trying to abuse this by, for example, setting up a remote mapping
> pointing to fun regions like userfaultfd or another remote mapping.

Can ptrace() be used to abuse fun regions of a process address space?
Remote mapping recursiveness can be eliminated by checking the VMA the
remote page is extracted from. (NYI)

> I'm a little concerned that it's actually too clever and that maybe a more
> straightforward solution should be investigated.  I personally rather dislike
> the KVM model in which the guest address space mirrors the host (QEMU)
> address space rather than being its own thing.

I've seen a few internal mmap()s throughout the kernel. Just wondering how
memory accounting is implemented for these cases. Will this be reflected in
the memory usage of the process that controls such a module? Especially in
the case of a virtual machine that needs a few GBs of memory.

Mircea

```
