From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Albert Cahalan <acahalan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: page table isolation alternative mechanism
Date: Wed, 3 Jan 2018 20:15:26 +0000 [thread overview]
Message-ID: <20180103201526.3e8251c6@alans-desktop> (raw)
In-Reply-To: <CABfYdSoeZm-r5aYN7=aJY5+TcaKEA+4AxfBCk_sM=NNsrAp-ug@mail.gmail.com>
On Wed, 3 Jan 2018 14:22:37 -0500
Albert Cahalan <acahalan@gmail.com> wrote:
> We got into the current situation for performance reasons, avoiding the costly
> reload of CR3 that a hardware task switch would cause. It seems we'll be
> loading CR3 now anyway, so it might be time to reconsider hardware
> task switches.
>
> The recent patches leave kernel entry/exit code mapped. Hardware task switches
> wouldn't need that. All they need is a single entry in a reduced-size
> IDT, for the
> doublefault, and a minimal GDT, and a TSS. Taking the fault switches CR3. That
> then gets you a proper IDT and GDT because those are virtually mapped.
> Not a single byte of kernel code would need to be mapped while user code runs.
I can see how that works for 32bit assuming you don't set up the fast
syscall/ret stuff but for 64bit I don't see how you'd make it work easily
because a syscall isn't an interrupt or trap any more so it can't be a
task or any other kind of gate.
Alan
prev parent reply other threads:[~2018-01-03 20:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 19:22 Albert Cahalan
2018-01-03 20:15 ` 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=20180103201526.3e8251c6@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=acahalan@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®