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: <45E392E8.1010908@zytor.com>
Date:	Mon, 26 Feb 2007 18:09:44 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Kyle Moffett <mrmacman_g4@....com>
CC:	Christoph Hellwig <hch@...radead.org>,
	David Miller <davem@...emloft.net>, a.gruenbacher@...puter.org,
	bunk@...sta.de, linux-kernel@...r.kernel.org, jmorris@...hat.com,
	dwmw2@...radead.org
Subject: Re: include/linux/xattr.h: how much userpace visible?

Kyle Moffett wrote:
> 
> Not a bad idea, but it could use some extra error checking to make sure 
> that somebody remembers to "#define __kstruct_foo" before "#include 
> <linux/foo.h>" (perhaps indirectly through linux/bar.h).  Maybe 
> something like this (plays nice with the very-basic unifdef parsing too):
> 
> #ifdef __KERNEL__
> # define __kstruct_stat stat
> # define __kstruct_foo foo
> # define __kstruct_bar bar
> #endif
> 
> #ifdef __LINUX_KERNEL_EXPORT
> # define __kstruct_stat stat
> # define __kstruct_foo foo
> # define __kstruct_bar bar
> #endif
> 
> #ifndef __kstruct_stat
> # error "Missing definition of __kstruct_stat, please insert:"
> # error "  #define __kstruct_stat <name-for-stat-struct>"
> # error "into your C file before '#include <linux/foo.h>'"
> #endif
> struct __kstruct_stat {
> }
> 
> Someone who wanted to keep the name __kstruct_stat could of course 
> "#define __kstruct_stat __kstruct_stat" easily.
> 

True, but if someone makes errors on that level in your libc, don't you 
think the fact that gcc will throw an error is sufficient?  Writing that 
kind of error generators is a lot of work, and probably for little gain.

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