Re: [PATCH] objtool: Fix stack overflow in validate_branch()

From: Ingo Molnar
Date: Tue Dec 02 2025 - 11:20:34 EST



* Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> On an allmodconfig kernel compiled with Clang, objtool is segfaulting in
> drivers/scsi/qla2xxx/qla2xxx.o due to a stack overflow in
> validate_branch().
>
> Due in part to KASAN being enabled, the qla2xxx code has a large number
> of conditional jumps, causing objtool to go quite deep in its recursion.
>
> By far the biggest offender of stack usage is the recently added
> 'prev_state' stack variable in validate_insn(), coming in at 328 bytes.

That's weird - how can a user-space tool run into stack
limits, are they set particularly conservatively?

In any case, applied to tip:objtool/urgent, thanks!

Ingo