am fc50845e: am 0b0387c9: Merge "Fix kernel header scrubbing for LP64."
* commit 'fc50845e7d921763152753b60417ece57158cf2e': Fix kernel header scrubbing for LP64.
This commit is contained in:
commit
fc38de6b0d
@ -6,20 +6,16 @@ import time, os, sys
|
|||||||
from utils import *
|
from utils import *
|
||||||
|
|
||||||
# the list of supported architectures
|
# the list of supported architectures
|
||||||
#
|
|
||||||
kernel_archs = [ 'arm', 'arm64', 'mips', 'x86' ]
|
kernel_archs = [ 'arm', 'arm64', 'mips', 'x86' ]
|
||||||
|
|
||||||
# the list of include directories that belong to the kernel
|
# the list of include directories that belong to the kernel
|
||||||
# tree. used when looking for sources...
|
# tree. used when looking for sources...
|
||||||
#
|
|
||||||
kernel_dirs = [ "linux", "asm", "asm-generic", "mtd" ]
|
kernel_dirs = [ "linux", "asm", "asm-generic", "mtd" ]
|
||||||
|
|
||||||
# path to the directory containing the original kernel headers
|
# path to the directory containing the original kernel headers
|
||||||
#
|
|
||||||
kernel_original_path = os.path.normpath( find_program_dir() + '/../../../../external/kernel-headers/original' )
|
kernel_original_path = os.path.normpath( find_program_dir() + '/../../../../external/kernel-headers/original' )
|
||||||
|
|
||||||
# path to the default location of the cleaned-up headers
|
# path to the default location of the cleaned-up headers
|
||||||
#
|
|
||||||
kernel_cleaned_path = os.path.normpath( find_program_dir() + '/..' )
|
kernel_cleaned_path = os.path.normpath( find_program_dir() + '/..' )
|
||||||
|
|
||||||
# a special value that is used to indicate that a given macro is known to be
|
# a special value that is used to indicate that a given macro is known to be
|
||||||
@ -33,6 +29,7 @@ kernel_known_macros = {
|
|||||||
"__KERNEL_STRICT_NAMES":"1",
|
"__KERNEL_STRICT_NAMES":"1",
|
||||||
"__CHECKER__": kCppUndefinedMacro,
|
"__CHECKER__": kCppUndefinedMacro,
|
||||||
"__CHECK_ENDIAN__": kCppUndefinedMacro,
|
"__CHECK_ENDIAN__": kCppUndefinedMacro,
|
||||||
|
"CONFIG_64BIT": "__LP64__",
|
||||||
"CONFIG_X86_32": "__i386__",
|
"CONFIG_X86_32": "__i386__",
|
||||||
"__EXPORTED_HEADERS__": "1",
|
"__EXPORTED_HEADERS__": "1",
|
||||||
}
|
}
|
||||||
@ -71,6 +68,7 @@ kernel_token_replacements = {
|
|||||||
# this is the set of known static inline functions that we want to keep
|
# this is the set of known static inline functions that we want to keep
|
||||||
# in the final ARM headers. this is only used to keep optimized byteswapping
|
# in the final ARM headers. this is only used to keep optimized byteswapping
|
||||||
# static functions and stuff like that.
|
# static functions and stuff like that.
|
||||||
|
# TODO: this isn't working!
|
||||||
kernel_known_arm_statics = set(
|
kernel_known_arm_statics = set(
|
||||||
[ "___arch__swab32", # asm-arm/byteorder.h
|
[ "___arch__swab32", # asm-arm/byteorder.h
|
||||||
]
|
]
|
||||||
@ -93,11 +91,9 @@ kernel_known_x86_statics = set(
|
|||||||
)
|
)
|
||||||
|
|
||||||
kernel_known_generic_statics = set(
|
kernel_known_generic_statics = set(
|
||||||
[ "__invalid_size_argument_for_IOC", # asm-generic/ioctl.h
|
[
|
||||||
"__cmsg_nxthdr", # linux/socket.h
|
"ipt_get_target", # uapi/linux/netfilter_ipv4/ip_tables.h
|
||||||
"cmsg_nxthdr", # linux/socket.h
|
"ip6t_get_target", # uapi/linux/netfilter_ipv6/ip6_tables.h
|
||||||
"ipt_get_target",
|
|
||||||
"ip6t_get_target",
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -112,84 +112,89 @@
|
|||||||
#define F_GETSIG 11
|
#define F_GETSIG 11
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __LP64__
|
||||||
#ifndef F_GETLK64
|
#ifndef F_GETLK64
|
||||||
#define F_GETLK64 12
|
#define F_GETLK64 12
|
||||||
#define F_SETLK64 13
|
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
|
#define F_SETLK64 13
|
||||||
#define F_SETLKW64 14
|
#define F_SETLKW64 14
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#ifndef F_SETOWN_EX
|
#ifndef F_SETOWN_EX
|
||||||
#define F_SETOWN_EX 15
|
#define F_SETOWN_EX 15
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define F_GETOWN_EX 16
|
#define F_GETOWN_EX 16
|
||||||
#endif
|
#endif
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#ifndef F_GETOWNER_UIDS
|
#ifndef F_GETOWNER_UIDS
|
||||||
#define F_GETOWNER_UIDS 17
|
#define F_GETOWNER_UIDS 17
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#endif
|
#endif
|
||||||
#define F_OWNER_TID 0
|
#define F_OWNER_TID 0
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define F_OWNER_PID 1
|
#define F_OWNER_PID 1
|
||||||
#define F_OWNER_PGRP 2
|
#define F_OWNER_PGRP 2
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct f_owner_ex {
|
struct f_owner_ex {
|
||||||
int type;
|
int type;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__kernel_pid_t pid;
|
__kernel_pid_t pid;
|
||||||
};
|
};
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define FD_CLOEXEC 1
|
#define FD_CLOEXEC 1
|
||||||
#ifndef F_RDLCK
|
#ifndef F_RDLCK
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define F_RDLCK 0
|
#define F_RDLCK 0
|
||||||
#define F_WRLCK 1
|
#define F_WRLCK 1
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define F_UNLCK 2
|
#define F_UNLCK 2
|
||||||
#endif
|
#endif
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#ifndef F_EXLCK
|
#ifndef F_EXLCK
|
||||||
#define F_EXLCK 4
|
#define F_EXLCK 4
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define F_SHLCK 8
|
#define F_SHLCK 8
|
||||||
#endif
|
#endif
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define LOCK_SH 1
|
#define LOCK_SH 1
|
||||||
#define LOCK_EX 2
|
#define LOCK_EX 2
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define LOCK_NB 4
|
#define LOCK_NB 4
|
||||||
#define LOCK_UN 8
|
#define LOCK_UN 8
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define LOCK_MAND 32
|
#define LOCK_MAND 32
|
||||||
#define LOCK_READ 64
|
#define LOCK_READ 64
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#define LOCK_WRITE 128
|
#define LOCK_WRITE 128
|
||||||
#define LOCK_RW 192
|
#define LOCK_RW 192
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define F_LINUX_SPECIFIC_BASE 1024
|
#define F_LINUX_SPECIFIC_BASE 1024
|
||||||
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#ifndef __ARCH_FLOCK_PAD
|
#ifndef __ARCH_FLOCK_PAD
|
||||||
#define __ARCH_FLOCK_PAD
|
#define __ARCH_FLOCK_PAD
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#endif
|
#endif
|
||||||
struct flock {
|
struct flock {
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
short l_type;
|
short l_type;
|
||||||
short l_whence;
|
short l_whence;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__kernel_off_t l_start;
|
__kernel_off_t l_start;
|
||||||
__kernel_off_t l_len;
|
__kernel_off_t l_len;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
__kernel_pid_t l_pid;
|
__kernel_pid_t l_pid;
|
||||||
__ARCH_FLOCK_PAD
|
__ARCH_FLOCK_PAD
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
#ifndef __LP64__
|
||||||
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#ifndef __ARCH_FLOCK64_PAD
|
#ifndef __ARCH_FLOCK64_PAD
|
||||||
#define __ARCH_FLOCK64_PAD
|
#define __ARCH_FLOCK64_PAD
|
||||||
#endif
|
#endif
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct flock64 {
|
struct flock64 {
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
short l_type;
|
short l_type;
|
||||||
short l_whence;
|
short l_whence;
|
||||||
__kernel_loff_t l_start;
|
__kernel_loff_t l_start;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
__kernel_loff_t l_len;
|
__kernel_loff_t l_len;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__kernel_pid_t l_pid;
|
__kernel_pid_t l_pid;
|
||||||
__ARCH_FLOCK64_PAD
|
__ARCH_FLOCK64_PAD
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,74 +26,78 @@
|
|||||||
struct siginfo;
|
struct siginfo;
|
||||||
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
|
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
|
#ifdef __LP64__
|
||||||
|
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||||
|
#endif
|
||||||
#include <asm-generic/siginfo.h>
|
#include <asm-generic/siginfo.h>
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
typedef struct siginfo {
|
typedef struct siginfo {
|
||||||
int si_signo;
|
int si_signo;
|
||||||
int si_code;
|
int si_code;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
int si_errno;
|
int si_errno;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
|
int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
|
||||||
union {
|
union {
|
||||||
int _pad[SI_PAD_SIZE];
|
int _pad[SI_PAD_SIZE];
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct {
|
struct {
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
pid_t _pid;
|
pid_t _pid;
|
||||||
__ARCH_SI_UID_T _uid;
|
__ARCH_SI_UID_T _uid;
|
||||||
} _kill;
|
} _kill;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct {
|
struct {
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
timer_t _tid;
|
timer_t _tid;
|
||||||
int _overrun;
|
int _overrun;
|
||||||
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
|
char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
sigval_t _sigval;
|
sigval_t _sigval;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
int _sys_private;
|
int _sys_private;
|
||||||
} _timer;
|
} _timer;
|
||||||
struct {
|
struct {
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
pid_t _pid;
|
pid_t _pid;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__ARCH_SI_UID_T _uid;
|
__ARCH_SI_UID_T _uid;
|
||||||
sigval_t _sigval;
|
sigval_t _sigval;
|
||||||
} _rt;
|
} _rt;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct {
|
struct {
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
pid_t _pid;
|
pid_t _pid;
|
||||||
__ARCH_SI_UID_T _uid;
|
__ARCH_SI_UID_T _uid;
|
||||||
int _status;
|
int _status;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
clock_t _utime;
|
clock_t _utime;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
clock_t _stime;
|
clock_t _stime;
|
||||||
} _sigchld;
|
} _sigchld;
|
||||||
struct {
|
struct {
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
pid_t _pid;
|
pid_t _pid;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
clock_t _utime;
|
clock_t _utime;
|
||||||
int _status;
|
int _status;
|
||||||
clock_t _stime;
|
clock_t _stime;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
} _irix_sigchld;
|
} _irix_sigchld;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
struct {
|
struct {
|
||||||
void __user *_addr;
|
void __user *_addr;
|
||||||
#ifdef __ARCH_SI_TRAPNO
|
#ifdef __ARCH_SI_TRAPNO
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
int _trapno;
|
int _trapno;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#endif
|
#endif
|
||||||
short _addr_lsb;
|
short _addr_lsb;
|
||||||
} _sigfault;
|
} _sigfault;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
struct {
|
struct {
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
__ARCH_SI_BAND_T _band;
|
__ARCH_SI_BAND_T _band;
|
||||||
int _fd;
|
int _fd;
|
||||||
} _sigpoll;
|
} _sigpoll;
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
} _sifields;
|
} _sifields;
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
} siginfo_t;
|
} siginfo_t;
|
||||||
#undef SI_ASYNCIO
|
#undef SI_ASYNCIO
|
||||||
#undef SI_TIMER
|
#undef SI_TIMER
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#undef SI_MESGQ
|
#undef SI_MESGQ
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
#define SI_ASYNCIO -2
|
#define SI_ASYNCIO -2
|
||||||
#define SI_TIMER __SI_CODE(__SI_TIMER, -3)
|
#define SI_TIMER __SI_CODE(__SI_TIMER, -3)
|
||||||
#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4)
|
#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4)
|
||||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
|
||||||
#endif
|
#endif
|
||||||
|
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user