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, 18 Apr 2008 14:38:55 +1000
From:	Michael Ellerman <michael@...erman.id.au>
To:	Benjamin Herrenschmidt <benh@...abs.org>
Cc:	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>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] Add thread_info_cache_init() to all archs

On Thu, 2008-04-17 at 21:19 -0700, Andrew Morton wrote:
> On Fri, 18 Apr 2008 13:58:06 +1000 Benjamin Herrenschmidt <benh@...abs.org> wrote:
> 
> > 
> > > > > otoh, if only one .c file will ever call this function then I think that
> > > > > all problems are solved by
> > > > > 
> > > > > a) moving the above ifdeffery into the .c file
> > > > > b) adding a comment explaining which arch file must provide the override
> > > > > c) directly including that file from within the .c file.
> > > > 
> > > > I can definitely do that. I have no problem either way. I can add to all
> > > > archs too, it's just that whatever way I choose, some people won't be
> > > > happy with it :-)
> > > > 
> > > > Anyway, I'll move the ifdeferry to init/main.c then.
> > > 
> > > Thanks ;)
> > > 
> > > I'm still wounded by my recent encounter with set_softirq_pending()
> > > and or_softirq_pending().
> > 
> > Well, looking there, I saw we already used weak symbols for that
> 
> Yes, `weak' is a nice solution.  It does add a few bytes of text which we
> could avoid with compile-time trickery, but only a very few.
> 
> Plus this is __init anyway, although I don't know how well the combination
> of `weak' and __init works.
> 
> > +void __init __attribute__((weak) thread_info_cache_init(void)
> 
> s/weak)/weak))/

There's also a #define of this called "__weak" if you like, less typing
and less ugly.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ