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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Apr 2009 12:40:32 +0100
From:	David Howells <dhowells@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	dhowells@...hat.com, tj@...nel.org, mingo@...e.hu,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] FRV: Fix the section attribute on UP DECLARE_PER_CPU()


Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> But yeah, I didn't look at all the details. It _looked_ pretty
> straightforward to just move the DEFINE/DECLARE stuff up, but there may well
> be something subtle I'm missing.

The problem is mainly one of #include recursion.  There's way too much of it.

I wonder if we should replace the standard headerfile boilerplate:

	#ifndef _THIS_HEADER_H
	#define _THIS_HEADER_H
	...
	#endif /* _THIS_HEADER_H */

with something a bit nastier:

	#ifndef _THIS_HEADER_H
	#define _THIS_HEADER_H 1
	...
	#undef _THIS_HEADER_H
	#define _THIS_HEADER_H 2
	#elif  _THIS_HEADER_H == 1
	#error Recursive inclusion is not permitted
	#endif /* _THIS_HEADER_H */

and make people break up their header files to avoid getting this error.

There are a number of problems with doing this, of course; the least of which
is that cpp has special code for handling the first case efficiently, IIRC.

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