* page table isolation alternative mechanism
@ 2018-01-03 19:22 Albert Cahalan
2018-01-03 20:15 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Albert Cahalan @ 2018-01-03 19:22 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: page table isolation alternative mechanism
2018-01-03 19:22 page table isolation alternative mechanism Albert Cahalan
@ 2018-01-03 20:15 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2018-01-03 20:15 UTC (permalink / raw)
To: Albert Cahalan; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-03 20:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 19:22 page table isolation alternative mechanism Albert Cahalan
2018-01-03 20:15 ` Alan Cox
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®