lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Sep 2021 18:14:42 -0600
From:   Shuah Khan <>
Cc:     Shuah Khan <>,
Subject: [PATCH] module: fix invalid ELF structure error to print error code

When elf_validity_check() returns error, load_module() prints an
error message without error code. It is hard to determine why the
module ELF structure is invalid without this information. Fix the
error message to print the error code.

Signed-off-by: Shuah Khan <>
 kernel/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index 40ec9a030eec..a0d412d396d6 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3941,7 +3941,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 	err = elf_validity_check(info);
 	if (err) {
-		pr_err("Module has invalid ELF structures\n");
+		pr_err("Module has invalid ELF structures:errno(%ld)\n", err);
 		goto free_copy;

Powered by blists - more mailing lists