linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Thomas DuBuisson <thomas.dubuisson@gmail.com>
To: linux-mm@kvack.org
Subject: Using page tables to confine memory accesses of subroutines
Date: Tue, 16 Nov 2010 09:42:57 -0800	[thread overview]
Message-ID: <AANLkTikAybJkap8d_DjSZUTj6fsiQDigCoqHL6CfgBTt@mail.gmail.com> (raw)

All,

I've been working on confining memory accesses of subroutines of a
single process.  The idea is to protect the process's memory integrity
(and perhaps confidentiality) from potentially buggy libraries.  From
the user space standpoint its functionally similar to making a lot of
mprotect calls before and after calling the subroutine.

The initial implementation was done using some existing MM facuilities
(dup_mm, pgd_dup, use_mm, change_pud_range) to build a new system call
that allows the calling process to create, and switch between, a
number of page tables.  Initial benchmarks based on this code show a 2
to 10 time improvement on shared memory IPC performance.

Unfortunately the implementation is just a prototype - it doesn't
behave properly when interleaving
allocation or with multi-threaded processes.  A better implementation
might use the thread infrastructure
to track (and periodically activate) these alternate page tables.  I
figure this could behave properly in the face of allocation and
threading with less work on my part by using more existing code.

Perhaps there are other solutions you can think of, if so I'd be happy
to see a conversation on this front.

Cheers,
Thomas

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2010-11-16 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikAybJkap8d_DjSZUTj6fsiQDigCoqHL6CfgBTt@mail.gmail.com \
    --to=thomas.dubuisson@gmail.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).