From: Peter Zijlstra <peterz@infradead.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: objtool: undefined stack state in folio_zero_user()
Date: Tue, 30 Jun 2026 12:44:34 +0200 [thread overview]
Message-ID: <20260630104434.GC751831@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <35822cf3c35fc6621621f858e94a2b0ce19abf88.camel@yandex.ru>
On Mon, Jun 22, 2026 at 04:23:46PM +0300, Dmitry Antipov wrote:
> As of ef0c9f75a195 ("lib: Add stale 'raid6' directory to .gitignore file")
> with clang 22.1.8 and KMSAN enabled, objtool stucks in folio_zero_user():
>
> $ ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr \
> --hacks=skylake --ibt --prefix=16 --orc --retpoline --rethunk \
> --static-call --uaccess --no-unreachable --noinstr --unret --link \
> vmlinux.o
> vmlinux.o: warning: objtool: folio_zero_user+0x947: undefined stack state
> vmlinux.o: error: objtool: folio_zero_user+0x947: unknown CFA base reg -1
>
> Dmitry
> 0000000001533940 <folio_zero_user>:
> 1534272: 48 89 e1 mov %rsp,%rcx
> 1534275: 48 85 ed test %rbp,%rbp
> 1534278: 8b 54 24 1c mov 0x1c(%rsp),%edx
> 153427c: 0f 85 c2 00 00 00 jne 1534344 <folio_zero_user+0xa04>
> 1534282: 31 c0 xor %eax,%eax
> 1534284: 48 89 cc mov %rcx,%rsp
> 1534287: 4c 89 f7 mov %r14,%rdi ;; HERE
...
> 1534327: 48 89 64 24 78 mov %rsp,0x78(%rsp)
...
> 153433a: 48 8b 4c 24 78 mov 0x78(%rsp),%rcx
> 153433f: e9 31 ff ff ff jmp 1534275 <folio_zero_user+0x935>
This is well insane codegen, and I cannot blame objtool for hating on it
-- in fact, I hate on it too.
Let me try and figure out how best to fix this insane compiler output.
next parent reply other threads:[~2026-06-30 10:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <35822cf3c35fc6621621f858e94a2b0ce19abf88.camel@yandex.ru>
2026-06-30 10:44 ` Peter Zijlstra [this message]
2026-06-30 12:31 ` objtool: undefined stack state in folio_zero_user() Dmitry Antipov
2026-06-30 13:54 ` Peter Zijlstra
2026-06-30 14:14 ` Alexander Potapenko
2026-06-30 17:41 ` Peter Zijlstra
2026-06-30 20:24 ` Peter Zijlstra
2026-06-30 18:36 ` Thomas Gleixner
2026-07-01 15:18 ` Alexander Potapenko
2026-07-01 16:23 ` Alexander Potapenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630104434.GC751831@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=dmantipov@yandex.ru \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox