From 5bbb19d3d4d7060316e9de09717df8dcb52a489f Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Sat, 20 Nov 2021 22:14:36 +0200 Subject: [PATCH] module: demote invalid ELF header magic error message to pr_debug This happens anytime busybox modprobe loads a compressed module and looks especially ugly on postmarketOS for example (or basically any initramfs); this error is rather pointless since the module is loaded anyway afterwards. Upstream (busybox) has no plans to do anything about this error getting spammed: https://www.mail-archive.com/busybox@busybox.net/msg27078.html --- kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index d02d39c7174e..f99e0e50a6af 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -1661,7 +1661,7 @@ static int elf_validity_check(struct load_info *info) } if (memcmp(info->hdr->e_ident, ELFMAG, SELFMAG) != 0) { - pr_err("Invalid ELF header magic: != %s\n", ELFMAG); + pr_debug("Invalid ELF header magic: != %s\n", ELFMAG); goto no_exec; } if (info->hdr->e_type != ET_REL) {