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-prev] [day] [month] [year] [list]
Date:	Sat, 04 Jul 2009 12:01:34 -0600
From:	Robert Hancock <hancockrwd@...il.com>
To:	"Robert P. J. Day" <rpjday@...shcourse.ca>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: value of returning positive error code from module_init()?

On 07/04/2009 10:38 AM, Robert P. J. Day wrote:
>    whoops, i forgot to ask this as well.  accidentally, i returned a
> positive value from a module_init() routine, which loaded the module
> and generated in /var/log/messages:
>
> ...
> Jul  4 12:34:43 localhost kernel: hi module being loaded.
> Jul  4 12:34:43 localhost kernel: sys_init_module: 'hi'->init
> suspiciously returned 42, it should follow 0/-E convention
> Jul  4 12:34:43 localhost kernel: sys_init_module: loading module
> anyway...
> Jul  4 12:34:43 localhost kernel: Pid: 3881, comm: insmod Tainted: G
> M       2.6.29.5-191.fc11.x86_64 #1
> Jul  4 12:34:43 localhost kernel: Call Trace:
> Jul  4 12:34:43 localhost kernel: [<ffffffff8106f33b>]
> sys_init_module+0x13e/0x1cd
> Jul  4 12:34:43 localhost kernel: [<ffffffff8101133a>]
> system_call_fastpath+0x16
> ...
>
>    i'd never seen that before, i guess because i never returned a
> positive error code.  is there a tradition for returning positive
> values?  for what purpose?  thanks.

My guess would be no, hence the warning you're not supposed to do it..
--
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