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] [day] [month] [year] [list]
Message-Id: <8A7DAE34-9F83-44FF-A24A-F4A62C37DC36@mac.com>
Date:	Sat, 7 Oct 2006 19:35:58 -0400
From:	Kyle Moffett <mrmacman_g4@....com>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Jeff Garzik <jeff@...zik.org>, Al Viro <viro@....linux.org.uk>,
	Linus Torvalds <torvalds@...l.org>,
	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] minimal alpha pt_regs fixes

On Oct 07, 2006, at 14:27:08, Sam Ravnborg wrote:
> It would be even more simple and future proof if we could in some  
> way do it so "#include <foo/bar.h>" would pick up bar.h from asm-$ 
> (ARCH) if it exists and otherwise pick up asm-generic/bar.h.
>
> Then we could include the generic one in asm-generic and all  
> architectures would include it except those that provide their own  
> variant. The asm-$(ARCH) specific files would need a way to include  
> the asm-generic version.
>
> I have no idea handy for how to actually implement this but wanted  
> just to share the idea. The trade-off is that if it gets too  
> implicit then suddenly users will loose overview of how it works.

Well if we changed the include dir to look like this:

   include/linux/bar.h
   include/asm/foo.h
   include/asm-powerpc/asm/foo.h
   include/asm-frv/asm/foo.h doesn't exist, defaults to generic version.

Then I suppose you could carefully order the -I directives like this:

   gcc [...] -Iinclude/asm-$(ARCH) -Iinclude [...]

The problem with that is if you only want to partially override asm/ 
foo.h, and include it from your arch-specific version.  I guess to  
solve that you could also do this:

   include/linux/bar.h
   include/asm-generic/asm/foo.h
   include/asm-powerpc/asm/foo.h
   include/asm-frv/asm/foo.h doesn't exist, defaults to generic version.

And:

   gcc [...] -Iinclude/asm-$(ARCH) -Iinclude/asm-generic -Iinclude [...]

Then you it would be possible to selectively override any headers you  
wanted too.  It also gets rid of that nasty symlink problem.  The  
only remaining trick would be teaching "headers_check" and  
"headers_install" about it.

Cheers,
Kyle Moffett

-
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