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:	Thu, 31 May 2007 21:54:07 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Prarit Bhargava <prarit@...hat.com>
Cc:	Christoph Lameter <clameter@....com>,
	"Luck, Tony" <tony.luck@...el.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	David Chinner <dgc@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>, linux-ia64@...r.kernel.org
Subject: Re: BUG: sleeping function called from invalid context at kernel/fork.c:385

On Thu, May 31, 2007 at 11:20:27AM -0400, Prarit Bhargava wrote:
> 
> 
> Christoph Lameter wrote:
> >On Wed, 30 May 2007, Luck, Tony wrote:
> >
> >  
> >>>Ahh okay. cscope will do that too.... But all have __exit.
> >>>      
> >>The trick is that one of them *shouldn't* have __exit.  With cscope
> >>you'll have to use the "Find functions calling this function:"
> >>mode to try and find the __init function that is calling an
> >>__exit function.
> >>    
> >
> >Urgh... Does it have to be that difficult?
> >-
> >  
> 
> 
> Sometimes yes ... but in this case no.
> 
> I flipped config options on and off until I tracked the problem down 
> into the loopback driver, and then manually ran modpost on 
> drivers/block/built-in.o to reveal:
> 
> ....Nothing. 
> 
> Something is borken in modpost because I found a bug in the loopback 
> code which is a _REAL_ bug.

In the initial version of the section mismatch check code
I ignored references to .exit.text from .init.text code.
Today I do not see why this should be allowed.
So unless an allmodconfig build for i386 + maybe a few more archs
does not show any significant regressions I will enable this check.

My initial i386 allmodconfig build pointed out a number of places
where this happened (I lost the warnings and are doing a rebuild now)A
.
One such place is microcode.c where we has

static int __init microcode_init (void)
{
	...

	if (IS_ERR(microcode_pdev)) {
		microcode_dev_exit();
		return PTR_ERR(microcode_pdev);
	}

And:
static void __exit microcode_dev_exit (void)
{
	misc_deregister(&microcode_dev);
}

I assume this is a real bug that we have not triggered
during testing becasue this is in an error-path.

The linker will not error out because .exit.text are discarded
at run-time at least for i386.

	Sam
-
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