Re: INVALID ELF STRUCTURES

Luis Chamberlain <[email protected]> Tue, 21 Dec 2021 13:44:54 -0800
Newsgroups gmane.linux.kernel.modules,gmane.linux.newbie
Message-ID <YcJK1rPwQVu/[email protected]>
On Tue, Dec 21, 2021 at 11:54:09AM -0500, Eliyam Levy wrote:
> Hi,
> 
> I'm on Ubuntu 20.04 with kernel version 5.11 and I keep hitting the
> "Module has invalid ELF structures" error on a kernel module I'm
> building. I know this is related to the "harden ELF info handling"
> patch that was introduced. Are there any useful ways to debug this? Is
> there anything I should be mindful of when building the kernel module
> to avoid this?

Look for the already merged patch, "module: change to print useful
messages from elf_validity_check()".

$ git describe --contains 7fd982f394c42f25a73fe9dfbf1e6b11fa26b40a
v5.16-rc1~95^2    

  Luis