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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 09 Nov 2007 16:06:12 +0000
From:	Jan Glauber <jang@...ux.vnet.ibm.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Pavel Emelyanov <xemul@...nvz.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jon Masters <jcm@...hat.com>
Subject: Re: Module init call vs symbols exporting race?

On Thu, 2007-11-08 at 13:10 +1100, Rusty Russell wrote:
> On Wednesday 07 November 2007 21:01:30 Jan Glauber wrote:
> > Hi Rusty,
> >
> > I've seen a symbol-resolving race on s390. The qeth module uses symbols
> > from qdio and although the loading order seems correct and the qdio
> > symbols should be available the following error appears:
> >
> > qdio: loading QDIO base support version 2
> > qeth: Unknown symbol qdio_synchronize
> 
> Looks like qdio does something which triggers qeth to load, but of course qdio 
> isn't finished initializing yet so its symbols aren't available.
> 
> It's not obvious what's triggering the load, but you could probably find it by 
> using printk's through qdio.c's init_QDIO().

Digging through the module loader I found what triggers the error...

CPU0 (sys_init_module for qdio)			CPU1 (sys_init_module for qeth)

mutex_lock()
-> load_module()
     mod->state = COMING
mutex_unlock()
						mutex_lock()
init().......takes some time			load_module()
						-> resolve_symbols()
						   -> use_module()
						      -> stong_try_module_get() bails out
							 because state == COMING
						-> simplify_symbols() complains with the warning

mutex_lock()
mod->state = LIVE
mutex_unlock()

So is it correct that sys_init_module() is called for qeth even if qdio is
not yet in MODULE_STATE_LIVE?

-jang

-
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