WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Invalid ELF's running amok!  (Read 2205 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Invalid ELF's running amok!
« on: March 28, 2022, 07:12:23 AM »
Scrolling through dmesg, I noticed that I'm seeing multiples of being warned about invalid ELF's.

System is TinyCorePure64 13.0.

Got a laugh when I read it quickly in dmesg.  I don't want angry little elfs in my system. :)

Did some research and it seems to be either a bug in the kernel elf error detection, or sometimes being something compiled on a different system, and brought back in to linux.

Maybe something in TC compiled in a Windows VM suite, and not on an actual linux system?  Don't know.

Doesn't seem to be bothering anything, I just don't want those little angry elfs to get mad at me later. :)
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Invalid ELF's running amok!
« Reply #1 on: March 28, 2022, 10:02:45 AM »
Hi PDP-8
Add the  syslog  boot code.
Then check if those naughty ELF's show up in  /var/log/messages  or  /var/log/messages.0  too.
Maybe you can narrow it down to one or more extensions, assuming it's not an executable that is part of the base.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Invalid ELF's running amok!
« Reply #2 on: March 28, 2022, 09:44:02 PM »
I think my hardware is haunted, especially because the invalid elfs are random.
I can't find a way to force-reproduce it all the time.

So I tried syslog kernel parameter to look at /var/log/messages ..

Going from memory here, didn't grab the exact message

Even though it did log to the messages file, I noted that in dmesg that syslog was considered and invalid kernel parameter and was being passed on to userspace!  WHAT?  Despite the errant warning, it did klog the messages...

Not much to see about the invalid ELF other than similar this logged about 5 times in a row - seen in both dmesg and /var/log/messages

Kernel: Module has invalid ELF structure

This randomness makes me think that something in my hardware is confusing the system early on when grub kernel additions like "syslog" are reported as invalid, yet still actually do the job!

Fascinating Jim.  I'll have to mind-meld my hardware to find out what exactly is triggering this strange behavior randomly...


That's a UNIX book! - cool  -- Garth

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Invalid ELF's running amok!
« Reply #3 on: March 29, 2022, 02:29:17 AM »
"Kernel: Module has invalid ELF structure" can be ignored, it's an artifact of busybox modprobe.
The only barriers that can stop you are the ones you create yourself.