fix 22 make headers_check - 200901
Subsystems (15)
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
arch/x86/include/asm/kvm.h +1 -1
@@ -6,7 +6,7 @@* */ -#include <asm/types.h> +#include <linux/types.h> #include <linux/ioctl.h> /* Architectural interrupt line count. */
arch/x86/include/asm/swab.h +9 -3
@@ -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));
include/linux/acct.h +1 -1
@@ -59,7 +59,7 @@ struct acctcomp_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 */
include/linux/dvb/audio.h +0 -5
@@ -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 */
include/linux/elf.h +2 -1
@@ -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 */
include/linux/flat.h +3 -3
@@ -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
include/linux/hid.h +2 -0
@@ -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
include/linux/if_frad.h +1 -8
@@ -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_localint 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
include/linux/types.h +2 -0
@@ -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
include/linux/videodev.h +8 -2
@@ -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 */
include/video/edid.h +1 -1
@@ -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];
Quoted 8 lines · Jaswinder Singh Rajput
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.gitmaster
Quoted 7 lines
Jaswinder Singh Rajput (11):
headers_checkfix:linux/dvb/audio.h
headers_checkfix:linux/acct.h
headers_checkfix:linux/elf.h
headers_checkfix:linux/flat.h
headers_checkfix:linux/hid.h
headers_checkfix: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(-)
arch/x86/include/asm/kvm.h +1 -1
@@ -6,7 +6,7 @@* */ -#include <asm/types.h> +#include <linux/types.h> #include <linux/ioctl.h> /* Architectural interrupt line count. */
arch/x86/include/asm/swab.h +9 -3
@@ -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));
include/linux/acct.h +1 -1
@@ -59,7 +59,7 @@ struct acctcomp_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 */
include/linux/dvb/audio.h +0 -5
@@ -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 */
include/linux/elf.h +2 -1
@@ -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 */
include/linux/flat.h +3 -3
@@ -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
include/linux/hid.h +2 -0
@@ -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
include/linux/types.h +2 -0
@@ -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
include/linux/videodev.h +8 -2
@@ -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 */
include/video/edid.h +1 -1
@@ -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];
Quoted 40 lines · Jaswinder Singh Rajput
Quoted 8 lines · Jaswinder Singh Rajput
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.gitmasterQuoted 7 lines
Jaswinder Singh Rajput (11):
headers_checkfix:linux/dvb/audio.h
headers_checkfix:linux/acct.h
headers_checkfix:linux/elf.h
headers_checkfix:linux/flat.h
headers_checkfix:linux/hid.h
headers_checkfix:linux/if_frad.h'
headers_checkfix: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.gitmasterJaswinder Singh Rajput (10):
headers_checkfix:linux/dvb/audio.h
headers_checkfix:linux/acct.h
headers_checkfix:linux/elf.h
headers_checkfix:linux/flat.h
headers_checkfix:linux/hid.h
headers_checkfix:linux/types.h
headers_checkfix:linux/videodev.h
headers_checkfix: x86,kvm.h
headers_checkfix: x86,swab.h
headers_checkfix:video/edid.h
Quoted 11 lines
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
arch/x86/include/asm/kvm.h line 10
Quoted 12 lines · Jaswinder Singh Rajput
arch/x86/include/asm/kvm.h +1
-1@@ -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,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 10 lines · Herbert Xu
Quoted 9 lines · Jaswinder Singh Rajput
arch/x86/include/asm/kvm.h +0
-0@@ -6,7 +6,7 @@* */
Quoted 7 lines
arch/x86/include/asm/kvm.h line 10
Quoted 3 lines
arch/x86/include/asm/kvm.h +1
-1-#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.hconflicts withsys/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
Quoted 21 lines · Jaswinder Singh Rajput
Quoted 10 lines · Herbert Xu
Quoted 8 lines · Jaswinder Singh Rajput
arch/x86/include/asm/kvm.h +0
-0@@ -6,7 +6,7 @@* */ Quoted 8 lines
arch/x86/include/asm/kvm.h line 11
Quoted 4 lines
arch/x86/include/asm/kvm.h +1
-1-#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.hconflicts withsys/types.h.
Quoted 3 lines
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).
Quoted 5 lines
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.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 22 lines · Avi Kivity
Quoted 21 lines · Jaswinder Singh Rajput
Quoted 18 lines · Herbert Xu
arch/x86/include/asm/kvm.h line 11
Quoted 12 lines · Jaswinder Singh Rajput
arch/x86/include/asm/kvm.h +1
-1@@ -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.hconflicts withsys/types.h.
Quoted 7 lines
Quoted 3 lines
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 :-)
Quoted 8 lines
Quoted 5 lines
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
Quoted 21 lines · Jaswinder Singh Rajput
Quoted 10 lines · Herbert Xu
Quoted 8 lines · Jaswinder Singh Rajput
arch/x86/include/asm/kvm.h +0
-0@@ -6,7 +6,7 @@* */ Quoted 8 lines
arch/x86/include/asm/kvm.h line 11
Quoted 4 lines
arch/x86/include/asm/kvm.h +1
-1-#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.hconflicts withsys/types.h.
Quoted 3 lines
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).
Quoted 5 lines
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.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Arnd Bergmann
maintainerQuoted 9 lines · Jaswinder Singh Rajput
Quoted 7 lines · Herbert Xu
Quoted 3 lines
(quoted diff) +1
-1-#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.hconflicts withsys/types.h.
Quoted 6 lines
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.
include/linux/strict_types.h new file +31 -0
@@ -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 */
include/linux/types.h +1 -27
@@ -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 ;
Quoted 29 lines · Arnd Bergmann
Quoted 9 lines · Jaswinder Singh Rajput
Quoted 7 lines · Herbert Xu
Quoted 3 lines
(quoted diff) +1
-1-#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.hconflicts withsys/types.h.Quoted 6 lines
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_NAMESdefines the standard types that glibc provides in its own <sys/types.h>, some of them even defined differently (e.g. the size ofoff_tdepends__USE_FILE_OFFSET64).You should be able to do
#include <
sys/types.h>
#define__KERNEL_STRICT_NAMES
#include <linux/types.h>
Quoted 8 lines
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
H. Peter Anvin
reviewerQuoted 9 lines · Arnd Bergmann
I fear that the problem might be more widespread than just kvm. The problem is that <
linux/types.h> without__KERNEL_STRICT_NAMESdefines the standard types that glibc provides in its own <sys/types.h>, some of them even defined differently (e.g. the size ofoff_tdepends__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
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Arnd Bergmann
maintainerQuoted 9 lines · H. Peter Anvin
Actually, if anything we should move the *non*
__KERNEL_STRICT_NAMESout 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_NAMESdoes 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
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
H. Peter Anvin
reviewerQuoted 6 lines · Arnd Bergmann
Quoted 5 lines · H. Peter Anvin
Actually, if anything we should move the *non*
__KERNEL_STRICT_NAMESout 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.
Quoted 9 lines
Quoted 3 lines
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_NAMESdoes 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.
Quoted 5 lines
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_installwould 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
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Arnd Bergmann
maintainerPATCH 1/1 Make exported headers use strict posix types
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.
---
Quoted 3 lines · H. Peter Anvin
I have been advocating for hacking
headers_installfor 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.
include/asm-generic/fcntl.h +6 -6
@@ -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
include/asm-generic/siginfo.h +7 -7
@@ -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 */
include/linux/agpgart.h +7 -7
@@ -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 {
include/linux/cn_proc.h +10 -10
@@ -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;
include/linux/coda_psdev.h +1 -1
@@ -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
include/linux/cyclades.h +3 -3
@@ -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 */
include/linux/dvb/video.h +1 -1
@@ -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 */
include/linux/elfcore.h +1 -0
@@ -9,6 +9,7 @@#endif #include <linux/ptrace.h> +#error this doesn't compilestruct elf_siginfo {int si_signo;/* signal number */
include/linux/if_pppol2tp.h +1 -1
@@ -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 */
include/linux/mroute6.h +1 -1
@@ -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) */ };
include/linux/netfilter_ipv4/ipt_owner.h +4 -4
@@ -9,10 +9,10 @@#define IPT_OWNER_COMM 0x10struct 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 */ };
include/linux/netfilter_ipv6/ip6t_owner.h +4 -4
@@ -8,10 +8,10 @@#define IP6T_OWNER_SID 0x08struct 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 */ };
include/linux/pkt_sched.h +1 -1
@@ -515,7 +515,7 @@ enumstruct tc_drr_stats { -u32 deficit; +__u32 deficit; };#endif
include/linux/ppp_defs.h +2 -2
@@ -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_ */
include/linux/suspend_ioctls.h +5 -5
@@ -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 */
include/linux/time.h +4 -4
@@ -12,14 +12,14 @@#ifndef _STRUCT_TIMESPEC#define _STRUCT_TIMESPECstruct 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 {
include/linux/times.h +4 -4
@@ -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
include/linux/utime.h +2 -2
@@ -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
include/linux/xfrm.h +1 -1
@@ -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)
include/mtd/mtd-abi.h +2 -2
@@ -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)
include/sound/asound.h +2 -2
@@ -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 */
H. Peter Anvin
reviewerRe: [PATCH] Make exported headers use strict posix types
Quoted 7 lines · Arnd Bergmann
A number of standard posix types are used in exported headers, which is not allowed if
__STRICT_KERNEL_NAMESis defined. Change them all to use the safe__kernelvariant so that we can make__STRICT_KERNEL_NAMESthe default.Signed-off-by Arnd Bergmann <[email protected]>
Quoted 9 lines
---
Quoted 3 lines · H. Peter Anvin
I have been advocating for hacking
headers_installfor 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
Arnd Bergmann
maintainerRe: [PATCH] Make exported headers use strict posix types
In reply to Arnd BergmannQuoted 8 lines · Arnd Bergmann
include/linux/elfcore.h +0
-0@@ -9,6 +9,7 @@ #endif #include <linux/ptrace.h>
+#error this doesn't compile
structelf_siginfo
{
int si_signo; /* signal number */
This hunk obviously was not meant to be part of the patch, and should have served as an reminder to fix <linux/elfcore.h>, which cannot be used from user space any more because it actually depends on elf_greg_t from asm/elf.h, which is no longer exported...
Any idea what to do about this?
Arnd <><
Re: [PATCH] Make exported headers use strict posix types
In reply to Arnd BergmannQuoted 12 lines · On Thu, 5 Feb 2009 17:07:53 +0100 Arnd Bergmann <[email protected]> wrote:
A number of standard posix types are used in exported headers, which is not allowed if
__STRICT_KERNEL_NAMESis defined. Change them all to use the safe__kernelvariant so that we can make__STRICT_KERNEL_NAMESthe default.Signed-off-by Arnd Bergmann <[email protected]>[...]include/linux/dvb/video.h +0
-0
include/linux/dvb/video.h struct video_event { · line 143
Quoted 9 lines
include/linux/dvb/video.h +1
-1@@ -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.
Cheers,
Mauro