This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Creating aliases for memory ranges
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-help at sourceware dot org
- Date: Wed, 23 Jan 2013 11:18:14 +0100
- Subject: Creating aliases for memory ranges
This is probably more of a Linux question, but given that it's about
user space and glibc hopefully has the necessary function declarations,
I'm asking here.
Is there a way to create pages which share the underlying content with
other pages in the same process? In essence, I want to character
pointers p, q, such that p != q, and writing to *p changes the value of
*q. And in a next step, I'd like that the aliased page is read-only,
while the original is not. 8-)
I think this is easily to achieve if the original pages are mapped from
a file on the file system, so the VM hardware has to support it.
--
Florian Weimer / Red Hat Product Security Team