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, 17 Oct 2008 12:36:54 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"David S. Miller" <davem@...emloft.net>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	David Howells <dhowells@...hat.com>
Subject: Re: [announce] new tree: "fix all build warnings, on all configs"

 > the drivers/net/mlx4/mcg.c commit you pointed out is one of the very few 
 > borderline cases: the code gets neither better, nor worse.

Yes, I agree exactly.  As long as there are not too many such cases
(since every commit has some cost just from causing churn) then we are
OK, I think.

 > If you look at the totality of fixes they are not common at all. (and
 > almost by definition the 100-200 unfixed warnings that we have piled
 > up in -git are the _problematic_ cases - clear-cut cases tend to be
 > fixed.)

Yes, and I think that merging such changes makes the most sense as part
of a project such as yours that wants to kill all warnings.  I looked at
the mcg.c warning and found the same workaround, but in the context of
my maintenance work, I just reported the gcc bug and lived with the
warning when using gcc 4.3.

By the way, just out of curiousity, how are you dealing with warnings
about "format not a string literal and no format arguments" caused by
code like arch/x86/kernel/dumpstack_64.c:

static void print_trace_address(void *data, unsigned long addr, int reliable)
{
	touch_nmi_watchdog();
	printk(data);
	printk_address(addr, reliable);
}

and also cases like:

	char *name;

	//...

	kobject_set_name(obj, name);

(I get these with gcc "(Ubuntu 4.3.2-1ubuntu10) 4.3.2")

 > i certainly have a found a couple of such cases, see tip/warnings/ugly - 
 > for example see the one below where gcc is not able to see through type 
 > width.

Yes, the uninitialized variable warnings are obnoxious too.  By the way,
I think this:

@@ -72,7 +72,7 @@ static __always_inline void *__constant_memcpy(void *to, const void *from,
 		return to;
 	case 5:
 		*(int *)to = *(int *)from;
-		*((char *)to + 4) = *((char *)from + 4);
+		*((short *)to + 3) = *((short *)from + 3);
 		return to;
 	case 6:
 		*(int *)to = *(int *)from;

is actually *wrong*, because the cast operator binds tighter than
addition -- so

+		*((short *)to + 3) = *((short *)from + 3);

actually copies bytes at offset 6 and 7; I think what you intended was:

+		*((short *)(to + 3)) = *((short *)(from + 3));

which illustrates the risks in fixing warnings.

 - R.
--
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