Re: [PATCH v2 00/13] Dynamic Kernel Stacks

From: Thomas Gleixner

Date: Sat Jun 20 2026 - 18:00:08 EST


On Fri, Jun 19 2026 at 22:02, David Stevens wrote:
> On Fri, Jun 19, 2026 at 2:59 PM Thomas Gleixner <tglx@xxxxxxxxxx> wrote:
>> If the kernel skips a whole page or more then there is a serious bug
>> somewhere. I might be missing something, but again the "very unlikely"
>> wording which handwaves about it is just disgustingly useless.
>
> FRAME_WARN accepts values up to 8192 bytes, and it can always be
> ignored or simply disabled. If a stack frame is larger than 4k, then

We should limit that to something sane.

> it's entirely possible for the code and compiler to align in a way
> where the first access in the frame skips a page in the stack. I think
> we agree that such code would be highly suspect and (hopefully) would
> only exist in out-of-tree drivers.

We don't care about out of tree drivers.

> But it's something the kernel build system accepts today. Dynamic
> kernel stacks suddenly turning that into a runtime kernel panic seems
> like exactly the sort of edge case that we would get yelled at for not
> addressing.

That's a good thing. If it breaks in tree code then those people have
finally an incentive to fix the warnings sent by the robots which they
ignored for a long time. If it breaks out of tree code then *SHRUG*.

We guarantee not to break user space, but we don't guarantee anything
for out of tree kernel hacks.

Thanks,

tglx