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:	Mon, 26 Oct 2009 12:21:11 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Pekka Enberg <penberg@...helsinki.fi>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tools: Kill off -Wcast-align


* Pekka Enberg <penberg@...helsinki.fi> wrote:

> * Paul Mundt <lethal@...ux-sh.org> wrote:
> >> > The present use of -Wcast-align causes the build to blow up on SH due to
> >> > generating a "cast increases required alignment of target type" error on
> >> > each invocation of list_for_each_entry().
> >> >
> >> > It seems that this was previously reported and killed off in the ia64
> >> > support patch, but nothing seems to have happened with that. Presumably
> >> > the same problem still remains there, too.
> >> >
> >> > Signed-off-by: Paul Mundt <lethal@...ux-sh.org>
> 
> On Mon, Oct 26, 2009 at 07:25:20AM +0100, Ingo Molnar wrote:
> >> Is this a GCC bug producing false positive warnings? The GCC manpage
> >> says:
> >>
> >>        -Wcast-align
> >>            Warn whenever a pointer is cast such that the required alignment of the
> >>            target is increased.  For example, warn if a "char *" is cast to an
> >>            "int *" on machines where integers can only be accessed at two- or
> >>            four-byte boundaries.
> >>
> >> Which looks moderately useful - if it works.
> 
> On Mon, Oct 26, 2009 at 11:47 AM, Paul Mundt <lethal@...ux-sh.org> wrote:
>
> > Well, both ia64 and sh have hit this in the current compilers, and 
> > it doesn't seem to pose any code generation issues. In the areas 
> > where it is generated it seems to relate to 64-bit data types in the 
> > data structures, which in itself doesn't seem inherently 
> > problematic.
> >
> > I'll submit a bug report to the GCC folks, but for the time being 
> > given that multiple architectures are hitting this and it doesn't 
> > seem to be causing any issues, it would be better to have this flag 
> > dropped.
> 
> Can we disable the flag for affected architectures but keep it enabled 
> for x86?

For now i've applied Paul's fix - x86 doesnt have such type restrictions 
and i dont remember this warning having flagged some real data structure 
alignment bug anywhere.

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