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:	Wed, 21 May 2008 21:06:59 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	benh@...nel.crashing.org, Linux-Arch <linux-arch@...r.kernel.org>,
	linux-m32r@...linux-m32r.org, takata@...ux-m32r.org,
	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	Paul Mackerras <paulus@...ba.org>,
	Luke Browning <LukeBrowning@...ibm.com>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs

On Wed, May 21, 2008 at 11:41:47AM -0700, Andrew Morton wrote:
> On Wed, 21 May 2008 13:56:25 -0400 Benjamin Herrenschmidt <benh@...nel.crashing.org> wrote:
> 
> > 
> > On Fri, 2008-04-18 at 16:44 +1000, Benjamin Herrenschmidt wrote:
> > > > > so what
> > > > > about the patch below ?
> > > > 
> > > > I like it, but the compiler won't ;)
> > > > 
> > > > > If you're ok, I'll re-send with appropriate sob
> > > > > & adapted powerpc part.
> > > > 
> > > > Sure.
> > > > 
> > > > > +void __init __attribute__((weak) thread_info_cache_init(void)
> > > >
> > 
> > Back to this old subject...
> > 
> > I'm having reports that this is not working...
> > 
> > gcc is seeing the empty weak function and is optimizing it out
> > before it gets a chance to link to the arch provided one.
> > 
> > This would affect that and the other one next to it..
> > 
> > That seems pretty bad... it causes nasty crashes as we end up having no
> > idea what the compiler decided to generate... I suppose we could keep
> > the weak stubs out of the file where they are called but that sucks.
> > 
> > ie. This is some form of gcc 4.1.1
> > 
> > Is that a known problem ? A gcc issue ? Not sure what is expected from
> > those weak functions.
> 
> yup, gcc bug.  Discussed recently on lkml, "Subject: Re: huge gcc
> 4.1.{0,1} __weak problem".  I don't think anything ended up happening
> about it though.

It was discussed to add some run-time checks for this issue.
But the examples given were a bit fluffy so I never integrated anything
i kbuild to detect this.

As this is only a bug for const weak functions they could be made non-const
if they are seldomly used?

	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