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

From: Andrew Morton

Date: Wed Sep 02 2026 - 20:53:12 EST


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?