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: <20090206145806.GI18368@elte.hu>
Date:	Fri, 6 Feb 2009 15:58:06 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Jaswinder Singh Rajput <jaswinder@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Tony Luck <tony.luck@...el.com>,
	Sam Ravnborg <sam@...nborg.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	hskinnemoen@...el.com, cooloney@...nel.org, ralf@...ux-mips.org,
	dhowells@...hat.com, matthew@....cx, chris@...kel.net,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [git pull -tip] headers_check fixes for other architectures


* Russell King - ARM Linux <linux@....linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 08:04:20PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 14:21 +0000, Russell King - ARM Linux wrote:
> > > On Fri, Feb 06, 2009 at 07:48:42PM +0530, Jaswinder Singh Rajput wrote:
> > > > diff --git a/include/linux/types.h b/include/linux/types.h
> > > > index 712ca53..c30973a 100644
> > > > --- a/include/linux/types.h
> > > > +++ b/include/linux/types.h
> > > > @@ -1,6 +1,7 @@
> > > >  #ifndef _LINUX_TYPES_H
> > > >  #define _LINUX_TYPES_H
> > > >  
> > > > +#ifndef __ASSEMBLY__
> > > >  #ifdef	__KERNEL__
> > > >  
> > > >  #define DECLARE_BITMAP(name,bits) \
> > > > @@ -212,5 +213,5 @@ struct ustat {
> > > >  };
> > > >  
> > > >  #endif	/* __KERNEL__ */
> > > > -
> > > > +#endif /*  __ASSEMBLY__ */
> > > >  #endif /* _LINUX_TYPES_H */
> > > 
> > > So no point including this file in assembly with this patch - the ifndef
> > > disables the entire file.
> > 
> > Truth Table of linux/types.h :
> > 
> > If Assembly then N
> > otherwise Y
> > 
> > what your table says.
> 
> If the entire file is not suitable for assembly, don't include the file
> in assembly files.  Nice and simple, and no need to add additional ifdefs.

Well types.h easily gets included in other files though, which might be 
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
a types.h include.

So making this file an invariant in .S files does not sound like a bad idea 
to me. Is there any downside?

	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

Powered by Openwall GNU/*/Linux Powered by OpenVZ