Re: [PATCH] objtool: check that module init/exit function is an indirect call target

From: Josh Poimboeuf
Date: Wed Jan 25 2023 - 22:33:44 EST


On Wed, Jan 18, 2023 at 11:52:15AM +0100, Michal Kubecek wrote:
> Some out-of-tree modules still do not use module_init() / module_exit()
> macros and simply create functions with magic names init_module() and
> cleanup_module() instead. As a result, these functions are not recognized
> as indirect call targets by objtool and such module fails to load into an
> IBT enabled kernel.

I'm struggling to understand why a manually created init_module()
wouldn't create the ENDBR. Does it only happen when init_module() is
declared static?

--
Josh