Re: [PATCH] scripts/checkstack.pl: support llvm-objdump disassembly for x86

From: Nick Desaulniers

Date: Thu Sep 03 2026 - 13:00:46 EST


On Wed, Sep 2, 2026 at 5:51 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, 02 Sep 2026 14:01:53 -0700 Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote:
>
> > When running `make LLVM=1 checkstack`, OBJDUMP is set to llvm-objdump.
> > llvm-objdump outputs disassembly with instruction size suffixes (such as
> > subq/addq/subl/addl), tabs/whitespace differences, spaces after commas,
> > and trailing comments (e.g. `# imm = 0x...`).
> >
> > Because scripts/checkstack.pl used rigid regular expressions specifically
> > tuned to GNU objdump format (e.g. requiring exactly four spaces, no
> > suffix, and no space after comma), checkstack.pl failed to match any
> > stack adjustment instructions and yielded no output when using
> > llvm-objdump on x86.
> >
> > Update the regular expressions for x86 to match optional suffixes,
> > variable whitespace, and trailing comments.
>
> OK, so checkstack is broken with LLVM.
>
> Users of checkstack/LLVM in earlier kernels won't like that, so
> should we backport this with cc:stable?
>

/me looks around

yeah, all...one of us!

I'm kidding, thanks for picking up the patch.

--
Thanks,
~Nick Desaulniers