Expanding the kernel stack
Expanding the kernel stack
Posted May 30, 2014 18:41 UTC (Fri) by PaXTeam (guest, #24616)In reply to: Expanding the kernel stack by luto
Parent article: Expanding the kernel stack
Posted May 30, 2014 19:55 UTC (Fri)
by luto (guest, #39314)
[Link] (3 responses)
Posted May 30, 2014 20:49 UTC (Fri)
by PaXTeam (guest, #24616)
[Link] (2 responses)
another advantage is that vmalloc by its nature handles lowmem fragmentation much better which becomes even more important now that amd64 kstacks have become order-2 allocations. it'd also be easy to implement lazy page allocation for kstacks further reducing their memory consumption (let's face it, many kstacks will never actually make use of the whole 16k yet they'll always have to be fully allocated in the current scheme).
Posted May 30, 2014 20:52 UTC (Fri)
by luto (guest, #39314)
[Link]
Posted Jun 27, 2016 0:50 UTC (Mon)
by luto (guest, #39314)
[Link]
1. What do you do if lazy allocation fails?
2. Hitting a not-present page on the stack is likely to result in a double-fault. Intel's manual advises against trying to recover from a double-fault, and I'd like to know why before messing with it. Even if recovery were guaranteed to work, it could be interesting trying to allocate memory (which can block) in a double-fault handler.
The espfix64 code can double-fault and recover, but we ran that specific abuse of the CPU by some Intel and AMD engineers before doing it.
Posted Jun 1, 2014 8:35 UTC (Sun)
by richard_weinberger (subscriber, #38938)
[Link] (2 responses)
Posted Jun 1, 2014 12:38 UTC (Sun)
by PaXTeam (guest, #24616)
[Link] (1 responses)
Posted Jun 2, 2014 11:49 UTC (Mon)
by dgm (subscriber, #49227)
[Link]
Expanding the kernel stack
Expanding the kernel stack
Expanding the kernel stack
Expanding the kernel stack
Expanding the kernel stack
Would be awesome. :-)
Expanding the kernel stack
Expanding the kernel stack