objtool fixes and updates
Linus,
Please pull the latest objtool/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2025-03-28
# HEAD: ae958b12940bcd4ffa32c44684e4f2878bc5e140 objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC
[ Merge note: not all driver fixes below have maintainer acks. ]
These are objtool fixes and updates centered around the fallout from the new CONFIG_OBJTOOL_WERROR=y feature, which, despite its default-off nature, increased the profile/impact of objtool warnings:
- Improve error handling and the presentation of warnings/errors.
- In particular reduce the verbosity of objtool warnings if a function triggers a check already - it's unlikely that followup warnings are useful after the first warning is triggered.
- Fix a number of objtool warnings in various drivers, core kernel code and architecture code. About half of them are potential problems related to out-of-bounds accesses or potential undefined behavior, the other half are additional objtool annotations.
- Update objtool to latest (known) compiler quirks and objtool bugs triggered by compiler code generation
Thanks,
Ingo
------------------>
Josh Poimboeuf (25):
objtool: Fix detection of consecutive jump tables on Clang 20
objtool: Warn when disabling unreachable warnings
objtool: Ignore entire functions rather than instructions
objtool: Fix X86_FEATURE_SMAP alternative handling
objtool: Fix CONFIG_OBJTOOL_WERROR for vmlinux.o
objtool: Fix init_module() handling
objtool: Silence more KCOV warnings
objtool: Properly disable uaccess validation
objtool: Improve error handling
objtool: Reduce CONFIG_OBJTOOL_WERROR verbosity
objtool: Fix up some outdated references to ENTRY/ENDPROC
objtool: Remove --no-unreachable for noinstr-only vmlinux.o runs
objtool: Remove redundant opts.noinstr dependency
objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
objtool, nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show() objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
objtool, panic: Disable SMAP in __stack_chk_fail()
objtool, Input: cyapa - Remove undefined behavior in cyapa_update_fw_store() objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler() objtool, regulator: rk808: Remove potential undefined behavior in rk806_set_mode_dcdc() objtool, lkdtm: Obfuscate the do_nothing() pointer
objtool: Fix NULL printf() '%s' argument in builtin-check.c:save_argv()
objtool: Fix segfault in ignore_unreachable_insn()
objtool: Fix STACK_FRAME_NON_STANDARD for cold subfunctions
objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC
arch/x86/include/asm/arch_hweight.h | 6 +- arch/x86/include/asm/smap.h | 23 +- arch/x86/include/asm/xen/hypercall.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 2 +- drivers/input/mouse/cyapa.c | 4 +- drivers/media/dvb-frontends/dib8000.c | 5 +- drivers/misc/lkdtm/perms.c | 14 +- drivers/nvme/target/debugfs.c | 2 +- drivers/regulator/rk808-regulator.c | 4 +- drivers/spi/spi-amd.c | 2 +- include/linux/linkage.h | 4 - include/linux/objtool.h | 2 +- kernel/panic.c | 6 + scripts/Makefile.lib | 2 +- scripts/Makefile.vmlinux_o | 15 +- sound/soc/codecs/wcd934x.c | 2 +- tools/objtool/Documentation/objtool.txt | 10 +- tools/objtool/arch/x86/special.c | 38 +-- tools/objtool/builtin-check.c | 146 +++++---- tools/objtool/check.c | 527 ++++++++++++++++---------------- tools/objtool/elf.c | 28 +- tools/objtool/include/objtool/builtin.h | 6 +- tools/objtool/include/objtool/check.h | 3 +- tools/objtool/include/objtool/elf.h | 28 +- tools/objtool/include/objtool/objtool.h | 2 +- tools/objtool/include/objtool/special.h | 4 +- tools/objtool/include/objtool/warn.h | 13 +- tools/objtool/objtool.c | 11 +- tools/objtool/special.c | 12 +- 29 files changed, 472 insertions(+), 455 deletions(-)
Quoted 9 lines · Ingo Molnar
Linus,
Please pull the latest objtool/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2025-03-28 # HEAD: ae958b12940bcd4ffa32c44684e4f2878bc5e140 objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC[ Merge note: not all driver fixes below have maintainer acks. ]
Btw, test bot complains:
https://lore.kernel.org/r/[email protected]
Date: Sat, 29 Mar 2025 22:29:12 +0800
From: kernel test robot <[email protected]>
To: x86-ml <[email protected]>
Cc: [email protected]
Subject: [tip:objtool/urgent] BUILD REGRESSION ae958b12940bcd4ffa32c44684e4f2878bc5e140
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message, but I've dropped this pull request for now. Ingo?
Linus
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message
I found this:
https://lore.kernel.org/r/[email protected]
which looks like the original report.
Looks unsolved yet...
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteJosh Poimboeuf
maintainerQuoted 9 lines · Borislav Petkov
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message
Quoted 7 lines
I found this:
https://lore.kernel.org/r/[email protected]
which looks like the original report.
Looks unsolved yet...
The "new" warning is just the "skipping duplicate warning", which was already merged with commit 0a7fb6f07e3a ("objtool: Increase per-function WARN_FUNC() rate limit"). So none of the warnings are specific to this pull request.
Tiezhu, can you please look at this warning?
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
Signature · 1 line
Josh
Quoted 23 lines · Josh Poimboeuf
Quoted 9 lines · Borislav Petkov
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message
Quoted 7 lines
I found this:
https://lore.kernel.org/r/[email protected]
which looks like the original report.
Looks unsolved yet...
The "new" warning is just the "skipping duplicate warning", which was already merged with commit
0a7fb6f07e3a("objtool: Increase per-functionWARN_FUNC()rate limit"). So none of the warnings are specific to this pull request.
Quoted 4 lines
Tiezhu, can you please look at this warning?
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
I'm wondering why LKP didn't pick up the primary warning, only the final warning that skips duplicate warnings, which is kinda totally useless in isolation:
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)
Maybe we should just do what is below - output a single warning, a bit like lockdep.
Or delay the reporting to until the entire pass is finished, and output something like:
warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 [2+ more warnings]
Note: we shouldn't output the real warning count - just that it's multiple warnings that might or might not be resolved by fixing the primary warning.
Or something like that.
Thanks,
Ingo
============>
tools/objtool/include/objtool/warn.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
tools/objtool/include/objtool/warn.h +1 -3
@@ -57,7 +57,7 @@ static inline char *offstr(struct section *sec, unsigned long offset)free (_str); \ }) -#define WARN_LIMIT 2 +#define WARN_LIMIT 1#define WARN_INSN (insn, format, ...) \ ({ \
@@ -69,8 +69,6 @@ static inline char *offstr(struct section *sec, unsigned long offset)if (_insn->sym) \ _insn->sym->warnings++; \ }else if (_insn->sym && _insn->sym->warnings ==WARN_LIMIT ) { \ -WARN_FUNC ("skipping duplicate warning(s)" , \ - _insn->sec, _insn->offset); \ _insn->sym->warnings++; \ } \ })
Josh Poimboeuf
maintainerQuoted 3 lines · Ingo Molnar
I'm wondering why LKP didn't pick up the primary warning, only the final warning that skips duplicate warnings, which is kinda totally useless in isolation:
At least it alerted us to the other loongarch warnings we hadn't seen ;-)
Quoted 4 lines
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)
Maybe we should just do what is below - output a single warning, a bit like lockdep.
Yeah, "skipping duplicate warnings" isn't technically a warning so it probably shouldn't be presented as one.
I'll just revert 0a7fb6f07e3a and go back to the simple "one warning per function" which worked fine before.
Signature · 1 line
Josh
Quoted 6 lines · Josh Poimboeuf
Quoted 3 lines · Ingo Molnar
I'm wondering why LKP didn't pick up the primary warning, only the final warning that skips duplicate warnings, which is kinda totally useless in isolation:
At least it alerted us to the other loongarch warnings we hadn't seen ;-)
There's that :-)
Quoted 10 lines
Quoted 4 lines
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)
Maybe we should just do what is below - output a single warning, a bit like lockdep.
Yeah, "skipping duplicate warnings" isn't technically a warning so it probably shouldn't be presented as one.
I'll just revert
0a7fb6f07e3aand go back to the simple "one warning per function" which worked fine before.
Thanks! Our experience with lockdep is that the fewer warnings per build/bootup, the better: the value of secondary warnings is diminishing, sometimes even negative.
It might even be OK to generate just one objtool warning per .o file.
Ingo
Josh Poimboeuf
maintainerQuoted 23 lines · Josh Poimboeuf
Quoted 9 lines · Borislav Petkov
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message
Quoted 7 lines
I found this:
https://lore.kernel.org/r/[email protected]
which looks like the original report.
Looks unsolved yet...
The "new" warning is just the "skipping duplicate warning", which was already merged with commit
0a7fb6f07e3a("objtool: Increase per-functionWARN_FUNC()rate limit"). So none of the warnings are specific to this pull request.
Quoted 4 lines
Tiezhu, can you please look at this warning?
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
Here's a fix. Will post a real fix soon, along with another pile of fixes.
arch/loongarch/include/asm/stacktrace.h +3 -0
@@ -8,6 +8,7 @@#include <asm/asm.h> #include <asm/ptrace.h> #include <asm/loongarch.h> +#include <asm/unwind_hints.h> #include <linux/stringify.h> enum stack_type {
@@ -43,6 +44,7 @@ int get_stack_info(unsigned long stack, struct task_struct *task, struct stack_i static __always_inline void prepare_frametrace(struct pt_regs *regs) { __asm__ __volatile__( + UNWIND_HINT_SAVE /* Save $ra */ STORE_ONE_REG(1)/* Use $ra to save PC */
@@ -80,6 +82,7 @@ static __always_inline void prepare_frametrace(struct pt_regs *regs) STORE_ONE_REG(29) STORE_ONE_REG(30) STORE_ONE_REG(31) + UNWIND_HINT_RESTORE : "=m" (regs->csr_era) : "r" (regs->regs) : "memory");
arch/loongarch/include/asm/unwind_hints.h +9 -1
@@ -23,6 +23,14 @@ UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_CALL .endm -#endif /* __ASSEMBLY__ */ +#else /* !__ASSEMBLY__ */ + +#define UNWIND_HINT_SAVE \ + UNWIND_HINT(UNWIND_HINT_TYPE_SAVE, 0, 0, 0) + +#define UNWIND_HINT_RESTORE \ + UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0) + +#endif /* !__ASSEMBLY__ */ #endif /* _ASM_LOONGARCH_UNWIND_HINTS_H */
Quoted 24 lines · Josh Poimboeuf
Quoted 23 lines · Josh Poimboeuf
Quoted 9 lines · Borislav Petkov
Quoted 7 lines · Linus Torvalds
Quoted 4 lines · Borislav Petkov
Btw, test bot complains:
That's not a very helpful error message
Quoted 7 lines
I found this:
https://lore.kernel.org/r/[email protected]
which looks like the original report.
Looks unsolved yet...
The "new" warning is just the "skipping duplicate warning", which was already merged with commit
0a7fb6f07e3a("objtool: Increase per-functionWARN_FUNC()rate limit"). So none of the warnings are specific to this pull request.
Quoted 7 lines
Quoted 4 lines
Tiezhu, can you please look at this warning?
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152Here's a fix. Will post a real fix soon, along with another pile of fixes.
And just to make it clear, these objtool warnings were not a new regression, they were introduced more than a year ago, via:
cb8a2ef0848c ("LoongArch: Add ORC stack unwinder support")
So, to bring this thread to a conclusion, I think by getting rid of the summary warning line:
c5610071a69d ("Revert "objtool: Increase per-function WARN_FUNC() rate limit"")
... the CI test-bots ought to be back to the v6.14 baseline even taking such false positives into account.
I'll send the updated objtool/urgent tree to Linus later today, unless some last-minute problem pops up.
Thanks,
Ingo
Quoted 7 lines · Borislav Petkov
Quoted 6 lines · Ingo Molnar
Linus,
Please pull the latest objtool/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2025-03-28
Quoted 7 lines
Quoted 3 lines
# HEAD: ae958b12940bcd4ffa32c44684e4f2878bc5e140 objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC[ Merge note: not all driver fixes below have maintainer acks. ]
Btw, test bot complains:
AFAICS that particular report is not a new regression, but essentially a test-bot false positive due to a reporting change, because the objtool warning output changed.
This can be seen in the full report:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152Quoted 1 line
Quoted 1 line
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: skipping duplicate warning(s)
Note how '>>' is the new warning - the summary line added recently that suggests that there's more warnings. It appears to me the test-bot considers the other warnings old regressions, but I couldn't find any trace of them being reported before. Maybe they weren't Cc:-ed to lkml.
Or maybe these *are* all new warnings. I've Cc:-ed the LKP folks.
To add confusion to confusion, the test bot also incorrectly attributed ae958b1294 for that new warning line, and incorrectly categorized it as a 'recent_error':
recent_errors
`-- loongarch-randconfig-001-20250328
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)
While the commit that added this new reporting line is:
0a7fb6f07e3a ("objtool: Increase per-function WARN_FUNC() rate limit")
... which is a few weeks old and already upstream. We didn't get a loongson related test-bot regression report for that commit or any other commits, other than the weeks-late & self-contradictory report against ae958b1294.
So something's wonky with the test-bot reporting in this particular case for loongson, or my parsing thereof.
Thanks,
Ingo
Quoted 30 lines · Ingo Molnar
Quoted 7 lines · Borislav Petkov
Quoted 6 lines · Ingo Molnar
Linus,
Please pull the latest objtool/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2025-03-28Quoted 7 lines
Quoted 3 lines
# HEAD: ae958b12940bcd4ffa32c44684e4f2878bc5e140 objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC[ Merge note: not all driver fixes below have maintainer acks. ]
Btw, test bot complains:
AFAICS that particular report is not a new regression, but essentially a test-bot false positive due to a reporting change, because the objtool warning output changed.
This can be seen in the full report:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
Quoted 8 lines
Quoted 1 line
Quoted 1 line
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: skipping duplicate warning(s)Note how '>>' is the new warning - the summary line added recently that suggests that there's more warnings. It appears to me the test-bot considers the other warnings old regressions, but I couldn't find any trace of them being reported before. Maybe they weren't Cc:-ed to lkml.
Or maybe these *are* all new warnings. I've Cc:-ed the LKP folks.
Hi Ingo and all, sorry for confusion, here only the line with >> is considered as new warning, due to the commit 0a7fb6f07e3a you mentioned.
From the bot logic, the "stack state mismatch" are not regression (not new warnings), which already exists in earlier commit.
Quoted 9 lines
To add confusion to confusion, the test bot also incorrectly attributed
ae958b1294for that new warning line, and incorrectly categorized it as a 'recent_error':
recent_errors
`-- loongarch-randconfig-001-20250328
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)
Quoted 8 lines
While the commit that added this new reporting line is:
0a7fb6f07e3a("objtool: Increase per-functionWARN_FUNC()rate limit")... which is a few weeks old and already upstream. We didn't get a loongson related test-bot regression report for that commit or any other commits, other than the weeks-late & self-contradictory report against
ae958b1294.
For 0a7fb6f07e3a, the bot only reported 2 times on x86 [1][2]. For this loongarch report, the bisection is wrong and is a false positive, I will further check. Meanwhile, the bot will ignore the bisection of this new objtool message as it is not really a new kernel issue.
[1] https://lore.kernel.org/oe-kbuild-all/[email protected]/
[2] https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 8 lines
So something's wonky with the test-bot reporting in this particular case for loongson, or my parsing thereof.
Thanks,
Ingo
Quoted 4 lines · Philip Li
For
0a7fb6f07e3a, the bot only reported 2 times on x86 [1][2]. For this loongarch report, the bisection is wrong and is a false positive, I will further check. Meanwhile, the bot will ignore the bisection of this new objtool message as it is not really a new kernel issue.
Can you guys get a human being to double-check and vet those reports?! Please!
Because we kinda trust them but
1. they're not really helpful and hard to understand what you're reporting
2. that summary thing is especially useless:
"Error/Warning ids grouped by kconfigs:
recent_errors
`-- loongarch-randconfig-001-20250328
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)"
When I see this, I need to go look for the original reports and somehow scratch them together. And you have all that info, why don't you simply dump a URL with the bug materials so that one can inspect them?
3. Last but not least, if this doesn't change I will start ignoring them. Because they're not really helping - on the contrary - they're actively interfering.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 7 lines · Borislav Petkov
Quoted 4 lines · Philip Li
For
0a7fb6f07e3a, the bot only reported 2 times on x86 [1][2]. For this loongarch report, the bisection is wrong and is a false positive, I will further check. Meanwhile, the bot will ignore the bisection of this new objtool message as it is not really a new kernel issue.Can you guys get a human being to double-check and vet those reports?! Please!
Really sorry, we will add more strict check of objtool warnings. We have logic to detect the low confidence one and send to https://lore.kernel.org/oe-kbuild/
for manual check before sending out. But there's still case that we fail to detect.
Quoted 9 lines
Because we kinda trust them but
1. they're not really helpful and hard to understand what you're reporting
2. that summary thing is especially useless:
"Error/Warning ids grouped by kconfigs:
Quoted 7 lines
recent_errors
`-- loongarch-randconfig-001-20250328
`-- arch-loongarch-kernel-traps.o:warning:objtool:show_stack:skipping-duplicate-warning(s)"When I see this, I need to go look for the original reports and somehow scratch them together. And you have all that info, why don't you simply dump a URL with the bug materials so that one can inspect them?
I will also check this as it is designed to have link together with reported error in the summary. It is another bug that the bot should be fixed.
Quoted 4 lines
3. Last but not least, if this doesn't change I will start ignoring them. Because they're not really helping - on the contrary - they're actively interfering.
Apologize again, we will continue improving the bot to make it really useful.
Quoted 8 lines
Thx.
Signature · 4 lines
Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette
Quoted 2 lines · Philip Li
I will also check this as it is designed to have link together with reported error in the summary. It is another bug that the bot should be fixed.
Please.
Quoted 1 line
Apologize again, we will continue improving the bot to make it really useful.
Thanks, I appreciate the effort.
If you need guinea pigs to look at reports and give you feedback, holler!
:-)
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 11 lines · Borislav Petkov
Quoted 2 lines · Philip Li
I will also check this as it is designed to have link together with reported error in the summary. It is another bug that the bot should be fixed.
Please.
Quoted 1 line
Apologize again, we will continue improving the bot to make it really useful.
Thanks, I appreciate the effort.
If you need guinea pigs to look at reports and give you feedback, holler!
Got it, thanks a lot!
Quoted 10 lines
:-)
Thx.
Signature · 4 lines
Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette
Quoted 38 lines · Philip Li
Quoted 37 lines · Ingo Molnar
Quoted 7 lines · Borislav Petkov
Quoted 6 lines · Ingo Molnar
Linus,
Please pull the latest objtool/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2025-03-28Quoted 7 lines
Quoted 3 lines
# HEAD: ae958b12940bcd4ffa32c44684e4f2878bc5e140 objtool, drm/vmwgfx: Don't ignore vmw_send_msg() for ORC[ Merge note: not all driver fixes below have maintainer acks. ]
Btw, test bot complains:
AFAICS that particular report is not a new regression, but essentially a test-bot false positive due to a reporting change, because the objtool warning output changed.
This can be seen in the full report:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152Quoted 1 line
Quoted 1 line
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: skipping duplicate warning(s)Note how '>>' is the new warning - the summary line added recently that suggests that there's more warnings. It appears to me the test-bot considers the other warnings old regressions, but I couldn't find any trace of them being reported before. Maybe they weren't Cc:-ed to lkml.
Quoted 4 lines
Quoted 1 line
Or maybe these *are* all new warnings. I've Cc:-ed the LKP folks.
Hi Ingo and all, sorry for confusion, here only the line with >> is considered as new warning, due to the commit
0a7fb6f07e3ayou mentioned.
Oh, so the loongson 'stack state mismatch' warnings started sometime in the past, but were never reported by the bot? Or were they reported somewhere? I'd like to discover the timeline of those warnings, if that's possible.
Thanks,
Ingo
Josh Poimboeuf
maintainerQuoted 17 lines · Ingo Molnar
Quoted 17 lines
Quoted 16 lines
This can be seen in the full report:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152Quoted 1 line
Quoted 1 line
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: skipping duplicate warning(s)Note how '>>' is the new warning - the summary line added recently that suggests that there's more warnings. It appears to me the test-bot considers the other warnings old regressions, but I couldn't find any trace of them being reported before. Maybe they weren't Cc:-ed to lkml.
Or maybe these *are* all new warnings. I've Cc:-ed the LKP folks.
Quoted 7 lines
Quoted 2 lines
Hi Ingo and all, sorry for confusion, here only the line with >> is considered as new warning, due to the commit
0a7fb6f07e3ayou mentioned.Oh, so the loongson 'stack state mismatch' warnings started sometime in the past, but were never reported by the bot? Or were they reported somewhere? I'd like to discover the timeline of those warnings, if that's possible.
I believe those warnings were introduced a year ago with:
cb8a2ef0848c ("LoongArch: Add ORC stack unwinder support")
but I wasn't able to find the original report.
Signature · 1 line
Josh
Quoted 26 lines · Josh Poimboeuf
Quoted 17 lines · Ingo Molnar
Quoted 17 lines
Quoted 16 lines
This can be seen in the full report:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152Quoted 1 line
Quoted 1 line
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: skipping duplicate warning(s)Note how '>>' is the new warning - the summary line added recently that suggests that there's more warnings. It appears to me the test-bot considers the other warnings old regressions, but I couldn't find any trace of them being reported before. Maybe they weren't Cc:-ed to lkml.
Or maybe these *are* all new warnings. I've Cc:-ed the LKP folks.
Quoted 7 lines
Quoted 2 lines
Hi Ingo and all, sorry for confusion, here only the line with >> is considered as new warning, due to the commit
0a7fb6f07e3ayou mentioned.Oh, so the loongson 'stack state mismatch' warnings started sometime in the past, but were never reported by the bot? Or were they reported somewhere? I'd like to discover the timeline of those warnings, if that's possible.
Quoted 5 lines
I believe those warnings were introduced a year ago with:
cb8a2ef0848c("LoongArch: Add ORC stack unwinder support")but I wasn't able to find the original report.
Hi Ingo and Josh, for this cb8a2ef0848c commit, the bot has reported at [1] but with a different randconfig and a different issue pattern. And the bot didn't report new ones as it considered the bad commit was already reported.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master commit: cb8a2ef0848ca80d67d6d56e2df757cfdf6b3355 LoongArch: Add ORC stack unwinder support config: loongarch-randconfig-002-20240812
(https://download.01.org/0day-ci/archive/20240812/[email protected]/config)
WARNING: modpost: missing MODULE_DESCRIPTION() in net/ieee802154/6lowpan/ieee802154_6lowpan.o >> ERROR: modpost: "kvm_restore_lsx" [arch/loongarch/kvm/kvm.ko] undefined! >> ERROR: modpost: "kvm_restore_lasx" [arch/loongarch/kvm/kvm.ko] undefined!
Later, there's fix at [2], but seems it doesn't solve all possible issues since the bot didn't report out explicitly.
[1] https://lore.kernel.org/oe-kbuild-all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
Thanks
Quoted 3 lines
Signature · 2 lines
-- Josh
Hi all,
Sorry for the late reply.
(1) The following objtool warnings:
modpost: "kvm_restore_lsx" [arch/loongarch/kvm/kvm.ko] undefined!
modpost: "kvm_restore_lasx" [arch/loongarch/kvm/kvm.ko] undefined!
have been fixed and merged (2024-08-26):
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80376323e2b6
There are "Reported-by" and "Closes" tags in the commit message.
(2) I did not meet the following objtool warnings before this merge window:
arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160 arch/loongarch/kernel/traps.o: warning: objtool: show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
and I did not notice the robot report due to there are many unread mails in my inbox, I will try to reproduce it and take a deeper look at the problem, maybe it is related with some special configs.
Thanks,
Tiezhu
Josh Poimboeuf
maintainerQuoted 11 lines · Tiezhu Yang
(2) I did not meet the following objtool warnings before this merge window:
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152and I did not notice the robot report due to there are many unread mails in my inbox, I will try to reproduce it and take a deeper look at the problem, maybe it is related with some special configs.
I actually already have a patch for it, will post soon.
Signature · 1 line
Josh
Quoted 9 lines · Josh Poimboeuf
Quoted 8 lines · Tiezhu Yang
(2) I did not meet the following objtool warnings before this merge window:
arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: stack state mismatch: reg1[22]=-1+0 reg2[22]=-2-160arch/loongarch/kernel/traps.o: warning: objtool:show_stack+0xe0: stack state mismatch: reg1[23]=-1+0 reg2[23]=-2-152
Quoted 5 lines
Quoted 3 lines
and I did not notice the robot report due to there are many unread mails in my inbox, I will try to reproduce it and take a deeper look at the problem, maybe it is related with some special configs.
I actually already have a patch for it, will post soon.
Thanks for the fix, I will test it once you post it.
I can confirm that the objtool warning is not related with the patches in the branch objtool/urgent of tip.git, it is related with CONFIG_STACKPROTECTOR which is default y, but CONFIG_STACKPROTECTOR is not set in the robot randconfig loongarch-randconfig-001-20250328 [1], there is no objtool warning if CONFIG_STACKPROTECTOR is set.
I can also reproduce this issue when compiling with v6.14 if CONFIG_STACKPROTECTOR is not set.
[1] https://download.01.org/0day-ci/archive/20250328/[email protected]/config
Thanks,
Tiezhu
The pull request you sent on Fri, 28 Mar 2025 22:18:57 +0100:
The pull request you sent on Fri, 28 Mar 2025 22:18:57 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitobjtool-urgent-2025-03-28
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/55c78035a1a8dfb05f1472018ce2a651701adb7d
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html