From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Simon Que <sque@chromium.org>
Cc: linux-kernel@vger.kernel.org, frankhu@chromium.org,
John Joseph <jnjoseph@google.com>,
Rob Springer <rspringer@google.com>
Subject: Re: Looking for way to program external MMU from userspace (or viable alternative)
Date: Fri, 6 Apr 2018 13:01:46 +0100 [thread overview]
Message-ID: <20180406130146.5a9c7ff3@alans-desktop> (raw)
In-Reply-To: <CANV8Hs0XsCnLRwOdC=r4sot+iKkivofMzEg-kA_b5UjRw9Xmng@mail.gmail.com>
> The current kernel driver code looks up the physical address of a page of
> user-allocated memory by traversing the page table, and then writing the
> physical address to the external MMU. If we were to move the driver to
> userspace, this procedure would require exposing the physical address to
> user space, which insecure and thus a no-go.
>
> What possibilities are there for programming the MMU from a userspace
> driver?
If you want to be secure none.
That's not to say you can't keep most of the code in user space but
you'll need the DMA and MMU manager to be kernel side because you have to
trust it.
Even if you use something like VT-D, you've then got to program the IOMMU
and that has to be done in kernel for the same obvious reasons. Look at
VFIO.. maybe that helps.
Alan
prev parent reply other threads:[~2018-04-06 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 1:27 Simon Que
2018-04-03 16:57 ` Jerome Glisse
2018-04-06 12:01 ` Alan Cox [this message]
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=20180406130146.5a9c7ff3@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=frankhu@chromium.org \
--cc=jnjoseph@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rspringer@google.com \
--cc=sque@chromium.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
Powered by JetHome