[tip: objtool/urgent] objtool: Fix STACK_FRAME_NON_STANDARD for cold subfunctions

tip-bot2 for Josh Poimboeuf posted 1 patch 8 months, 3 weeks ago
tools/objtool/check.c | 2 ++
1 file changed, 2 insertions(+)
[tip: objtool/urgent] objtool: Fix STACK_FRAME_NON_STANDARD for cold subfunctions
Posted by tip-bot2 for Josh Poimboeuf 8 months, 3 weeks ago
The following commit has been merged into the objtool/urgent branch of tip:

Commit-ID:     b5e2cc57f551a1a1e2c0ea36f77c1e26d3d13c35
Gitweb:        https://git.kernel.org/tip/b5e2cc57f551a1a1e2c0ea36f77c1e26d3d13c35
Author:        Josh Poimboeuf <jpoimboe@kernel.org>
AuthorDate:    Thu, 27 Mar 2025 22:04:22 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 28 Mar 2025 14:47:02 +01:00

objtool: Fix STACK_FRAME_NON_STANDARD for cold subfunctions

The recent STACK_FRAME_NON_STANDARD refactoring forgot about .cold
subfunctions.  They must also be ignored.

Fixes the following warning:

  drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_recv_msg.cold+0x0: unreachable instruction

Fixes: c84301d706c5 ("objtool: Ignore entire functions rather than instructions")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/70a09ec0b0704398b2bbfb3153ce3d7cb8a381be.1743136205.git.jpoimboe@kernel.org
---
 tools/objtool/check.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 29de170..fff9d7a 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1014,6 +1014,8 @@ static int add_ignores(struct objtool_file *file)
 		}
 
 		func->ignore = true;
+		if (func->cfunc)
+			func->cfunc->ignore = true;
 	}
 
 	return 0;