News for hackers. Stuff that matters.
Re:Anatomy of a Program in Memory (2009) by bogomipz on Monday April 30, 2018 @06:12PM (#16962893)
It sounded like the OPs comment wasn't strictly about the post-meltdown era and that they were commenting on the general case. But maybeI misinterpreted that?
Re:Anatomy of a Program in Memory (2009) by monocasa on Monday April 30, 2018 @06:21PM (#16962978)
Oh, sure, my bad.

OK, in the context of 'why can't you cleanly have the kernel in a different address space from user processes on x86', the same reasons apply. It's a chicken/egg thing, as a syscall instruction executes and touches the kernel stack before you have a chance to change mmu mappings.

There are versions of Darwin for x86 (but no released versions of full OSX AFAIK) that separate the address spaces, but they reserve a (albeit much smaller) piece of virtual address space at the top for the kernel in all address spaces in order to facilitate the transition to the full kernel address space.

Re:Anatomy of a Program in Memory (2009) by bogomipz on Monday April 30, 2018 @08:23PM (#16963702)
Right that would be a pretty awful place to segfault :)

Thanks for the clarification.