see arch/x86/entry/entry_64.S, irq_entries_start -> common_interrupt -> ".macro interrupt" -> switch_to_thread_stack -> SWITCH_TO_KERNEL_CR3
-
-
(or at least I think that's the right code path)
1 reply 0 retweets 2 likes -
Replying to @tehjh
Been munging around there, wasn’t sure if we were doing that on every fault too.
1 reply 0 retweets 0 likes -
Replying to @dakami
you can't access kernel heap data without doing the switch. that includes things like pagetables and VMA metadata.
2 replies 0 retweets 2 likes -
you're not even on a proper stack, and most kernel code isn't mapped
1 reply 0 retweets 1 like -
-
Replying to @dakami
when you're coming in from user context with KPTI active
1 reply 0 retweets 0 likes -
-
Replying to @dakami
AFAIK exceptions, for which the processor does need some kernel stack to write on, use small percpu entry stacks, one page per stack or so
3 replies 0 retweets 1 like -
I'm using the term "percpu" as it is used in the Linux kernel, so per logical core
-
-
Replying to @tehjh
Hmm. Annoyingly we're in the universe where we _actually_ need to care what the hardware is really doing. Is there per virtual core memory? I've read virtual cores share at least L1.
1 reply 0 retweets 2 likes -
By annoyingly I mean, damnit what have you done :)
0 replies 0 retweets 0 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.