Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You don't have a choice here, as all major kernels do this.
However, rather than being directly mapped into US, kernel is still protected by kernel mode but is part of the same context.
This limits context switching on system calls, which raises performance quite a lot.
Eg, the linux kernel implement's this in 2 modes.
3:1 mode:
This is the default mode.
Here the kernel is part of every process context.
No full context switch has to be performed on syscall.
However this makes the system vulnerable to meltdown/specter/...
4:4 mode:
The kernel runs in it's own context.
A full context switch has to be performed on syscalls.
Lowers performance by around 1/3.
Largely safe against speculative execution attacks. -
Okay that makes sense. That's probably what the Superuser/User bit in the page table is for...
Do you know if seperate PCIDs for kernel and userspace would also fix meltdown, etc. without requiring a full context switch? (i.e. only flushing kernel pages from the TLB on syscall return)
Related Rants
-
Doomenik4"And that's it !" - The biggest lie, every framework tries to tell you.
-
avitron8Apparently this guy's pull request claims that his code is "very fast" (Official Linux github repository). I c...
-
dotPy12Curiosity killed the cat. Me 5 years ago : "I wonder..." Typed in : sudo rm -rf / True story.
I literally don't understand the purpose of a "higher half kernel"
What does it matter where my kernel is mapped in virtual memory?
"It is traditional and generally good to have your kernel mapped in every user process" what the hell does that even mean??
Mapping my kernel into userspace is something is explicitely don't want to do. Like at all. Ever
And in physical memory it matters even less where it is.
I'm so confused right now
rant
wth
osdev
kernel