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:	Sat, 6 Jun 2009 22:51:07 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Jaswinder Singh Rajput <jaswinder@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Sam Ravnborg <sam@...nborg.org>, Ingo Molnar <mingo@...e.hu>,
	Catalin Marinas <catalin.marinas@....com>,
	Tony Luck <tony.luck@...el.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Greg Ungerer <gerg@...pgear.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Michael Abbott <michael@...neidae.co.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: [GIT PULL] headers_check fixes

On Sat, Jun 06, 2009 at 10:47:11PM +0100, Russell King wrote:
> What follows this email is the diff of what effect it has on the
> headers copied over - as can be seen, all resulting changes are of
> net benefit.

And here is the patch illustrating the overall change on the installed
header files.  As can be seen, all instances of:

#if defined(__KERNEL__) && ...
...
#endif

are removed, and:

#if !defined(__KERNEL__) || ...
...
#endif

have the conditionals also correctly removed, leaving the code between
properly exposed.

Clearly from the number of differences below, I'm not the only one who
is "ignorant" of this magic new rule about __KERNEL__, and I suggest
that no such rule actually ever existed.

diff -ur include.old/asm/hwcap.h include/asm/hwcap.h
--- include.old/asm/hwcap.h	2009-06-06 19:29:31.000000000 +0100
+++ include/asm/hwcap.h	2009-06-06 22:40:58.000000000 +0100
@@ -20,13 +20,5 @@
 #define HWCAP_VFPv3	8192
 #define HWCAP_VFPv3D16	16384
 
-#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
-/*
- * This yields a mask that user programs can use to figure out what
- * instruction set this cpu supports.
- */
-#define ELF_HWCAP	(elf_hwcap)
-extern unsigned int elf_hwcap;
-#endif
 
 #endif
diff -ur include.old/linux/acct.h include/linux/acct.h
--- include.old/linux/acct.h	2009-06-06 19:29:27.000000000 +0100
+++ include/linux/acct.h	2009-06-06 22:40:55.000000000 +0100
@@ -59,9 +59,7 @@
 	comp_t		ac_majflt;		/* Major Pagefaults */
 	comp_t		ac_swaps;		/* Number of Swaps */
 /* m68k had no padding here. */
-#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
 	__u16		ac_ahz;			/* AHZ */
-#endif
 	__u32		ac_exitcode;		/* Exitcode */
 	char		ac_comm[ACCT_COMM + 1];	/* Command Name */
 	__u8		ac_etime_hi;		/* Elapsed Time MSB */
diff -ur include.old/linux/soundcard.h include/linux/soundcard.h
--- include.old/linux/soundcard.h	2009-06-06 19:29:30.000000000 +0100
+++ include/linux/soundcard.h	2009-06-06 22:40:57.000000000 +0100
@@ -1033,7 +1033,6 @@
  */
 #define LOCL_STARTAUDIO		1
 
-#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
 /*
  *	Some convenience macros to simplify programming of the
  *	/dev/sequencer interface
@@ -1275,4 +1274,3 @@
 		(SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
 
 #endif
-#endif
diff -ur include.old/linux/videodev.h include/linux/videodev.h
--- include.old/linux/videodev.h	2009-06-06 19:29:30.000000000 +0100
+++ include/linux/videodev.h	2009-06-06 22:40:58.000000000 +0100
@@ -16,24 +16,6 @@
 #include <linux/ioctl.h>
 #include <linux/videodev2.h>
 
-#if defined(__MIN_V4L1) && defined (__KERNEL__)
-
-/*
- * Used by those V4L2 core functions that need a minimum V4L1 support,
- * in order to allow V4L1 Compatibilty code compilation.
- */
-
-struct video_mbuf
-{
-	int	size;		/* Total memory to map */
-	int	frames;		/* Frames */
-	int	offsets[VIDEO_MAX_FRAME];
-};
-
-#define VIDIOCGMBUF		_IOR('v',20, struct video_mbuf)		/* Memory map buffer info */
-
-#else
-#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
 
 #define VID_TYPE_CAPTURE	1	/* Can capture */
 #define VID_TYPE_TUNER		2	/* Can tune */
@@ -328,8 +310,6 @@
 #define VID_PLAY_RESET			13
 #define VID_PLAY_END_MARK		14
 
-#endif /* CONFIG_VIDEO_V4L1_COMPAT */
-#endif /* __MIN_V4L1 */
 
 #endif /* __LINUX_VIDEODEV_H */
 
diff -ur include.old/video/edid.h include/video/edid.h
--- include.old/video/edid.h	2009-06-06 19:29:31.000000000 +0100
+++ include/video/edid.h	2009-06-06 22:40:58.000000000 +0100
@@ -1,13 +1,11 @@
 #ifndef __linux_video_edid_h__
 #define __linux_video_edid_h__
 
-#if !defined(__KERNEL__) || defined(CONFIG_X86)
 
 struct edid_info {
 	unsigned char dummy[128];
 };
 
 
-#endif
 
 #endif /* __linux_video_edid_h__ */


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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