linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL -tip] fix 22 make headers_check - 200901
@ 2009-01-24 12:56 Jaswinder Singh Rajput
  2009-01-24 13:43 ` Jaswinder Singh Rajput
  2009-02-04  6:43 ` Herbert Xu
  0 siblings, 2 replies; 17+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-24 12:56 UTC (permalink / raw)
  To: Ingo Molnar, x86 maintainers, Sam Ravnborg, H. Peter Anvin,
	jirislaby, gregkh, David Miller, Trent Piepho, Arnd Bergmann,
	Mauro Carvalho Chehab, Jens Axboe, linux-media, LKML

The following changes since commit aa52dcf69565512e7d285c1c40dc6e56aab6f789:
  Ingo Molnar (1):
        Merge branch 'x86/urgent'

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

Jaswinder Singh Rajput (11):
      headers_check fix: linux/dvb/audio.h
      headers_check fix: linux/acct.h
      headers_check fix: linux/elf.h
      headers_check fix: linux/flat.h
      headers_check fix: linux/hid.h
      headers_check fix: linux/if_frad.h
      headers_check fix: linux/types.h
      headers_check fix: linux/videodev.h
      headers_check fix: x86, kvm.h
      headers_check fix: x86, swab.h
      headers_check fix: video/edid.h

 arch/x86/include/asm/kvm.h  |    2 +-
 arch/x86/include/asm/swab.h |   12 +++++++++---
 include/linux/acct.h        |    2 +-
 include/linux/dvb/audio.h   |    5 -----
 include/linux/elf.h         |    3 ++-
 include/linux/flat.h        |    6 +++---
 include/linux/hid.h         |    2 ++
 include/linux/if_frad.h     |    9 +--------
 include/linux/types.h       |    2 ++
 include/linux/videodev.h    |   10 ++++++++--
 include/video/edid.h        |    2 +-
 11 files changed, 30 insertions(+), 25 deletions(-)

This patchset solves following 'make headers_check' warnings:

  CHECK   include/linux/dvb (8 files)
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/dvb/audio.h:133: found __[us]{8,16,32,64} type without #include <linux/types.h>
  CHECK   include/linux (348 files)
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/acct.h:62: leaks CONFIG_M68K to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/elf.h:379: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/elf.h:387: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/elf.h:401: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/elf.h:402: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/flat.h:16: leaks CONFIG_BINFMT to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/hid.h:66: leaks CONFIG_HID to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/hid.h:69: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/hid.h:76: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/if_frad.h:29: leaks CONFIG_DLCI to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/if_frad.h:129: leaks CONFIG_DLCI to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/types.h:114: leaks CONFIG_LBD to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/videodev.h:19: leaks CONFIG_VIDEO to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/linux/videodev.h:314: leaks CONFIG_VIDEO to userspace where it is not valid
  CHECK   include/video (3 files)
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/video/edid.h:4: leaks CONFIG_X86 to userspace where it is not valid
  CHECK   include/asm (52 files)
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/kvm.h:9: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/kvm.h:16: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/swab.h:7: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/swab.h:10: leaks CONFIG_X86 to userspace where it is not valid
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/swab.h:40: leaks CONFIG_X86 to userspace where it is not valid

diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
index b95162a..d2e3bf3 100644
--- a/arch/x86/include/asm/kvm.h
+++ b/arch/x86/include/asm/kvm.h
@@ -6,7 +6,7 @@
  *
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* Architectural interrupt line count. */
diff --git a/arch/x86/include/asm/swab.h b/arch/x86/include/asm/swab.h
index 306d417..292a9d1 100644
--- a/arch/x86/include/asm/swab.h
+++ b/arch/x86/include/asm/swab.h
@@ -1,13 +1,19 @@
 #ifndef _ASM_X86_SWAB_H
 #define _ASM_X86_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_BSWAP
+# define __X86_BSWAP
+# endif /* CONFIG_X86_BSWAP */
+#endif /* __KERNEL__ */
+
 static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
 {
 #ifdef __i386__
-# ifdef CONFIG_X86_BSWAP
+# ifdef __X86_BSWAP
 	asm("bswap %0" : "=r" (val) : "0" (val));
 # else
 	asm("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
@@ -37,7 +43,7 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
 		__u64 u;
 	} v;
 	v.u = val;
-# ifdef CONFIG_X86_BSWAP
+# ifdef __X86_BSWAP
 	asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
 	    : "=r" (v.s.a), "=r" (v.s.b)
 	    : "0" (v.s.a), "1" (v.s.b));
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 882dc72..ad7b5ab 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -59,7 +59,7 @@ struct acct
 	comp_t		ac_majflt;		/* Major Pagefaults */
 	comp_t		ac_swaps;		/* Number of Swaps */
 /* m68k had no padding here. */
-#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
+#if !defined(__mc68000__) || !defined(__KERNEL__)
 	__u16		ac_ahz;			/* AHZ */
 #endif
 	__u32		ac_exitcode;		/* Exitcode */
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
index 89412e1..bb0df2a 100644
--- a/include/linux/dvb/audio.h
+++ b/include/linux/dvb/audio.h
@@ -24,12 +24,7 @@
 #ifndef _DVBAUDIO_H_
 #define _DVBAUDIO_H_
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
-
 
 typedef enum {
 	AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 0b61ca4..45a937b 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -377,6 +377,7 @@ typedef struct elf64_note {
   Elf64_Word n_type;	/* Content type */
 } Elf64_Nhdr;
 
+#ifdef __KERNEL__
 #if ELF_CLASS == ELFCLASS32
 
 extern Elf32_Dyn _DYNAMIC [];
@@ -404,5 +405,5 @@ static inline int elf_coredump_extra_notes_write(struct file *file,
 extern int elf_coredump_extra_notes_size(void);
 extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset);
 #endif
-
+#endif /* __KERNEL__ */
 #endif /* _LINUX_ELF_H */
diff --git a/include/linux/flat.h b/include/linux/flat.h
index ec56852..076fff7 100644
--- a/include/linux/flat.h
+++ b/include/linux/flat.h
@@ -12,15 +12,15 @@
 
 #ifdef __KERNEL__
 #include <asm/flat.h>
-#endif
-
-#define	FLAT_VERSION			0x00000004L
 
 #ifdef CONFIG_BINFMT_SHARED_FLAT
 #define	MAX_SHARED_LIBS			(4)
 #else
 #define	MAX_SHARED_LIBS			(1)
 #endif
+#endif /* __KERNEL__ */
+
+#define	FLAT_VERSION			0x00000004L
 
 /*
  * To make everything easier to port and manage cross platform
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 81aa84d..fa8ee9c 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -791,6 +791,7 @@ dbg_hid(const char *fmt, ...)
 		__FILE__ , ## arg)
 #endif /* HID_FF */
 
+#ifdef __KERNEL__
 #ifdef CONFIG_HID_COMPAT
 #define HID_COMPAT_LOAD_DRIVER(name)	\
 /* prototype to avoid sparse warning */	\
@@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name)
 	extern void hid_compat_##name(void);	\
 	hid_compat_##name();			\
 } while (0)
+#endif /* __KERNEL__ */
 
 #endif
 
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 5c34240..468a6fc 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -26,8 +26,6 @@
 
 #include <linux/if.h>
 
-#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
-
 /* Structures and constants associated with the DLCI device driver */
 
 struct dlci_add
@@ -190,12 +188,7 @@ struct frad_local
    int               buffer;		/* current buffer for S508 firmware */
 };
 
-#endif /* __KERNEL__ */
-
-#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
-
-#ifdef __KERNEL__
 extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
-#endif
 
+#endif /* __KERNEL__ */
 #endif
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..a6eea14 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -130,6 +130,7 @@ typedef		__s64		int64_t;
 #define aligned_be64 __be64 __attribute__((aligned(8)))
 #define aligned_le64 __le64 __attribute__((aligned(8)))
 
+#ifdef __KERNEL__
 /**
  * The type used for indexing onto a disc or disc partition.
  *
@@ -145,6 +146,7 @@ typedef u64 blkcnt_t;
 typedef unsigned long sector_t;
 typedef unsigned long blkcnt_t;
 #endif
+#endif /* __KERNEL__ */
 
 /*
  * The type of an index into the pagecache.  Use a #define so asm/types.h
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 837f392..9faabb2 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -16,7 +16,13 @@
 #include <linux/ioctl.h>
 #include <linux/videodev2.h>
 
-#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
+#ifndef __KERNEL__
+# define __V4L1_COMPAT_API	/* Always provide definitions to user space */
+#elif defined(CONFIG_VIDEO_V4L1_COMPAT) /* __KERNEL__ */
+# define __V4L1_COMPAT_API
+#endif /* CONFIG_VIDEO_V4L1_COMPAT */
+
+#ifdef __V4L1_COMPAT_API
 
 #define VID_TYPE_CAPTURE	1	/* Can capture */
 #define VID_TYPE_TUNER		2	/* Can tune */
@@ -311,7 +317,7 @@ struct video_code
 #define VID_PLAY_RESET			13
 #define VID_PLAY_END_MARK		14
 
-#endif /* CONFIG_VIDEO_V4L1_COMPAT */
+#endif /* __V4L1_COMPAT_API */
 
 #endif /* __LINUX_VIDEODEV_H */
 
diff --git a/include/video/edid.h b/include/video/edid.h
index 928c342..02decc5 100644
--- a/include/video/edid.h
+++ b/include/video/edid.h
@@ -1,7 +1,7 @@
 #ifndef __linux_video_edid_h__
 #define __linux_video_edid_h__
 
-#if !defined(__KERNEL__) || defined(CONFIG_X86)
+#if !defined(__KERNEL__) || defined(__i386__) || defined(__x86_64__)
 
 struct edid_info {
 	unsigned char dummy[128];



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-01-24 12:56 [GIT PULL -tip] fix 22 make headers_check - 200901 Jaswinder Singh Rajput
@ 2009-01-24 13:43 ` Jaswinder Singh Rajput
  2009-01-26 12:50   ` Ingo Molnar
  2009-02-04  6:43 ` Herbert Xu
  1 sibling, 1 reply; 17+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-24 13:43 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: x86 maintainers, Sam Ravnborg, H. Peter Anvin, jirislaby, gregkh,
	David Miller, Trent Piepho, Arnd Bergmann, Mauro Carvalho Chehab,
	Jens Axboe, linux-media, LKML

On Sat, 2009-01-24 at 18:26 +0530, Jaswinder Singh Rajput wrote:
> The following changes since commit aa52dcf69565512e7d285c1c40dc6e56aab6f789:
>   Ingo Molnar (1):
>         Merge branch 'x86/urgent'
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master
> 
> Jaswinder Singh Rajput (11):
>       headers_check fix: linux/dvb/audio.h
>       headers_check fix: linux/acct.h
>       headers_check fix: linux/elf.h
>       headers_check fix: linux/flat.h
>       headers_check fix: linux/hid.h
>       headers_check fix: linux/if_frad.h

'headers_check fix: linux/if_frad.h' is dropped because of some issues.
So here is new pull request:

The following changes since commit aa52dcf69565512e7d285c1c40dc6e56aab6f789:
  Ingo Molnar (1):
        Merge branch 'x86/urgent'

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

Jaswinder Singh Rajput (10):
      headers_check fix: linux/dvb/audio.h
      headers_check fix: linux/acct.h
      headers_check fix: linux/elf.h
      headers_check fix: linux/flat.h
      headers_check fix: linux/hid.h
      headers_check fix: linux/types.h
      headers_check fix: linux/videodev.h
      headers_check fix: x86, kvm.h
      headers_check fix: x86, swab.h
      headers_check fix: video/edid.h

 arch/x86/include/asm/kvm.h  |    2 +-
 arch/x86/include/asm/swab.h |   12 +++++++++---
 include/linux/acct.h        |    2 +-
 include/linux/dvb/audio.h   |    5 -----
 include/linux/elf.h         |    3 ++-
 include/linux/flat.h        |    6 +++---
 include/linux/hid.h         |    2 ++
 include/linux/types.h       |    2 ++
 include/linux/videodev.h    |   10 ++++++++--
 include/video/edid.h        |    2 +-
 10 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
index b95162a..d2e3bf3 100644
--- a/arch/x86/include/asm/kvm.h
+++ b/arch/x86/include/asm/kvm.h
@@ -6,7 +6,7 @@
  *
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* Architectural interrupt line count. */
diff --git a/arch/x86/include/asm/swab.h b/arch/x86/include/asm/swab.h
index 306d417..292a9d1 100644
--- a/arch/x86/include/asm/swab.h
+++ b/arch/x86/include/asm/swab.h
@@ -1,13 +1,19 @@
 #ifndef _ASM_X86_SWAB_H
 #define _ASM_X86_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_BSWAP
+# define __X86_BSWAP
+# endif /* CONFIG_X86_BSWAP */
+#endif /* __KERNEL__ */
+
 static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
 {
 #ifdef __i386__
-# ifdef CONFIG_X86_BSWAP
+# ifdef __X86_BSWAP
 	asm("bswap %0" : "=r" (val) : "0" (val));
 # else
 	asm("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
@@ -37,7 +43,7 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
 		__u64 u;
 	} v;
 	v.u = val;
-# ifdef CONFIG_X86_BSWAP
+# ifdef __X86_BSWAP
 	asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
 	    : "=r" (v.s.a), "=r" (v.s.b)
 	    : "0" (v.s.a), "1" (v.s.b));
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 882dc72..ad7b5ab 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -59,7 +59,7 @@ struct acct
 	comp_t		ac_majflt;		/* Major Pagefaults */
 	comp_t		ac_swaps;		/* Number of Swaps */
 /* m68k had no padding here. */
-#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
+#if !defined(__mc68000__) || !defined(__KERNEL__)
 	__u16		ac_ahz;			/* AHZ */
 #endif
 	__u32		ac_exitcode;		/* Exitcode */
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
index 89412e1..bb0df2a 100644
--- a/include/linux/dvb/audio.h
+++ b/include/linux/dvb/audio.h
@@ -24,12 +24,7 @@
 #ifndef _DVBAUDIO_H_
 #define _DVBAUDIO_H_
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
-
 
 typedef enum {
 	AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 0b61ca4..45a937b 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -377,6 +377,7 @@ typedef struct elf64_note {
   Elf64_Word n_type;	/* Content type */
 } Elf64_Nhdr;
 
+#ifdef __KERNEL__
 #if ELF_CLASS == ELFCLASS32
 
 extern Elf32_Dyn _DYNAMIC [];
@@ -404,5 +405,5 @@ static inline int elf_coredump_extra_notes_write(struct file *file,
 extern int elf_coredump_extra_notes_size(void);
 extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset);
 #endif
-
+#endif /* __KERNEL__ */
 #endif /* _LINUX_ELF_H */
diff --git a/include/linux/flat.h b/include/linux/flat.h
index ec56852..076fff7 100644
--- a/include/linux/flat.h
+++ b/include/linux/flat.h
@@ -12,15 +12,15 @@
 
 #ifdef __KERNEL__
 #include <asm/flat.h>
-#endif
-
-#define	FLAT_VERSION			0x00000004L
 
 #ifdef CONFIG_BINFMT_SHARED_FLAT
 #define	MAX_SHARED_LIBS			(4)
 #else
 #define	MAX_SHARED_LIBS			(1)
 #endif
+#endif /* __KERNEL__ */
+
+#define	FLAT_VERSION			0x00000004L
 
 /*
  * To make everything easier to port and manage cross platform
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 81aa84d..fa8ee9c 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -791,6 +791,7 @@ dbg_hid(const char *fmt, ...)
 		__FILE__ , ## arg)
 #endif /* HID_FF */
 
+#ifdef __KERNEL__
 #ifdef CONFIG_HID_COMPAT
 #define HID_COMPAT_LOAD_DRIVER(name)	\
 /* prototype to avoid sparse warning */	\
@@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name)
 	extern void hid_compat_##name(void);	\
 	hid_compat_##name();			\
 } while (0)
+#endif /* __KERNEL__ */
 
 #endif
 
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..a6eea14 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -130,6 +130,7 @@ typedef		__s64		int64_t;
 #define aligned_be64 __be64 __attribute__((aligned(8)))
 #define aligned_le64 __le64 __attribute__((aligned(8)))
 
+#ifdef __KERNEL__
 /**
  * The type used for indexing onto a disc or disc partition.
  *
@@ -145,6 +146,7 @@ typedef u64 blkcnt_t;
 typedef unsigned long sector_t;
 typedef unsigned long blkcnt_t;
 #endif
+#endif /* __KERNEL__ */
 
 /*
  * The type of an index into the pagecache.  Use a #define so asm/types.h
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 837f392..9faabb2 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -16,7 +16,13 @@
 #include <linux/ioctl.h>
 #include <linux/videodev2.h>
 
-#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
+#ifndef __KERNEL__
+# define __V4L1_COMPAT_API	/* Always provide definitions to user space */
+#elif defined(CONFIG_VIDEO_V4L1_COMPAT) /* __KERNEL__ */
+# define __V4L1_COMPAT_API
+#endif /* CONFIG_VIDEO_V4L1_COMPAT */
+
+#ifdef __V4L1_COMPAT_API
 
 #define VID_TYPE_CAPTURE	1	/* Can capture */
 #define VID_TYPE_TUNER		2	/* Can tune */
@@ -311,7 +317,7 @@ struct video_code
 #define VID_PLAY_RESET			13
 #define VID_PLAY_END_MARK		14
 
-#endif /* CONFIG_VIDEO_V4L1_COMPAT */
+#endif /* __V4L1_COMPAT_API */
 
 #endif /* __LINUX_VIDEODEV_H */
 
diff --git a/include/video/edid.h b/include/video/edid.h
index 928c342..02decc5 100644
--- a/include/video/edid.h
+++ b/include/video/edid.h
@@ -1,7 +1,7 @@
 #ifndef __linux_video_edid_h__
 #define __linux_video_edid_h__
 
-#if !defined(__KERNEL__) || defined(CONFIG_X86)
+#if !defined(__KERNEL__) || defined(__i386__) || defined(__x86_64__)
 
 struct edid_info {
 	unsigned char dummy[128];




^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-01-24 13:43 ` Jaswinder Singh Rajput
@ 2009-01-26 12:50   ` Ingo Molnar
  0 siblings, 0 replies; 17+ messages in thread
From: Ingo Molnar @ 2009-01-26 12:50 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: x86 maintainers, Sam Ravnborg, H. Peter Anvin, jirislaby, gregkh,
	David Miller, Trent Piepho, Arnd Bergmann, Mauro Carvalho Chehab,
	Jens Axboe, linux-media, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Sat, 2009-01-24 at 18:26 +0530, Jaswinder Singh Rajput wrote:
> > The following changes since commit aa52dcf69565512e7d285c1c40dc6e56aab6f789:
> >   Ingo Molnar (1):
> >         Merge branch 'x86/urgent'
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master
> > 
> > Jaswinder Singh Rajput (11):
> >       headers_check fix: linux/dvb/audio.h
> >       headers_check fix: linux/acct.h
> >       headers_check fix: linux/elf.h
> >       headers_check fix: linux/flat.h
> >       headers_check fix: linux/hid.h
> >       headers_check fix: linux/if_frad.h
> 
> 'headers_check fix: linux/if_frad.h' is dropped because of some issues.
> So here is new pull request:
> 
> The following changes since commit aa52dcf69565512e7d285c1c40dc6e56aab6f789:
>   Ingo Molnar (1):
>         Merge branch 'x86/urgent'
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master
> 
> Jaswinder Singh Rajput (10):
>       headers_check fix: linux/dvb/audio.h
>       headers_check fix: linux/acct.h
>       headers_check fix: linux/elf.h
>       headers_check fix: linux/flat.h
>       headers_check fix: linux/hid.h
>       headers_check fix: linux/types.h
>       headers_check fix: linux/videodev.h
>       headers_check fix: x86, kvm.h
>       headers_check fix: x86, swab.h
>       headers_check fix: video/edid.h
> 
>  arch/x86/include/asm/kvm.h  |    2 +-
>  arch/x86/include/asm/swab.h |   12 +++++++++---
>  include/linux/acct.h        |    2 +-
>  include/linux/dvb/audio.h   |    5 -----
>  include/linux/elf.h         |    3 ++-
>  include/linux/flat.h        |    6 +++---
>  include/linux/hid.h         |    2 ++
>  include/linux/types.h       |    2 ++
>  include/linux/videodev.h    |   10 ++++++++--
>  include/video/edid.h        |    2 +-
>  10 files changed, 29 insertions(+), 17 deletions(-)

Pulled into tip/core/header-fixes, thanks Jaswinder!

	Ingo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-01-24 12:56 [GIT PULL -tip] fix 22 make headers_check - 200901 Jaswinder Singh Rajput
  2009-01-24 13:43 ` Jaswinder Singh Rajput
@ 2009-02-04  6:43 ` Herbert Xu
  2009-02-04  8:04   ` Jaswinder Singh Rajput
  1 sibling, 1 reply; 17+ messages in thread
From: Herbert Xu @ 2009-02-04  6:43 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: mingo, x86, sam, hpa, jirislaby, gregkh, davem, xyzzy, arnd,
	mchehab, jens.axboe, linux-media, linux-kernel, Avi Kivity

Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>
> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
> index b95162a..d2e3bf3 100644
> --- a/arch/x86/include/asm/kvm.h
> +++ b/arch/x86/include/asm/kvm.h
> @@ -6,7 +6,7 @@
>  *
>  */
> 
> -#include <asm/types.h>
> +#include <linux/types.h>
> #include <linux/ioctl.h>

Awesome, you've just broken the userspace build of kvm as the
file linux/types.h conflicts with sys/types.h.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04  6:43 ` Herbert Xu
@ 2009-02-04  8:04   ` Jaswinder Singh Rajput
  2009-02-04  8:12     ` Avi Kivity
                       ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-04  8:04 UTC (permalink / raw)
  To: Herbert Xu
  Cc: mingo, x86, sam, hpa, jirislaby, gregkh, davem, xyzzy, arnd,
	mchehab, jens.axboe, linux-media, linux-kernel, Avi Kivity

On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
> Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
> >
> > diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
> > index b95162a..d2e3bf3 100644
> > --- a/arch/x86/include/asm/kvm.h
> > +++ b/arch/x86/include/asm/kvm.h
> > @@ -6,7 +6,7 @@
> >  *
> >  */
> > 
> > -#include <asm/types.h>
> > +#include <linux/types.h>
> > #include <linux/ioctl.h>
> 
> Awesome, you've just broken the userspace build of kvm as the
> file linux/types.h conflicts with sys/types.h.
> 

What I did is absolutely right.

If there is any conflict then we need to solve it in better way.

Can you please share what is the conflict and what you are expecting and
what you are getting.

Thanks,
--
JSR


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04  8:04   ` Jaswinder Singh Rajput
@ 2009-02-04  8:12     ` Avi Kivity
  2009-02-04  8:13     ` Avi Kivity
  2009-02-04 11:55     ` Arnd Bergmann
  2 siblings, 0 replies; 17+ messages in thread
From: Avi Kivity @ 2009-02-04  8:12 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Herbert Xu, mingo, x86, sam, hpa, jirislaby, gregkh, davem,
	xyzzy, arnd, mchehab, jens.axboe, linux-media, linux-kernel

Jaswinder Singh Rajput wrote:
> On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
>   
>> Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>>     
>>> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
>>> index b95162a..d2e3bf3 100644
>>> --- a/arch/x86/include/asm/kvm.h
>>> +++ b/arch/x86/include/asm/kvm.h
>>> @@ -6,7 +6,7 @@
>>>  *
>>>  */
>>>
>>> -#include <asm/types.h>
>>> +#include <linux/types.h>
>>> #include <linux/ioctl.h>
>>>       
>> Awesome, you've just broken the userspace build of kvm as the
>> file linux/types.h conflicts with sys/types.h.
>>
>>     
>
> What I did is absolutely right.
>
>   

It was, though I'd have been happy to know about it in advance (maybe 
you did notify me; I was on vacation and haven't cleared the backlog yet).

> If there is any conflict then we need to solve it in better way.
>
> Can you please share what is the conflict and what you are expecting and
> what you are getting.
>   

I've already fixed kvm-userspace.git.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04  8:04   ` Jaswinder Singh Rajput
  2009-02-04  8:12     ` Avi Kivity
@ 2009-02-04  8:13     ` Avi Kivity
  2009-02-04  8:37       ` Jaswinder Singh Rajput
  2009-02-04 11:55     ` Arnd Bergmann
  2 siblings, 1 reply; 17+ messages in thread
From: Avi Kivity @ 2009-02-04  8:13 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Herbert Xu, mingo, x86, sam, hpa, jirislaby, gregkh, davem,
	xyzzy, arnd, mchehab, jens.axboe, linux-media, linux-kernel

Jaswinder Singh Rajput wrote:
> On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
>   
>> Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>>     
>>> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
>>> index b95162a..d2e3bf3 100644
>>> --- a/arch/x86/include/asm/kvm.h
>>> +++ b/arch/x86/include/asm/kvm.h
>>> @@ -6,7 +6,7 @@
>>>  *
>>>  */
>>>
>>> -#include <asm/types.h>
>>> +#include <linux/types.h>
>>> #include <linux/ioctl.h>
>>>       
>> Awesome, you've just broken the userspace build of kvm as the
>> file linux/types.h conflicts with sys/types.h.
>>
>>     
>
> What I did is absolutely right.
>
>   

It was, though I'd have been happy to know about it in advance (maybe 
you did notify me; I was on vacation and haven't cleared the backlog yet).

> If there is any conflict then we need to solve it in better way.
>
> Can you please share what is the conflict and what you are expecting and
> what you are getting.
>   

I've already fixed kvm-userspace.git.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04  8:13     ` Avi Kivity
@ 2009-02-04  8:37       ` Jaswinder Singh Rajput
  0 siblings, 0 replies; 17+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-04  8:37 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Herbert Xu, mingo, x86, sam, hpa, jirislaby, gregkh, davem,
	xyzzy, arnd, mchehab, jens.axboe, linux-media, linux-kernel

On Wed, 2009-02-04 at 10:13 +0200, Avi Kivity wrote:
> Jaswinder Singh Rajput wrote:
> > On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
> >   
> >> Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
> >>     
> >>> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
> >>> index b95162a..d2e3bf3 100644
> >>> --- a/arch/x86/include/asm/kvm.h
> >>> +++ b/arch/x86/include/asm/kvm.h
> >>> @@ -6,7 +6,7 @@
> >>>  *
> >>>  */
> >>>
> >>> -#include <asm/types.h>
> >>> +#include <linux/types.h>
> >>> #include <linux/ioctl.h>
> >>>       
> >> Awesome, you've just broken the userspace build of kvm as the
> >> file linux/types.h conflicts with sys/types.h.
> >>
> >>     
> >
> > What I did is absolutely right.
> >
> >   
> 
> It was, though I'd have been happy to know about it in advance (maybe 
> you did notify me; I was on vacation and haven't cleared the backlog yet).
> 

Welcome back :-)

> > If there is any conflict then we need to solve it in better way.
> >
> > Can you please share what is the conflict and what you are expecting and
> > what you are getting.
> >   
> 
> I've already fixed kvm-userspace.git.
> 

Thanks,

--
JSR


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04  8:04   ` Jaswinder Singh Rajput
  2009-02-04  8:12     ` Avi Kivity
  2009-02-04  8:13     ` Avi Kivity
@ 2009-02-04 11:55     ` Arnd Bergmann
  2009-02-04 14:18       ` Ingo Molnar
  2009-02-04 17:33       ` H. Peter Anvin
  2 siblings, 2 replies; 17+ messages in thread
From: Arnd Bergmann @ 2009-02-04 11:55 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Herbert Xu, mingo, x86, sam, hpa, jirislaby, gregkh, davem,
	xyzzy, arnd, mchehab, jens.axboe, linux-media, linux-kernel,
	Avi Kivity

On Wednesday 04 February 2009, Jaswinder Singh Rajput wrote:
> On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
> > > -#include <asm/types.h>
> > > +#include <linux/types.h>
> > > #include <linux/ioctl.h>
> > 
> > Awesome, you've just broken the userspace build of kvm as the
> > file linux/types.h conflicts with sys/types.h.
> > 
> 
> What I did is absolutely right.
> 
> If there is any conflict then we need to solve it in better way.
> 
> Can you please share what is the conflict and what you are expecting and
> what you are getting.

I fear that the problem might be more widespread than just kvm.
The problem is that <linux/types.h> without __KERNEL_STRICT_NAMES
defines the standard types that glibc provides in its own <sys/types.h>,
some of them even defined differently (e.g. the size of off_t depends
__USE_FILE_OFFSET64).

You should be able to do

#include <sys/types.h>
#define __KERNEL_STRICT_NAMES
#include <linux/types.h>

or

#include <sys/types.h>
#include <asm/types.h>

but not without the __KERNEL_STRICT_NAMES! This means that the
mass-conversion to <linux/types.h> was flawed and should be fixed
before 2.6.29 to avoid more trouble.

This is related to the point I brought up earlier with u_int32_t
and other types being problematic in user space. I would suggest
changing all the headers that you converted from <asm/types.h>
to <linux/types.h> again to <linux/strict_types.h>, and apply
the patch below to make that possible.

---
Subject: introduce <linux/strict_types.h>

Exported user space headers should not use <linux/types.h> as that
leaks a number of type names, which conflict with the <sys/types.h>
provided by many libc variants.

This introduces a <linux/strict_types.h> that can be safely included
by any other header file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

--- /dev/null
+++ b/include/linux/strict_types.h
@@ -0,0 +1,31 @@
+#ifndef __LINUX_STRICT_TYPES_H
+#define __LINUX_STRICT_TYPES_H
+
+#include <asm/types.h>
+/*
+ * Below are truly Linux-specific types that should never collide with
+ * any application/library that wants linux/types.h.
+ */
+
+#ifdef __CHECKER__
+#define __bitwise__ __attribute__((bitwise))
+#else
+#define __bitwise__
+#endif
+#ifdef __CHECK_ENDIAN__
+#define __bitwise __bitwise__
+#else
+#define __bitwise
+#endif
+
+typedef __u16 __bitwise __le16;
+typedef __u16 __bitwise __be16;
+typedef __u32 __bitwise __le32;
+typedef __u32 __bitwise __be32;
+typedef __u64 __bitwise __le64;
+typedef __u64 __bitwise __be64;
+
+typedef __u16 __bitwise __sum16;
+typedef __u32 __bitwise __wsum;
+
+#endif /* __LINUX_STRICT_TYPES_H */
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..beacdb7 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -9,7 +9,7 @@
 #endif
 
 #include <linux/posix_types.h>
-#include <asm/types.h>
+#include <linux/strict_types.h>
 
 #ifndef __KERNEL_STRICT_NAMES
 
@@ -156,32 +156,6 @@ typedef unsigned long blkcnt_t;
 
 #endif /* __KERNEL_STRICT_NAMES */
 
-/*
- * Below are truly Linux-specific types that should never collide with
- * any application/library that wants linux/types.h.
- */
-
-#ifdef __CHECKER__
-#define __bitwise__ __attribute__((bitwise))
-#else
-#define __bitwise__
-#endif
-#ifdef __CHECK_ENDIAN__
-#define __bitwise __bitwise__
-#else
-#define __bitwise
-#endif
-
-typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
-typedef __u32 __bitwise __le32;
-typedef __u32 __bitwise __be32;
-typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
-
-typedef __u16 __bitwise __sum16;
-typedef __u32 __bitwise __wsum;
-
 #ifdef __KERNEL__
 typedef unsigned __bitwise__ gfp_t;
 typedef unsigned __bitwise__ fmode_t;

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04 11:55     ` Arnd Bergmann
@ 2009-02-04 14:18       ` Ingo Molnar
  2009-02-04 17:33       ` H. Peter Anvin
  1 sibling, 0 replies; 17+ messages in thread
From: Ingo Molnar @ 2009-02-04 14:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaswinder Singh Rajput, Herbert Xu, x86, sam, hpa, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity


* Arnd Bergmann <arnd@arndb.de> wrote:

> On Wednesday 04 February 2009, Jaswinder Singh Rajput wrote:
> > On Wed, 2009-02-04 at 17:43 +1100, Herbert Xu wrote:
> > > > -#include <asm/types.h>
> > > > +#include <linux/types.h>
> > > > #include <linux/ioctl.h>
> > > 
> > > Awesome, you've just broken the userspace build of kvm as the
> > > file linux/types.h conflicts with sys/types.h.
> > > 
> > 
> > What I did is absolutely right.
> > 
> > If there is any conflict then we need to solve it in better way.
> > 
> > Can you please share what is the conflict and what you are expecting and
> > what you are getting.
> 
> I fear that the problem might be more widespread than just kvm.
> The problem is that <linux/types.h> without __KERNEL_STRICT_NAMES
> defines the standard types that glibc provides in its own <sys/types.h>,
> some of them even defined differently (e.g. the size of off_t depends
> __USE_FILE_OFFSET64).
> 
> You should be able to do
> 
> #include <sys/types.h>
> #define __KERNEL_STRICT_NAMES
> #include <linux/types.h>
> 
> or
> 
> #include <sys/types.h>
> #include <asm/types.h>
> 
> but not without the __KERNEL_STRICT_NAMES! This means that the
> mass-conversion to <linux/types.h> was flawed and should be fixed
> before 2.6.29 to avoid more trouble.

agreed.

	Ingo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04 11:55     ` Arnd Bergmann
  2009-02-04 14:18       ` Ingo Molnar
@ 2009-02-04 17:33       ` H. Peter Anvin
  2009-02-05 14:30         ` Arnd Bergmann
  1 sibling, 1 reply; 17+ messages in thread
From: H. Peter Anvin @ 2009-02-04 17:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity

Arnd Bergmann wrote:
> 
> I fear that the problem might be more widespread than just kvm.
> The problem is that <linux/types.h> without __KERNEL_STRICT_NAMES
> defines the standard types that glibc provides in its own <sys/types.h>,
> some of them even defined differently (e.g. the size of off_t depends
> __USE_FILE_OFFSET64).
> 
> Subject: introduce <linux/strict_types.h>
> 

Actually, if anything we should move the *non* __KERNEL_STRICT_NAMES out
of <linux/types.h> into something else, or completely deep-six them.  I
don't know of any libc which wants these anymore, and I think they're
just residual libc5 cruft.

However, if we want <linux/extra_types.h> that's fine with me; but
<linux/types.h> really should be clean, which means doing what
__KERNEL_STRICT_NAMES does now.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-04 17:33       ` H. Peter Anvin
@ 2009-02-05 14:30         ` Arnd Bergmann
  2009-02-05 15:17           ` H. Peter Anvin
  0 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2009-02-05 14:30 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity, netfilter-devel

On Wednesday 04 February 2009, H. Peter Anvin wrote:
> 
> Actually, if anything we should move the *non* __KERNEL_STRICT_NAMES out
> of <linux/types.h> into something else, or completely deep-six them.  I
> don't know of any libc which wants these anymore, and I think they're
> just residual libc5 cruft.
> 
> However, if we want <linux/extra_types.h> that's fine with me; but
> <linux/types.h> really should be clean, which means doing what
> __KERNEL_STRICT_NAMES does now.

Right now, we have 15 exported headers [1] that use the non-strict 
posix types (pid_t, off_t, clock_t, ...) and a set of 106 (!)
files [2] using non-strict integer types (u_int32_t, uint32_t, u32, ...),
76 of those alone in netfilter.

Do you think we should fix up all of them before 2.6.29? I'm worried
that we might introduce more regressions in the process.
Also, should we leave netfilter alone, in order to reduce the changes?
I'm also unsure whether a hack in headers_install would be better than
changing the headers in the source tree.

	Arnd <><

[1] for i in dev_t mode_t off_t pid_t suseconds_t timer_t uid_t gid_t \
    loff_t time_t clock_t caddr_t ; do grep \\\<$i\\\> $obj/usr/include ; \
    done | sort | grep -v linux/types.h

[2] grep '\<\(\(u_\|u\|\)int\(8\|16\|32\|64\)_t\|[us]\(8\|16\|32\|64\)\)\>' \
    $obj/usr/include | grep -v linux/types.h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [GIT PULL -tip] fix 22 make headers_check - 200901
  2009-02-05 14:30         ` Arnd Bergmann
@ 2009-02-05 15:17           ` H. Peter Anvin
  2009-02-05 16:07             ` [PATCH] Make exported headers use strict posix types Arnd Bergmann
  0 siblings, 1 reply; 17+ messages in thread
From: H. Peter Anvin @ 2009-02-05 15:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity, netfilter-devel

Arnd Bergmann wrote:
> On Wednesday 04 February 2009, H. Peter Anvin wrote:
>> Actually, if anything we should move the *non* __KERNEL_STRICT_NAMES out
>> of <linux/types.h> into something else, or completely deep-six them.  I
>> don't know of any libc which wants these anymore, and I think they're
>> just residual libc5 cruft.
>>
>> However, if we want <linux/extra_types.h> that's fine with me; but
>> <linux/types.h> really should be clean, which means doing what
>> __KERNEL_STRICT_NAMES does now.
> 
> Right now, we have 15 exported headers [1] that use the non-strict 
> posix types (pid_t, off_t, clock_t, ...) and a set of 106 (!)
> files [2] using non-strict integer types (u_int32_t, uint32_t, u32, ...),
> 76 of those alone in netfilter.
> 

Geez.  The integer types is just a pattern replacement, so those we can
just fix.  The 15 exported headers that use other types may very well be
real bugs -- we have had a fair share of broken ioctl signatures due to
exactly this problem.

> Do you think we should fix up all of them before 2.6.29? I'm worried
> that we might introduce more regressions in the process.
> Also, should we leave netfilter alone, in order to reduce the changes?
> I'm also unsure whether a hack in headers_install would be better than
> changing the headers in the source tree.

I have been advocating for hacking headers_install for a while.  That
takes care of the 106.  The 15 *need* to be audited immediately, because
that is even likely to be actual manifest bugs.

	-hpa
-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] Make exported headers use strict posix types
  2009-02-05 15:17           ` H. Peter Anvin
@ 2009-02-05 16:07             ` Arnd Bergmann
  2009-02-05 17:54               ` H. Peter Anvin
                                 ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Arnd Bergmann @ 2009-02-05 16:07 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity

A number of standard posix types are used in exported headers, which
is not allowed if __STRICT_KERNEL_NAMES is defined. Change them all
to use the safe __kernel variant so that we can make __STRICT_KERNEL_NAMES
the default.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
On Thursday 05 February 2009, H. Peter Anvin wrote:

> I have been advocating for hacking headers_install for a while.  That
> takes care of the 106.  The 15 *need* to be audited immediately, because
> that is even likely to be actual manifest bugs.

This is what I found, please review.

diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index b847741..4d3e483 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -117,9 +117,9 @@
 struct flock {
 	short	l_type;
 	short	l_whence;
-	off_t	l_start;
-	off_t	l_len;
-	pid_t	l_pid;
+	__kernel_off_t	l_start;
+	__kernel_off_t	l_len;
+	__kernel_pid_t	l_pid;
 	__ARCH_FLOCK_PAD
 };
 #endif
@@ -140,9 +140,9 @@ struct flock {
 struct flock64 {
 	short  l_type;
 	short  l_whence;
-	loff_t l_start;
-	loff_t l_len;
-	pid_t  l_pid;
+	__kernel_loff_t l_start;
+	__kernel_loff_t l_len;
+	__kernel_pid_t  l_pid;
 	__ARCH_FLOCK64_PAD
 };
 #endif
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 9695701..35f75a3 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -23,7 +23,7 @@ typedef union sigval {
 #endif
 
 #ifndef __ARCH_SI_UID_T
-#define __ARCH_SI_UID_T	uid_t
+#define __ARCH_SI_UID_T	__kernel_uid_t
 #endif
 
 /*
@@ -47,13 +47,13 @@ typedef struct siginfo {
 
 		/* kill() */
 		struct {
-			pid_t _pid;		/* sender's pid */
+			__kernel_pid_t _pid;	/* sender's pid */
 			__ARCH_SI_UID_T _uid;	/* sender's uid */
 		} _kill;
 
 		/* POSIX.1b timers */
 		struct {
-			timer_t _tid;		/* timer id */
+			__kernel_timer_t _tid;	/* timer id */
 			int _overrun;		/* overrun count */
 			char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
 			sigval_t _sigval;	/* same as below */
@@ -62,18 +62,18 @@ typedef struct siginfo {
 
 		/* POSIX.1b signals */
 		struct {
-			pid_t _pid;		/* sender's pid */
+			__kernel_pid_t _pid;	/* sender's pid */
 			__ARCH_SI_UID_T _uid;	/* sender's uid */
 			sigval_t _sigval;
 		} _rt;
 
 		/* SIGCHLD */
 		struct {
-			pid_t _pid;		/* which child */
+			__kernel_pid_t _pid;	/* which child */
 			__ARCH_SI_UID_T _uid;	/* sender's uid */
 			int _status;		/* exit code */
-			clock_t _utime;
-			clock_t _stime;
+			__kernel_clock_t _utime;
+			__kernel_clock_t _stime;
 		} _sigchld;
 
 		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index 110c600..f6778ec 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -77,20 +77,20 @@ typedef struct _agp_setup {
  * The "prot" down below needs still a "sleep" flag somehow ...
  */
 typedef struct _agp_segment {
-	off_t pg_start;		/* starting page to populate    */
-	size_t pg_count;	/* number of pages              */
-	int prot;		/* prot flags for mmap          */
+	__kernel_off_t pg_start;	/* starting page to populate    */
+	__kernel_size_t pg_count;	/* number of pages              */
+	int prot;			/* prot flags for mmap          */
 } agp_segment;
 
 typedef struct _agp_region {
-	pid_t pid;		/* pid of process               */
-	size_t seg_count;	/* number of segments           */
+	__kernel_pid_t pid;		/* pid of process       */
+	__kernel_size_t seg_count;	/* number of segments   */
 	struct _agp_segment *seg_list;
 } agp_region;
 
 typedef struct _agp_allocate {
 	int key;		/* tag of allocation            */
-	size_t pg_count;	/* number of pages              */
+	__kernel_size_t pg_count;/* number of pages             */
 	__u32 type;		/* 0 == normal, other devspec   */
    	__u32 physical;         /* device specific (some devices  
 				 * need a phys address of the     
@@ -100,7 +100,7 @@ typedef struct _agp_allocate {
 
 typedef struct _agp_bind {
 	int key;		/* tag of allocation            */
-	off_t pg_start;		/* starting page to populate    */
+	__kernel_off_t pg_start;/* starting page to populate    */
 } agp_bind;
 
 typedef struct _agp_unbind {
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h
index 1c86d65..b8125b2 100644
--- a/include/linux/cn_proc.h
+++ b/include/linux/cn_proc.h
@@ -65,20 +65,20 @@ struct proc_event {
 		} ack;
 
 		struct fork_proc_event {
-			pid_t parent_pid;
-			pid_t parent_tgid;
-			pid_t child_pid;
-			pid_t child_tgid;
+			__kernel_pid_t parent_pid;
+			__kernel_pid_t parent_tgid;
+			__kernel_pid_t child_pid;
+			__kernel_pid_t child_tgid;
 		} fork;
 
 		struct exec_proc_event {
-			pid_t process_pid;
-			pid_t process_tgid;
+			__kernel_pid_t process_pid;
+			__kernel_pid_t process_tgid;
 		} exec;
 
 		struct id_proc_event {
-			pid_t process_pid;
-			pid_t process_tgid;
+			__kernel_pid_t process_pid;
+			__kernel_pid_t process_tgid;
 			union {
 				__u32 ruid; /* task uid */
 				__u32 rgid; /* task gid */
@@ -90,8 +90,8 @@ struct proc_event {
 		} id;
 
 		struct exit_proc_event {
-			pid_t process_pid;
-			pid_t process_tgid;
+			__kernel_pid_t process_pid;
+			__kernel_pid_t process_tgid;
 			__u32 exit_code, exit_signal;
 		} exit;
 	} event_data;
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 5b5d473..0c443c6 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -69,7 +69,6 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs);
  */
 
 extern struct venus_comm coda_comms[];
-#endif /* __KERNEL__ */
 
 /* messages between coda filesystem in kernel and Venus */
 struct upc_req {
@@ -88,4 +87,5 @@ struct upc_req {
 #define REQ_WRITE  0x4
 #define REQ_ABORT  0x8
 
+#endif /* __KERNEL__ */
 #endif
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index d06fbf2..788850b 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -82,9 +82,9 @@ struct cyclades_monitor {
  * open)
  */
 struct cyclades_idle_stats {
-    time_t	   in_use;	/* Time device has been in use (secs) */
-    time_t	   recv_idle;	/* Time since last char received (secs) */
-    time_t	   xmit_idle;	/* Time since last char transmitted (secs) */
+    __kernel_time_t in_use;	/* Time device has been in use (secs) */
+    __kernel_time_t recv_idle;	/* Time since last char received (secs) */
+    __kernel_time_t xmit_idle;	/* Time since last char transmitted (secs) */
     unsigned long  recv_bytes;	/* Bytes received */
     unsigned long  xmit_bytes;	/* Bytes transmitted */
     unsigned long  overruns;	/* Input overruns */
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h
index bd49c3e..ee5d2df 100644
--- a/include/linux/dvb/video.h
+++ b/include/linux/dvb/video.h
@@ -137,7 +137,7 @@ struct video_event {
 #define VIDEO_EVENT_FRAME_RATE_CHANGED	2
 #define VIDEO_EVENT_DECODER_STOPPED 	3
 #define VIDEO_EVENT_VSYNC 		4
-	time_t timestamp;
+	__kernel_time_t timestamp;
 	union {
 		video_size_t size;
 		unsigned int frame_rate;	/* in frames per 1000sec */
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 5ca54d7..c68e616 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -9,6 +9,7 @@
 #endif
 #include <linux/ptrace.h>
 
+#error this doesn't compile
 struct elf_siginfo
 {
 	int	si_signo;			/* signal number */
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h
index c7a6688..3a14b08 100644
--- a/include/linux/if_pppol2tp.h
+++ b/include/linux/if_pppol2tp.h
@@ -26,7 +26,7 @@
  */
 struct pppol2tp_addr
 {
-	pid_t	pid;			/* pid that owns the fd.
+	__kernel_pid_t	pid;		/* pid that owns the fd.
 					 * 0 => current */
 	int	fd;			/* FD of UDP socket to use */
 
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index 5375fac..43dc97e 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -65,7 +65,7 @@ struct mif6ctl {
 	mifi_t	mif6c_mifi;		/* Index of MIF */
 	unsigned char mif6c_flags;	/* MIFF_ flags */
 	unsigned char vifc_threshold;	/* ttl limit */
-	u_short	 mif6c_pifi;		/* the index of the physical IF */
+	__u16	 mif6c_pifi;		/* the index of the physical IF */
 	unsigned int vifc_rate_limit;	/* Rate limiter values (NI) */
 };
 
diff --git a/include/linux/netfilter_ipv4/ipt_owner.h b/include/linux/netfilter_ipv4/ipt_owner.h
index 92f4bda..60e941f 100644
--- a/include/linux/netfilter_ipv4/ipt_owner.h
+++ b/include/linux/netfilter_ipv4/ipt_owner.h
@@ -9,10 +9,10 @@
 #define IPT_OWNER_COMM	0x10
 
 struct ipt_owner_info {
-    uid_t uid;
-    gid_t gid;
-    pid_t pid;
-    pid_t sid;
+    __kernel_uid_t uid;
+    __kernel_gid_t gid;
+    __kernel_pid_t pid;
+    __kernel_pid_t sid;
     char comm[16];
     u_int8_t match, invert;	/* flags */
 };
diff --git a/include/linux/netfilter_ipv6/ip6t_owner.h b/include/linux/netfilter_ipv6/ip6t_owner.h
index 19937da..dc2cbcb 100644
--- a/include/linux/netfilter_ipv6/ip6t_owner.h
+++ b/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -8,10 +8,10 @@
 #define IP6T_OWNER_SID	0x08
 
 struct ip6t_owner_info {
-    uid_t uid;
-    gid_t gid;
-    pid_t pid;
-    pid_t sid;
+    __kernel_uid_t uid;
+    __kernel_gid_t gid;
+    __kernel_pid_t pid;
+    __kernel_pid_t sid;
     u_int8_t match, invert;	/* flags */
 };
 
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index b2648e8..d51a2b3 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -515,7 +515,7 @@ enum
 
 struct tc_drr_stats
 {
-	u32	deficit;
+	__u32	deficit;
 };
 
 #endif
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index 1c866bd..0f93ed6 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -177,8 +177,8 @@ struct ppp_comp_stats {
  * the last NP packet was sent or received.
  */
 struct ppp_idle {
-    time_t xmit_idle;		/* time since last NP packet sent */
-    time_t recv_idle;		/* time since last NP packet received */
+    __kernel_time_t xmit_idle;	/* time since last NP packet sent */
+    __kernel_time_t recv_idle;	/* time since last NP packet received */
 };
 
 #endif /* _PPP_DEFS_H_ */
diff --git a/include/linux/suspend_ioctls.h b/include/linux/suspend_ioctls.h
index 2c6faec..40d4605 100644
--- a/include/linux/suspend_ioctls.h
+++ b/include/linux/suspend_ioctls.h
@@ -7,8 +7,8 @@
  * SNAPSHOT_SET_SWAP_AREA ioctl
  */
 struct resume_swap_area {
-	loff_t offset;
-	u_int32_t dev;
+	__kernel_loff_t offset;
+	__u32 dev;
 } __attribute__((packed));
 
 #define SNAPSHOT_IOC_MAGIC	'3'
@@ -20,13 +20,13 @@ struct resume_swap_area {
 #define SNAPSHOT_S2RAM			_IO(SNAPSHOT_IOC_MAGIC, 11)
 #define SNAPSHOT_SET_SWAP_AREA		_IOW(SNAPSHOT_IOC_MAGIC, 13, \
 							struct resume_swap_area)
-#define SNAPSHOT_GET_IMAGE_SIZE		_IOR(SNAPSHOT_IOC_MAGIC, 14, loff_t)
+#define SNAPSHOT_GET_IMAGE_SIZE		_IOR(SNAPSHOT_IOC_MAGIC, 14, __kernel_loff_t)
 #define SNAPSHOT_PLATFORM_SUPPORT	_IO(SNAPSHOT_IOC_MAGIC, 15)
 #define SNAPSHOT_POWER_OFF		_IO(SNAPSHOT_IOC_MAGIC, 16)
 #define SNAPSHOT_CREATE_IMAGE		_IOW(SNAPSHOT_IOC_MAGIC, 17, int)
 #define SNAPSHOT_PREF_IMAGE_SIZE	_IO(SNAPSHOT_IOC_MAGIC, 18)
-#define SNAPSHOT_AVAIL_SWAP_SIZE	_IOR(SNAPSHOT_IOC_MAGIC, 19, loff_t)
-#define SNAPSHOT_ALLOC_SWAP_PAGE	_IOR(SNAPSHOT_IOC_MAGIC, 20, loff_t)
+#define SNAPSHOT_AVAIL_SWAP_SIZE	_IOR(SNAPSHOT_IOC_MAGIC, 19, __kernel_loff_t)
+#define SNAPSHOT_ALLOC_SWAP_PAGE	_IOR(SNAPSHOT_IOC_MAGIC, 20, __kernel_loff_t)
 #define SNAPSHOT_IOC_MAXNR	20
 
 #endif /* _LINUX_SUSPEND_IOCTLS_H */
diff --git a/include/linux/time.h b/include/linux/time.h
index fbbd2a1..242f624 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -12,14 +12,14 @@
 #ifndef _STRUCT_TIMESPEC
 #define _STRUCT_TIMESPEC
 struct timespec {
-	time_t	tv_sec;		/* seconds */
-	long	tv_nsec;	/* nanoseconds */
+	__kernel_time_t	tv_sec;			/* seconds */
+	long		tv_nsec;		/* nanoseconds */
 };
 #endif
 
 struct timeval {
-	time_t		tv_sec;		/* seconds */
-	suseconds_t	tv_usec;	/* microseconds */
+	__kernel_time_t		tv_sec;		/* seconds */
+	__kernel_suseconds_t	tv_usec;	/* microseconds */
 };
 
 struct timezone {
diff --git a/include/linux/times.h b/include/linux/times.h
index e2d3020..87b6261 100644
--- a/include/linux/times.h
+++ b/include/linux/times.h
@@ -4,10 +4,10 @@
 #include <linux/types.h>
 
 struct tms {
-	clock_t tms_utime;
-	clock_t tms_stime;
-	clock_t tms_cutime;
-	clock_t tms_cstime;
+	__kernel_clock_t tms_utime;
+	__kernel_clock_t tms_stime;
+	__kernel_clock_t tms_cutime;
+	__kernel_clock_t tms_cstime;
 };
 
 #endif
diff --git a/include/linux/utime.h b/include/linux/utime.h
index 640be6a..5cdf673 100644
--- a/include/linux/utime.h
+++ b/include/linux/utime.h
@@ -4,8 +4,8 @@
 #include <linux/types.h>
 
 struct utimbuf {
-	time_t actime;
-	time_t modtime;
+	__kernel_time_t actime;
+	__kernel_time_t modtime;
 };
 
 #endif
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 52f3abd..a58fe2b 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -58,7 +58,7 @@ struct xfrm_selector
 	__u8	prefixlen_s;
 	__u8	proto;
 	int	ifindex;
-	uid_t	user;
+	__kernel_uid_t	user;
 };
 
 #define XFRM_INF (~(__u64)0)
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index c6c61cd..fb67201 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -84,8 +84,8 @@ struct otp_info {
 #define MEMGETREGIONINFO	_IOWR('M', 8, struct region_info_user)
 #define MEMSETOOBSEL		_IOW('M', 9, struct nand_oobinfo)
 #define MEMGETOOBSEL		_IOR('M', 10, struct nand_oobinfo)
-#define MEMGETBADBLOCK		_IOW('M', 11, loff_t)
-#define MEMSETBADBLOCK		_IOW('M', 12, loff_t)
+#define MEMGETBADBLOCK		_IOW('M', 11, __kernel_loff_t)
+#define MEMSETBADBLOCK		_IOW('M', 12, __kernel_loff_t)
 #define OTPSELECT		_IOR('M', 13, int)
 #define OTPGETREGIONCOUNT	_IOW('M', 14, int)
 #define OTPGETREGIONINFO	_IOW('M', 15, struct otp_info)
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 1c02ed1..16684c5 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -385,7 +385,7 @@ struct snd_pcm_sw_params {
 
 struct snd_pcm_channel_info {
 	unsigned int channel;
-	off_t offset;			/* mmap offset */
+	__kernel_off_t offset;		/* mmap offset */
 	unsigned int first;		/* offset to first sample in bits */
 	unsigned int step;		/* samples distance in bits */
 };
@@ -789,7 +789,7 @@ struct snd_ctl_elem_info {
 	snd_ctl_elem_type_t type;	/* R: value type - SNDRV_CTL_ELEM_TYPE_* */
 	unsigned int access;		/* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
 	unsigned int count;		/* count of values */
-	pid_t owner;			/* owner's PID of this control */
+	__kernel_pid_t owner;		/* owner's PID of this control */
 	union {
 		struct {
 			long min;		/* R: minimum value */

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Make exported headers use strict posix types
  2009-02-05 16:07             ` [PATCH] Make exported headers use strict posix types Arnd Bergmann
@ 2009-02-05 17:54               ` H. Peter Anvin
  2009-02-05 18:45               ` Arnd Bergmann
  2009-02-17  9:38               ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 17+ messages in thread
From: H. Peter Anvin @ 2009-02-05 17:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity

Arnd Bergmann wrote:
> A number of standard posix types are used in exported headers, which
> is not allowed if __STRICT_KERNEL_NAMES is defined. Change them all
> to use the safe __kernel variant so that we can make __STRICT_KERNEL_NAMES
> the default.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> ---
> On Thursday 05 February 2009, H. Peter Anvin wrote:
> 
>> I have been advocating for hacking headers_install for a while.  That
>> takes care of the 106.  The 15 *need* to be audited immediately, because
>> that is even likely to be actual manifest bugs.
> 
> This is what I found, please review.
> 

Indeed a lot of these look like real bugs, e.g. the use of off_t (which 
may be 32 bits in userspace while __kernel_off_t is 64 bits.)

So these are, indeed, critical bug fixes and should go into 2.6.29.

Some of these changes may require changes in userspace code if userspace 
has hacked around the problems.  Those changes, though, really should 
happen, too.

	-hpa

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Make exported headers use strict posix types
  2009-02-05 16:07             ` [PATCH] Make exported headers use strict posix types Arnd Bergmann
  2009-02-05 17:54               ` H. Peter Anvin
@ 2009-02-05 18:45               ` Arnd Bergmann
  2009-02-17  9:38               ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2009-02-05 18:45 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jaswinder Singh Rajput, Herbert Xu, mingo, x86, sam, jirislaby,
	gregkh, davem, xyzzy, mchehab, jens.axboe, linux-media,
	linux-kernel, Avi Kivity

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 730 bytes --]

On Thursday 05 February 2009, Arnd Bergmann wrote:> @@ -9,6 +9,7 @@>  #endif>  #include <linux/ptrace.h>>  > +#error this doesn't compile>  struct elf_siginfo>  {>         int     si_signo;                       /* signal number */
This hunk obviously was not meant to be part of the patch, and should haveserved as an reminder to fix <linux/elfcore.h>, which cannot be used fromuser space any more because it actually depends on elf_greg_t fromasm/elf.h, which is no longer exported...
Any idea what to do about this?
	Arnd <><
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Make exported headers use strict posix types
  2009-02-05 16:07             ` [PATCH] Make exported headers use strict posix types Arnd Bergmann
  2009-02-05 17:54               ` H. Peter Anvin
  2009-02-05 18:45               ` Arnd Bergmann
@ 2009-02-17  9:38               ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2009-02-17  9:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: H. Peter Anvin, Jaswinder Singh Rajput, Herbert Xu, mingo, x86,
	sam, jirislaby, gregkh, davem, xyzzy, jens.axboe, linux-media,
	linux-kernel, Avi Kivity

On Thu, 5 Feb 2009 17:07:53 +0100
Arnd Bergmann <arnd@arndb.de> wrote:

> A number of standard posix types are used in exported headers, which
> is not allowed if __STRICT_KERNEL_NAMES is defined. Change them all
> to use the safe __kernel variant so that we can make __STRICT_KERNEL_NAMES
> the default.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> [...]
> diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h
> index bd49c3e..ee5d2df 100644
> --- a/include/linux/dvb/video.h
> +++ b/include/linux/dvb/video.h
> @@ -137,7 +137,7 @@ struct video_event {
>  #define VIDEO_EVENT_FRAME_RATE_CHANGED	2
>  #define VIDEO_EVENT_DECODER_STOPPED 	3
>  #define VIDEO_EVENT_VSYNC 		4
> -	time_t timestamp;
> +	__kernel_time_t timestamp;
>  	union {
>  		video_size_t size;
>  		unsigned int frame_rate;	/* in frames per 1000sec */
> [...]

For the dvb side, it seems ok.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-02-17  9:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24 12:56 [GIT PULL -tip] fix 22 make headers_check - 200901 Jaswinder Singh Rajput
2009-01-24 13:43 ` Jaswinder Singh Rajput
2009-01-26 12:50   ` Ingo Molnar
2009-02-04  6:43 ` Herbert Xu
2009-02-04  8:04   ` Jaswinder Singh Rajput
2009-02-04  8:12     ` Avi Kivity
2009-02-04  8:13     ` Avi Kivity
2009-02-04  8:37       ` Jaswinder Singh Rajput
2009-02-04 11:55     ` Arnd Bergmann
2009-02-04 14:18       ` Ingo Molnar
2009-02-04 17:33       ` H. Peter Anvin
2009-02-05 14:30         ` Arnd Bergmann
2009-02-05 15:17           ` H. Peter Anvin
2009-02-05 16:07             ` [PATCH] Make exported headers use strict posix types Arnd Bergmann
2009-02-05 17:54               ` H. Peter Anvin
2009-02-05 18:45               ` Arnd Bergmann
2009-02-17  9:38               ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).