Hi all,
After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
produced these warnings:
drivers/input/tests/input_test.o: warning: objtool: input_test_init+0x1cb: stack state mismatch: cfa1=4+64 cfa2=4+56
drivers/gpu/drm/tests/drm_buddy_test.o: warning: objtool: drm_test_buddy_alloc_optimistic+0x3ab: stack state mismatch: cfa1=4+176 cfa2=4+184
drivers/gpu/drm/tests/drm_buddy_test.o: warning: objtool: drm_test_buddy_alloc_pathological+0x741: stack state mismatch: cfa1=4+216 cfa2=4+232
drivers/gpu/drm/tests/drm_buddy_test.o: warning: objtool: drm_test_buddy_alloc_pessimistic+0x486: stack state mismatch: cfa1=4+200 cfa2=4+208
drivers/gpu/drm/tests/drm_buddy_test.o: warning: objtool: drm_test_buddy_alloc_range+0x46e: stack state mismatch: cfa1=4+232 cfa2=4+248
drivers/gpu/drm/tests/drm_mm_test.o: warning: objtool: drm_test_mm_debug+0x1fa: stack state mismatch: cfa1=4+656 cfa2=4+640
lib/kunit/kunit-test.o: warning: objtool: kunit_log_newline_test+0xfb: return with modified stack frame
lib/strscpy_kunit.o: warning: objtool: tc+0x560: stack state mismatch: cfa1=4+128 cfa2=4+136
lib/memcpy_kunit.o: warning: objtool: inner_loop+0x4fc: stack state mismatch: cfa1=4+168 cfa2=4+192
lib/memcpy_kunit.o: warning: objtool: copy_large_test+0xfa: stack state mismatch: cfa1=4+128 cfa2=4+176
lib/stackinit_kunit.o: warning: objtool: test_packed_assigned_dynamic_all+0x2ef: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_assigned_dynamic_all+0x31c: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_assigned_dynamic_all+0x31a: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_dynamic_all+0x2ef: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_dynamic_all+0x31c: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_dynamic_all+0x31a: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_assigned_copy+0x2ef: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_assigned_copy+0x31c: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_assigned_copy+0x31a: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_switch_2_none+0x282: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_switch_1_none+0x282: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_user+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_none+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_none+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_none+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_char_array_none+0x2d3: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u64_none+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u32_none+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u16_none+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u8_none+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_runtime_all+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_assigned_static_all+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_runtime_all+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_assigned_static_all+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_runtime_partial+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_runtime_partial+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_runtime_partial+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_static_all+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_assigned_static_all+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_runtime_all+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_static_all+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_static_all+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_zero+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_assigned_static_partial+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_static_partial+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_zero+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_assigned_static_partial+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_static_partial+0x2ea: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_zero+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_assigned_static_partial+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_static_partial+0x2e8: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_char_array_zero+0x2d3: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u64_zero+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u32_zero+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u16_zero+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_u8_zero+0x2c1: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_assigned_dynamic_partial+0x2c5: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_assigned_dynamic_partial+0x323: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_assigned_dynamic_partial+0x321: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_packed_dynamic_partial+0x2c5: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_trailing_hole_dynamic_partial+0x323: return with modified stack frame
lib/stackinit_kunit.o: warning: objtool: test_small_hole_dynamic_partial+0x321: return with modified stack frame
Presumably introduced by some change to objtool.
--
Cheers,
Stephen Rothwell
Fixes a bunch of warnings like:
drivers/input/tests/input_test.o: warning: objtool: input_test_init+0x1cb: stack state mismatch: cfa1=4+64 cfa2=4+56
lib/kunit/kunit-test.o: warning: objtool: kunit_log_newline_test+0xfb: return with modified stack frame
...
Fixes: 260755184cbd ("kunit: Move kunit_abort() call out of kunit_do_failed_assertion()")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
---
tools/objtool/noreturns.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h
index cede6068ddf6..1514e84d5cc4 100644
--- a/tools/objtool/noreturns.h
+++ b/tools/objtool/noreturns.h
@@ -7,6 +7,7 @@
* Yes, this is unfortunate. A better solution is in the works.
*/
NORETURN(__invalid_creds)
+NORETURN(__kunit_abort)
NORETURN(__module_put_and_kthread_exit)
NORETURN(__reiserfs_panic)
NORETURN(__stack_chk_fail)
--
2.40.1
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: ff9a6459bbec06df7da2545020d7383aba13b3fb
Gitweb: https://git.kernel.org/tip/ff9a6459bbec06df7da2545020d7383aba13b3fb
Author: Josh Poimboeuf <[email protected]>
AuthorDate: Fri, 02 Jun 2023 10:54:53 -07:00
Committer: Peter Zijlstra <[email protected]>
CommitterDate: Fri, 02 Jun 2023 21:12:24 +02:00
objtool: Add __kunit_abort() to noreturns
Fixes a bunch of warnings like:
drivers/input/tests/input_test.o: warning: objtool: input_test_init+0x1cb: stack state mismatch: cfa1=4+64 cfa2=4+56
lib/kunit/kunit-test.o: warning: objtool: kunit_log_newline_test+0xfb: return with modified stack frame
...
Fixes: 260755184cbd ("kunit: Move kunit_abort() call out of kunit_do_failed_assertion()")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Josh Poimboeuf <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/20230602175453.swsn3ehyochtwkhy@treble
---
tools/objtool/noreturns.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h
index cede606..1514e84 100644
--- a/tools/objtool/noreturns.h
+++ b/tools/objtool/noreturns.h
@@ -7,6 +7,7 @@
* Yes, this is unfortunate. A better solution is in the works.
*/
NORETURN(__invalid_creds)
+NORETURN(__kunit_abort)
NORETURN(__module_put_and_kthread_exit)
NORETURN(__reiserfs_panic)
NORETURN(__stack_chk_fail)
On Sat, 3 Jun 2023 at 01:54, Josh Poimboeuf <[email protected]> wrote:
>
> Fixes a bunch of warnings like:
>
> drivers/input/tests/input_test.o: warning: objtool: input_test_init+0x1cb: stack state mismatch: cfa1=4+64 cfa2=4+56
> lib/kunit/kunit-test.o: warning: objtool: kunit_log_newline_test+0xfb: return with modified stack frame
> ...
>
> Fixes: 260755184cbd ("kunit: Move kunit_abort() call out of kunit_do_failed_assertion()")
> Reported-by: Stephen Rothwell <[email protected]>
> Signed-off-by: Josh Poimboeuf <[email protected]>
> ---
Thanks for fixing this. Let me know if we need to find a way to put it
in the kselftest/kunit branch as well, but I suspect it's better off
staying with the objtool one.
Reviewed-by: David Gow <[email protected]>
Cheers,
-- David
> tools/objtool/noreturns.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h
> index cede6068ddf6..1514e84d5cc4 100644
> --- a/tools/objtool/noreturns.h
> +++ b/tools/objtool/noreturns.h
> @@ -7,6 +7,7 @@
> * Yes, this is unfortunate. A better solution is in the works.
> */
> NORETURN(__invalid_creds)
> +NORETURN(__kunit_abort)
> NORETURN(__module_put_and_kthread_exit)
> NORETURN(__reiserfs_panic)
> NORETURN(__stack_chk_fail)
> --
> 2.40.1
>