Re: [PATCH v2 00/13] Dynamic Kernel Stacks
From: Dave Hansen
Date: Thu Jun 18 2026 - 14:53:46 EST
On 6/18/26 07:50, Zach O'Keefe wrote:
> Overall, are there any particular painpoints you'd like to see flushed
> out, first?
Handing exceptions in the kernel is hard. Period. That's the pain point.
Just look at NMIs, #VC, #MC and the rest of that mess. Just look at how
we've moved away from ever taking random page faults in the kernel. Or,
heck, randomly taking faults at *all*. We've concentrated them in very
specific places, not in general code.
Now you're arguing that the kernel can pretty much take a fault *AND*
allocate memory reliably at any point*.
I just don't see the collateral in this series to justify that claim.
The NMI entry code is a disaster because NMIs can happen anywhere. The
#VC code is a disaster because #VCs can happen anywhere. Once #PF can
happen anywhere*, why won't #PF become a disaster?
It would be a completely different story if there was a track record of
finding and fixing bugs in the x86 entry code from the authors of this
series. But I don't think I've ever seen a single email from your folks
before this, much less a review tag or a patch. I'd be much happier if
you got Andy L's blessing on this, for example.
> How would you like to proceed? Would explicitly marking this as an
> experimental config, in the interim, be more attractive?
No.
The enemy here is complexity. *Maintenance* complexity. Being able to
compile out some of the complexity helps with debugging. But it doesn't
help maintaining the code.
--
* #PF on stack accesses isn't *quite* as bad as NMI or #VC, I'll give
you that. But it's still pretty darn bad.