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]
Message-Id: <20070527105718.19e1198d.akpm@linux-foundation.org>
Date:	Sun, 27 May 2007 10:57:18 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Andi Kleen <ak@...e.de>
Cc:	Sam Ravnborg <sam@...nborg.org>, Indan Zupancic <indan@....nu>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Andrey Borzenkov <arvidjaar@...l.ru>,
	linux-kernel@...r.kernel.org, Bernhard Walle <bwalle@...e.de>
Subject: Re: [PATCH] x86: fix section mismatch warnings in mtrr

On Sun, 27 May 2007 11:56:21 +0200 Andi Kleen <ak@...e.de> wrote:

> 
> > 
> > So section mismatch warnings are more about catching sloopy usage of __init than it is to
> > catch potential kernel oopesen. But the latter is a nice side effect that is appreciated.
> 
> My point was that I cannot recall a single real oops bug found by the compile
> time checking.

There are quite a few of these fixes where you look at it and wonder "ytf
did the kernel ever work"?  I suspect that it's partly a case of the code
reading random junk from where a flag used to be and continuing to work.
CONFIG_DEBUG_PAGEALLOC would have caught it.

Also, simply lack of testing coverage: few people have the correct
hardware, the correct config options and then go and do an rmmod+insmod. 
Even fewer do a CPU hotplug.  Fewer still do a memory hotplug.

But there are a lot of fixes, and a lot of warnings, and they are real bugs.

> We had a few in the past, but since we poison init data after boot they all tended
> to be found quickly anyways.

Sometimes.  But a common pattern is "discover something at boot time and
save it away for later boot-time code".  The storage gets marked __fooinit
and then it turns out that some non-boot-time initialisation code is using
it.

> But the warnings just seem to require endless changes and bogus changes
> (randomly moving code which was actually ok because it only called 
> in the init case).

That would be a false positive.  We do need the various tools to suppress
those so that we can find new bugs as they turn up.

You're right that it's all a complete pain.  But the fault doesn't lie with
the checking code, IMO.  It's just that the whole initdata thing is hard to
get right.  All this fuss for a couple hundred kbytes - any sane
organisation would have killed the whole thing years ago ;)

It'll really get to be fun when some smarty writes us a "non __init symbol
referred to only from __init code" checker.

-
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