lists.openwall.net   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  linux-cve-announce  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:	Mon, 4 Feb 2008 18:42:15 +0300
From:	Alexey Dobriyan <adobriyan@...ru>
To:	akpm@...l.org
Cc:	rusty@...tcorp.com.au, linux-kernel@...r.kernel.org
Subject: [PATCH] Whine about suspicious return values from module's ->init() hook

One head-scratching session could be noticeably shorter with this patch...

Signed-off-by: Alexey Dobriyan <adobriyan@...ru>
---

 kernel/module.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2171,6 +2171,12 @@ sys_init_module(void __user *umod,
 		wake_up(&module_wq);
 		return ret;
 	}
+	if (ret > 0) {
+		printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d\n"
+		       KERN_WARNING "%s: loading module anyway...\n",
+		       __func__, mod->name, ret,
+		       __func__);
+	}
 
 	/* Now it's a first class citizen! */
 	mutex_lock(&module_mutex);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ