Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 144266 Details for
Bug 220588
gcc crashes while compiling UML kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
The preprocessed source that generated the error
ccO5Lw9n.out (text/plain), 1.02 MB, created by
Yan Burman
on 2006-12-22 10:36:17 UTC
(
hide
)
Description:
The preprocessed source that generated the error
Filename:
MIME Type:
Creator:
Yan Burman
Created:
2006-12-22 10:36:17 UTC
Size:
1.02 MB
patch
obsolete
>// /usr/libexec/gcc/i386-redhat-linux/4.1.1/cc1 -quiet -nostdinc -Iinclude -Iarch/um/include -I/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas -dD -D__KERNEL__ -D__arch_um__ -DSUBARCH="i386" -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -Dmktime=kernel_mktime -U__i386__ -Ui386 -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(ip_output) -DKBUILD_MODNAME=KBUILD_STR(ip_output) -isystem /usr/lib/gcc/i386-redhat-linux/4.1.1/include -include include/linux/autoconf.h -MD net/ipv4/.ip_output.o.d net/ipv4/ip_output.c -quiet -dumpbase ip_output.c -march=i686 -mtune=pentium3 -mpreferred-stack-boundary=2 -auxbase-strip net/ipv4/.tmp_ip_output.o -g3 -O0 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-aliasing -fno-common -ffreestanding -fno-unit-at-a-time -fno-omit-frame-pointer -fno-optimize-sibling-calls -fasynchronous-unwind-tables -fno-stack-protector -o - -frandom-seed=0 ># 1 "net/ipv4/ip_output.c" ># 1 "/home/yan_b/uml/linux-2.6.20-rc1_uml//" ># 1 "<built-in>" >#define __STDC__ 1 ># 1 "<built-in>" >#define __STDC_HOSTED__ 0 ># 1 "<built-in>" >#define __GNUC__ 4 ># 1 "<built-in>" >#define __GNUC_MINOR__ 1 ># 1 "<built-in>" >#define __GNUC_PATCHLEVEL__ 1 ># 1 "<built-in>" >#define __GNUC_RH_RELEASE__ 1 ># 1 "<built-in>" >#define __SIZE_TYPE__ unsigned int ># 1 "<built-in>" >#define __PTRDIFF_TYPE__ int ># 1 "<built-in>" >#define __WCHAR_TYPE__ long int ># 1 "<built-in>" >#define __WINT_TYPE__ unsigned int ># 1 "<built-in>" >#define __INTMAX_TYPE__ long long int ># 1 "<built-in>" >#define __UINTMAX_TYPE__ long long unsigned int ># 1 "<built-in>" >#define __GXX_ABI_VERSION 1002 ># 1 "<built-in>" >#define __SCHAR_MAX__ 127 ># 1 "<built-in>" >#define __SHRT_MAX__ 32767 ># 1 "<built-in>" >#define __INT_MAX__ 2147483647 ># 1 "<built-in>" >#define __LONG_MAX__ 2147483647L ># 1 "<built-in>" >#define __LONG_LONG_MAX__ 9223372036854775807LL ># 1 "<built-in>" >#define __WCHAR_MAX__ 2147483647 ># 1 "<built-in>" >#define __CHAR_BIT__ 8 ># 1 "<built-in>" >#define __INTMAX_MAX__ 9223372036854775807LL ># 1 "<built-in>" >#define __FLT_EVAL_METHOD__ 2 ># 1 "<built-in>" >#define __FLT_RADIX__ 2 ># 1 "<built-in>" >#define __FLT_MANT_DIG__ 24 ># 1 "<built-in>" >#define __FLT_DIG__ 6 ># 1 "<built-in>" >#define __FLT_MIN_EXP__ (-125) ># 1 "<built-in>" >#define __FLT_MIN_10_EXP__ (-37) ># 1 "<built-in>" >#define __FLT_MAX_EXP__ 128 ># 1 "<built-in>" >#define __FLT_MAX_10_EXP__ 38 ># 1 "<built-in>" >#define __FLT_MAX__ 3.40282347e+38F ># 1 "<built-in>" >#define __FLT_MIN__ 1.17549435e-38F ># 1 "<built-in>" >#define __FLT_EPSILON__ 1.19209290e-7F ># 1 "<built-in>" >#define __FLT_DENORM_MIN__ 1.40129846e-45F ># 1 "<built-in>" >#define __FLT_HAS_INFINITY__ 1 ># 1 "<built-in>" >#define __FLT_HAS_QUIET_NAN__ 1 ># 1 "<built-in>" >#define __DBL_MANT_DIG__ 53 ># 1 "<built-in>" >#define __DBL_DIG__ 15 ># 1 "<built-in>" >#define __DBL_MIN_EXP__ (-1021) ># 1 "<built-in>" >#define __DBL_MIN_10_EXP__ (-307) ># 1 "<built-in>" >#define __DBL_MAX_EXP__ 1024 ># 1 "<built-in>" >#define __DBL_MAX_10_EXP__ 308 ># 1 "<built-in>" >#define __DBL_MAX__ 1.7976931348623157e+308 ># 1 "<built-in>" >#define __DBL_MIN__ 2.2250738585072014e-308 ># 1 "<built-in>" >#define __DBL_EPSILON__ 2.2204460492503131e-16 ># 1 "<built-in>" >#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 ># 1 "<built-in>" >#define __DBL_HAS_INFINITY__ 1 ># 1 "<built-in>" >#define __DBL_HAS_QUIET_NAN__ 1 ># 1 "<built-in>" >#define __LDBL_MANT_DIG__ 64 ># 1 "<built-in>" >#define __LDBL_DIG__ 18 ># 1 "<built-in>" >#define __LDBL_MIN_EXP__ (-16381) ># 1 "<built-in>" >#define __LDBL_MIN_10_EXP__ (-4931) ># 1 "<built-in>" >#define __LDBL_MAX_EXP__ 16384 ># 1 "<built-in>" >#define __LDBL_MAX_10_EXP__ 4932 ># 1 "<built-in>" >#define __DECIMAL_DIG__ 21 ># 1 "<built-in>" >#define __LDBL_MAX__ 1.18973149535723176502e+4932L ># 1 "<built-in>" >#define __LDBL_MIN__ 3.36210314311209350626e-4932L ># 1 "<built-in>" >#define __LDBL_EPSILON__ 1.08420217248550443401e-19L ># 1 "<built-in>" >#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L ># 1 "<built-in>" >#define __LDBL_HAS_INFINITY__ 1 ># 1 "<built-in>" >#define __LDBL_HAS_QUIET_NAN__ 1 ># 1 "<built-in>" >#define __REGISTER_PREFIX__ ># 1 "<built-in>" >#define __USER_LABEL_PREFIX__ ># 1 "<built-in>" >#define __VERSION__ "4.1.1 20060525 (Red Hat 4.1.1-1)" ># 1 "<built-in>" >#define __NO_INLINE__ 1 ># 1 "<built-in>" >#define __FINITE_MATH_ONLY__ 0 ># 1 "<built-in>" >#define __i386 1 ># 1 "<built-in>" >#define __i386__ 1 ># 1 "<built-in>" >#define i386 1 ># 1 "<built-in>" >#define __tune_i686__ 1 ># 1 "<built-in>" >#define __tune_pentiumpro__ 1 ># 1 "<built-in>" >#define __tune_pentium3__ 1 ># 1 "<built-in>" >#define __tune_pentium2__ 1 ># 1 "<built-in>" >#define __i686 1 ># 1 "<built-in>" >#define __i686__ 1 ># 1 "<built-in>" >#define __pentiumpro 1 ># 1 "<built-in>" >#define __pentiumpro__ 1 ># 1 "<built-in>" >#define __gnu_linux__ 1 ># 1 "<built-in>" >#define __linux 1 ># 1 "<built-in>" >#define __linux__ 1 ># 1 "<built-in>" >#define linux 1 ># 1 "<built-in>" >#define __unix 1 ># 1 "<built-in>" >#define __unix__ 1 ># 1 "<built-in>" >#define unix 1 ># 1 "<built-in>" >#define __ELF__ 1 ># 1 "<command line>" >#define __KERNEL__ 1 ># 1 "<command line>" >#define __arch_um__ 1 ># 1 "<command line>" >#define SUBARCH "i386" ># 1 "<command line>" >#define vmap kernel_vmap ># 1 "<command line>" >#define in6addr_loopback kernel_in6addr_loopback ># 1 "<command line>" >#define _LARGEFILE64_SOURCE 1 ># 1 "<command line>" >#define errno kernel_errno ># 1 "<command line>" >#define sigprocmask kernel_sigprocmask ># 1 "<command line>" >#define mktime kernel_mktime ># 1 "<command line>" >#undef __i386__ ># 1 "<command line>" >#undef i386 ># 1 "<command line>" >#define KBUILD_STR(s) #s ># 1 "<command line>" >#define KBUILD_BASENAME KBUILD_STR(ip_output) ># 1 "<command line>" >#define KBUILD_MODNAME KBUILD_STR(ip_output) ># 1 "<command line>" ># 1 "./include/linux/autoconf.h" 1 > > > > > >#define AUTOCONF_INCLUDED >#define CONFIG_DEBUG_SPINLOCK_SLEEP 1 >#define CONFIG_BONDING_MODULE 1 >#define CONFIG_DEBUG_LIST 1 >#define CONFIG_TCP_CONG_ADVANCED 1 >#define CONFIG_TCP_CONG_SCALABLE_MODULE 1 >#define CONFIG_TCP_CONG_VENO_MODULE 1 >#define CONFIG_CRYPTO_MD5_MODULE 1 >#define CONFIG_FLATMEM 1 >#define CONFIG_PROC_KCORE 1 >#define CONFIG_CRYPTO_CBC_MODULE 1 >#define CONFIG_XTERM_CHAN 1 >#define CONFIG_CRYPTO_ECB_MODULE 1 >#define CONFIG_UML_NET_MCAST 1 >#define CONFIG_ENABLE_MUST_CHECK 1 >#define CONFIG_BROKEN_ON_SMP 1 >#define CONFIG_EXT2_FS_XATTR 1 >#define CONFIG_LLC2_MODULE 1 >#define CONFIG_EXT3_FS_XATTR 1 >#define CONFIG_UML_RANDOM 1 >#define CONFIG_LD_SCRIPT_DYN 1 >#define CONFIG_NFS_COMMON 1 >#define CONFIG_X86_TSC 1 >#define CONFIG_NEST_LEVEL 0 >#define CONFIG_MMAPPER 1 >#define CONFIG_NFSD_V3 1 >#define CONFIG_UML_X86 1 >#define CONFIG_NFSD_V4 1 >#define CONFIG_MODULES 1 >#define CONFIG_EXT2_FS 1 >#define CONFIG_EXT3_FS 1 >#define CONFIG_CRYPTO_DES_MODULE 1 >#define CONFIG_RCU_TORTURE_TEST_MODULE 1 >#define CONFIG_DNOTIFY 1 >#define CONFIG_UML_NET_SLIRP 1 >#define CONFIG_ARCH "um" >#define CONFIG_QFMT_V2 1 >#define CONFIG_DEFCONFIG_LIST "arch/$ARCH/defconfig" >#define CONFIG_DEBUG_LOCKING_API_SELFTESTS 1 >#define CONFIG_DETECT_SOFTLOCKUP 1 >#define CONFIG_INOTIFY 1 >#define CONFIG_SLAB 1 >#define CONFIG_DLM_TCP 1 >#define CONFIG_HOTPLUG 1 >#define CONFIG_FLATMEM_MANUAL 1 >#define CONFIG_IPV6_MODULE 1 >#define CONFIG_SUNRPC_GSS_MODULE 1 >#define CONFIG_FLAT_NODE_MEM_MAP 1 >#define CONFIG_DEBUG_SPINLOCK 1 >#define CONFIG_VFAT_FS_MODULE 1 >#define CONFIG_LOCALVERSION_AUTO 1 >#define CONFIG_SLHC_MODULE 1 >#define CONFIG_NFSD_MODULE 1 >#define CONFIG_UDF_NLS 1 >#define CONFIG_FUSE_FS_MODULE 1 >#define CONFIG_KMOD 1 >#define CONFIG_STUB_START 0xbfffe000 >#define CONFIG_PROC_FS 1 >#define CONFIG_X86_CMPXCHG 1 >#define CONFIG_INET 1 >#define CONFIG_RT_MUTEXES 1 >#define CONFIG_SYSVIPC 1 >#define CONFIG_TCP_CONG_CUBIC 1 >#define CONFIG_X86_L1_CACHE_SHIFT 6 >#define CONFIG_NTFS_FS_MODULE 1 >#define CONFIG_UML_NET 1 >#define CONFIG_SLIP_MODULE 1 >#define CONFIG_IOSCHED_CFQ 1 >#define CONFIG_GENERIC_BUG 1 >#define CONFIG_CRYPTO_MANAGER_MODULE 1 >#define CONFIG_SWAP 1 >#define CONFIG_EXT2_FS_POSIX_ACL 1 >#define CONFIG_TCP_CONG_HYBLA_MODULE 1 >#define CONFIG_EXT3_FS_POSIX_ACL 1 >#define CONFIG_CRC32_MODULE 1 >#define CONFIG_BLK_DEV_RAM_COUNT 16 >#define CONFIG_CRC16_MODULE 1 >#define CONFIG_FAT_DEFAULT_IOCHARSET "iso8859-1" >#define CONFIG_BLK_DEV_INITRD 1 >#define CONFIG_TCP_CONG_VEGAS_MODULE 1 >#define CONFIG_PACKET_MMAP 1 >#define CONFIG_NTFS_RW 1 >#define CONFIG_PPP_DEFLATE_MODULE 1 >#define CONFIG_UNIX 1 >#define CONFIG_STDERR_CONSOLE 1 >#define CONFIG_X86_XADD 1 >#define CONFIG_CONFIGFS_FS_MODULE 1 >#define CONFIG_UML_NET_DAEMON 1 >#define CONFIG_TCP_CONG_WESTWOOD_MODULE 1 >#define CONFIG_UID16 1 >#define CONFIG_CRYPTO_ARC4_MODULE 1 >#define CONFIG_BLK_DEV_NBD_MODULE 1 >#define CONFIG_IKCONFIG 1 >#define CONFIG_BINFMT_MISC_MODULE 1 >#define CONFIG_IP_FIB_HASH 1 >#define CONFIG_CRYPTO_SHA1_MODULE 1 >#define CONFIG_TCP_CONG_HSTCP_MODULE 1 >#define CONFIG_PARTITION_ADVANCED 1 >#define CONFIG_NLS_DEFAULT "iso8859-1" >#define CONFIG_BLK_DEV_UBD 1 >#define CONFIG_SPLIT_PTLOCK_CPUS 4 >#define CONFIG_LOCKD_V4 1 >#define CONFIG_BLK_DEV_RAM 1 >#define CONFIG_VM_EVENT_COUNTERS 1 >#define CONFIG_LIBCRC32C_MODULE 1 >#define CONFIG_PPP_BSDCOMP_MODULE 1 >#define CONFIG_SMB_NLS_REMOTE "cp437" >#define CONFIG_CON_CHAN "xterm" >#define CONFIG_MODVERSIONS 1 >#define CONFIG_IPV6_TUNNEL_MODULE 1 >#define CONFIG_BLK_DEV_RAM_BLOCKSIZE 1024 >#define CONFIG_SYSCTL_SYSCALL 1 >#define CONFIG_ELF_CORE 1 >#define CONFIG_UNWIND_INFO 1 >#define CONFIG_MCONSOLE 1 >#define CONFIG_DEFAULT_IOSCHED "anticipatory" >#define CONFIG_DEBUG_SLAB_LEAK 1 >#define CONFIG_IP_PIMSM_V1 1 >#define CONFIG_IP_PNP_DHCP 1 >#define CONFIG_LEGACY_PTYS 1 >#define CONFIG_UNIX98_PTYS 1 >#define CONFIG_X86_USE_PPRO_CHECKSUM 1 >#define CONFIG_IP_PIMSM_V2 1 >#define CONFIG_SEMAPHORE_SLEEPERS 1 >#define CONFIG_TCP_CONG_LP_MODULE 1 >#define CONFIG_DEBUG_VM 1 >#define CONFIG_SSL_CHAN "pty" >#define CONFIG_BLOCK 1 >#define CONFIG_GENERIC_HWEIGHT 1 >#define CONFIG_IRQ_RELEASE_METHOD 1 >#define CONFIG_LOCKD_MODULE 1 >#define CONFIG_QUOTACTL 1 >#define CONFIG_TOP_ADDR 0xC0000000 >#define CONFIG_IP_ADVANCED_ROUTER 1 >#define CONFIG_UML_NET_TUNTAP 1 >#define CONFIG_KALLSYMS 1 >#define CONFIG_NFSD_TCP 1 >#define CONFIG_KERNEL_STACK_ORDER 2 >#define CONFIG_NLS_UTF8_MODULE 1 >#define CONFIG_IPV6_SIT_MODULE 1 >#define CONFIG_PROC_SYSCTL 1 >#define CONFIG_PTY_CHAN 1 >#define CONFIG_RAMFS 1 >#define CONFIG_IP_PNP_RARP 1 >#define CONFIG_TTY_CHAN 1 >#define CONFIG_SHMEM 1 >#define CONFIG_X86_INTEL_USERCOPY 1 >#define CONFIG_EXPORTFS_MODULE 1 >#define CONFIG_EPOLL 1 >#define CONFIG_RELAY 1 >#define CONFIG_MSDOS_FS_MODULE 1 >#define CONFIG_IP_MULTIPLE_TABLES 1 >#define CONFIG_RPCSEC_GSS_KRB5_MODULE 1 >#define CONFIG_NLS_CODEPAGE_437_MODULE 1 >#define CONFIG_PPP_MPPE_MODULE 1 >#define CONFIG_HPPFS 1 >#define CONFIG_STACKTRACE_SUPPORT 1 >#define CONFIG_PPPOE_MODULE 1 >#define CONFIG_ZLIB_DEFLATE_MODULE 1 >#define CONFIG_BLK_DEV_COW_COMMON 1 >#define CONFIG_DEBUG_KERNEL 1 >#define CONFIG_SOUND_MODULE 1 >#define CONFIG_TMPFS 1 >#define CONFIG_QUOTA 1 >#define CONFIG_ASK_IP_FIB_HASH 1 >#define CONFIG_DUMMY_MODULE 1 >#define CONFIG_PLIST 1 >#define CONFIG_FUTEX 1 >#define CONFIG_EXPERIMENTAL 1 >#define CONFIG_BLK_DEV_CRYPTOLOOP_MODULE 1 >#define CONFIG_LOCALVERSION "" >#define CONFIG_SMB_NLS_DEFAULT 1 >#define CONFIG_X86_POPAD_OK 1 >#define CONFIG_INIT_ENV_ARG_LIMIT 128 >#define CONFIG_ZLIB_INFLATE_MODULE 1 >#define CONFIG_IOSCHED_DEADLINE 1 >#define CONFIG_SYSFS 1 >#define CONFIG_X86_CMPXCHG64 1 >#define CONFIG_TCP_CONG_BIC_MODULE 1 >#define CONFIG_IOSCHED_NOOP 1 >#define CONFIG_INET6_TUNNEL_MODULE 1 >#define CONFIG_IP_ROUTE_MULTIPATH 1 >#define CONFIG_LOCKDEP_SUPPORT 1 >#define CONFIG_MSDOS_PARTITION 1 >#define CONFIG_CRYPTO_CAST5_MODULE 1 >#define CONFIG_X86_BSWAP 1 >#define CONFIG_INET_DIAG 1 >#define CONFIG_HOST_VMSPLIT_3G 1 >#define CONFIG_DEBUG_RWSEMS 1 >#define CONFIG_CONNECTOR_MODULE 1 >#define CONFIG_VLAN_8021Q_MODULE 1 >#define CONFIG_BRIDGE_MODULE 1 >#define CONFIG_BASE_FULL 1 >#define CONFIG_CRC_CCITT_MODULE 1 >#define CONFIG_IP_MULTICAST 1 >#define CONFIG_PREVENT_FIRMWARE_BUILD 1 >#define CONFIG_HOSTAUDIO_MODULE 1 >#define CONFIG_BLK_DEV_LOOP_MODULE 1 >#define CONFIG_ATA_OVER_ETH_MODULE 1 >#define CONFIG_GENERIC_CALIBRATE_DELAY 1 >#define CONFIG_NFS_ACL_SUPPORT_MODULE 1 >#define CONFIG_NULL_CHAN 1 >#define CONFIG_MODE_SKAS 1 >#define CONFIG_UML_NET_PCAP 1 >#define CONFIG_STUB_DATA 0xbffff000 >#define CONFIG_ISO9660_FS_MODULE 1 >#define CONFIG_PACKET 1 >#define CONFIG_STUB_CODE 0xbfffe000 >#define CONFIG_DEBUG_BUGVERBOSE 1 >#define CONFIG_FS_POSIX_ACL 1 >#define CONFIG_X86_WP_WORKS_OK 1 >#define CONFIG_GENERIC_HARDIRQS 1 >#define CONFIG_FIB_RULES 1 >#define CONFIG_CRAMFS_MODULE 1 >#define CONFIG_MPENTIUMM 1 >#define CONFIG_PORT_CHAN 1 >#define CONFIG_ARCH_HAS_SC_SIGNALS 1 >#define CONFIG_INOTIFY_USER 1 >#define CONFIG_POSIX_MQUEUE 1 >#define CONFIG_JOLIET 1 >#define CONFIG_SELECT_MEMORY_MODEL 1 >#define CONFIG_IP_PNP_BOOTP 1 >#define CONFIG_AUTOFS_FS_MODULE 1 >#define CONFIG_DEFAULT_CUBIC 1 >#define CONFIG_UML_REAL_TIME_CLOCK 1 >#define CONFIG_X86_GOOD_APIC 1 >#define CONFIG_UML_NET_SLIP 1 >#define CONFIG_PPP_ASYNC_MODULE 1 >#define CONFIG_NFS_V3 1 >#define CONFIG_NFS_V4 1 >#define CONFIG_JBD 1 >#define CONFIG_DEFAULT_TCP_CONG "cubic" >#define CONFIG_BSD_PROCESS_ACCT 1 >#define CONFIG_FAT_FS_MODULE 1 >#define CONFIG_CRYPTO_BLKCIPHER_MODULE 1 >#define CONFIG_IP_MROUTE 1 >#define CONFIG_FAT_DEFAULT_CODEPAGE 437 >#define CONFIG_UML_SOUND_MODULE 1 >#define CONFIG_UNAME_RELEASE "2.6.19-swsusp2" >#define CONFIG_UDF_FS_MODULE 1 >#define CONFIG_HOSTFS_MODULE 1 >#define CONFIG_PRINTK 1 >#define CONFIG_RPCSEC_GSS_SPKM3_MODULE 1 >#define CONFIG_SMB_FS_MODULE 1 >#define CONFIG_SUNRPC_MODULE 1 >#define CONFIG_FS_MBCACHE 1 >#define CONFIG_LLC_MODULE 1 >#define CONFIG_DLM_MODULE 1 >#define CONFIG_INITRAMFS_SOURCE "" >#define CONFIG_IKCONFIG_PROC 1 >#define CONFIG_BUG 1 >#define CONFIG_NFS_FS_MODULE 1 >#define CONFIG_CRYPTO 1 >#define CONFIG_SYSCTL 1 >#define CONFIG_LSF 1 >#define CONFIG_IP_PNP 1 >#define CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA 1 >#define CONFIG_RWSEM_XCHGADD_ALGORITHM 1 >#define CONFIG_NET 1 >#define CONFIG_KERNELVERSION "2.6.20-rc1" >#define CONFIG_DEBUG_SLAB 1 >#define CONFIG_MODULE_UNLOAD 1 >#define CONFIG_STANDALONE 1 >#define CONFIG_KALLSYMS_EXTRA_PASS 1 >#define CONFIG_NETDEVICES 1 >#define CONFIG_INET_TCP_DIAG 1 >#define CONFIG_FRAME_POINTER 1 >#define CONFIG_PPP_SYNC_TTY_MODULE 1 >#define CONFIG_NLS 1 >#define CONFIG_CRYPTO_ALGAPI_MODULE 1 >#define CONFIG_UML 1 >#define CONFIG_MMU 1 >#define CONFIG_UML_NET_ETHERTAP 1 >#define CONFIG_PPP_MODULE 1 >#define CONFIG_BLK_DEV_RAM_SIZE 4096 >#define CONFIG_DEBUG_MUTEXES 1 >#define CONFIG_DEBUG_INFO 1 >#define CONFIG_EXT2_FS_SECURITY 1 >#define CONFIG_SSL 1 >#define CONFIG_IOSCHED_AS 1 >#define CONFIG_EXT3_FS_SECURITY 1 >#define CONFIG_BASE_SMALL 0 >#define CONFIG_STDIO_CONSOLE 1 >#define CONFIG_X86_INVLPG 1 >#define CONFIG_DEBUG_RT_MUTEXES 1 >#define CONFIG_BINFMT_ELF 1 >#define CONFIG_CON_ZERO_CHAN "fd:0,fd:1" >#define CONFIG_DEFAULT_AS 1 >#define CONFIG_LEGACY_PTY_COUNT 256 >#define CONFIG_DEBUG_PI_LIST 1 >#define CONFIG_LOG_BUF_SHIFT 16 >#define CONFIG_BITREVERSE_MODULE 1 >#define CONFIG_TCP_CONG_HTCP_MODULE 1 >#define CONFIG_IP_ROUTE_VERBOSE 1 >#define CONFIG_NFS_V3_ACL 1 >#define CONFIG_AUTOFS4_FS_MODULE 1 ># 1 "<command line>" 2 ># 1 "net/ipv4/ip_output.c" ># 47 "net/ipv4/ip_output.c" ># 1 "include/asm/uaccess.h" 1 > > > > > > >#define __UM_UACCESS_H > ># 1 "include/linux/sched.h" 1 > >#define _LINUX_SCHED_H > ># 1 "include/linux/auxvec.h" 1 > >#define _LINUX_AUXVEC_H > ># 1 "include/asm/auxvec.h" 1 > >#define __UM_AUXVEC_H ># 5 "include/linux/auxvec.h" 2 > > > >#define AT_NULL 0 >#define AT_IGNORE 1 >#define AT_EXECFD 2 >#define AT_PHDR 3 >#define AT_PHENT 4 >#define AT_PHNUM 5 >#define AT_PAGESZ 6 >#define AT_BASE 7 >#define AT_FLAGS 8 >#define AT_ENTRY 9 >#define AT_NOTELF 10 >#define AT_UID 11 >#define AT_EUID 12 >#define AT_GID 13 >#define AT_EGID 14 >#define AT_PLATFORM 15 >#define AT_HWCAP 16 >#define AT_CLKTCK 17 > >#define AT_SECURE 23 > >#define AT_VECTOR_SIZE 44 ># 5 "include/linux/sched.h" 2 > > > > >#define CSIGNAL 0x000000ff >#define CLONE_VM 0x00000100 >#define CLONE_FS 0x00000200 >#define CLONE_FILES 0x00000400 >#define CLONE_SIGHAND 0x00000800 >#define CLONE_PTRACE 0x00002000 >#define CLONE_VFORK 0x00004000 >#define CLONE_PARENT 0x00008000 >#define CLONE_THREAD 0x00010000 >#define CLONE_NEWNS 0x00020000 >#define CLONE_SYSVSEM 0x00040000 >#define CLONE_SETTLS 0x00080000 >#define CLONE_PARENT_SETTID 0x00100000 >#define CLONE_CHILD_CLEARTID 0x00200000 >#define CLONE_DETACHED 0x00400000 >#define CLONE_UNTRACED 0x00800000 >#define CLONE_CHILD_SETTID 0x01000000 >#define CLONE_STOPPED 0x02000000 >#define CLONE_NEWUTS 0x04000000 >#define CLONE_NEWIPC 0x08000000 > > > > >#define SCHED_NORMAL 0 >#define SCHED_FIFO 1 >#define SCHED_RR 2 >#define SCHED_BATCH 3 > > > >struct sched_param { > int sched_priority; >}; > ># 1 "include/asm/param.h" 1 > >#define _UM_PARAM_H > >#define EXEC_PAGESIZE 4096 > > >#define NOGROUP (-1) > > >#define MAXHOSTNAMELEN 64 > > >#define HZ 100 >#define USER_HZ 100 >#define CLOCKS_PER_SEC (USER_HZ) ># 45 "include/linux/sched.h" 2 > ># 1 "include/linux/capability.h" 1 ># 14 "include/linux/capability.h" >#define _LINUX_CAPABILITY_H > ># 1 "include/linux/types.h" 1 > >#define _LINUX_TYPES_H > > > >#define BITS_TO_LONGS(bits) (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) > >#define DECLARE_BITMAP(name,bits) unsigned long name[BITS_TO_LONGS(bits)] > > >#define BITS_PER_BYTE 8 > > ># 1 "include/linux/posix_types.h" 1 > >#define _LINUX_POSIX_TYPES_H > ># 1 "include/linux/stddef.h" 1 > >#define _LINUX_STDDEF_H > ># 1 "include/linux/compiler.h" 1 > >#define __LINUX_COMPILER_H ># 21 "include/linux/compiler.h" >#define __user >#define __kernel >#define __safe >#define __force >#define __nocast >#define __iomem >#define __chk_user_ptr(x) (void)0 >#define __chk_io_ptr(x) (void)0 >#define __builtin_warning(x,y...) (1) >#define __acquires(x) >#define __releases(x) >#define __acquire(x) (void)0 >#define __release(x) (void)0 >#define __cond_lock(x,c) (c) > > > > > > > ># 1 "include/linux/compiler-gcc4.h" 1 > > > ># 1 "include/linux/compiler-gcc.h" 1 ># 10 "include/linux/compiler-gcc.h" >#define barrier() __asm__ __volatile__("": : :"memory") ># 20 "include/linux/compiler-gcc.h" >#define RELOC_HIDE(ptr,off) ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(ptr)); (typeof(ptr)) (__ptr + (off)); }) > > > > > >#define inline inline __attribute__((always_inline)) >#define __inline__ __inline__ __attribute__((always_inline)) >#define __inline __inline __attribute__((always_inline)) >#define __deprecated __attribute__((deprecated)) >#define noinline __attribute__((noinline)) >#define __attribute_pure__ __attribute__((pure)) >#define __attribute_const__ __attribute__((__const__)) ># 5 "include/linux/compiler-gcc4.h" 2 ># 15 "include/linux/compiler-gcc4.h" >#define __attribute_used__ __attribute__((__used__)) >#define __must_check __attribute__((warn_unused_result)) >#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) >#define __always_inline inline __attribute__((always_inline)) ># 43 "include/linux/compiler.h" 2 ># 62 "include/linux/compiler.h" >#define likely(x) __builtin_expect(!!(x), 1) >#define unlikely(x) __builtin_expect(!!(x), 0) ># 95 "include/linux/compiler.h" >#define __deprecated_for_modules ># 5 "include/linux/stddef.h" 2 > >#undef NULL > > > >#define NULL ((void *)0) > > > > >enum { > false = 0, > true = 1 >}; > >#undef offsetof > >#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) ># 5 "include/linux/posix_types.h" 2 ># 21 "include/linux/posix_types.h" >#undef __NFDBITS >#define __NFDBITS (8 * sizeof(unsigned long)) > >#undef __FD_SETSIZE >#define __FD_SETSIZE 1024 > >#undef __FDSET_LONGS >#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) > >#undef __FDELT >#define __FDELT(d) ((d) / __NFDBITS) > >#undef __FDMASK >#define __FDMASK(d) (1UL << ((d) % __NFDBITS)) > >typedef struct { > unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; >} __kernel_fd_set; > > >typedef void (*__kernel_sighandler_t)(int); > > >typedef int __kernel_key_t; >typedef int __kernel_mqd_t; > ># 1 "include/asm/posix_types.h" 1 > >#define __UM_POSIX_TYPES_H > ># 1 "include/asm/arch/posix_types.h" 1 > >#define __ARCH_I386_POSIX_TYPES_H > > > > > > > >typedef unsigned long __kernel_ino_t; >typedef unsigned short __kernel_mode_t; >typedef unsigned short __kernel_nlink_t; >typedef long __kernel_off_t; >typedef int __kernel_pid_t; >typedef unsigned short __kernel_ipc_pid_t; >typedef unsigned short __kernel_uid_t; >typedef unsigned short __kernel_gid_t; >typedef unsigned int __kernel_size_t; >typedef int __kernel_ssize_t; >typedef int __kernel_ptrdiff_t; >typedef long __kernel_time_t; >typedef long __kernel_suseconds_t; >typedef long __kernel_clock_t; >typedef int __kernel_timer_t; >typedef int __kernel_clockid_t; >typedef int __kernel_daddr_t; >typedef char * __kernel_caddr_t; >typedef unsigned short __kernel_uid16_t; >typedef unsigned short __kernel_gid16_t; >typedef unsigned int __kernel_uid32_t; >typedef unsigned int __kernel_gid32_t; > >typedef unsigned short __kernel_old_uid_t; >typedef unsigned short __kernel_old_gid_t; >typedef unsigned short __kernel_old_dev_t; > > >typedef long long __kernel_loff_t; > > >typedef struct { > > int val[2]; > > > >} __kernel_fsid_t; > > > >#undef __FD_SET >#define __FD_SET(fd,fdsetp) __asm__ __volatile__("btsl %1,%0": "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) > > > >#undef __FD_CLR >#define __FD_CLR(fd,fdsetp) __asm__ __volatile__("btrl %1,%0": "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) > > > >#undef __FD_ISSET >#define __FD_ISSET(fd,fdsetp) (__extension__ ({ unsigned char __result; __asm__ __volatile__("btl %1,%2 ; setb %0" :"=q" (__result) :"r" ((int) (fd)), "m" (*(__kernel_fd_set *) (fdsetp))); __result; })) > > > > > > >#undef __FD_ZERO >#define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__("cld ; rep ; stosl" :"=m" (*(__kernel_fd_set *) (fdsetp)), "=&c" (__d0), "=&D" (__d1) :"a" (0), "1" (__FDSET_LONGS), "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); } while (0) ># 5 "include/asm/posix_types.h" 2 ># 48 "include/linux/posix_types.h" 2 ># 15 "include/linux/types.h" 2 ># 1 "include/asm/types.h" 1 > >#define __UM_TYPES_H > ># 1 "include/asm/arch/types.h" 1 > >#define _I386_TYPES_H > > > >typedef unsigned short umode_t; > > > > > > >typedef __signed__ char __s8; >typedef unsigned char __u8; > >typedef __signed__ short __s16; >typedef unsigned short __u16; > >typedef __signed__ int __s32; >typedef unsigned int __u32; > > >typedef __signed__ long long __s64; >typedef unsigned long long __u64; ># 34 "include/asm/arch/types.h" >#define BITS_PER_LONG 32 > > > > >typedef signed char s8; >typedef unsigned char u8; > >typedef signed short s16; >typedef unsigned short u16; > >typedef signed int s32; >typedef unsigned int u32; > >typedef signed long long s64; >typedef unsigned long long u64; > > > > > > >typedef u32 dma_addr_t; > >typedef u64 dma64_addr_t; ># 5 "include/asm/types.h" 2 ># 16 "include/linux/types.h" 2 > > > >typedef __u32 __kernel_dev_t; > >typedef __kernel_fd_set fd_set; >typedef __kernel_dev_t dev_t; >typedef __kernel_ino_t ino_t; >typedef __kernel_mode_t mode_t; >typedef __kernel_nlink_t nlink_t; >typedef __kernel_off_t off_t; >typedef __kernel_pid_t pid_t; >typedef __kernel_daddr_t daddr_t; >typedef __kernel_key_t key_t; >typedef __kernel_suseconds_t suseconds_t; >typedef __kernel_timer_t timer_t; >typedef __kernel_clockid_t clockid_t; >typedef __kernel_mqd_t mqd_t; > > >typedef _Bool bool; > >typedef __kernel_uid32_t uid_t; >typedef __kernel_gid32_t gid_t; >typedef __kernel_uid16_t uid16_t; >typedef __kernel_gid16_t gid16_t; > > > >typedef __kernel_old_uid_t old_uid_t; >typedef __kernel_old_gid_t old_gid_t; ># 58 "include/linux/types.h" >typedef __kernel_loff_t loff_t; > > > > > > > >#define _SIZE_T >typedef __kernel_size_t size_t; > > > >#define _SSIZE_T >typedef __kernel_ssize_t ssize_t; > > > >#define _PTRDIFF_T >typedef __kernel_ptrdiff_t ptrdiff_t; > > > >#define _TIME_T >typedef __kernel_time_t time_t; > > > >#define _CLOCK_T >typedef __kernel_clock_t clock_t; > > > >#define _CADDR_T >typedef __kernel_caddr_t caddr_t; > > > >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; > > >typedef unsigned char unchar; >typedef unsigned short ushort; >typedef unsigned int uint; >typedef unsigned long ulong; > > >#define __BIT_TYPES_DEFINED__ > >typedef __u8 u_int8_t; >typedef __s8 int8_t; >typedef __u16 u_int16_t; >typedef __s16 int16_t; >typedef __u32 u_int32_t; >typedef __s32 int32_t; > > > >typedef __u8 uint8_t; >typedef __u16 uint16_t; >typedef __u32 uint32_t; > > >typedef __u64 uint64_t; >typedef __u64 u_int64_t; >typedef __s64 int64_t; > > > >#define aligned_u64 unsigned long long __attribute__((aligned(8))) >#define aligned_be64 __be64 __attribute__((aligned(8))) >#define aligned_le64 __le64 __attribute__((aligned(8))) ># 143 "include/linux/types.h" >typedef unsigned long sector_t; > > > > > > >typedef u64 blkcnt_t; ># 160 "include/linux/types.h" >#define pgoff_t unsigned long ># 173 "include/linux/types.h" >#define __bitwise__ > > > > >#define __bitwise > > >typedef __u16 __le16; >typedef __u16 __be16; >typedef __u32 __le32; >typedef __u32 __be32; > >typedef __u64 __le64; >typedef __u64 __be64; > >typedef __u16 __sum16; >typedef __u32 __wsum; > > >typedef unsigned gfp_t; > > > > >typedef u32 resource_size_t; > > > > >struct ustat { > __kernel_daddr_t f_tfree; > __kernel_ino_t f_tinode; > char f_fname[6]; > char f_fpack[6]; >}; ># 17 "include/linux/capability.h" 2 ># 30 "include/linux/capability.h" >#define _LINUX_CAPABILITY_VERSION 0x19980330 > >typedef struct __user_cap_header_struct { > __u32 version; > int pid; >} *cap_user_header_t; > >typedef struct __user_cap_data_struct { > __u32 effective; > __u32 permitted; > __u32 inheritable; >} *cap_user_data_t; > > > ># 1 "include/linux/spinlock.h" 1 > >#define __LINUX_SPINLOCK_H ># 49 "include/linux/spinlock.h" ># 1 "include/linux/preempt.h" 1 > >#define __LINUX_PREEMPT_H > > > > > > ># 1 "include/linux/thread_info.h" 1 > > > > > > > >#define _LINUX_THREAD_INFO_H > > > > >struct restart_block { > long (*fn)(struct restart_block *); > unsigned long arg0, arg1, arg2, arg3; >}; > >extern long do_no_restart_syscall(struct restart_block *parm); > ># 1 "include/linux/bitops.h" 1 > >#define _LINUX_BITOPS_H > > > > > > ># 1 "include/asm/bitops.h" 1 > >#define __UM_BITOPS_H > ># 1 "include/asm/arch/bitops.h" 1 > >#define _I386_BITOPS_H > > > > > > ># 1 "include/asm/alternative.h" 1 > >#define __UM_ALTERNATIVE_H > ># 1 "include/asm/arch/alternative.h" 1 > >#define _I386_ALTERNATIVE_H > > > > > > > >struct alt_instr { > u8 *instr; > u8 *replacement; > u8 cpuid; > u8 instrlen; > u8 replacementlen; > u8 pad; >}; > >extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); > >struct module; > > > > > > > >static inline __attribute__((always_inline)) void alternatives_smp_module_add(struct module *mod, char *name, > void *locks, void *locks_end, > void *text, void *text_end) {} >static inline __attribute__((always_inline)) void alternatives_smp_module_del(struct module *mod) {} >static inline __attribute__((always_inline)) void alternatives_smp_switch(int smp) {} ># 50 "include/asm/arch/alternative.h" >#define alternative(oldinstr,newinstr,feature) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature) : "memory") ># 74 "include/asm/arch/alternative.h" >#define alternative_input(oldinstr,newinstr,feature,input...) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature), ##input) ># 118 "include/asm/arch/alternative.h" >#define LOCK_PREFIX "" > > >struct paravirt_patch; > > > >static inline __attribute__((always_inline)) void >apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) >{} >#define __start_parainstructions NULL >#define __stop_parainstructions NULL ># 5 "include/asm/alternative.h" 2 ># 10 "include/asm/arch/bitops.h" 2 ># 19 "include/asm/arch/bitops.h" >#define ADDR (*(volatile long *) addr) ># 36 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) void set_bit(int nr, volatile unsigned long * addr) >{ > __asm__ __volatile__( "" > "btsl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} ># 53 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long * addr) >{ > __asm__( > "btsl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} ># 71 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) void clear_bit(int nr, volatile unsigned long * addr) >{ > __asm__ __volatile__( "" > "btrl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} > >static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long * addr) >{ > __asm__ __volatile__( > "btrl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} >#define smp_mb__before_clear_bit() barrier() >#define smp_mb__after_clear_bit() barrier() ># 98 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long * addr) >{ > __asm__ __volatile__( > "btcl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} ># 116 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long * addr) >{ > __asm__ __volatile__( "" > "btcl %1,%0" > :"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); >} ># 133 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int test_and_set_bit(int nr, volatile unsigned long * addr) >{ > int oldbit; > > __asm__ __volatile__( "" > "btsl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr) : "memory"); > return oldbit; >} ># 153 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long * addr) >{ > int oldbit; > > __asm__( > "btsl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); > return oldbit; >} ># 173 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long * addr) >{ > int oldbit; > > __asm__ __volatile__( "" > "btrl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr) : "memory"); > return oldbit; >} ># 193 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr) >{ > int oldbit; > > __asm__( > "btrl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr)); > return oldbit; >} > > >static inline __attribute__((always_inline)) int __test_and_change_bit(int nr, volatile unsigned long *addr) >{ > int oldbit; > > __asm__ __volatile__( > "btcl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr) : "memory"); > return oldbit; >} ># 224 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long* addr) >{ > int oldbit; > > __asm__ __volatile__( "" > "btcl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit),"+m" ((*(volatile long *) addr)) > :"Ir" (nr) : "memory"); > return oldbit; >} ># 244 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) int constant_test_bit(int nr, const volatile unsigned long *addr) >{ > return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0; >} > >static inline __attribute__((always_inline)) int variable_test_bit(int nr, const volatile unsigned long * addr) >{ > int oldbit; > > __asm__ __volatile__( > "btl %2,%1\n\tsbbl %0,%0" > :"=r" (oldbit) > :"m" ((*(volatile long *) addr)),"Ir" (nr)); > return oldbit; >} > >#define test_bit(nr,addr) (__builtin_constant_p(nr) ? constant_test_bit((nr),(addr)) : variable_test_bit((nr),(addr))) > > > > >#undef ADDR ># 275 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int find_first_zero_bit(const unsigned long *addr, unsigned size) >{ > int d0, d1, d2; > int res; > > if (!size) > return 0; > > __asm__ __volatile__( > "movl $-1,%%eax\n\t" > "xorl %%edx,%%edx\n\t" > "repe; scasl\n\t" > "je 1f\n\t" > "xorl -4(%%edi),%%eax\n\t" > "subl $4,%%edi\n\t" > "bsfl %%eax,%%edx\n" > "1:\tsubl %%ebx,%%edi\n\t" > "shll $3,%%edi\n\t" > "addl %%edi,%%edx" > :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) > :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); > return res; >} > > > > > > > >int find_next_zero_bit(const unsigned long *addr, int size, int offset); > > > > > > > >static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word) >{ > __asm__("bsfl %1,%0" > :"=r" (word) > :"rm" (word)); > return word; >} ># 329 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) unsigned find_first_bit(const unsigned long *addr, unsigned size) >{ > unsigned x = 0; > > while (x < size) { > unsigned long val = *addr++; > if (val) > return __ffs(val) + x; > x += (sizeof(*addr)<<3); > } > return x; >} > > > > > > > >int find_next_bit(const unsigned long *addr, int size, int offset); > > > > > > > >static inline __attribute__((always_inline)) unsigned long ffz(unsigned long word) >{ > __asm__("bsfl %1,%0" > :"=r" (word) > :"r" (~word)); > return word; >} > > > ># 1 "include/asm-generic/bitops/sched.h" 1 > >#define _ASM_GENERIC_BITOPS_SCHED_H_ ># 13 "include/asm-generic/bitops/sched.h" >static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b) >{ > > > > > > > > if (__builtin_expect(!!(b[0]), 0)) > return __ffs(b[0]); > if (__builtin_expect(!!(b[1]), 0)) > return __ffs(b[1]) + 32; > if (__builtin_expect(!!(b[2]), 0)) > return __ffs(b[2]) + 64; > if (b[3]) > return __ffs(b[3]) + 96; > return __ffs(b[4]) + 128; > > > >} ># 367 "include/asm/arch/bitops.h" 2 ># 376 "include/asm/arch/bitops.h" >static inline __attribute__((always_inline)) int ffs(int x) >{ > int r; > > __asm__("bsfl %1,%0\n\t" > "jnz 1f\n\t" > "movl $-1,%0\n" > "1:" : "=r" (r) : "rm" (x)); > return r+1; >} > > > > > > > >static inline __attribute__((always_inline)) int fls(int x) >{ > int r; > > __asm__("bsrl %1,%0\n\t" > "jnz 1f\n\t" > "movl $-1,%0\n" > "1:" : "=r" (r) : "rm" (x)); > return r+1; >} > ># 1 "include/asm-generic/bitops/hweight.h" 1 > >#define _ASM_GENERIC_BITOPS_HWEIGHT_H_ > > > >extern unsigned int hweight32(unsigned int w); >extern unsigned int hweight16(unsigned int w); >extern unsigned int hweight8(unsigned int w); >extern unsigned long hweight64(__u64 w); ># 405 "include/asm/arch/bitops.h" 2 > > > ># 1 "include/asm-generic/bitops/fls64.h" 1 > >#define _ASM_GENERIC_BITOPS_FLS64_H_ > > > >static inline __attribute__((always_inline)) int fls64(__u64 x) >{ > __u32 h = x >> 32; > if (h) > return fls(h) + 32; > return fls(x); >} ># 409 "include/asm/arch/bitops.h" 2 > > > ># 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1 > >#define _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ > ># 1 "include/asm-generic/bitops/le.h" 1 > >#define _ASM_GENERIC_BITOPS_LE_H_ > > ># 1 "include/asm/byteorder.h" 1 > >#define __UM_BYTEORDER_H > ># 1 "include/asm/arch/byteorder.h" 1 > >#define _I386_BYTEORDER_H ># 13 "include/asm/arch/byteorder.h" >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swab32(__u32 x) >{ > > __asm__("bswap %0" : "=r" (x) : "0" (x)); > > > > > > > > return x; >} > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 ___arch__swab64(__u64 val) >{ > union { > struct { __u32 a,b; } s; > __u64 u; > } v; > v.u = val; > > asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" > : "=r" (v.s.a), "=r" (v.s.b) > : "0" (v.s.a), "1" (v.s.b)); > > > > > > return v.u; >} > > > > >#define __arch__swab64(x) ___arch__swab64(x) >#define __arch__swab32(x) ___arch__swab32(x) > >#define __BYTEORDER_HAS_U64__ > > > ># 1 "include/linux/byteorder/little_endian.h" 1 > >#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H > > >#define __LITTLE_ENDIAN 1234 > > >#define __LITTLE_ENDIAN_BITFIELD > > > ># 1 "include/linux/byteorder/swab.h" 1 > >#define _LINUX_BYTEORDER_SWAB_H ># 23 "include/linux/byteorder/swab.h" >#define ___swab16(x) ({ __u16 __x = (x); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }) > > > > > > > >#define ___swab32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) ># 41 "include/linux/byteorder/swab.h" >#define ___swab64(x) ({ __u64 __x = (x); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }) ># 55 "include/linux/byteorder/swab.h" >#define ___constant_swab16(x) ((__u16)( (((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8) )) > > > >#define ___constant_swab32(x) ((__u32)( (((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) > > > > > >#define ___constant_swab64(x) ((__u64)( (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) )) ># 80 "include/linux/byteorder/swab.h" >#define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); }) ># 90 "include/linux/byteorder/swab.h" >#define __arch__swab16p(x) __arch__swab16(*(x)) > > >#define __arch__swab32p(x) __arch__swab32(*(x)) > > >#define __arch__swab64p(x) __arch__swab64(*(x)) > > > >#define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0) > > >#define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0) > > >#define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0) ># 127 "include/linux/byteorder/swab.h" >#define __swab16(x) __fswab16(x) >#define __swab32(x) __fswab32(x) >#define __swab64(x) __fswab64(x) > > > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x) >{ > return ({ __u16 __tmp = (x) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); >} >static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x) >{ > return ({ __u16 __tmp = (*(x)) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); >} >static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr) >{ > do { *(addr) = ({ __u16 __tmp = (*((addr))) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); } while (0); >} > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x) >{ > return ___arch__swab32(x); >} >static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x) >{ > return ___arch__swab32(*(x)); >} >static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr) >{ > do { *(addr) = ___arch__swab32(*((addr))); } while (0); >} > > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x) >{ > > > > > > return ___arch__swab64(x); > >} >static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x) >{ > return ___arch__swab64(*(x)); >} >static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr) >{ > do { *(addr) = ___arch__swab64(*((addr))); } while (0); >} > > > >#define swab16 __swab16 >#define swab32 __swab32 >#define swab64 __swab64 >#define swab16p __swab16p >#define swab32p __swab32p >#define swab64p __swab64p >#define swab16s __swab16s >#define swab32s __swab32s >#define swab64s __swab64s ># 13 "include/linux/byteorder/little_endian.h" 2 > >#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) >#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) >#define __constant_htons(x) ((__force __be16)___constant_swab16((x))) >#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) >#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x)) >#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x)) >#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x)) >#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x)) >#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x)) >#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x)) >#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x))) >#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x)) >#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) >#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x)) >#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x))) >#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x)) >#define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) >#define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) >#define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) >#define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) >#define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) >#define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) >#define __cpu_to_be64(x) ((__force __be64)__swab64((x))) >#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) >#define __cpu_to_be32(x) ((__force __be32)__swab32((x))) >#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) >#define __cpu_to_be16(x) ((__force __be16)__swab16((x))) >#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) > >static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p) >{ > return ( __le64)*p; >} >static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p) >{ > return ( __u64)*p; >} >static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p) >{ > return ( __le32)*p; >} >static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p) >{ > return ( __u32)*p; >} >static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p) >{ > return ( __le16)*p; >} >static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p) >{ > return ( __u16)*p; >} >static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p) >{ > return ( __be64)__swab64p(p); >} >static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p) >{ > return __swab64p((__u64 *)p); >} >static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p) >{ > return ( __be32)__swab32p(p); >} >static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p) >{ > return __swab32p((__u32 *)p); >} >static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p) >{ > return ( __be16)__swab16p(p); >} >static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p) >{ > return __swab16p((__u16 *)p); >} >#define __cpu_to_le64s(x) do {} while (0) >#define __le64_to_cpus(x) do {} while (0) >#define __cpu_to_le32s(x) do {} while (0) >#define __le32_to_cpus(x) do {} while (0) >#define __cpu_to_le16s(x) do {} while (0) >#define __le16_to_cpus(x) do {} while (0) >#define __cpu_to_be64s(x) __swab64s((x)) >#define __be64_to_cpus(x) __swab64s((x)) >#define __cpu_to_be32s(x) __swab32s((x)) >#define __be32_to_cpus(x) __swab32s((x)) >#define __cpu_to_be16s(x) __swab16s((x)) >#define __be16_to_cpus(x) __swab16s((x)) > ># 1 "include/linux/byteorder/generic.h" 1 > >#define _LINUX_BYTEORDER_GENERIC_H ># 91 "include/linux/byteorder/generic.h" >#define cpu_to_le64 __cpu_to_le64 >#define le64_to_cpu __le64_to_cpu >#define cpu_to_le32 __cpu_to_le32 >#define le32_to_cpu __le32_to_cpu >#define cpu_to_le16 __cpu_to_le16 >#define le16_to_cpu __le16_to_cpu >#define cpu_to_be64 __cpu_to_be64 >#define be64_to_cpu __be64_to_cpu >#define cpu_to_be32 __cpu_to_be32 >#define be32_to_cpu __be32_to_cpu >#define cpu_to_be16 __cpu_to_be16 >#define be16_to_cpu __be16_to_cpu >#define cpu_to_le64p __cpu_to_le64p >#define le64_to_cpup __le64_to_cpup >#define cpu_to_le32p __cpu_to_le32p >#define le32_to_cpup __le32_to_cpup >#define cpu_to_le16p __cpu_to_le16p >#define le16_to_cpup __le16_to_cpup >#define cpu_to_be64p __cpu_to_be64p >#define be64_to_cpup __be64_to_cpup >#define cpu_to_be32p __cpu_to_be32p >#define be32_to_cpup __be32_to_cpup >#define cpu_to_be16p __cpu_to_be16p >#define be16_to_cpup __be16_to_cpup >#define cpu_to_le64s __cpu_to_le64s >#define le64_to_cpus __le64_to_cpus >#define cpu_to_le32s __cpu_to_le32s >#define le32_to_cpus __le32_to_cpus >#define cpu_to_le16s __cpu_to_le16s >#define le16_to_cpus __le16_to_cpus >#define cpu_to_be64s __cpu_to_be64s >#define be64_to_cpus __be64_to_cpus >#define cpu_to_be32s __cpu_to_be32s >#define be32_to_cpus __be32_to_cpus >#define cpu_to_be16s __cpu_to_be16s >#define be16_to_cpus __be16_to_cpus ># 145 "include/linux/byteorder/generic.h" >#undef ntohl >#undef ntohs >#undef htonl >#undef htons > > > > > >extern __u32 ntohl(__be32); >extern __be32 htonl(__u32); >extern __u16 ntohs(__be16); >extern __be16 htons(__u16); ># 105 "include/linux/byteorder/little_endian.h" 2 ># 57 "include/asm/arch/byteorder.h" 2 ># 5 "include/asm/byteorder.h" 2 ># 6 "include/asm-generic/bitops/le.h" 2 > >#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) >#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) > > > >#define generic_test_le_bit(nr,addr) test_bit(nr, addr) >#define generic___set_le_bit(nr,addr) __set_bit(nr, addr) >#define generic___clear_le_bit(nr,addr) __clear_bit(nr, addr) > >#define generic_test_and_set_le_bit(nr,addr) test_and_set_bit(nr, addr) >#define generic_test_and_clear_le_bit(nr,addr) test_and_clear_bit(nr, addr) > >#define generic___test_and_set_le_bit(nr,addr) __test_and_set_bit(nr, addr) >#define generic___test_and_clear_le_bit(nr,addr) __test_and_clear_bit(nr, addr) > >#define generic_find_next_zero_le_bit(addr,size,offset) find_next_zero_bit(addr, size, offset) ># 50 "include/asm-generic/bitops/le.h" >#define generic_find_first_zero_le_bit(addr,size) generic_find_next_zero_le_bit((addr), (size), 0) ># 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2 > >#define ext2_set_bit(nr,addr) generic___test_and_set_le_bit((nr),(unsigned long *)(addr)) > >#define ext2_clear_bit(nr,addr) generic___test_and_clear_le_bit((nr),(unsigned long *)(addr)) > > >#define ext2_test_bit(nr,addr) generic_test_le_bit((nr),(unsigned long *)(addr)) > >#define ext2_find_first_zero_bit(addr,size) generic_find_first_zero_le_bit((unsigned long *)(addr), (size)) > >#define ext2_find_next_zero_bit(addr,size,off) generic_find_next_zero_le_bit((unsigned long *)(addr), (size), (off)) ># 413 "include/asm/arch/bitops.h" 2 > >#define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(unsigned long*)addr) > >#define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(unsigned long*)addr) > > ># 1 "include/asm-generic/bitops/minix.h" 1 > >#define _ASM_GENERIC_BITOPS_MINIX_H_ > >#define minix_test_and_set_bit(nr,addr) __test_and_set_bit((nr),(unsigned long *)(addr)) > >#define minix_set_bit(nr,addr) __set_bit((nr),(unsigned long *)(addr)) > >#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit((nr),(unsigned long *)(addr)) > >#define minix_test_bit(nr,addr) test_bit((nr),(unsigned long *)(addr)) > >#define minix_find_first_zero_bit(addr,size) find_first_zero_bit((unsigned long *)(addr),(size)) ># 420 "include/asm/arch/bitops.h" 2 ># 5 "include/asm/bitops.h" 2 ># 10 "include/linux/bitops.h" 2 > >static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count) >{ > int order; > > order = fls(count); > return order; >} > >static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count) >{ > int order; > > order = fls(count) - 1; > if (count & (count - 1)) > order++; > return order; >} > >static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w) >{ > return sizeof(w) == 4 ? hweight32(w) : hweight64(w); >} > > > > > > > >static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift) >{ > return (word << shift) | (word >> (32 - shift)); >} > > > > > > > >static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift) >{ > return (word >> shift) | (word << (32 - shift)); >} > >static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l) >{ > if (sizeof(l) == 4) > return fls(l); > return fls64(l); >} ># 21 "include/linux/thread_info.h" 2 ># 1 "include/asm/thread_info.h" 1 > > > > > > >#define __UM_THREAD_INFO_H > > > ># 1 "include/asm/processor.h" 1 > > > > > > >#define __UM_PROCESSOR_I386_H > ># 1 "include/linux/string.h" 1 > >#define _LINUX_STRING_H_ ># 16 "include/linux/string.h" >extern char *strndup_user(const char *, long); > > > > ># 1 "include/asm/string.h" 1 > >#define __UM_STRING_H > ># 1 "include/asm/arch/string.h" 1 > >#define _I386_STRING_H_ ># 28 "include/asm/arch/string.h" >#define __HAVE_ARCH_STRCPY >static inline __attribute__((always_inline)) char * strcpy(char * dest,const char *src) >{ >int d0, d1, d2; >__asm__ __volatile__( > "1:\tlodsb\n\t" > "stosb\n\t" > "testb %%al,%%al\n\t" > "jne 1b" > : "=&S" (d0), "=&D" (d1), "=&a" (d2) > :"0" (src),"1" (dest) : "memory"); >return dest; >} > >#define __HAVE_ARCH_STRNCPY >static inline __attribute__((always_inline)) char * strncpy(char * dest,const char *src,size_t count) >{ >int d0, d1, d2, d3; >__asm__ __volatile__( > "1:\tdecl %2\n\t" > "js 2f\n\t" > "lodsb\n\t" > "stosb\n\t" > "testb %%al,%%al\n\t" > "jne 1b\n\t" > "rep\n\t" > "stosb\n" > "2:" > : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) > :"0" (src),"1" (dest),"2" (count) : "memory"); >return dest; >} > >#define __HAVE_ARCH_STRCAT >static inline __attribute__((always_inline)) char * strcat(char * dest,const char * src) >{ >int d0, d1, d2, d3; >__asm__ __volatile__( > "repne\n\t" > "scasb\n\t" > "decl %1\n" > "1:\tlodsb\n\t" > "stosb\n\t" > "testb %%al,%%al\n\t" > "jne 1b" > : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) > : "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu):"memory"); >return dest; >} > >#define __HAVE_ARCH_STRNCAT >static inline __attribute__((always_inline)) char * strncat(char * dest,const char * src,size_t count) >{ >int d0, d1, d2, d3; >__asm__ __volatile__( > "repne\n\t" > "scasb\n\t" > "decl %1\n\t" > "movl %8,%3\n" > "1:\tdecl %3\n\t" > "js 2f\n\t" > "lodsb\n\t" > "stosb\n\t" > "testb %%al,%%al\n\t" > "jne 1b\n" > "2:\txorl %2,%2\n\t" > "stosb" > : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) > : "0" (src),"1" (dest),"2" (0),"3" (0xffffffffu), "g" (count) > : "memory"); >return dest; >} > >#define __HAVE_ARCH_STRCMP >static inline __attribute__((always_inline)) int strcmp(const char * cs,const char * ct) >{ >int d0, d1; >register int __res; >__asm__ __volatile__( > "1:\tlodsb\n\t" > "scasb\n\t" > "jne 2f\n\t" > "testb %%al,%%al\n\t" > "jne 1b\n\t" > "xorl %%eax,%%eax\n\t" > "jmp 3f\n" > "2:\tsbbl %%eax,%%eax\n\t" > "orb $1,%%al\n" > "3:" > :"=a" (__res), "=&S" (d0), "=&D" (d1) > :"1" (cs),"2" (ct) > :"memory"); >return __res; >} > >#define __HAVE_ARCH_STRNCMP >static inline __attribute__((always_inline)) int strncmp(const char * cs,const char * ct,size_t count) >{ >register int __res; >int d0, d1, d2; >__asm__ __volatile__( > "1:\tdecl %3\n\t" > "js 2f\n\t" > "lodsb\n\t" > "scasb\n\t" > "jne 3f\n\t" > "testb %%al,%%al\n\t" > "jne 1b\n" > "2:\txorl %%eax,%%eax\n\t" > "jmp 4f\n" > "3:\tsbbl %%eax,%%eax\n\t" > "orb $1,%%al\n" > "4:" > :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) > :"1" (cs),"2" (ct),"3" (count) > :"memory"); >return __res; >} > >#define __HAVE_ARCH_STRCHR >static inline __attribute__((always_inline)) char * strchr(const char * s, int c) >{ >int d0; >register char * __res; >__asm__ __volatile__( > "movb %%al,%%ah\n" > "1:\tlodsb\n\t" > "cmpb %%ah,%%al\n\t" > "je 2f\n\t" > "testb %%al,%%al\n\t" > "jne 1b\n\t" > "movl $1,%1\n" > "2:\tmovl %1,%0\n\t" > "decl %0" > :"=a" (__res), "=&S" (d0) > :"1" (s),"0" (c) > :"memory"); >return __res; >} > >#define __HAVE_ARCH_STRRCHR >static inline __attribute__((always_inline)) char * strrchr(const char * s, int c) >{ >int d0, d1; >register char * __res; >__asm__ __volatile__( > "movb %%al,%%ah\n" > "1:\tlodsb\n\t" > "cmpb %%ah,%%al\n\t" > "jne 2f\n\t" > "leal -1(%%esi),%0\n" > "2:\ttestb %%al,%%al\n\t" > "jne 1b" > :"=g" (__res), "=&S" (d0), "=&a" (d1) > :"0" (0),"1" (s),"2" (c) > :"memory"); >return __res; >} > >#define __HAVE_ARCH_STRLEN >static inline __attribute__((always_inline)) size_t strlen(const char * s) >{ >int d0; >register int __res; >__asm__ __volatile__( > "repne\n\t" > "scasb\n\t" > "notl %0\n\t" > "decl %0" > :"=c" (__res), "=&D" (d0) > :"1" (s),"a" (0), "0" (0xffffffffu) > :"memory"); >return __res; >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __memcpy(void * to, const void * from, size_t n) >{ >int d0, d1, d2; >__asm__ __volatile__( > "rep ; movsl\n\t" > "movl %4,%%ecx\n\t" > "andl $3,%%ecx\n\t" > > "jz 1f\n\t" > > "rep ; movsb\n\t" > "1:" > : "=&c" (d0), "=&D" (d1), "=&S" (d2) > : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from) > : "memory"); >return (to); >} > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_memcpy(void * to, const void * from, size_t n) >{ > long esi, edi; > if (!n) return to; > > switch (n) { > case 1: *(char*)to = *(char*)from; return to; > case 2: *(short*)to = *(short*)from; return to; > case 4: *(int*)to = *(int*)from; return to; > > case 3: *(short*)to = *(short*)from; > *((char*)to+2) = *((char*)from+2); return to; > case 5: *(int*)to = *(int*)from; > *((char*)to+4) = *((char*)from+4); return to; > case 6: *(int*)to = *(int*)from; > *((short*)to+2) = *((short*)from+2); return to; > case 8: *(int*)to = *(int*)from; > *((int*)to+1) = *((int*)from+1); return to; > > } > > esi = (long) from; > edi = (long) to; > if (n >= 5*4) { > > int ecx; > __asm__ __volatile__( > "rep ; movsl" > : "=&c" (ecx), "=&D" (edi), "=&S" (esi) > : "0" (n/4), "1" (edi),"2" (esi) > : "memory" > ); > } else { > > if (n >= 4*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 3*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 2*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 1*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > } > switch (n % 4) { > > case 0: return to; > case 1: __asm__ __volatile__("movsb" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > case 2: __asm__ __volatile__("movsw" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > default: __asm__ __volatile__("movsw\n\tmovsb" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > } >} > >#define __HAVE_ARCH_MEMCPY ># 318 "include/asm/arch/string.h" >#define memcpy(t,f,n) (__builtin_constant_p(n) ? __constant_memcpy((t),(f),(n)) : __memcpy((t),(f),(n))) > > > > > > >#define __HAVE_ARCH_MEMMOVE >void *memmove(void * dest,const void * src, size_t n); > >#define memcmp __builtin_memcmp > >#define __HAVE_ARCH_MEMCHR >static inline __attribute__((always_inline)) void * memchr(const void * cs,int c,size_t count) >{ >int d0; >register void * __res; >if (!count) > return ((void *)0); >__asm__ __volatile__( > "repne\n\t" > "scasb\n\t" > "je 1f\n\t" > "movl $1,%0\n" > "1:\tdecl %0" > :"=D" (__res), "=&c" (d0) > :"a" (c),"0" (cs),"1" (count) > :"memory"); >return __res; >} > >static inline __attribute__((always_inline)) void * __memset_generic(void * s, char c,size_t count) >{ >int d0, d1; >__asm__ __volatile__( > "rep\n\t" > "stosb" > : "=&c" (d0), "=&D" (d1) > :"a" (c),"1" (s),"0" (count) > :"memory"); >return s; >} > > >#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) > > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_c_memset(void * s, unsigned long c, size_t count) >{ >int d0, d1; >__asm__ __volatile__( > "rep ; stosl\n\t" > "testb $2,%b3\n\t" > "je 1f\n\t" > "stosw\n" > "1:\ttestb $1,%b3\n\t" > "je 2f\n\t" > "stosb\n" > "2:" > :"=&c" (d0), "=&D" (d1) > :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) > :"memory"); >return (s); >} > > >#define __HAVE_ARCH_STRNLEN >static inline __attribute__((always_inline)) size_t strnlen(const char * s, size_t count) >{ >int d0; >register int __res; >__asm__ __volatile__( > "movl %2,%0\n\t" > "jmp 2f\n" > "1:\tcmpb $0,(%0)\n\t" > "je 3f\n\t" > "incl %0\n" > "2:\tdecl %1\n\t" > "cmpl $-1,%1\n\t" > "jne 1b\n" > "3:\tsubl %2,%0" > :"=a" (__res), "=&d" (d0) > :"c" (s),"1" (count) > :"memory"); >return __res; >} > > >#define __HAVE_ARCH_STRSTR > >extern char *strstr(const char *cs, const char *ct); > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) >{ > switch (count) { > case 0: > return s; > case 1: > *(unsigned char *)s = pattern; > return s; > case 2: > *(unsigned short *)s = pattern; > return s; > case 3: > *(unsigned short *)s = pattern; > *(2+(unsigned char *)s) = pattern; > return s; > case 4: > *(unsigned long *)s = pattern; > return s; > } >#define COMMON(x) __asm__ __volatile__( "rep ; stosl" x : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory") > > > > > > >{ > int d0, d1; > switch (count % 4) { > case 0: __asm__ __volatile__( "rep ; stosl" "" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > case 1: __asm__ __volatile__( "rep ; stosl" "\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > case 2: __asm__ __volatile__( "rep ; stosl" "\n\tstosw" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > default: __asm__ __volatile__( "rep ; stosl" "\n\tstosw\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > } >} > >#undef COMMON >} > >#define __constant_c_x_memset(s,c,count) (__builtin_constant_p(count) ? __constant_c_and_count_memset((s),(c),(count)) : __constant_c_memset((s),(c),(count))) > > > > >#define __memset(s,c,count) (__builtin_constant_p(count) ? __constant_count_memset((s),(c),(count)) : __memset_generic((s),(c),(count))) > > > > >#define __HAVE_ARCH_MEMSET >#define memset(s,c,count) (__builtin_constant_p(c) ? __constant_c_x_memset((s),(0x01010101UL*(unsigned char)(c)),(count)) : __memset((s),(c),(count))) > > > > > > > >#define __HAVE_ARCH_MEMSCAN >static inline __attribute__((always_inline)) void * memscan(void * addr, int c, size_t size) >{ > if (!size) > return addr; > __asm__("repnz; scasb\n\t" > "jnz 1f\n\t" > "dec %%edi\n" > "1:" > : "=D" (addr), "=c" (size) > : "0" (addr), "1" (size), "a" (c) > : "memory"); > return addr; >} ># 5 "include/asm/string.h" 2 ># 1 "include/asm/archparam.h" 1 > > > > > > >#define __UM_ARCHPARAM_I386_H ># 6 "include/asm/string.h" 2 ># 22 "include/linux/string.h" 2 ># 30 "include/linux/string.h" >size_t strlcpy(char *, const char *, size_t); ># 39 "include/linux/string.h" >extern size_t strlcat(char *, const char *, __kernel_size_t); ># 48 "include/linux/string.h" >extern int strnicmp(const char *, const char *, __kernel_size_t); > > > > > >extern char * strnchr(const char *, size_t, int); > > > > >extern char * strstrip(char *); ># 70 "include/linux/string.h" >extern char * strpbrk(const char *,const char *); > > >extern char * strsep(char **,const char *); > > >extern __kernel_size_t strspn(const char *,const char *); > > >extern __kernel_size_t strcspn(const char *,const char *); ># 95 "include/linux/string.h" >extern int __builtin_memcmp(const void *,const void *,__kernel_size_t); > > > > > >extern char *kstrdup(const char *s, gfp_t gfp); >extern void *kmemdup(const void *src, size_t len, gfp_t gfp); ># 10 "include/asm/processor.h" 2 ># 1 "include/asm/host_ldt.h" 1 > >#define __ASM_HOST_LDT_I386_H > ># 1 "include/asm/arch/ldt.h" 1 > > > > > > >#define _LINUX_LDT_H > > >#define LDT_ENTRIES 8192 > >#define LDT_ENTRY_SIZE 8 > > >struct user_desc { > unsigned int entry_number; > unsigned long base_addr; > unsigned int limit; > unsigned int seg_32bit:1; > unsigned int contents:2; > unsigned int read_exec_only:1; > unsigned int limit_in_pages:1; > unsigned int seg_not_present:1; > unsigned int useable:1; >}; > >#define MODIFY_LDT_CONTENTS_DATA 0 >#define MODIFY_LDT_CONTENTS_STACK 1 >#define MODIFY_LDT_CONTENTS_CODE 2 ># 5 "include/asm/host_ldt.h" 2 > > > > >#define LDT_entry_a(info) ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) > > >#define LDT_entry_b(info) (((info)->base_addr & 0xff000000) | (((info)->base_addr & 0x00ff0000) >> 16) | ((info)->limit & 0xf0000) | (((info)->read_exec_only ^ 1) << 9) | ((info)->contents << 10) | (((info)->seg_not_present ^ 1) << 15) | ((info)->seg_32bit << 22) | ((info)->limit_in_pages << 23) | ((info)->useable << 20) | 0x7000) ># 24 "include/asm/host_ldt.h" >#define LDT_empty(info) ( (info)->base_addr == 0 && (info)->limit == 0 && (info)->contents == 0 && (info)->read_exec_only == 1 && (info)->seg_32bit == 0 && (info)->limit_in_pages == 0 && (info)->seg_not_present == 1 && (info)->useable == 0 ) ># 11 "include/asm/processor.h" 2 ># 1 "include/asm/segment.h" 1 > >#define __UM_SEGMENT_H > >extern int host_gdt_entry_tls_min; > >#define GDT_ENTRY_TLS_ENTRIES 3 >#define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min >#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1) ># 12 "include/asm/processor.h" 2 > >extern int host_has_xmm; >extern int host_has_cmov; > > ># 1 "arch/um/include/sysdep/faultinfo.h" 1 > > > > > > > >#define __FAULTINFO_I386_H ># 18 "arch/um/include/sysdep/faultinfo.h" >struct faultinfo { > int error_code; > unsigned long cr2; > int trap_no; >}; > >#define FAULT_WRITE(fi) ((fi).error_code & 2) >#define FAULT_ADDRESS(fi) ((fi).cr2) > >#define PTRACE_FULL_FAULTINFO 0 ># 18 "include/asm/processor.h" 2 > >struct uml_tls_struct { > struct user_desc tls; > unsigned flushed:1; > unsigned present:1; >}; > >struct arch_thread { > struct uml_tls_struct tls_array[3]; > unsigned long debugregs[8]; > int debugregs_seq; > struct faultinfo faultinfo; >}; > >#define INIT_ARCH_THREAD { .tls_array = { [ 0 ... GDT_ENTRY_TLS_ENTRIES - 1 ] = { .present = 0, .flushed = 0 } }, .debugregs = { [ 0 ... 7 ] = 0 }, .debugregs_seq = 0, .faultinfo = { 0, 0, 0 } } > > > > > > > >static inline __attribute__((always_inline)) void arch_flush_thread(struct arch_thread *thread) >{ > > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(thread->tls_array))) ? __constant_c_and_count_memset(((&thread->tls_array)),((0x01010101UL*(unsigned char)(0))),((sizeof(thread->tls_array)))) : __constant_c_memset(((&thread->tls_array)),((0x01010101UL*(unsigned char)(0))),((sizeof(thread->tls_array))))) : (__builtin_constant_p((sizeof(thread->tls_array))) ? __memset_generic((((&thread->tls_array))),(((0))),(((sizeof(thread->tls_array))))) : __memset_generic(((&thread->tls_array)),((0)),((sizeof(thread->tls_array)))))); >} > >static inline __attribute__((always_inline)) void arch_copy_thread(struct arch_thread *from, > struct arch_thread *to) >{ > (__builtin_constant_p(sizeof(from->tls_array)) ? __constant_memcpy((&to->tls_array),(&from->tls_array),(sizeof(from->tls_array))) : __memcpy((&to->tls_array),(&from->tls_array),(sizeof(from->tls_array)))); >} > ># 1 "include/asm/arch/user.h" 1 > >#define _I386_USER_H > ># 1 "include/asm/page.h" 1 > > > > > > > >#define __UM_PAGE_H > >struct page; > ># 1 "include/asm/vm-flags.h" 1 > > > > > > >#define __VM_FLAGS_I386_H > >#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) ># 13 "include/asm/page.h" 2 > > >#define PAGE_SHIFT 12 >#define PAGE_SIZE (1UL << PAGE_SHIFT) >#define PAGE_MASK (~(PAGE_SIZE-1)) > > > > > >#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) >#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) > >#define clear_user_page(page,vaddr,pg) clear_page(page) >#define copy_user_page(to,from,vaddr,pg) copy_page(to, from) ># 55 "include/asm/page.h" >typedef struct { unsigned long pte; } pte_t; >typedef struct { unsigned long pgd; } pgd_t; > > > > > > > >#define pte_val(x) ((x).pte) > > >#define pte_get_bits(p,bits) ((p).pte & (bits)) >#define pte_set_bits(p,bits) ((p).pte |= (bits)) >#define pte_clear_bits(p,bits) ((p).pte &= ~(bits)) >#define pte_copy(to,from) ((to).pte = (from).pte) >#define pte_is_zero(p) (!((p).pte & ~_PAGE_NEWPAGE)) >#define pte_set_val(p,phys,prot) (p).pte = (phys | pgprot_val(prot)) > >typedef unsigned long pfn_t; >typedef unsigned long phys_t; > > > >typedef struct { unsigned long pgprot; } pgprot_t; > >#define pgd_val(x) ((x).pgd) >#define pgprot_val(x) ((x).pgprot) > >#define __pte(x) ((pte_t) { (x) } ) >#define __pgd(x) ((pgd_t) { (x) } ) >#define __pgprot(x) ((pgprot_t) { (x) } ) > > >#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) > >extern unsigned long uml_physmem; > >#define PAGE_OFFSET (uml_physmem) >#define KERNELBASE PAGE_OFFSET > >#define __va_space (8*1024*1024) > ># 1 "arch/um/include/mem.h" 1 > > > > > > >#define __MEM_H__ > > > >extern int phys_mapping(unsigned long phys, __u64 *offset_out); >extern int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w); >extern int is_remapped(void *virt); >extern int physmem_remove_mapping(void *virt); >extern void physmem_forget_descriptor(int fd); > >extern unsigned long uml_physmem; >static inline __attribute__((always_inline)) unsigned long to_phys(void *virt) >{ > return(((unsigned long) virt) - uml_physmem); >} > >static inline __attribute__((always_inline)) void *to_virt(unsigned long phys) >{ > return((void *) uml_physmem + phys); >} ># 99 "include/asm/page.h" 2 > > > > > > >#define __pa(virt) to_phys((void *) (unsigned long) (virt)) >#define __va(phys) to_virt((unsigned long) (phys)) > >#define phys_to_pfn(p) ((p) >> PAGE_SHIFT) >#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) > >#define pfn_valid(pfn) ((pfn) < max_mapnr) >#define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) > >extern struct page *arch_validate(struct page *page, gfp_t mask, int order); >#define HAVE_ARCH_VALIDATE > >extern void arch_free_page(struct page *page, int order); >#define HAVE_ARCH_FREE_PAGE > ># 1 "include/asm-generic/memory_model.h" 1 > >#define __ASM_MEMORY_MODEL_H > > > > > > > >#define ARCH_PFN_OFFSET (0UL) ># 31 "include/asm-generic/memory_model.h" >#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) >#define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + ARCH_PFN_OFFSET) ># 73 "include/asm-generic/memory_model.h" >#define page_to_pfn __page_to_pfn >#define pfn_to_page __pfn_to_page ># 121 "include/asm/page.h" 2 ># 1 "include/asm-generic/page.h" 1 > >#define _ASM_GENERIC_PAGE_H > > > > ># 1 "include/linux/log2.h" 1 ># 13 "include/linux/log2.h" >#define _LINUX_LOG2_H > > > > > > > >extern __attribute__((const, noreturn)) >int ____ilog2_NaN(void); ># 31 "include/linux/log2.h" >static inline __attribute__((always_inline)) __attribute__((const)) >int __ilog2_u32(u32 n) >{ > return fls(n) - 1; >} > > > >static inline __attribute__((always_inline)) __attribute__((const)) >int __ilog2_u64(u64 n) >{ > return fls64(n) - 1; >} > > > > > >static inline __attribute__((always_inline)) __attribute__((const)) >unsigned long __roundup_pow_of_two(unsigned long n) >{ > return 1UL << fls_long(n - 1); >} ># 65 "include/linux/log2.h" >#define ilog2(n) ( __builtin_constant_p(n) ? ( (n) < 1 ? ____ilog2_NaN() : (n) & (1ULL << 63) ? 63 : (n) & (1ULL << 62) ? 62 : (n) & (1ULL << 61) ? 61 : (n) & (1ULL << 60) ? 60 : (n) & (1ULL << 59) ? 59 : (n) & (1ULL << 58) ? 58 : (n) & (1ULL << 57) ? 57 : (n) & (1ULL << 56) ? 56 : (n) & (1ULL << 55) ? 55 : (n) & (1ULL << 54) ? 54 : (n) & (1ULL << 53) ? 53 : (n) & (1ULL << 52) ? 52 : (n) & (1ULL << 51) ? 51 : (n) & (1ULL << 50) ? 50 : (n) & (1ULL << 49) ? 49 : (n) & (1ULL << 48) ? 48 : (n) & (1ULL << 47) ? 47 : (n) & (1ULL << 46) ? 46 : (n) & (1ULL << 45) ? 45 : (n) & (1ULL << 44) ? 44 : (n) & (1ULL << 43) ? 43 : (n) & (1ULL << 42) ? 42 : (n) & (1ULL << 41) ? 41 : (n) & (1ULL << 40) ? 40 : (n) & (1ULL << 39) ? 39 : (n) & (1ULL << 38) ? 38 : (n) & (1ULL << 37) ? 37 : (n) & (1ULL << 36) ? 36 : (n) & (1ULL << 35) ? 35 : (n) & (1ULL << 34) ? 34 : (n) & (1ULL << 33) ? 33 : (n) & (1ULL << 32) ? 32 : (n) & (1ULL << 31) ? 31 : (n) & (1ULL << 30) ? 30 : (n) & (1ULL << 29) ? 29 : (n) & (1ULL << 28) ? 28 : (n) & (1ULL << 27) ? 27 : (n) & (1ULL << 26) ? 26 : (n) & (1ULL << 25) ? 25 : (n) & (1ULL << 24) ? 24 : (n) & (1ULL << 23) ? 23 : (n) & (1ULL << 22) ? 22 : (n) & (1ULL << 21) ? 21 : (n) & (1ULL << 20) ? 20 : (n) & (1ULL << 19) ? 19 : (n) & (1ULL << 18) ? 18 : (n) & (1ULL << 17) ? 17 : (n) & (1ULL << 16) ? 16 : (n) & (1ULL << 15) ? 15 : (n) & (1ULL << 14) ? 14 : (n) & (1ULL << 13) ? 13 : (n) & (1ULL << 12) ? 12 : (n) & (1ULL << 11) ? 11 : (n) & (1ULL << 10) ? 10 : (n) & (1ULL << 9) ? 9 : (n) & (1ULL << 8) ? 8 : (n) & (1ULL << 7) ? 7 : (n) & (1ULL << 6) ? 6 : (n) & (1ULL << 5) ? 5 : (n) & (1ULL << 4) ? 4 : (n) & (1ULL << 3) ? 3 : (n) & (1ULL << 2) ? 2 : (n) & (1ULL << 1) ? 1 : (n) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(n) <= 4) ? __ilog2_u32(n) : __ilog2_u64(n) ) ># 148 "include/linux/log2.h" >#define roundup_pow_of_two(n) ( __builtin_constant_p(n) ? ( (n == 1) ? 0 : (1UL << (ilog2((n) - 1) + 1)) ) : __roundup_pow_of_two(n) ) ># 8 "include/asm-generic/page.h" 2 ># 16 "include/asm-generic/page.h" >static inline __attribute__((always_inline)) __attribute__((const)) >int __get_order(unsigned long size, int page_shift) >{ > > > > > > > > int order; > > size = (size - 1) >> (page_shift - 1); > order = -1; > do { > size >>= 1; > order++; > } while (size); > return order; > >} ># 46 "include/asm-generic/page.h" >#define get_order(n) ( __builtin_constant_p(n) ? ((n < (1UL << PAGE_SHIFT)) ? 0 : ilog2(n) - PAGE_SHIFT) : __get_order(n, PAGE_SHIFT) ) ># 122 "include/asm/page.h" 2 ># 5 "include/asm/arch/user.h" 2 ># 44 "include/asm/arch/user.h" >struct user_i387_struct { > long cwd; > long swd; > long twd; > long fip; > long fcs; > long foo; > long fos; > long st_space[20]; >}; > >struct user_fxsr_struct { > unsigned short cwd; > unsigned short swd; > unsigned short twd; > unsigned short fop; > long fip; > long fcs; > long foo; > long fos; > long mxcsr; > long reserved; > long st_space[32]; > long xmm_space[32]; > long padding[56]; >}; > > > > > > > >struct user_regs_struct { > long ebx, ecx, edx, esi, edi, ebp, eax; > unsigned short ds, __ds, es, __es; > unsigned short fs, __fs, gs, __gs; > long orig_eax, eip; > unsigned short cs, __cs; > long eflags, esp; > unsigned short ss, __ss; >}; > > > > >struct user{ > > > struct user_regs_struct regs; > > int u_fpvalid; > > struct user_i387_struct i387; > > unsigned long int u_tsize; > unsigned long int u_dsize; > unsigned long int u_ssize; > unsigned long start_code; > unsigned long start_stack; > > > > long int signal; > int reserved; > struct user_pt_regs * u_ar0; > > struct user_i387_struct* u_fpstate; > unsigned long magic; > char u_comm[32]; > int u_debugreg[8]; >}; >#define NBPG PAGE_SIZE >#define UPAGES 1 >#define HOST_TEXT_START_ADDR (u.start_code) >#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) ># 53 "include/asm/processor.h" 2 > > >static inline __attribute__((always_inline)) void rep_nop(void) >{ > __asm__ __volatile__("rep;nop": : :"memory"); >} > >#define cpu_relax() rep_nop() > > > > > > >#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; }) > > >#define ARCH_IS_STACKGROW(address) (address + 32 >= UPT_SP(¤t->thread.regs.regs)) > > >#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP) >#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP) >#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP) > ># 1 "include/asm/processor-generic.h" 1 > > > > > > >#define __UM_PROCESSOR_GENERIC_H > >struct pt_regs; > >struct task_struct; > ># 1 "include/asm/ptrace.h" 1 > > > > > > >#define __UM_PTRACE_I386_H > >#define HOST_AUDIT_ARCH AUDIT_ARCH_I386 > > ># 1 "arch/um/include/sysdep/ptrace.h" 1 > > > > > > >#define __SYSDEP_I386_PTRACE_H > ># 1 "arch/um/include/uml-config.h" 1 > > > > > >#define AUTOCONF_INCLUDED >#define UML_CONFIG_DEBUG_SPINLOCK_SLEEP 1 >#define UML_CONFIG_BONDING_MODULE 1 >#define UML_CONFIG_DEBUG_LIST 1 >#define UML_CONFIG_TCP_CONG_ADVANCED 1 >#define UML_CONFIG_TCP_CONG_SCALABLE_MODULE 1 >#define UML_CONFIG_TCP_CONG_VENO_MODULE 1 >#define UML_CONFIG_CRYPTO_MD5_MODULE 1 >#define UML_CONFIG_FLATMEM 1 >#define UML_CONFIG_PROC_KCORE 1 >#define UML_CONFIG_CRYPTO_CBC_MODULE 1 >#define UML_CONFIG_XTERM_CHAN 1 >#define UML_CONFIG_CRYPTO_ECB_MODULE 1 >#define UML_CONFIG_UML_NET_MCAST 1 >#define UML_CONFIG_ENABLE_MUST_CHECK 1 >#define UML_CONFIG_BROKEN_ON_SMP 1 >#define UML_CONFIG_EXT2_FS_XATTR 1 >#define UML_CONFIG_LLC2_MODULE 1 >#define UML_CONFIG_EXT3_FS_XATTR 1 >#define UML_CONFIG_UML_RANDOM 1 >#define UML_CONFIG_LD_SCRIPT_DYN 1 >#define UML_CONFIG_NFS_COMMON 1 >#define UML_CONFIG_X86_TSC 1 >#define UML_CONFIG_NEST_LEVEL 0 >#define UML_CONFIG_MMAPPER 1 >#define UML_CONFIG_NFSD_V3 1 >#define UML_CONFIG_UML_X86 1 >#define UML_CONFIG_NFSD_V4 1 >#define UML_CONFIG_MODULES 1 >#define UML_CONFIG_EXT2_FS 1 >#define UML_CONFIG_EXT3_FS 1 >#define UML_CONFIG_CRYPTO_DES_MODULE 1 >#define UML_CONFIG_RCU_TORTURE_TEST_MODULE 1 >#define UML_CONFIG_DNOTIFY 1 >#define UML_CONFIG_UML_NET_SLIRP 1 >#define UML_CONFIG_ARCH "um" >#define UML_CONFIG_QFMT_V2 1 >#define UML_CONFIG_DEFCONFIG_LIST "arch/$ARCH/defconfig" >#define UML_CONFIG_DEBUG_LOCKING_API_SELFTESTS 1 >#define UML_CONFIG_DETECT_SOFTLOCKUP 1 >#define UML_CONFIG_INOTIFY 1 >#define UML_CONFIG_SLAB 1 >#define UML_CONFIG_DLM_TCP 1 >#define UML_CONFIG_HOTPLUG 1 >#define UML_CONFIG_FLATMEM_MANUAL 1 >#define UML_CONFIG_IPV6_MODULE 1 >#define UML_CONFIG_SUNRPC_GSS_MODULE 1 >#define UML_CONFIG_FLAT_NODE_MEM_MAP 1 >#define UML_CONFIG_DEBUG_SPINLOCK 1 >#define UML_CONFIG_VFAT_FS_MODULE 1 >#define UML_CONFIG_LOCALVERSION_AUTO 1 >#define UML_CONFIG_SLHC_MODULE 1 >#define UML_CONFIG_NFSD_MODULE 1 >#define UML_CONFIG_UDF_NLS 1 >#define UML_CONFIG_FUSE_FS_MODULE 1 >#define UML_CONFIG_KMOD 1 >#define UML_CONFIG_STUB_START 0xbfffe000 >#define UML_CONFIG_PROC_FS 1 >#define UML_CONFIG_X86_CMPXCHG 1 >#define UML_CONFIG_INET 1 >#define UML_CONFIG_RT_MUTEXES 1 >#define UML_CONFIG_SYSVIPC 1 >#define UML_CONFIG_TCP_CONG_CUBIC 1 >#define UML_CONFIG_X86_L1_CACHE_SHIFT 6 >#define UML_CONFIG_NTFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET 1 >#define UML_CONFIG_SLIP_MODULE 1 >#define UML_CONFIG_IOSCHED_CFQ 1 >#define UML_CONFIG_GENERIC_BUG 1 >#define UML_CONFIG_CRYPTO_MANAGER_MODULE 1 >#define UML_CONFIG_SWAP 1 >#define UML_CONFIG_EXT2_FS_POSIX_ACL 1 >#define UML_CONFIG_TCP_CONG_HYBLA_MODULE 1 >#define UML_CONFIG_EXT3_FS_POSIX_ACL 1 >#define UML_CONFIG_CRC32_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_COUNT 16 >#define UML_CONFIG_CRC16_MODULE 1 >#define UML_CONFIG_FAT_DEFAULT_IOCHARSET "iso8859-1" >#define UML_CONFIG_BLK_DEV_INITRD 1 >#define UML_CONFIG_TCP_CONG_VEGAS_MODULE 1 >#define UML_CONFIG_PACKET_MMAP 1 >#define UML_CONFIG_NTFS_RW 1 >#define UML_CONFIG_PPP_DEFLATE_MODULE 1 >#define UML_CONFIG_UNIX 1 >#define UML_CONFIG_STDERR_CONSOLE 1 >#define UML_CONFIG_X86_XADD 1 >#define UML_CONFIG_CONFIGFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET_DAEMON 1 >#define UML_CONFIG_TCP_CONG_WESTWOOD_MODULE 1 >#define UML_CONFIG_UID16 1 >#define UML_CONFIG_CRYPTO_ARC4_MODULE 1 >#define UML_CONFIG_BLK_DEV_NBD_MODULE 1 >#define UML_CONFIG_IKCONFIG 1 >#define UML_CONFIG_BINFMT_MISC_MODULE 1 >#define UML_CONFIG_IP_FIB_HASH 1 >#define UML_CONFIG_CRYPTO_SHA1_MODULE 1 >#define UML_CONFIG_TCP_CONG_HSTCP_MODULE 1 >#define UML_CONFIG_PARTITION_ADVANCED 1 >#define UML_CONFIG_NLS_DEFAULT "iso8859-1" >#define UML_CONFIG_BLK_DEV_UBD 1 >#define UML_CONFIG_SPLIT_PTLOCK_CPUS 4 >#define UML_CONFIG_LOCKD_V4 1 >#define UML_CONFIG_BLK_DEV_RAM 1 >#define UML_CONFIG_VM_EVENT_COUNTERS 1 >#define UML_CONFIG_LIBCRC32C_MODULE 1 >#define UML_CONFIG_PPP_BSDCOMP_MODULE 1 >#define UML_CONFIG_SMB_NLS_REMOTE "cp437" >#define UML_CONFIG_CON_CHAN "xterm" >#define UML_CONFIG_MODVERSIONS 1 >#define UML_CONFIG_IPV6_TUNNEL_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_BLOCKSIZE 1024 >#define UML_CONFIG_SYSCTL_SYSCALL 1 >#define UML_CONFIG_ELF_CORE 1 >#define UML_CONFIG_UNWIND_INFO 1 >#define UML_CONFIG_MCONSOLE 1 >#define UML_CONFIG_DEFAULT_IOSCHED "anticipatory" >#define UML_CONFIG_DEBUG_SLAB_LEAK 1 >#define UML_CONFIG_IP_PIMSM_V1 1 >#define UML_CONFIG_IP_PNP_DHCP 1 >#define UML_CONFIG_LEGACY_PTYS 1 >#define UML_CONFIG_UNIX98_PTYS 1 >#define UML_CONFIG_X86_USE_PPRO_CHECKSUM 1 >#define UML_CONFIG_IP_PIMSM_V2 1 >#define UML_CONFIG_SEMAPHORE_SLEEPERS 1 >#define UML_CONFIG_TCP_CONG_LP_MODULE 1 >#define UML_CONFIG_DEBUG_VM 1 >#define UML_CONFIG_SSL_CHAN "pty" >#define UML_CONFIG_BLOCK 1 >#define UML_CONFIG_GENERIC_HWEIGHT 1 >#define UML_CONFIG_IRQ_RELEASE_METHOD 1 >#define UML_CONFIG_LOCKD_MODULE 1 >#define UML_CONFIG_QUOTACTL 1 >#define UML_CONFIG_TOP_ADDR 0xC0000000 >#define UML_CONFIG_IP_ADVANCED_ROUTER 1 >#define UML_CONFIG_UML_NET_TUNTAP 1 >#define UML_CONFIG_KALLSYMS 1 >#define UML_CONFIG_NFSD_TCP 1 >#define UML_CONFIG_KERNEL_STACK_ORDER 2 >#define UML_CONFIG_NLS_UTF8_MODULE 1 >#define UML_CONFIG_IPV6_SIT_MODULE 1 >#define UML_CONFIG_PROC_SYSCTL 1 >#define UML_CONFIG_PTY_CHAN 1 >#define UML_CONFIG_RAMFS 1 >#define UML_CONFIG_IP_PNP_RARP 1 >#define UML_CONFIG_TTY_CHAN 1 >#define UML_CONFIG_SHMEM 1 >#define UML_CONFIG_X86_INTEL_USERCOPY 1 >#define UML_CONFIG_EXPORTFS_MODULE 1 >#define UML_CONFIG_EPOLL 1 >#define UML_CONFIG_RELAY 1 >#define UML_CONFIG_MSDOS_FS_MODULE 1 >#define UML_CONFIG_IP_MULTIPLE_TABLES 1 >#define UML_CONFIG_RPCSEC_GSS_KRB5_MODULE 1 >#define UML_CONFIG_NLS_CODEPAGE_437_MODULE 1 >#define UML_CONFIG_PPP_MPPE_MODULE 1 >#define UML_CONFIG_HPPFS 1 >#define UML_CONFIG_STACKTRACE_SUPPORT 1 >#define UML_CONFIG_PPPOE_MODULE 1 >#define UML_CONFIG_ZLIB_DEFLATE_MODULE 1 >#define UML_CONFIG_BLK_DEV_COW_COMMON 1 >#define UML_CONFIG_DEBUG_KERNEL 1 >#define UML_CONFIG_SOUND_MODULE 1 >#define UML_CONFIG_TMPFS 1 >#define UML_CONFIG_QUOTA 1 >#define UML_CONFIG_ASK_IP_FIB_HASH 1 >#define UML_CONFIG_DUMMY_MODULE 1 >#define UML_CONFIG_PLIST 1 >#define UML_CONFIG_FUTEX 1 >#define UML_CONFIG_EXPERIMENTAL 1 >#define UML_CONFIG_BLK_DEV_CRYPTOLOOP_MODULE 1 >#define UML_CONFIG_LOCALVERSION "" >#define UML_CONFIG_SMB_NLS_DEFAULT 1 >#define UML_CONFIG_X86_POPAD_OK 1 >#define UML_CONFIG_INIT_ENV_ARG_LIMIT 128 >#define UML_CONFIG_ZLIB_INFLATE_MODULE 1 >#define UML_CONFIG_IOSCHED_DEADLINE 1 >#define UML_CONFIG_SYSFS 1 >#define UML_CONFIG_X86_CMPXCHG64 1 >#define UML_CONFIG_TCP_CONG_BIC_MODULE 1 >#define UML_CONFIG_IOSCHED_NOOP 1 >#define UML_CONFIG_INET6_TUNNEL_MODULE 1 >#define UML_CONFIG_IP_ROUTE_MULTIPATH 1 >#define UML_CONFIG_LOCKDEP_SUPPORT 1 >#define UML_CONFIG_MSDOS_PARTITION 1 >#define UML_CONFIG_CRYPTO_CAST5_MODULE 1 >#define UML_CONFIG_X86_BSWAP 1 >#define UML_CONFIG_INET_DIAG 1 >#define UML_CONFIG_HOST_VMSPLIT_3G 1 >#define UML_CONFIG_DEBUG_RWSEMS 1 >#define UML_CONFIG_CONNECTOR_MODULE 1 >#define UML_CONFIG_VLAN_8021Q_MODULE 1 >#define UML_CONFIG_BRIDGE_MODULE 1 >#define UML_CONFIG_BASE_FULL 1 >#define UML_CONFIG_CRC_CCITT_MODULE 1 >#define UML_CONFIG_IP_MULTICAST 1 >#define UML_CONFIG_PREVENT_FIRMWARE_BUILD 1 >#define UML_CONFIG_HOSTAUDIO_MODULE 1 >#define UML_CONFIG_BLK_DEV_LOOP_MODULE 1 >#define UML_CONFIG_ATA_OVER_ETH_MODULE 1 >#define UML_CONFIG_GENERIC_CALIBRATE_DELAY 1 >#define UML_CONFIG_NFS_ACL_SUPPORT_MODULE 1 >#define UML_CONFIG_NULL_CHAN 1 >#define UML_CONFIG_MODE_SKAS 1 >#define UML_CONFIG_UML_NET_PCAP 1 >#define UML_CONFIG_STUB_DATA 0xbffff000 >#define UML_CONFIG_ISO9660_FS_MODULE 1 >#define UML_CONFIG_PACKET 1 >#define UML_CONFIG_STUB_CODE 0xbfffe000 >#define UML_CONFIG_DEBUG_BUGVERBOSE 1 >#define UML_CONFIG_FS_POSIX_ACL 1 >#define UML_CONFIG_X86_WP_WORKS_OK 1 >#define UML_CONFIG_GENERIC_HARDIRQS 1 >#define UML_CONFIG_FIB_RULES 1 >#define UML_CONFIG_CRAMFS_MODULE 1 >#define UML_CONFIG_MPENTIUMM 1 >#define UML_CONFIG_PORT_CHAN 1 >#define UML_CONFIG_ARCH_HAS_SC_SIGNALS 1 >#define UML_CONFIG_INOTIFY_USER 1 >#define UML_CONFIG_POSIX_MQUEUE 1 >#define UML_CONFIG_JOLIET 1 >#define UML_CONFIG_SELECT_MEMORY_MODEL 1 >#define UML_CONFIG_IP_PNP_BOOTP 1 >#define UML_CONFIG_AUTOFS_FS_MODULE 1 >#define UML_CONFIG_DEFAULT_CUBIC 1 >#define UML_CONFIG_UML_REAL_TIME_CLOCK 1 >#define UML_CONFIG_X86_GOOD_APIC 1 >#define UML_CONFIG_UML_NET_SLIP 1 >#define UML_CONFIG_PPP_ASYNC_MODULE 1 >#define UML_CONFIG_NFS_V3 1 >#define UML_CONFIG_NFS_V4 1 >#define UML_CONFIG_JBD 1 >#define UML_CONFIG_DEFAULT_TCP_CONG "cubic" >#define UML_CONFIG_BSD_PROCESS_ACCT 1 >#define UML_CONFIG_FAT_FS_MODULE 1 >#define UML_CONFIG_CRYPTO_BLKCIPHER_MODULE 1 >#define UML_CONFIG_IP_MROUTE 1 >#define UML_CONFIG_FAT_DEFAULT_CODEPAGE 437 >#define UML_CONFIG_UML_SOUND_MODULE 1 >#define UML_CONFIG_UNAME_RELEASE "2.6.19-swsusp2" >#define UML_CONFIG_UDF_FS_MODULE 1 >#define UML_CONFIG_HOSTFS_MODULE 1 >#define UML_CONFIG_PRINTK 1 >#define UML_CONFIG_RPCSEC_GSS_SPKM3_MODULE 1 >#define UML_CONFIG_SMB_FS_MODULE 1 >#define UML_CONFIG_SUNRPC_MODULE 1 >#define UML_CONFIG_FS_MBCACHE 1 >#define UML_CONFIG_LLC_MODULE 1 >#define UML_CONFIG_DLM_MODULE 1 >#define UML_CONFIG_INITRAMFS_SOURCE "" >#define UML_CONFIG_IKCONFIG_PROC 1 >#define UML_CONFIG_BUG 1 >#define UML_CONFIG_NFS_FS_MODULE 1 >#define UML_CONFIG_CRYPTO 1 >#define UML_CONFIG_SYSCTL 1 >#define UML_CONFIG_LSF 1 >#define UML_CONFIG_IP_PNP 1 >#define UML_CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA 1 >#define UML_CONFIG_RWSEM_XCHGADD_ALGORITHM 1 >#define UML_CONFIG_NET 1 >#define UML_CONFIG_KERNELVERSION "2.6.20-rc1" >#define UML_CONFIG_DEBUG_SLAB 1 >#define UML_CONFIG_MODULE_UNLOAD 1 >#define UML_CONFIG_STANDALONE 1 >#define UML_CONFIG_KALLSYMS_EXTRA_PASS 1 >#define UML_CONFIG_NETDEVICES 1 >#define UML_CONFIG_INET_TCP_DIAG 1 >#define UML_CONFIG_FRAME_POINTER 1 >#define UML_CONFIG_PPP_SYNC_TTY_MODULE 1 >#define UML_CONFIG_NLS 1 >#define UML_CONFIG_CRYPTO_ALGAPI_MODULE 1 >#define UML_CONFIG_UML 1 >#define UML_CONFIG_MMU 1 >#define UML_CONFIG_UML_NET_ETHERTAP 1 >#define UML_CONFIG_PPP_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_SIZE 4096 >#define UML_CONFIG_DEBUG_MUTEXES 1 >#define UML_CONFIG_DEBUG_INFO 1 >#define UML_CONFIG_EXT2_FS_SECURITY 1 >#define UML_CONFIG_SSL 1 >#define UML_CONFIG_IOSCHED_AS 1 >#define UML_CONFIG_EXT3_FS_SECURITY 1 >#define UML_CONFIG_BASE_SMALL 0 >#define UML_CONFIG_STDIO_CONSOLE 1 >#define UML_CONFIG_X86_INVLPG 1 >#define UML_CONFIG_DEBUG_RT_MUTEXES 1 >#define UML_CONFIG_BINFMT_ELF 1 >#define UML_CONFIG_CON_ZERO_CHAN "fd:0,fd:1" >#define UML_CONFIG_DEFAULT_AS 1 >#define UML_CONFIG_LEGACY_PTY_COUNT 256 >#define UML_CONFIG_DEBUG_PI_LIST 1 >#define UML_CONFIG_LOG_BUF_SHIFT 16 >#define UML_CONFIG_BITREVERSE_MODULE 1 >#define UML_CONFIG_TCP_CONG_HTCP_MODULE 1 >#define UML_CONFIG_IP_ROUTE_VERBOSE 1 >#define UML_CONFIG_NFS_V3_ACL 1 >#define UML_CONFIG_AUTOFS4_FS_MODULE 1 ># 10 "arch/um/include/sysdep/ptrace.h" 2 ># 1 "arch/um/include/user_constants.h" 1 > > > > > > > >#define HOST_SC_IP 56 >#define HOST_SC_SP 28 >#define HOST_SC_FS 4 >#define HOST_SC_GS 0 >#define HOST_SC_DS 12 >#define HOST_SC_ES 8 >#define HOST_SC_SS 72 >#define HOST_SC_CS 60 >#define HOST_SC_EFLAGS 64 >#define HOST_SC_EAX 44 >#define HOST_SC_EBX 32 >#define HOST_SC_ECX 40 >#define HOST_SC_EDX 36 >#define HOST_SC_EDI 16 >#define HOST_SC_ESI 20 >#define HOST_SC_EBP 24 >#define HOST_SC_TRAPNO 48 >#define HOST_SC_ERR 52 >#define HOST_SC_CR2 84 >#define HOST_SC_FPSTATE 76 >#define HOST_SC_SIGMASK 80 >#define HOST_SC_FP_CW 0 >#define HOST_SC_FP_SW 4 >#define HOST_SC_FP_TAG 8 >#define HOST_SC_FP_IPOFF 12 >#define HOST_SC_FP_CSSEL 16 >#define HOST_SC_FP_DATAOFF 20 >#define HOST_SC_FP_DATASEL 24 >#define HOST_SC_FP_ST 28 >#define HOST_SC_FXSR_ENV 112 >#define HOST_FRAME_SIZE 17 >#define HOST_FP_SIZE 27 >#define HOST_XFP_SIZE 128 >#define HOST_IP 12 >#define HOST_SP 15 >#define HOST_EFLAGS 14 >#define HOST_EAX 6 >#define HOST_EBX 0 >#define HOST_ECX 1 >#define HOST_EDX 2 >#define HOST_ESI 3 >#define HOST_EDI 4 >#define HOST_EBP 5 >#define HOST_CS 13 >#define HOST_SS 16 >#define HOST_DS 7 >#define HOST_FS 9 >#define HOST_ES 8 >#define HOST_GS 10 >#define UM_FRAME_SIZE 68 >#define UM_POLLIN 1 >#define UM_POLLPRI 2 >#define UM_POLLOUT 4 ># 11 "arch/um/include/sysdep/ptrace.h" 2 ># 1 "arch/um/include/sysdep/faultinfo.h" 1 ># 12 "arch/um/include/sysdep/ptrace.h" 2 ># 1 "arch/um/include/choose-mode.h" 1 > > > > > > >#define __CHOOSE_MODE_H__ > ># 1 "arch/um/include/uml-config.h" 1 > > > > > >#define AUTOCONF_INCLUDED >#define UML_CONFIG_DEBUG_SPINLOCK_SLEEP 1 >#define UML_CONFIG_BONDING_MODULE 1 >#define UML_CONFIG_DEBUG_LIST 1 >#define UML_CONFIG_TCP_CONG_ADVANCED 1 >#define UML_CONFIG_TCP_CONG_SCALABLE_MODULE 1 >#define UML_CONFIG_TCP_CONG_VENO_MODULE 1 >#define UML_CONFIG_CRYPTO_MD5_MODULE 1 >#define UML_CONFIG_FLATMEM 1 >#define UML_CONFIG_PROC_KCORE 1 >#define UML_CONFIG_CRYPTO_CBC_MODULE 1 >#define UML_CONFIG_XTERM_CHAN 1 >#define UML_CONFIG_CRYPTO_ECB_MODULE 1 >#define UML_CONFIG_UML_NET_MCAST 1 >#define UML_CONFIG_ENABLE_MUST_CHECK 1 >#define UML_CONFIG_BROKEN_ON_SMP 1 >#define UML_CONFIG_EXT2_FS_XATTR 1 >#define UML_CONFIG_LLC2_MODULE 1 >#define UML_CONFIG_EXT3_FS_XATTR 1 >#define UML_CONFIG_UML_RANDOM 1 >#define UML_CONFIG_LD_SCRIPT_DYN 1 >#define UML_CONFIG_NFS_COMMON 1 >#define UML_CONFIG_X86_TSC 1 >#define UML_CONFIG_NEST_LEVEL 0 >#define UML_CONFIG_MMAPPER 1 >#define UML_CONFIG_NFSD_V3 1 >#define UML_CONFIG_UML_X86 1 >#define UML_CONFIG_NFSD_V4 1 >#define UML_CONFIG_MODULES 1 >#define UML_CONFIG_EXT2_FS 1 >#define UML_CONFIG_EXT3_FS 1 >#define UML_CONFIG_CRYPTO_DES_MODULE 1 >#define UML_CONFIG_RCU_TORTURE_TEST_MODULE 1 >#define UML_CONFIG_DNOTIFY 1 >#define UML_CONFIG_UML_NET_SLIRP 1 >#define UML_CONFIG_ARCH "um" >#define UML_CONFIG_QFMT_V2 1 >#define UML_CONFIG_DEFCONFIG_LIST "arch/$ARCH/defconfig" >#define UML_CONFIG_DEBUG_LOCKING_API_SELFTESTS 1 >#define UML_CONFIG_DETECT_SOFTLOCKUP 1 >#define UML_CONFIG_INOTIFY 1 >#define UML_CONFIG_SLAB 1 >#define UML_CONFIG_DLM_TCP 1 >#define UML_CONFIG_HOTPLUG 1 >#define UML_CONFIG_FLATMEM_MANUAL 1 >#define UML_CONFIG_IPV6_MODULE 1 >#define UML_CONFIG_SUNRPC_GSS_MODULE 1 >#define UML_CONFIG_FLAT_NODE_MEM_MAP 1 >#define UML_CONFIG_DEBUG_SPINLOCK 1 >#define UML_CONFIG_VFAT_FS_MODULE 1 >#define UML_CONFIG_LOCALVERSION_AUTO 1 >#define UML_CONFIG_SLHC_MODULE 1 >#define UML_CONFIG_NFSD_MODULE 1 >#define UML_CONFIG_UDF_NLS 1 >#define UML_CONFIG_FUSE_FS_MODULE 1 >#define UML_CONFIG_KMOD 1 >#define UML_CONFIG_STUB_START 0xbfffe000 >#define UML_CONFIG_PROC_FS 1 >#define UML_CONFIG_X86_CMPXCHG 1 >#define UML_CONFIG_INET 1 >#define UML_CONFIG_RT_MUTEXES 1 >#define UML_CONFIG_SYSVIPC 1 >#define UML_CONFIG_TCP_CONG_CUBIC 1 >#define UML_CONFIG_X86_L1_CACHE_SHIFT 6 >#define UML_CONFIG_NTFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET 1 >#define UML_CONFIG_SLIP_MODULE 1 >#define UML_CONFIG_IOSCHED_CFQ 1 >#define UML_CONFIG_GENERIC_BUG 1 >#define UML_CONFIG_CRYPTO_MANAGER_MODULE 1 >#define UML_CONFIG_SWAP 1 >#define UML_CONFIG_EXT2_FS_POSIX_ACL 1 >#define UML_CONFIG_TCP_CONG_HYBLA_MODULE 1 >#define UML_CONFIG_EXT3_FS_POSIX_ACL 1 >#define UML_CONFIG_CRC32_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_COUNT 16 >#define UML_CONFIG_CRC16_MODULE 1 >#define UML_CONFIG_FAT_DEFAULT_IOCHARSET "iso8859-1" >#define UML_CONFIG_BLK_DEV_INITRD 1 >#define UML_CONFIG_TCP_CONG_VEGAS_MODULE 1 >#define UML_CONFIG_PACKET_MMAP 1 >#define UML_CONFIG_NTFS_RW 1 >#define UML_CONFIG_PPP_DEFLATE_MODULE 1 >#define UML_CONFIG_UNIX 1 >#define UML_CONFIG_STDERR_CONSOLE 1 >#define UML_CONFIG_X86_XADD 1 >#define UML_CONFIG_CONFIGFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET_DAEMON 1 >#define UML_CONFIG_TCP_CONG_WESTWOOD_MODULE 1 >#define UML_CONFIG_UID16 1 >#define UML_CONFIG_CRYPTO_ARC4_MODULE 1 >#define UML_CONFIG_BLK_DEV_NBD_MODULE 1 >#define UML_CONFIG_IKCONFIG 1 >#define UML_CONFIG_BINFMT_MISC_MODULE 1 >#define UML_CONFIG_IP_FIB_HASH 1 >#define UML_CONFIG_CRYPTO_SHA1_MODULE 1 >#define UML_CONFIG_TCP_CONG_HSTCP_MODULE 1 >#define UML_CONFIG_PARTITION_ADVANCED 1 >#define UML_CONFIG_NLS_DEFAULT "iso8859-1" >#define UML_CONFIG_BLK_DEV_UBD 1 >#define UML_CONFIG_SPLIT_PTLOCK_CPUS 4 >#define UML_CONFIG_LOCKD_V4 1 >#define UML_CONFIG_BLK_DEV_RAM 1 >#define UML_CONFIG_VM_EVENT_COUNTERS 1 >#define UML_CONFIG_LIBCRC32C_MODULE 1 >#define UML_CONFIG_PPP_BSDCOMP_MODULE 1 >#define UML_CONFIG_SMB_NLS_REMOTE "cp437" >#define UML_CONFIG_CON_CHAN "xterm" >#define UML_CONFIG_MODVERSIONS 1 >#define UML_CONFIG_IPV6_TUNNEL_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_BLOCKSIZE 1024 >#define UML_CONFIG_SYSCTL_SYSCALL 1 >#define UML_CONFIG_ELF_CORE 1 >#define UML_CONFIG_UNWIND_INFO 1 >#define UML_CONFIG_MCONSOLE 1 >#define UML_CONFIG_DEFAULT_IOSCHED "anticipatory" >#define UML_CONFIG_DEBUG_SLAB_LEAK 1 >#define UML_CONFIG_IP_PIMSM_V1 1 >#define UML_CONFIG_IP_PNP_DHCP 1 >#define UML_CONFIG_LEGACY_PTYS 1 >#define UML_CONFIG_UNIX98_PTYS 1 >#define UML_CONFIG_X86_USE_PPRO_CHECKSUM 1 >#define UML_CONFIG_IP_PIMSM_V2 1 >#define UML_CONFIG_SEMAPHORE_SLEEPERS 1 >#define UML_CONFIG_TCP_CONG_LP_MODULE 1 >#define UML_CONFIG_DEBUG_VM 1 >#define UML_CONFIG_SSL_CHAN "pty" >#define UML_CONFIG_BLOCK 1 >#define UML_CONFIG_GENERIC_HWEIGHT 1 >#define UML_CONFIG_IRQ_RELEASE_METHOD 1 >#define UML_CONFIG_LOCKD_MODULE 1 >#define UML_CONFIG_QUOTACTL 1 >#define UML_CONFIG_TOP_ADDR 0xC0000000 >#define UML_CONFIG_IP_ADVANCED_ROUTER 1 >#define UML_CONFIG_UML_NET_TUNTAP 1 >#define UML_CONFIG_KALLSYMS 1 >#define UML_CONFIG_NFSD_TCP 1 >#define UML_CONFIG_KERNEL_STACK_ORDER 2 >#define UML_CONFIG_NLS_UTF8_MODULE 1 >#define UML_CONFIG_IPV6_SIT_MODULE 1 >#define UML_CONFIG_PROC_SYSCTL 1 >#define UML_CONFIG_PTY_CHAN 1 >#define UML_CONFIG_RAMFS 1 >#define UML_CONFIG_IP_PNP_RARP 1 >#define UML_CONFIG_TTY_CHAN 1 >#define UML_CONFIG_SHMEM 1 >#define UML_CONFIG_X86_INTEL_USERCOPY 1 >#define UML_CONFIG_EXPORTFS_MODULE 1 >#define UML_CONFIG_EPOLL 1 >#define UML_CONFIG_RELAY 1 >#define UML_CONFIG_MSDOS_FS_MODULE 1 >#define UML_CONFIG_IP_MULTIPLE_TABLES 1 >#define UML_CONFIG_RPCSEC_GSS_KRB5_MODULE 1 >#define UML_CONFIG_NLS_CODEPAGE_437_MODULE 1 >#define UML_CONFIG_PPP_MPPE_MODULE 1 >#define UML_CONFIG_HPPFS 1 >#define UML_CONFIG_STACKTRACE_SUPPORT 1 >#define UML_CONFIG_PPPOE_MODULE 1 >#define UML_CONFIG_ZLIB_DEFLATE_MODULE 1 >#define UML_CONFIG_BLK_DEV_COW_COMMON 1 >#define UML_CONFIG_DEBUG_KERNEL 1 >#define UML_CONFIG_SOUND_MODULE 1 >#define UML_CONFIG_TMPFS 1 >#define UML_CONFIG_QUOTA 1 >#define UML_CONFIG_ASK_IP_FIB_HASH 1 >#define UML_CONFIG_DUMMY_MODULE 1 >#define UML_CONFIG_PLIST 1 >#define UML_CONFIG_FUTEX 1 >#define UML_CONFIG_EXPERIMENTAL 1 >#define UML_CONFIG_BLK_DEV_CRYPTOLOOP_MODULE 1 >#define UML_CONFIG_LOCALVERSION "" >#define UML_CONFIG_SMB_NLS_DEFAULT 1 >#define UML_CONFIG_X86_POPAD_OK 1 >#define UML_CONFIG_INIT_ENV_ARG_LIMIT 128 >#define UML_CONFIG_ZLIB_INFLATE_MODULE 1 >#define UML_CONFIG_IOSCHED_DEADLINE 1 >#define UML_CONFIG_SYSFS 1 >#define UML_CONFIG_X86_CMPXCHG64 1 >#define UML_CONFIG_TCP_CONG_BIC_MODULE 1 >#define UML_CONFIG_IOSCHED_NOOP 1 >#define UML_CONFIG_INET6_TUNNEL_MODULE 1 >#define UML_CONFIG_IP_ROUTE_MULTIPATH 1 >#define UML_CONFIG_LOCKDEP_SUPPORT 1 >#define UML_CONFIG_MSDOS_PARTITION 1 >#define UML_CONFIG_CRYPTO_CAST5_MODULE 1 >#define UML_CONFIG_X86_BSWAP 1 >#define UML_CONFIG_INET_DIAG 1 >#define UML_CONFIG_HOST_VMSPLIT_3G 1 >#define UML_CONFIG_DEBUG_RWSEMS 1 >#define UML_CONFIG_CONNECTOR_MODULE 1 >#define UML_CONFIG_VLAN_8021Q_MODULE 1 >#define UML_CONFIG_BRIDGE_MODULE 1 >#define UML_CONFIG_BASE_FULL 1 >#define UML_CONFIG_CRC_CCITT_MODULE 1 >#define UML_CONFIG_IP_MULTICAST 1 >#define UML_CONFIG_PREVENT_FIRMWARE_BUILD 1 >#define UML_CONFIG_HOSTAUDIO_MODULE 1 >#define UML_CONFIG_BLK_DEV_LOOP_MODULE 1 >#define UML_CONFIG_ATA_OVER_ETH_MODULE 1 >#define UML_CONFIG_GENERIC_CALIBRATE_DELAY 1 >#define UML_CONFIG_NFS_ACL_SUPPORT_MODULE 1 >#define UML_CONFIG_NULL_CHAN 1 >#define UML_CONFIG_MODE_SKAS 1 >#define UML_CONFIG_UML_NET_PCAP 1 >#define UML_CONFIG_STUB_DATA 0xbffff000 >#define UML_CONFIG_ISO9660_FS_MODULE 1 >#define UML_CONFIG_PACKET 1 >#define UML_CONFIG_STUB_CODE 0xbfffe000 >#define UML_CONFIG_DEBUG_BUGVERBOSE 1 >#define UML_CONFIG_FS_POSIX_ACL 1 >#define UML_CONFIG_X86_WP_WORKS_OK 1 >#define UML_CONFIG_GENERIC_HARDIRQS 1 >#define UML_CONFIG_FIB_RULES 1 >#define UML_CONFIG_CRAMFS_MODULE 1 >#define UML_CONFIG_MPENTIUMM 1 >#define UML_CONFIG_PORT_CHAN 1 >#define UML_CONFIG_ARCH_HAS_SC_SIGNALS 1 >#define UML_CONFIG_INOTIFY_USER 1 >#define UML_CONFIG_POSIX_MQUEUE 1 >#define UML_CONFIG_JOLIET 1 >#define UML_CONFIG_SELECT_MEMORY_MODEL 1 >#define UML_CONFIG_IP_PNP_BOOTP 1 >#define UML_CONFIG_AUTOFS_FS_MODULE 1 >#define UML_CONFIG_DEFAULT_CUBIC 1 >#define UML_CONFIG_UML_REAL_TIME_CLOCK 1 >#define UML_CONFIG_X86_GOOD_APIC 1 >#define UML_CONFIG_UML_NET_SLIP 1 >#define UML_CONFIG_PPP_ASYNC_MODULE 1 >#define UML_CONFIG_NFS_V3 1 >#define UML_CONFIG_NFS_V4 1 >#define UML_CONFIG_JBD 1 >#define UML_CONFIG_DEFAULT_TCP_CONG "cubic" >#define UML_CONFIG_BSD_PROCESS_ACCT 1 >#define UML_CONFIG_FAT_FS_MODULE 1 >#define UML_CONFIG_CRYPTO_BLKCIPHER_MODULE 1 >#define UML_CONFIG_IP_MROUTE 1 >#define UML_CONFIG_FAT_DEFAULT_CODEPAGE 437 >#define UML_CONFIG_UML_SOUND_MODULE 1 >#define UML_CONFIG_UNAME_RELEASE "2.6.19-swsusp2" >#define UML_CONFIG_UDF_FS_MODULE 1 >#define UML_CONFIG_HOSTFS_MODULE 1 >#define UML_CONFIG_PRINTK 1 >#define UML_CONFIG_RPCSEC_GSS_SPKM3_MODULE 1 >#define UML_CONFIG_SMB_FS_MODULE 1 >#define UML_CONFIG_SUNRPC_MODULE 1 >#define UML_CONFIG_FS_MBCACHE 1 >#define UML_CONFIG_LLC_MODULE 1 >#define UML_CONFIG_DLM_MODULE 1 >#define UML_CONFIG_INITRAMFS_SOURCE "" >#define UML_CONFIG_IKCONFIG_PROC 1 >#define UML_CONFIG_BUG 1 >#define UML_CONFIG_NFS_FS_MODULE 1 >#define UML_CONFIG_CRYPTO 1 >#define UML_CONFIG_SYSCTL 1 >#define UML_CONFIG_LSF 1 >#define UML_CONFIG_IP_PNP 1 >#define UML_CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA 1 >#define UML_CONFIG_RWSEM_XCHGADD_ALGORITHM 1 >#define UML_CONFIG_NET 1 >#define UML_CONFIG_KERNELVERSION "2.6.20-rc1" >#define UML_CONFIG_DEBUG_SLAB 1 >#define UML_CONFIG_MODULE_UNLOAD 1 >#define UML_CONFIG_STANDALONE 1 >#define UML_CONFIG_KALLSYMS_EXTRA_PASS 1 >#define UML_CONFIG_NETDEVICES 1 >#define UML_CONFIG_INET_TCP_DIAG 1 >#define UML_CONFIG_FRAME_POINTER 1 >#define UML_CONFIG_PPP_SYNC_TTY_MODULE 1 >#define UML_CONFIG_NLS 1 >#define UML_CONFIG_CRYPTO_ALGAPI_MODULE 1 >#define UML_CONFIG_UML 1 >#define UML_CONFIG_MMU 1 >#define UML_CONFIG_UML_NET_ETHERTAP 1 >#define UML_CONFIG_PPP_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_SIZE 4096 >#define UML_CONFIG_DEBUG_MUTEXES 1 >#define UML_CONFIG_DEBUG_INFO 1 >#define UML_CONFIG_EXT2_FS_SECURITY 1 >#define UML_CONFIG_SSL 1 >#define UML_CONFIG_IOSCHED_AS 1 >#define UML_CONFIG_EXT3_FS_SECURITY 1 >#define UML_CONFIG_BASE_SMALL 0 >#define UML_CONFIG_STDIO_CONSOLE 1 >#define UML_CONFIG_X86_INVLPG 1 >#define UML_CONFIG_DEBUG_RT_MUTEXES 1 >#define UML_CONFIG_BINFMT_ELF 1 >#define UML_CONFIG_CON_ZERO_CHAN "fd:0,fd:1" >#define UML_CONFIG_DEFAULT_AS 1 >#define UML_CONFIG_LEGACY_PTY_COUNT 256 >#define UML_CONFIG_DEBUG_PI_LIST 1 >#define UML_CONFIG_LOG_BUF_SHIFT 16 >#define UML_CONFIG_BITREVERSE_MODULE 1 >#define UML_CONFIG_TCP_CONG_HTCP_MODULE 1 >#define UML_CONFIG_IP_ROUTE_VERBOSE 1 >#define UML_CONFIG_NFS_V3_ACL 1 >#define UML_CONFIG_AUTOFS4_FS_MODULE 1 ># 10 "arch/um/include/choose-mode.h" 2 ># 22 "arch/um/include/choose-mode.h" >#define CHOOSE_MODE(tt,skas) (skas) ># 31 "arch/um/include/choose-mode.h" >#define CHOOSE_MODE_PROC(tt,skas,args...) CHOOSE_MODE(tt(args), skas(args)) > > > >#define __CHOOSE_MODE(tt,skas) CHOOSE_MODE(tt, skas) ># 13 "arch/um/include/sysdep/ptrace.h" 2 > >#define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) >#define MAX_REG_OFFSET (UM_FRAME_SIZE) > > > > >static inline __attribute__((always_inline)) void update_debugregs(int seq) {} > > > > > > >#define PTRACE_SYSEMU 31 > > >void set_using_sysemu(int value); >int get_using_sysemu(void); >extern int sysemu_supported; > > > > > > > ># 1 "arch/um/include/skas_ptregs.h" 1 > >#define __SKAS_PT_REGS_ > ># 1 "arch/um/include/user_constants.h" 1 > > > > > > > >#define HOST_SC_IP 56 >#define HOST_SC_SP 28 >#define HOST_SC_FS 4 >#define HOST_SC_GS 0 >#define HOST_SC_DS 12 >#define HOST_SC_ES 8 >#define HOST_SC_SS 72 >#define HOST_SC_CS 60 >#define HOST_SC_EFLAGS 64 >#define HOST_SC_EAX 44 >#define HOST_SC_EBX 32 >#define HOST_SC_ECX 40 >#define HOST_SC_EDX 36 >#define HOST_SC_EDI 16 >#define HOST_SC_ESI 20 >#define HOST_SC_EBP 24 >#define HOST_SC_TRAPNO 48 >#define HOST_SC_ERR 52 >#define HOST_SC_CR2 84 >#define HOST_SC_FPSTATE 76 >#define HOST_SC_SIGMASK 80 >#define HOST_SC_FP_CW 0 >#define HOST_SC_FP_SW 4 >#define HOST_SC_FP_TAG 8 >#define HOST_SC_FP_IPOFF 12 >#define HOST_SC_FP_CSSEL 16 >#define HOST_SC_FP_DATAOFF 20 >#define HOST_SC_FP_DATASEL 24 >#define HOST_SC_FP_ST 28 >#define HOST_SC_FXSR_ENV 112 >#define HOST_FRAME_SIZE 17 >#define HOST_FP_SIZE 27 >#define HOST_XFP_SIZE 128 >#define HOST_IP 12 >#define HOST_SP 15 >#define HOST_EFLAGS 14 >#define HOST_EAX 6 >#define HOST_EBX 0 >#define HOST_ECX 1 >#define HOST_EDX 2 >#define HOST_ESI 3 >#define HOST_EDI 4 >#define HOST_EBP 5 >#define HOST_CS 13 >#define HOST_SS 16 >#define HOST_DS 7 >#define HOST_FS 9 >#define HOST_ES 8 >#define HOST_GS 10 >#define UM_FRAME_SIZE 68 >#define UM_POLLIN 1 >#define UM_POLLPRI 2 >#define UM_POLLOUT 4 ># 5 "arch/um/include/skas_ptregs.h" 2 ># 41 "arch/um/include/sysdep/ptrace.h" 2 > >#define REGS_IP(r) ((r)[HOST_IP]) >#define REGS_SP(r) ((r)[HOST_SP]) >#define REGS_EFLAGS(r) ((r)[HOST_EFLAGS]) >#define REGS_EAX(r) ((r)[HOST_EAX]) >#define REGS_EBX(r) ((r)[HOST_EBX]) >#define REGS_ECX(r) ((r)[HOST_ECX]) >#define REGS_EDX(r) ((r)[HOST_EDX]) >#define REGS_ESI(r) ((r)[HOST_ESI]) >#define REGS_EDI(r) ((r)[HOST_EDI]) >#define REGS_EBP(r) ((r)[HOST_EBP]) >#define REGS_CS(r) ((r)[HOST_CS]) >#define REGS_SS(r) ((r)[HOST_SS]) >#define REGS_DS(r) ((r)[HOST_DS]) >#define REGS_ES(r) ((r)[HOST_ES]) >#define REGS_FS(r) ((r)[HOST_FS]) >#define REGS_GS(r) ((r)[HOST_GS]) > >#define REGS_SET_SYSCALL_RETURN(r,res) REGS_EAX(r) = (res) > >#define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r)) > > > >#define PTRACE_SYSEMU_SINGLESTEP 32 > > >union uml_pt_regs { ># 77 "arch/um/include/sysdep/ptrace.h" > struct skas_regs { > unsigned long regs[(68 / sizeof(unsigned long))]; > unsigned long fp[27]; > unsigned long xfp[128]; > struct faultinfo faultinfo; > long syscall; > int is_user; > } skas; > >}; > >#define EMPTY_UML_PT_REGS { } > >extern int mode_tt; > >#define UPT_SC(r) ((r)->tt.sc) >#define UPT_IP(r) __CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) > >#define UPT_SP(r) __CHOOSE_MODE(SC_SP(UPT_SC(r)), REGS_SP((r)->skas.regs)) > >#define UPT_EFLAGS(r) __CHOOSE_MODE(SC_EFLAGS(UPT_SC(r)), REGS_EFLAGS((r)->skas.regs)) > >#define UPT_EAX(r) __CHOOSE_MODE(SC_EAX(UPT_SC(r)), REGS_EAX((r)->skas.regs)) > >#define UPT_EBX(r) __CHOOSE_MODE(SC_EBX(UPT_SC(r)), REGS_EBX((r)->skas.regs)) > >#define UPT_ECX(r) __CHOOSE_MODE(SC_ECX(UPT_SC(r)), REGS_ECX((r)->skas.regs)) > >#define UPT_EDX(r) __CHOOSE_MODE(SC_EDX(UPT_SC(r)), REGS_EDX((r)->skas.regs)) > >#define UPT_ESI(r) __CHOOSE_MODE(SC_ESI(UPT_SC(r)), REGS_ESI((r)->skas.regs)) > >#define UPT_EDI(r) __CHOOSE_MODE(SC_EDI(UPT_SC(r)), REGS_EDI((r)->skas.regs)) > >#define UPT_EBP(r) __CHOOSE_MODE(SC_EBP(UPT_SC(r)), REGS_EBP((r)->skas.regs)) > >#define UPT_ORIG_EAX(r) __CHOOSE_MODE((r)->tt.syscall, (r)->skas.syscall) > >#define UPT_CS(r) __CHOOSE_MODE(SC_CS(UPT_SC(r)), REGS_CS((r)->skas.regs)) > >#define UPT_SS(r) __CHOOSE_MODE(SC_SS(UPT_SC(r)), REGS_SS((r)->skas.regs)) > >#define UPT_DS(r) __CHOOSE_MODE(SC_DS(UPT_SC(r)), REGS_DS((r)->skas.regs)) > >#define UPT_ES(r) __CHOOSE_MODE(SC_ES(UPT_SC(r)), REGS_ES((r)->skas.regs)) > >#define UPT_FS(r) __CHOOSE_MODE(SC_FS(UPT_SC(r)), REGS_FS((r)->skas.regs)) > >#define UPT_GS(r) __CHOOSE_MODE(SC_GS(UPT_SC(r)), REGS_GS((r)->skas.regs)) > > >#define UPT_SYSCALL_ARG1(r) UPT_EBX(r) >#define UPT_SYSCALL_ARG2(r) UPT_ECX(r) >#define UPT_SYSCALL_ARG3(r) UPT_EDX(r) >#define UPT_SYSCALL_ARG4(r) UPT_ESI(r) >#define UPT_SYSCALL_ARG5(r) UPT_EDI(r) >#define UPT_SYSCALL_ARG6(r) UPT_EBP(r) > >extern int user_context(unsigned long sp); > >#define UPT_IS_USER(r) CHOOSE_MODE(user_context(UPT_SP(r)), (r)->skas.is_user) > > >struct syscall_args { > unsigned long args[6]; >}; > >#define SYSCALL_ARGS(r) ((struct syscall_args) { .args = { UPT_SYSCALL_ARG1(r), UPT_SYSCALL_ARG2(r), UPT_SYSCALL_ARG3(r), UPT_SYSCALL_ARG4(r), UPT_SYSCALL_ARG5(r), UPT_SYSCALL_ARG6(r) } } ) > > > > > > > >#define UPT_REG(regs,reg) ({ unsigned long val; switch(reg){ case EIP: val = UPT_IP(regs); break; case UESP: val = UPT_SP(regs); break; case EAX: val = UPT_EAX(regs); break; case EBX: val = UPT_EBX(regs); break; case ECX: val = UPT_ECX(regs); break; case EDX: val = UPT_EDX(regs); break; case ESI: val = UPT_ESI(regs); break; case EDI: val = UPT_EDI(regs); break; case EBP: val = UPT_EBP(regs); break; case ORIG_EAX: val = UPT_ORIG_EAX(regs); break; case CS: val = UPT_CS(regs); break; case SS: val = UPT_SS(regs); break; case DS: val = UPT_DS(regs); break; case ES: val = UPT_ES(regs); break; case FS: val = UPT_FS(regs); break; case GS: val = UPT_GS(regs); break; case EFL: val = UPT_EFLAGS(regs); break; default : panic("Bad register in UPT_REG : %d\n", reg); val = -1; } val; }) ># 180 "arch/um/include/sysdep/ptrace.h" >#define UPT_SET(regs,reg,val) do { switch(reg){ case EIP: UPT_IP(regs) = val; break; case UESP: UPT_SP(regs) = val; break; case EAX: UPT_EAX(regs) = val; break; case EBX: UPT_EBX(regs) = val; break; case ECX: UPT_ECX(regs) = val; break; case EDX: UPT_EDX(regs) = val; break; case ESI: UPT_ESI(regs) = val; break; case EDI: UPT_EDI(regs) = val; break; case EBP: UPT_EBP(regs) = val; break; case ORIG_EAX: UPT_ORIG_EAX(regs) = val; break; case CS: UPT_CS(regs) = val; break; case SS: UPT_SS(regs) = val; break; case DS: UPT_DS(regs) = val; break; case ES: UPT_ES(regs) = val; break; case FS: UPT_FS(regs) = val; break; case GS: UPT_GS(regs) = val; break; case EFL: UPT_EFLAGS(regs) = val; break; default : panic("Bad register in UPT_SET : %d\n", reg); break; } } while (0) ># 206 "arch/um/include/sysdep/ptrace.h" >#define UPT_SET_SYSCALL_RETURN(r,res) CHOOSE_MODE(SC_SET_SYSCALL_RETURN(UPT_SC(r), (res)), REGS_SET_SYSCALL_RETURN((r)->skas.regs, (res))) > > > >#define UPT_RESTART_SYSCALL(r) CHOOSE_MODE(SC_RESTART_SYSCALL(UPT_SC(r)), REGS_RESTART_SYSCALL((r)->skas.regs)) > > > >#define UPT_ORIG_SYSCALL(r) UPT_EAX(r) >#define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) >#define UPT_SYSCALL_RET(r) UPT_EAX(r) > >#define UPT_FAULTINFO(r) CHOOSE_MODE((&(r)->tt.faultinfo), (&(r)->skas.faultinfo)) ># 13 "include/asm/ptrace.h" 2 ># 1 "include/asm/ptrace-generic.h" 1 > > > > > > >#define __UM_PTRACE_GENERIC_H > > > ># 1 "include/asm/arch/ptrace-abi.h" 1 > >#define I386_PTRACE_ABI_H > >#define EBX 0 >#define ECX 1 >#define EDX 2 >#define ESI 3 >#define EDI 4 >#define EBP 5 >#define EAX 6 >#define DS 7 >#define ES 8 >#define FS 9 >#define GS 10 >#define ORIG_EAX 11 >#define EIP 12 >#define CS 13 >#define EFL 14 >#define UESP 15 >#define SS 16 >#define FRAME_SIZE 17 > > >#define PTRACE_GETREGS 12 >#define PTRACE_SETREGS 13 >#define PTRACE_GETFPREGS 14 >#define PTRACE_SETFPREGS 15 >#define PTRACE_GETFPXREGS 18 >#define PTRACE_SETFPXREGS 19 > >#define PTRACE_OLDSETOPTIONS 21 > >#define PTRACE_GET_THREAD_AREA 25 >#define PTRACE_SET_THREAD_AREA 26 > >#define PTRACE_SYSEMU 31 >#define PTRACE_SYSEMU_SINGLESTEP 32 ># 12 "include/asm/ptrace-generic.h" 2 > > >struct pt_regs { > union uml_pt_regs regs; >}; > >#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS } > >#define PT_REGS_IP(r) UPT_IP(&(r)->regs) >#define PT_REGS_SP(r) UPT_SP(&(r)->regs) > >#define PT_REG(r,reg) UPT_REG(&(r)->regs, reg) >#define PT_REGS_SET(r,reg,val) UPT_SET(&(r)->regs, reg, val) > >#define PT_REGS_SET_SYSCALL_RETURN(r,res) UPT_SET_SYSCALL_RETURN(&(r)->regs, res) > >#define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs) > >#define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs) > >#define PT_REGS_SC(r) UPT_SC(&(r)->regs) > >#define instruction_pointer(regs) PT_REGS_IP(regs) > >struct task_struct; > >extern unsigned long getreg(struct task_struct *child, int regno); >extern int putreg(struct task_struct *child, int regno, unsigned long value); >extern int get_fpregs(unsigned long buf, struct task_struct *child); >extern int set_fpregs(unsigned long buf, struct task_struct *child); >extern int get_fpxregs(unsigned long buf, struct task_struct *child); >extern int set_fpxregs(unsigned long buf, struct task_struct *tsk); > >extern void show_regs(struct pt_regs *regs); > >extern void send_sigtrap(struct task_struct *tsk, union uml_pt_regs *regs, > int error_code); > >extern int arch_copy_tls(struct task_struct *new); >extern void clear_flushed_tls(struct task_struct *task); ># 14 "include/asm/ptrace.h" 2 > ># 1 "arch/um/include/choose-mode.h" 1 ># 16 "include/asm/ptrace.h" 2 > >#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) >#define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) >#define PT_REGS_ECX(r) UPT_ECX(&(r)->regs) >#define PT_REGS_EDX(r) UPT_EDX(&(r)->regs) >#define PT_REGS_ESI(r) UPT_ESI(&(r)->regs) >#define PT_REGS_EDI(r) UPT_EDI(&(r)->regs) >#define PT_REGS_EBP(r) UPT_EBP(&(r)->regs) > >#define PT_REGS_CS(r) UPT_CS(&(r)->regs) >#define PT_REGS_SS(r) UPT_SS(&(r)->regs) >#define PT_REGS_DS(r) UPT_DS(&(r)->regs) >#define PT_REGS_ES(r) UPT_ES(&(r)->regs) >#define PT_REGS_FS(r) UPT_FS(&(r)->regs) >#define PT_REGS_GS(r) UPT_GS(&(r)->regs) > >#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs) > >#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_EAX(r) >#define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r) >#define PT_FIX_EXEC_STACK(sp) do ; while(0) > > >#undef profile_pc >#define profile_pc(regs) PT_REGS_IP(regs) > >#define user_mode(r) UPT_IS_USER(&(r)->regs) > >extern int ptrace_get_thread_area(struct task_struct *child, int idx, > struct user_desc *user_desc); > >extern int ptrace_set_thread_area(struct task_struct *child, int idx, > struct user_desc *user_desc); > >extern int do_set_thread_area_skas(struct user_desc *info); >extern int do_get_thread_area_skas(struct user_desc *info); > >extern int do_set_thread_area_tt(struct user_desc *info); >extern int do_get_thread_area_tt(struct user_desc *info); > >extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); >extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); > >extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); >extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); > >static inline __attribute__((always_inline)) int do_get_thread_area(struct user_desc *info) >{ > return (do_get_thread_area_skas(info)); >} > >static inline __attribute__((always_inline)) int do_set_thread_area(struct user_desc *info) >{ > return (do_set_thread_area_skas(info)); >} > >struct task_struct; ># 14 "include/asm/processor-generic.h" 2 > ># 1 "arch/um/include/registers.h" 1 > > > > > > >#define __REGISTERS_H > ># 1 "arch/um/include/sysdep/ptrace.h" 1 ># 10 "arch/um/include/registers.h" 2 ># 1 "arch/um/include/sysdep/archsetjmp.h" 1 > > > > > >#define _KLIBC_ARCHSETJMP_H > >struct __jmp_buf { > unsigned int __ebx; > unsigned int __esp; > unsigned int __ebp; > unsigned int __esi; > unsigned int __edi; > unsigned int __eip; >}; > >typedef struct __jmp_buf jmp_buf[1]; > >#define JB_IP __eip >#define JB_SP __esp ># 11 "arch/um/include/registers.h" 2 > >extern void init_thread_registers(union uml_pt_regs *to); >extern int save_fp_registers(int pid, unsigned long *fp_regs); >extern int restore_fp_registers(int pid, unsigned long *fp_regs); >extern void save_registers(int pid, union uml_pt_regs *regs); >extern void restore_registers(int pid, union uml_pt_regs *regs); >extern void init_registers(int pid); >extern void get_safe_registers(unsigned long * regs, unsigned long * fp_regs); >extern unsigned long get_thread_reg(int reg, jmp_buf *buf); ># 16 "include/asm/processor-generic.h" 2 ># 1 "arch/um/include/sysdep/archsetjmp.h" 1 ># 17 "include/asm/processor-generic.h" 2 > >struct mm_struct; > >struct thread_struct { > > > > > struct task_struct *saved_task; > int forking; > int nsyscalls; > struct pt_regs regs; > int singlestep_syscall; > void *fault_addr; > void *fault_catcher; > struct task_struct *prev_sched; > unsigned long temp_stack; > void *exec_buf; > struct arch_thread arch; > union { ># 46 "include/asm/processor-generic.h" > struct { > jmp_buf switch_buf; > int mm_count; > } skas; > > } mode; > struct { > int op; > union { > struct { > int pid; > } fork, exec; > struct { > int (*proc)(void *); > void *arg; > } thread; > struct { > void (*proc)(void *); > void *arg; > } cb; > } u; > } request; >}; > >#define INIT_THREAD { .forking = 0, .nsyscalls = 0, .regs = EMPTY_REGS, .fault_addr = NULL, .prev_sched = NULL, .temp_stack = 0, .exec_buf = NULL, .arch = INIT_ARCH_THREAD, .request = { 0 } } ># 83 "include/asm/processor-generic.h" >typedef struct { > unsigned long seg; >} mm_segment_t; > >extern struct task_struct *alloc_task_struct(void); > >extern void release_thread(struct task_struct *); >extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); > >static inline __attribute__((always_inline)) void prepare_to_copy(struct task_struct *tsk) >{ >} > > >extern unsigned long thread_saved_pc(struct task_struct *t); > >static inline __attribute__((always_inline)) void mm_copy_segments(struct mm_struct *from_mm, > struct mm_struct *new_mm) >{ >} > >#define init_stack (init_thread_union.stack) > > > > >extern unsigned long task_size; > >#define TASK_SIZE (task_size) > > > > >#define TASK_UNMAPPED_BASE (0x40000000) > >extern void start_thread(struct pt_regs *regs, unsigned long entry, > unsigned long stack); > >struct cpuinfo_um { > unsigned long loops_per_jiffy; > int ipi_pipe[2]; >}; > >extern struct cpuinfo_um boot_cpu_data; > >#define my_cpu_data cpu_data[smp_processor_id()] > > > > > >#define cpu_data (&boot_cpu_data) >#define current_cpu_data boot_cpu_data > > > > >#define KSTK_REG(tsk,reg) get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf) > > > > >#define get_wchan(p) (0) ># 78 "include/asm/processor.h" 2 ># 12 "include/asm/thread_info.h" 2 > > >struct thread_info { > struct task_struct *task; > struct exec_domain *exec_domain; > unsigned long flags; > __u32 cpu; > int preempt_count; > > mm_segment_t addr_limit; > > > struct restart_block restart_block; >}; > >#define INIT_THREAD_INFO(tsk) { .task = &tsk, .exec_domain = &default_exec_domain, .flags = 0, .cpu = 0, .preempt_count = 1, .addr_limit = KERNEL_DS, .restart_block = { .fn = do_no_restart_syscall, }, } ># 40 "include/asm/thread_info.h" >#define init_thread_info (init_thread_union.thread_info) >#define init_stack (init_thread_union.stack) > >#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) > >static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void) >{ > struct thread_info *ti; > unsigned long mask = ((1 << 2) * (1UL << 12)) - 1; > ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); > return ti; >} > > >#define alloc_thread_info(tsk) ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) > >#define free_thread_info(ti) kfree(ti) > > > >#define PREEMPT_ACTIVE 0x10000000 > >#define TIF_SYSCALL_TRACE 0 >#define TIF_SIGPENDING 1 >#define TIF_NEED_RESCHED 2 >#define TIF_POLLING_NRFLAG 3 > > >#define TIF_RESTART_BLOCK 4 >#define TIF_MEMDIE 5 >#define TIF_SYSCALL_AUDIT 6 >#define TIF_RESTORE_SIGMASK 7 > >#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) >#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) >#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) >#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) >#define _TIF_MEMDIE (1 << TIF_MEMDIE) >#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) >#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) ># 22 "include/linux/thread_info.h" 2 ># 30 "include/linux/thread_info.h" >static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag) >{ > set_bit(flag,&ti->flags); >} > >static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag) >{ > clear_bit(flag,&ti->flags); >} > >static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) >{ > return test_and_set_bit(flag,&ti->flags); >} > >static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) >{ > return test_and_clear_bit(flag,&ti->flags); >} > >static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag) >{ > return (__builtin_constant_p(flag) ? constant_test_bit((flag),(&ti->flags)) : variable_test_bit((flag),(&ti->flags))); >} > >#define set_thread_flag(flag) set_ti_thread_flag(current_thread_info(), flag) > >#define clear_thread_flag(flag) clear_ti_thread_flag(current_thread_info(), flag) > >#define test_and_set_thread_flag(flag) test_and_set_ti_thread_flag(current_thread_info(), flag) > >#define test_and_clear_thread_flag(flag) test_and_clear_ti_thread_flag(current_thread_info(), flag) > >#define test_thread_flag(flag) test_ti_thread_flag(current_thread_info(), flag) > > >#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED) >#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED) ># 10 "include/linux/preempt.h" 2 ># 1 "include/linux/linkage.h" 1 > >#define _LINUX_LINKAGE_H > ># 1 "include/asm/linkage.h" 1 > >#define __ASM_UM_LINKAGE_H > ># 1 "include/asm/arch/linkage.h" 1 > >#define __ASM_LINKAGE_H > >#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) >#define FASTCALL(x) x __attribute__((regparm(3))) >#define fastcall __attribute__((regparm(3))) > >#define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) ># 5 "include/asm/linkage.h" 2 ># 5 "include/linux/linkage.h" 2 > > > > >#define CPP_ASMLINKAGE ># 21 "include/linux/linkage.h" >#define __ALIGN .align 4,0x90 >#define __ALIGN_STR ".align 4,0x90" ># 58 "include/linux/linkage.h" >#define NORET_TYPE >#define ATTRIB_NORET __attribute__((noreturn)) >#define NORET_AND noreturn, ># 11 "include/linux/preempt.h" 2 > > > > > >#define add_preempt_count(val) do { preempt_count() += (val); } while (0) >#define sub_preempt_count(val) do { preempt_count() -= (val); } while (0) > > >#define inc_preempt_count() add_preempt_count(1) >#define dec_preempt_count() sub_preempt_count(1) > >#define preempt_count() (current_thread_info()->preempt_count) ># 56 "include/linux/preempt.h" >#define preempt_disable() do { } while (0) >#define preempt_enable_no_resched() do { } while (0) >#define preempt_enable() do { } while (0) >#define preempt_check_resched() do { } while (0) ># 50 "include/linux/spinlock.h" 2 > > > ># 1 "include/linux/kernel.h" 1 > >#define _LINUX_KERNEL_H > > > > > > > ># 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 1 3 4 ># 34 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 3 4 >#define _STDARG_H >#define _ANSI_STDARG_H_ > >#undef __need___va_list > > > > >#define __GNUC_VA_LIST >typedef __builtin_va_list __gnuc_va_list; > > > > > > >#define va_start(v,l) __builtin_va_start(v,l) >#define va_end(v) __builtin_va_end(v) >#define va_arg(v,l) __builtin_va_arg(v,l) > >#define va_copy(d,s) __builtin_va_copy(d,s) > >#define __va_copy(d,s) __builtin_va_copy(d,s) ># 105 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 3 4 >typedef __gnuc_va_list va_list; > > > > > >#define _VA_LIST_ > > >#define _VA_LIST > > >#define _VA_LIST_DEFINED > > >#define _VA_LIST_T_H > > >#define __va_list__ ># 11 "include/linux/kernel.h" 2 > > > > > > > ># 1 "include/asm/bug.h" 1 > >#define __UM_BUG_H > ># 1 "include/asm/arch/bug.h" 1 > >#define _I386_BUG_H ># 11 "include/asm/arch/bug.h" >#define HAVE_ARCH_BUG > > >#define BUG() do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" (__FILE__), "i" (__LINE__), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0) ># 36 "include/asm/arch/bug.h" ># 1 "include/asm-generic/bug.h" 1 > >#define _ASM_GENERIC_BUG_H > > > > > > > >struct bug_entry { > unsigned long bug_addr; > > const char *file; > unsigned short line; > > unsigned short flags; >}; > > >#define BUGFLAG_WARNING (1<<0) ># 31 "include/asm-generic/bug.h" >#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) > > > >#define WARN_ON(condition) ({ typeof(condition) __ret_warn_on = (condition); if (unlikely(__ret_warn_on)) { printk("WARNING at %s:%d %s()\n", __FILE__, __LINE__, __FUNCTION__); dump_stack(); } unlikely(__ret_warn_on); }) ># 63 "include/asm-generic/bug.h" >#define WARN_ON_ONCE(condition) ({ static int __warned; typeof(condition) __ret_warn_once = (condition); if (unlikely(__ret_warn_once)) if (WARN_ON(!__warned)) __warned = 1; unlikely(__ret_warn_once); }) ># 76 "include/asm-generic/bug.h" >#define WARN_ON_SMP(x) do { } while (0) ># 37 "include/asm/arch/bug.h" 2 ># 5 "include/asm/bug.h" 2 ># 19 "include/linux/kernel.h" 2 > >#define INT_MAX ((int)(~0U>>1)) >#define INT_MIN (-INT_MAX - 1) >#define UINT_MAX (~0U) >#define LONG_MAX ((long)(~0UL>>1)) >#define LONG_MIN (-LONG_MAX - 1) >#define ULONG_MAX (~0UL) >#define LLONG_MAX ((long long)(~0ULL>>1)) >#define LLONG_MIN (-LLONG_MAX - 1) >#define ULLONG_MAX (~0ULL) > >#define STACK_MAGIC 0xdeadbeef > >#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) >#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) > >#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) >#define FIELD_SIZEOF(t,f) (sizeof(((t*)0)->f)) >#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) >#define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y)) > >#define KERN_EMERG "<0>" >#define KERN_ALERT "<1>" >#define KERN_CRIT "<2>" >#define KERN_ERR "<3>" >#define KERN_WARNING "<4>" >#define KERN_NOTICE "<5>" >#define KERN_INFO "<6>" >#define KERN_DEBUG "<7>" > >extern int console_printk[]; > >#define console_loglevel (console_printk[0]) >#define default_message_loglevel (console_printk[1]) >#define minimum_console_loglevel (console_printk[2]) >#define default_console_loglevel (console_printk[3]) > >struct completion; >struct pt_regs; >struct user; ># 74 "include/linux/kernel.h" >#define might_resched() do { } while (0) > > > > void __might_sleep(char *file, int line); >#define might_sleep() do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) > > > > > >#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) > >#define abs(x) ({ int __x = (x); (__x < 0) ? -__x : __x; }) > > > > >#define labs(x) ({ long __x = (x); (__x < 0) ? -__x : __x; }) > > > > >extern struct atomic_notifier_head panic_notifier_list; >extern long (*panic_blink)(long time); > void panic(const char * fmt, ...) > __attribute__ ((noreturn, format (printf, 1, 2))); >extern void oops_enter(void); >extern void oops_exit(void); >extern int oops_may_print(void); >__attribute__((regparm(3))) void do_exit(long error_code) > __attribute__((noreturn)); > void complete_and_exit(struct completion *, long) > __attribute__((noreturn)); >extern unsigned long simple_strtoul(const char *,char **,unsigned int); >extern long simple_strtol(const char *,char **,unsigned int); >extern unsigned long long simple_strtoull(const char *,char **,unsigned int); >extern long long simple_strtoll(const char *,char **,unsigned int); >extern int sprintf(char * buf, const char * fmt, ...) > __attribute__ ((format (printf, 2, 3))); >extern int vsprintf(char *buf, const char *, va_list) > __attribute__ ((format (printf, 2, 0))); >extern int snprintf(char * buf, size_t size, const char * fmt, ...) > __attribute__ ((format (printf, 3, 4))); >extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) > __attribute__ ((format (printf, 3, 0))); >extern int scnprintf(char * buf, size_t size, const char * fmt, ...) > __attribute__ ((format (printf, 3, 4))); >extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) > __attribute__ ((format (printf, 3, 0))); >extern char *kasprintf(gfp_t gfp, const char *fmt, ...) > __attribute__ ((format (printf, 2, 3))); > >extern int sscanf(const char *, const char *, ...) > __attribute__ ((format (scanf, 2, 3))); >extern int vsscanf(const char *, const char *, va_list) > __attribute__ ((format (scanf, 2, 0))); > >extern int get_option(char **str, int *pint); >extern char *get_options(const char *str, int nints, int *ints); >extern unsigned long long memparse(char *ptr, char **retptr); > >extern int core_kernel_text(unsigned long addr); >extern int __kernel_text_address(unsigned long addr); >extern int kernel_text_address(unsigned long addr); >extern int session_of_pgrp(int pgrp); > >extern void dump_thread(struct pt_regs *regs, struct user *dump); > > > __attribute__((regparm(0))) int vprintk(const char *fmt, va_list args) > __attribute__ ((format (printf, 1, 0))); > __attribute__((regparm(0))) int printk(const char * fmt, ...) > __attribute__ ((format (printf, 1, 2))); ># 157 "include/linux/kernel.h" >unsigned long int_sqrt(unsigned long); > >extern int printk_ratelimit(void); >extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); >extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, > unsigned int interval_msec); > >static inline __attribute__((always_inline)) void console_silent(void) >{ > (console_printk[0]) = 0; >} > >static inline __attribute__((always_inline)) void console_verbose(void) >{ > if ((console_printk[0])) > (console_printk[0]) = 15; >} > >extern void bust_spinlocks(int yes); >extern int oops_in_progress; >extern int panic_timeout; >extern int panic_on_oops; >extern int panic_on_unrecovered_nmi; >extern int tainted; >extern const char *print_tainted(void); >extern void add_taint(unsigned); > > >extern enum system_states { > SYSTEM_BOOTING, > SYSTEM_RUNNING, > SYSTEM_HALT, > SYSTEM_POWER_OFF, > SYSTEM_RESTART, > SYSTEM_SUSPEND_DISK, >} system_state; > >#define TAINT_PROPRIETARY_MODULE (1<<0) >#define TAINT_FORCED_MODULE (1<<1) >#define TAINT_UNSAFE_SMP (1<<2) >#define TAINT_FORCED_RMMOD (1<<3) >#define TAINT_MACHINE_CHECK (1<<4) >#define TAINT_BAD_PAGE (1<<5) > >extern void dump_stack(void); > > > > > > >static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...) >{ > return 0; >} > > >#define pr_info(fmt,arg...) printk(KERN_INFO fmt, ##arg) > > > > > > >#define NIPQUAD(addr) ((unsigned char *)&addr)[0], ((unsigned char *)&addr)[1], ((unsigned char *)&addr)[2], ((unsigned char *)&addr)[3] > > > > >#define NIPQUAD_FMT "%u.%u.%u.%u" > >#define NIP6(addr) ntohs((addr).s6_addr16[0]), ntohs((addr).s6_addr16[1]), ntohs((addr).s6_addr16[2]), ntohs((addr).s6_addr16[3]), ntohs((addr).s6_addr16[4]), ntohs((addr).s6_addr16[5]), ntohs((addr).s6_addr16[6]), ntohs((addr).s6_addr16[7]) ># 237 "include/linux/kernel.h" >#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" >#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x" > > >#define HIPQUAD(addr) ((unsigned char *)&addr)[3], ((unsigned char *)&addr)[2], ((unsigned char *)&addr)[1], ((unsigned char *)&addr)[0] ># 257 "include/linux/kernel.h" >#define min(x,y) ({ typeof(x) _x = (x); typeof(y) _y = (y); (void) (&_x == &_y); _x < _y ? _x : _y; }) > > > > > >#define max(x,y) ({ typeof(x) _x = (x); typeof(y) _y = (y); (void) (&_x == &_y); _x > _y ? _x : _y; }) ># 275 "include/linux/kernel.h" >#define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) > >#define max_t(type,x,y) ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) ># 288 "include/linux/kernel.h" >#define container_of(ptr,type,member) ({ const typeof( ((type *)0)->member ) *__mptr = (ptr); (type *)( (char *)__mptr - offsetof(type,member) );}) > > > > > > > >#define typecheck(type,x) ({ type __dummy; typeof(x) __dummy2; (void)(&__dummy == &__dummy2); 1; }) ># 307 "include/linux/kernel.h" >#define typecheck_fn(type,function) ({ typeof(type) __tmp = function; (void)__tmp; }) > > > > > > >#define SI_LOAD_SHIFT 16 >struct sysinfo { > long uptime; > unsigned long loads[3]; > unsigned long totalram; > unsigned long freeram; > unsigned long sharedram; > unsigned long bufferram; > unsigned long totalswap; > unsigned long freeswap; > unsigned short procs; > unsigned short pad; > unsigned long totalhigh; > unsigned long freehigh; > unsigned int mem_unit; > char _f[20-2*sizeof(long)-sizeof(int)]; >}; > > >#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) > > > > > >#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) > > >#define __FUNCTION__ (__func__) > > > > > >#define NUMA_BUILD 0 ># 54 "include/linux/spinlock.h" 2 ># 1 "include/linux/stringify.h" 1 > >#define __LINUX_STRINGIFY_H > > > > > > >#define __stringify_1(x) #x >#define __stringify(x) __stringify_1(x) ># 55 "include/linux/spinlock.h" 2 ># 1 "include/linux/bottom_half.h" 1 > >#define _LINUX_BH_H > >extern void local_bh_disable(void); >extern void __local_bh_enable(void); >extern void _local_bh_enable(void); >extern void local_bh_enable(void); >extern void local_bh_enable_ip(unsigned long ip); ># 56 "include/linux/spinlock.h" 2 > ># 1 "include/asm/system.h" 1 > >#define __UM_SYSTEM_I386_H > ># 1 "include/asm/system-generic.h" 1 > >#define __UM_SYSTEM_GENERIC_H > ># 1 "include/asm/arch/system.h" 1 > >#define __ASM_SYSTEM_H > > ># 1 "include/asm/segment.h" 1 ># 6 "include/asm/arch/system.h" 2 ># 1 "include/asm/cpufeature.h" 1 > >#define __UM_CPUFEATURE_H > ># 1 "include/asm/arch/cpufeature.h" 1 > > > > > > > >#define __ASM_I386_CPUFEATURE_H > > > >#define NCAPINTS 7 > > >#define X86_FEATURE_FPU (0*32+ 0) >#define X86_FEATURE_VME (0*32+ 1) >#define X86_FEATURE_DE (0*32+ 2) >#define X86_FEATURE_PSE (0*32+ 3) >#define X86_FEATURE_TSC (0*32+ 4) >#define X86_FEATURE_MSR (0*32+ 5) >#define X86_FEATURE_PAE (0*32+ 6) >#define X86_FEATURE_MCE (0*32+ 7) >#define X86_FEATURE_CX8 (0*32+ 8) >#define X86_FEATURE_APIC (0*32+ 9) >#define X86_FEATURE_SEP (0*32+11) >#define X86_FEATURE_MTRR (0*32+12) >#define X86_FEATURE_PGE (0*32+13) >#define X86_FEATURE_MCA (0*32+14) >#define X86_FEATURE_CMOV (0*32+15) >#define X86_FEATURE_PAT (0*32+16) >#define X86_FEATURE_PSE36 (0*32+17) >#define X86_FEATURE_PN (0*32+18) >#define X86_FEATURE_CLFLSH (0*32+19) >#define X86_FEATURE_DS (0*32+21) >#define X86_FEATURE_ACPI (0*32+22) >#define X86_FEATURE_MMX (0*32+23) >#define X86_FEATURE_FXSR (0*32+24) > >#define X86_FEATURE_XMM (0*32+25) >#define X86_FEATURE_XMM2 (0*32+26) >#define X86_FEATURE_SELFSNOOP (0*32+27) >#define X86_FEATURE_HT (0*32+28) >#define X86_FEATURE_ACC (0*32+29) >#define X86_FEATURE_IA64 (0*32+30) > > > >#define X86_FEATURE_SYSCALL (1*32+11) >#define X86_FEATURE_MP (1*32+19) >#define X86_FEATURE_NX (1*32+20) >#define X86_FEATURE_MMXEXT (1*32+22) >#define X86_FEATURE_LM (1*32+29) >#define X86_FEATURE_3DNOWEXT (1*32+30) >#define X86_FEATURE_3DNOW (1*32+31) > > >#define X86_FEATURE_RECOVERY (2*32+ 0) >#define X86_FEATURE_LONGRUN (2*32+ 1) >#define X86_FEATURE_LRTI (2*32+ 3) > > > >#define X86_FEATURE_CXMMX (3*32+ 0) >#define X86_FEATURE_K6_MTRR (3*32+ 1) >#define X86_FEATURE_CYRIX_ARR (3*32+ 2) >#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) > >#define X86_FEATURE_K8 (3*32+ 4) >#define X86_FEATURE_K7 (3*32+ 5) >#define X86_FEATURE_P3 (3*32+ 6) >#define X86_FEATURE_P4 (3*32+ 7) >#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) >#define X86_FEATURE_UP (3*32+ 9) >#define X86_FEATURE_FXSAVE_LEAK (3*32+10) >#define X86_FEATURE_ARCH_PERFMON (3*32+11) >#define X86_FEATURE_PEBS (3*32+12) >#define X86_FEATURE_BTS (3*32+13) > > >#define X86_FEATURE_XMM3 (4*32+ 0) >#define X86_FEATURE_MWAIT (4*32+ 3) >#define X86_FEATURE_DSCPL (4*32+ 4) >#define X86_FEATURE_EST (4*32+ 7) >#define X86_FEATURE_TM2 (4*32+ 8) >#define X86_FEATURE_CID (4*32+10) >#define X86_FEATURE_CX16 (4*32+13) >#define X86_FEATURE_XTPR (4*32+14) > > >#define X86_FEATURE_XSTORE (5*32+ 2) >#define X86_FEATURE_XSTORE_EN (5*32+ 3) >#define X86_FEATURE_XCRYPT (5*32+ 6) >#define X86_FEATURE_XCRYPT_EN (5*32+ 7) >#define X86_FEATURE_ACE2 (5*32+ 8) >#define X86_FEATURE_ACE2_EN (5*32+ 9) >#define X86_FEATURE_PHE (5*32+ 10) >#define X86_FEATURE_PHE_EN (5*32+ 11) >#define X86_FEATURE_PMM (5*32+ 12) >#define X86_FEATURE_PMM_EN (5*32+ 13) > > >#define X86_FEATURE_LAHF_LM (6*32+ 0) >#define X86_FEATURE_CMP_LEGACY (6*32+ 1) > >#define cpu_has(c,bit) test_bit(bit, (c)->x86_capability) >#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) > >#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) >#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME) >#define cpu_has_de boot_cpu_has(X86_FEATURE_DE) >#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) >#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) >#define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE) >#define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) >#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) >#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) >#define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR) >#define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX) >#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR) >#define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM) >#define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2) >#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) >#define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) >#define cpu_has_mp boot_cpu_has(X86_FEATURE_MP) >#define cpu_has_nx boot_cpu_has(X86_FEATURE_NX) >#define cpu_has_k6_mtrr boot_cpu_has(X86_FEATURE_K6_MTRR) >#define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR) >#define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR) >#define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE) >#define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) >#define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) >#define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) >#define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2) >#define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN) >#define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE) >#define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN) >#define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM) >#define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) >#define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) >#define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) >#define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) >#define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) ># 5 "include/asm/cpufeature.h" 2 ># 7 "include/asm/arch/system.h" 2 > > > > >struct task_struct; >extern struct task_struct * __switch_to(struct task_struct *prev, struct task_struct *next) __attribute__((regparm(3))); > > > > > >#define switch_to(prev,next,last) do { unsigned long esi,edi; asm volatile("pushfl\n\t" "pushl %%ebp\n\t" "movl %%esp,%0\n\t" "movl %5,%%esp\n\t" "movl $1f,%1\n\t" "pushl %6\n\t" "jmp __switch_to\n" "1:\t" "popl %%ebp\n\t" "popfl" :"=m" (prev->thread.esp),"=m" (prev->thread.eip), "=a" (last),"=S" (esi),"=D" (edi) :"m" (next->thread.esp),"m" (next->thread.eip), "2" (prev), "d" (next)); } while (0) ># 36 "include/asm/arch/system.h" >#define _set_base(addr,base) do { unsigned long __pr; __asm__ __volatile__ ("movw %%dx,%1\n\t" "rorl $16,%%edx\n\t" "movb %%dl,%2\n\t" "movb %%dh,%3" :"=&d" (__pr) :"m" (*((addr)+2)), "m" (*((addr)+4)), "m" (*((addr)+7)), "0" (base) ); } while(0) ># 48 "include/asm/arch/system.h" >#define _set_limit(addr,limit) do { unsigned long __lr; __asm__ __volatile__ ("movw %%dx,%1\n\t" "rorl $16,%%edx\n\t" "movb %2,%%dh\n\t" "andb $0xf0,%%dh\n\t" "orb %%dh,%%dl\n\t" "movb %%dl,%2" :"=&d" (__lr) :"m" (*(addr)), "m" (*((addr)+6)), "0" (limit) ); } while(0) ># 61 "include/asm/arch/system.h" >#define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) ) >#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1) ) > > > > > >#define loadsegment(seg,value) asm volatile("\n" "1:\t" "mov %0,%%" #seg "\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\t" "pushl $0\n\t" "popl %%" #seg "\n\t" "jmp 2b\n" ".previous\n" ".section __ex_table,\"a\"\n\t" ".align 4\n\t" ".long 1b,3b\n" ".previous" : :"rm" (value)) ># 88 "include/asm/arch/system.h" >#define savesegment(seg,value) asm volatile("mov %%" #seg ",%0":"=rm" (value)) > > > > > >#define read_cr0() ({ unsigned int __dummy; __asm__ __volatile__( "movl %%cr0,%0\n\t" :"=r" (__dummy)); __dummy; }) > > > > > > >#define write_cr0(x) __asm__ __volatile__("movl %0,%%cr0": :"r" (x)) > > >#define read_cr2() ({ unsigned int __dummy; __asm__ __volatile__( "movl %%cr2,%0\n\t" :"=r" (__dummy)); __dummy; }) > > > > > > >#define write_cr2(x) __asm__ __volatile__("movl %0,%%cr2": :"r" (x)) > > >#define read_cr3() ({ unsigned int __dummy; __asm__ ( "movl %%cr3,%0\n\t" :"=r" (__dummy)); __dummy; }) > > > > > > >#define write_cr3(x) __asm__ __volatile__("movl %0,%%cr3": :"r" (x)) > > >#define read_cr4() ({ unsigned int __dummy; __asm__( "movl %%cr4,%0\n\t" :"=r" (__dummy)); __dummy; }) > > > > > > >#define read_cr4_safe() ({ unsigned int __dummy; __asm__("1: movl %%cr4, %0 \n" "2: \n" ".section __ex_table,\"a\" \n" ".long 1b,2b \n" ".previous \n" : "=r" (__dummy): "0" (0)); __dummy; }) ># 142 "include/asm/arch/system.h" >#define write_cr4(x) __asm__ __volatile__("movl %0,%%cr4": :"r" (x)) > > >#define wbinvd() __asm__ __volatile__ ("wbinvd": : :"memory") > > > >#define clts() __asm__ __volatile__ ("clts") > > > >#define stts() write_cr0(8 | read_cr0()) > > > >static inline __attribute__((always_inline)) unsigned long get_limit(unsigned long segment) >{ > unsigned long __limit; > __asm__("lsll %1,%0" > :"=r" (__limit):"r" (segment)); > return __limit+1; >} > >#define nop() __asm__ __volatile__ ("nop") > >#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) > >#define tas(ptr) (xchg((ptr),1)) > >struct __xchg_dummy { unsigned long a[100]; }; >#define __xg(x) ((struct __xchg_dummy *)(x)) ># 191 "include/asm/arch/system.h" >static inline __attribute__((always_inline)) void __set_64bit (unsigned long long * ptr, > unsigned int low, unsigned int high) >{ > __asm__ __volatile__ ( > "\n1:\t" > "movl (%0), %%eax\n\t" > "movl 4(%0), %%edx\n\t" > "lock cmpxchg8b (%0)\n\t" > "jnz 1b" > : > : "D"(ptr), > "b"(low), > "c"(high) > : "ax","dx","memory"); >} > >static inline __attribute__((always_inline)) void __set_64bit_constant (unsigned long long *ptr, > unsigned long long value) >{ > __set_64bit(ptr,(unsigned int)(value), (unsigned int)((value)>>32ULL)); >} >#define ll_low(x) *(((unsigned int*)&(x))+0) >#define ll_high(x) *(((unsigned int*)&(x))+1) > >static inline __attribute__((always_inline)) void __set_64bit_var (unsigned long long *ptr, > unsigned long long value) >{ > __set_64bit(ptr,*(((unsigned int*)&(value))+0), *(((unsigned int*)&(value))+1)); >} > >#define set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit_constant(ptr, value) : __set_64bit_var(ptr, value) ) > > > > >#define _set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : __set_64bit(ptr, ll_low(value), ll_high(value)) ) ># 238 "include/asm/arch/system.h" >static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void * ptr, int size) >{ > switch (size) { > case 1: > __asm__ __volatile__("xchgb %b0,%1" > :"=q" (x) > :"m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > :"memory"); > break; > case 2: > __asm__ __volatile__("xchgw %w0,%1" > :"=r" (x) > :"m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > :"memory"); > break; > case 4: > __asm__ __volatile__("xchgl %0,%1" > :"=r" (x) > :"m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > :"memory"); > break; > } > return x; >} ># 270 "include/asm/arch/system.h" >#define __HAVE_ARCH_CMPXCHG 1 >#define cmpxchg(ptr,o,n) ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o), (unsigned long)(n),sizeof(*(ptr)))) > > >#define sync_cmpxchg(ptr,o,n) ((__typeof__(*(ptr)))__sync_cmpxchg((ptr),(unsigned long)(o), (unsigned long)(n),sizeof(*(ptr)))) > > > > >static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old, > unsigned long new, int size) >{ > unsigned long prev; > switch (size) { > case 1: > __asm__ __volatile__("" "cmpxchgb %b1,%2" > : "=a"(prev) > : "q"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 2: > __asm__ __volatile__("" "cmpxchgw %w1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 4: > __asm__ __volatile__("" "cmpxchgl %1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > } > return old; >} > > > > > > >static inline __attribute__((always_inline)) unsigned long __sync_cmpxchg(volatile void *ptr, > unsigned long old, > unsigned long new, int size) >{ > unsigned long prev; > switch (size) { > case 1: > __asm__ __volatile__("lock; cmpxchgb %b1,%2" > : "=a"(prev) > : "q"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 2: > __asm__ __volatile__("lock; cmpxchgw %w1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 4: > __asm__ __volatile__("lock; cmpxchgl %1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > } > return old; >} ># 379 "include/asm/arch/system.h" >static inline __attribute__((always_inline)) unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, > unsigned long long new) >{ > unsigned long long prev; > __asm__ __volatile__("" "cmpxchg8b %3" > : "=A"(prev) > : "b"((unsigned long)new), > "c"((unsigned long)(new >> 32)), > "m"(*((struct __xchg_dummy *)(ptr))), > "0"(old) > : "memory"); > return prev; >} > >#define cmpxchg64(ptr,o,n) ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o), (unsigned long long)(n))) ># 423 "include/asm/arch/system.h" >#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2) >#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2) ># 478 "include/asm/arch/system.h" >#define read_barrier_depends() do { } while(0) > > > > > > >#define wmb() __asm__ __volatile__ ("": : :"memory") ># 495 "include/asm/arch/system.h" >#define smp_mb() barrier() >#define smp_rmb() barrier() >#define smp_wmb() barrier() >#define smp_read_barrier_depends() do { } while(0) >#define set_mb(var,value) do { var = value; barrier(); } while (0) > > ># 1 "include/linux/irqflags.h" 1 ># 12 "include/linux/irqflags.h" >#define _LINUX_TRACE_IRQFLAGS_H ># 29 "include/linux/irqflags.h" >#define trace_hardirqs_on() do { } while (0) >#define trace_hardirqs_off() do { } while (0) >#define trace_softirqs_on(ip) do { } while (0) >#define trace_softirqs_off(ip) do { } while (0) >#define trace_hardirq_context(p) 0 >#define trace_softirq_context(p) 0 >#define trace_hardirqs_enabled(p) 0 >#define trace_softirqs_enabled(p) 0 >#define trace_hardirq_enter() do { } while (0) >#define trace_hardirq_exit() do { } while (0) >#define trace_softirq_enter() do { } while (0) >#define trace_softirq_exit() do { } while (0) >#define INIT_TRACE_IRQFLAGS ># 70 "include/linux/irqflags.h" >#define raw_local_irq_disable() local_irq_disable() >#define raw_local_irq_enable() local_irq_enable() >#define raw_local_irq_save(flags) local_irq_save(flags) >#define raw_local_irq_restore(flags) local_irq_restore(flags) ># 503 "include/asm/arch/system.h" 2 > > > > >#define HAVE_DISABLE_HLT >void disable_hlt(void); >void enable_hlt(void); > >extern int es7000_plat; >void cpu_idle_wait(void); > > > > > >static inline __attribute__((always_inline)) void sched_cacheflush(void) >{ > __asm__ __volatile__ ("wbinvd": : :"memory"); >} > >extern unsigned long arch_align_stack(unsigned long sp); >extern void free_init_pages(char *what, unsigned long begin, unsigned long end); > >void default_idle(void); ># 5 "include/asm/system-generic.h" 2 > >#undef switch_to >#undef local_irq_save >#undef local_irq_restore >#undef local_irq_disable >#undef local_irq_enable >#undef local_save_flags >#undef local_irq_restore >#undef local_irq_enable >#undef local_irq_disable >#undef local_irq_save >#undef irqs_disabled > >extern void *switch_to(void *prev, void *next, void *last); > >extern int get_signals(void); >extern int set_signals(int enable); >extern int get_signals(void); >extern void block_signals(void); >extern void unblock_signals(void); > >#define local_save_flags(flags) do { typecheck(unsigned long, flags); (flags) = get_signals(); } while(0) > >#define local_irq_restore(flags) do { typecheck(unsigned long, flags); set_signals(flags); } while(0) > > >#define local_irq_save(flags) do { local_save_flags(flags); local_irq_disable(); } while(0) > > >#define local_irq_enable() unblock_signals() >#define local_irq_disable() block_signals() > >#define irqs_disabled() ({ unsigned long flags; local_save_flags(flags); (flags == 0); }) > > > > > > >extern void *_switch_to(void *prev, void *next, void *last); >#define switch_to(prev,next,last) prev = _switch_to(prev, next, last) ># 5 "include/asm/system.h" 2 ># 58 "include/linux/spinlock.h" 2 > > > > >#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME > >#define LOCK_SECTION_START(extra) ".subsection 1\n\t" extra ".ifndef " LOCK_SECTION_NAME "\n\t" LOCK_SECTION_NAME ":\n\t" ".endif\n" > > > > > > >#define LOCK_SECTION_END ".previous\n\t" > > >#define __lockfunc fastcall __attribute__((section(".spinlock.text"))) > > > > ># 1 "include/linux/spinlock_types.h" 1 > >#define __LINUX_SPINLOCK_TYPES_H ># 12 "include/linux/spinlock_types.h" ># 1 "include/linux/lockdep.h" 1 ># 9 "include/linux/lockdep.h" >#define __LINUX_LOCKDEP_H ># 249 "include/linux/lockdep.h" >static inline __attribute__((always_inline)) void lockdep_off(void) >{ >} > >static inline __attribute__((always_inline)) void lockdep_on(void) >{ >} > >#define lock_acquire(l,s,t,r,c,i) do { } while (0) >#define lock_release(l,n,i) do { } while (0) >#define lockdep_init() do { } while (0) >#define lockdep_info() do { } while (0) >#define lockdep_init_map(lock,name,key,sub) do { (void)(key); } while (0) >#define lockdep_set_class(lock,key) do { (void)(key); } while (0) >#define lockdep_set_class_and_name(lock,key,name) do { (void)(key); } while (0) > >#define lockdep_set_class_and_subclass(lock,key,sub) do { (void)(key); } while (0) > >#define lockdep_set_subclass(lock,sub) do { } while (0) > >#define INIT_LOCKDEP >#define lockdep_reset() do { debug_locks = 1; } while (0) >#define lockdep_free_key_range(start,size) do { } while (0) > > > >struct lock_class_key { }; > >#define lockdep_depth(tsk) (0) > > > > > > >static inline __attribute__((always_inline)) void early_init_irq_lock_class(void) >{ >} > > > > > > > >static inline __attribute__((always_inline)) void early_boot_irqs_off(void) >{ >} >static inline __attribute__((always_inline)) void early_boot_irqs_on(void) >{ >} >static inline __attribute__((always_inline)) void print_irqtrace_events(struct task_struct *curr) >{ >} > > > > > > > >#define SINGLE_DEPTH_NESTING 1 ># 325 "include/linux/lockdep.h" >#define spin_acquire(l,s,t,i) do { } while (0) >#define spin_release(l,n,i) do { } while (0) ># 339 "include/linux/lockdep.h" >#define rwlock_acquire(l,s,t,i) do { } while (0) >#define rwlock_acquire_read(l,s,t,i) do { } while (0) >#define rwlock_release(l,n,i) do { } while (0) ># 352 "include/linux/lockdep.h" >#define mutex_acquire(l,s,t,i) do { } while (0) >#define mutex_release(l,n,i) do { } while (0) ># 366 "include/linux/lockdep.h" >#define rwsem_acquire(l,s,t,i) do { } while (0) >#define rwsem_acquire_read(l,s,t,i) do { } while (0) >#define rwsem_release(l,n,i) do { } while (0) ># 13 "include/linux/spinlock_types.h" 2 > > > > ># 1 "include/linux/spinlock_types_up.h" 1 > >#define __LINUX_SPINLOCK_TYPES_UP_H ># 18 "include/linux/spinlock_types_up.h" >typedef struct { > volatile unsigned int slock; > > > >} raw_spinlock_t; > >#define __RAW_SPIN_LOCK_UNLOCKED { 1 } ># 35 "include/linux/spinlock_types_up.h" >typedef struct { > > > > >} raw_rwlock_t; > >#define __RAW_RW_LOCK_UNLOCKED { } ># 18 "include/linux/spinlock_types.h" 2 > > >typedef struct { > raw_spinlock_t raw_lock; > > > > > unsigned int magic, owner_cpu; > void *owner; > > > > >} spinlock_t; > >#define SPINLOCK_MAGIC 0xdead4ead > >typedef struct { > raw_rwlock_t raw_lock; > > > > > unsigned int magic, owner_cpu; > void *owner; > > > > >} rwlock_t; > >#define RWLOCK_MAGIC 0xdeaf1eed > >#define SPINLOCK_OWNER_INIT ((void *)-1L) > > > > >#define SPIN_DEP_MAP_INIT(lockname) > > > > > >#define RW_DEP_MAP_INIT(lockname) > > > >#define __SPIN_LOCK_UNLOCKED(lockname) (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, .magic = SPINLOCK_MAGIC, .owner = SPINLOCK_OWNER_INIT, .owner_cpu = -1, SPIN_DEP_MAP_INIT(lockname) } > > > > > >#define __RW_LOCK_UNLOCKED(lockname) (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, .magic = RWLOCK_MAGIC, .owner = SPINLOCK_OWNER_INIT, .owner_cpu = -1, RW_DEP_MAP_INIT(lockname) } ># 88 "include/linux/spinlock_types.h" >#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) >#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init) > >#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) >#define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) ># 80 "include/linux/spinlock.h" 2 > >extern int __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock); > > > > > > > ># 1 "include/linux/spinlock_up.h" 1 > >#define __LINUX_SPINLOCK_UP_H ># 21 "include/linux/spinlock_up.h" >#define __raw_spin_is_locked(x) ((x)->slock == 0) > >static inline __attribute__((always_inline)) void __raw_spin_lock(raw_spinlock_t *lock) >{ > lock->slock = 0; >} > >static inline __attribute__((always_inline)) void >__raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) >{ > do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (flags) = get_signals(); } while(0); block_signals(); } while(0); > lock->slock = 0; >} > >static inline __attribute__((always_inline)) int __raw_spin_trylock(raw_spinlock_t *lock) >{ > char oldval = lock->slock; > > lock->slock = 0; > > return oldval > 0; >} > >static inline __attribute__((always_inline)) void __raw_spin_unlock(raw_spinlock_t *lock) >{ > lock->slock = 1; >} > > > > >#define __raw_read_lock(lock) do { (void)(lock); } while (0) >#define __raw_write_lock(lock) do { (void)(lock); } while (0) >#define __raw_read_trylock(lock) ({ (void)(lock); 1; }) >#define __raw_write_trylock(lock) ({ (void)(lock); 1; }) >#define __raw_read_unlock(lock) do { (void)(lock); } while (0) >#define __raw_write_unlock(lock) do { (void)(lock); } while (0) ># 67 "include/linux/spinlock_up.h" >#define __raw_read_can_lock(lock) (((void)(lock), 1)) >#define __raw_write_can_lock(lock) (((void)(lock), 1)) > >#define __raw_spin_unlock_wait(lock) do { cpu_relax(); } while (__raw_spin_is_locked(lock)) ># 90 "include/linux/spinlock.h" 2 > > > > extern void __spin_lock_init(spinlock_t *lock, const char *name, > struct lock_class_key *key); >#define spin_lock_init(lock) do { static struct lock_class_key __key; __spin_lock_init((lock), #lock, &__key); } while (0) ># 108 "include/linux/spinlock.h" > extern void __rwlock_init(rwlock_t *lock, const char *name, > struct lock_class_key *key); >#define rwlock_init(lock) do { static struct lock_class_key __key; __rwlock_init((lock), #lock, &__key); } while (0) ># 121 "include/linux/spinlock.h" >#define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock) > > > > > >#define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock) > > > > > ># 1 "include/linux/spinlock_api_smp.h" 1 > >#define __LINUX_SPINLOCK_API_SMP_H ># 18 "include/linux/spinlock_api_smp.h" >int in_lock_functions(unsigned long addr); > >#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) > >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock_nested(spinlock_t *lock, int subclass) > ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_lock(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_lock(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock_bh(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_lock_bh(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_lock_bh(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock_irq(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_lock_irq(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_lock_irq(rwlock_t *lock) ; >unsigned long __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock_irqsave(spinlock_t *lock) > ; >unsigned long __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) > ; >unsigned long __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_lock_irqsave(rwlock_t *lock) > ; >unsigned long __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_lock_irqsave(rwlock_t *lock) > ; >int __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_trylock(spinlock_t *lock); >int __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_trylock(rwlock_t *lock); >int __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_trylock(rwlock_t *lock); >int __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_trylock_bh(spinlock_t *lock); >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_unlock(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_unlock(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_unlock(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_unlock_bh(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_unlock_bh(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_unlock_bh(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_unlock_irq(spinlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_unlock_irq(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_unlock_irq(rwlock_t *lock) ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) > ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) > ; >void __attribute__((regparm(3))) __attribute__((section(".spinlock.text"))) _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) > ; ># 134 "include/linux/spinlock.h" 2 > > > > > > extern void _raw_spin_lock(spinlock_t *lock); >#define _raw_spin_lock_flags(lock,flags) _raw_spin_lock(lock) > extern int _raw_spin_trylock(spinlock_t *lock); > extern void _raw_spin_unlock(spinlock_t *lock); > extern void _raw_read_lock(rwlock_t *lock); > extern int _raw_read_trylock(rwlock_t *lock); > extern void _raw_read_unlock(rwlock_t *lock); > extern void _raw_write_lock(rwlock_t *lock); > extern int _raw_write_trylock(rwlock_t *lock); > extern void _raw_write_unlock(rwlock_t *lock); ># 163 "include/linux/spinlock.h" >#define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock) >#define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock) > > > > > > >#define spin_trylock(lock) __cond_lock(lock, _spin_trylock(lock)) >#define read_trylock(lock) __cond_lock(lock, _read_trylock(lock)) >#define write_trylock(lock) __cond_lock(lock, _write_trylock(lock)) > >#define spin_lock(lock) _spin_lock(lock) > > > > >#define spin_lock_nested(lock,subclass) _spin_lock(lock) > > >#define write_lock(lock) _write_lock(lock) >#define read_lock(lock) _read_lock(lock) > > > >#define spin_lock_irqsave(lock,flags) flags = _spin_lock_irqsave(lock) >#define read_lock_irqsave(lock,flags) flags = _read_lock_irqsave(lock) >#define write_lock_irqsave(lock,flags) flags = _write_lock_irqsave(lock) > > > > > >#define spin_lock_irqsave_nested(lock,flags,subclass) flags = _spin_lock_irqsave(lock) ># 210 "include/linux/spinlock.h" >#define spin_lock_irq(lock) _spin_lock_irq(lock) >#define spin_lock_bh(lock) _spin_lock_bh(lock) > >#define read_lock_irq(lock) _read_lock_irq(lock) >#define read_lock_bh(lock) _read_lock_bh(lock) > >#define write_lock_irq(lock) _write_lock_irq(lock) >#define write_lock_bh(lock) _write_lock_bh(lock) > > > > > > >#define spin_unlock(lock) _spin_unlock(lock) >#define read_unlock(lock) _read_unlock(lock) >#define write_unlock(lock) _write_unlock(lock) >#define spin_unlock_irq(lock) _spin_unlock_irq(lock) >#define read_unlock_irq(lock) _read_unlock_irq(lock) >#define write_unlock_irq(lock) _write_unlock_irq(lock) ># 242 "include/linux/spinlock.h" >#define spin_unlock_irqrestore(lock,flags) _spin_unlock_irqrestore(lock, flags) > >#define spin_unlock_bh(lock) _spin_unlock_bh(lock) > >#define read_unlock_irqrestore(lock,flags) _read_unlock_irqrestore(lock, flags) > >#define read_unlock_bh(lock) _read_unlock_bh(lock) > >#define write_unlock_irqrestore(lock,flags) _write_unlock_irqrestore(lock, flags) > >#define write_unlock_bh(lock) _write_unlock_bh(lock) > >#define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) > >#define spin_trylock_irq(lock) ({ local_irq_disable(); spin_trylock(lock) ? 1 : ({ local_irq_enable(); 0; }); }) > > > > > > >#define spin_trylock_irqsave(lock,flags) ({ local_irq_save(flags); spin_trylock(lock) ? 1 : ({ local_irq_restore(flags); 0; }); }) ># 274 "include/linux/spinlock.h" ># 1 "include/asm/atomic.h" 1 > >#define __UM_ATOMIC_H > > > > > > ># 1 "include/asm/arch/atomic.h" 1 > >#define __ARCH_I386_ATOMIC__ ># 17 "include/asm/arch/atomic.h" >typedef struct { int counter; } atomic_t; > >#define ATOMIC_INIT(i) { (i) } > > > > > > > >#define atomic_read(v) ((v)->counter) ># 36 "include/asm/arch/atomic.h" >#define atomic_set(v,i) (((v)->counter) = (i)) ># 45 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) void atomic_add(int i, atomic_t *v) >{ > __asm__ __volatile__( > "" "addl %1,%0" > :"+m" (v->counter) > :"ir" (i)); >} ># 60 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) void atomic_sub(int i, atomic_t *v) >{ > __asm__ __volatile__( > "" "subl %1,%0" > :"+m" (v->counter) > :"ir" (i)); >} ># 77 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) int atomic_sub_and_test(int i, atomic_t *v) >{ > unsigned char c; > > __asm__ __volatile__( > "" "subl %2,%0; sete %1" > :"+m" (v->counter), "=qm" (c) > :"ir" (i) : "memory"); > return c; >} > > > > > > > >static __inline__ __attribute__((always_inline)) void atomic_inc(atomic_t *v) >{ > __asm__ __volatile__( > "" "incl %0" > :"+m" (v->counter)); >} > > > > > > > >static __inline__ __attribute__((always_inline)) void atomic_dec(atomic_t *v) >{ > __asm__ __volatile__( > "" "decl %0" > :"+m" (v->counter)); >} ># 122 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) int atomic_dec_and_test(atomic_t *v) >{ > unsigned char c; > > __asm__ __volatile__( > "" "decl %0; sete %1" > :"+m" (v->counter), "=qm" (c) > : : "memory"); > return c != 0; >} ># 141 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) int atomic_inc_and_test(atomic_t *v) >{ > unsigned char c; > > __asm__ __volatile__( > "" "incl %0; sete %1" > :"+m" (v->counter), "=qm" (c) > : : "memory"); > return c != 0; >} ># 161 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) int atomic_add_negative(int i, atomic_t *v) >{ > unsigned char c; > > __asm__ __volatile__( > "" "addl %2,%0; sets %1" > :"+m" (v->counter), "=qm" (c) > :"ir" (i) : "memory"); > return c; >} ># 179 "include/asm/arch/atomic.h" >static __inline__ __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v) >{ > int __i; > > > > > > > __i = i; > __asm__ __volatile__( > "" "xaddl %0, %1" > :"+r" (i), "+m" (v->counter) > : : "memory"); > return i + __i; ># 203 "include/asm/arch/atomic.h" >} > >static __inline__ __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v) >{ > return atomic_add_return(-i,v); >} > >#define atomic_cmpxchg(v,old,new) ((int)cmpxchg(&((v)->counter), old, new)) >#define atomic_xchg(v,new) (xchg(&((v)->counter), new)) ># 222 "include/asm/arch/atomic.h" >#define atomic_add_unless(v,a,u) ({ int c, old; c = atomic_read(v); for (;;) { if (unlikely(c == (u))) break; old = atomic_cmpxchg((v), c, c + (a)); if (likely(old == c)) break; c = old; } c != (u); }) ># 236 "include/asm/arch/atomic.h" >#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) > >#define atomic_inc_return(v) (atomic_add_return(1,v)) >#define atomic_dec_return(v) (atomic_sub_return(1,v)) > > >#define atomic_clear_mask(mask,addr) __asm__ __volatile__(LOCK_PREFIX "andl %0,%1" : : "r" (~(mask)),"m" (*addr) : "memory") > > > >#define atomic_set_mask(mask,addr) __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" : : "r" (mask),"m" (*(addr)) : "memory") > > > > >#define smp_mb__before_atomic_dec() barrier() >#define smp_mb__after_atomic_dec() barrier() >#define smp_mb__before_atomic_inc() barrier() >#define smp_mb__after_atomic_inc() barrier() > ># 1 "include/asm-generic/atomic.h" 1 > >#define _ASM_GENERIC_ATOMIC_H ># 71 "include/asm-generic/atomic.h" >typedef atomic_t atomic_long_t; > >#define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i) >static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)((v)->counter); >} > >static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i) >{ > atomic_t *v = (atomic_t *)l; > > (((v)->counter) = (i)); >} > >static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_inc(v); >} > >static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_dec(v); >} > >static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_add(i, v); >} > >static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_sub(i, v); >} ># 257 "include/asm/arch/atomic.h" 2 ># 10 "include/asm/atomic.h" 2 ># 275 "include/linux/spinlock.h" 2 > > > > > >extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); >#define atomic_dec_and_lock(atomic,lock) __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) > > > > > > >#define spin_can_lock(lock) (!spin_is_locked(lock)) ># 46 "include/linux/capability.h" 2 ># 1 "include/asm/current.h" 1 > > > > > > >#define __UM_CURRENT_H > > > > > > >#define current (current_thread_info()->task) > > >#define current_thread current_thread_info() ># 47 "include/linux/capability.h" 2 ># 58 "include/linux/capability.h" >typedef __u32 kernel_cap_t; > > > >#define _USER_CAP_HEADER_SIZE (2*sizeof(__u32)) >#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) ># 76 "include/linux/capability.h" >#define CAP_CHOWN 0 > > > > > >#define CAP_DAC_OVERRIDE 1 > > > > > >#define CAP_DAC_READ_SEARCH 2 > > > > > >#define CAP_FOWNER 3 ># 103 "include/linux/capability.h" >#define CAP_FSETID 4 > > > >#define CAP_FS_MASK 0x1f > > > > > >#define CAP_KILL 5 > > > > > >#define CAP_SETGID 6 > > > > >#define CAP_SETUID 7 ># 134 "include/linux/capability.h" >#define CAP_SETPCAP 8 > > > >#define CAP_LINUX_IMMUTABLE 9 > > > > >#define CAP_NET_BIND_SERVICE 10 > > > >#define CAP_NET_BROADCAST 11 ># 163 "include/linux/capability.h" >#define CAP_NET_ADMIN 12 > > > > >#define CAP_NET_RAW 13 > > > > > >#define CAP_IPC_LOCK 14 > > > >#define CAP_IPC_OWNER 15 > > > >#define CAP_SYS_MODULE 16 > > > > >#define CAP_SYS_RAWIO 17 > > > >#define CAP_SYS_CHROOT 18 > > > >#define CAP_SYS_PTRACE 19 > > > >#define CAP_SYS_PACCT 20 ># 239 "include/linux/capability.h" >#define CAP_SYS_ADMIN 21 > > > >#define CAP_SYS_BOOT 22 ># 252 "include/linux/capability.h" >#define CAP_SYS_NICE 23 ># 266 "include/linux/capability.h" >#define CAP_SYS_RESOURCE 24 > > > > > >#define CAP_SYS_TIME 25 > > > > >#define CAP_SYS_TTY_CONFIG 26 > > > >#define CAP_MKNOD 27 > > > >#define CAP_LEASE 28 > >#define CAP_AUDIT_WRITE 29 > >#define CAP_AUDIT_CONTROL 30 > > > > > >extern kernel_cap_t cap_bset; ># 308 "include/linux/capability.h" >#define to_cap_t(x) (x) >#define cap_t(x) (x) > > > >#define CAP_EMPTY_SET to_cap_t(0) >#define CAP_FULL_SET to_cap_t(~0) >#define CAP_INIT_EFF_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP)) >#define CAP_INIT_INH_SET to_cap_t(0) > >#define CAP_TO_MASK(x) (1 << (x)) >#define cap_raise(c,flag) (cap_t(c) |= CAP_TO_MASK(flag)) >#define cap_lower(c,flag) (cap_t(c) &= ~CAP_TO_MASK(flag)) >#define cap_raised(c,flag) (cap_t(c) & CAP_TO_MASK(flag)) > >static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b) >{ > kernel_cap_t dest; > (dest) = (a) | (b); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b) >{ > kernel_cap_t dest; > (dest) = (a) & (b); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop) >{ > kernel_cap_t dest; > (dest) = (a) & ~(drop); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c) >{ > kernel_cap_t dest; > (dest) = ~(c); > return dest; >} > >#define cap_isclear(c) (!cap_t(c)) >#define cap_issubset(a,set) (!(cap_t(a) & ~cap_t(set))) > >#define cap_clear(c) do { cap_t(c) = 0; } while(0) >#define cap_set_full(c) do { cap_t(c) = ~0; } while(0) >#define cap_mask(c,mask) do { cap_t(c) &= cap_t(mask); } while(0) > >#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK) > >int capable(int cap); >int __capable(struct task_struct *t, int cap); ># 47 "include/linux/sched.h" 2 ># 1 "include/linux/threads.h" 1 > >#define _LINUX_THREADS_H ># 19 "include/linux/threads.h" >#define NR_CPUS 1 > > >#define MIN_THREADS_LEFT_FOR_ROOT 4 > > > > >#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000) > > > > > >#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) ># 48 "include/linux/sched.h" 2 > > ># 1 "include/linux/timex.h" 1 ># 54 "include/linux/timex.h" >#define _LINUX_TIMEX_H > > ># 1 "include/linux/time.h" 1 > >#define _LINUX_TIME_H > > > > ># 1 "include/linux/seqlock.h" 1 > >#define __LINUX_SEQLOCK_H ># 32 "include/linux/seqlock.h" >typedef struct { > unsigned sequence; > spinlock_t lock; >} seqlock_t; > > > > > >#define __SEQLOCK_UNLOCKED(lockname) { 0, __SPIN_LOCK_UNLOCKED(lockname) } > > >#define SEQLOCK_UNLOCKED __SEQLOCK_UNLOCKED(old_style_seqlock_init) > > >#define seqlock_init(x) do { (x)->sequence = 0; spin_lock_init(&(x)->lock); } while (0) > > > > > >#define DEFINE_SEQLOCK(x) seqlock_t x = __SEQLOCK_UNLOCKED(x) > > > > > > >static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl) >{ > _spin_lock(&sl->lock); > ++sl->sequence; > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl) >{ > __asm__ __volatile__("": : :"memory"); > sl->sequence++; > _spin_unlock(&sl->lock); >} > >static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl) >{ > int ret = (_spin_trylock(&sl->lock)); > > if (ret) { > ++sl->sequence; > __asm__ __volatile__("": : :"memory"); > } > return ret; >} > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl) >{ > unsigned ret = sl->sequence; > __asm__ __volatile__("": : :"memory"); > return ret; >} ># 101 "include/linux/seqlock.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv) >{ > __asm__ __volatile__("": : :"memory"); > return (iv & 1) | (sl->sequence ^ iv); >} ># 115 "include/linux/seqlock.h" >typedef struct seqcount { > unsigned sequence; >} seqcount_t; > >#define SEQCNT_ZERO { 0 } >#define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0) > > >static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s) >{ > unsigned ret = s->sequence; > __asm__ __volatile__("": : :"memory"); > return ret; >} > > > > > > >static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv) >{ > __asm__ __volatile__("": : :"memory"); > return (iv & 1) | (s->sequence ^ iv); >} > > > > > > >static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s) >{ > s->sequence++; > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s) >{ > __asm__ __volatile__("": : :"memory"); > s->sequence++; >} > > > > >#define write_seqlock_irqsave(lock,flags) do { local_irq_save(flags); write_seqlock(lock); } while (0) > >#define write_seqlock_irq(lock) do { local_irq_disable(); write_seqlock(lock); } while (0) > >#define write_seqlock_bh(lock) do { local_bh_disable(); write_seqlock(lock); } while (0) > > >#define write_sequnlock_irqrestore(lock,flags) do { write_sequnlock(lock); local_irq_restore(flags); } while(0) > >#define write_sequnlock_irq(lock) do { write_sequnlock(lock); local_irq_enable(); } while(0) > >#define write_sequnlock_bh(lock) do { write_sequnlock(lock); local_bh_enable(); } while(0) > > >#define read_seqbegin_irqsave(lock,flags) ({ local_irq_save(flags); read_seqbegin(lock); }) > > >#define read_seqretry_irqrestore(lock,iv,flags) ({ int ret = read_seqretry(lock, iv); local_irq_restore(flags); ret; }) ># 8 "include/linux/time.h" 2 > > > >#define _STRUCT_TIMESPEC >struct timespec { > time_t tv_sec; > long tv_nsec; >}; > > >struct timeval { > time_t tv_sec; > suseconds_t tv_usec; >}; > >struct timezone { > int tz_minuteswest; > int tz_dsttime; >}; > > > > >#define MSEC_PER_SEC 1000L >#define USEC_PER_MSEC 1000L >#define NSEC_PER_USEC 1000L >#define NSEC_PER_MSEC 1000000L >#define USEC_PER_SEC 1000000L >#define NSEC_PER_SEC 1000000000L >#define FSEC_PER_SEC 1000000000000000L > >static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b) >{ > return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); >} > > > > > > >static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs) >{ > if (lhs->tv_sec < rhs->tv_sec) > return -1; > if (lhs->tv_sec > rhs->tv_sec) > return 1; > return lhs->tv_nsec - rhs->tv_nsec; >} > >static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs) >{ > if (lhs->tv_sec < rhs->tv_sec) > return -1; > if (lhs->tv_sec > rhs->tv_sec) > return 1; > return lhs->tv_usec - rhs->tv_usec; >} > >extern unsigned long kernel_mktime(const unsigned int year, const unsigned int mon, > const unsigned int day, const unsigned int hour, > const unsigned int min, const unsigned int sec); > >extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); > > > > >static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs, > struct timespec rhs) >{ > struct timespec ts_delta; > set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, > lhs.tv_nsec - rhs.tv_nsec); > return ts_delta; >} > > > > >#define timespec_valid(ts) (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) > > >extern struct timespec xtime; >extern struct timespec wall_to_monotonic; >extern seqlock_t xtime_lock; > >void timekeeping_init(void); > >static inline __attribute__((always_inline)) unsigned long get_seconds(void) >{ > return xtime.tv_sec; >} > >struct timespec current_kernel_time(void); > >#define CURRENT_TIME (current_kernel_time()) >#define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 }) > >extern void do_gettimeofday(struct timeval *tv); >extern int do_settimeofday(struct timespec *tv); >extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); >#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) >extern long do_utimes(int dfd, char *filename, struct timeval *times); >struct itimerval; >extern int do_setitimer(int which, struct itimerval *value, > struct itimerval *ovalue); >extern unsigned int alarm_setitimer(unsigned int seconds); >extern int do_getitimer(int which, struct itimerval *value); >extern void getnstimeofday(struct timespec *tv); > >extern struct timespec timespec_trunc(struct timespec t, unsigned gran); >extern int timekeeping_is_continuous(void); ># 129 "include/linux/time.h" >static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts) >{ > return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec; >} ># 141 "include/linux/time.h" >static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv) >{ > return ((s64) tv->tv_sec * 1000000000L) + > tv->tv_usec * 1000L; >} > > > > > > > >extern struct timespec ns_to_timespec(const s64 nsec); > > > > > > > >extern struct timeval ns_to_timeval(const s64 nsec); > > > > > > >static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns) >{ > ns += a->tv_nsec; > while(__builtin_expect(!!(ns >= 1000000000L), 0)) { > ns -= 1000000000L; > a->tv_sec++; > } > a->tv_nsec = ns; >} > > >#define NFDBITS __NFDBITS > >#define FD_SETSIZE __FD_SETSIZE >#define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) >#define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) >#define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) >#define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) > > > > > >#define ITIMER_REAL 0 >#define ITIMER_VIRTUAL 1 >#define ITIMER_PROF 2 > >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >struct itimerval { > struct timeval it_interval; > struct timeval it_value; >}; > > > > >#define CLOCK_REALTIME 0 >#define CLOCK_MONOTONIC 1 >#define CLOCK_PROCESS_CPUTIME_ID 2 >#define CLOCK_THREAD_CPUTIME_ID 3 > > > > >#define CLOCK_SGI_CYCLE 10 >#define MAX_CLOCKS 16 >#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) >#define CLOCKS_MONO CLOCK_MONOTONIC > > > > >#define TIMER_ABSTIME 0x01 ># 58 "include/linux/timex.h" 2 ># 72 "include/linux/timex.h" >#define SHIFT_PLL 4 >#define SHIFT_FLL 2 >#define MAXTC 10 ># 85 "include/linux/timex.h" >#define SHIFT_UPDATE (SHIFT_HZ + 1) >#define SHIFT_USEC 16 >#define SHIFT_NSEC 12 > >#define MAXPHASE 512000L >#define MAXFREQ (512L << SHIFT_USEC) >#define MAXFREQ_NSEC (512000L << SHIFT_NSEC) >#define MINSEC 256 >#define MAXSEC 2048 >#define NTP_PHASE_LIMIT (MAXPHASE << 5) > > > > > >struct timex { > unsigned int modes; > long offset; > long freq; > long maxerror; > long esterror; > int status; > long constant; > long precision; > long tolerance; > > > struct timeval time; > long tick; > > long ppsfreq; > long jitter; > int shift; > long stabil; > long jitcnt; > long calcnt; > long errcnt; > long stbcnt; > > int :32; int :32; int :32; int :32; > int :32; int :32; int :32; int :32; > int :32; int :32; int :32; int :32; >}; > > > > >#define ADJ_OFFSET 0x0001 >#define ADJ_FREQUENCY 0x0002 >#define ADJ_MAXERROR 0x0004 >#define ADJ_ESTERROR 0x0008 >#define ADJ_STATUS 0x0010 >#define ADJ_TIMECONST 0x0020 >#define ADJ_TICK 0x4000 >#define ADJ_OFFSET_SINGLESHOT 0x8001 > > >#define MOD_OFFSET ADJ_OFFSET >#define MOD_FREQUENCY ADJ_FREQUENCY >#define MOD_MAXERROR ADJ_MAXERROR >#define MOD_ESTERROR ADJ_ESTERROR >#define MOD_STATUS ADJ_STATUS >#define MOD_TIMECONST ADJ_TIMECONST >#define MOD_CLKB ADJ_TICK >#define MOD_CLKA ADJ_OFFSET_SINGLESHOT > > > > > >#define STA_PLL 0x0001 >#define STA_PPSFREQ 0x0002 >#define STA_PPSTIME 0x0004 >#define STA_FLL 0x0008 > >#define STA_INS 0x0010 >#define STA_DEL 0x0020 >#define STA_UNSYNC 0x0040 >#define STA_FREQHOLD 0x0080 > >#define STA_PPSSIGNAL 0x0100 >#define STA_PPSJITTER 0x0200 >#define STA_PPSWANDER 0x0400 >#define STA_PPSERROR 0x0800 > >#define STA_CLOCKERR 0x1000 > >#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR) > > > > > >#define TIME_OK 0 >#define TIME_INS 1 >#define TIME_DEL 2 >#define TIME_OOP 3 >#define TIME_WAIT 4 >#define TIME_ERROR 5 >#define TIME_BAD TIME_ERROR > > ># 1 "include/asm/timex.h" 1 > >#define __UM_TIMEX_H > >typedef unsigned long cycles_t; > >static inline __attribute__((always_inline)) cycles_t get_cycles (void) >{ > return 0; >} > >#define CLOCK_TICK_RATE (HZ) ># 188 "include/linux/timex.h" 2 > > > > > > >extern unsigned long tick_usec; >extern unsigned long tick_nsec; >extern int tickadj; > > > > >extern int time_status; >extern long time_maxerror; >extern long time_esterror; > >extern long time_freq; > >extern long time_adjust; > >extern void ntp_clear(void); > > > > > >static inline __attribute__((always_inline)) int ntp_synced(void) >{ > return !(time_status & 0x0040); >} > > >#define shift_right(x,s) ({ __typeof__(x) __x = (x); __typeof__(s) __s = (s); __x < 0 ? -(-__x >> __s) : __x >> __s; }) ># 277 "include/linux/timex.h" >static inline __attribute__((always_inline)) void time_interpolator_reset(void) >{ >} > >static inline __attribute__((always_inline)) void time_interpolator_update(long delta_nsec) >{ >} > > > >#define TICK_LENGTH_SHIFT 32 > > >extern u64 current_tick_length(void); > >extern void second_overflow(void); >extern void update_ntp_one_tick(void); >extern int do_adjtimex(struct timex *); > > >#define tickadj (500/HZ ? : 1) ># 51 "include/linux/sched.h" 2 ># 1 "include/linux/jiffies.h" 1 > >#define _LINUX_JIFFIES_H > ># 1 "include/linux/calc64.h" 1 > >#define _LINUX_CALC64_H > > ># 1 "include/asm/div64.h" 1 > >#define _UM_DIV64_H > ># 1 "include/asm/arch/div64.h" 1 > >#define __I386_DIV64 ># 16 "include/asm/arch/div64.h" >#define do_div(n,base) ({ unsigned long __upper, __low, __high, __mod, __base; __base = (base); asm("":"=a" (__low), "=d" (__high):"A" (n)); __upper = __high; if (__high) { __upper = __high % (__base); __high = __high / (__base); } asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (__base), "0" (__low), "1" (__upper)); asm("":"=A" (n):"a" (__low),"d" (__high)); __mod; }) ># 36 "include/asm/arch/div64.h" >#define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c) > >static inline __attribute__((always_inline)) long >div_ll_X_l_rem(long long divs, long div, long *rem) >{ > long dum2; > __asm__("divl %2":"=a"(dum2), "=d"(*rem) > : "rm"(div), "A"(divs)); > > return dum2; > >} ># 5 "include/asm/div64.h" 2 ># 6 "include/linux/calc64.h" 2 ># 35 "include/linux/calc64.h" >static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend, > const long divisor, long *remainder) >{ > long res; > > if (__builtin_expect(!!(dividend < 0), 0)) { > res = -div_ll_X_l_rem(-dividend,divisor,remainder); > *remainder = -(*remainder); > } else > res = div_ll_X_l_rem(dividend,divisor,remainder); > > return res; >} ># 5 "include/linux/jiffies.h" 2 ># 25 "include/linux/jiffies.h" >#define SHIFT_HZ 7 ># 37 "include/linux/jiffies.h" >#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) > >#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ) ># 50 "include/linux/jiffies.h" >#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) > > > >#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) > >#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8)) > > >#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8)) > >#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8)) > > >#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) > > > >#define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8)) > > > > > >#define __jiffy_data __attribute__((section(".data"))) > > > > > > >extern u64 __attribute__((section(".data"))) jiffies_64; >extern unsigned long volatile __attribute__((section(".data"))) jiffies; > > >u64 get_jiffies_64(void); ># 106 "include/linux/jiffies.h" >#define time_after(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(b) - (long)(a) < 0)) > > > >#define time_before(a,b) time_after(b,a) > >#define time_after_eq(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(a) - (long)(b) >= 0)) > > > >#define time_before_eq(a,b) time_after_eq(b,a) > > > > >#define time_after64(a,b) (typecheck(__u64, a) && typecheck(__u64, b) && ((__s64)(b) - (__s64)(a) < 0)) > > > >#define time_before64(a,b) time_after64(b,a) > >#define time_after_eq64(a,b) (typecheck(__u64, a) && typecheck(__u64, b) && ((__s64)(a) - (__s64)(b) >= 0)) > > > >#define time_before_eq64(a,b) time_after_eq64(b,a) > > > > > >#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) ># 151 "include/linux/jiffies.h" >#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1) ># 224 "include/linux/jiffies.h" >#define SEC_JIFFIE_SC (31 - SHIFT_HZ) > >#undef SEC_JIFFIE_SC >#define SEC_JIFFIE_SC (32 - SHIFT_HZ) > >#define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29) >#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19) >#define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC)) > > >#define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC)) > >#define USEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_USEC << USEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC)) ># 246 "include/linux/jiffies.h" >#define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1) > > > > > > >#define MAX_SEC_IN_JIFFIES (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC) ># 267 "include/linux/jiffies.h" >static inline __attribute__((always_inline)) unsigned int jiffies_to_msecs(const unsigned long j) >{ > > return (1000L / 100) * j; > > > > > >} > >static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j) >{ > > return (1000000L / 100) * j; > > > > > >} > >static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m) >{ > if (m > jiffies_to_msecs(((~0UL >> 1)-1))) > return ((~0UL >> 1)-1); > > return (m + (1000L / 100) - 1) / (1000L / 100); > > > > > >} > >static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u) >{ > if (u > jiffies_to_usecs(((~0UL >> 1)-1))) > return ((~0UL >> 1)-1); > > return (u + (1000000L / 100) - 1) / (1000000L / 100); > > > > > >} ># 326 "include/linux/jiffies.h" >static __inline__ __attribute__((always_inline)) unsigned long >timespec_to_jiffies(const struct timespec *value) >{ > unsigned long sec = value->tv_sec; > long nsec = value->tv_nsec + (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))) - 1; > > if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))) / 1000000000L)){ > sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))) / 1000000000L); > nsec = 0; > } > return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))))) + > (((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 7) + 29)) + (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))))) >> > (((32 - 7) + 29) - (32 - 7)))) >> (32 - 7); > >} > >static __inline__ __attribute__((always_inline)) void >jiffies_to_timespec(const unsigned long jiffies, struct timespec *value) >{ > > > > > u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))); > value->tv_sec = div_ll_X_l_rem(nsec,1000000000L,&value->tv_nsec); >} ># 365 "include/linux/jiffies.h" >static __inline__ __attribute__((always_inline)) unsigned long >timeval_to_jiffies(const struct timeval *value) >{ > unsigned long sec = value->tv_sec; > long usec = value->tv_usec; > > if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))) / 1000000000L)){ > sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))) / 1000000000L); > usec = 0; > } > return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))))))) + > (((u64)usec * ((unsigned long)((((u64)1000L << ((32 - 7) + 19)) + (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))))) + (u64)(((u64)1 << ((32 - 7) + 19)) - 1)) >> > (((32 - 7) + 19) - (32 - 7)))) >> (32 - 7); >} > >static __inline__ __attribute__((always_inline)) void >jiffies_to_timeval(const unsigned long jiffies, struct timeval *value) >{ > > > > > u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100)))))) << (8)) + ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))) / 2) / ((( ((((100)) / ((((100) + 100/2) / 100))) << (8)) + (((((100)) % ((((100) + 100/2) / 100))) << (8)) + ((((100) + 100/2) / 100)) / 2) / ((((100) + 100/2) / 100))))))); > long tv_usec; > > value->tv_sec = div_ll_X_l_rem(nsec,1000000000L,&tv_usec); > tv_usec /= 1000L; > value->tv_usec = tv_usec; >} > > > > >static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x) >{ > > return x / (100 / 100); > > > > > >} > >static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x) >{ > > if (x >= ~0UL / (100 / 100)) > return ~0UL; > return x * (100 / 100); ># 427 "include/linux/jiffies.h" >} > >static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x) >{ > > ({ unsigned long __upper, __low, __high, __mod, __base; __base = (100 / 100); asm("":"=a" (__low), "=d" (__high):"A" (x)); __upper = __high; if (__high) { __upper = __high % (__base); __high = __high / (__base); } asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (__base), "0" (__low), "1" (__upper)); asm("":"=A" (x):"a" (__low),"d" (__high)); __mod; }); ># 442 "include/linux/jiffies.h" > return x; >} > >static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x) >{ > > ({ unsigned long __upper, __low, __high, __mod, __base; __base = ((1000000000L / 100)); asm("":"=a" (__low), "=d" (__high):"A" (x)); __upper = __high; if (__high) { __upper = __high % (__base); __high = __high / (__base); } asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (__base), "0" (__low), "1" (__upper)); asm("":"=A" (x):"a" (__low),"d" (__high)); __mod; }); ># 462 "include/linux/jiffies.h" > return x; >} ># 52 "include/linux/sched.h" 2 ># 1 "include/linux/rbtree.h" 1 ># 95 "include/linux/rbtree.h" >#define _LINUX_RBTREE_H > > > > >struct rb_node >{ > unsigned long rb_parent_color; >#define RB_RED 0 >#define RB_BLACK 1 > struct rb_node *rb_right; > struct rb_node *rb_left; >} __attribute__((aligned(sizeof(long)))); > > >struct rb_root >{ > struct rb_node *rb_node; >}; > > >#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) >#define rb_color(r) ((r)->rb_parent_color & 1) >#define rb_is_red(r) (!rb_color(r)) >#define rb_is_black(r) rb_color(r) >#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) >#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) > >static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p) >{ > rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; >} >static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color) >{ > rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; >} > >#define RB_ROOT (struct rb_root) { NULL, } >#define rb_entry(ptr,type,member) container_of(ptr, type, member) > >#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) >#define RB_EMPTY_NODE(node) (rb_parent(node) == node) >#define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) > >extern void rb_insert_color(struct rb_node *, struct rb_root *); >extern void rb_erase(struct rb_node *, struct rb_root *); > > >extern struct rb_node *rb_next(struct rb_node *); >extern struct rb_node *rb_prev(struct rb_node *); >extern struct rb_node *rb_first(struct rb_root *); >extern struct rb_node *rb_last(struct rb_root *); > > >extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, > struct rb_root *root); > >static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent, > struct rb_node ** rb_link) >{ > node->rb_parent_color = (unsigned long )parent; > node->rb_left = node->rb_right = ((void *)0); > > *rb_link = node; >} ># 53 "include/linux/sched.h" 2 > ># 1 "include/linux/cpumask.h" 1 > >#define __LINUX_CPUMASK_H ># 86 "include/linux/cpumask.h" ># 1 "include/linux/bitmap.h" 1 > >#define __LINUX_BITMAP_H > > > > > ># 1 "include/linux/string.h" 1 ># 9 "include/linux/bitmap.h" 2 ># 84 "include/linux/bitmap.h" >extern int __bitmap_empty(const unsigned long *bitmap, int bits); >extern int __bitmap_full(const unsigned long *bitmap, int bits); >extern int __bitmap_equal(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, > int bits); >extern void __bitmap_shift_right(unsigned long *dst, > const unsigned long *src, int shift, int bits); >extern void __bitmap_shift_left(unsigned long *dst, > const unsigned long *src, int shift, int bits); >extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_intersects(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_subset(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_weight(const unsigned long *bitmap, int bits); > >extern int bitmap_scnprintf(char *buf, unsigned int len, > const unsigned long *src, int nbits); >extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, > unsigned long *dst, int nbits); >extern int bitmap_parse_user(const char *ubuf, unsigned int ulen, > unsigned long *dst, int nbits); >extern int bitmap_scnlistprintf(char *buf, unsigned int len, > const unsigned long *src, int nbits); >extern int bitmap_parselist(const char *buf, unsigned long *maskp, > int nmaskbits); >extern void bitmap_remap(unsigned long *dst, const unsigned long *src, > const unsigned long *old, const unsigned long *new, int bits); >extern int bitmap_bitremap(int oldbit, > const unsigned long *old, const unsigned long *new, int bits); >extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); >extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); >extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); > >#define BITMAP_LAST_WORD_MASK(nbits) ( ((nbits) % BITS_PER_LONG) ? (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL ) > > > > > >static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits) >{ > if (nbits <= 32) > *dst = 0UL; > else { > int len = (((nbits)+32 -1)/32) * sizeof(unsigned long); > (__builtin_constant_p(0) ? (__builtin_constant_p((len)) ? __constant_c_and_count_memset(((dst)),((0x01010101UL*(unsigned char)(0))),((len))) : __constant_c_memset(((dst)),((0x01010101UL*(unsigned char)(0))),((len)))) : (__builtin_constant_p((len)) ? __memset_generic((((dst))),(((0))),(((len)))) : __memset_generic(((dst)),((0)),((len))))); > } >} > >static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits) >{ > size_t nlongs = (((nbits)+32 -1)/32); > if (nlongs > 1) { > int len = (nlongs - 1) * sizeof(unsigned long); > (__builtin_constant_p(0xff) ? (__builtin_constant_p((len)) ? __constant_c_and_count_memset(((dst)),((0x01010101UL*(unsigned char)(0xff))),((len))) : __constant_c_memset(((dst)),((0x01010101UL*(unsigned char)(0xff))),((len)))) : (__builtin_constant_p((len)) ? __memset_generic((((dst))),(((0xff))),(((len)))) : __memset_generic(((dst)),((0xff)),((len))))); > } > dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); >} > >static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src, > int nbits) >{ > if (nbits <= 32) > *dst = *src; > else { > int len = (((nbits)+32 -1)/32) * sizeof(unsigned long); > (__builtin_constant_p(len) ? __constant_memcpy((dst),(src),(len)) : __memcpy((dst),(src),(len))); > } >} > >static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 & *src2; > else > __bitmap_and(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 | *src2; > else > __bitmap_or(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 ^ *src2; > else > __bitmap_xor(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 & ~(*src2); > else > __bitmap_andnot(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src, > int nbits) >{ > if (nbits <= 32) > *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); > else > __bitmap_complement(dst, src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_equal(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0; > else > return __bitmap_intersects(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_subset(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_empty(src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_full(src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > return __bitmap_weight(src, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst, > const unsigned long *src, int n, int nbits) >{ > if (nbits <= 32) > *dst = *src >> n; > else > __bitmap_shift_right(dst, src, n, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst, > const unsigned long *src, int n, int nbits) >{ > if (nbits <= 32) > *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); > else > __bitmap_shift_left(dst, src, n, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen, > unsigned long *maskp, int nmaskbits) >{ > return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits); >} ># 87 "include/linux/cpumask.h" 2 > >typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t; >extern cpumask_t _unused_cpumask_arg_; > >#define cpu_set(cpu,dst) __cpu_set((cpu), &(dst)) >static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp) >{ > set_bit(cpu, dstp->bits); >} > >#define cpu_clear(cpu,dst) __cpu_clear((cpu), &(dst)) >static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp) >{ > clear_bit(cpu, dstp->bits); >} > >#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits) >{ > bitmap_fill(dstp->bits, nbits); >} > >#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits) >{ > bitmap_zero(dstp->bits, nbits); >} > > >#define cpu_isset(cpu,cpumask) test_bit((cpu), (cpumask).bits) > >#define cpu_test_and_set(cpu,cpumask) __cpu_test_and_set((cpu), &(cpumask)) >static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr) >{ > return test_and_set_bit(cpu, addr->bits); >} > >#define cpus_and(dst,src1,src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define cpus_or(dst,src1,src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define cpus_xor(dst,src1,src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define cpus_andnot(dst,src1,src2) __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) > >static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define cpus_complement(dst,src) __cpus_complement(&(dst), &(src), NR_CPUS) >static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp, > const cpumask_t *srcp, int nbits) >{ > bitmap_complement(dstp->bits, srcp->bits, nbits); >} > >#define cpus_equal(src1,src2) __cpus_equal(&(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_equal(src1p->bits, src2p->bits, nbits); >} > >#define cpus_intersects(src1,src2) __cpus_intersects(&(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_intersects(src1p->bits, src2p->bits, nbits); >} > >#define cpus_subset(src1,src2) __cpus_subset(&(src1), &(src2), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_subset(src1p->bits, src2p->bits, nbits); >} > >#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits) >{ > return bitmap_empty(srcp->bits, nbits); >} > >#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits) >{ > return bitmap_full(srcp->bits, nbits); >} > >#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS) >static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits) >{ > return bitmap_weight(srcp->bits, nbits); >} > >#define cpus_shift_right(dst,src,n) __cpus_shift_right(&(dst), &(src), (n), NR_CPUS) > >static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp, > const cpumask_t *srcp, int n, int nbits) >{ > bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); >} > >#define cpus_shift_left(dst,src,n) __cpus_shift_left(&(dst), &(src), (n), NR_CPUS) > >static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp, > const cpumask_t *srcp, int n, int nbits) >{ > bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); >} > > > > > > > >#define first_cpu(src) 0 >#define next_cpu(n,src) 1 > > >#define cpumask_of_cpu(cpu) ({ typeof(_unused_cpumask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(cpu); } else { cpus_clear(m); cpu_set((cpu), m); } m; }) ># 237 "include/linux/cpumask.h" >#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) > > > >#define CPU_MASK_ALL (cpumask_t) { { [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD } } ># 256 "include/linux/cpumask.h" >#define CPU_MASK_NONE (cpumask_t) { { [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL } } > > > > >#define CPU_MASK_CPU0 (cpumask_t) { { [0] = 1UL } } > > > > >#define cpus_addr(src) ((src).bits) > >#define cpumask_scnprintf(buf,len,src) __cpumask_scnprintf((buf), (len), &(src), NR_CPUS) > >static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len, > const cpumask_t *srcp, int nbits) >{ > return bitmap_scnprintf(buf, len, srcp->bits, nbits); >} > >#define cpumask_parse_user(ubuf,ulen,dst) __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS) > >static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len, > cpumask_t *dstp, int nbits) >{ > return bitmap_parse_user(buf, len, dstp->bits, nbits); >} > >#define cpulist_scnprintf(buf,len,src) __cpulist_scnprintf((buf), (len), &(src), NR_CPUS) > >static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len, > const cpumask_t *srcp, int nbits) >{ > return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); >} > >#define cpulist_parse(buf,dst) __cpulist_parse((buf), &(dst), NR_CPUS) >static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits) >{ > return bitmap_parselist(buf, dstp->bits, nbits); >} > >#define cpu_remap(oldbit,old,new) __cpu_remap((oldbit), &(old), &(new), NR_CPUS) > >static inline __attribute__((always_inline)) int __cpu_remap(int oldbit, > const cpumask_t *oldp, const cpumask_t *newp, int nbits) >{ > return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); >} > >#define cpus_remap(dst,src,old,new) __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS) > >static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, > const cpumask_t *oldp, const cpumask_t *newp, int nbits) >{ > bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); >} > > > > > > > >#define for_each_cpu_mask(cpu,mask) for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) ># 380 "include/linux/cpumask.h" >extern cpumask_t cpu_possible_map; >extern cpumask_t cpu_online_map; >extern cpumask_t cpu_present_map; ># 392 "include/linux/cpumask.h" >#define num_online_cpus() 1 >#define num_possible_cpus() 1 >#define num_present_cpus() 1 >#define cpu_online(cpu) ((cpu) == 0) >#define cpu_possible(cpu) ((cpu) == 0) >#define cpu_present(cpu) ((cpu) == 0) > > > > > > > >#define highest_possible_processor_id() 0 >#define any_online_cpu(mask) 0 > > >#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) >#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) >#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) ># 55 "include/linux/sched.h" 2 ># 1 "include/linux/errno.h" 1 > >#define _LINUX_ERRNO_H > ># 1 "include/asm/errno.h" 1 > >#define __UM_ERRNO_H > ># 1 "include/asm/arch/errno.h" 1 > >#define _I386_ERRNO_H > ># 1 "include/asm-generic/errno.h" 1 > >#define _ASM_GENERIC_ERRNO_H > ># 1 "include/asm-generic/errno-base.h" 1 > >#define _ASM_GENERIC_ERRNO_BASE_H > >#define EPERM 1 >#define ENOENT 2 >#define ESRCH 3 >#define EINTR 4 >#define EIO 5 >#define ENXIO 6 >#define E2BIG 7 >#define ENOEXEC 8 >#define EBADF 9 >#define ECHILD 10 >#define EAGAIN 11 >#define ENOMEM 12 >#define EACCES 13 >#define EFAULT 14 >#define ENOTBLK 15 >#define EBUSY 16 >#define EEXIST 17 >#define EXDEV 18 >#define ENODEV 19 >#define ENOTDIR 20 >#define EISDIR 21 >#define EINVAL 22 >#define ENFILE 23 >#define EMFILE 24 >#define ENOTTY 25 >#define ETXTBSY 26 >#define EFBIG 27 >#define ENOSPC 28 >#define ESPIPE 29 >#define EROFS 30 >#define EMLINK 31 >#define EPIPE 32 >#define EDOM 33 >#define ERANGE 34 ># 5 "include/asm-generic/errno.h" 2 > >#define EDEADLK 35 >#define ENAMETOOLONG 36 >#define ENOLCK 37 >#define ENOSYS 38 >#define ENOTEMPTY 39 >#define ELOOP 40 >#define EWOULDBLOCK EAGAIN >#define ENOMSG 42 >#define EIDRM 43 >#define ECHRNG 44 >#define EL2NSYNC 45 >#define EL3HLT 46 >#define EL3RST 47 >#define ELNRNG 48 >#define EUNATCH 49 >#define ENOCSI 50 >#define EL2HLT 51 >#define EBADE 52 >#define EBADR 53 >#define EXFULL 54 >#define ENOANO 55 >#define EBADRQC 56 >#define EBADSLT 57 > >#define EDEADLOCK EDEADLK > >#define EBFONT 59 >#define ENOSTR 60 >#define ENODATA 61 >#define ETIME 62 >#define ENOSR 63 >#define ENONET 64 >#define ENOPKG 65 >#define EREMOTE 66 >#define ENOLINK 67 >#define EADV 68 >#define ESRMNT 69 >#define ECOMM 70 >#define EPROTO 71 >#define EMULTIHOP 72 >#define EDOTDOT 73 >#define EBADMSG 74 >#define EOVERFLOW 75 >#define ENOTUNIQ 76 >#define EBADFD 77 >#define EREMCHG 78 >#define ELIBACC 79 >#define ELIBBAD 80 >#define ELIBSCN 81 >#define ELIBMAX 82 >#define ELIBEXEC 83 >#define EILSEQ 84 >#define ERESTART 85 >#define ESTRPIPE 86 >#define EUSERS 87 >#define ENOTSOCK 88 >#define EDESTADDRREQ 89 >#define EMSGSIZE 90 >#define EPROTOTYPE 91 >#define ENOPROTOOPT 92 >#define EPROTONOSUPPORT 93 >#define ESOCKTNOSUPPORT 94 >#define EOPNOTSUPP 95 >#define EPFNOSUPPORT 96 >#define EAFNOSUPPORT 97 >#define EADDRINUSE 98 >#define EADDRNOTAVAIL 99 >#define ENETDOWN 100 >#define ENETUNREACH 101 >#define ENETRESET 102 >#define ECONNABORTED 103 >#define ECONNRESET 104 >#define ENOBUFS 105 >#define EISCONN 106 >#define ENOTCONN 107 >#define ESHUTDOWN 108 >#define ETOOMANYREFS 109 >#define ETIMEDOUT 110 >#define ECONNREFUSED 111 >#define EHOSTDOWN 112 >#define EHOSTUNREACH 113 >#define EALREADY 114 >#define EINPROGRESS 115 >#define ESTALE 116 >#define EUCLEAN 117 >#define ENOTNAM 118 >#define ENAVAIL 119 >#define EISNAM 120 >#define EREMOTEIO 121 >#define EDQUOT 122 > >#define ENOMEDIUM 123 >#define EMEDIUMTYPE 124 >#define ECANCELED 125 >#define ENOKEY 126 >#define EKEYEXPIRED 127 >#define EKEYREVOKED 128 >#define EKEYREJECTED 129 > > >#define EOWNERDEAD 130 >#define ENOTRECOVERABLE 131 ># 5 "include/asm/arch/errno.h" 2 ># 5 "include/asm/errno.h" 2 ># 5 "include/linux/errno.h" 2 > > > > >#define ERESTARTSYS 512 >#define ERESTARTNOINTR 513 >#define ERESTARTNOHAND 514 >#define ENOIOCTLCMD 515 >#define ERESTART_RESTARTBLOCK 516 > > >#define EBADHANDLE 521 >#define ENOTSYNC 522 >#define EBADCOOKIE 523 >#define ENOTSUPP 524 >#define ETOOSMALL 525 >#define ESERVERFAULT 526 >#define EBADTYPE 527 >#define EJUKEBOX 528 >#define EIOCBQUEUED 529 >#define EIOCBRETRY 530 ># 56 "include/linux/sched.h" 2 ># 1 "include/linux/nodemask.h" 1 > >#define __LINUX_NODEMASK_H ># 86 "include/linux/nodemask.h" ># 1 "include/linux/numa.h" 1 > >#define _LINUX_NUMA_H > > > > > >#define NODES_SHIFT 0 > > >#define MAX_NUMNODES (1 << NODES_SHIFT) ># 87 "include/linux/nodemask.h" 2 > >typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t; >extern nodemask_t _unused_nodemask_arg_; > >#define node_set(node,dst) __node_set((node), &(dst)) >static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp) >{ > set_bit(node, dstp->bits); >} > >#define node_clear(node,dst) __node_clear((node), &(dst)) >static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp) >{ > clear_bit(node, dstp->bits); >} > >#define nodes_setall(dst) __nodes_setall(&(dst), MAX_NUMNODES) >static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits) >{ > bitmap_fill(dstp->bits, nbits); >} > >#define nodes_clear(dst) __nodes_clear(&(dst), MAX_NUMNODES) >static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits) >{ > bitmap_zero(dstp->bits, nbits); >} > > >#define node_isset(node,nodemask) test_bit((node), (nodemask).bits) > >#define node_test_and_set(node,nodemask) __node_test_and_set((node), &(nodemask)) > >static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr) >{ > return test_and_set_bit(node, addr->bits); >} > >#define nodes_and(dst,src1,src2) __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define nodes_or(dst,src1,src2) __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define nodes_xor(dst,src1,src2) __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define nodes_andnot(dst,src1,src2) __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); >} > >#define nodes_complement(dst,src) __nodes_complement(&(dst), &(src), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp, > const nodemask_t *srcp, int nbits) >{ > bitmap_complement(dstp->bits, srcp->bits, nbits); >} > >#define nodes_equal(src1,src2) __nodes_equal(&(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_equal(src1p->bits, src2p->bits, nbits); >} > >#define nodes_intersects(src1,src2) __nodes_intersects(&(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_intersects(src1p->bits, src2p->bits, nbits); >} > >#define nodes_subset(src1,src2) __nodes_subset(&(src1), &(src2), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_subset(src1p->bits, src2p->bits, nbits); >} > >#define nodes_empty(src) __nodes_empty(&(src), MAX_NUMNODES) >static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits) >{ > return bitmap_empty(srcp->bits, nbits); >} > >#define nodes_full(nodemask) __nodes_full(&(nodemask), MAX_NUMNODES) >static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits) >{ > return bitmap_full(srcp->bits, nbits); >} > >#define nodes_weight(nodemask) __nodes_weight(&(nodemask), MAX_NUMNODES) >static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits) >{ > return bitmap_weight(srcp->bits, nbits); >} > >#define nodes_shift_right(dst,src,n) __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp, > const nodemask_t *srcp, int n, int nbits) >{ > bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); >} > >#define nodes_shift_left(dst,src,n) __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp, > const nodemask_t *srcp, int n, int nbits) >{ > bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); >} > > > > >#define first_node(src) __first_node(&(src)) >static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp) >{ > return ({ int __x = ((1 << 0)); int __y = (find_first_bit(srcp->bits, (1 << 0))); __x < __y ? __x: __y; }); >} > >#define next_node(n,src) __next_node((n), &(src)) >static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp) >{ > return ({ int __x = ((1 << 0)); int __y = (find_next_bit(srcp->bits, (1 << 0), n+1)); __x < __y ? __x: __y; }); >} > >#define nodemask_of_node(node) ({ typeof(_unused_nodemask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(node); } else { nodes_clear(m); node_set((node), m); } m; }) ># 250 "include/linux/nodemask.h" >#define first_unset_node(mask) __first_unset_node(&(mask)) >static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp) >{ > return ({ int __x = ((1 << 0)); int __y = (find_first_zero_bit(maskp->bits, (1 << 0))); __x < __y ? __x: __y; }); > >} > >#define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES) > > > >#define NODE_MASK_ALL ((nodemask_t) { { [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD } }) ># 276 "include/linux/nodemask.h" >#define NODE_MASK_NONE ((nodemask_t) { { [0 ... BITS_TO_LONGS(MAX_NUMNODES)-1] = 0UL } }) > > > > >#define nodes_addr(src) ((src).bits) > >#define nodemask_scnprintf(buf,len,src) __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len, > const nodemask_t *srcp, int nbits) >{ > return bitmap_scnprintf(buf, len, srcp->bits, nbits); >} > >#define nodemask_parse_user(ubuf,ulen,dst) __nodemask_parse_user((ubuf), (ulen), &(dst), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len, > nodemask_t *dstp, int nbits) >{ > return bitmap_parse_user(buf, len, dstp->bits, nbits); >} > >#define nodelist_scnprintf(buf,len,src) __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len, > const nodemask_t *srcp, int nbits) >{ > return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); >} > >#define nodelist_parse(buf,dst) __nodelist_parse((buf), &(dst), MAX_NUMNODES) >static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) >{ > return bitmap_parselist(buf, dstp->bits, nbits); >} > >#define node_remap(oldbit,old,new) __node_remap((oldbit), &(old), &(new), MAX_NUMNODES) > >static inline __attribute__((always_inline)) int __node_remap(int oldbit, > const nodemask_t *oldp, const nodemask_t *newp, int nbits) >{ > return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); >} > >#define nodes_remap(dst,src,old,new) __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES) > >static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, > const nodemask_t *oldp, const nodemask_t *newp, int nbits) >{ > bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); >} > > > > > > > >#define for_each_node_mask(node,mask) if (!nodes_empty(mask)) for ((node) = 0; (node) < 1; (node)++) ># 345 "include/linux/nodemask.h" >extern nodemask_t node_online_map; >extern nodemask_t node_possible_map; ># 357 "include/linux/nodemask.h" >#define num_online_nodes() 1 >#define num_possible_nodes() 1 >#define node_online(node) ((node) == 0) >#define node_possible(node) ((node) == 0) >#define first_online_node 0 >#define next_online_node(nid) (MAX_NUMNODES) >#define highest_possible_node_id() 0 > > >#define any_online_node(mask) ({ int node; for_each_node_mask(node, (mask)) if (node_online(node)) break; node; }) ># 375 "include/linux/nodemask.h" >#define node_set_online(node) set_bit((node), node_online_map.bits) >#define node_set_offline(node) clear_bit((node), node_online_map.bits) > >#define for_each_node(node) for_each_node_mask((node), node_possible_map) >#define for_each_online_node(node) for_each_node_mask((node), node_online_map) ># 57 "include/linux/sched.h" 2 > > ># 1 "include/asm/semaphore.h" 1 > >#define __UM_SEMAPHORE_H > ># 1 "include/asm/arch/semaphore.h" 1 > >#define _I386_SEMAPHORE_H ># 41 "include/asm/arch/semaphore.h" ># 1 "include/linux/wait.h" 1 > >#define _LINUX_WAIT_H > >#define WNOHANG 0x00000001 >#define WUNTRACED 0x00000002 >#define WSTOPPED WUNTRACED >#define WEXITED 0x00000004 >#define WCONTINUED 0x00000008 >#define WNOWAIT 0x01000000 > >#define __WNOTHREAD 0x20000000 >#define __WALL 0x40000000 >#define __WCLONE 0x80000000 > > >#define P_ALL 0 >#define P_PID 1 >#define P_PGID 2 > > > ># 1 "include/linux/list.h" 1 > >#define _LINUX_LIST_H > > > > ># 1 "include/linux/poison.h" 1 > >#define _LINUX_POISON_H > > > > > > > >#define LIST_POISON1 ((void *) 0x00100100) >#define LIST_POISON2 ((void *) 0x00200200) > > > > > > >#define RED_INACTIVE 0x5A2CF071UL >#define RED_ACTIVE 0x170FC2A5UL > > >#define POISON_INUSE 0x5a >#define POISON_FREE 0x6b >#define POISON_END 0xa5 > > >#define POISON_FREE_INITMEM 0xcc > > >#define POISON_FREE_INITDATA 0xba ># 39 "include/linux/poison.h" >#define JBD_POISON_FREE 0x5b > > >#define POOL_POISON_FREED 0xa7 >#define POOL_POISON_ALLOCATED 0xa9 > > >#define ATM_POISON_FREE 0x12 >#define ATM_POISON 0xdeadbeef > > >#define NEIGHBOR_DEAD 0xdeadbeef >#define NETFILTER_LINK_POISON 0xdead57ac > > >#define MUTEX_DEBUG_INIT 0x11 >#define MUTEX_DEBUG_FREE 0x22 > > >#define KEY_DESTROY 0xbd > > >#define OSS_POISON_FREE 0xAB ># 8 "include/linux/list.h" 2 ># 1 "include/linux/prefetch.h" 1 ># 11 "include/linux/prefetch.h" >#define _LINUX_PREFETCH_H > > > ># 1 "include/asm/cache.h" 1 > >#define __UM_CACHE_H > > > >#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) ># 15 "include/asm/cache.h" >#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) ># 16 "include/linux/prefetch.h" 2 ># 43 "include/linux/prefetch.h" >static inline __attribute__((always_inline)) void prefetch(const void *x) {;} > > > >static inline __attribute__((always_inline)) void prefetchw(const void *x) {;} > > > >#define spin_lock_prefetch(x) prefetchw(x) > > > >#define PREFETCH_STRIDE (4*L1_CACHE_BYTES) > > >static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len) >{ > > > > > > > >} ># 9 "include/linux/list.h" 2 ># 21 "include/linux/list.h" >struct list_head { > struct list_head *next, *prev; >}; > >#define LIST_HEAD_INIT(name) { &(name), &(name) } > >#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) > > >static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list) >{ > list->next = list; > list->prev = list; >} ># 53 "include/linux/list.h" >extern void __list_add(struct list_head *new, > struct list_head *prev, > struct list_head *next); ># 72 "include/linux/list.h" >extern void list_add(struct list_head *new, struct list_head *head); ># 84 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head) >{ > __list_add(new, head->prev, head); >} > > > > > > > >static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new, > struct list_head * prev, struct list_head * next) >{ > new->next = next; > new->prev = prev; > __asm__ __volatile__("": : :"memory"); > next->prev = new; > prev->next = new; >} ># 121 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head) >{ > __list_add_rcu(new, head, head->next); >} ># 142 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new, > struct list_head *head) >{ > __list_add_rcu(new, head->prev, head); >} ># 155 "include/linux/list.h" >static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next) >{ > next->prev = prev; > prev->next = next; >} ># 175 "include/linux/list.h" >extern void list_del(struct list_head *entry); ># 202 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry) >{ > __list_del(entry->prev, entry->next); > entry->prev = ((void *) 0x00200200); >} > > > > > > > >static inline __attribute__((always_inline)) void list_replace(struct list_head *old, > struct list_head *new) >{ > new->next = old->next; > new->next->prev = new; > new->prev = old->prev; > new->prev->next = new; >} > >static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old, > struct list_head *new) >{ > list_replace(old, new); > INIT_LIST_HEAD(old); >} ># 238 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old, > struct list_head *new) >{ > new->next = old->next; > new->prev = old->prev; > __asm__ __volatile__("": : :"memory"); > new->next->prev = new; > new->prev->next = new; > old->prev = ((void *) 0x00200200); >} > > > > > >static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry) >{ > __list_del(entry->prev, entry->next); > INIT_LIST_HEAD(entry); >} > > > > > > >static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head) >{ > __list_del(list->prev, list->next); > list_add(list, head); >} > > > > > > >static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list, > struct list_head *head) >{ > __list_del(list->prev, list->next); > list_add_tail(list, head); >} > > > > > > >static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list, > const struct list_head *head) >{ > return list->next == head; >} > > > > > >static inline __attribute__((always_inline)) int list_empty(const struct list_head *head) >{ > return head->next == head; >} ># 315 "include/linux/list.h" >static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head) >{ > struct list_head *next = head->next; > return (next == head) && (next == head->prev); >} > >static inline __attribute__((always_inline)) void __list_splice(struct list_head *list, > struct list_head *head) >{ > struct list_head *first = list->next; > struct list_head *last = list->prev; > struct list_head *at = head->next; > > first->prev = head; > head->next = first; > > last->next = at; > at->prev = last; >} > > > > > > >static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head) >{ > if (!list_empty(list)) > __list_splice(list, head); >} ># 353 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list, > struct list_head *head) >{ > if (!list_empty(list)) { > __list_splice(list, head); > INIT_LIST_HEAD(list); > } >} > > > > > > > >#define list_entry(ptr,type,member) container_of(ptr, type, member) > > > > > > > >#define list_for_each(pos,head) for (pos = (head)->next; prefetch(pos->next), pos != (head); pos = pos->next) ># 390 "include/linux/list.h" >#define __list_for_each(pos,head) for (pos = (head)->next; pos != (head); pos = pos->next) > > > > > > > >#define list_for_each_prev(pos,head) for (pos = (head)->prev; prefetch(pos->prev), pos != (head); pos = pos->prev) ># 408 "include/linux/list.h" >#define list_for_each_safe(pos,n,head) for (pos = (head)->next, n = pos->next; pos != (head); pos = n, n = pos->next) ># 418 "include/linux/list.h" >#define list_for_each_entry(pos,head,member) for (pos = list_entry((head)->next, typeof(*pos), member); prefetch(pos->member.next), &pos->member != (head); pos = list_entry(pos->member.next, typeof(*pos), member)) ># 429 "include/linux/list.h" >#define list_for_each_entry_reverse(pos,head,member) for (pos = list_entry((head)->prev, typeof(*pos), member); prefetch(pos->member.prev), &pos->member != (head); pos = list_entry(pos->member.prev, typeof(*pos), member)) ># 442 "include/linux/list.h" >#define list_prepare_entry(pos,head,member) ((pos) ? : list_entry(head, typeof(*pos), member)) ># 454 "include/linux/list.h" >#define list_for_each_entry_continue(pos,head,member) for (pos = list_entry(pos->member.next, typeof(*pos), member); prefetch(pos->member.next), &pos->member != (head); pos = list_entry(pos->member.next, typeof(*pos), member)) ># 467 "include/linux/list.h" >#define list_for_each_entry_from(pos,head,member) for (; prefetch(pos->member.next), &pos->member != (head); pos = list_entry(pos->member.next, typeof(*pos), member)) ># 478 "include/linux/list.h" >#define list_for_each_entry_safe(pos,n,head,member) for (pos = list_entry((head)->next, typeof(*pos), member), n = list_entry(pos->member.next, typeof(*pos), member); &pos->member != (head); pos = n, n = list_entry(n->member.next, typeof(*n), member)) ># 494 "include/linux/list.h" >#define list_for_each_entry_safe_continue(pos,n,head,member) for (pos = list_entry(pos->member.next, typeof(*pos), member), n = list_entry(pos->member.next, typeof(*pos), member); &pos->member != (head); pos = n, n = list_entry(n->member.next, typeof(*n), member)) ># 510 "include/linux/list.h" >#define list_for_each_entry_safe_from(pos,n,head,member) for (n = list_entry(pos->member.next, typeof(*pos), member); &pos->member != (head); pos = n, n = list_entry(n->member.next, typeof(*n), member)) ># 525 "include/linux/list.h" >#define list_for_each_entry_safe_reverse(pos,n,head,member) for (pos = list_entry((head)->prev, typeof(*pos), member), n = list_entry(pos->member.prev, typeof(*pos), member); &pos->member != (head); pos = n, n = list_entry(n->member.prev, typeof(*n), member)) ># 540 "include/linux/list.h" >#define list_for_each_rcu(pos,head) for (pos = (head)->next; prefetch(rcu_dereference(pos)->next), pos != (head); pos = pos->next) > > > > >#define __list_for_each_rcu(pos,head) for (pos = (head)->next; rcu_dereference(pos) != (head); pos = pos->next) ># 562 "include/linux/list.h" >#define list_for_each_safe_rcu(pos,n,head) for (pos = (head)->next; n = rcu_dereference(pos)->next, pos != (head); pos = n) ># 577 "include/linux/list.h" >#define list_for_each_entry_rcu(pos,head,member) for (pos = list_entry((head)->next, typeof(*pos), member); prefetch(rcu_dereference(pos)->member.next), &pos->member != (head); pos = list_entry(pos->member.next, typeof(*pos), member)) ># 595 "include/linux/list.h" >#define list_for_each_continue_rcu(pos,head) for ((pos) = (pos)->next; prefetch(rcu_dereference((pos))->next), (pos) != (head); (pos) = (pos)->next) ># 607 "include/linux/list.h" >struct hlist_head { > struct hlist_node *first; >}; > >struct hlist_node { > struct hlist_node *next, **pprev; >}; > >#define HLIST_HEAD_INIT { .first = NULL } >#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } >#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) >static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h) >{ > h->next = ((void *)0); > h->pprev = ((void *)0); >} > >static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h) >{ > return !h->pprev; >} > >static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h) >{ > return !h->first; >} > >static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n) >{ > struct hlist_node *next = n->next; > struct hlist_node **pprev = n->pprev; > *pprev = next; > if (next) > next->pprev = pprev; >} > >static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n) >{ > __hlist_del(n); > n->next = ((void *) 0x00100100); > n->pprev = ((void *) 0x00200200); >} ># 669 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n) >{ > __hlist_del(n); > n->pprev = ((void *) 0x00200200); >} > >static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n) >{ > if (!hlist_unhashed(n)) { > __hlist_del(n); > INIT_HLIST_NODE(n); > } >} ># 690 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old, > struct hlist_node *new) >{ > struct hlist_node *next = old->next; > > new->next = next; > new->pprev = old->pprev; > __asm__ __volatile__("": : :"memory"); > if (next) > new->next->pprev = &new->next; > *new->pprev = new; > old->pprev = ((void *) 0x00200200); >} > >static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h) >{ > struct hlist_node *first = h->first; > n->next = first; > if (first) > first->pprev = &n->next; > h->first = n; > n->pprev = &h->first; >} ># 734 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n, > struct hlist_head *h) >{ > struct hlist_node *first = h->first; > n->next = first; > n->pprev = &h->first; > __asm__ __volatile__("": : :"memory"); > if (first) > first->pprev = &n->next; > h->first = n; >} > > >static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n, > struct hlist_node *next) >{ > n->pprev = next->pprev; > n->next = next; > next->pprev = &n->next; > *(n->pprev) = n; >} > >static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n, > struct hlist_node *next) >{ > next->next = n->next; > n->next = next; > next->pprev = &n->next; > > if(next->next) > next->next->pprev = &next->next; >} ># 785 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n, > struct hlist_node *next) >{ > n->pprev = next->pprev; > n->next = next; > __asm__ __volatile__("": : :"memory"); > next->pprev = &n->next; > *(n->pprev) = n; >} ># 813 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev, > struct hlist_node *n) >{ > n->next = prev->next; > n->pprev = &prev->next; > __asm__ __volatile__("": : :"memory"); > prev->next = n; > if (n->next) > n->next->pprev = &n->next; >} > >#define hlist_entry(ptr,type,member) container_of(ptr,type,member) > >#define hlist_for_each(pos,head) for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); pos = pos->next) > > > >#define hlist_for_each_safe(pos,n,head) for (pos = (head)->first; pos && ({ n = pos->next; 1; }); pos = n) ># 841 "include/linux/list.h" >#define hlist_for_each_entry(tpos,pos,head,member) for (pos = (head)->first; pos && ({ prefetch(pos->next); 1;}) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); pos = pos->next) ># 853 "include/linux/list.h" >#define hlist_for_each_entry_continue(tpos,pos,member) for (pos = (pos)->next; pos && ({ prefetch(pos->next); 1;}) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); pos = pos->next) ># 865 "include/linux/list.h" >#define hlist_for_each_entry_from(tpos,pos,member) for (; pos && ({ prefetch(pos->next); 1;}) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); pos = pos->next) ># 878 "include/linux/list.h" >#define hlist_for_each_entry_safe(tpos,pos,n,head,member) for (pos = (head)->first; pos && ({ n = pos->next; 1; }) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); pos = n) ># 895 "include/linux/list.h" >#define hlist_for_each_entry_rcu(tpos,pos,head,member) for (pos = (head)->first; rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); pos = pos->next) ># 23 "include/linux/wait.h" 2 > > > > > >typedef struct __wait_queue wait_queue_t; >typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key); >int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); > >struct __wait_queue { > unsigned int flags; >#define WQ_FLAG_EXCLUSIVE 0x01 > void *private; > wait_queue_func_t func; > struct list_head task_list; >}; > >struct wait_bit_key { > void *flags; > int bit_nr; >}; > >struct wait_bit_queue { > struct wait_bit_key key; > wait_queue_t wait; >}; > >struct __wait_queue_head { > spinlock_t lock; > struct list_head task_list; >}; >typedef struct __wait_queue_head wait_queue_head_t; > >struct task_struct; > > > > > >#define __WAITQUEUE_INITIALIZER(name,tsk) { .private = tsk, .func = default_wake_function, .task_list = { NULL, NULL } } > > > > >#define DECLARE_WAITQUEUE(name,tsk) wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk) > > >#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .task_list = { &(name).task_list, &(name).task_list } } > > > >#define DECLARE_WAIT_QUEUE_HEAD(name) wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name) > > >#define __WAIT_BIT_KEY_INITIALIZER(word,bit) { .flags = word, .bit_nr = bit, } > > >extern void init_waitqueue_head(wait_queue_head_t *q); > > > > > > > >#define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name) > > >static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) >{ > q->flags = 0; > q->private = p; > q->func = default_wake_function; >} > >static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q, > wait_queue_func_t func) >{ > q->flags = 0; > q->private = ((void *)0); > q->func = func; >} > >static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q) >{ > return !list_empty(&q->task_list); >} ># 118 "include/linux/wait.h" >#define is_sync_wait(wait) (!(wait) || ((wait)->private)) > >extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) __attribute__((regparm(3))); >extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait) __attribute__((regparm(3))); >extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) >{ > list_add(&new->task_list, &head->task_list); >} > > > > >static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head, > wait_queue_t *new) >{ > list_add_tail(&new->task_list, &head->task_list); >} > >static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head, > wait_queue_t *old) >{ > list_del(&old->task_list); >} > >void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key) __attribute__((regparm(3))); >extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode) __attribute__((regparm(3))); >extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr) __attribute__((regparm(3))); >void __wake_up_bit(wait_queue_head_t *, void *, int) __attribute__((regparm(3))); >int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned) __attribute__((regparm(3))); >int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned) __attribute__((regparm(3))); >void wake_up_bit(void *, int) __attribute__((regparm(3))); >int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned) __attribute__((regparm(3))); >int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned) __attribute__((regparm(3))); >wait_queue_head_t *bit_waitqueue(void *, int) __attribute__((regparm(3))); > >#define wake_up(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, NULL) >#define wake_up_nr(x,nr) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr, NULL) >#define wake_up_all(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 0, NULL) >#define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL) >#define wake_up_interruptible_nr(x,nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL) >#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) >#define wake_up_locked(x) __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE) >#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1) > >#define __wait_event(wq,condition) do { DEFINE_WAIT(__wait); for (;;) { prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); if (condition) break; schedule(); } finish_wait(&wq, &__wait); } while (0) ># 189 "include/linux/wait.h" >#define wait_event(wq,condition) do { if (condition) break; __wait_event(wq, condition); } while (0) > > > > > > >#define __wait_event_timeout(wq,condition,ret) do { DEFINE_WAIT(__wait); for (;;) { prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); if (condition) break; ret = schedule_timeout(ret); if (!ret) break; } finish_wait(&wq, &__wait); } while (0) ># 227 "include/linux/wait.h" >#define wait_event_timeout(wq,condition,timeout) ({ long __ret = timeout; if (!(condition)) __wait_event_timeout(wq, condition, __ret); __ret; }) > > > > > > > >#define __wait_event_interruptible(wq,condition,ret) do { DEFINE_WAIT(__wait); for (;;) { prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); if (condition) break; if (!signal_pending(current)) { schedule(); continue; } ret = -ERESTARTSYS; break; } finish_wait(&wq, &__wait); } while (0) ># 268 "include/linux/wait.h" >#define wait_event_interruptible(wq,condition) ({ int __ret = 0; if (!(condition)) __wait_event_interruptible(wq, condition, __ret); __ret; }) > > > > > > > >#define __wait_event_interruptible_timeout(wq,condition,ret) do { DEFINE_WAIT(__wait); for (;;) { prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); if (condition) break; if (!signal_pending(current)) { ret = schedule_timeout(ret); if (!ret) break; continue; } ret = -ERESTARTSYS; break; } finish_wait(&wq, &__wait); } while (0) ># 313 "include/linux/wait.h" >#define wait_event_interruptible_timeout(wq,condition,timeout) ({ long __ret = timeout; if (!(condition)) __wait_event_interruptible_timeout(wq, condition, __ret); __ret; }) > > > > > > > >#define __wait_event_interruptible_exclusive(wq,condition,ret) do { DEFINE_WAIT(__wait); for (;;) { prepare_to_wait_exclusive(&wq, &__wait, TASK_INTERRUPTIBLE); if (condition) break; if (!signal_pending(current)) { schedule(); continue; } ret = -ERESTARTSYS; break; } finish_wait(&wq, &__wait); } while (0) ># 340 "include/linux/wait.h" >#define wait_event_interruptible_exclusive(wq,condition) ({ int __ret = 0; if (!(condition)) __wait_event_interruptible_exclusive(wq, condition, __ret); __ret; }) ># 351 "include/linux/wait.h" >static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q, > wait_queue_t * wait) >{ > wait->flags |= 0x01; > __add_wait_queue_tail(q, wait); >} > > > > >static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q, > wait_queue_t * wait) >{ > __remove_wait_queue(q, wait); >} > > > > > > >extern void sleep_on(wait_queue_head_t *q) __attribute__((regparm(3))); >extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout) __attribute__((regparm(3))); > >extern void interruptible_sleep_on(wait_queue_head_t *q) __attribute__((regparm(3))); >extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout) __attribute__((regparm(3))); > > > > > >void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state) __attribute__((regparm(3))); > >void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state) __attribute__((regparm(3))); > >void finish_wait(wait_queue_head_t *q, wait_queue_t *wait) __attribute__((regparm(3))); >int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); >int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); > >#define DEFINE_WAIT(name) wait_queue_t name = { .private = current, .func = autoremove_wake_function, .task_list = LIST_HEAD_INIT((name).task_list), } > > > > > > >#define DEFINE_WAIT_BIT(name,word,bit) struct wait_bit_queue name = { .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), .wait = { .private = current, .func = wake_bit_function, .task_list = LIST_HEAD_INIT((name).wait.task_list), }, } ># 408 "include/linux/wait.h" >#define init_wait(wait) do { (wait)->private = current; (wait)->func = autoremove_wake_function; INIT_LIST_HEAD(&(wait)->task_list); } while (0) ># 429 "include/linux/wait.h" >static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit, > int (*action)(void *), unsigned mode) >{ > if (!(__builtin_constant_p(bit) ? constant_test_bit((bit),(word)) : variable_test_bit((bit),(word)))) > return 0; > return out_of_line_wait_on_bit(word, bit, action, mode); >} ># 453 "include/linux/wait.h" >static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit, > int (*action)(void *), unsigned mode) >{ > if (!test_and_set_bit(bit, word)) > return 0; > return out_of_line_wait_on_bit_lock(word, bit, action, mode); >} ># 42 "include/asm/arch/semaphore.h" 2 ># 1 "include/linux/rwsem.h" 1 > > > > > > > >#define _LINUX_RWSEM_H ># 19 "include/linux/rwsem.h" >struct rw_semaphore; > > > > ># 1 "include/asm/rwsem.h" 1 > >#define __UM_RWSEM_H__ > ># 1 "include/asm/arch/rwsem.h" 1 ># 33 "include/asm/arch/rwsem.h" >#define _I386_RWSEM_H ># 45 "include/asm/arch/rwsem.h" >struct rwsem_waiter; > >extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem) __attribute__((regparm(3))); >extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem) __attribute__((regparm(3))); >extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *) __attribute__((regparm(3))); >extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem) __attribute__((regparm(3))); > > > > >struct rw_semaphore { > signed long count; >#define RWSEM_UNLOCKED_VALUE 0x00000000 >#define RWSEM_ACTIVE_BIAS 0x00000001 >#define RWSEM_ACTIVE_MASK 0x0000ffff >#define RWSEM_WAITING_BIAS (-0x00010000) >#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS >#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) > spinlock_t wait_lock; > struct list_head wait_list; > > > >}; > > > > >#define __RWSEM_DEP_MAP_INIT(lockname) > > > >#define __RWSEM_INITIALIZER(name) { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } > > > >#define DECLARE_RWSEM(name) struct rw_semaphore name = __RWSEM_INITIALIZER(name) > > >extern void __init_rwsem(struct rw_semaphore *sem, const char *name, > struct lock_class_key *key); > >#define init_rwsem(sem) do { static struct lock_class_key __key; __init_rwsem((sem), #sem, &__key); } while (0) ># 97 "include/asm/arch/rwsem.h" >static inline __attribute__((always_inline)) void __down_read(struct rw_semaphore *sem) >{ > __asm__ __volatile__( > "# beginning down_read\n\t" >"" " incl (%%eax)\n\t" > " jns 1f\n" > " call call_rwsem_down_read_failed\n" > "1:\n\t" > "# ending down_read\n\t" > : "+m" (sem->count) > : "a" (sem) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) int __down_read_trylock(struct rw_semaphore *sem) >{ > __s32 result, tmp; > __asm__ __volatile__( > "# beginning __down_read_trylock\n\t" > " movl %0,%1\n\t" > "1:\n\t" > " movl %1,%2\n\t" > " addl %3,%2\n\t" > " jle 2f\n\t" >"" " cmpxchgl %2,%0\n\t" > " jnz 1b\n\t" > "2:\n\t" > "# ending __down_read_trylock\n\t" > : "+m" (sem->count), "=&a" (result), "=&r" (tmp) > : "i" (0x00000001) > : "memory", "cc"); > return result>=0 ? 1 : 0; >} > > > > >static inline __attribute__((always_inline)) void __down_write_nested(struct rw_semaphore *sem, int subclass) >{ > int tmp; > > tmp = ((-0x00010000) + 0x00000001); > __asm__ __volatile__( > "# beginning down_write\n\t" >"" " xadd %%edx,(%%eax)\n\t" > " testl %%edx,%%edx\n\t" > " jz 1f\n" > " call call_rwsem_down_write_failed\n" > "1:\n" > "# ending down_write" > : "+m" (sem->count), "=d" (tmp) > : "a" (sem), "1" (tmp) > : "memory", "cc"); >} > >static inline __attribute__((always_inline)) void __down_write(struct rw_semaphore *sem) >{ > __down_write_nested(sem, 0); >} > > > > >static inline __attribute__((always_inline)) int __down_write_trylock(struct rw_semaphore *sem) >{ > signed long ret = ((__typeof__(*(&sem->count)))__cmpxchg((&sem->count),(unsigned long)(0x00000000), (unsigned long)(((-0x00010000) + 0x00000001)),sizeof(*(&sem->count)))); > > > if (ret == 0x00000000) > return 1; > return 0; >} > > > > >static inline __attribute__((always_inline)) void __up_read(struct rw_semaphore *sem) >{ > __s32 tmp = -0x00000001; > __asm__ __volatile__( > "# beginning __up_read\n\t" >"" " xadd %%edx,(%%eax)\n\t" > " jns 1f\n\t" > " call call_rwsem_wake\n" > "1:\n" > "# ending __up_read\n" > : "+m" (sem->count), "=d" (tmp) > : "a" (sem), "1" (tmp) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) void __up_write(struct rw_semaphore *sem) >{ > __asm__ __volatile__( > "# beginning __up_write\n\t" > " movl %2,%%edx\n\t" >"" " xaddl %%edx,(%%eax)\n\t" > " jz 1f\n" > " call call_rwsem_wake\n" > "1:\n\t" > "# ending __up_write\n" > : "+m" (sem->count) > : "a" (sem), "i" (-((-0x00010000) + 0x00000001)) > : "memory", "cc", "edx"); >} > > > > >static inline __attribute__((always_inline)) void __downgrade_write(struct rw_semaphore *sem) >{ > __asm__ __volatile__( > "# beginning __downgrade_write\n\t" >"" " addl %2,(%%eax)\n\t" > " jns 1f\n\t" > " call call_rwsem_downgrade_wake\n" > "1:\n\t" > "# ending __downgrade_write\n" > : "+m" (sem->count) > : "a" (sem), "i" (-(-0x00010000)) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) void rwsem_atomic_add(int delta, struct rw_semaphore *sem) >{ > __asm__ __volatile__( >"" "addl %1,%0" > : "+m" (sem->count) > : "ir" (delta)); >} > > > > >static inline __attribute__((always_inline)) int rwsem_atomic_update(int delta, struct rw_semaphore *sem) >{ > int tmp = delta; > > __asm__ __volatile__( >"" "xadd %0,%1" > : "+r" (tmp), "+m" (sem->count) > : : "memory"); > > return tmp+delta; >} > >static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem) >{ > return (sem->count != 0); >} ># 5 "include/asm/rwsem.h" 2 ># 25 "include/linux/rwsem.h" 2 > > > > > >extern void down_read(struct rw_semaphore *sem); > > > > >extern int down_read_trylock(struct rw_semaphore *sem); > > > > >extern void down_write(struct rw_semaphore *sem); > > > > >extern int down_write_trylock(struct rw_semaphore *sem); > > > > >extern void up_read(struct rw_semaphore *sem); > > > > >extern void up_write(struct rw_semaphore *sem); > > > > >extern void downgrade_write(struct rw_semaphore *sem); ># 87 "include/linux/rwsem.h" >#define down_read_nested(sem,subclass) down_read(sem) >#define down_write_nested(sem,subclass) down_write(sem) >#define down_read_non_owner(sem) down_read(sem) >#define up_read_non_owner(sem) up_read(sem) ># 43 "include/asm/arch/semaphore.h" 2 > >struct semaphore { > atomic_t count; > int sleepers; > wait_queue_head_t wait; >}; > > >#define __SEMAPHORE_INITIALIZER(name,n) { .count = ATOMIC_INIT(n), .sleepers = 0, .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) } > > > > > > >#define __DECLARE_SEMAPHORE_GENERIC(name,count) struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) > > >#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) >#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) > >static inline __attribute__((always_inline)) void sema_init (struct semaphore *sem, int val) >{ > > > > > > > (((&sem->count)->counter) = (val)); > sem->sleepers = 0; > init_waitqueue_head(&sem->wait); >} > >static inline __attribute__((always_inline)) void init_MUTEX (struct semaphore *sem) >{ > sema_init(sem, 1); >} > >static inline __attribute__((always_inline)) void init_MUTEX_LOCKED (struct semaphore *sem) >{ > sema_init(sem, 0); >} > >__attribute__((regparm(3))) void __down_failed(void ); >__attribute__((regparm(3))) int __down_failed_interruptible(void ); >__attribute__((regparm(3))) int __down_failed_trylock(void ); >__attribute__((regparm(3))) void __up_wakeup(void ); > > > > > > >static inline __attribute__((always_inline)) void down(struct semaphore * sem) >{ > do { __might_sleep("include/asm/arch/semaphore.h", 99); do { } while (0); } while (0); > __asm__ __volatile__( > "# atomic down operation\n\t" > "" "decl %0\n\t" > "jns 2f\n" > "\tlea %0,%%eax\n\t" > "call __down_failed\n" > "2:" > :"+m" (sem->count) > : > :"memory","ax"); >} > > > > > >static inline __attribute__((always_inline)) int down_interruptible(struct semaphore * sem) >{ > int result; > > do { __might_sleep("include/asm/arch/semaphore.h", 120); do { } while (0); } while (0); > __asm__ __volatile__( > "# atomic interruptible down operation\n\t" > "xorl %0,%0\n\t" > "" "decl %1\n\t" > "jns 2f\n\t" > "lea %1,%%eax\n\t" > "call __down_failed_interruptible\n" > "2:" > :"=&a" (result), "+m" (sem->count) > : > :"memory"); > return result; >} > > > > > >static inline __attribute__((always_inline)) int down_trylock(struct semaphore * sem) >{ > int result; > > __asm__ __volatile__( > "# atomic interruptible down operation\n\t" > "xorl %0,%0\n\t" > "" "decl %1\n\t" > "jns 2f\n\t" > "lea %1,%%eax\n\t" > "call __down_failed_trylock\n\t" > "2:\n" > :"=&a" (result), "+m" (sem->count) > : > :"memory"); > return result; >} > > > > > >static inline __attribute__((always_inline)) void up(struct semaphore * sem) >{ > __asm__ __volatile__( > "# atomic up operation\n\t" > "" "incl %0\n\t" > "jg 1f\n\t" > "lea %0,%%eax\n\t" > "call __up_wakeup\n" > "1:" > :"+m" (sem->count) > : > :"memory","ax"); >} ># 5 "include/asm/semaphore.h" 2 ># 60 "include/linux/sched.h" 2 > ># 1 "include/asm/ptrace.h" 1 ># 62 "include/linux/sched.h" 2 ># 1 "include/asm/mmu.h" 1 > > > > > > >#define __MMU_H > ># 1 "arch/um/include/um_mmu.h" 1 > > > > > > >#define __ARCH_UM_MMU_H > ># 1 "arch/um/include/uml-config.h" 1 > > > > > >#define AUTOCONF_INCLUDED >#define UML_CONFIG_DEBUG_SPINLOCK_SLEEP 1 >#define UML_CONFIG_BONDING_MODULE 1 >#define UML_CONFIG_DEBUG_LIST 1 >#define UML_CONFIG_TCP_CONG_ADVANCED 1 >#define UML_CONFIG_TCP_CONG_SCALABLE_MODULE 1 >#define UML_CONFIG_TCP_CONG_VENO_MODULE 1 >#define UML_CONFIG_CRYPTO_MD5_MODULE 1 >#define UML_CONFIG_FLATMEM 1 >#define UML_CONFIG_PROC_KCORE 1 >#define UML_CONFIG_CRYPTO_CBC_MODULE 1 >#define UML_CONFIG_XTERM_CHAN 1 >#define UML_CONFIG_CRYPTO_ECB_MODULE 1 >#define UML_CONFIG_UML_NET_MCAST 1 >#define UML_CONFIG_ENABLE_MUST_CHECK 1 >#define UML_CONFIG_BROKEN_ON_SMP 1 >#define UML_CONFIG_EXT2_FS_XATTR 1 >#define UML_CONFIG_LLC2_MODULE 1 >#define UML_CONFIG_EXT3_FS_XATTR 1 >#define UML_CONFIG_UML_RANDOM 1 >#define UML_CONFIG_LD_SCRIPT_DYN 1 >#define UML_CONFIG_NFS_COMMON 1 >#define UML_CONFIG_X86_TSC 1 >#define UML_CONFIG_NEST_LEVEL 0 >#define UML_CONFIG_MMAPPER 1 >#define UML_CONFIG_NFSD_V3 1 >#define UML_CONFIG_UML_X86 1 >#define UML_CONFIG_NFSD_V4 1 >#define UML_CONFIG_MODULES 1 >#define UML_CONFIG_EXT2_FS 1 >#define UML_CONFIG_EXT3_FS 1 >#define UML_CONFIG_CRYPTO_DES_MODULE 1 >#define UML_CONFIG_RCU_TORTURE_TEST_MODULE 1 >#define UML_CONFIG_DNOTIFY 1 >#define UML_CONFIG_UML_NET_SLIRP 1 >#define UML_CONFIG_ARCH "um" >#define UML_CONFIG_QFMT_V2 1 >#define UML_CONFIG_DEFCONFIG_LIST "arch/$ARCH/defconfig" >#define UML_CONFIG_DEBUG_LOCKING_API_SELFTESTS 1 >#define UML_CONFIG_DETECT_SOFTLOCKUP 1 >#define UML_CONFIG_INOTIFY 1 >#define UML_CONFIG_SLAB 1 >#define UML_CONFIG_DLM_TCP 1 >#define UML_CONFIG_HOTPLUG 1 >#define UML_CONFIG_FLATMEM_MANUAL 1 >#define UML_CONFIG_IPV6_MODULE 1 >#define UML_CONFIG_SUNRPC_GSS_MODULE 1 >#define UML_CONFIG_FLAT_NODE_MEM_MAP 1 >#define UML_CONFIG_DEBUG_SPINLOCK 1 >#define UML_CONFIG_VFAT_FS_MODULE 1 >#define UML_CONFIG_LOCALVERSION_AUTO 1 >#define UML_CONFIG_SLHC_MODULE 1 >#define UML_CONFIG_NFSD_MODULE 1 >#define UML_CONFIG_UDF_NLS 1 >#define UML_CONFIG_FUSE_FS_MODULE 1 >#define UML_CONFIG_KMOD 1 >#define UML_CONFIG_STUB_START 0xbfffe000 >#define UML_CONFIG_PROC_FS 1 >#define UML_CONFIG_X86_CMPXCHG 1 >#define UML_CONFIG_INET 1 >#define UML_CONFIG_RT_MUTEXES 1 >#define UML_CONFIG_SYSVIPC 1 >#define UML_CONFIG_TCP_CONG_CUBIC 1 >#define UML_CONFIG_X86_L1_CACHE_SHIFT 6 >#define UML_CONFIG_NTFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET 1 >#define UML_CONFIG_SLIP_MODULE 1 >#define UML_CONFIG_IOSCHED_CFQ 1 >#define UML_CONFIG_GENERIC_BUG 1 >#define UML_CONFIG_CRYPTO_MANAGER_MODULE 1 >#define UML_CONFIG_SWAP 1 >#define UML_CONFIG_EXT2_FS_POSIX_ACL 1 >#define UML_CONFIG_TCP_CONG_HYBLA_MODULE 1 >#define UML_CONFIG_EXT3_FS_POSIX_ACL 1 >#define UML_CONFIG_CRC32_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_COUNT 16 >#define UML_CONFIG_CRC16_MODULE 1 >#define UML_CONFIG_FAT_DEFAULT_IOCHARSET "iso8859-1" >#define UML_CONFIG_BLK_DEV_INITRD 1 >#define UML_CONFIG_TCP_CONG_VEGAS_MODULE 1 >#define UML_CONFIG_PACKET_MMAP 1 >#define UML_CONFIG_NTFS_RW 1 >#define UML_CONFIG_PPP_DEFLATE_MODULE 1 >#define UML_CONFIG_UNIX 1 >#define UML_CONFIG_STDERR_CONSOLE 1 >#define UML_CONFIG_X86_XADD 1 >#define UML_CONFIG_CONFIGFS_FS_MODULE 1 >#define UML_CONFIG_UML_NET_DAEMON 1 >#define UML_CONFIG_TCP_CONG_WESTWOOD_MODULE 1 >#define UML_CONFIG_UID16 1 >#define UML_CONFIG_CRYPTO_ARC4_MODULE 1 >#define UML_CONFIG_BLK_DEV_NBD_MODULE 1 >#define UML_CONFIG_IKCONFIG 1 >#define UML_CONFIG_BINFMT_MISC_MODULE 1 >#define UML_CONFIG_IP_FIB_HASH 1 >#define UML_CONFIG_CRYPTO_SHA1_MODULE 1 >#define UML_CONFIG_TCP_CONG_HSTCP_MODULE 1 >#define UML_CONFIG_PARTITION_ADVANCED 1 >#define UML_CONFIG_NLS_DEFAULT "iso8859-1" >#define UML_CONFIG_BLK_DEV_UBD 1 >#define UML_CONFIG_SPLIT_PTLOCK_CPUS 4 >#define UML_CONFIG_LOCKD_V4 1 >#define UML_CONFIG_BLK_DEV_RAM 1 >#define UML_CONFIG_VM_EVENT_COUNTERS 1 >#define UML_CONFIG_LIBCRC32C_MODULE 1 >#define UML_CONFIG_PPP_BSDCOMP_MODULE 1 >#define UML_CONFIG_SMB_NLS_REMOTE "cp437" >#define UML_CONFIG_CON_CHAN "xterm" >#define UML_CONFIG_MODVERSIONS 1 >#define UML_CONFIG_IPV6_TUNNEL_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_BLOCKSIZE 1024 >#define UML_CONFIG_SYSCTL_SYSCALL 1 >#define UML_CONFIG_ELF_CORE 1 >#define UML_CONFIG_UNWIND_INFO 1 >#define UML_CONFIG_MCONSOLE 1 >#define UML_CONFIG_DEFAULT_IOSCHED "anticipatory" >#define UML_CONFIG_DEBUG_SLAB_LEAK 1 >#define UML_CONFIG_IP_PIMSM_V1 1 >#define UML_CONFIG_IP_PNP_DHCP 1 >#define UML_CONFIG_LEGACY_PTYS 1 >#define UML_CONFIG_UNIX98_PTYS 1 >#define UML_CONFIG_X86_USE_PPRO_CHECKSUM 1 >#define UML_CONFIG_IP_PIMSM_V2 1 >#define UML_CONFIG_SEMAPHORE_SLEEPERS 1 >#define UML_CONFIG_TCP_CONG_LP_MODULE 1 >#define UML_CONFIG_DEBUG_VM 1 >#define UML_CONFIG_SSL_CHAN "pty" >#define UML_CONFIG_BLOCK 1 >#define UML_CONFIG_GENERIC_HWEIGHT 1 >#define UML_CONFIG_IRQ_RELEASE_METHOD 1 >#define UML_CONFIG_LOCKD_MODULE 1 >#define UML_CONFIG_QUOTACTL 1 >#define UML_CONFIG_TOP_ADDR 0xC0000000 >#define UML_CONFIG_IP_ADVANCED_ROUTER 1 >#define UML_CONFIG_UML_NET_TUNTAP 1 >#define UML_CONFIG_KALLSYMS 1 >#define UML_CONFIG_NFSD_TCP 1 >#define UML_CONFIG_KERNEL_STACK_ORDER 2 >#define UML_CONFIG_NLS_UTF8_MODULE 1 >#define UML_CONFIG_IPV6_SIT_MODULE 1 >#define UML_CONFIG_PROC_SYSCTL 1 >#define UML_CONFIG_PTY_CHAN 1 >#define UML_CONFIG_RAMFS 1 >#define UML_CONFIG_IP_PNP_RARP 1 >#define UML_CONFIG_TTY_CHAN 1 >#define UML_CONFIG_SHMEM 1 >#define UML_CONFIG_X86_INTEL_USERCOPY 1 >#define UML_CONFIG_EXPORTFS_MODULE 1 >#define UML_CONFIG_EPOLL 1 >#define UML_CONFIG_RELAY 1 >#define UML_CONFIG_MSDOS_FS_MODULE 1 >#define UML_CONFIG_IP_MULTIPLE_TABLES 1 >#define UML_CONFIG_RPCSEC_GSS_KRB5_MODULE 1 >#define UML_CONFIG_NLS_CODEPAGE_437_MODULE 1 >#define UML_CONFIG_PPP_MPPE_MODULE 1 >#define UML_CONFIG_HPPFS 1 >#define UML_CONFIG_STACKTRACE_SUPPORT 1 >#define UML_CONFIG_PPPOE_MODULE 1 >#define UML_CONFIG_ZLIB_DEFLATE_MODULE 1 >#define UML_CONFIG_BLK_DEV_COW_COMMON 1 >#define UML_CONFIG_DEBUG_KERNEL 1 >#define UML_CONFIG_SOUND_MODULE 1 >#define UML_CONFIG_TMPFS 1 >#define UML_CONFIG_QUOTA 1 >#define UML_CONFIG_ASK_IP_FIB_HASH 1 >#define UML_CONFIG_DUMMY_MODULE 1 >#define UML_CONFIG_PLIST 1 >#define UML_CONFIG_FUTEX 1 >#define UML_CONFIG_EXPERIMENTAL 1 >#define UML_CONFIG_BLK_DEV_CRYPTOLOOP_MODULE 1 >#define UML_CONFIG_LOCALVERSION "" >#define UML_CONFIG_SMB_NLS_DEFAULT 1 >#define UML_CONFIG_X86_POPAD_OK 1 >#define UML_CONFIG_INIT_ENV_ARG_LIMIT 128 >#define UML_CONFIG_ZLIB_INFLATE_MODULE 1 >#define UML_CONFIG_IOSCHED_DEADLINE 1 >#define UML_CONFIG_SYSFS 1 >#define UML_CONFIG_X86_CMPXCHG64 1 >#define UML_CONFIG_TCP_CONG_BIC_MODULE 1 >#define UML_CONFIG_IOSCHED_NOOP 1 >#define UML_CONFIG_INET6_TUNNEL_MODULE 1 >#define UML_CONFIG_IP_ROUTE_MULTIPATH 1 >#define UML_CONFIG_LOCKDEP_SUPPORT 1 >#define UML_CONFIG_MSDOS_PARTITION 1 >#define UML_CONFIG_CRYPTO_CAST5_MODULE 1 >#define UML_CONFIG_X86_BSWAP 1 >#define UML_CONFIG_INET_DIAG 1 >#define UML_CONFIG_HOST_VMSPLIT_3G 1 >#define UML_CONFIG_DEBUG_RWSEMS 1 >#define UML_CONFIG_CONNECTOR_MODULE 1 >#define UML_CONFIG_VLAN_8021Q_MODULE 1 >#define UML_CONFIG_BRIDGE_MODULE 1 >#define UML_CONFIG_BASE_FULL 1 >#define UML_CONFIG_CRC_CCITT_MODULE 1 >#define UML_CONFIG_IP_MULTICAST 1 >#define UML_CONFIG_PREVENT_FIRMWARE_BUILD 1 >#define UML_CONFIG_HOSTAUDIO_MODULE 1 >#define UML_CONFIG_BLK_DEV_LOOP_MODULE 1 >#define UML_CONFIG_ATA_OVER_ETH_MODULE 1 >#define UML_CONFIG_GENERIC_CALIBRATE_DELAY 1 >#define UML_CONFIG_NFS_ACL_SUPPORT_MODULE 1 >#define UML_CONFIG_NULL_CHAN 1 >#define UML_CONFIG_MODE_SKAS 1 >#define UML_CONFIG_UML_NET_PCAP 1 >#define UML_CONFIG_STUB_DATA 0xbffff000 >#define UML_CONFIG_ISO9660_FS_MODULE 1 >#define UML_CONFIG_PACKET 1 >#define UML_CONFIG_STUB_CODE 0xbfffe000 >#define UML_CONFIG_DEBUG_BUGVERBOSE 1 >#define UML_CONFIG_FS_POSIX_ACL 1 >#define UML_CONFIG_X86_WP_WORKS_OK 1 >#define UML_CONFIG_GENERIC_HARDIRQS 1 >#define UML_CONFIG_FIB_RULES 1 >#define UML_CONFIG_CRAMFS_MODULE 1 >#define UML_CONFIG_MPENTIUMM 1 >#define UML_CONFIG_PORT_CHAN 1 >#define UML_CONFIG_ARCH_HAS_SC_SIGNALS 1 >#define UML_CONFIG_INOTIFY_USER 1 >#define UML_CONFIG_POSIX_MQUEUE 1 >#define UML_CONFIG_JOLIET 1 >#define UML_CONFIG_SELECT_MEMORY_MODEL 1 >#define UML_CONFIG_IP_PNP_BOOTP 1 >#define UML_CONFIG_AUTOFS_FS_MODULE 1 >#define UML_CONFIG_DEFAULT_CUBIC 1 >#define UML_CONFIG_UML_REAL_TIME_CLOCK 1 >#define UML_CONFIG_X86_GOOD_APIC 1 >#define UML_CONFIG_UML_NET_SLIP 1 >#define UML_CONFIG_PPP_ASYNC_MODULE 1 >#define UML_CONFIG_NFS_V3 1 >#define UML_CONFIG_NFS_V4 1 >#define UML_CONFIG_JBD 1 >#define UML_CONFIG_DEFAULT_TCP_CONG "cubic" >#define UML_CONFIG_BSD_PROCESS_ACCT 1 >#define UML_CONFIG_FAT_FS_MODULE 1 >#define UML_CONFIG_CRYPTO_BLKCIPHER_MODULE 1 >#define UML_CONFIG_IP_MROUTE 1 >#define UML_CONFIG_FAT_DEFAULT_CODEPAGE 437 >#define UML_CONFIG_UML_SOUND_MODULE 1 >#define UML_CONFIG_UNAME_RELEASE "2.6.19-swsusp2" >#define UML_CONFIG_UDF_FS_MODULE 1 >#define UML_CONFIG_HOSTFS_MODULE 1 >#define UML_CONFIG_PRINTK 1 >#define UML_CONFIG_RPCSEC_GSS_SPKM3_MODULE 1 >#define UML_CONFIG_SMB_FS_MODULE 1 >#define UML_CONFIG_SUNRPC_MODULE 1 >#define UML_CONFIG_FS_MBCACHE 1 >#define UML_CONFIG_LLC_MODULE 1 >#define UML_CONFIG_DLM_MODULE 1 >#define UML_CONFIG_INITRAMFS_SOURCE "" >#define UML_CONFIG_IKCONFIG_PROC 1 >#define UML_CONFIG_BUG 1 >#define UML_CONFIG_NFS_FS_MODULE 1 >#define UML_CONFIG_CRYPTO 1 >#define UML_CONFIG_SYSCTL 1 >#define UML_CONFIG_LSF 1 >#define UML_CONFIG_IP_PNP 1 >#define UML_CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA 1 >#define UML_CONFIG_RWSEM_XCHGADD_ALGORITHM 1 >#define UML_CONFIG_NET 1 >#define UML_CONFIG_KERNELVERSION "2.6.20-rc1" >#define UML_CONFIG_DEBUG_SLAB 1 >#define UML_CONFIG_MODULE_UNLOAD 1 >#define UML_CONFIG_STANDALONE 1 >#define UML_CONFIG_KALLSYMS_EXTRA_PASS 1 >#define UML_CONFIG_NETDEVICES 1 >#define UML_CONFIG_INET_TCP_DIAG 1 >#define UML_CONFIG_FRAME_POINTER 1 >#define UML_CONFIG_PPP_SYNC_TTY_MODULE 1 >#define UML_CONFIG_NLS 1 >#define UML_CONFIG_CRYPTO_ALGAPI_MODULE 1 >#define UML_CONFIG_UML 1 >#define UML_CONFIG_MMU 1 >#define UML_CONFIG_UML_NET_ETHERTAP 1 >#define UML_CONFIG_PPP_MODULE 1 >#define UML_CONFIG_BLK_DEV_RAM_SIZE 4096 >#define UML_CONFIG_DEBUG_MUTEXES 1 >#define UML_CONFIG_DEBUG_INFO 1 >#define UML_CONFIG_EXT2_FS_SECURITY 1 >#define UML_CONFIG_SSL 1 >#define UML_CONFIG_IOSCHED_AS 1 >#define UML_CONFIG_EXT3_FS_SECURITY 1 >#define UML_CONFIG_BASE_SMALL 0 >#define UML_CONFIG_STDIO_CONSOLE 1 >#define UML_CONFIG_X86_INVLPG 1 >#define UML_CONFIG_DEBUG_RT_MUTEXES 1 >#define UML_CONFIG_BINFMT_ELF 1 >#define UML_CONFIG_CON_ZERO_CHAN "fd:0,fd:1" >#define UML_CONFIG_DEFAULT_AS 1 >#define UML_CONFIG_LEGACY_PTY_COUNT 256 >#define UML_CONFIG_DEBUG_PI_LIST 1 >#define UML_CONFIG_LOG_BUF_SHIFT 16 >#define UML_CONFIG_BITREVERSE_MODULE 1 >#define UML_CONFIG_TCP_CONG_HTCP_MODULE 1 >#define UML_CONFIG_IP_ROUTE_VERBOSE 1 >#define UML_CONFIG_NFS_V3_ACL 1 >#define UML_CONFIG_AUTOFS4_FS_MODULE 1 ># 10 "arch/um/include/um_mmu.h" 2 ># 1 "arch/um/include/choose-mode.h" 1 ># 11 "arch/um/include/um_mmu.h" 2 > > > > > > ># 1 "/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas/mmu-skas.h" 1 > > > > > > >#define __SKAS_MMU_H > ># 1 "/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas/mm_id.h" 1 > > > > > > >#define __MM_ID_H > >struct mm_id { > union { > int mm_fd; > int pid; > } u; > unsigned long stack; >}; ># 10 "/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas/mmu-skas.h" 2 ># 1 "include/asm/ldt.h" 1 ># 9 "include/asm/ldt.h" >#define __ASM_LDT_H > > > > >struct mmu_context_skas; >extern void ldt_host_info(void); >extern long init_new_ldt(struct mmu_context_skas * to_mm, > struct mmu_context_skas * from_mm); >extern void free_ldt(struct mmu_context_skas * mm); > >#define LDT_PAGES_MAX ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE) > >#define LDT_ENTRIES_PER_PAGE (PAGE_SIZE/LDT_ENTRY_SIZE) > >#define LDT_DIRECT_ENTRIES ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE) > > >struct ldt_entry { > __u32 a; > __u32 b; >}; > >typedef struct uml_ldt { > int entry_count; > struct semaphore semaphore; > union { > struct ldt_entry * pages[((8192 * 8)/(1UL << 12))]; > struct ldt_entry entries[((((8192 * 8)/(1UL << 12))*sizeof(void *))/8)]; > } u; >} uml_ldt_t; ># 11 "/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas/mmu-skas.h" 2 > >struct mmu_context_skas { > struct mm_id id; > unsigned long last_page_table; > > > > uml_ldt_t ldt; >}; > >extern void switch_mm_skas(struct mm_id * mm_idp); ># 18 "arch/um/include/um_mmu.h" 2 > > >typedef union mm_context { > > > > > struct mmu_context_skas skas; > >} mm_context_t; ># 10 "include/asm/mmu.h" 2 ># 63 "include/linux/sched.h" 2 ># 1 "include/asm/cputime.h" 1 > >#define __UM_CPUTIME_H > ># 1 "include/asm-generic/cputime.h" 1 > >#define _ASM_GENERIC_CPUTIME_H > > > > >typedef unsigned long cputime_t; > >#define cputime_zero (0UL) >#define cputime_max ((~0UL >> 1) - 1) >#define cputime_add(__a,__b) ((__a) + (__b)) >#define cputime_sub(__a,__b) ((__a) - (__b)) >#define cputime_div(__a,__n) ((__a) / (__n)) >#define cputime_halve(__a) ((__a) >> 1) >#define cputime_eq(__a,__b) ((__a) == (__b)) >#define cputime_gt(__a,__b) ((__a) > (__b)) >#define cputime_ge(__a,__b) ((__a) >= (__b)) >#define cputime_lt(__a,__b) ((__a) < (__b)) >#define cputime_le(__a,__b) ((__a) <= (__b)) >#define cputime_to_jiffies(__ct) (__ct) >#define jiffies_to_cputime(__hz) (__hz) > >typedef u64 cputime64_t; > >#define cputime64_zero (0ULL) >#define cputime64_add(__a,__b) ((__a) + (__b)) >#define cputime64_sub(__a,__b) ((__a) - (__b)) >#define cputime64_to_jiffies64(__ct) (__ct) >#define jiffies64_to_cputime64(__jif) (__jif) >#define cputime_to_cputime64(__ct) ((u64) __ct) > > > > > >#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct) >#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs) > > > > >#define cputime_to_secs(jif) ((jif) / HZ) >#define secs_to_cputime(sec) ((sec) * HZ) > > > > >#define timespec_to_cputime(__val) timespec_to_jiffies(__val) >#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val) > > > > >#define timeval_to_cputime(__val) timeval_to_jiffies(__val) >#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val) > > > > >#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct) >#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x) > > > > >#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct) ># 5 "include/asm/cputime.h" 2 ># 64 "include/linux/sched.h" 2 > ># 1 "include/linux/smp.h" 1 > >#define __LINUX_SMP_H > > > > > > > >extern void cpu_idle(void); ># 85 "include/linux/smp.h" >#define raw_smp_processor_id() 0 >#define hard_smp_processor_id() 0 >static inline __attribute__((always_inline)) int up_smp_call_function(void) >{ > return 0; >} >#define smp_call_function(func,info,retry,wait) (up_smp_call_function()) >#define on_each_cpu(func,info,retry,wait) ({ local_irq_disable(); func(info); local_irq_enable(); 0; }) > > > > > > >static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { } >#define num_booting_cpus() 1 >#define smp_prepare_boot_cpu() do {} while (0) >static inline __attribute__((always_inline)) int smp_call_function_single(int cpuid, void (*func) (void *info), > void *info, int retry, int wait) >{ > > func(info); > return 0; >} ># 131 "include/linux/smp.h" >#define smp_processor_id() raw_smp_processor_id() > > >#define get_cpu() ({ preempt_disable(); smp_processor_id(); }) >#define put_cpu() preempt_enable() >#define put_cpu_no_resched() preempt_enable_no_resched() > >void smp_setup_processor_id(void); ># 66 "include/linux/sched.h" 2 ># 1 "include/linux/sem.h" 1 > >#define _LINUX_SEM_H > ># 1 "include/linux/ipc.h" 1 > >#define _LINUX_IPC_H > > > >#define IPC_PRIVATE ((__kernel_key_t) 0) > > >struct ipc_perm >{ > __kernel_key_t key; > __kernel_uid_t uid; > __kernel_gid_t gid; > __kernel_uid_t cuid; > __kernel_gid_t cgid; > __kernel_mode_t mode; > unsigned short seq; >}; > > ># 1 "include/asm/ipcbuf.h" 1 > >#define __UM_IPCBUF_H > ># 1 "include/asm/arch/ipcbuf.h" 1 > >#define __i386_IPCBUF_H__ ># 14 "include/asm/arch/ipcbuf.h" >struct ipc64_perm >{ > __kernel_key_t key; > __kernel_uid32_t uid; > __kernel_gid32_t gid; > __kernel_uid32_t cuid; > __kernel_gid32_t cgid; > __kernel_mode_t mode; > unsigned short __pad1; > unsigned short seq; > unsigned short __pad2; > unsigned long __unused1; > unsigned long __unused2; >}; ># 5 "include/asm/ipcbuf.h" 2 ># 22 "include/linux/ipc.h" 2 > > >#define IPC_CREAT 00001000 >#define IPC_EXCL 00002000 >#define IPC_NOWAIT 00004000 > > > > >#define IPC_DIPC 00010000 >#define IPC_OWN 00020000 > > > > > >#define IPC_RMID 0 >#define IPC_SET 1 >#define IPC_STAT 2 >#define IPC_INFO 3 > > > > > >#define IPC_OLD 0 > >#define IPC_64 0x0100 > > > > ># 1 "include/linux/kref.h" 1 ># 16 "include/linux/kref.h" >#define _KREF_H_ > > > > > > >struct kref { > atomic_t refcount; >}; > >void kref_init(struct kref *kref); >void kref_get(struct kref *kref); >int kref_put(struct kref *kref, void (*release) (struct kref *kref)); ># 55 "include/linux/ipc.h" 2 > >#define IPCMNI 32768 > > >struct kern_ipc_perm >{ > spinlock_t lock; > int deleted; > key_t key; > uid_t uid; > gid_t gid; > uid_t cuid; > gid_t cgid; > mode_t mode; > unsigned long seq; > void *security; >}; > >struct ipc_ids; >struct ipc_namespace { > struct kref kref; > struct ipc_ids *ids[3]; > > int sem_ctls[4]; > int used_sems; > > int msg_ctlmax; > int msg_ctlmnb; > int msg_ctlmni; > > size_t shm_ctlmax; > size_t shm_ctlall; > int shm_ctlmni; > int shm_tot; >}; > >extern struct ipc_namespace init_ipc_ns; > > >#define INIT_IPC_NS(ns) .ns = &init_ipc_ns, ># 104 "include/linux/ipc.h" >static inline __attribute__((always_inline)) int copy_ipcs(unsigned long flags, struct task_struct *tsk) >{ > return 0; >} > > >static inline __attribute__((always_inline)) struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) >{ > > > > > return ns; >} > >static inline __attribute__((always_inline)) void put_ipc_ns(struct ipc_namespace *ns) >{ > > > >} ># 5 "include/linux/sem.h" 2 > > >#define SEM_UNDO 0x1000 > > >#define GETPID 11 >#define GETVAL 12 >#define GETALL 13 >#define GETNCNT 14 >#define GETZCNT 15 >#define SETVAL 16 >#define SETALL 17 > > >#define SEM_STAT 18 >#define SEM_INFO 19 > > >struct semid_ds { > struct ipc_perm sem_perm; > __kernel_time_t sem_otime; > __kernel_time_t sem_ctime; > struct sem *sem_base; > struct sem_queue *sem_pending; > struct sem_queue **sem_pending_last; > struct sem_undo *undo; > unsigned short sem_nsems; >}; > > ># 1 "include/asm/sembuf.h" 1 > >#define __UM_SEMBUF_H > ># 1 "include/asm/arch/sembuf.h" 1 > >#define _I386_SEMBUF_H ># 14 "include/asm/arch/sembuf.h" >struct semid64_ds { > struct ipc64_perm sem_perm; > __kernel_time_t sem_otime; > unsigned long __unused1; > __kernel_time_t sem_ctime; > unsigned long __unused2; > unsigned long sem_nsems; > unsigned long __unused3; > unsigned long __unused4; >}; ># 5 "include/asm/sembuf.h" 2 ># 36 "include/linux/sem.h" 2 > > >struct sembuf { > unsigned short sem_num; > short sem_op; > short sem_flg; >}; > > >union semun { > int val; > struct semid_ds *buf; > unsigned short *array; > struct seminfo *__buf; > void *__pad; >}; > >struct seminfo { > int semmap; > int semmni; > int semmns; > int semmnu; > int semmsl; > int semopm; > int semume; > int semusz; > int semvmx; > int semaem; >}; > >#define SEMMNI 128 >#define SEMMSL 250 >#define SEMMNS (SEMMNI*SEMMSL) >#define SEMOPM 32 >#define SEMVMX 32767 >#define SEMAEM SEMVMX > > >#define SEMUME SEMOPM >#define SEMMNU SEMMNS >#define SEMMAP SEMMNS >#define SEMUSZ 20 > > > > >struct task_struct; > > >struct sem { > int semval; > int sempid; >}; > > >struct sem_array { > struct kern_ipc_perm sem_perm; > int sem_id; > time_t sem_otime; > time_t sem_ctime; > struct sem *sem_base; > struct sem_queue *sem_pending; > struct sem_queue **sem_pending_last; > struct sem_undo *undo; > unsigned long sem_nsems; >}; > > >struct sem_queue { > struct sem_queue * next; > struct sem_queue ** prev; > struct task_struct* sleeper; > struct sem_undo * undo; > int pid; > int status; > struct sem_array * sma; > int id; > struct sembuf * sops; > int nsops; > int alter; >}; > > > > >struct sem_undo { > struct sem_undo * proc_next; > struct sem_undo * id_next; > int semid; > short * semadj; >}; > > > > >struct sem_undo_list { > atomic_t refcnt; > spinlock_t lock; > struct sem_undo *proc_list; >}; > >struct sysv_sem { > struct sem_undo_list *undo_list; >}; > > > >extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); >extern void exit_sem(struct task_struct *tsk); ># 67 "include/linux/sched.h" 2 ># 1 "include/linux/signal.h" 1 > >#define _LINUX_SIGNAL_H > ># 1 "include/asm/signal.h" 1 > > > > > > >#define __UM_SIGNAL_H > > > >#define do_signal do_signal_renamed ># 1 "include/asm/arch/signal.h" 1 > >#define _ASMi386_SIGNAL_H > > > > > > >struct siginfo; ># 18 "include/asm/arch/signal.h" >#define _NSIG 64 >#define _NSIG_BPW 32 >#define _NSIG_WORDS (_NSIG / _NSIG_BPW) > >typedef unsigned long old_sigset_t; > >typedef struct { > unsigned long sig[(64 / 32)]; >} sigset_t; ># 36 "include/asm/arch/signal.h" >#define SIGHUP 1 >#define SIGINT 2 >#define SIGQUIT 3 >#define SIGILL 4 >#define SIGTRAP 5 >#define SIGABRT 6 >#define SIGIOT 6 >#define SIGBUS 7 >#define SIGFPE 8 >#define SIGKILL 9 >#define SIGUSR1 10 >#define SIGSEGV 11 >#define SIGUSR2 12 >#define SIGPIPE 13 >#define SIGALRM 14 >#define SIGTERM 15 >#define SIGSTKFLT 16 >#define SIGCHLD 17 >#define SIGCONT 18 >#define SIGSTOP 19 >#define SIGTSTP 20 >#define SIGTTIN 21 >#define SIGTTOU 22 >#define SIGURG 23 >#define SIGXCPU 24 >#define SIGXFSZ 25 >#define SIGVTALRM 26 >#define SIGPROF 27 >#define SIGWINCH 28 >#define SIGIO 29 >#define SIGPOLL SIGIO > > > >#define SIGPWR 30 >#define SIGSYS 31 >#define SIGUNUSED 31 > > >#define SIGRTMIN 32 >#define SIGRTMAX _NSIG ># 91 "include/asm/arch/signal.h" >#define SA_NOCLDSTOP 0x00000001u >#define SA_NOCLDWAIT 0x00000002u >#define SA_SIGINFO 0x00000004u >#define SA_ONSTACK 0x08000000u >#define SA_RESTART 0x10000000u >#define SA_NODEFER 0x40000000u >#define SA_RESETHAND 0x80000000u > >#define SA_NOMASK SA_NODEFER >#define SA_ONESHOT SA_RESETHAND > >#define SA_RESTORER 0x04000000 > > > > >#define SS_ONSTACK 1 >#define SS_DISABLE 2 > >#define MINSIGSTKSZ 2048 >#define SIGSTKSZ 8192 > ># 1 "include/asm-generic/signal.h" 1 > >#define __ASM_GENERIC_SIGNAL_H > > > > >#define SIG_BLOCK 0 > > >#define SIG_UNBLOCK 1 > > >#define SIG_SETMASK 2 > > > >typedef void __signalfn_t(int); >typedef __signalfn_t *__sighandler_t; > >typedef void __restorefn_t(void); >typedef __restorefn_t *__sigrestore_t; > >#define SIG_DFL ((__force __sighandler_t)0) >#define SIG_IGN ((__force __sighandler_t)1) >#define SIG_ERR ((__force __sighandler_t)-1) ># 114 "include/asm/arch/signal.h" 2 > > >struct old_sigaction { > __sighandler_t sa_handler; > old_sigset_t sa_mask; > unsigned long sa_flags; > __sigrestore_t sa_restorer; >}; > >struct sigaction { > __sighandler_t sa_handler; > unsigned long sa_flags; > __sigrestore_t sa_restorer; > sigset_t sa_mask; >}; > >struct k_sigaction { > struct sigaction sa; >}; ># 151 "include/asm/arch/signal.h" >typedef struct sigaltstack { > void *ss_sp; > int ss_flags; > size_t ss_size; >} stack_t; > > ># 1 "include/asm/sigcontext.h" 1 > >#define __UM_SIGCONTEXT_I386_H > ># 1 "include/asm/sigcontext-generic.h" 1 > >#define __UM_SIGCONTEXT_GENERIC_H > ># 1 "include/asm/arch/sigcontext.h" 1 > >#define _ASMi386_SIGCONTEXT_H ># 20 "include/asm/arch/sigcontext.h" >struct _fpreg { > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg { > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg { > unsigned long element[4]; >}; > >struct _fpstate { > > unsigned long cw; > unsigned long sw; > unsigned long tag; > unsigned long ipoff; > unsigned long cssel; > unsigned long dataoff; > unsigned long datasel; > struct _fpreg _st[8]; > unsigned short status; > unsigned short magic; > > > unsigned long _fxsr_env[6]; > unsigned long mxcsr; > unsigned long reserved; > struct _fpxreg _fxsr_st[8]; > struct _xmmreg _xmm[8]; > unsigned long padding[56]; >}; > >#define X86_FXSR_MAGIC 0x0000 > >struct sigcontext { > unsigned short gs, __gsh; > unsigned short fs, __fsh; > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned long edi; > unsigned long esi; > unsigned long ebp; > unsigned long esp; > unsigned long ebx; > unsigned long edx; > unsigned long ecx; > unsigned long eax; > unsigned long trapno; > unsigned long err; > unsigned long eip; > unsigned short cs, __csh; > unsigned long eflags; > unsigned long esp_at_signal; > unsigned short ss, __ssh; > struct _fpstate * fpstate; > unsigned long oldmask; > unsigned long cr2; >}; ># 5 "include/asm/sigcontext-generic.h" 2 ># 5 "include/asm/sigcontext.h" 2 ># 159 "include/asm/arch/signal.h" 2 > >#define __HAVE_ARCH_SIG_BITOPS > >#define sigaddset(set,sig) (__builtin_constant_p(sig) ? __const_sigaddset((set),(sig)) : __gen_sigaddset((set),(sig))) > > > > >static __inline__ __attribute__((always_inline)) void __gen_sigaddset(sigset_t *set, int _sig) >{ > __asm__("btsl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); >} > >static __inline__ __attribute__((always_inline)) void __const_sigaddset(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > set->sig[sig / 32] |= 1 << (sig % 32); >} > >#define sigdelset(set,sig) (__builtin_constant_p(sig) ? __const_sigdelset((set),(sig)) : __gen_sigdelset((set),(sig))) > > > > > >static __inline__ __attribute__((always_inline)) void __gen_sigdelset(sigset_t *set, int _sig) >{ > __asm__("btrl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); >} > >static __inline__ __attribute__((always_inline)) void __const_sigdelset(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > set->sig[sig / 32] &= ~(1 << (sig % 32)); >} > >static __inline__ __attribute__((always_inline)) int __const_sigismember(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > return 1 & (set->sig[sig / 32] >> (sig % 32)); >} > >static __inline__ __attribute__((always_inline)) int __gen_sigismember(sigset_t *set, int _sig) >{ > int ret; > __asm__("btl %2,%1\n\tsbbl %0,%0" > : "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc"); > return ret; >} > >#define sigismember(set,sig) (__builtin_constant_p(sig) ? __const_sigismember((set),(sig)) : __gen_sigismember((set),(sig))) > > > > >static __inline__ __attribute__((always_inline)) int sigfindinword(unsigned long word) >{ > __asm__("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc"); > return word; >} > >struct pt_regs; > >#define ptrace_signal_deliver(regs,cookie) do { if (current->ptrace & PT_DTRACE) { current->ptrace &= ~PT_DTRACE; (regs)->eflags &= ~TF_MASK; } } while (0) ># 13 "include/asm/signal.h" 2 >#undef do_signal >#undef ptrace_signal_deliver > >#define ptrace_signal_deliver(regs,cookie) do {} while(0) ># 5 "include/linux/signal.h" 2 ># 1 "include/asm/siginfo.h" 1 > >#define __UM_SIGINFO_H > ># 1 "include/asm/arch/siginfo.h" 1 > >#define _I386_SIGINFO_H > ># 1 "include/asm-generic/siginfo.h" 1 > >#define _ASM_GENERIC_SIGINFO_H > > > > >typedef union sigval { > int sival_int; > void *sival_ptr; >} sigval_t; > > > > > > >#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) > > >#define SI_MAX_SIZE 128 > >#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) > > > >#define __ARCH_SI_UID_T uid_t ># 35 "include/asm-generic/siginfo.h" >#define __ARCH_SI_BAND_T long > > > > >typedef struct siginfo { > int si_signo; > int si_errno; > int si_code; > > union { > int _pad[((128 - (3 * sizeof(int))) / sizeof(int))]; > > > struct { > pid_t _pid; > uid_t _uid; > } _kill; > > > struct { > timer_t _tid; > int _overrun; > char _pad[sizeof( uid_t) - sizeof(int)]; > sigval_t _sigval; > int _sys_private; > } _timer; > > > struct { > pid_t _pid; > uid_t _uid; > sigval_t _sigval; > } _rt; > > > struct { > pid_t _pid; > uid_t _uid; > int _status; > clock_t _utime; > clock_t _stime; > } _sigchld; > > > struct { > void *_addr; > > > > } _sigfault; > > > struct { > long _band; > int _fd; > } _sigpoll; > } _sifields; >} siginfo_t; > > > > > > >#define si_pid _sifields._kill._pid >#define si_uid _sifields._kill._uid >#define si_tid _sifields._timer._tid >#define si_overrun _sifields._timer._overrun >#define si_sys_private _sifields._timer._sys_private >#define si_status _sifields._sigchld._status >#define si_utime _sifields._sigchld._utime >#define si_stime _sifields._sigchld._stime >#define si_value _sifields._rt._sigval >#define si_int _sifields._rt._sigval.sival_int >#define si_ptr _sifields._rt._sigval.sival_ptr >#define si_addr _sifields._sigfault._addr > > > >#define si_band _sifields._sigpoll._band >#define si_fd _sifields._sigpoll._fd > > >#define __SI_MASK 0xffff0000u >#define __SI_KILL (0 << 16) >#define __SI_TIMER (1 << 16) >#define __SI_POLL (2 << 16) >#define __SI_FAULT (3 << 16) >#define __SI_CHLD (4 << 16) >#define __SI_RT (5 << 16) >#define __SI_MESGQ (6 << 16) >#define __SI_CODE(T,N) ((T) | ((N) & 0xffff)) ># 143 "include/asm-generic/siginfo.h" >#define SI_USER 0 >#define SI_KERNEL 0x80 >#define SI_QUEUE -1 >#define SI_TIMER __SI_CODE(__SI_TIMER,-2) >#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) >#define SI_ASYNCIO -4 >#define SI_SIGIO -5 >#define SI_TKILL -6 >#define SI_DETHREAD -7 > >#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) >#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) > > > > >#define ILL_ILLOPC (__SI_FAULT|1) >#define ILL_ILLOPN (__SI_FAULT|2) >#define ILL_ILLADR (__SI_FAULT|3) >#define ILL_ILLTRP (__SI_FAULT|4) >#define ILL_PRVOPC (__SI_FAULT|5) >#define ILL_PRVREG (__SI_FAULT|6) >#define ILL_COPROC (__SI_FAULT|7) >#define ILL_BADSTK (__SI_FAULT|8) >#define NSIGILL 8 > > > > >#define FPE_INTDIV (__SI_FAULT|1) >#define FPE_INTOVF (__SI_FAULT|2) >#define FPE_FLTDIV (__SI_FAULT|3) >#define FPE_FLTOVF (__SI_FAULT|4) >#define FPE_FLTUND (__SI_FAULT|5) >#define FPE_FLTRES (__SI_FAULT|6) >#define FPE_FLTINV (__SI_FAULT|7) >#define FPE_FLTSUB (__SI_FAULT|8) >#define NSIGFPE 8 > > > > >#define SEGV_MAPERR (__SI_FAULT|1) >#define SEGV_ACCERR (__SI_FAULT|2) >#define NSIGSEGV 2 > > > > >#define BUS_ADRALN (__SI_FAULT|1) >#define BUS_ADRERR (__SI_FAULT|2) >#define BUS_OBJERR (__SI_FAULT|3) >#define NSIGBUS 3 > > > > >#define TRAP_BRKPT (__SI_FAULT|1) >#define TRAP_TRACE (__SI_FAULT|2) >#define NSIGTRAP 2 > > > > >#define CLD_EXITED (__SI_CHLD|1) >#define CLD_KILLED (__SI_CHLD|2) >#define CLD_DUMPED (__SI_CHLD|3) >#define CLD_TRAPPED (__SI_CHLD|4) >#define CLD_STOPPED (__SI_CHLD|5) >#define CLD_CONTINUED (__SI_CHLD|6) >#define NSIGCHLD 6 > > > > >#define POLL_IN (__SI_POLL|1) >#define POLL_OUT (__SI_POLL|2) >#define POLL_MSG (__SI_POLL|3) >#define POLL_ERR (__SI_POLL|4) >#define POLL_PRI (__SI_POLL|5) >#define POLL_HUP (__SI_POLL|6) >#define NSIGPOLL 6 ># 234 "include/asm-generic/siginfo.h" >#define SIGEV_SIGNAL 0 >#define SIGEV_NONE 1 >#define SIGEV_THREAD 2 >#define SIGEV_THREAD_ID 4 > > > > > > >#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) > > >#define SIGEV_MAX_SIZE 64 >#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) > > >typedef struct sigevent { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > union { > int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))]; > int _tid; > > struct { > void (*_function)(sigval_t); > void *_attribute; > } _sigev_thread; > } _sigev_un; >} sigevent_t; > >#define sigev_notify_function _sigev_un._sigev_thread._function >#define sigev_notify_attributes _sigev_un._sigev_thread._attribute >#define sigev_notify_thread_id _sigev_un._tid > > > >struct siginfo; >void do_schedule_next_timer(struct siginfo *info); > > > > > >static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from) >{ > if (from->si_code < 0) > (__builtin_constant_p(sizeof(*to)) ? __constant_memcpy((to),(from),(sizeof(*to))) : __memcpy((to),(from),(sizeof(*to)))); > else > > (__builtin_constant_p((3 * sizeof(int)) + sizeof(from->_sifields._sigchld)) ? __constant_memcpy((to),(from),((3 * sizeof(int)) + sizeof(from->_sifields._sigchld))) : __memcpy((to),(from),((3 * sizeof(int)) + sizeof(from->_sifields._sigchld)))); >} > > > >extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from); ># 5 "include/asm/arch/siginfo.h" 2 ># 5 "include/asm/siginfo.h" 2 ># 6 "include/linux/signal.h" 2 ># 15 "include/linux/signal.h" >struct sigqueue { > struct list_head list; > int flags; > siginfo_t info; > struct user_struct *user; >}; > > >#define SIGQUEUE_PREALLOC 1 > >struct sigpending { > struct list_head list; > sigset_t signal; >}; ># 73 "include/linux/signal.h" >static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set) >{ > extern void _NSIG_WORDS_is_unsupported_size(void); > switch ((64 / 32)) { > case 4: > return (set->sig[3] | set->sig[2] | > set->sig[1] | set->sig[0]) == 0; > case 2: > return (set->sig[1] | set->sig[0]) == 0; > case 1: > return set->sig[0] == 0; > default: > _NSIG_WORDS_is_unsupported_size(); > return 0; > } >} > >#define sigmask(sig) (1UL << ((sig) - 1)) > > > > >#define _SIG_SET_BINOP(name,op) static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch (_NSIG_WORDS) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = op(a3, b3); r->sig[2] = op(a2, b2); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = op(a1, b1); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = op(a0, b0); break; default: _NSIG_WORDS_is_unsupported_size(); } } ># 119 "include/linux/signal.h" >#define _sig_or(x,y) ((x) | (y)) >static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } > >#define _sig_and(x,y) ((x) & (y)) >static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } > >#define _sig_nand(x,y) ((x) & ~(y)) >static inline __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } > >#undef _SIG_SET_BINOP >#undef _sig_or >#undef _sig_and >#undef _sig_nand > >#define _SIG_SET_OP(name,op) static inline void name(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch (_NSIG_WORDS) { case 4: set->sig[3] = op(set->sig[3]); set->sig[2] = op(set->sig[2]); case 2: set->sig[1] = op(set->sig[1]); case 1: set->sig[0] = op(set->sig[0]); break; default: _NSIG_WORDS_is_unsupported_size(); } } ># 149 "include/linux/signal.h" >#define _sig_not(x) (~(x)) >static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } } > >#undef _SIG_SET_OP >#undef _sig_not > >static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set) >{ > switch ((64 / 32)) { > default: > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(sigset_t))) ? __constant_c_and_count_memset(((set)),((0x01010101UL*(unsigned char)(0))),((sizeof(sigset_t)))) : __constant_c_memset(((set)),((0x01010101UL*(unsigned char)(0))),((sizeof(sigset_t))))) : (__builtin_constant_p((sizeof(sigset_t))) ? __memset_generic((((set))),(((0))),(((sizeof(sigset_t))))) : __memset_generic(((set)),((0)),((sizeof(sigset_t)))))); > break; > case 2: set->sig[1] = 0; > case 1: set->sig[0] = 0; > break; > } >} > >static inline __attribute__((always_inline)) void sigfillset(sigset_t *set) >{ > switch ((64 / 32)) { > default: > (__builtin_constant_p(-1) ? (__builtin_constant_p((sizeof(sigset_t))) ? __constant_c_and_count_memset(((set)),((0x01010101UL*(unsigned char)(-1))),((sizeof(sigset_t)))) : __constant_c_memset(((set)),((0x01010101UL*(unsigned char)(-1))),((sizeof(sigset_t))))) : (__builtin_constant_p((sizeof(sigset_t))) ? __memset_generic((((set))),(((-1))),(((sizeof(sigset_t))))) : __memset_generic(((set)),((-1)),((sizeof(sigset_t)))))); > break; > case 2: set->sig[1] = -1; > case 1: set->sig[0] = -1; > break; > } >} > > > >static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask) >{ > set->sig[0] |= mask; >} > >static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask) >{ > set->sig[0] &= ~mask; >} > >static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask) >{ > return (set->sig[0] & mask) != 0; >} > >static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask) >{ > set->sig[0] = mask; > switch ((64 / 32)) { > default: > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __constant_c_and_count_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(0))),((sizeof(long)*((64 / 32)-1)))) : __constant_c_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(0))),((sizeof(long)*((64 / 32)-1))))) : (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __memset_generic((((&set->sig[1]))),(((0))),(((sizeof(long)*((64 / 32)-1))))) : __memset_generic(((&set->sig[1])),((0)),((sizeof(long)*((64 / 32)-1)))))); > break; > case 2: set->sig[1] = 0; > case 1: ; > } >} > >static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask) >{ > set->sig[0] = ~mask; > switch ((64 / 32)) { > default: > (__builtin_constant_p(-1) ? (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __constant_c_and_count_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(-1))),((sizeof(long)*((64 / 32)-1)))) : __constant_c_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(-1))),((sizeof(long)*((64 / 32)-1))))) : (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __memset_generic((((&set->sig[1]))),(((-1))),(((sizeof(long)*((64 / 32)-1))))) : __memset_generic(((&set->sig[1])),((-1)),((sizeof(long)*((64 / 32)-1)))))); > break; > case 2: set->sig[1] = -1; > case 1: ; > } >} > > > >static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig) >{ > sigemptyset(&sig->signal); > INIT_LIST_HEAD(&sig->list); >} > >extern void flush_sigqueue(struct sigpending *queue); > > >static inline __attribute__((always_inline)) int valid_signal(unsigned long sig) >{ > return sig <= 64 ? 1 : 0; >} > >extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); >extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); >extern long do_sigpending(void *, unsigned long); >extern int kernel_sigprocmask(int, sigset_t *, sigset_t *); > >struct pt_regs; >extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); > >extern struct kmem_cache *sighand_cachep; ># 68 "include/linux/sched.h" 2 ># 1 "include/linux/securebits.h" 1 > >#define _LINUX_SECUREBITS_H 1 > >#define SECUREBITS_DEFAULT 0x00000000 > >extern unsigned securebits; > > > > > > > >#define SECURE_NOROOT 0 > > > > >#define SECURE_NO_SETUID_FIXUP 2 > > > > > > >#define issecure(X) ( (1 << (X+1)) & SECUREBITS_DEFAULT ? (1 << (X)) & SECUREBITS_DEFAULT : (1 << (X)) & securebits ) ># 69 "include/linux/sched.h" 2 ># 1 "include/linux/fs_struct.h" 1 > >#define _LINUX_FS_STRUCT_H > >struct dentry; >struct vfsmount; > >struct fs_struct { > atomic_t count; > rwlock_t lock; > int umask; > struct dentry * root, * pwd, * altroot; > struct vfsmount * rootmnt, * pwdmnt, * altrootmnt; >}; > >#define INIT_FS { .count = ATOMIC_INIT(1), .lock = RW_LOCK_UNLOCKED, .umask = 0022, } > > > > > >extern struct kmem_cache *fs_cachep; > >extern void exit_fs(struct task_struct *); >extern void set_fs_altroot(void); >extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *); >extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *); >extern struct fs_struct *copy_fs_struct(struct fs_struct *); >extern void put_fs_struct(struct fs_struct *); ># 70 "include/linux/sched.h" 2 > ># 1 "include/linux/completion.h" 1 > >#define __LINUX_COMPLETION_H ># 13 "include/linux/completion.h" >struct completion { > unsigned int done; > wait_queue_head_t wait; >}; > >#define COMPLETION_INITIALIZER(work) { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } > > >#define COMPLETION_INITIALIZER_ONSTACK(work) ({ init_completion(&work); work; }) > > >#define DECLARE_COMPLETION(work) struct completion work = COMPLETION_INITIALIZER(work) ># 36 "include/linux/completion.h" >#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) > > >static inline __attribute__((always_inline)) void init_completion(struct completion *x) >{ > x->done = 0; > init_waitqueue_head(&x->wait); >} > >extern void wait_for_completion(struct completion *) __attribute__((regparm(3))); >extern int wait_for_completion_interruptible(struct completion *x) __attribute__((regparm(3))); >extern unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout) __attribute__((regparm(3))); > >extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout) __attribute__((regparm(3))); > > >extern void complete(struct completion *) __attribute__((regparm(3))); >extern void complete_all(struct completion *) __attribute__((regparm(3))); > >#define INIT_COMPLETION(x) ((x).done = 0) ># 72 "include/linux/sched.h" 2 ># 1 "include/linux/pid.h" 1 > >#define _LINUX_PID_H > ># 1 "include/linux/rcupdate.h" 1 ># 34 "include/linux/rcupdate.h" >#define __LINUX_RCUPDATE_H > > > ># 1 "include/linux/cache.h" 1 > >#define __LINUX_CACHE_H > > > > > >#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) > > > >#define SMP_CACHE_BYTES L1_CACHE_BYTES > > > >#define __read_mostly > > > >#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) > > > > > > >#define ____cacheline_aligned_in_smp > > > > >#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES), __section__(".data.cacheline_aligned"))) ># 41 "include/linux/cache.h" >#define __cacheline_aligned_in_smp ># 51 "include/linux/cache.h" >#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT > > > > > > > >#define ____cacheline_internodealigned_in_smp ># 39 "include/linux/rcupdate.h" 2 > > ># 1 "include/linux/percpu.h" 1 > >#define __LINUX_PERCPU_H > > ># 1 "include/linux/slab.h" 1 ># 10 "include/linux/slab.h" >#define _LINUX_SLAB_H > > > ># 1 "include/linux/gfp.h" 1 > >#define __LINUX_GFP_H > ># 1 "include/linux/mmzone.h" 1 > >#define _LINUX_MMZONE_H ># 13 "include/linux/mmzone.h" ># 1 "include/linux/init.h" 1 > >#define _LINUX_INIT_H ># 43 "include/linux/init.h" >#define __init __attribute__ ((__section__ (".init.text"))) >#define __initdata __attribute__ ((__section__ (".init.data"))) >#define __exitdata __attribute__ ((__section__(".exit.data"))) >#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) > > > > >#define __exit __attribute_used__ __attribute__ ((__section__(".exit.text"))) > > > >#define __INIT .section ".init.text","ax" >#define __FINIT .previous >#define __INITDATA .section ".init.data","aw" > > > > > >typedef int (*initcall_t)(void); >typedef void (*exitcall_t)(void); > >extern initcall_t __con_initcall_start[], __con_initcall_end[]; >extern initcall_t __security_initcall_start[], __security_initcall_end[]; > > >extern char saved_command_line[]; >extern unsigned int reset_devices; > > >extern void setup_arch(char **); ># 92 "include/linux/init.h" >#define __define_initcall(level,fn,id) static initcall_t __initcall_ ##fn ##id __attribute_used__ __attribute__((__section__(".initcall" level ".init"))) = fn ># 102 "include/linux/init.h" >#define pure_initcall(fn) __define_initcall("0",fn,1) > >#define core_initcall(fn) __define_initcall("1",fn,1) >#define core_initcall_sync(fn) __define_initcall("1s",fn,1s) >#define postcore_initcall(fn) __define_initcall("2",fn,2) >#define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s) >#define arch_initcall(fn) __define_initcall("3",fn,3) >#define arch_initcall_sync(fn) __define_initcall("3s",fn,3s) >#define subsys_initcall(fn) __define_initcall("4",fn,4) >#define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s) >#define fs_initcall(fn) __define_initcall("5",fn,5) >#define fs_initcall_sync(fn) __define_initcall("5s",fn,5s) >#define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs) >#define device_initcall(fn) __define_initcall("6",fn,6) >#define device_initcall_sync(fn) __define_initcall("6s",fn,6s) >#define late_initcall(fn) __define_initcall("7",fn,7) >#define late_initcall_sync(fn) __define_initcall("7s",fn,7s) > >#define __initcall(fn) device_initcall(fn) > >#define __exitcall(fn) static exitcall_t __exitcall_ ##fn __exit_call = fn > > >#define console_initcall(fn) static initcall_t __initcall_ ##fn __attribute_used__ __attribute__((__section__(".con_initcall.init")))=fn > > > >#define security_initcall(fn) static initcall_t __initcall_ ##fn __attribute_used__ __attribute__((__section__(".security_initcall.init"))) = fn > > > >struct obs_kernel_param { > const char *str; > int (*setup_func)(char *); > int early; >}; > > > > > > > >#define __setup_param(str,unique_id,fn,early) static char __setup_str_ ##unique_id[] __initdata = str; static struct obs_kernel_param __setup_ ##unique_id __attribute_used__ __attribute__((__section__(".init.setup"))) __attribute__((aligned((sizeof(long))))) = { __setup_str_ ##unique_id, fn, early } > > > > > > > >#define __setup_null_param(str,unique_id) __setup_param(str, unique_id, NULL, 0) > > >#define __setup(str,fn) __setup_param(str, fn, fn, 0) > > >#define __obsolete_setup(str) __setup_null_param(str, __LINE__) > > > > >#define early_param(str,fn) __setup_param(str, fn, fn, 1) > > > >void __attribute__ ((__section__ (".init.text"))) parse_early_param(void); ># 179 "include/linux/init.h" >#define module_init(x) __initcall(x); ># 191 "include/linux/init.h" >#define module_exit(x) __exitcall(x); ># 231 "include/linux/init.h" >#define __nosavedata __attribute__ ((__section__ (".data.nosave"))) > > > > >#define __init_or_module >#define __initdata_or_module > > > > > > >#define __devinit >#define __devinitdata >#define __devexit >#define __devexitdata ># 261 "include/linux/init.h" >#define __cpuinit __init >#define __cpuinitdata __initdata >#define __cpuexit __exit >#define __cpuexitdata __exitdata ># 274 "include/linux/init.h" >#define __meminit __init >#define __meminitdata __initdata >#define __memexit __exit >#define __memexitdata __exitdata ># 287 "include/linux/init.h" >#define __devexit_p(x) x > > > > > > > >#define __exit_p(x) NULL ># 14 "include/linux/mmzone.h" 2 > > > > > > > >#define MAX_ORDER 11 > > > >#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1)) > >struct free_area { > struct list_head free_list; > unsigned long nr_free; >}; > >struct pglist_data; ># 46 "include/linux/mmzone.h" >#define ZONE_PADDING(name) > > >enum zone_stat_item { > NR_ANON_PAGES, > NR_FILE_MAPPED, > > NR_FILE_PAGES, > NR_SLAB_RECLAIMABLE, > NR_SLAB_UNRECLAIMABLE, > NR_PAGETABLE, > NR_FILE_DIRTY, > NR_WRITEBACK, > NR_UNSTABLE_NFS, > NR_BOUNCE, > NR_VMSCAN_WRITE, ># 70 "include/linux/mmzone.h" > NR_VM_ZONE_STAT_ITEMS }; > >struct per_cpu_pages { > int count; > int high; > int batch; > struct list_head list; >}; > >struct per_cpu_pageset { > struct per_cpu_pages pcp[2]; > > > > >} ; > > > > >#define zone_pcp(__z,__cpu) (&(__z)->pageset[(__cpu)]) > > >enum zone_type { ># 113 "include/linux/mmzone.h" > ZONE_DMA, ># 127 "include/linux/mmzone.h" > ZONE_NORMAL, ># 139 "include/linux/mmzone.h" > MAX_NR_ZONES >}; ># 151 "include/linux/mmzone.h" >#define ZONES_SHIFT 1 > > > > >struct zone { > > unsigned long free_pages; > unsigned long pages_min, pages_low, pages_high; ># 168 "include/linux/mmzone.h" > unsigned long lowmem_reserve[MAX_NR_ZONES]; ># 179 "include/linux/mmzone.h" > struct per_cpu_pageset pageset[1]; > > > > > spinlock_t lock; > > > > > struct free_area free_area[11]; > > > > > > spinlock_t lru_lock; > struct list_head active_list; > struct list_head inactive_list; > unsigned long nr_scan_active; > unsigned long nr_scan_inactive; > unsigned long nr_active; > unsigned long nr_inactive; > unsigned long pages_scanned; > int all_unreclaimable; > > > atomic_t reclaim_in_progress; > > > atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; ># 224 "include/linux/mmzone.h" > int prev_priority; > > > ># 254 "include/linux/mmzone.h" > wait_queue_head_t * wait_table; > unsigned long wait_table_hash_nr_entries; > unsigned long wait_table_bits; > > > > > struct pglist_data *zone_pgdat; > > unsigned long zone_start_pfn; ># 275 "include/linux/mmzone.h" > unsigned long spanned_pages; > unsigned long present_pages; > > > > > const char *name; >} ; > > > > > > >#define DEF_PRIORITY 12 > > >#define MAX_ZONES_PER_ZONELIST (MAX_NUMNODES * MAX_NR_ZONES) ># 360 "include/linux/mmzone.h" >struct zonelist_cache; ># 373 "include/linux/mmzone.h" >struct zonelist { > struct zonelist_cache *zlcache_ptr; > struct zone *zones[((1 << 0) * MAX_NR_ZONES) + 1]; > > > >}; ># 391 "include/linux/mmzone.h" >extern struct page *mem_map; ># 405 "include/linux/mmzone.h" >struct bootmem_data; >typedef struct pglist_data { > struct zone node_zones[MAX_NR_ZONES]; > struct zonelist node_zonelists[MAX_NR_ZONES]; > int nr_zones; > > struct page *node_mem_map; > > struct bootmem_data *bdata; ># 424 "include/linux/mmzone.h" > unsigned long node_start_pfn; > unsigned long node_present_pages; > unsigned long node_spanned_pages; > > int node_id; > wait_queue_head_t kswapd_wait; > struct task_struct *kswapd; > int kswapd_max_order; >} pg_data_t; > >#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) >#define node_spanned_pages(nid) (NODE_DATA(nid)->node_spanned_pages) > >#define pgdat_page_nr(pgdat,pagenr) ((pgdat)->node_mem_map + (pagenr)) > > > >#define nid_page_nr(nid,pagenr) pgdat_page_nr(NODE_DATA(nid),(pagenr)) > ># 1 "include/linux/memory_hotplug.h" 1 > >#define __LINUX_MEMORY_HOTPLUG_H > ># 1 "include/linux/mmzone.h" 1 ># 5 "include/linux/memory_hotplug.h" 2 > > ># 1 "include/linux/notifier.h" 1 ># 11 "include/linux/notifier.h" >#define _LINUX_NOTIFIER_H > ># 1 "include/linux/mutex.h" 1 ># 11 "include/linux/mutex.h" >#define __LINUX_MUTEX_H ># 47 "include/linux/mutex.h" >struct mutex { > > atomic_t count; > spinlock_t wait_lock; > struct list_head wait_list; > > struct thread_info *owner; > const char *name; > void *magic; > > > > >}; > > > > > >struct mutex_waiter { > struct list_head list; > struct task_struct *task; > > struct mutex *lock; > void *magic; > >}; > > ># 1 "include/linux/mutex-debug.h" 1 > >#define __LINUX_MUTEX_DEBUG_H ># 11 "include/linux/mutex-debug.h" >#define __DEBUG_MUTEX_INITIALIZER(lockname) , .magic = &lockname > > >#define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0) > > > > > > >extern void mutex_destroy(struct mutex *lock) __attribute__((regparm(3))); ># 77 "include/linux/mutex.h" 2 ># 92 "include/linux/mutex.h" >#define __DEP_MAP_MUTEX_INITIALIZER(lockname) > > >#define __MUTEX_INITIALIZER(lockname) { .count = ATOMIC_INIT(1) , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) , .wait_list = LIST_HEAD_INIT(lockname.wait_list) __DEBUG_MUTEX_INITIALIZER(lockname) __DEP_MAP_MUTEX_INITIALIZER(lockname) } > > > > > > >#define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) > > >extern void __mutex_init(struct mutex *lock, const char *name, > struct lock_class_key *key); > > > > > > > >static inline __attribute__((always_inline)) int __attribute__((regparm(3))) mutex_is_locked(struct mutex *lock) >{ > return ((&lock->count)->counter) != 1; >} > > > > > >extern void __attribute__((regparm(3))) mutex_lock(struct mutex *lock); >extern int __attribute__((regparm(3))) mutex_lock_interruptible(struct mutex *lock); > > > > > >#define mutex_lock_nested(lock,subclass) mutex_lock(lock) >#define mutex_lock_interruptible_nested(lock,subclass) mutex_lock_interruptible(lock) > > > > > > >extern int __attribute__((regparm(3))) mutex_trylock(struct mutex *lock); >extern void __attribute__((regparm(3))) mutex_unlock(struct mutex *lock); ># 14 "include/linux/notifier.h" 2 > ># 1 "include/linux/srcu.h" 1 ># 28 "include/linux/srcu.h" >#define _LINUX_SRCU_H > >struct srcu_struct_array { > int c[2]; >}; > >struct srcu_struct { > int completed; > struct srcu_struct_array *per_cpu_ref; > struct mutex mutex; >}; > > >#define srcu_barrier() barrier() > > > > >int init_srcu_struct(struct srcu_struct *sp); >void cleanup_srcu_struct(struct srcu_struct *sp); >int srcu_read_lock(struct srcu_struct *sp) ; >void srcu_read_unlock(struct srcu_struct *sp, int idx) ; >void synchronize_srcu(struct srcu_struct *sp); >long srcu_batches_completed(struct srcu_struct *sp); ># 16 "include/linux/notifier.h" 2 ># 50 "include/linux/notifier.h" >struct notifier_block { > int (*notifier_call)(struct notifier_block *, unsigned long, void *); > struct notifier_block *next; > int priority; >}; > >struct atomic_notifier_head { > spinlock_t lock; > struct notifier_block *head; >}; > >struct blocking_notifier_head { > struct rw_semaphore rwsem; > struct notifier_block *head; >}; > >struct raw_notifier_head { > struct notifier_block *head; >}; > >struct srcu_notifier_head { > struct mutex mutex; > struct srcu_struct srcu; > struct notifier_block *head; >}; > >#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { spin_lock_init(&(name)->lock); (name)->head = NULL; } while (0) > > > >#define BLOCKING_INIT_NOTIFIER_HEAD(name) do { init_rwsem(&(name)->rwsem); (name)->head = NULL; } while (0) > > > >#define RAW_INIT_NOTIFIER_HEAD(name) do { (name)->head = NULL; } while (0) > > > > >extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); >#define srcu_cleanup_notifier_head(name) cleanup_srcu_struct(&(name)->srcu); > > >#define ATOMIC_NOTIFIER_INIT(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .head = NULL } > > >#define BLOCKING_NOTIFIER_INIT(name) { .rwsem = __RWSEM_INITIALIZER((name).rwsem), .head = NULL } > > >#define RAW_NOTIFIER_INIT(name) { .head = NULL } > > > >#define ATOMIC_NOTIFIER_HEAD(name) struct atomic_notifier_head name = ATOMIC_NOTIFIER_INIT(name) > > >#define BLOCKING_NOTIFIER_HEAD(name) struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name) > > >#define RAW_NOTIFIER_HEAD(name) struct raw_notifier_head name = RAW_NOTIFIER_INIT(name) > > > > > >extern int atomic_notifier_chain_register(struct atomic_notifier_head *, > struct notifier_block *); >extern int blocking_notifier_chain_register(struct blocking_notifier_head *, > struct notifier_block *); >extern int raw_notifier_chain_register(struct raw_notifier_head *, > struct notifier_block *); >extern int srcu_notifier_chain_register(struct srcu_notifier_head *, > struct notifier_block *); > >extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *, > struct notifier_block *); >extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *, > struct notifier_block *); >extern int raw_notifier_chain_unregister(struct raw_notifier_head *, > struct notifier_block *); >extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *, > struct notifier_block *); > >extern int atomic_notifier_call_chain(struct atomic_notifier_head *, > unsigned long val, void *v); >extern int blocking_notifier_call_chain(struct blocking_notifier_head *, > unsigned long val, void *v); >extern int raw_notifier_call_chain(struct raw_notifier_head *, > unsigned long val, void *v); >extern int srcu_notifier_call_chain(struct srcu_notifier_head *, > unsigned long val, void *v); > >#define NOTIFY_DONE 0x0000 >#define NOTIFY_OK 0x0001 >#define NOTIFY_STOP_MASK 0x8000 >#define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) > > > > >#define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK) ># 161 "include/linux/notifier.h" >#define NETDEV_UP 0x0001 >#define NETDEV_DOWN 0x0002 >#define NETDEV_REBOOT 0x0003 > > > >#define NETDEV_CHANGE 0x0004 >#define NETDEV_REGISTER 0x0005 >#define NETDEV_UNREGISTER 0x0006 >#define NETDEV_CHANGEMTU 0x0007 >#define NETDEV_CHANGEADDR 0x0008 >#define NETDEV_GOING_DOWN 0x0009 >#define NETDEV_CHANGENAME 0x000A >#define NETDEV_FEAT_CHANGE 0x000B > >#define SYS_DOWN 0x0001 >#define SYS_RESTART SYS_DOWN >#define SYS_HALT 0x0002 >#define SYS_POWER_OFF 0x0003 > >#define NETLINK_URELEASE 0x0001 > >#define CPU_ONLINE 0x0002 >#define CPU_UP_PREPARE 0x0003 >#define CPU_UP_CANCELED 0x0004 >#define CPU_DOWN_PREPARE 0x0005 >#define CPU_DOWN_FAILED 0x0006 >#define CPU_DEAD 0x0007 ># 8 "include/linux/memory_hotplug.h" 2 > >struct page; >struct zone; >struct pglist_data; ># 140 "include/linux/memory_hotplug.h" >static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {} >static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {} >static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {} > >static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone) >{ > return 0; >} >static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv) >{ > return 0; >} >static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {} >static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {} >static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {} > >static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func) >{ > printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func); > dump_stack(); > return -38; >} > > >static inline __attribute__((always_inline)) int __remove_pages(struct zone *zone, unsigned long start_pfn, > unsigned long nr_pages) >{ > printk("<4>" "%s() called, not yet supported\n", (__func__)); > dump_stack(); > return -38; >} > >extern int add_memory(int nid, u64 start, u64 size); >extern int arch_add_memory(int nid, u64 start, u64 size); >extern int remove_memory(u64 start, u64 size); >extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, > int nr_pages); ># 444 "include/linux/mmzone.h" 2 > >void __get_zone_counts(unsigned long *active, unsigned long *inactive, > unsigned long *free, struct pglist_data *pgdat); >void get_zone_counts(unsigned long *active, unsigned long *inactive, > unsigned long *free); >void build_all_zonelists(void); >void wakeup_kswapd(struct zone *zone, int order); >int zone_watermark_ok(struct zone *z, int order, unsigned long mark, > int classzone_idx, int alloc_flags); > >extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, > unsigned long size); > > > > >static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {} ># 470 "include/linux/mmzone.h" >#define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) > >static inline __attribute__((always_inline)) int populated_zone(struct zone *zone) >{ > return (!!zone->present_pages); >} > >static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx) >{ > > > > return 0; > >} > >static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx) >{ > return (idx == ZONE_NORMAL); >} > > > > > > > >static inline __attribute__((always_inline)) int is_highmem(struct zone *zone) >{ > > > > return 0; > >} > >static inline __attribute__((always_inline)) int is_normal(struct zone *zone) >{ > return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; >} > >static inline __attribute__((always_inline)) int is_dma32(struct zone *zone) >{ > > > > return 0; > >} > >static inline __attribute__((always_inline)) int is_dma(struct zone *zone) >{ > return zone == zone->zone_pgdat->node_zones + ZONE_DMA; >} > > >struct ctl_table; >struct file; >int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1]; >int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, > struct file *, void *, size_t *, loff_t *); >int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, > struct file *, void *, size_t *, loff_t *); > ># 1 "include/linux/topology.h" 1 ># 28 "include/linux/topology.h" >#define _LINUX_TOPOLOGY_H > > > > > ># 1 "include/asm/topology.h" 1 > >#define _ASM_UM_TOPOLOGY_H > ># 1 "include/asm-generic/topology.h" 1 ># 28 "include/asm-generic/topology.h" >#define _ASM_GENERIC_TOPOLOGY_H > > > > >#define cpu_to_node(cpu) (0) > > >#define parent_node(node) (0) > > >#define node_to_cpumask(node) (cpu_online_map) > > >#define node_to_first_cpu(node) (0) > > >#define pcibus_to_node(node) (-1) > > > >#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? CPU_MASK_ALL : node_to_cpumask(pcibus_to_node(bus)) ) ># 5 "include/asm/topology.h" 2 ># 35 "include/linux/topology.h" 2 > > >#define node_has_online_mem(nid) (1) > > > >#define nr_cpus_node(node) ({ cpumask_t __tmp__; __tmp__ = node_to_cpumask(node); cpus_weight(__tmp__); }) > > > > > > > >#define for_each_node_with_cpus(node) for_each_online_node(node) if (nr_cpus_node(node)) > > > > > >#define LOCAL_DISTANCE 10 >#define REMOTE_DISTANCE 20 >#define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) > > > > > > > >#define RECLAIM_DISTANCE 20 > > >#define PENALTY_FOR_NODE_WITH_CPUS (1) ># 152 "include/linux/topology.h" >#define SD_CPU_INIT (struct sched_domain) { .span = CPU_MASK_NONE, .parent = NULL, .child = NULL, .groups = NULL, .min_interval = 1, .max_interval = 4, .busy_factor = 64, .imbalance_pct = 125, .cache_nice_tries = 1, .per_cpu_gain = 100, .busy_idx = 2, .idle_idx = 1, .newidle_idx = 2, .wake_idx = 1, .forkexec_idx = 1, .flags = SD_LOAD_BALANCE | SD_BALANCE_NEWIDLE | SD_BALANCE_EXEC | SD_WAKE_AFFINE | BALANCE_FOR_PKG_POWER, .last_balance = jiffies, .balance_interval = 1, .nr_balance_failed = 0, } ># 180 "include/linux/topology.h" >#define SD_ALLNODES_INIT (struct sched_domain) { .span = CPU_MASK_NONE, .parent = NULL, .child = NULL, .groups = NULL, .min_interval = 64, .max_interval = 64*num_online_cpus(), .busy_factor = 128, .imbalance_pct = 133, .cache_hot_time = (10*1000000), .cache_nice_tries = 1, .busy_idx = 3, .idle_idx = 3, .newidle_idx = 0, .wake_idx = 0, .forkexec_idx = 0, .per_cpu_gain = 100, .flags = SD_LOAD_BALANCE | SD_SERIALIZE, .last_balance = jiffies, .balance_interval = 64, .nr_balance_failed = 0, } ># 541 "include/linux/mmzone.h" 2 > > >#define numa_node_id() (cpu_to_node(raw_smp_processor_id())) > > > > >extern struct pglist_data contig_page_data; >#define NODE_DATA(nid) (&contig_page_data) >#define NODE_MEM_MAP(nid) mem_map >#define MAX_NODES_SHIFT 1 > > > > > > > >extern struct pglist_data *first_online_pgdat(void); >extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); >extern struct zone *next_zone(struct zone *zone); > > > > > >#define for_each_online_pgdat(pgdat) for (pgdat = first_online_pgdat(); pgdat; pgdat = next_online_pgdat(pgdat)) ># 578 "include/linux/mmzone.h" >#define for_each_zone(zone) for (zone = (first_online_pgdat())->node_zones; zone; zone = next_zone(zone)) ># 592 "include/linux/mmzone.h" >#define FLAGS_RESERVED 9 ># 608 "include/linux/mmzone.h" >#define early_pfn_to_nid(nid) (0UL) > > > >#define pfn_to_nid(pfn) (0) > > >#define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT) >#define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT) ># 744 "include/linux/mmzone.h" >#define sparse_init() do {} while (0) >#define sparse_index_init(_sec,_nid) do {} while (0) > > > > > >#define early_pfn_in_nid(pfn,nid) (1) > > > >#define early_pfn_valid(pfn) (1) > > >void memory_present(int nid, unsigned long start, unsigned long end); >unsigned long __attribute__ ((__section__ (".init.text"))) node_memmap_size_bytes(int, unsigned long, unsigned long); ># 5 "include/linux/gfp.h" 2 > > > >struct vm_area_struct; ># 19 "include/linux/gfp.h" >#define __GFP_DMA ((__force gfp_t)0x01u) >#define __GFP_HIGHMEM ((__force gfp_t)0x02u) >#define __GFP_DMA32 ((__force gfp_t)0x04u) ># 34 "include/linux/gfp.h" >#define __GFP_WAIT ((__force gfp_t)0x10u) >#define __GFP_HIGH ((__force gfp_t)0x20u) >#define __GFP_IO ((__force gfp_t)0x40u) >#define __GFP_FS ((__force gfp_t)0x80u) >#define __GFP_COLD ((__force gfp_t)0x100u) >#define __GFP_NOWARN ((__force gfp_t)0x200u) >#define __GFP_REPEAT ((__force gfp_t)0x400u) >#define __GFP_NOFAIL ((__force gfp_t)0x800u) >#define __GFP_NORETRY ((__force gfp_t)0x1000u) >#define __GFP_NO_GROW ((__force gfp_t)0x2000u) >#define __GFP_COMP ((__force gfp_t)0x4000u) >#define __GFP_ZERO ((__force gfp_t)0x8000u) >#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) >#define __GFP_HARDWALL ((__force gfp_t)0x20000u) >#define __GFP_THISNODE ((__force gfp_t)0x40000u) > >#define __GFP_BITS_SHIFT 20 >#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) > > >#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| __GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE) > > > > > >#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) > >#define GFP_ATOMIC (__GFP_HIGH) >#define GFP_NOIO (__GFP_WAIT) >#define GFP_NOFS (__GFP_WAIT | __GFP_IO) >#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) >#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) >#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM) > > > > > >#define GFP_THISNODE 0 > > > > > > >#define GFP_DMA __GFP_DMA > > >#define GFP_DMA32 __GFP_DMA32 > > >static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags) >{ > if (flags & (( gfp_t)0x01u)) > return ZONE_DMA; ># 98 "include/linux/gfp.h" > return ZONE_NORMAL; >} ># 120 "include/linux/gfp.h" >static inline __attribute__((always_inline)) void arch_alloc_page(struct page *page, int order) { } > > >extern struct page * >__alloc_pages(gfp_t, unsigned int, struct zonelist *) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask, > unsigned int order) >{ > if (__builtin_expect(!!(order >= 11), 0)) > return ((void *)0); > > > if (nid < 0) > nid = ((0)); > > return __alloc_pages(gfp_mask, order, > (&contig_page_data)->node_zonelists + gfp_zone(gfp_mask)); >} ># 154 "include/linux/gfp.h" >#define alloc_pages(gfp_mask,order) alloc_pages_node(numa_node_id(), gfp_mask, order) > >#define alloc_page_vma(gfp_mask,vma,addr) alloc_pages(gfp_mask, 0) > >#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) > >extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order) __attribute__((regparm(3))); >extern unsigned long get_zeroed_page(gfp_t gfp_mask) __attribute__((regparm(3))); > >#define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0) > > >#define __get_dma_pages(gfp_mask,order) __get_free_pages((gfp_mask) | GFP_DMA,(order)) > > >extern void __free_pages(struct page *page, unsigned int order) __attribute__((regparm(3))); >extern void free_pages(unsigned long addr, unsigned int order) __attribute__((regparm(3))); >extern void free_hot_page(struct page *page) __attribute__((regparm(3))); >extern void free_cold_page(struct page *page) __attribute__((regparm(3))); > >#define __free_page(page) __free_pages((page), 0) >#define free_page(addr) free_pages((addr),0) > >void page_alloc_init(void); > > > >static inline __attribute__((always_inline)) void drain_node_pages(int node) { }; ># 15 "include/linux/slab.h" 2 > > >typedef struct kmem_cache kmem_cache_t __attribute__((deprecated)); > > > > > >#define SLAB_DEBUG_FREE 0x00000100UL >#define SLAB_DEBUG_INITIAL 0x00000200UL >#define SLAB_RED_ZONE 0x00000400UL >#define SLAB_POISON 0x00000800UL >#define SLAB_HWCACHE_ALIGN 0x00002000UL >#define SLAB_CACHE_DMA 0x00004000UL >#define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL >#define SLAB_STORE_USER 0x00010000UL >#define SLAB_RECLAIM_ACCOUNT 0x00020000UL >#define SLAB_PANIC 0x00040000UL >#define SLAB_DESTROY_BY_RCU 0x00080000UL >#define SLAB_MEM_SPREAD 0x00100000UL > > >#define SLAB_CTOR_CONSTRUCTOR 0x001UL >#define SLAB_CTOR_ATOMIC 0x002UL >#define SLAB_CTOR_VERIFY 0x004UL > > > > >void __attribute__ ((__section__ (".init.text"))) kmem_cache_init(void); >extern int slab_is_available(void); > >struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, > unsigned long, > void (*)(void *, struct kmem_cache *, unsigned long), > void (*)(void *, struct kmem_cache *, unsigned long)); >void kmem_cache_destroy(struct kmem_cache *); >int kmem_cache_shrink(struct kmem_cache *); >void *kmem_cache_alloc(struct kmem_cache *, gfp_t); >void *kmem_cache_zalloc(struct kmem_cache *, gfp_t); >void kmem_cache_free(struct kmem_cache *, void *); >unsigned int kmem_cache_size(struct kmem_cache *); >const char *kmem_cache_name(struct kmem_cache *); >int __attribute__((regparm(3))) kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); > > > > >static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(struct kmem_cache *cachep, > gfp_t flags, int node) >{ > return kmem_cache_alloc(cachep, flags); >} > > > > > >void *__kmalloc(size_t, gfp_t); >void *__kzalloc(size_t, gfp_t); >void kfree(const void *); >unsigned int ksize(const void *); > > > > > > > >static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags) >{ > if (n != 0 && size > (~0UL) / n) > return ((void *)0); > return __kzalloc(n * size, flags); >} ># 98 "include/linux/slab.h" ># 1 "include/linux/slab_def.h" 1 > >#define _LINUX_SLAB_DEF_H ># 19 "include/linux/slab_def.h" >struct cache_sizes { > size_t cs_size; > struct kmem_cache *cs_cachep; > struct kmem_cache *cs_dmacachep; >}; >extern struct cache_sizes malloc_sizes[]; > >static inline __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags) >{ > if (__builtin_constant_p(size)) { > int i = 0; >#define CACHE(x) if (size <= x) goto found; else i++; > > > > ># 1 "include/linux/kmalloc_sizes.h" 1 > > if (size <= 32) goto found; else i++; > > if (size <= 64) goto found; else i++; > > > > if (size <= 128) goto found; else i++; > > if (size <= 192) goto found; else i++; > > if (size <= 256) goto found; else i++; > if (size <= 512) goto found; else i++; > if (size <= 1024) goto found; else i++; > if (size <= 2048) goto found; else i++; > if (size <= 4096) goto found; else i++; > if (size <= 8192) goto found; else i++; > if (size <= 16384) goto found; else i++; > if (size <= 32768) goto found; else i++; > if (size <= 65536) goto found; else i++; > if (size <= 131072) goto found; else i++; ># 36 "include/linux/slab_def.h" 2 >#undef CACHE > { > extern void __you_cannot_kmalloc_that_much(void); > __you_cannot_kmalloc_that_much(); > } >found: > return kmem_cache_alloc((flags & (( gfp_t)0x01u)) ? > malloc_sizes[i].cs_dmacachep : > malloc_sizes[i].cs_cachep, flags); > } > return __kmalloc(size, flags); >} > >static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags) >{ > if (__builtin_constant_p(size)) { > int i = 0; >#define CACHE(x) if (size <= x) goto found; else i++; > > > > ># 1 "include/linux/kmalloc_sizes.h" 1 > > if (size <= 32) goto found; else i++; > > if (size <= 64) goto found; else i++; > > > > if (size <= 128) goto found; else i++; > > if (size <= 192) goto found; else i++; > > if (size <= 256) goto found; else i++; > if (size <= 512) goto found; else i++; > if (size <= 1024) goto found; else i++; > if (size <= 2048) goto found; else i++; > if (size <= 4096) goto found; else i++; > if (size <= 8192) goto found; else i++; > if (size <= 16384) goto found; else i++; > if (size <= 32768) goto found; else i++; > if (size <= 65536) goto found; else i++; > if (size <= 131072) goto found; else i++; ># 59 "include/linux/slab_def.h" 2 >#undef CACHE > { > extern void __you_cannot_kzalloc_that_much(void); > __you_cannot_kzalloc_that_much(); > } >found: > return kmem_cache_zalloc((flags & (( gfp_t)0x01u)) ? > malloc_sizes[i].cs_dmacachep : > malloc_sizes[i].cs_cachep, flags); > } > return __kzalloc(size, flags); >} ># 99 "include/linux/slab.h" 2 ># 167 "include/linux/slab.h" >static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node) >{ > return kmalloc(size, flags); >} > >static inline __attribute__((always_inline)) void *__kmalloc_node(size_t size, gfp_t flags, int node) >{ > return __kmalloc(size, flags); >} ># 187 "include/linux/slab.h" >extern void *__kmalloc_track_caller(size_t, gfp_t, void*); >#define kmalloc_track_caller(size,flags) __kmalloc_track_caller(size, flags, __builtin_return_address(0)) ># 216 "include/linux/slab.h" >#define kmalloc_node_track_caller(size,flags,node) kmalloc_track_caller(size, flags) ># 6 "include/linux/percpu.h" 2 > > > > ># 1 "include/asm/percpu.h" 1 > >#define __UM_PERCPU_H > ># 1 "include/asm/arch/percpu.h" 1 > >#define __ARCH_I386_PERCPU__ > > ># 1 "include/asm-generic/percpu.h" 1 > >#define _ASM_GENERIC_PERCPU_H_ > > >#define __GENERIC_PER_CPU ># 33 "include/asm-generic/percpu.h" >#define DEFINE_PER_CPU(type,name) __typeof__(type) per_cpu__ ##name > > >#define per_cpu(var,cpu) (*((void)(cpu), &per_cpu__ ##var)) >#define __get_cpu_var(var) per_cpu__ ##var >#define __raw_get_cpu_var(var) per_cpu__ ##var > > > >#define DECLARE_PER_CPU(type,name) extern __typeof__(type) per_cpu__ ##name > >#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__ ##var) >#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__ ##var) ># 6 "include/asm/arch/percpu.h" 2 ># 5 "include/asm/percpu.h" 2 ># 11 "include/linux/percpu.h" 2 > > > >#define PERCPU_ENOUGH_ROOM 32768 > > > > > > >#define get_cpu_var(var) (*({ extern int simple_identifier_ ##var(void); preempt_disable(); &__get_cpu_var(var); })) > > > >#define put_cpu_var(var) preempt_enable() ># 55 "include/linux/percpu.h" >#define percpu_ptr(ptr,cpu) ({ (void)(cpu); (ptr); }) > >static inline __attribute__((always_inline)) void percpu_depopulate(void *__pdata, int cpu) >{ >} > >static inline __attribute__((always_inline)) void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask) >{ >} > >static inline __attribute__((always_inline)) void *percpu_populate(void *__pdata, size_t size, gfp_t gfp, > int cpu) >{ > return ({ (void)(cpu); (__pdata); }); >} > >static inline __attribute__((always_inline)) int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp, > cpumask_t *mask) >{ > return 0; >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask) >{ > return kzalloc(size, gfp); >} > >static inline __attribute__((always_inline)) void percpu_free(void *__pdata) >{ > kfree(__pdata); >} > > > >#define percpu_populate_mask(__pdata,size,gfp,mask) __percpu_populate_mask((__pdata), (size), (gfp), &(mask)) > >#define percpu_depopulate_mask(__pdata,mask) __percpu_depopulate_mask((__pdata), &(mask)) > >#define percpu_alloc_mask(size,gfp,mask) __percpu_alloc_mask((size), (gfp), &(mask)) > > >#define percpu_alloc(size,gfp) percpu_alloc_mask((size), (gfp), cpu_online_map) > > > >#define __alloc_percpu(size) percpu_alloc_mask((size), GFP_KERNEL, cpu_possible_map) > >#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type)) >#define free_percpu(ptr) percpu_free((ptr)) >#define per_cpu_ptr(ptr,cpu) percpu_ptr((ptr), (cpu)) ># 42 "include/linux/rcupdate.h" 2 ># 50 "include/linux/rcupdate.h" >struct rcu_head { > struct rcu_head *next; > void (*func)(struct rcu_head *head); >}; > >#define RCU_HEAD_INIT { .next = NULL, .func = NULL } >#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT >#define INIT_RCU_HEAD(ptr) do { (ptr)->next = NULL; (ptr)->func = NULL; } while (0) > > > > > > >struct rcu_ctrlblk { > long cur; > long completed; > int next_pending; > > int signaled; > > spinlock_t lock ; > cpumask_t cpumask; > >} ; > > >static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b) >{ > return (a - b) < 0; >} > > >static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b) >{ > return (a - b) > 0; >} > > > > > > >struct rcu_data { > > long quiescbatch; > int passed_quiesc; > int qs_pending; > > > long batch; > struct rcu_head *nxtlist; > struct rcu_head **nxttail; > long qlen; > struct rcu_head *curlist; > struct rcu_head **curtail; > struct rcu_head *donelist; > struct rcu_head **donetail; > long blimit; > int cpu; > struct rcu_head barrier; >}; > >extern __typeof__(struct rcu_data) per_cpu__rcu_data; >extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data; > > > > > > > >static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu) >{ > struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_data)); > rdp->passed_quiesc = 1; >} >static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu) >{ > struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_bh_data)); > rdp->passed_quiesc = 1; >} > >extern int rcu_pending(int cpu); >extern int rcu_needs_cpu(int cpu); ># 165 "include/linux/rcupdate.h" >#define rcu_read_lock() do { preempt_disable(); __acquire(RCU); } while(0) ># 176 "include/linux/rcupdate.h" >#define rcu_read_unlock() do { __release(RCU); preempt_enable(); } while(0) ># 203 "include/linux/rcupdate.h" >#define rcu_read_lock_bh() do { local_bh_disable(); __acquire(RCU_BH); } while(0) ># 214 "include/linux/rcupdate.h" >#define rcu_read_unlock_bh() do { __release(RCU_BH); local_bh_enable(); } while(0) ># 230 "include/linux/rcupdate.h" >#define rcu_dereference(p) ({ typeof(p) _________p1 = p; smp_read_barrier_depends(); (_________p1); }) ># 249 "include/linux/rcupdate.h" >#define rcu_assign_pointer(p,v) ({ smp_wmb(); (p) = (v); }) ># 270 "include/linux/rcupdate.h" >#define synchronize_sched() synchronize_rcu() > >extern void rcu_init(void); >extern void rcu_check_callbacks(int cpu, int user); >extern void rcu_restart_cpu(int cpu); >extern long rcu_batches_completed(void); >extern long rcu_batches_completed_bh(void); > > >extern void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head)) __attribute__((regparm(3))); > >extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head)) __attribute__((regparm(3))); > >extern void synchronize_rcu(void); >void synchronize_idle(void); >extern void rcu_barrier(void); ># 5 "include/linux/pid.h" 2 > >enum pid_type >{ > PIDTYPE_PID, > PIDTYPE_PGID, > PIDTYPE_SID, > PIDTYPE_MAX >}; ># 43 "include/linux/pid.h" >struct pid >{ > atomic_t count; > > int nr; > struct hlist_node pid_chain; > > struct hlist_head tasks[PIDTYPE_MAX]; > struct rcu_head rcu; >}; > >struct pid_link >{ > struct hlist_node node; > struct pid *pid; >}; > >static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid) >{ > if (pid) > atomic_inc(&pid->count); > return pid; >} > >extern void put_pid(struct pid *pid) __attribute__((regparm(3))); >extern struct task_struct *pid_task(struct pid *pid, enum pid_type) __attribute__((regparm(3))); >extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type) __attribute__((regparm(3))); > > >extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); > > > > > >extern int attach_pid(struct task_struct *task, enum pid_type type, int nr) __attribute__((regparm(3))); > > >extern void detach_pid(struct task_struct *task, enum pid_type) __attribute__((regparm(3))); >extern void transfer_pid(struct task_struct *old, struct task_struct *new, enum pid_type) __attribute__((regparm(3))); > > > > > > >extern struct pid *find_pid(int nr) __attribute__((regparm(3))); > > > > >extern struct pid *find_get_pid(int nr); >extern struct pid *find_ge_pid(int nr); > >extern struct pid *alloc_pid(void); >extern void free_pid(struct pid *pid) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid) >{ > pid_t nr = 0; > if (pid) > nr = pid->nr; > return nr; >} > > >#define do_each_task_pid(who,type,task) do { struct hlist_node *pos___; struct pid *pid___ = find_pid(who); if (pid___ != NULL) hlist_for_each_entry_rcu((task), pos___, &pid___->tasks[type], pids[type].node) { > > > > > > > >#define while_each_task_pid(who,type,task) } } while (0) > > > > >#define do_each_pid_task(pid,type,task) do { struct hlist_node *pos___; if (pid != NULL) hlist_for_each_entry_rcu((task), pos___, &pid->tasks[type], pids[type].node) { > > > > > > >#define while_each_pid_task(pid,type,task) } } while (0) ># 73 "include/linux/sched.h" 2 > > ># 1 "include/linux/seccomp.h" 1 > >#define _LINUX_SECCOMP_H ># 28 "include/linux/seccomp.h" >typedef struct { } seccomp_t; > >#define secure_computing(x) do { } while (0) > >static inline __attribute__((always_inline)) int has_secure_computing(struct thread_info *ti) >{ > return 0; >} ># 76 "include/linux/sched.h" 2 > ># 1 "include/linux/futex.h" 1 > >#define _LINUX_FUTEX_H > ># 1 "include/linux/sched.h" 1 ># 5 "include/linux/futex.h" 2 > > > > >#define FUTEX_WAIT 0 >#define FUTEX_WAKE 1 >#define FUTEX_FD 2 >#define FUTEX_REQUEUE 3 >#define FUTEX_CMP_REQUEUE 4 >#define FUTEX_WAKE_OP 5 >#define FUTEX_LOCK_PI 6 >#define FUTEX_UNLOCK_PI 7 >#define FUTEX_TRYLOCK_PI 8 ># 33 "include/linux/futex.h" >struct robust_list { > struct robust_list *next; >}; ># 45 "include/linux/futex.h" >struct robust_list_head { > > > > struct robust_list list; > > > > > > > > long futex_offset; ># 69 "include/linux/futex.h" > struct robust_list *list_op_pending; >}; > > > > >#define FUTEX_WAITERS 0x80000000 > > > > > > > >#define FUTEX_OWNER_DIED 0x40000000 > > > > >#define FUTEX_TID_MASK 0x3fffffff > > > > > >#define ROBUST_LIST_LIMIT 2048 > > >long do_futex(u32 *uaddr, int op, u32 val, unsigned long timeout, > u32 *uaddr2, u32 val2, u32 val3); > >extern int >handle_futex_death(u32 *uaddr, struct task_struct *curr, int pi); > > >extern void exit_robust_list(struct task_struct *curr); >extern void exit_pi_state_list(struct task_struct *curr); ># 116 "include/linux/futex.h" >#define FUTEX_OP_SET 0 >#define FUTEX_OP_ADD 1 >#define FUTEX_OP_OR 2 >#define FUTEX_OP_ANDN 3 >#define FUTEX_OP_XOR 4 > >#define FUTEX_OP_OPARG_SHIFT 8 > >#define FUTEX_OP_CMP_EQ 0 >#define FUTEX_OP_CMP_NE 1 >#define FUTEX_OP_CMP_LT 2 >#define FUTEX_OP_CMP_LE 3 >#define FUTEX_OP_CMP_GT 4 >#define FUTEX_OP_CMP_GE 5 > > > > > > > >#define FUTEX_OP(op,oparg,cmp,cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff)) ># 78 "include/linux/sched.h" 2 ># 1 "include/linux/rtmutex.h" 1 ># 13 "include/linux/rtmutex.h" >#define __LINUX_RT_MUTEX_H > > ># 1 "include/linux/plist.h" 1 ># 74 "include/linux/plist.h" >#define _LINUX_PLIST_H_ > > > > > >struct plist_head { > struct list_head prio_list; > struct list_head node_list; > > spinlock_t *lock; > >}; > >struct plist_node { > int prio; > struct plist_head plist; >}; > > >#define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock ># 104 "include/linux/plist.h" >#define PLIST_HEAD_INIT(head,_lock) { .prio_list = LIST_HEAD_INIT((head).prio_list), .node_list = LIST_HEAD_INIT((head).node_list), PLIST_HEAD_LOCK_INIT(&(_lock)) } ># 117 "include/linux/plist.h" >#define PLIST_NODE_INIT(node,__prio) { .prio = (__prio), .plist = PLIST_HEAD_INIT((node).plist, NULL), } ># 128 "include/linux/plist.h" >static inline __attribute__((always_inline)) void >plist_head_init(struct plist_head *head, spinlock_t *lock) >{ > INIT_LIST_HEAD(&head->prio_list); > INIT_LIST_HEAD(&head->node_list); > > head->lock = lock; > >} > > > > > > > >static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio) >{ > node->prio = prio; > plist_head_init(&node->plist, ((void *)0)); >} > >extern void plist_add(struct plist_node *node, struct plist_head *head); >extern void plist_del(struct plist_node *node, struct plist_head *head); > > > > > > > >#define plist_for_each(pos,head) list_for_each_entry(pos, &(head)->node_list, plist.node_list) ># 170 "include/linux/plist.h" >#define plist_for_each_safe(pos,n,head) list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) ># 180 "include/linux/plist.h" >#define plist_for_each_entry(pos,head,mem) list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) ># 192 "include/linux/plist.h" >#define plist_for_each_entry_safe(pos,n,head,m) list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) > > > > > > > >static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head) >{ > return list_empty(&head->node_list); >} > > > > > > >static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node) >{ > return plist_head_empty(&node->plist); >} ># 225 "include/linux/plist.h" >#define plist_first_entry(head,type,member) ({ WARN_ON(plist_head_empty(head)); container_of(plist_first(head), type, member); }) ># 242 "include/linux/plist.h" >static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head) >{ > return ({ const typeof( ((struct plist_node *)0)->plist.node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,plist.node_list) );}); > >} ># 17 "include/linux/rtmutex.h" 2 ># 26 "include/linux/rtmutex.h" >struct rt_mutex { > spinlock_t wait_lock; > struct plist_head wait_list; > struct task_struct *owner; > > int save_state; > const char *name, *file; > int line; > void *magic; > >}; > >struct rt_mutex_waiter; >struct hrtimer_sleeper; > > > extern int rt_mutex_debug_check_no_locks_freed(const void *from, > unsigned long len); > extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); ># 55 "include/linux/rtmutex.h" >#define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) , .name = #mutexname, .file = __FILE__, .line = __LINE__ > >#define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) > extern void rt_mutex_debug_task_free(struct task_struct *tsk); > > > > > > >#define __RT_MUTEX_INITIALIZER(mutexname) { .wait_lock = __SPIN_LOCK_UNLOCKED(mutexname.wait_lock) , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) , .owner = NULL __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} > > > > > >#define DEFINE_RT_MUTEX(mutexname) struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) ># 80 "include/linux/rtmutex.h" >static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock) >{ > return lock->owner != ((void *)0); >} > >extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); >extern void rt_mutex_destroy(struct rt_mutex *lock); > >extern void rt_mutex_lock(struct rt_mutex *lock); >extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, > int detect_deadlock); >extern int rt_mutex_timed_lock(struct rt_mutex *lock, > struct hrtimer_sleeper *timeout, > int detect_deadlock); > >extern int rt_mutex_trylock(struct rt_mutex *lock); > >extern void rt_mutex_unlock(struct rt_mutex *lock); > > >#define INIT_RT_MUTEXES(tsk) .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), INIT_RT_MUTEX_DEBUG(tsk) ># 79 "include/linux/sched.h" 2 > > ># 1 "include/linux/param.h" 1 > >#define _LINUX_PARAM_H ># 82 "include/linux/sched.h" 2 ># 1 "include/linux/resource.h" 1 > >#define _LINUX_RESOURCE_H > > > >struct task_struct; ># 19 "include/linux/resource.h" >#define RUSAGE_SELF 0 >#define RUSAGE_CHILDREN (-1) >#define RUSAGE_BOTH (-2) > >struct rusage { > struct timeval ru_utime; > struct timeval ru_stime; > long ru_maxrss; > long ru_ixrss; > long ru_idrss; > long ru_isrss; > long ru_minflt; > long ru_majflt; > long ru_nswap; > long ru_inblock; > long ru_oublock; > long ru_msgsnd; > long ru_msgrcv; > long ru_nsignals; > long ru_nvcsw; > long ru_nivcsw; >}; > >struct rlimit { > unsigned long rlim_cur; > unsigned long rlim_max; >}; > >#define PRIO_MIN (-20) >#define PRIO_MAX 20 > >#define PRIO_PROCESS 0 >#define PRIO_PGRP 1 >#define PRIO_USER 2 > > > > > >#define _STK_LIM (8*1024*1024) > > > > > >#define MLOCK_LIMIT (8 * PAGE_SIZE) > > > > > ># 1 "include/asm/resource.h" 1 > >#define __UM_RESOURCE_H > ># 1 "include/asm/arch/resource.h" 1 > >#define _I386_RESOURCE_H > ># 1 "include/asm-generic/resource.h" 1 > >#define _ASM_GENERIC_RESOURCE_H ># 15 "include/asm-generic/resource.h" >#define RLIMIT_CPU 0 >#define RLIMIT_FSIZE 1 >#define RLIMIT_DATA 2 >#define RLIMIT_STACK 3 >#define RLIMIT_CORE 4 > > >#define RLIMIT_RSS 5 > > > >#define RLIMIT_NPROC 6 > > > >#define RLIMIT_NOFILE 7 > > > >#define RLIMIT_MEMLOCK 8 > > > >#define RLIMIT_AS 9 > > >#define RLIMIT_LOCKS 10 >#define RLIMIT_SIGPENDING 11 >#define RLIMIT_MSGQUEUE 12 >#define RLIMIT_NICE 13 > >#define RLIMIT_RTPRIO 14 > >#define RLIM_NLIMITS 15 ># 57 "include/asm-generic/resource.h" >#define RLIM_INFINITY (~0UL) > > > > > > >#define _STK_LIM_MAX RLIM_INFINITY > > > > > > > >#define INIT_RLIMITS { [RLIMIT_CPU] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_FSIZE] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_DATA] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_STACK] = { _STK_LIM, _STK_LIM_MAX }, [RLIMIT_CORE] = { 0, RLIM_INFINITY }, [RLIMIT_RSS] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_NPROC] = { 0, 0 }, [RLIMIT_NOFILE] = { INR_OPEN, INR_OPEN }, [RLIMIT_MEMLOCK] = { MLOCK_LIMIT, MLOCK_LIMIT }, [RLIMIT_AS] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, [RLIMIT_SIGPENDING] = { 0, 0 }, [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, [RLIMIT_NICE] = { 0, 0 }, [RLIMIT_RTPRIO] = { 0, 0 }, } ># 5 "include/asm/arch/resource.h" 2 ># 5 "include/asm/resource.h" 2 ># 71 "include/linux/resource.h" 2 > >int getrusage(struct task_struct *p, int who, struct rusage *ru); ># 83 "include/linux/sched.h" 2 ># 1 "include/linux/timer.h" 1 > >#define _LINUX_TIMER_H > > > > > >struct tvec_t_base_s; > >struct timer_list { > struct list_head entry; > unsigned long expires; > > void (*function)(unsigned long); > unsigned long data; > > struct tvec_t_base_s *base; >}; > >extern struct tvec_t_base_s boot_tvec_bases; > >#define TIMER_INITIALIZER(_function,_expires,_data) { .function = (_function), .expires = (_expires), .data = (_data), .base = &boot_tvec_bases, } > > > > > > >#define DEFINE_TIMER(_name,_function,_expires,_data) struct timer_list _name = TIMER_INITIALIZER(_function, _expires, _data) > > > >void __attribute__((regparm(3))) init_timer(struct timer_list * timer); > >static inline __attribute__((always_inline)) void setup_timer(struct timer_list * timer, > void (*function)(unsigned long), > unsigned long data) >{ > timer->function = function; > timer->data = data; > init_timer(timer); >} ># 54 "include/linux/timer.h" >static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer) >{ > return timer->entry.next != ((void *)0); >} > >extern void add_timer_on(struct timer_list *timer, int cpu); >extern int del_timer(struct timer_list * timer); >extern int __mod_timer(struct timer_list *timer, unsigned long expires); >extern int mod_timer(struct timer_list *timer, unsigned long expires); > >extern unsigned long next_timer_interrupt(void); ># 80 "include/linux/timer.h" >static inline __attribute__((always_inline)) void add_timer(struct timer_list *timer) >{ > do { if (__builtin_expect(!!((timer_pending(timer))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/timer.h"), "i" (82), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > __mod_timer(timer, timer->expires); >} > > > > > >#define try_to_del_timer_sync(t) del_timer(t) >#define del_timer_sync(t) del_timer(t) > > >#define del_singleshot_timer_sync(t) del_timer_sync(t) > >extern void init_timers(void); >extern void run_local_timers(void); >struct hrtimer; >extern int it_real_fn(struct hrtimer *); > >unsigned long __round_jiffies(unsigned long j, int cpu); >unsigned long __round_jiffies_relative(unsigned long j, int cpu); >unsigned long round_jiffies(unsigned long j); >unsigned long round_jiffies_relative(unsigned long j); ># 84 "include/linux/sched.h" 2 ># 1 "include/linux/hrtimer.h" 1 ># 16 "include/linux/hrtimer.h" >#define _LINUX_HRTIMER_H > > ># 1 "include/linux/ktime.h" 1 ># 22 "include/linux/ktime.h" >#define _LINUX_KTIME_H ># 46 "include/linux/ktime.h" >typedef union { > s64 tv64; > > struct { > > > > s32 nsec, sec; > > } tv; > >} ktime_t; > >#define KTIME_MAX ((s64)~((u64)1 << 63)) >#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) ># 138 "include/linux/ktime.h" >static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs) >{ > return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } }; >} ># 150 "include/linux/ktime.h" >static inline __attribute__((always_inline)) ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) >{ > ktime_t res; > > res.tv64 = lhs.tv64 - rhs.tv64; > if (res.tv.nsec < 0) > res.tv.nsec += 1000000000L; > > return res; >} ># 168 "include/linux/ktime.h" >static inline __attribute__((always_inline)) ktime_t ktime_add(const ktime_t add1, const ktime_t add2) >{ > ktime_t res; > > res.tv64 = add1.tv64 + add2.tv64; ># 181 "include/linux/ktime.h" > if (res.tv.nsec >= 1000000000L) > res.tv64 += (u32)-1000000000L; > > return res; >} ># 194 "include/linux/ktime.h" >extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); > > > > > > > >static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(const struct timespec ts) >{ > return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec, > .nsec = (s32)ts.tv_nsec } }; >} > > > > > > > >static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(const struct timeval tv) >{ > return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec, > .nsec = (s32)tv.tv_usec * 1000 } }; >} > > > > > > > >static inline __attribute__((always_inline)) struct timespec ktime_to_timespec(const ktime_t kt) >{ > return (struct timespec) { .tv_sec = (time_t) kt.tv.sec, > .tv_nsec = (long) kt.tv.nsec }; >} > > > > > > > >static inline __attribute__((always_inline)) struct timeval ktime_to_timeval(const ktime_t kt) >{ > return (struct timeval) { > .tv_sec = (time_t) kt.tv.sec, > .tv_usec = (suseconds_t) (kt.tv.nsec / 1000L) }; >} > > > > > > > >static inline __attribute__((always_inline)) s64 ktime_to_ns(const ktime_t kt) >{ > return (s64) kt.tv.sec * 1000000000L + kt.tv.nsec; >} ># 264 "include/linux/ktime.h" >#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC } >#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC } > > >extern void ktime_get_ts(struct timespec *ts); > > >#define ktime_get_real_ts(ts) getnstimeofday(ts) ># 20 "include/linux/hrtimer.h" 2 > > > > > > > >enum hrtimer_mode { > HRTIMER_ABS, > HRTIMER_REL, >}; > >enum hrtimer_restart { > HRTIMER_NORESTART, > HRTIMER_RESTART, >}; > >#define HRTIMER_INACTIVE ((void *)1UL) > >struct hrtimer_base; ># 52 "include/linux/hrtimer.h" >struct hrtimer { > struct rb_node node; > ktime_t expires; > int (*function)(struct hrtimer *); > struct hrtimer_base *base; >}; ># 66 "include/linux/hrtimer.h" >struct hrtimer_sleeper { > struct hrtimer timer; > struct task_struct *task; >}; ># 85 "include/linux/hrtimer.h" >struct hrtimer_base { > clockid_t index; > spinlock_t lock; > struct rb_root active; > struct rb_node *first; > ktime_t resolution; > ktime_t (*get_time)(void); > ktime_t (*get_softirq_time)(void); > struct hrtimer *curr_timer; > ktime_t softirq_time; > struct lock_class_key lock_key; >}; > > > > > > >#define clock_was_set() do { } while (0) > > > > >extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, > enum hrtimer_mode mode); > > >extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, > const enum hrtimer_mode mode); >extern int hrtimer_cancel(struct hrtimer *timer); >extern int hrtimer_try_to_cancel(struct hrtimer *timer); > >#define hrtimer_restart(timer) hrtimer_start((timer), (timer)->expires, HRTIMER_ABS) > > >extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); >extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); > > > > > >static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer) >{ > return ((struct rb_node *)((&timer->node)->rb_parent_color & ~3)) != &timer->node; >} > > >extern unsigned long >hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); > > >extern long hrtimer_nanosleep(struct timespec *rqtp, > struct timespec *rmtp, > const enum hrtimer_mode mode, > const clockid_t clockid); >extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); > >extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, > struct task_struct *tsk); > > >extern void hrtimer_run_queues(void); > > >extern void __attribute__ ((__section__ (".init.text"))) hrtimers_init(void); ># 85 "include/linux/sched.h" 2 ># 1 "include/linux/task_io_accounting.h" 1 ># 35 "include/linux/task_io_accounting.h" >struct task_io_accounting { >}; ># 86 "include/linux/sched.h" 2 > > > >struct exec_domain; >struct futex_pi_state; > > > > > >#define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND) ># 108 "include/linux/sched.h" >extern unsigned long avenrun[]; > >#define FSHIFT 11 >#define FIXED_1 (1<<FSHIFT) >#define LOAD_FREQ (5*HZ) >#define EXP_1 1884 >#define EXP_5 2014 >#define EXP_15 2037 > >#define CALC_LOAD(load,exp,n) load *= exp; load += n*(FIXED_1-exp); load >>= FSHIFT; > > > > >extern unsigned long total_forks; >extern int nr_threads; >extern __typeof__(unsigned long) per_cpu__process_counts; >extern int nr_processes(void); >extern unsigned long nr_running(void); >extern unsigned long nr_uninterruptible(void); >extern unsigned long nr_active(void); >extern unsigned long nr_iowait(void); >extern unsigned long weighted_cpuload(const int cpu); ># 143 "include/linux/sched.h" >#define TASK_RUNNING 0 >#define TASK_INTERRUPTIBLE 1 >#define TASK_UNINTERRUPTIBLE 2 >#define TASK_STOPPED 4 >#define TASK_TRACED 8 > >#define EXIT_ZOMBIE 16 >#define EXIT_DEAD 32 > >#define TASK_NONINTERACTIVE 64 >#define TASK_DEAD 128 > >#define __set_task_state(tsk,state_value) do { (tsk)->state = (state_value); } while (0) > >#define set_task_state(tsk,state_value) set_mb((tsk)->state, (state_value)) ># 171 "include/linux/sched.h" >#define __set_current_state(state_value) do { current->state = (state_value); } while (0) > >#define set_current_state(state_value) set_mb(current->state, (state_value)) > > > >#define TASK_COMM_LEN 16 ># 187 "include/linux/sched.h" >extern rwlock_t tasklist_lock; >extern spinlock_t mmlist_lock; > >struct task_struct; > >extern void sched_init(void); >extern void sched_init_smp(void); >extern void init_idle(struct task_struct *idle, int cpu); > >extern cpumask_t nohz_cpu_mask; > > > > >extern void show_state_filter(unsigned long state_filter); > >static inline __attribute__((always_inline)) void show_state(void) >{ > show_state_filter(-1); >} > >extern void show_regs(struct pt_regs *); > > > > > > >extern void show_stack(struct task_struct *task, unsigned long *sp); > >void io_schedule(void); >long io_schedule_timeout(long timeout); > >extern void cpu_init (void); >extern void trap_init(void); >extern void update_process_times(int user); >extern void scheduler_tick(void); > > >extern void softlockup_tick(void); >extern void spawn_softlockup_task(void); >extern void touch_softlockup_watchdog(void); ># 243 "include/linux/sched.h" >#define __sched __attribute__((__section__(".sched.text"))) > >extern int in_sched_functions(unsigned long addr); > >#define MAX_SCHEDULE_TIMEOUT LONG_MAX >extern signed long schedule_timeout(signed long timeout) __attribute__((regparm(3))); >extern signed long schedule_timeout_interruptible(signed long timeout); >extern signed long schedule_timeout_uninterruptible(signed long timeout); > __attribute__((regparm(0))) void schedule(void); > >struct nsproxy; > > >#define DEFAULT_MAX_MAP_COUNT 65536 > >extern int sysctl_max_map_count; > ># 1 "include/linux/aio.h" 1 > >#define __LINUX__AIO_H > > ># 1 "include/linux/workqueue.h" 1 > > > > > >#define _LINUX_WORKQUEUE_H > > > > > >struct workqueue_struct; > >struct work_struct; >typedef void (*work_func_t)(struct work_struct *work); > >struct work_struct { > > > unsigned long management; >#define WORK_STRUCT_PENDING 0 >#define WORK_STRUCT_NOAUTOREL 1 >#define WORK_STRUCT_FLAG_MASK (3UL) >#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) > struct list_head entry; > work_func_t func; >}; > >struct delayed_work { > struct work_struct work; > struct timer_list timer; >}; > >struct execute_work { > struct work_struct work; >}; > >#define __WORK_INITIALIZER(n,f) { .management = 0, .entry = { &(n).entry, &(n).entry }, .func = (f), } > > > > > >#define __WORK_INITIALIZER_NAR(n,f) { .management = (1 << WORK_STRUCT_NOAUTOREL), .entry = { &(n).entry, &(n).entry }, .func = (f), } > > > > > >#define __DELAYED_WORK_INITIALIZER(n,f) { .work = __WORK_INITIALIZER((n).work, (f)), .timer = TIMER_INITIALIZER(NULL, 0, 0), } > > > > >#define __DELAYED_WORK_INITIALIZER_NAR(n,f) { .work = __WORK_INITIALIZER_NAR((n).work, (f)), .timer = TIMER_INITIALIZER(NULL, 0, 0), } > > > > >#define DECLARE_WORK(n,f) struct work_struct n = __WORK_INITIALIZER(n, f) > > >#define DECLARE_WORK_NAR(n,f) struct work_struct n = __WORK_INITIALIZER_NAR(n, f) > > >#define DECLARE_DELAYED_WORK(n,f) struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) > > >#define DECLARE_DELAYED_WORK_NAR(n,f) struct dwork_struct n = __DELAYED_WORK_INITIALIZER_NAR(n, f) > > > > > >#define PREPARE_WORK(_work,_func) do { (_work)->func = (_func); } while (0) > > > > >#define PREPARE_DELAYED_WORK(_work,_func) PREPARE_WORK(&(_work)->work, (_func)) > > > > > >#define INIT_WORK(_work,_func) do { (_work)->management = 0; INIT_LIST_HEAD(&(_work)->entry); PREPARE_WORK((_work), (_func)); } while (0) > > > > > > >#define INIT_WORK_NAR(_work,_func) do { (_work)->management = (1 << WORK_STRUCT_NOAUTOREL); INIT_LIST_HEAD(&(_work)->entry); PREPARE_WORK((_work), (_func)); } while (0) > > > > > > >#define INIT_DELAYED_WORK(_work,_func) do { INIT_WORK(&(_work)->work, (_func)); init_timer(&(_work)->timer); } while (0) > > > > > >#define INIT_DELAYED_WORK_NAR(_work,_func) do { INIT_WORK_NAR(&(_work)->work, (_func)); init_timer(&(_work)->timer); } while (0) ># 116 "include/linux/workqueue.h" >#define work_pending(work) test_bit(WORK_STRUCT_PENDING, &(work)->management) > > > > > > > >#define delayed_work_pending(work) test_bit(WORK_STRUCT_PENDING, &(work)->work.management) ># 145 "include/linux/workqueue.h" >#define work_release(work) clear_bit(WORK_STRUCT_PENDING, &(work)->management) > > > >extern struct workqueue_struct *__create_workqueue(const char *name, > int singlethread, > int freezeable); >#define create_workqueue(name) __create_workqueue((name), 0, 0) >#define create_freezeable_workqueue(name) __create_workqueue((name), 0, 1) >#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) > >extern void destroy_workqueue(struct workqueue_struct *wq); > >extern int queue_work(struct workqueue_struct *wq, struct work_struct *work) __attribute__((regparm(3))); >extern int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay) __attribute__((regparm(3))); >extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, > struct delayed_work *work, unsigned long delay); >extern void flush_workqueue(struct workqueue_struct *wq) __attribute__((regparm(3))); > >extern int schedule_work(struct work_struct *work) __attribute__((regparm(3))); >extern int run_scheduled_work(struct work_struct *work) __attribute__((regparm(3))); >extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay) __attribute__((regparm(3))); > >extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, unsigned long delay); >extern int schedule_on_each_cpu(work_func_t func); >extern void flush_scheduled_work(void); >extern int current_is_keventd(void); >extern int keventd_up(void); > >extern void init_workqueues(void); >void cancel_rearming_delayed_work(struct delayed_work *work); >void cancel_rearming_delayed_workqueue(struct workqueue_struct *, > struct delayed_work *); >int execute_in_process_context(work_func_t fn, struct execute_work *); > > > > > > >static inline __attribute__((always_inline)) int cancel_delayed_work(struct delayed_work *work) >{ > int ret; > > ret = del_timer(&work->timer); > if (ret) > clear_bit(0, &work->work.management); > return ret; >} ># 6 "include/linux/aio.h" 2 ># 1 "include/linux/aio_abi.h" 1 ># 28 "include/linux/aio_abi.h" >#define __LINUX__AIO_ABI_H > > > >typedef unsigned long aio_context_t; > >enum { > IOCB_CMD_PREAD = 0, > IOCB_CMD_PWRITE = 1, > IOCB_CMD_FSYNC = 2, > IOCB_CMD_FDSYNC = 3, > > > > > IOCB_CMD_NOOP = 6, > IOCB_CMD_PREADV = 7, > IOCB_CMD_PWRITEV = 8, >}; > > >struct io_event { > __u64 data; > __u64 obj; > __s64 res; > __s64 res2; >}; > > >#define PADDED(x,y) x, y ># 70 "include/linux/aio_abi.h" >struct iocb { > > __u64 aio_data; > __u32 aio_key, aio_reserved1; > > > > __u16 aio_lio_opcode; > __s16 aio_reqprio; > __u32 aio_fildes; > > __u64 aio_buf; > __u64 aio_nbytes; > __s64 aio_offset; > > > __u64 aio_reserved2; > __u64 aio_reserved3; >}; > >#undef IFBIG >#undef IFLITTLE ># 7 "include/linux/aio.h" 2 ># 1 "include/linux/uio.h" 1 > >#define __LINUX_UIO_H ># 20 "include/linux/uio.h" >struct iovec >{ > void *iov_base; > __kernel_size_t iov_len; >}; > > > >struct kvec { > void *iov_base; > size_t iov_len; >}; > > > > > > > >#define UIO_FASTIOV 8 >#define UIO_MAXIOV 1024 ># 54 "include/linux/uio.h" >static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs) >{ > unsigned long seg; > size_t ret = 0; > > for (seg = 0; seg < nr_segs; seg++) > ret += iov[seg].iov_len; > return ret; >} > >unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); ># 8 "include/linux/aio.h" 2 > > > > >#define AIO_MAXSEGS 4 >#define AIO_KIOGRP_NR_ATOMIC 8 > >struct kioctx; > > > > > > > >#define KIOCB_C_CANCELLED 0x01 >#define KIOCB_C_COMPLETE 0x02 > >#define KIOCB_SYNC_KEY (~0U) ># 35 "include/linux/aio.h" >#define KIF_KICKED 1 >#define KIF_CANCELLED 2 > >#define kiocbTryLock(iocb) test_and_set_bit(KIF_LOCKED, &(iocb)->ki_flags) >#define kiocbTryKick(iocb) test_and_set_bit(KIF_KICKED, &(iocb)->ki_flags) > >#define kiocbSetLocked(iocb) set_bit(KIF_LOCKED, &(iocb)->ki_flags) >#define kiocbSetKicked(iocb) set_bit(KIF_KICKED, &(iocb)->ki_flags) >#define kiocbSetCancelled(iocb) set_bit(KIF_CANCELLED, &(iocb)->ki_flags) > >#define kiocbClearLocked(iocb) clear_bit(KIF_LOCKED, &(iocb)->ki_flags) >#define kiocbClearKicked(iocb) clear_bit(KIF_KICKED, &(iocb)->ki_flags) >#define kiocbClearCancelled(iocb) clear_bit(KIF_CANCELLED, &(iocb)->ki_flags) > >#define kiocbIsLocked(iocb) test_bit(KIF_LOCKED, &(iocb)->ki_flags) >#define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) >#define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) ># 87 "include/linux/aio.h" >struct kiocb { > struct list_head ki_run_list; > long ki_flags; > int ki_users; > unsigned ki_key; > > struct file *ki_filp; > struct kioctx *ki_ctx; > int (*ki_cancel)(struct kiocb *, struct io_event *); > ssize_t (*ki_retry)(struct kiocb *); > void (*ki_dtor)(struct kiocb *); > > union { > void *user; > struct task_struct *tsk; > } ki_obj; > > __u64 ki_user_data; > wait_queue_t ki_wait; > loff_t ki_pos; > > atomic_t ki_bio_count; > void *private; > > unsigned short ki_opcode; > size_t ki_nbytes; > char *ki_buf; > size_t ki_left; > struct iovec ki_inline_vec; > struct iovec *ki_iovec; > unsigned long ki_nr_segs; > unsigned long ki_cur_seg; > > struct list_head ki_list; > >}; > >#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) >#define init_sync_kiocb(x,filp) do { struct task_struct *tsk = current; (x)->ki_flags = 0; (x)->ki_users = 1; (x)->ki_key = KIOCB_SYNC_KEY; (x)->ki_filp = (filp); (x)->ki_ctx = NULL; (x)->ki_cancel = NULL; (x)->ki_retry = NULL; (x)->ki_dtor = NULL; (x)->ki_obj.tsk = tsk; (x)->ki_user_data = 0; init_wait((&(x)->ki_wait)); } while (0) ># 141 "include/linux/aio.h" >#define AIO_RING_MAGIC 0xa10a10a1 >#define AIO_RING_COMPAT_FEATURES 1 >#define AIO_RING_INCOMPAT_FEATURES 0 >struct aio_ring { > unsigned id; > unsigned nr; > unsigned head; > unsigned tail; > > unsigned magic; > unsigned compat_features; > unsigned incompat_features; > unsigned header_length; > > > struct io_event io_events[0]; >}; > >#define aio_ring_avail(info,ring) (((ring)->head + (info)->nr - 1 - (ring)->tail) % (info)->nr) > >#define AIO_RING_PAGES 8 >struct aio_ring_info { > unsigned long mmap_base; > unsigned long mmap_size; > > struct page **ring_pages; > spinlock_t ring_lock; > long nr_pages; > > unsigned nr, tail; > > struct page *internal_pages[8]; >}; > >struct kioctx { > atomic_t users; > int dead; > struct mm_struct *mm; > > > unsigned long user_id; > struct kioctx *next; > > wait_queue_head_t wait; > > spinlock_t ctx_lock; > > int reqs_active; > struct list_head active_reqs; > struct list_head run_list; > > > unsigned max_reqs; > > struct aio_ring_info ring_info; > > struct delayed_work wq; >}; > > >extern unsigned aio_max_size; > >extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb) __attribute__((regparm(3))); >extern int aio_put_req(struct kiocb *iocb) __attribute__((regparm(3))); >extern void kick_iocb(struct kiocb *iocb) __attribute__((regparm(3))); >extern int aio_complete(struct kiocb *iocb, long res, long res2) __attribute__((regparm(3))); >extern void __put_ioctx(struct kioctx *ctx) __attribute__((regparm(3))); >struct mm_struct; >extern void exit_aio(struct mm_struct *mm) __attribute__((regparm(3))); >extern struct kioctx *lookup_ioctx(unsigned long ctx_id); >extern int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb) __attribute__((regparm(3))); > > > >struct kioctx *lookup_ioctx(unsigned long ctx_id); >int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb) __attribute__((regparm(3))); > > >#define get_ioctx(kioctx) do { BUG_ON(atomic_read(&(kioctx)->users) <= 0); atomic_inc(&(kioctx)->users); } while (0) > > > >#define put_ioctx(kioctx) do { BUG_ON(atomic_read(&(kioctx)->users) <= 0); if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); } while (0) > > > > > >#define in_aio() !is_sync_wait(current->io_wait) > >#define warn_if_async() do { if (in_aio()) { printk(KERN_ERR "%s(%s:%d) called in async context!\n", __FUNCTION__, __FILE__, __LINE__); dump_stack(); } } while (0) ># 240 "include/linux/aio.h" >#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) > > > >static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h) >{ > return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );}); >} > > >extern unsigned long aio_nr; >extern unsigned long aio_max_nr; ># 261 "include/linux/sched.h" 2 > >extern unsigned long >arch_get_unmapped_area(struct file *, unsigned long, unsigned long, > unsigned long, unsigned long); >extern unsigned long >arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, > unsigned long len, unsigned long pgoff, > unsigned long flags); >extern void arch_unmap_area(struct mm_struct *, unsigned long); >extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); ># 289 "include/linux/sched.h" >#define set_mm_counter(mm,member,value) (mm)->_ ##member = (value) >#define get_mm_counter(mm,member) ((mm)->_ ##member) >#define add_mm_counter(mm,member,value) (mm)->_ ##member += (value) >#define inc_mm_counter(mm,member) (mm)->_ ##member++ >#define dec_mm_counter(mm,member) (mm)->_ ##member-- >typedef unsigned long mm_counter_t; > > > >#define get_mm_rss(mm) (get_mm_counter(mm, file_rss) + get_mm_counter(mm, anon_rss)) > >#define update_hiwater_rss(mm) do { unsigned long _rss = get_mm_rss(mm); if ((mm)->hiwater_rss < _rss) (mm)->hiwater_rss = _rss; } while (0) > > > > >#define update_hiwater_vm(mm) do { if ((mm)->hiwater_vm < (mm)->total_vm) (mm)->hiwater_vm = (mm)->total_vm; } while (0) > > > > >struct mm_struct { > struct vm_area_struct * mmap; > struct rb_root mm_rb; > struct vm_area_struct * mmap_cache; > unsigned long (*get_unmapped_area) (struct file *filp, > unsigned long addr, unsigned long len, > unsigned long pgoff, unsigned long flags); > void (*unmap_area) (struct mm_struct *mm, unsigned long addr); > unsigned long mmap_base; > unsigned long task_size; > unsigned long cached_hole_size; > unsigned long free_area_cache; > pgd_t * pgd; > atomic_t mm_users; > atomic_t mm_count; > int map_count; > struct rw_semaphore mmap_sem; > spinlock_t page_table_lock; > > struct list_head mmlist; > > > > > > > > mm_counter_t _file_rss; > mm_counter_t _anon_rss; > > unsigned long hiwater_rss; > unsigned long hiwater_vm; > > unsigned long total_vm, locked_vm, shared_vm, exec_vm; > unsigned long stack_vm, reserved_vm, def_flags, nr_ptes; > unsigned long start_code, end_code, start_data, end_data; > unsigned long start_brk, brk, start_stack; > unsigned long arg_start, arg_end, env_start, env_end; > > unsigned long saved_auxv[44]; > > cpumask_t cpu_vm_mask; > > > mm_context_t context; ># 363 "include/linux/sched.h" > unsigned int faultstamp; > unsigned int token_priority; > unsigned int last_interval; > > unsigned char dumpable:2; > > > int core_waiters; > struct completion *core_startup_done, core_done; > > > rwlock_t ioctx_list_lock; > struct kioctx *ioctx_list; >}; > >struct sighand_struct { > atomic_t count; > struct k_sigaction action[64]; > spinlock_t siglock; >}; > >struct pacct_struct { > int ac_flag; > long ac_exitcode; > unsigned long ac_mem; > cputime_t ac_utime, ac_stime; > unsigned long ac_minflt, ac_majflt; >}; ># 399 "include/linux/sched.h" >struct signal_struct { > atomic_t count; > atomic_t live; > > wait_queue_head_t wait_chldexit; > > > struct task_struct *curr_target; > > > struct sigpending shared_pending; > > > int group_exit_code; > > > > > > struct task_struct *group_exit_task; > int notify_count; > > > int group_stop_count; > unsigned int flags; > > > struct list_head posix_timers; > > > struct hrtimer real_timer; > struct task_struct *tsk; > ktime_t it_real_incr; > > > cputime_t it_prof_expires, it_virt_expires; > cputime_t it_prof_incr, it_virt_incr; > > > pid_t pgrp; > pid_t tty_old_pgrp; > > union { > pid_t session __attribute__((deprecated)); > pid_t __session; > }; > > > int leader; > > struct tty_struct *tty; > > > > > > > > cputime_t utime, stime, cutime, cstime; > unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; > unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; > > > > > > > > unsigned long long sched_time; ># 478 "include/linux/sched.h" > struct rlimit rlim[15]; > > struct list_head cpu_timers[3]; ># 489 "include/linux/sched.h" > struct pacct_struct pacct; > > > > >}; ># 504 "include/linux/sched.h" >#define SIGNAL_STOP_STOPPED 0x00000001 >#define SIGNAL_STOP_DEQUEUED 0x00000002 >#define SIGNAL_STOP_CONTINUED 0x00000004 >#define SIGNAL_GROUP_EXIT 0x00000008 ># 523 "include/linux/sched.h" >#define MAX_USER_RT_PRIO 100 >#define MAX_RT_PRIO MAX_USER_RT_PRIO > >#define MAX_PRIO (MAX_RT_PRIO + 40) > >#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) >#define rt_task(p) rt_prio((p)->prio) >#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) >#define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH) >#define has_rt_policy(p) unlikely(is_rt_policy((p)->policy)) > > > > >struct user_struct { > atomic_t __count; > atomic_t processes; > atomic_t files; > atomic_t sigpending; > > atomic_t inotify_watches; > atomic_t inotify_devs; > > > unsigned long mq_bytes; > unsigned long locked_shm; > > > > > > > > struct list_head uidhash_list; > uid_t uid; >}; > >extern struct user_struct *find_user(uid_t); > >extern struct user_struct root_user; >#define INIT_USER (&root_user) > >struct backing_dev_info; >struct reclaim_state; ># 615 "include/linux/sched.h" >static inline __attribute__((always_inline)) int sched_info_on(void) >{ > > > > > > > return 0; > >} > >enum idle_type >{ > SCHED_IDLE, > NOT_IDLE, > NEWLY_IDLE, > MAX_IDLE_TYPES >}; > > > > >#define SCHED_LOAD_SCALE 128UL ># 745 "include/linux/sched.h" >struct io_context; >struct cpuset; > >#define NGROUPS_SMALL 32 >#define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) >struct group_info { > int ngroups; > atomic_t usage; > gid_t small_block[32]; > int nblocks; > gid_t *blocks[0]; >}; > > > > > > > >#define get_group_info(group_info) do { atomic_inc(&(group_info)->usage); } while (0) > > > >#define put_group_info(group_info) do { if (atomic_dec_and_test(&(group_info)->usage)) groups_free(group_info); } while (0) > > > > >extern struct group_info *groups_alloc(int gidsetsize); >extern void groups_free(struct group_info *group_info); >extern int set_current_groups(struct group_info *group_info); >extern int groups_search(struct group_info *group_info, gid_t grp); > >#define GROUP_AT(gi,i) ((gi)->blocks[(i)/NGROUPS_PER_BLOCK][(i)%NGROUPS_PER_BLOCK]) > > > > > >static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { } > > >struct audit_context; >struct mempolicy; >struct pipe_inode_info; >struct uts_namespace; > >enum sleep_type { > SLEEP_NORMAL, > SLEEP_NONINTERACTIVE, > SLEEP_INTERACTIVE, > SLEEP_INTERRUPTED, >}; > >struct prio_array; > >struct task_struct { > volatile long state; > struct thread_info *thread_info; > atomic_t usage; > unsigned long flags; > unsigned long ptrace; > > int lock_depth; > > > > > > > int load_weight; > int prio, static_prio, normal_prio; > struct list_head run_list; > struct prio_array *array; > > unsigned short ioprio; > > > > unsigned long sleep_avg; > unsigned long long timestamp, last_ran; > unsigned long long sched_time; > enum sleep_type sleep_type; > > unsigned long policy; > cpumask_t cpus_allowed; > unsigned int time_slice, first_time_slice; > > > > > > struct list_head tasks; > > > > > struct list_head ptrace_children; > struct list_head ptrace_list; > > struct mm_struct *mm, *active_mm; > > > struct linux_binfmt *binfmt; > long exit_state; > int exit_code, exit_signal; > int pdeath_signal; > > unsigned long personality; > unsigned did_exec:1; > pid_t pid; > pid_t tgid; ># 867 "include/linux/sched.h" > struct task_struct *real_parent; > struct task_struct *parent; > > > > > struct list_head children; > struct list_head sibling; > struct task_struct *group_leader; > > > struct pid_link pids[PIDTYPE_MAX]; > struct list_head thread_group; > > struct completion *vfork_done; > int *set_child_tid; > int *clear_child_tid; > > unsigned long rt_priority; > cputime_t utime, stime; > unsigned long nvcsw, nivcsw; > struct timespec start_time; > > unsigned long min_flt, maj_flt; > > cputime_t it_prof_expires, it_virt_expires; > unsigned long long it_sched_expires; > struct list_head cpu_timers[3]; > > > uid_t uid,euid,suid,fsuid; > gid_t gid,egid,sgid,fsgid; > struct group_info *group_info; > kernel_cap_t cap_effective, cap_inheritable, cap_permitted; > unsigned keep_capabilities:1; > struct user_struct *user; ># 916 "include/linux/sched.h" > unsigned char fpu_counter; > int oomkilladj; > char comm[16]; > > > > > int link_count, total_link_count; > > > struct sysv_sem sysvsem; > > > struct thread_struct thread; > > struct fs_struct *fs; > > struct files_struct *files; > > struct nsproxy *nsproxy; > > struct signal_struct *signal; > struct sighand_struct *sighand; > > sigset_t blocked, real_blocked; > sigset_t saved_sigmask; > struct sigpending pending; > > unsigned long sas_ss_sp; > size_t sas_ss_size; > int (*notifier)(void *priv); > void *notifier_data; > sigset_t *notifier_mask; > > void *security; > struct audit_context *audit_context; > seccomp_t seccomp; > > > u32 parent_exec_id; > u32 self_exec_id; > > spinlock_t alloc_lock; > > > spinlock_t pi_lock; > > > > struct plist_head pi_waiters; > > struct rt_mutex_waiter *pi_blocked_on; > > > > > struct mutex_waiter *blocked_on; ># 998 "include/linux/sched.h" > void *journal_info; > > > struct reclaim_state *reclaim_state; > > struct backing_dev_info *backing_dev_info; > > struct io_context *io_context; > > unsigned long ptrace_message; > siginfo_t *last_siginfo; > > > > > > > wait_queue_t *io_wait; > > u64 rchar, wchar, syscr, syscw; > struct task_io_accounting ioac; ># 1034 "include/linux/sched.h" > struct robust_list_head *robust_list; > > > > struct list_head pi_state_list; > struct futex_pi_state *pi_state_cache; > > atomic_t fs_excl; > struct rcu_head rcu; > > > > > struct pipe_inode_info *splice_pipe; > > > > > > >}; > >static inline __attribute__((always_inline)) pid_t process_group(struct task_struct *tsk) >{ > return tsk->signal->pgrp; >} > >static inline __attribute__((always_inline)) pid_t signal_session(struct signal_struct *sig) >{ > return sig->__session; >} > >static inline __attribute__((always_inline)) pid_t process_session(struct task_struct *tsk) >{ > return signal_session(tsk->signal); >} > >static inline __attribute__((always_inline)) void set_signal_session(struct signal_struct *sig, pid_t session) >{ > sig->__session = session; >} > >static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task) >{ > return task->pids[PIDTYPE_PID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_PID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_PGID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_SID].pid; >} ># 1104 "include/linux/sched.h" >static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p) >{ > return p->pids[PIDTYPE_PID].pid != ((void *)0); >} > > > > > > > >static inline __attribute__((always_inline)) int is_init(struct task_struct *tsk) >{ > return tsk->pid == 1; >} > >extern struct pid *cad_pid; > >extern void free_task(struct task_struct *tsk); >#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) > >extern void __put_task_struct(struct task_struct *t); > >static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t) >{ > if (atomic_dec_and_test(&t->usage)) > __put_task_struct(t); >} > > > > >#define PF_ALIGNWARN 0x00000001 > >#define PF_STARTING 0x00000002 >#define PF_EXITING 0x00000004 >#define PF_FORKNOEXEC 0x00000040 >#define PF_SUPERPRIV 0x00000100 >#define PF_DUMPCORE 0x00000200 >#define PF_SIGNALED 0x00000400 >#define PF_MEMALLOC 0x00000800 >#define PF_FLUSHER 0x00001000 >#define PF_USED_MATH 0x00002000 >#define PF_NOFREEZE 0x00008000 >#define PF_FROZEN 0x00010000 >#define PF_FSTRANS 0x00020000 >#define PF_KSWAPD 0x00040000 >#define PF_SWAPOFF 0x00080000 >#define PF_LESS_THROTTLE 0x00100000 >#define PF_BORROWED_MM 0x00200000 >#define PF_RANDOMIZE 0x00400000 >#define PF_SWAPWRITE 0x00800000 >#define PF_SPREAD_PAGE 0x01000000 >#define PF_SPREAD_SLAB 0x02000000 >#define PF_MEMPOLICY 0x10000000 >#define PF_MUTEX_TESTER 0x20000000 ># 1172 "include/linux/sched.h" >#define clear_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH; } while (0) >#define set_stopped_child_used_math(child) do { (child)->flags |= PF_USED_MATH; } while (0) >#define clear_used_math() clear_stopped_child_used_math(current) >#define set_used_math() set_stopped_child_used_math(current) >#define conditional_stopped_child_used_math(condition,child) do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= (condition) ? PF_USED_MATH : 0; } while (0) > >#define conditional_used_math(condition) conditional_stopped_child_used_math(condition, current) > >#define copy_to_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= current->flags & PF_USED_MATH; } while (0) > > >#define tsk_used_math(p) ((p)->flags & PF_USED_MATH) >#define used_math() tsk_used_math(current) > > > > >static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) >{ > if (!(__builtin_constant_p((0)) ? constant_test_bit(((0)),((new_mask).bits)) : variable_test_bit(((0)),((new_mask).bits)))) > return -22; > return 0; >} > > >extern unsigned long long sched_clock(void); >extern unsigned long long >current_sched_time(const struct task_struct *current_task); > > > > > >#define sched_exec() {} > > > > > >static inline __attribute__((always_inline)) void idle_task_exit(void) {} > > >extern void sched_idle_next(void); > > >extern int rt_mutex_getprio(struct task_struct *p); >extern void rt_mutex_setprio(struct task_struct *p, int prio); >extern void rt_mutex_adjust_pi(struct task_struct *p); ># 1228 "include/linux/sched.h" >extern void set_user_nice(struct task_struct *p, long nice); >extern int task_prio(const struct task_struct *p); >extern int task_nice(const struct task_struct *p); >extern int can_nice(const struct task_struct *p, const int nice); >extern int task_curr(const struct task_struct *p); >extern int idle_cpu(int cpu); >extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); >extern struct task_struct *idle_task(int cpu); >extern struct task_struct *curr_task(int cpu); >extern void set_curr_task(int cpu, struct task_struct *p); > >void yield(void); > > > > >extern struct exec_domain default_exec_domain; > >union thread_union { > struct thread_info thread_info; > unsigned long stack[((1 << 2) * (1UL << 12))/sizeof(long)]; >}; > > >static inline __attribute__((always_inline)) int kstack_end(void *addr) >{ > > > > return !(((unsigned long)addr+sizeof(void*)-1) & (((1 << 2) * (1UL << 12))-sizeof(void*))); >} > > >extern union thread_union init_thread_union; >extern struct task_struct init_task; > >extern struct mm_struct init_mm; > >#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) >extern struct task_struct *find_task_by_pid_type(int type, int pid); >extern void __set_special_pids(pid_t session, pid_t pgrp); > > >extern struct user_struct * alloc_uid(uid_t); >static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u) >{ > atomic_inc(&u->__count); > return u; >} >extern void free_uid(struct user_struct *); >extern void switch_uid(struct user_struct *); > > > >extern void do_timer(unsigned long ticks); > >extern int wake_up_state(struct task_struct * tsk, unsigned int state) __attribute__((regparm(3))); >extern int wake_up_process(struct task_struct * tsk) __attribute__((regparm(3))); >extern void wake_up_new_task(struct task_struct * tsk, unsigned long clone_flags) __attribute__((regparm(3))); > > > > > static inline __attribute__((always_inline)) void kick_process(struct task_struct *tsk) { } > >extern void sched_fork(struct task_struct * p, int clone_flags) __attribute__((regparm(3))); >extern void sched_exit(struct task_struct * p) __attribute__((regparm(3))); > >extern int in_group_p(gid_t); >extern int in_egroup_p(gid_t); > >extern void proc_caches_init(void); >extern void flush_signals(struct task_struct *); >extern void flush_signal_handlers(struct task_struct *, int force_default); >extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); > >static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) >{ > unsigned long flags; > int ret; > > flags = _spin_lock_irqsave(&tsk->sighand->siglock); > ret = dequeue_signal(tsk, mask, info); > _spin_unlock_irqrestore(&tsk->sighand->siglock, flags); > > return ret; >} > >extern void block_all_signals(int (*notifier)(void *priv), void *priv, > sigset_t *mask); >extern void unblock_all_signals(void); >extern void release_task(struct task_struct * p); >extern int send_sig_info(int, struct siginfo *, struct task_struct *); >extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); >extern int force_sigsegv(int, struct task_struct *); >extern int force_sig_info(int, struct siginfo *, struct task_struct *); >extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); >extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); >extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); >extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); >extern int kill_pgrp(struct pid *pid, int sig, int priv); >extern int kill_pid(struct pid *pid, int sig, int priv); >extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); >extern int kill_pg_info(int, struct siginfo *, pid_t); >extern void do_notify_parent(struct task_struct *, int); >extern void force_sig(int, struct task_struct *); >extern void force_sig_specific(int, struct task_struct *); >extern int send_sig(int, struct task_struct *, int); >extern void zap_other_threads(struct task_struct *p); >extern int kill_pg(pid_t, int, int); >extern int kill_proc(pid_t, int, int); >extern struct sigqueue *sigqueue_alloc(void); >extern void sigqueue_free(struct sigqueue *); >extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); >extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); >extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); >extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long); > >static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv) >{ > return kill_pid(cad_pid, sig, priv); >} > > >#define SEND_SIG_NOINFO ((struct siginfo *) 0) >#define SEND_SIG_PRIV ((struct siginfo *) 1) >#define SEND_SIG_FORCED ((struct siginfo *) 2) > >static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info) >{ > return info <= ((struct siginfo *) 2); >} > > > >static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp) >{ > return (sp - (current_thread_info()->task)->sas_ss_sp < (current_thread_info()->task)->sas_ss_size); >} > >static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp) >{ > return ((current_thread_info()->task)->sas_ss_size == 0 ? 2 > : on_sig_stack(sp) ? 1 : 0); >} > > > > >extern struct mm_struct * mm_alloc(void); > > >extern void __mmdrop(struct mm_struct *) __attribute__((regparm(3))); >static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm) >{ > if (atomic_dec_and_test(&mm->mm_count)) > __mmdrop(mm); >} > > >extern void mmput(struct mm_struct *); > >extern struct mm_struct *get_task_mm(struct task_struct *task); > >extern void mm_release(struct task_struct *, struct mm_struct *); > >extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); >extern void flush_thread(void); >extern void exit_thread(void); > >extern void exit_files(struct task_struct *); >extern void __cleanup_signal(struct signal_struct *); >extern void __cleanup_sighand(struct sighand_struct *); >extern void exit_itimers(struct signal_struct *); > >extern void do_group_exit(int); > >extern void daemonize(const char *, ...); >extern int allow_signal(int); >extern int disallow_signal(int); > >extern int do_execve(char *, char * *, char * *, struct pt_regs *); >extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *); >struct task_struct *fork_idle(int); > >extern void set_task_comm(struct task_struct *tsk, char *from); >extern void get_task_comm(char *to, struct task_struct *tsk); > > > > >#define wait_task_inactive(p) do { } while (0) > > >#define remove_parent(p) list_del_init(&(p)->sibling) >#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) > >#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) > >#define for_each_process(p) for (p = &init_task ; (p = next_task(p)) != &init_task ; ) > > > > > > >#define do_each_thread(g,t) for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do > > >#define while_each_thread(g,t) while ((t = next_thread(t)) != g) > > > >#define thread_group_leader(p) (p == p->group_leader) > > > > > > > >static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p) >{ > return p->pid == p->tgid; >} > >static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p) >{ > return ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = (({ typeof(p->thread_group.next) _________p1 = p->thread_group.next; do { } while(0); (_________p1); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );}); > >} > >static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p) >{ > return list_empty(&p->thread_group); >} > >#define delay_group_leader(p) (thread_group_leader(p) && !thread_group_empty(p)) ># 1477 "include/linux/sched.h" >static inline __attribute__((always_inline)) void task_lock(struct task_struct *p) >{ > _spin_lock(&p->alloc_lock); >} > >static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p) >{ > _spin_unlock(&p->alloc_lock); >} > >extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, > unsigned long *flags); > >static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk, > unsigned long *flags) >{ > _spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); >} > > > >#define task_thread_info(task) (task)->thread_info >#define task_stack_page(task) ((void*)((task)->thread_info)) > >static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org) >{ > *(p)->thread_info = *(org)->thread_info; > (p)->thread_info->task = p; >} > >static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p) >{ > return (unsigned long *)(p->thread_info + 1); >} > > > > > > >static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > set_ti_thread_flag((tsk)->thread_info, flag); >} > >static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > clear_ti_thread_flag((tsk)->thread_info, flag); >} > >static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_and_set_ti_thread_flag((tsk)->thread_info, flag); >} > >static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_and_clear_ti_thread_flag((tsk)->thread_info, flag); >} > >static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_ti_thread_flag((tsk)->thread_info, flag); >} > >static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk) >{ > set_tsk_thread_flag(tsk,2); >} > >static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk) >{ > clear_tsk_thread_flag(tsk,2); >} > >static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p) >{ > return __builtin_expect(!!(test_tsk_thread_flag(p,1)), 0); >} > >static inline __attribute__((always_inline)) int need_resched(void) >{ > return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 2)), 0); >} ># 1569 "include/linux/sched.h" >extern int cond_resched(void); >extern int cond_resched_lock(spinlock_t * lock); >extern int cond_resched_softirq(void); ># 1580 "include/linux/sched.h" >#define need_lockbreak(lock) 0 > > > > > > >static inline __attribute__((always_inline)) int lock_need_resched(spinlock_t *lock) >{ > if (0 || need_resched()) > return 1; > return 0; >} > > > > > >extern void recalc_sigpending_tsk(struct task_struct *t) __attribute__((regparm(3))); >extern void recalc_sigpending(void); > >extern void signal_wake_up(struct task_struct *t, int resume_stopped); ># 1620 "include/linux/sched.h" >static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) void set_task_cpu(struct task_struct *p, unsigned int cpu) >{ >} > > > > > > >static inline __attribute__((always_inline)) void arch_pick_mmap_layout(struct mm_struct *mm) >{ > mm->mmap_base = (0x40000000); > mm->get_unmapped_area = arch_get_unmapped_area; > mm->unmap_area = arch_unmap_area; >} > > >extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); >extern long sched_getaffinity(pid_t pid, cpumask_t *mask); > ># 1 "include/linux/sysdev.h" 1 ># 22 "include/linux/sysdev.h" >#define _SYSDEV_H_ > ># 1 "include/linux/kobject.h" 1 ># 16 "include/linux/kobject.h" >#define _KOBJECT_H_ > > > > > ># 1 "include/linux/sysfs.h" 1 ># 11 "include/linux/sysfs.h" >#define _SYSFS_H_ > > > > >struct kobject; >struct module; > >struct attribute { > const char * name; > struct module * owner; > mode_t mode; >}; > >struct attribute_group { > const char * name; > struct attribute ** attrs; >}; ># 37 "include/linux/sysfs.h" >#define __ATTR(_name,_mode,_show,_store) { .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, .show = _show, .store = _store, } > > > > > >#define __ATTR_RO(_name) { .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, .show = _name ##_show, } > > > > >#define __ATTR_NULL { .attr = { .name = NULL } } > >#define attr_name(_attr) (_attr).attr.name > >struct vm_area_struct; > >struct bin_attribute { > struct attribute attr; > size_t size; > void *private; > ssize_t (*read)(struct kobject *, char *, loff_t, size_t); > ssize_t (*write)(struct kobject *, char *, loff_t, size_t); > int (*mmap)(struct kobject *, struct bin_attribute *attr, > struct vm_area_struct *vma); >}; > >struct sysfs_ops { > ssize_t (*show)(struct kobject *, struct attribute *,char *); > ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); >}; > >struct sysfs_dirent { > atomic_t s_count; > struct list_head s_sibling; > struct list_head s_children; > void * s_element; > int s_type; > umode_t s_mode; > struct dentry * s_dentry; > struct iattr * s_iattr; > atomic_t s_event; >}; > >#define SYSFS_ROOT 0x0001 >#define SYSFS_DIR 0x0002 >#define SYSFS_KOBJ_ATTR 0x0004 >#define SYSFS_KOBJ_BIN_ATTR 0x0008 >#define SYSFS_KOBJ_LINK 0x0020 >#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK) > > > >extern int __attribute__((warn_unused_result)) >sysfs_create_dir(struct kobject *); > >extern void >sysfs_remove_dir(struct kobject *); > >extern int __attribute__((warn_unused_result)) >sysfs_rename_dir(struct kobject *, const char *new_name); > >extern int __attribute__((warn_unused_result)) >sysfs_move_dir(struct kobject *, struct kobject *); > >extern int __attribute__((warn_unused_result)) >sysfs_create_file(struct kobject *, const struct attribute *); > >extern int __attribute__((warn_unused_result)) >sysfs_update_file(struct kobject *, const struct attribute *); > >extern int __attribute__((warn_unused_result)) >sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); > >extern void >sysfs_remove_file(struct kobject *, const struct attribute *); > >extern int __attribute__((warn_unused_result)) >sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name); > >extern void >sysfs_remove_link(struct kobject *, const char * name); > >int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj, > struct bin_attribute *attr); >void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); > >int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *, > const struct attribute_group *); >void sysfs_remove_group(struct kobject *, const struct attribute_group *); >void sysfs_notify(struct kobject * k, char *dir, char *attr); > >extern int __attribute__((warn_unused_result)) sysfs_init(void); ># 23 "include/linux/kobject.h" 2 ># 31 "include/linux/kobject.h" >#define KOBJ_NAME_LEN 20 >#define UEVENT_HELPER_PATH_LEN 256 > > >extern char uevent_helper[]; > > >extern u64 uevent_seqnum; > > >typedef int kobject_action_t; >enum kobject_action { > KOBJ_ADD = ( kobject_action_t) 0x01, > KOBJ_REMOVE = ( kobject_action_t) 0x02, > KOBJ_CHANGE = ( kobject_action_t) 0x03, > KOBJ_MOUNT = ( kobject_action_t) 0x04, > KOBJ_UMOUNT = ( kobject_action_t) 0x05, > KOBJ_OFFLINE = ( kobject_action_t) 0x06, > KOBJ_ONLINE = ( kobject_action_t) 0x07, > KOBJ_MOVE = ( kobject_action_t) 0x08, >}; > >struct kobject { > const char * k_name; > char name[20]; > struct kref kref; > struct list_head entry; > struct kobject * parent; > struct kset * kset; > struct kobj_type * ktype; > struct dentry * dentry; > wait_queue_head_t poll; >}; > >extern int kobject_set_name(struct kobject *, const char *, ...) > __attribute__((format(printf,2,3))); > >static inline __attribute__((always_inline)) const char * kobject_name(const struct kobject * kobj) >{ > return kobj->k_name; >} > >extern void kobject_init(struct kobject *); >extern void kobject_cleanup(struct kobject *); > >extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *); >extern void kobject_del(struct kobject *); > >extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name); >extern int __attribute__((warn_unused_result)) kobject_move(struct kobject *, struct kobject *); > >extern int __attribute__((warn_unused_result)) kobject_register(struct kobject *); >extern void kobject_unregister(struct kobject *); > >extern struct kobject * kobject_get(struct kobject *); >extern void kobject_put(struct kobject *); > >extern struct kobject *kobject_add_dir(struct kobject *, const char *); > >extern char * kobject_get_path(struct kobject *, gfp_t); > >struct kobj_type { > void (*release)(struct kobject *); > struct sysfs_ops * sysfs_ops; > struct attribute ** default_attrs; >}; ># 116 "include/linux/kobject.h" >struct kset_uevent_ops { > int (*filter)(struct kset *kset, struct kobject *kobj); > const char *(*name)(struct kset *kset, struct kobject *kobj); > int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp, > int num_envp, char *buffer, int buffer_size); >}; > >struct kset { > struct subsystem * subsys; > struct kobj_type * ktype; > struct list_head list; > spinlock_t list_lock; > struct kobject kobj; > struct kset_uevent_ops * uevent_ops; >}; > > >extern void kset_init(struct kset * k); >extern int __attribute__((warn_unused_result)) kset_add(struct kset * k); >extern int __attribute__((warn_unused_result)) kset_register(struct kset * k); >extern void kset_unregister(struct kset * k); > >static inline __attribute__((always_inline)) struct kset * to_kset(struct kobject * kobj) >{ > return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0); >} > >static inline __attribute__((always_inline)) struct kset * kset_get(struct kset * k) >{ > return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0); >} > >static inline __attribute__((always_inline)) void kset_put(struct kset * k) >{ > kobject_put(&k->kobj); >} > >static inline __attribute__((always_inline)) struct kobj_type * get_ktype(struct kobject * k) >{ > if (k->kset && k->kset->ktype) > return k->kset->ktype; > else > return k->ktype; >} > >extern struct kobject * kset_find_obj(struct kset *, const char *); > > > > > > >#define set_kset_name(str) .kset = { .kobj = { .name = str } } > > > >struct subsystem { > struct kset kset; > struct rw_semaphore rwsem; >}; > >#define decl_subsys(_name,_type,_uevent_ops) struct subsystem _name ##_subsys = { .kset = { .kobj = { .name = __stringify(_name) }, .ktype = _type, .uevent_ops =_uevent_ops, } } > > > > > > > >#define decl_subsys_name(_varname,_name,_type,_uevent_ops) struct subsystem _varname ##_subsys = { .kset = { .kobj = { .name = __stringify(_name) }, .ktype = _type, .uevent_ops =_uevent_ops, } } ># 195 "include/linux/kobject.h" >extern struct subsystem kernel_subsys; > >extern struct subsystem hypervisor_subsys; ># 214 "include/linux/kobject.h" >#define kobj_set_kset_s(obj,subsys) (obj)->kobj.kset = &(subsys).kset ># 228 "include/linux/kobject.h" >#define kset_set_kset_s(obj,subsys) (obj)->kset.kobj.kset = &(subsys).kset ># 241 "include/linux/kobject.h" >#define subsys_set_kset(obj,_subsys) (obj)->subsys.kset.kobj.kset = &(_subsys).kset > > >extern void subsystem_init(struct subsystem *); >extern int __attribute__((warn_unused_result)) subsystem_register(struct subsystem *); >extern void subsystem_unregister(struct subsystem *); > >static inline __attribute__((always_inline)) struct subsystem * subsys_get(struct subsystem * s) >{ > return s ? ({ const typeof( ((struct subsystem *)0)->kset ) *__mptr = (kset_get(&s->kset)); (struct subsystem *)( (char *)__mptr - __builtin_offsetof(struct subsystem,kset) );}) : ((void *)0); >} > >static inline __attribute__((always_inline)) void subsys_put(struct subsystem * s) >{ > kset_put(&s->kset); >} > >struct subsys_attribute { > struct attribute attr; > ssize_t (*show)(struct subsystem *, char *); > ssize_t (*store)(struct subsystem *, const char *, size_t); >}; > >extern int __attribute__((warn_unused_result)) subsys_create_file(struct subsystem * , > struct subsys_attribute *); > > >void kobject_uevent(struct kobject *kobj, enum kobject_action action); >void kobject_uevent_env(struct kobject *kobj, enum kobject_action action, > char *envp[]); > >int add_uevent_var(char **envp, int num_envp, int *cur_index, > char *buffer, int buffer_size, int *cur_len, > const char *format, ...) > __attribute__((format (printf, 7, 8))); ># 25 "include/linux/sysdev.h" 2 ># 1 "include/linux/pm.h" 1 ># 22 "include/linux/pm.h" >#define _LINUX_PM_H ># 34 "include/linux/pm.h" >typedef int pm_request_t; > >#define PM_SUSPEND ((__force pm_request_t) 1) >#define PM_RESUME ((__force pm_request_t) 2) > > > > > >typedef int pm_dev_t; > >#define PM_UNKNOWN_DEV ((__force pm_dev_t) 0) >#define PM_SYS_DEV ((__force pm_dev_t) 1) >#define PM_PCI_DEV ((__force pm_dev_t) 2) >#define PM_USB_DEV ((__force pm_dev_t) 3) >#define PM_SCSI_DEV ((__force pm_dev_t) 4) >#define PM_ISA_DEV ((__force pm_dev_t) 5) >#define PM_MTD_DEV ((__force pm_dev_t) 6) > > > > >enum >{ > PM_SYS_UNKNOWN = 0x00000000, > PM_SYS_KBC = 0x41d00303, > PM_SYS_COM = 0x41d00500, > PM_SYS_IRDA = 0x41d00510, > PM_SYS_FDC = 0x41d00700, > PM_SYS_VGA = 0x41d00900, > PM_SYS_PCMCIA = 0x41d00e00, >}; > > > > >#define PM_PCI_ID(dev) ((dev)->bus->number << 16 | (dev)->devfn) > > > > >struct pm_dev; > >typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data); > > > > >struct pm_dev >{ > pm_dev_t type; > unsigned long id; > pm_callback callback; > void *data; > > unsigned long flags; > unsigned long state; > unsigned long prev_state; > > struct list_head entry; >}; > > > > > > > >extern void (*pm_idle)(void); >extern void (*pm_power_off)(void); > >typedef int suspend_state_t; > >#define PM_SUSPEND_ON ((__force suspend_state_t) 0) >#define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1) >#define PM_SUSPEND_MEM ((__force suspend_state_t) 3) >#define PM_SUSPEND_DISK ((__force suspend_state_t) 4) >#define PM_SUSPEND_MAX ((__force suspend_state_t) 5) > >typedef int suspend_disk_method_t; > >#define PM_DISK_FIRMWARE ((__force suspend_disk_method_t) 1) >#define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 2) >#define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 3) >#define PM_DISK_REBOOT ((__force suspend_disk_method_t) 4) >#define PM_DISK_TEST ((__force suspend_disk_method_t) 5) >#define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) >#define PM_DISK_MAX ((__force suspend_disk_method_t) 7) > >struct pm_ops { > suspend_disk_method_t pm_disk_mode; > int (*valid)(suspend_state_t state); > int (*prepare)(suspend_state_t state); > int (*enter)(suspend_state_t state); > int (*finish)(suspend_state_t state); >}; > >extern void pm_set_ops(struct pm_ops *); >extern struct pm_ops *pm_ops; >extern int pm_suspend(suspend_state_t state); > > > > > > >struct device; > >typedef struct pm_message { > int event; >} pm_message_t; ># 195 "include/linux/pm.h" >#define PM_EVENT_ON 0 >#define PM_EVENT_FREEZE 1 >#define PM_EVENT_SUSPEND 2 >#define PM_EVENT_PRETHAW 3 > >#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) >#define PMSG_PRETHAW ((struct pm_message){ .event = PM_EVENT_PRETHAW, }) >#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) >#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) > >struct dev_pm_info { > pm_message_t power_state; > unsigned can_wakeup:1; > > > > > > > >}; > >extern void device_pm_set_parent(struct device * dev, struct device * parent); > >extern int device_power_down(pm_message_t state); >extern void device_power_up(void); >extern void device_resume(void); ># 245 "include/linux/pm.h" >static inline __attribute__((always_inline)) int device_suspend(pm_message_t state) >{ > return 0; >} > >#define device_set_wakeup_enable(dev,val) do{}while(0) >#define device_may_wakeup(dev) (0) > >static inline __attribute__((always_inline)) int dpm_runtime_suspend(struct device * dev, pm_message_t state) >{ > return 0; >} > >static inline __attribute__((always_inline)) void dpm_runtime_resume(struct device * dev) >{ >} > >#define suspend_report_result(fn,ret) do { } while (0) > > > > > > >#define device_can_wakeup(dev) ((dev)->power.can_wakeup) > >#define device_init_wakeup(dev,val) do { device_can_wakeup(dev) = !!(val); device_set_wakeup_enable(dev,val); } while(0) ># 26 "include/linux/sysdev.h" 2 > > >struct sys_device; > >struct sysdev_class { > struct list_head drivers; > > > int (*shutdown)(struct sys_device *); > int (*suspend)(struct sys_device *, pm_message_t state); > int (*resume)(struct sys_device *); > struct kset kset; >}; > >struct sysdev_class_attribute { > struct attribute attr; > ssize_t (*show)(struct sysdev_class *, char *); > ssize_t (*store)(struct sysdev_class *, const char *, size_t); >}; > >#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_ ##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, }; > > > > > > > >extern int sysdev_class_register(struct sysdev_class *); >extern void sysdev_class_unregister(struct sysdev_class *); > >extern int sysdev_class_create_file(struct sysdev_class *, > struct sysdev_class_attribute *); >extern void sysdev_class_remove_file(struct sysdev_class *, > struct sysdev_class_attribute *); > > > > >struct sysdev_driver { > struct list_head entry; > int (*add)(struct sys_device *); > int (*remove)(struct sys_device *); > int (*shutdown)(struct sys_device *); > int (*suspend)(struct sys_device *, pm_message_t state); > int (*resume)(struct sys_device *); >}; > > >extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *); >extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *); > > > > > > > >struct sys_device { > u32 id; > struct sysdev_class * cls; > struct kobject kobj; >}; > >extern int sysdev_register(struct sys_device *); >extern void sysdev_unregister(struct sys_device *); > > >struct sysdev_attribute { > struct attribute attr; > ssize_t (*show)(struct sys_device *, char *); > ssize_t (*store)(struct sys_device *, const char *, size_t); >}; > > >#define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_ ##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, }; > > > > > > >extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); >extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); ># 1646 "include/linux/sched.h" 2 >extern int sched_mc_power_savings, sched_smt_power_savings; >extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; >extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); > >extern void normalize_rt_tasks(void); ># 10 "include/asm/uaccess.h" 2 > >#define VERIFY_READ 0 >#define VERIFY_WRITE 1 ># 22 "include/asm/uaccess.h" >#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) > >#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) >#define USER_DS MAKE_MM_SEG(TASK_SIZE) > >#define get_ds() (KERNEL_DS) >#define get_fs() (current_thread_info()->addr_limit) >#define set_fs(x) (current_thread_info()->addr_limit = (x)) > >#define segment_eq(a,b) ((a).seg == (b).seg) > ># 1 "arch/um/include/um_uaccess.h" 1 > > > > > > >#define __ARCH_UM_UACCESS_H ># 16 "arch/um/include/um_uaccess.h" ># 1 "/home/yan_b/uml/linux-2.6.20-rc1_uml/arch/um/include/skas/uaccess-skas.h" 1 > > > > > > >#define __SKAS_UACCESS_H > > > > >#define access_ok_skas(type,addr,size) 0 > >extern int copy_from_user_skas(void *to, const void *from, int n); >extern int copy_to_user_skas(void *to, const void *from, int n); >extern int strncpy_from_user_skas(char *dst, const char *src, int count); >extern int __clear_user_skas(void *mem, int len); >extern int clear_user_skas(void *mem, int len); >extern int strnlen_user_skas(const void *str, int len); ># 17 "arch/um/include/um_uaccess.h" 2 > > ># 1 "include/asm/fixmap.h" 1 > >#define __UM_FIXMAP_H > ># 1 "include/asm/kmap_types.h" 1 > > > > > > >#define __UM_KMAP_TYPES_H > > > >enum km_type { > KM_BOUNCE_READ, > KM_SKB_SUNRPC_DATA, > KM_SKB_DATA_SOFTIRQ, > KM_USER0, > KM_USER1, > KM_UML_USERCOPY, > KM_BIO_SRC_IRQ, > KM_BIO_DST_IRQ, > KM_PTE0, > KM_PTE1, > KM_IRQ0, > KM_IRQ1, > KM_SOFTIRQ0, > KM_SOFTIRQ1, > KM_TYPE_NR >}; ># 5 "include/asm/fixmap.h" 2 ># 1 "include/asm/archparam.h" 1 ># 6 "include/asm/fixmap.h" 2 ># 1 "include/asm/elf.h" 1 > > > > > >#define __UM_ELF_I386_H > ># 1 "include/asm/user.h" 1 > >#define __UM_USER_H ># 9 "include/asm/elf.h" 2 > >#define R_386_NONE 0 >#define R_386_32 1 >#define R_386_PC32 2 >#define R_386_GOT32 3 >#define R_386_PLT32 4 >#define R_386_COPY 5 >#define R_386_GLOB_DAT 6 >#define R_386_JMP_SLOT 7 >#define R_386_RELATIVE 8 >#define R_386_GOTOFF 9 >#define R_386_GOTPC 10 >#define R_386_NUM 11 > >typedef unsigned long elf_greg_t; > >#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) >typedef elf_greg_t elf_gregset_t[(sizeof (struct user_regs_struct) / sizeof(elf_greg_t))]; > >typedef struct user_i387_struct elf_fpregset_t; > > > > >#define elf_check_arch(x) (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) > > >#define ELF_CLASS ELFCLASS32 >#define ELF_DATA ELFDATA2LSB >#define ELF_ARCH EM_386 > >#define ELF_PLAT_INIT(regs,load_addr) do { PT_REGS_EBX(regs) = 0; PT_REGS_ECX(regs) = 0; PT_REGS_EDX(regs) = 0; PT_REGS_ESI(regs) = 0; PT_REGS_EDI(regs) = 0; PT_REGS_EBP(regs) = 0; PT_REGS_EAX(regs) = 0; } while(0) ># 50 "include/asm/elf.h" >#define USE_ELF_CORE_DUMP >#define ELF_EXEC_PAGESIZE 4096 > >#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) > > > >#define ELF_CORE_COPY_REGS(pr_reg,regs) do { pr_reg[0] = PT_REGS_EBX(regs); pr_reg[1] = PT_REGS_ECX(regs); pr_reg[2] = PT_REGS_EDX(regs); pr_reg[3] = PT_REGS_ESI(regs); pr_reg[4] = PT_REGS_EDI(regs); pr_reg[5] = PT_REGS_EBP(regs); pr_reg[6] = PT_REGS_EAX(regs); pr_reg[7] = PT_REGS_DS(regs); pr_reg[8] = PT_REGS_ES(regs); pr_reg[9] = PT_REGS_DS(regs); pr_reg[10] = PT_REGS_DS(regs); pr_reg[11] = PT_REGS_SYSCALL_NR(regs); pr_reg[12] = PT_REGS_IP(regs); pr_reg[13] = PT_REGS_CS(regs); pr_reg[14] = PT_REGS_EFLAGS(regs); pr_reg[15] = PT_REGS_SP(regs); pr_reg[16] = PT_REGS_SS(regs); } while(0); ># 78 "include/asm/elf.h" >extern long elf_aux_hwcap; >#define ELF_HWCAP (elf_aux_hwcap) > >extern char * elf_aux_platform; >#define ELF_PLATFORM (elf_aux_platform) > >#define SET_PERSONALITY(ex,ibcs2) do ; while(0) > >extern unsigned long vsyscall_ehdr; >extern unsigned long vsyscall_end; >extern unsigned long __kernel_vsyscall; > >#define VSYSCALL_BASE vsyscall_ehdr >#define VSYSCALL_END vsyscall_end > > > > > >#define FIXADDR_USER_START VSYSCALL_BASE >#define FIXADDR_USER_END VSYSCALL_END > > > > > >#define AT_SYSINFO 32 >#define AT_SYSINFO_EHDR 33 > >#define ARCH_DLINFO do { if ( vsyscall_ehdr ) { NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); } } while (0) ># 123 "include/asm/elf.h" >#define ELF_CORE_EXTRA_PHDRS (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) > > >#define ELF_CORE_WRITE_EXTRA_PHDRS if ( vsyscall_ehdr ) { const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; const struct elf_phdr *const phdrp = (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); int i; Elf32_Off ofs = 0; for (i = 0; i < ehdrp->e_phnum; ++i) { struct elf_phdr phdr = phdrp[i]; if (phdr.p_type == PT_LOAD) { ofs = phdr.p_offset = offset; offset += phdr.p_filesz; } else phdr.p_offset += ofs; phdr.p_paddr = 0; DUMP_WRITE(&phdr, sizeof(phdr)); } } ># 145 "include/asm/elf.h" >#define ELF_CORE_WRITE_EXTRA_DATA if ( vsyscall_ehdr ) { const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; const struct elf_phdr *const phdrp = (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); int i; for (i = 0; i < ehdrp->e_phnum; ++i) { if (phdrp[i].p_type == PT_LOAD) DUMP_WRITE((void *) phdrp[i].p_vaddr, phdrp[i].p_filesz); } } ># 7 "include/asm/fixmap.h" 2 ># 33 "include/asm/fixmap.h" >enum fixed_addresses { > > > > > __end_of_fixed_addresses >}; > >extern void __set_fixmap (enum fixed_addresses idx, > unsigned long phys, pgprot_t flags); > >#define set_fixmap(idx,phys) __set_fixmap(idx, phys, PAGE_KERNEL) > > > > >#define set_fixmap_nocache(idx,phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) ># 58 "include/asm/fixmap.h" >extern unsigned long get_kmem_end(void); > >#define FIXADDR_TOP (get_kmem_end() - 0x2000) >#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) >#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) > >#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) >#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) > >extern void __this_fixmap_does_not_exist(void); > > > > > > >static inline __attribute__((always_inline)) unsigned long fix_to_virt(const unsigned int idx) >{ ># 85 "include/asm/fixmap.h" > if (idx >= __end_of_fixed_addresses) > __this_fixmap_does_not_exist(); > > return ((get_kmem_end() - 0x2000) - ((idx) << 12)); >} > >static inline __attribute__((always_inline)) unsigned long virt_to_fix(const unsigned long vaddr) >{ > do { if (__builtin_expect(!!((vaddr >= (get_kmem_end() - 0x2000) || vaddr < ((get_kmem_end() - 0x2000) - (__end_of_fixed_addresses << 12)))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/asm/fixmap.h"), "i" (93), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > return (((get_kmem_end() - 0x2000) - ((vaddr)&(~((1UL << 12)-1)))) >> 12); >} ># 20 "arch/um/include/um_uaccess.h" 2 > >#define __under_task_size(addr,size) (((unsigned long) (addr) < TASK_SIZE) && (((unsigned long) (addr) + (size)) < TASK_SIZE)) > > > >#define __access_ok_vsyscall(type,addr,size) ((type == VERIFY_READ) && ((unsigned long) (addr) >= FIXADDR_USER_START) && ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && ((unsigned long) (addr) + (size) >= (unsigned long)(addr))) > > > > > >#define __addr_range_nowrap(addr,size) ((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) > > >#define access_ok(type,addr,size) (__addr_range_nowrap(addr, size) && (__under_task_size(addr, size) || __access_ok_vsyscall(type, addr, size) || segment_eq(get_fs(), KERNEL_DS) || CHOOSE_MODE_PROC(access_ok_tt, access_ok_skas, type, addr, size))) > > > > > > >static inline __attribute__((always_inline)) int copy_from_user(void *to, const void *from, int n) >{ > return((copy_from_user_skas(to, from, n))); > >} > >static inline __attribute__((always_inline)) int copy_to_user(void *to, const void *from, int n) >{ > return((copy_to_user_skas(to, from, n))); > >} ># 72 "arch/um/include/um_uaccess.h" >static inline __attribute__((always_inline)) int strncpy_from_user(char *dst, const char *src, int count) >{ > return((strncpy_from_user_skas(dst, src, count))); > >} ># 89 "arch/um/include/um_uaccess.h" >static inline __attribute__((always_inline)) int __clear_user(void *mem, int len) >{ > return((__clear_user_skas(mem, len))); >} ># 104 "arch/um/include/um_uaccess.h" >static inline __attribute__((always_inline)) int clear_user(void *mem, int len) >{ > return((clear_user_skas(mem, len))); >} ># 120 "arch/um/include/um_uaccess.h" >static inline __attribute__((always_inline)) int strnlen_user(const void *str, long len) >{ > return((strnlen_user_skas(str, len))); >} ># 34 "include/asm/uaccess.h" 2 > >#define __copy_from_user(to,from,n) copy_from_user(to, from, n) > >#define __copy_to_user(to,from,n) copy_to_user(to, from, n) > >#define __copy_to_user_inatomic __copy_to_user >#define __copy_from_user_inatomic __copy_from_user > >#define __get_user(x,ptr) ({ const __typeof__(*(ptr)) __user *__private_ptr = (ptr); __typeof__(x) __private_val; int __private_ret = -EFAULT; (x) = (__typeof__(*(__private_ptr)))0; if (__copy_from_user((__force void *)&__private_val, (__private_ptr), sizeof(*(__private_ptr))) == 0) { (x) = (__typeof__(*(__private_ptr))) __private_val; __private_ret = 0; } __private_ret; }) ># 56 "include/asm/uaccess.h" >#define get_user(x,ptr) ({ const __typeof__((*(ptr))) __user *private_ptr = (ptr); (access_ok(VERIFY_READ, private_ptr, sizeof(*private_ptr)) ? __get_user(x, private_ptr) : ((x) = (__typeof__(*ptr))0, -EFAULT)); }) > > > > > > >#define __put_user(x,ptr) ({ __typeof__(*(ptr)) __user *__private_ptr = ptr; __typeof__(*(__private_ptr)) __private_val; int __private_ret = -EFAULT; __private_val = (__typeof__(*(__private_ptr))) (x); if (__copy_to_user((__private_ptr), &__private_val, sizeof(*(__private_ptr))) == 0) { __private_ret = 0; } __private_ret; }) ># 76 "include/asm/uaccess.h" >#define put_user(x,ptr) ({ __typeof__(*(ptr)) __user *private_ptr = (ptr); (access_ok(VERIFY_WRITE, private_ptr, sizeof(*private_ptr)) ? __put_user(x, private_ptr) : -EFAULT); }) > > > > > > >#define strlen_user(str) strnlen_user(str, ~0UL >> 1) > >struct exception_table_entry >{ > unsigned long insn; > unsigned long fixup; >}; ># 48 "net/ipv4/ip_output.c" 2 > ># 1 "include/linux/module.h" 1 > >#define _LINUX_MODULE_H ># 11 "include/linux/module.h" ># 1 "include/linux/stat.h" 1 > >#define _LINUX_STAT_H > > > ># 1 "include/asm/stat.h" 1 > >#define __UM_STAT_H > ># 1 "include/asm/arch/stat.h" 1 > >#define _I386_STAT_H > >struct __old_kernel_stat { > unsigned short st_dev; > unsigned short st_ino; > unsigned short st_mode; > unsigned short st_nlink; > unsigned short st_uid; > unsigned short st_gid; > unsigned short st_rdev; > unsigned long st_size; > unsigned long st_atime; > unsigned long st_mtime; > unsigned long st_ctime; >}; > >struct stat { > unsigned long st_dev; > unsigned long st_ino; > unsigned short st_mode; > unsigned short st_nlink; > unsigned short st_uid; > unsigned short st_gid; > unsigned long st_rdev; > unsigned long st_size; > unsigned long st_blksize; > unsigned long st_blocks; > unsigned long st_atime; > unsigned long st_atime_nsec; > unsigned long st_mtime; > unsigned long st_mtime_nsec; > unsigned long st_ctime; > unsigned long st_ctime_nsec; > unsigned long __unused4; > unsigned long __unused5; >}; > > > > >struct stat64 { > unsigned long long st_dev; > unsigned char __pad0[4]; > >#define STAT64_HAS_BROKEN_ST_INO 1 > unsigned long __st_ino; > > unsigned int st_mode; > unsigned int st_nlink; > > unsigned long st_uid; > unsigned long st_gid; > > unsigned long long st_rdev; > unsigned char __pad3[4]; > > long long st_size; > unsigned long st_blksize; > > unsigned long long st_blocks; > > unsigned long st_atime; > unsigned long st_atime_nsec; > > unsigned long st_mtime; > unsigned int st_mtime_nsec; > > unsigned long st_ctime; > unsigned long st_ctime_nsec; > > unsigned long long st_ino; >}; > >#define STAT_HAVE_NSEC 1 ># 5 "include/asm/stat.h" 2 ># 7 "include/linux/stat.h" 2 > > > > > >#define S_IFMT 00170000 >#define S_IFSOCK 0140000 >#define S_IFLNK 0120000 >#define S_IFREG 0100000 >#define S_IFBLK 0060000 >#define S_IFDIR 0040000 >#define S_IFCHR 0020000 >#define S_IFIFO 0010000 >#define S_ISUID 0004000 >#define S_ISGID 0002000 >#define S_ISVTX 0001000 > >#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) >#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) >#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) >#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) >#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) >#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) >#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) > >#define S_IRWXU 00700 >#define S_IRUSR 00400 >#define S_IWUSR 00200 >#define S_IXUSR 00100 > >#define S_IRWXG 00070 >#define S_IRGRP 00040 >#define S_IWGRP 00020 >#define S_IXGRP 00010 > >#define S_IRWXO 00007 >#define S_IROTH 00004 >#define S_IWOTH 00002 >#define S_IXOTH 00001 > > > > >#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) >#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) >#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) >#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) >#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) > > > > >struct kstat { > u64 ino; > dev_t dev; > umode_t mode; > unsigned int nlink; > uid_t uid; > gid_t gid; > dev_t rdev; > loff_t size; > struct timespec atime; > struct timespec mtime; > struct timespec ctime; > unsigned long blksize; > unsigned long long blocks; >}; ># 12 "include/linux/module.h" 2 > > ># 1 "include/linux/kmod.h" 1 > >#define __LINUX_KMOD_H__ ># 26 "include/linux/kmod.h" >#define KMOD_PATH_LEN 256 > > > > >extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); > > > > >#define try_then_request_module(x,mod...) ((x) ?: (request_module(mod), (x))) > >struct key; >extern int call_usermodehelper_keys(char *path, char *argv[], char *envp[], > struct key *session_keyring, int wait); > >static inline __attribute__((always_inline)) int >call_usermodehelper(char *path, char **argv, char **envp, int wait) >{ > return call_usermodehelper_keys(path, argv, envp, ((void *)0), wait); >} > >extern void usermodehelper_init(void); > >struct file; >extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[], > struct file **filp); ># 15 "include/linux/module.h" 2 ># 1 "include/linux/elf.h" 1 > >#define _LINUX_ELF_H > > > ># 1 "include/linux/elf-em.h" 1 > >#define _LINUX_ELF_EM_H > > >#define EM_NONE 0 >#define EM_M32 1 >#define EM_SPARC 2 >#define EM_386 3 >#define EM_68K 4 >#define EM_88K 5 >#define EM_486 6 >#define EM_860 7 >#define EM_MIPS 8 > > > >#define EM_MIPS_RS3_LE 10 >#define EM_MIPS_RS4_BE 10 > >#define EM_PARISC 15 >#define EM_SPARC32PLUS 18 >#define EM_PPC 20 >#define EM_PPC64 21 >#define EM_SH 42 >#define EM_SPARCV9 43 >#define EM_IA_64 50 >#define EM_X86_64 62 >#define EM_S390 22 >#define EM_CRIS 76 >#define EM_V850 87 >#define EM_M32R 88 >#define EM_H8_300 46 >#define EM_FRV 0x5441 >#define EM_AVR32 0x18ad > > > > > >#define EM_ALPHA 0x9026 > > >#define EM_CYGNUS_V850 0x9080 > >#define EM_CYGNUS_M32R 0x9041 > >#define EM_S390_OLD 0xA390 ># 7 "include/linux/elf.h" 2 > > >struct file; > > > > > >#define elf_read_implies_exec(ex,have_pt_gnu_stack) 0 > > > >typedef __u32 Elf32_Addr; >typedef __u16 Elf32_Half; >typedef __u32 Elf32_Off; >typedef __s32 Elf32_Sword; >typedef __u32 Elf32_Word; > > >typedef __u64 Elf64_Addr; >typedef __u16 Elf64_Half; >typedef __s16 Elf64_SHalf; >typedef __u64 Elf64_Off; >typedef __s32 Elf64_Sword; >typedef __u32 Elf64_Word; >typedef __u64 Elf64_Xword; >typedef __s64 Elf64_Sxword; > > >#define PT_NULL 0 >#define PT_LOAD 1 >#define PT_DYNAMIC 2 >#define PT_INTERP 3 >#define PT_NOTE 4 >#define PT_SHLIB 5 >#define PT_PHDR 6 >#define PT_TLS 7 >#define PT_LOOS 0x60000000 >#define PT_HIOS 0x6fffffff >#define PT_LOPROC 0x70000000 >#define PT_HIPROC 0x7fffffff >#define PT_GNU_EH_FRAME 0x6474e550 > >#define PT_GNU_STACK (PT_LOOS + 0x474e551) > > >#define ET_NONE 0 >#define ET_REL 1 >#define ET_EXEC 2 >#define ET_DYN 3 >#define ET_CORE 4 >#define ET_LOPROC 0xff00 >#define ET_HIPROC 0xffff > > >#define DT_NULL 0 >#define DT_NEEDED 1 >#define DT_PLTRELSZ 2 >#define DT_PLTGOT 3 >#define DT_HASH 4 >#define DT_STRTAB 5 >#define DT_SYMTAB 6 >#define DT_RELA 7 >#define DT_RELASZ 8 >#define DT_RELAENT 9 >#define DT_STRSZ 10 >#define DT_SYMENT 11 >#define DT_INIT 12 >#define DT_FINI 13 >#define DT_SONAME 14 >#define DT_RPATH 15 >#define DT_SYMBOLIC 16 >#define DT_REL 17 >#define DT_RELSZ 18 >#define DT_RELENT 19 >#define DT_PLTREL 20 >#define DT_DEBUG 21 >#define DT_TEXTREL 22 >#define DT_JMPREL 23 >#define DT_LOPROC 0x70000000 >#define DT_HIPROC 0x7fffffff > > >#define STB_LOCAL 0 >#define STB_GLOBAL 1 >#define STB_WEAK 2 > >#define STT_NOTYPE 0 >#define STT_OBJECT 1 >#define STT_FUNC 2 >#define STT_SECTION 3 >#define STT_FILE 4 >#define STT_COMMON 5 >#define STT_TLS 6 > >#define ELF_ST_BIND(x) ((x) >> 4) >#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) >#define ELF32_ST_BIND(x) ELF_ST_BIND(x) >#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x) >#define ELF64_ST_BIND(x) ELF_ST_BIND(x) >#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x) > >typedef struct dynamic{ > Elf32_Sword d_tag; > union{ > Elf32_Sword d_val; > Elf32_Addr d_ptr; > } d_un; >} Elf32_Dyn; > >typedef struct { > Elf64_Sxword d_tag; > union { > Elf64_Xword d_val; > Elf64_Addr d_ptr; > } d_un; >} Elf64_Dyn; > > >#define ELF32_R_SYM(x) ((x) >> 8) >#define ELF32_R_TYPE(x) ((x) & 0xff) > >#define ELF64_R_SYM(i) ((i) >> 32) >#define ELF64_R_TYPE(i) ((i) & 0xffffffff) > >typedef struct elf32_rel { > Elf32_Addr r_offset; > Elf32_Word r_info; >} Elf32_Rel; > >typedef struct elf64_rel { > Elf64_Addr r_offset; > Elf64_Xword r_info; >} Elf64_Rel; > >typedef struct elf32_rela{ > Elf32_Addr r_offset; > Elf32_Word r_info; > Elf32_Sword r_addend; >} Elf32_Rela; > >typedef struct elf64_rela { > Elf64_Addr r_offset; > Elf64_Xword r_info; > Elf64_Sxword r_addend; >} Elf64_Rela; > >typedef struct elf32_sym{ > Elf32_Word st_name; > Elf32_Addr st_value; > Elf32_Word st_size; > unsigned char st_info; > unsigned char st_other; > Elf32_Half st_shndx; >} Elf32_Sym; > >typedef struct elf64_sym { > Elf64_Word st_name; > unsigned char st_info; > unsigned char st_other; > Elf64_Half st_shndx; > Elf64_Addr st_value; > Elf64_Xword st_size; >} Elf64_Sym; > > >#define EI_NIDENT 16 > >typedef struct elf32_hdr{ > unsigned char e_ident[16]; > Elf32_Half e_type; > Elf32_Half e_machine; > Elf32_Word e_version; > Elf32_Addr e_entry; > Elf32_Off e_phoff; > Elf32_Off e_shoff; > Elf32_Word e_flags; > Elf32_Half e_ehsize; > Elf32_Half e_phentsize; > Elf32_Half e_phnum; > Elf32_Half e_shentsize; > Elf32_Half e_shnum; > Elf32_Half e_shstrndx; >} Elf32_Ehdr; > >typedef struct elf64_hdr { > unsigned char e_ident[16]; > Elf64_Half e_type; > Elf64_Half e_machine; > Elf64_Word e_version; > Elf64_Addr e_entry; > Elf64_Off e_phoff; > Elf64_Off e_shoff; > Elf64_Word e_flags; > Elf64_Half e_ehsize; > Elf64_Half e_phentsize; > Elf64_Half e_phnum; > Elf64_Half e_shentsize; > Elf64_Half e_shnum; > Elf64_Half e_shstrndx; >} Elf64_Ehdr; > > > >#define PF_R 0x4 >#define PF_W 0x2 >#define PF_X 0x1 > >typedef struct elf32_phdr{ > Elf32_Word p_type; > Elf32_Off p_offset; > Elf32_Addr p_vaddr; > Elf32_Addr p_paddr; > Elf32_Word p_filesz; > Elf32_Word p_memsz; > Elf32_Word p_flags; > Elf32_Word p_align; >} Elf32_Phdr; > >typedef struct elf64_phdr { > Elf64_Word p_type; > Elf64_Word p_flags; > Elf64_Off p_offset; > Elf64_Addr p_vaddr; > Elf64_Addr p_paddr; > Elf64_Xword p_filesz; > Elf64_Xword p_memsz; > Elf64_Xword p_align; >} Elf64_Phdr; > > >#define SHT_NULL 0 >#define SHT_PROGBITS 1 >#define SHT_SYMTAB 2 >#define SHT_STRTAB 3 >#define SHT_RELA 4 >#define SHT_HASH 5 >#define SHT_DYNAMIC 6 >#define SHT_NOTE 7 >#define SHT_NOBITS 8 >#define SHT_REL 9 >#define SHT_SHLIB 10 >#define SHT_DYNSYM 11 >#define SHT_NUM 12 >#define SHT_LOPROC 0x70000000 >#define SHT_HIPROC 0x7fffffff >#define SHT_LOUSER 0x80000000 >#define SHT_HIUSER 0xffffffff > > >#define SHF_WRITE 0x1 >#define SHF_ALLOC 0x2 >#define SHF_EXECINSTR 0x4 >#define SHF_MASKPROC 0xf0000000 > > >#define SHN_UNDEF 0 >#define SHN_LORESERVE 0xff00 >#define SHN_LOPROC 0xff00 >#define SHN_HIPROC 0xff1f >#define SHN_ABS 0xfff1 >#define SHN_COMMON 0xfff2 >#define SHN_HIRESERVE 0xffff > >typedef struct { > Elf32_Word sh_name; > Elf32_Word sh_type; > Elf32_Word sh_flags; > Elf32_Addr sh_addr; > Elf32_Off sh_offset; > Elf32_Word sh_size; > Elf32_Word sh_link; > Elf32_Word sh_info; > Elf32_Word sh_addralign; > Elf32_Word sh_entsize; >} Elf32_Shdr; > >typedef struct elf64_shdr { > Elf64_Word sh_name; > Elf64_Word sh_type; > Elf64_Xword sh_flags; > Elf64_Addr sh_addr; > Elf64_Off sh_offset; > Elf64_Xword sh_size; > Elf64_Word sh_link; > Elf64_Word sh_info; > Elf64_Xword sh_addralign; > Elf64_Xword sh_entsize; >} Elf64_Shdr; > >#define EI_MAG0 0 >#define EI_MAG1 1 >#define EI_MAG2 2 >#define EI_MAG3 3 >#define EI_CLASS 4 >#define EI_DATA 5 >#define EI_VERSION 6 >#define EI_OSABI 7 >#define EI_PAD 8 > >#define ELFMAG0 0x7f >#define ELFMAG1 'E' >#define ELFMAG2 'L' >#define ELFMAG3 'F' >#define ELFMAG "\177ELF" >#define SELFMAG 4 > >#define ELFCLASSNONE 0 >#define ELFCLASS32 1 >#define ELFCLASS64 2 >#define ELFCLASSNUM 3 > >#define ELFDATANONE 0 >#define ELFDATA2LSB 1 >#define ELFDATA2MSB 2 > >#define EV_NONE 0 >#define EV_CURRENT 1 >#define EV_NUM 2 > >#define ELFOSABI_NONE 0 >#define ELFOSABI_LINUX 3 > > >#define ELF_OSABI ELFOSABI_NONE > > > >#define NT_PRSTATUS 1 >#define NT_PRFPREG 2 >#define NT_PRPSINFO 3 >#define NT_TASKSTRUCT 4 >#define NT_AUXV 6 >#define NT_PRXFPREG 0x46e62b7f > > > >typedef struct elf32_note { > Elf32_Word n_namesz; > Elf32_Word n_descsz; > Elf32_Word n_type; >} Elf32_Nhdr; > > >typedef struct elf64_note { > Elf64_Word n_namesz; > Elf64_Word n_descsz; > Elf64_Word n_type; >} Elf64_Nhdr; > > > >extern Elf32_Dyn _DYNAMIC []; >#define elfhdr elf32_hdr >#define elf_phdr elf32_phdr >#define elf_note elf32_note >#define elf_addr_t Elf32_Off ># 376 "include/linux/elf.h" >static inline __attribute__((always_inline)) int arch_notes_size(void) { return 0; } >static inline __attribute__((always_inline)) void arch_write_notes(struct file *file) { } > >#define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size() >#define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file) ># 16 "include/linux/module.h" 2 > > ># 1 "include/linux/moduleparam.h" 1 > >#define _LINUX_MODULE_PARAMS_H ># 13 "include/linux/moduleparam.h" >#define MODULE_PARAM_PREFIX KBUILD_MODNAME "." ># 24 "include/linux/moduleparam.h" >#define __MODULE_INFO(tag,name,info) > >#define __MODULE_PARM_TYPE(name,_type) __MODULE_INFO(parmtype, name ##type, #name ":" _type) > > >struct kernel_param; > > >typedef int (*param_set_fn)(const char *val, struct kernel_param *kp); > >typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp); > >struct kernel_param { > const char *name; > unsigned int perm; > param_set_fn set; > param_get_fn get; > void *arg; >}; > > >struct kparam_string { > unsigned int maxlen; > char *string; >}; > > >struct kparam_array >{ > unsigned int max; > unsigned int *num; > param_set_fn set; > param_get_fn get; > unsigned int elemsize; > void *elem; >}; > > > > > >#define __module_param_call(prefix,name,set,get,arg,perm) static int __param_perm_check_ ##name __attribute__((unused)) = BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); static char __param_str_ ##name[] = prefix #name; static struct kernel_param const __param_ ##name __attribute_used__ __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) = { __param_str_ ##name, perm, set, get, arg } ># 75 "include/linux/moduleparam.h" >#define module_param_call(name,set,get,arg,perm) __module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm) > > > > > >#define module_param_named(name,value,type,perm) param_check_ ##type(name, &(value)); module_param_call(name, param_set_ ##type, param_get_ ##type, &value, perm); __MODULE_PARM_TYPE(name, #type) > > > > >#define module_param(name,type,perm) module_param_named(name, name, type, perm) > > > >#define module_param_string(name,string,len,perm) static struct kparam_string __param_string_ ##name = { len, string }; module_param_call(name, param_set_copystring, param_get_string, &__param_string_ ##name, perm); __MODULE_PARM_TYPE(name, "string") > > > > > > > >extern int parse_args(const char *name, > char *args, > struct kernel_param *params, > unsigned num, > int (*unknown)(char *param, char *val)); > > > > >#define __param_check(name,p,type) static inline type *__check_ ##name(void) { return(p); } > > >extern int param_set_byte(const char *val, struct kernel_param *kp); >extern int param_get_byte(char *buffer, struct kernel_param *kp); >#define param_check_byte(name,p) __param_check(name, p, unsigned char) > >extern int param_set_short(const char *val, struct kernel_param *kp); >extern int param_get_short(char *buffer, struct kernel_param *kp); >#define param_check_short(name,p) __param_check(name, p, short) > >extern int param_set_ushort(const char *val, struct kernel_param *kp); >extern int param_get_ushort(char *buffer, struct kernel_param *kp); >#define param_check_ushort(name,p) __param_check(name, p, unsigned short) > >extern int param_set_int(const char *val, struct kernel_param *kp); >extern int param_get_int(char *buffer, struct kernel_param *kp); >#define param_check_int(name,p) __param_check(name, p, int) > >extern int param_set_uint(const char *val, struct kernel_param *kp); >extern int param_get_uint(char *buffer, struct kernel_param *kp); >#define param_check_uint(name,p) __param_check(name, p, unsigned int) > >extern int param_set_long(const char *val, struct kernel_param *kp); >extern int param_get_long(char *buffer, struct kernel_param *kp); >#define param_check_long(name,p) __param_check(name, p, long) > >extern int param_set_ulong(const char *val, struct kernel_param *kp); >extern int param_get_ulong(char *buffer, struct kernel_param *kp); >#define param_check_ulong(name,p) __param_check(name, p, unsigned long) > >extern int param_set_charp(const char *val, struct kernel_param *kp); >extern int param_get_charp(char *buffer, struct kernel_param *kp); >#define param_check_charp(name,p) __param_check(name, p, char *) > >extern int param_set_bool(const char *val, struct kernel_param *kp); >extern int param_get_bool(char *buffer, struct kernel_param *kp); >#define param_check_bool(name,p) __param_check(name, p, int) > >extern int param_set_invbool(const char *val, struct kernel_param *kp); >extern int param_get_invbool(char *buffer, struct kernel_param *kp); >#define param_check_invbool(name,p) __param_check(name, p, int) > > >#define module_param_array_named(name,array,type,nump,perm) static struct kparam_array __param_arr_ ##name = { ARRAY_SIZE(array), nump, param_set_ ##type, param_get_ ##type, sizeof(array[0]), array }; module_param_call(name, param_array_set, param_array_get, &__param_arr_ ##name, perm); __MODULE_PARM_TYPE(name, "array of " #type) > > > > > > > >#define module_param_array(name,type,nump,perm) module_param_array_named(name, name, type, nump, perm) > > >extern int param_array_set(const char *val, struct kernel_param *kp); >extern int param_array_get(char *buffer, struct kernel_param *kp); > >extern int param_set_copystring(const char *val, struct kernel_param *kp); >extern int param_get_string(char *buffer, struct kernel_param *kp); > > > >struct module; > >extern int module_param_sysfs_setup(struct module *mod, > struct kernel_param *kparam, > unsigned int num_params); > >extern void module_param_sysfs_remove(struct module *mod); ># 19 "include/linux/module.h" 2 ># 1 "include/asm/local.h" 1 > >#define __UM_LOCAL_H > ># 1 "include/asm/arch/local.h" 1 > >#define _ARCH_I386_LOCAL_H > > > >typedef struct >{ > volatile long counter; >} local_t; > >#define LOCAL_INIT(i) { (i) } > >#define local_read(v) ((v)->counter) >#define local_set(v,i) (((v)->counter) = (i)) > >static __inline__ __attribute__((always_inline)) void local_inc(local_t *v) >{ > __asm__ __volatile__( > "incl %0" > :"+m" (v->counter)); >} > >static __inline__ __attribute__((always_inline)) void local_dec(local_t *v) >{ > __asm__ __volatile__( > "decl %0" > :"+m" (v->counter)); >} > >static __inline__ __attribute__((always_inline)) void local_add(long i, local_t *v) >{ > __asm__ __volatile__( > "addl %1,%0" > :"+m" (v->counter) > :"ir" (i)); >} > >static __inline__ __attribute__((always_inline)) void local_sub(long i, local_t *v) >{ > __asm__ __volatile__( > "subl %1,%0" > :"+m" (v->counter) > :"ir" (i)); >} > > >#define __local_inc(l) local_inc(l) >#define __local_dec(l) local_dec(l) >#define __local_add(i,l) local_add((i),(l)) >#define __local_sub(i,l) local_sub((i),(l)) ># 59 "include/asm/arch/local.h" >#define cpu_local_wrap_v(v) ({ local_t res__; preempt_disable(); res__ = (v); preempt_enable(); res__; }) > > > > > >#define cpu_local_wrap(v) ({ preempt_disable(); v; preempt_enable(); }) > > > > >#define cpu_local_read(v) cpu_local_wrap_v(local_read(&__get_cpu_var(v))) >#define cpu_local_set(v,i) cpu_local_wrap(local_set(&__get_cpu_var(v), (i))) >#define cpu_local_inc(v) cpu_local_wrap(local_inc(&__get_cpu_var(v))) >#define cpu_local_dec(v) cpu_local_wrap(local_dec(&__get_cpu_var(v))) >#define cpu_local_add(i,v) cpu_local_wrap(local_add((i), &__get_cpu_var(v))) >#define cpu_local_sub(i,v) cpu_local_wrap(local_sub((i), &__get_cpu_var(v))) > >#define __cpu_local_inc(v) cpu_local_inc(v) >#define __cpu_local_dec(v) cpu_local_dec(v) >#define __cpu_local_add(i,v) cpu_local_add((i), (v)) >#define __cpu_local_sub(i,v) cpu_local_sub((i), (v)) ># 5 "include/asm/local.h" 2 ># 20 "include/linux/module.h" 2 > ># 1 "include/asm/module.h" 1 > >#define __UM_MODULE_I386_H > > >struct mod_arch_specific >{ >}; > >#define Elf_Shdr Elf32_Shdr >#define Elf_Sym Elf32_Sym >#define Elf_Ehdr Elf32_Ehdr ># 22 "include/linux/module.h" 2 > > >#define MODULE_SUPPORTED_DEVICE(name) > > > >#define MODULE_SYMBOL_PREFIX "" > > >#define MODULE_NAME_LEN (64 - sizeof(unsigned long)) > >struct kernel_symbol >{ > unsigned long value; > const char *name; >}; > >struct modversion_info >{ > unsigned long crc; > char name[(64 - sizeof(unsigned long))]; >}; > >struct module; > >struct module_attribute { > struct attribute attr; > ssize_t (*show)(struct module_attribute *, struct module *, char *); > ssize_t (*store)(struct module_attribute *, struct module *, > const char *, size_t count); > void (*setup)(struct module *, const char *); > int (*test)(struct module *); > void (*free)(struct module *); >}; > >struct module_kobject >{ > struct kobject kobj; > struct module *mod; >}; > > >extern int init_module(void); >extern void cleanup_module(void); > > >struct exception_table_entry; > >const struct exception_table_entry * >search_extable(const struct exception_table_entry *first, > const struct exception_table_entry *last, > unsigned long value); >void sort_extable(struct exception_table_entry *start, > struct exception_table_entry *finish); >void sort_main_extable(void); > >extern struct subsystem module_subsys; ># 88 "include/linux/module.h" >#define MODULE_GENERIC_TABLE(gtype,name) >#define THIS_MODULE ((struct module *)0) > > > >#define MODULE_INFO(tag,info) __MODULE_INFO(tag, tag, info) > > >#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) ># 126 "include/linux/module.h" >#define MODULE_LICENSE(_license) MODULE_INFO(license, _license) > > >#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) > > >#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description) > > > >#define MODULE_PARM_DESC(_parm,desc) __MODULE_INFO(parm, _parm, #_parm ":" desc) > > >#define MODULE_DEVICE_TABLE(type,name) MODULE_GENERIC_TABLE(type ##_device,name) ># 156 "include/linux/module.h" >#define MODULE_VERSION(_version) MODULE_INFO(version, _version) > > > > >#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware) > > >const struct exception_table_entry *search_exception_tables(unsigned long add); > >struct notifier_block; > > > > >void *__symbol_get(const char *symbol); >void *__symbol_get_gpl(const char *symbol); >#define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) > > > > > >#define __CRC_SYMBOL(sym,sec) extern void *__crc_ ##sym __attribute__((weak)); static const unsigned long __kcrctab_ ##sym __attribute_used__ __attribute__((section("__kcrctab" sec), unused)) = (unsigned long) &__crc_ ##sym; ># 190 "include/linux/module.h" >#define __EXPORT_SYMBOL(sym,sec) extern typeof(sym) sym; __CRC_SYMBOL(sym, sec) static const char __kstrtab_ ##sym[] __attribute__((section("__ksymtab_strings"))) = MODULE_SYMBOL_PREFIX #sym; static const struct kernel_symbol __ksymtab_ ##sym __attribute_used__ __attribute__((section("__ksymtab" sec), unused)) = { (unsigned long)&sym, __kstrtab_ ##sym } ># 201 "include/linux/module.h" >#define EXPORT_SYMBOL(sym) __EXPORT_SYMBOL(sym, "") > > >#define EXPORT_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_gpl") > > >#define EXPORT_SYMBOL_GPL_FUTURE(sym) __EXPORT_SYMBOL(sym, "_gpl_future") > > > > > > > >#define EXPORT_UNUSED_SYMBOL(sym) >#define EXPORT_UNUSED_SYMBOL_GPL(sym) > > > > >struct module_ref >{ > local_t count; >} __attribute__((__aligned__((1 << (6))))); > >enum module_state >{ > MODULE_STATE_LIVE, > MODULE_STATE_COMING, > MODULE_STATE_GOING, >}; > > >struct module_sect_attr >{ > struct module_attribute mattr; > char *name; > unsigned long address; >}; > >struct module_sect_attrs >{ > struct attribute_group grp; > int nsections; > struct module_sect_attr attrs[0]; >}; > >struct module_param_attrs; > >struct module >{ > enum module_state state; > > > struct list_head list; > > > char name[(64 - sizeof(unsigned long))]; > > > struct module_kobject mkobj; > struct module_param_attrs *param_attrs; > struct module_attribute *modinfo_attrs; > const char *version; > const char *srcversion; > struct kobject *drivers_dir; > > > const struct kernel_symbol *syms; > unsigned int num_syms; > const unsigned long *crcs; > > > const struct kernel_symbol *gpl_syms; > unsigned int num_gpl_syms; > const unsigned long *gpl_crcs; > > > const struct kernel_symbol *unused_syms; > unsigned int num_unused_syms; > const unsigned long *unused_crcs; > > const struct kernel_symbol *unused_gpl_syms; > unsigned int num_unused_gpl_syms; > const unsigned long *unused_gpl_crcs; > > > const struct kernel_symbol *gpl_future_syms; > unsigned int num_gpl_future_syms; > const unsigned long *gpl_future_crcs; > > > unsigned int num_exentries; > const struct exception_table_entry *extable; > > > int (*init)(void); > > > void *module_init; > > > void *module_core; > > > unsigned long init_size, core_size; > > > unsigned long init_text_size, core_text_size; > > > void *unwind_info; > > > struct mod_arch_specific arch; > > > int unsafe; > > unsigned int taints; > > > > struct list_head bug_list; > struct bug_entry *bug_table; > unsigned num_bugs; > > > > > struct module_ref ref[1]; > > > struct list_head modules_which_use_me; > > > struct task_struct *waiter; > > > void (*exit)(void); > > > > > Elf32_Sym *symtab; > unsigned long num_symtab; > char *strtab; > > > struct module_sect_attrs *sect_attrs; > > > > void *percpu; > > > > char *args; >}; > > > > >static inline __attribute__((always_inline)) int module_is_live(struct module *mod) >{ > return mod->state != MODULE_STATE_GOING; >} > > >struct module *module_text_address(unsigned long addr); >struct module *__module_text_address(unsigned long addr); >int is_module_address(unsigned long addr); > > > >struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, > char *type, char *name, size_t namelen); > > >unsigned long module_kallsyms_lookup_name(const char *name); > >int is_exported(const char *name, const struct module *mod); > >extern void __module_put_and_exit(struct module *mod, long code) > __attribute__((noreturn)); >#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code); > > >unsigned int module_refcount(struct module *mod); >void __symbol_put(const char *symbol); >#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) >void symbol_put_addr(void *addr); > > > >static inline __attribute__((always_inline)) void __module_get(struct module *module) >{ > if (module) { > do { if (__builtin_expect(!!((module_refcount(module) == 0)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/module.h"), "i" (399), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > local_inc(&module->ref[({ do { } while (0); 0; })].count); > do { } while (0); > } >} > >static inline __attribute__((always_inline)) int try_module_get(struct module *module) >{ > int ret = 1; > > if (module) { > unsigned int cpu = ({ do { } while (0); 0; }); > if (__builtin_expect(!!(module_is_live(module)), 1)) > local_inc(&module->ref[cpu].count); > else > ret = 0; > do { } while (0); > } > return ret; >} > >extern void module_put(struct module *module); ># 439 "include/linux/module.h" >#define module_name(mod) ({ struct module *__mod = (mod); __mod ? __mod->name : "kernel"; }) > > > > > >#define __unsafe(mod) do { if (mod && !(mod)->unsafe) { printk(KERN_WARNING "Module %s cannot be unloaded due to unsafe usage in" " %s:%u\n", (mod)->name, __FILE__, __LINE__); (mod)->unsafe = 1; } } while(0) ># 456 "include/linux/module.h" >const char *module_address_lookup(unsigned long addr, > unsigned long *symbolsize, > unsigned long *offset, > char **modname); > > >const struct exception_table_entry *search_module_extables(unsigned long addr); > >int register_module_notifier(struct notifier_block * nb); >int unregister_module_notifier(struct notifier_block * nb); > >extern void print_modules(void); > >struct device_driver; >void module_add_driver(struct module *, struct device_driver *); >void module_remove_driver(struct device_driver *); ># 583 "include/linux/module.h" >#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) > > > >#define __MODULE_STRING(x) __stringify(x) ># 50 "net/ipv4/ip_output.c" 2 > > > ># 1 "include/linux/mm.h" 1 > >#define _LINUX_MM_H ># 14 "include/linux/mm.h" ># 1 "include/linux/prio_tree.h" 1 > >#define _LINUX_PRIO_TREE_H ># 14 "include/linux/prio_tree.h" >struct raw_prio_tree_node { > struct prio_tree_node *left; > struct prio_tree_node *right; > struct prio_tree_node *parent; >}; > >struct prio_tree_node { > struct prio_tree_node *left; > struct prio_tree_node *right; > struct prio_tree_node *parent; > unsigned long start; > unsigned long last; >}; > >struct prio_tree_root { > struct prio_tree_node *prio_tree_node; > unsigned short index_bits; > unsigned short raw; > > > > >}; > >struct prio_tree_iter { > struct prio_tree_node *cur; > unsigned long mask; > unsigned long value; > int size_level; > > struct prio_tree_root *root; > unsigned long r_index; > unsigned long h_index; >}; > >static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter, > struct prio_tree_root *root, unsigned long r_index, unsigned long h_index) >{ > iter->root = root; > iter->r_index = r_index; > iter->h_index = h_index; > iter->cur = ((void *)0); >} > >#define __INIT_PRIO_TREE_ROOT(ptr,_raw) do { (ptr)->prio_tree_node = NULL; (ptr)->index_bits = 1; (ptr)->raw = (_raw); } while (0) > > > > > > >#define INIT_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 0) >#define INIT_RAW_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 1) > >#define INIT_PRIO_TREE_NODE(ptr) do { (ptr)->left = (ptr)->right = (ptr)->parent = (ptr); } while (0) > > > > >#define INIT_PRIO_TREE_ITER(ptr) do { (ptr)->cur = NULL; (ptr)->mask = 0UL; (ptr)->value = 0UL; (ptr)->size_level = 0; } while (0) > > > > > > > >#define prio_tree_entry(ptr,type,member) ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) > > >static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root) >{ > return root->prio_tree_node == ((void *)0); >} > >static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node) >{ > return node->parent == node; >} > >static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node) >{ > return node->left == node; >} > >static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node) >{ > return node->right == node; >} > > >struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root, > struct prio_tree_node *old, struct prio_tree_node *node); >struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root, > struct prio_tree_node *node); >void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node); >struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter); > >#define raw_prio_tree_replace(root,old,node) prio_tree_replace(root, (struct prio_tree_node *) (old), (struct prio_tree_node *) (node)) > > >#define raw_prio_tree_insert(root,node) prio_tree_insert(root, (struct prio_tree_node *) (node)) > >#define raw_prio_tree_remove(root,node) prio_tree_remove(root, (struct prio_tree_node *) (node)) ># 15 "include/linux/mm.h" 2 ># 1 "include/linux/fs.h" 1 > >#define _LINUX_FS_H > > > > > > ># 1 "include/linux/limits.h" 1 > >#define _LINUX_LIMITS_H > >#define NR_OPEN 1024 > >#define NGROUPS_MAX 65536 >#define ARG_MAX 131072 >#define CHILD_MAX 999 >#define OPEN_MAX 256 >#define LINK_MAX 127 >#define MAX_CANON 255 >#define MAX_INPUT 255 >#define NAME_MAX 255 >#define PATH_MAX 4096 >#define PIPE_BUF 4096 >#define XATTR_NAME_MAX 255 >#define XATTR_SIZE_MAX 65536 >#define XATTR_LIST_MAX 65536 > >#define RTSIG_MAX 32 ># 10 "include/linux/fs.h" 2 ># 1 "include/linux/ioctl.h" 1 > >#define _LINUX_IOCTL_H > ># 1 "include/asm/ioctl.h" 1 > >#define __UM_IOCTL_H > ># 1 "include/asm/arch/ioctl.h" 1 ># 1 "include/asm-generic/ioctl.h" 1 > >#define _ASM_GENERIC_IOCTL_H ># 22 "include/asm-generic/ioctl.h" >#define _IOC_NRBITS 8 >#define _IOC_TYPEBITS 8 >#define _IOC_SIZEBITS 14 >#define _IOC_DIRBITS 2 > >#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) >#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) >#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) >#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) > >#define _IOC_NRSHIFT 0 >#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) >#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) >#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) > > > > >#define _IOC_NONE 0U >#define _IOC_WRITE 1U >#define _IOC_READ 2U > >#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) > > > > > > >extern unsigned int __invalid_size_argument_for_IOC; >#define _IOC_TYPECHECK(t) ((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC) > > > > > >#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) >#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) >#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) >#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) >#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) >#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) >#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) > > >#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) >#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) >#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) >#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) > > > >#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) >#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) >#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) >#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) >#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) ># 1 "include/asm/arch/ioctl.h" 2 ># 5 "include/asm/ioctl.h" 2 ># 5 "include/linux/ioctl.h" 2 ># 11 "include/linux/fs.h" 2 ># 23 "include/linux/fs.h" >#undef NR_OPEN >#define NR_OPEN (1024*1024) >#define INR_OPEN 1024 > >#define BLOCK_SIZE_BITS 10 >#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) > >#define SEEK_SET 0 >#define SEEK_CUR 1 >#define SEEK_END 2 > > >struct files_stat_struct { > int nr_files; > int nr_free_files; > int max_files; >}; >extern struct files_stat_struct files_stat; >extern int get_max_files(void); > >struct inodes_stat_t { > int nr_inodes; > int nr_unused; > int dummy[5]; >}; >extern struct inodes_stat_t inodes_stat; > >extern int leases_enable, lease_break_time; > > >extern int dir_notify_enable; > > >#define NR_FILE 8192 > >#define MAY_EXEC 1 >#define MAY_WRITE 2 >#define MAY_READ 4 >#define MAY_APPEND 8 > >#define FMODE_READ 1 >#define FMODE_WRITE 2 > > >#define FMODE_LSEEK 4 >#define FMODE_PREAD 8 >#define FMODE_PWRITE FMODE_PREAD > > > > >#define FMODE_EXEC 16 > >#define RW_MASK 1 >#define RWA_MASK 2 >#define READ 0 >#define WRITE 1 >#define READA 2 >#define SWRITE 3 >#define READ_SYNC (READ | (1 << BIO_RW_SYNC)) >#define READ_META (READ | (1 << BIO_RW_META)) >#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) >#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) > >#define SEL_IN 1 >#define SEL_OUT 2 >#define SEL_EX 4 > > >#define FS_REQUIRES_DEV 1 >#define FS_BINARY_MOUNTDATA 2 >#define FS_REVAL_DOT 16384 >#define FS_RENAME_DOES_D_MOVE 32768 > > > > > > >#define MS_RDONLY 1 >#define MS_NOSUID 2 >#define MS_NODEV 4 >#define MS_NOEXEC 8 >#define MS_SYNCHRONOUS 16 >#define MS_REMOUNT 32 >#define MS_MANDLOCK 64 >#define MS_DIRSYNC 128 >#define MS_NOATIME 1024 >#define MS_NODIRATIME 2048 >#define MS_BIND 4096 >#define MS_MOVE 8192 >#define MS_REC 16384 >#define MS_VERBOSE 32768 > >#define MS_SILENT 32768 >#define MS_POSIXACL (1<<16) >#define MS_UNBINDABLE (1<<17) >#define MS_PRIVATE (1<<18) >#define MS_SLAVE (1<<19) >#define MS_SHARED (1<<20) >#define MS_RELATIME (1<<21) >#define MS_ACTIVE (1<<30) >#define MS_NOUSER (1<<31) > > > > >#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK) > > > > >#define MS_MGC_VAL 0xC0ED0000 >#define MS_MGC_MSK 0xffff0000 > > > >#define S_SYNC 1 >#define S_NOATIME 2 >#define S_APPEND 4 >#define S_IMMUTABLE 8 >#define S_DEAD 16 >#define S_NOQUOTA 32 >#define S_DIRSYNC 64 >#define S_NOCMTIME 128 >#define S_SWAPFILE 256 >#define S_PRIVATE 512 ># 164 "include/linux/fs.h" >#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg)) > >#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) >#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC)) > >#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) > >#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) > >#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) >#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) >#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) >#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL) > >#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) >#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) >#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) >#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) > > > > >#define BLKROSET _IO(0x12,93) >#define BLKROGET _IO(0x12,94) >#define BLKRRPART _IO(0x12,95) >#define BLKGETSIZE _IO(0x12,96) >#define BLKFLSBUF _IO(0x12,97) >#define BLKRASET _IO(0x12,98) >#define BLKRAGET _IO(0x12,99) >#define BLKFRASET _IO(0x12,100) >#define BLKFRAGET _IO(0x12,101) >#define BLKSECTSET _IO(0x12,102) >#define BLKSECTGET _IO(0x12,103) >#define BLKSSZGET _IO(0x12,104) ># 209 "include/linux/fs.h" >#define BLKBSZGET _IOR(0x12,112,size_t) >#define BLKBSZSET _IOW(0x12,113,size_t) >#define BLKGETSIZE64 _IOR(0x12,114,size_t) >#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) >#define BLKTRACESTART _IO(0x12,116) >#define BLKTRACESTOP _IO(0x12,117) >#define BLKTRACETEARDOWN _IO(0x12,118) > >#define BMAP_IOCTL 1 >#define FIBMAP _IO(0x00,1) >#define FIGETBSZ _IO(0x00,2) > >#define FS_IOC_GETFLAGS _IOR('f', 1, long) >#define FS_IOC_SETFLAGS _IOW('f', 2, long) >#define FS_IOC_GETVERSION _IOR('v', 1, long) >#define FS_IOC_SETVERSION _IOW('v', 2, long) >#define FS_IOC32_GETFLAGS _IOR('f', 1, int) >#define FS_IOC32_SETFLAGS _IOW('f', 2, int) >#define FS_IOC32_GETVERSION _IOR('v', 1, int) >#define FS_IOC32_SETVERSION _IOW('v', 2, int) > > > > >#define FS_SECRM_FL 0x00000001 >#define FS_UNRM_FL 0x00000002 >#define FS_COMPR_FL 0x00000004 >#define FS_SYNC_FL 0x00000008 >#define FS_IMMUTABLE_FL 0x00000010 >#define FS_APPEND_FL 0x00000020 >#define FS_NODUMP_FL 0x00000040 >#define FS_NOATIME_FL 0x00000080 > >#define FS_DIRTY_FL 0x00000100 >#define FS_COMPRBLK_FL 0x00000200 >#define FS_NOCOMP_FL 0x00000400 >#define FS_ECOMPR_FL 0x00000800 > >#define FS_BTREE_FL 0x00001000 >#define FS_INDEX_FL 0x00001000 >#define FS_IMAGIC_FL 0x00002000 >#define FS_JOURNAL_DATA_FL 0x00004000 >#define FS_NOTAIL_FL 0x00008000 >#define FS_DIRSYNC_FL 0x00010000 >#define FS_TOPDIR_FL 0x00020000 >#define FS_EXTENT_FL 0x00080000 >#define FS_DIRECTIO_FL 0x00100000 >#define FS_RESERVED_FL 0x80000000 > >#define FS_FL_USER_VISIBLE 0x0003DFFF >#define FS_FL_USER_MODIFIABLE 0x000380FF > > >#define SYNC_FILE_RANGE_WAIT_BEFORE 1 >#define SYNC_FILE_RANGE_WRITE 2 >#define SYNC_FILE_RANGE_WAIT_AFTER 4 > > > > > > ># 1 "include/linux/kdev_t.h" 1 > >#define _LINUX_KDEV_T_H > >#define MINORBITS 20 >#define MINORMASK ((1U << MINORBITS) - 1) > >#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS)) >#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK)) >#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi)) > >#define print_dev_t(buffer,dev) sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev)) > > >#define format_dev_t(buffer,dev) ({ sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); buffer; }) > > > > > > >static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev) >{ > return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256; >} > >static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev) >{ > return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1))); >} > >static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val) >{ > return ((((val >> 8) & 255) << 20) | (val & 255)); >} > >static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev) >{ > return 1; >} > >static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev) >{ > unsigned major = ((unsigned int) ((dev) >> 20)); > unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1))); > return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); >} > >static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev) >{ > unsigned major = (dev & 0xfff00) >> 8; > unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); > return (((major) << 20) | (minor)); >} > >static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev) >{ > return 1; >} > >static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev) >{ > return new_encode_dev(dev); >} > >static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev) >{ > return new_decode_dev(dev); >} > >static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev) >{ > return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18); >} > >static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev) >{ > return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18); >} > >static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev) >{ > return (dev >> 18) & 0x3fff; >} > >static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev) >{ > return dev & 0x3ffff; >} ># 272 "include/linux/fs.h" 2 ># 1 "include/linux/dcache.h" 1 > >#define __LINUX_DCACHE_H ># 12 "include/linux/dcache.h" >struct nameidata; >struct vfsmount; ># 24 "include/linux/dcache.h" >#define IS_ROOT(x) ((x) == (x)->d_parent) ># 33 "include/linux/dcache.h" >struct qstr { > unsigned int hash; > unsigned int len; > const unsigned char *name; >}; > >struct dentry_stat_t { > int nr_dentry; > int nr_unused; > int age_limit; > int want_pages; > int dummy[2]; >}; >extern struct dentry_stat_t dentry_stat; > > > >#define init_name_hash() 0 > > >static inline __attribute__((always_inline)) unsigned long >partial_name_hash(unsigned long c, unsigned long prevhash) >{ > return (prevhash + (c << 4) + (c >> 4)) * 11; >} > > > > > >static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash) >{ > return (unsigned int) hash; >} > > >static inline __attribute__((always_inline)) unsigned int >full_name_hash(const unsigned char *name, unsigned int len) >{ > unsigned long hash = 0; > while (len--) > hash = partial_name_hash(*name++, hash); > return end_name_hash(hash); >} > >struct dcookie_struct; > >#define DNAME_INLINE_LEN_MIN 36 > >struct dentry { > atomic_t d_count; > unsigned int d_flags; > spinlock_t d_lock; > struct inode *d_inode; > > > > > > struct hlist_node d_hash; > struct dentry *d_parent; > struct qstr d_name; > > struct list_head d_lru; > > > > union { > struct list_head d_child; > struct rcu_head d_rcu; > } d_u; > struct list_head d_subdirs; > struct list_head d_alias; > unsigned long d_time; > struct dentry_operations *d_op; > struct super_block *d_sb; > void *d_fsdata; > > > > int d_mounted; > unsigned char d_iname[36]; >}; > > > > > > > >enum dentry_d_lock_class >{ > DENTRY_D_LOCK_NORMAL, > DENTRY_D_LOCK_NESTED >}; > >struct dentry_operations { > int (*d_revalidate)(struct dentry *, struct nameidata *); > int (*d_hash) (struct dentry *, struct qstr *); > int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); > int (*d_delete)(struct dentry *); > void (*d_release)(struct dentry *); > void (*d_iput)(struct dentry *, struct inode *); >}; ># 157 "include/linux/dcache.h" >#define DCACHE_AUTOFS_PENDING 0x0001 >#define DCACHE_NFSFS_RENAMED 0x0002 > > > >#define DCACHE_DISCONNECTED 0x0004 ># 174 "include/linux/dcache.h" >#define DCACHE_REFERENCED 0x0008 >#define DCACHE_UNHASHED 0x0010 > >#define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 > >extern spinlock_t dcache_lock; ># 197 "include/linux/dcache.h" >static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry) >{ > if (!(dentry->d_flags & 0x0010)) { > dentry->d_flags |= 0x0010; > hlist_del_rcu(&dentry->d_hash); > } >} > >static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry) >{ > _spin_lock(&dcache_lock); > _spin_lock(&dentry->d_lock); > __d_drop(dentry); > _spin_unlock(&dentry->d_lock); > _spin_unlock(&dcache_lock); >} > >static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry) >{ > return dentry->d_name.name != dentry->d_iname; >} > > > > >extern void d_instantiate(struct dentry *, struct inode *); >extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); >extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); >extern void d_delete(struct dentry *); > > >extern struct dentry * d_alloc(struct dentry *, const struct qstr *); >extern struct dentry * d_alloc_anon(struct inode *); >extern struct dentry * d_splice_alias(struct inode *, struct dentry *); >extern void shrink_dcache_sb(struct super_block *); >extern void shrink_dcache_parent(struct dentry *); >extern void shrink_dcache_for_umount(struct super_block *); >extern int d_invalidate(struct dentry *); > > >extern struct dentry * d_alloc_root(struct inode *); > > >extern void d_genocide(struct dentry *); > >extern struct dentry *d_find_alias(struct inode *); >extern void d_prune_aliases(struct inode *); > > >extern int have_submounts(struct dentry *); > > > > >extern void d_rehash(struct dentry *); ># 262 "include/linux/dcache.h" >static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode) >{ > d_instantiate(entry, inode); > d_rehash(entry); >} ># 276 "include/linux/dcache.h" >static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode) >{ > struct dentry *res; > > res = d_instantiate_unique(entry, inode); > d_rehash(res != ((void *)0) ? res : entry); > return res; >} > > >extern void d_move(struct dentry *, struct dentry *); > > >extern struct dentry * d_lookup(struct dentry *, struct qstr *); >extern struct dentry * __d_lookup(struct dentry *, struct qstr *); >extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *); > > >extern int d_validate(struct dentry *, struct dentry *); > >extern char * d_path(struct dentry *, struct vfsmount *, char *, int); ># 313 "include/linux/dcache.h" >static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry) >{ > if (dentry) { > do { if (__builtin_expect(!!((!((&dentry->d_count)->counter))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/dcache.h"), "i" (316), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > atomic_inc(&dentry->d_count); > } > return dentry; >} > >extern struct dentry * dget_locked(struct dentry *); ># 331 "include/linux/dcache.h" >static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry) >{ > return (dentry->d_flags & 0x0010); >} > >static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry) >{ > struct dentry *ret; > > _spin_lock(&dentry->d_lock); > ret = dget(dentry->d_parent); > _spin_unlock(&dentry->d_lock); > return ret; >} > >extern void dput(struct dentry *); > >static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry) >{ > return dentry->d_mounted; >} > >extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); >extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int); >extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); > >extern int sysctl_vfs_cache_pressure; ># 273 "include/linux/fs.h" 2 ># 1 "include/linux/namei.h" 1 > >#define _LINUX_NAMEI_H > > > > >struct vfsmount; > >struct open_intent { > int flags; > int create_mode; > struct file *file; >}; > >enum { MAX_NESTED_LINKS = 8 }; > >struct nameidata { > struct dentry *dentry; > struct vfsmount *mnt; > struct qstr last; > unsigned int flags; > int last_type; > unsigned depth; > char *saved_names[MAX_NESTED_LINKS + 1]; > > > union { > struct open_intent open; > } intent; >}; > >struct path { > struct vfsmount *mnt; > struct dentry *dentry; >}; > > > > >enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; ># 51 "include/linux/namei.h" >#define LOOKUP_FOLLOW 1 >#define LOOKUP_DIRECTORY 2 >#define LOOKUP_CONTINUE 4 >#define LOOKUP_PARENT 16 >#define LOOKUP_NOALT 32 >#define LOOKUP_REVAL 64 > > > >#define LOOKUP_OPEN (0x0100) >#define LOOKUP_CREATE (0x0200) >#define LOOKUP_ACCESS (0x0400) >#define LOOKUP_CHDIR (0x0800) > >extern int __user_walk(const char *, unsigned, struct nameidata *) __attribute__((regparm(3))); >extern int __user_walk_fd(int dfd, const char *, unsigned, struct nameidata *) __attribute__((regparm(3))); >#define user_path_walk(name,nd) __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) > >#define user_path_walk_link(name,nd) __user_walk_fd(AT_FDCWD, name, 0, nd) > >extern int path_lookup(const char *, unsigned, struct nameidata *) __attribute__((regparm(3))); >extern int path_walk(const char *, struct nameidata *) __attribute__((regparm(3))); >extern int link_path_walk(const char *, struct nameidata *) __attribute__((regparm(3))); >extern void path_release(struct nameidata *); >extern void path_release_on_umount(struct nameidata *); > >extern int __user_path_lookup_open(const char *, unsigned lookup_flags, struct nameidata *nd, int open_flags); >extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); >extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, > int (*open)(struct inode *, struct file *)); >extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); >extern void release_open_intent(struct nameidata *); > >extern struct dentry * lookup_one_len(const char *, struct dentry *, int); > >extern int follow_down(struct vfsmount **, struct dentry **); >extern int follow_up(struct vfsmount **, struct dentry **); > >extern struct dentry *lock_rename(struct dentry *, struct dentry *); >extern void unlock_rename(struct dentry *, struct dentry *); > >static inline __attribute__((always_inline)) void nd_set_link(struct nameidata *nd, char *path) >{ > nd->saved_names[nd->depth] = path; >} > >static inline __attribute__((always_inline)) char *nd_get_link(struct nameidata *nd) >{ > return nd->saved_names[nd->depth]; >} ># 274 "include/linux/fs.h" 2 > > > > ># 1 "include/linux/radix-tree.h" 1 ># 21 "include/linux/radix-tree.h" >#define _LINUX_RADIX_TREE_H ># 36 "include/linux/radix-tree.h" >#define RADIX_TREE_DIRECT_PTR 1 > >static inline __attribute__((always_inline)) void *radix_tree_ptr_to_direct(void *ptr) >{ > return (void *)((unsigned long)ptr | 1); >} > >static inline __attribute__((always_inline)) void *radix_tree_direct_to_ptr(void *ptr) >{ > return (void *)((unsigned long)ptr & ~1); >} > >static inline __attribute__((always_inline)) int radix_tree_is_direct_ptr(void *ptr) >{ > return (int)((unsigned long)ptr & 1); >} > > > >#define RADIX_TREE_MAX_TAGS 2 > > >struct radix_tree_root { > unsigned int height; > gfp_t gfp_mask; > struct radix_tree_node *rnode; >}; > >#define RADIX_TREE_INIT(mask) { .height = 0, .gfp_mask = (mask), .rnode = NULL, } > > > > > >#define RADIX_TREE(name,mask) struct radix_tree_root name = RADIX_TREE_INIT(mask) > > >#define INIT_RADIX_TREE(root,mask) do { (root)->height = 0; (root)->gfp_mask = (mask); (root)->rnode = NULL; } while (0) ># 131 "include/linux/radix-tree.h" >static inline __attribute__((always_inline)) void *radix_tree_deref_slot(void **pslot) >{ > return radix_tree_direct_to_ptr(*pslot); >} ># 143 "include/linux/radix-tree.h" >static inline __attribute__((always_inline)) void radix_tree_replace_slot(void **pslot, void *item) >{ > do { if (__builtin_expect(!!((radix_tree_is_direct_ptr(item))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/radix-tree.h"), "i" (145), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > ({ __asm__ __volatile__("": : :"memory"); (*pslot) = ((void *)((unsigned long)item | ((unsigned long)*pslot & 1))); }); > > >} > >int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); >void *radix_tree_lookup(struct radix_tree_root *, unsigned long); >void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long); >void *radix_tree_delete(struct radix_tree_root *, unsigned long); >unsigned int >radix_tree_gang_lookup(struct radix_tree_root *root, void **results, > unsigned long first_index, unsigned int max_items); >int radix_tree_preload(gfp_t gfp_mask); >void radix_tree_init(void); >void *radix_tree_tag_set(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >void *radix_tree_tag_clear(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >int radix_tree_tag_get(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >unsigned int >radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, > unsigned long first_index, unsigned int max_items, > unsigned int tag); >int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); > >static inline __attribute__((always_inline)) void radix_tree_preload_end(void) >{ > do { } while (0); >} ># 279 "include/linux/fs.h" 2 ># 288 "include/linux/fs.h" >struct hd_geometry; >struct iovec; >struct nameidata; >struct kiocb; >struct pipe_inode_info; >struct poll_table_struct; >struct kstatfs; >struct vm_area_struct; >struct vfsmount; > >extern void __attribute__ ((__section__ (".init.text"))) inode_init(unsigned long); >extern void __attribute__ ((__section__ (".init.text"))) inode_init_early(void); >extern void __attribute__ ((__section__ (".init.text"))) mnt_init(unsigned long); >extern void __attribute__ ((__section__ (".init.text"))) files_init(unsigned long); > >struct buffer_head; >typedef int (get_block_t)(struct inode *inode, sector_t iblock, > struct buffer_head *bh_result, int create); >typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, > ssize_t bytes, void *private); > > > > > >#define ATTR_MODE 1 >#define ATTR_UID 2 >#define ATTR_GID 4 >#define ATTR_SIZE 8 >#define ATTR_ATIME 16 >#define ATTR_MTIME 32 >#define ATTR_CTIME 64 >#define ATTR_ATIME_SET 128 >#define ATTR_MTIME_SET 256 >#define ATTR_FORCE 512 >#define ATTR_ATTR_FLAG 1024 >#define ATTR_KILL_SUID 2048 >#define ATTR_KILL_SGID 4096 >#define ATTR_FILE 8192 ># 337 "include/linux/fs.h" >struct iattr { > unsigned int ia_valid; > umode_t ia_mode; > uid_t ia_uid; > gid_t ia_gid; > loff_t ia_size; > struct timespec ia_atime; > struct timespec ia_mtime; > struct timespec ia_ctime; > > > > > > > struct file *ia_file; >}; > > > > ># 1 "include/linux/quota.h" 1 ># 36 "include/linux/quota.h" >#define _LINUX_QUOTA_ > > > > >#define __DQUOT_VERSION__ "dquot_6.5.1" >#define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 > >typedef __kernel_uid32_t qid_t; >typedef __u64 qsize_t; > >extern spinlock_t dq_data_lock; > > >#define QUOTABLOCK_BITS 10 >#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) > > >#define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10)) >#define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10)) >#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS) > >#define MAXQUOTAS 2 >#define USRQUOTA 0 >#define GRPQUOTA 1 > > > > >#define INITQFNAMES { "user", "group", "undefined", }; ># 77 "include/linux/quota.h" >#define SUBCMDMASK 0x00ff >#define SUBCMDSHIFT 8 >#define QCMD(cmd,type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)) > >#define Q_SYNC 0x800001 >#define Q_QUOTAON 0x800002 >#define Q_QUOTAOFF 0x800003 >#define Q_GETFMT 0x800004 >#define Q_GETINFO 0x800005 >#define Q_SETINFO 0x800006 >#define Q_GETQUOTA 0x800007 >#define Q_SETQUOTA 0x800008 > > > > > >#define QIF_BLIMITS 1 >#define QIF_SPACE 2 >#define QIF_ILIMITS 4 >#define QIF_INODES 8 >#define QIF_BTIME 16 >#define QIF_ITIME 32 >#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) >#define QIF_USAGE (QIF_SPACE | QIF_INODES) >#define QIF_TIMES (QIF_BTIME | QIF_ITIME) >#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) > >struct if_dqblk { > __u64 dqb_bhardlimit; > __u64 dqb_bsoftlimit; > __u64 dqb_curspace; > __u64 dqb_ihardlimit; > __u64 dqb_isoftlimit; > __u64 dqb_curinodes; > __u64 dqb_btime; > __u64 dqb_itime; > __u32 dqb_valid; >}; > > > > > >#define IIF_BGRACE 1 >#define IIF_IGRACE 2 >#define IIF_FLAGS 4 >#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS) > >struct if_dqinfo { > __u64 dqi_bgrace; > __u64 dqi_igrace; > __u32 dqi_flags; > __u32 dqi_valid; >}; > > > > > ># 1 "include/linux/dqblk_xfs.h" 1 ># 18 "include/linux/dqblk_xfs.h" >#define _LINUX_DQBLK_XFS_H > > > > > > > >#define XQM_CMD(x) (('X'<<8)+(x)) >#define XQM_COMMAND(x) (((x) & (0xff<<8)) == ('X'<<8)) > >#define XQM_USRQUOTA 0 >#define XQM_GRPQUOTA 1 >#define XQM_PRJQUOTA 2 >#define XQM_MAXQUOTAS 3 > >#define Q_XQUOTAON XQM_CMD(1) >#define Q_XQUOTAOFF XQM_CMD(2) >#define Q_XGETQUOTA XQM_CMD(3) >#define Q_XSETQLIM XQM_CMD(4) >#define Q_XGETQSTAT XQM_CMD(5) >#define Q_XQUOTARM XQM_CMD(6) >#define Q_XQUOTASYNC XQM_CMD(7) ># 49 "include/linux/dqblk_xfs.h" >#define FS_DQUOT_VERSION 1 >typedef struct fs_disk_quota { > __s8 d_version; > __s8 d_flags; > __u16 d_fieldmask; > __u32 d_id; > __u64 d_blk_hardlimit; > __u64 d_blk_softlimit; > __u64 d_ino_hardlimit; > __u64 d_ino_softlimit; > __u64 d_bcount; > __u64 d_icount; > __s32 d_itimer; > > __s32 d_btimer; > __u16 d_iwarns; > __u16 d_bwarns; > __s32 d_padding2; > __u64 d_rtb_hardlimit; > __u64 d_rtb_softlimit; > __u64 d_rtbcount; > __s32 d_rtbtimer; > __u16 d_rtbwarns; > __s16 d_padding3; > char d_padding4[8]; >} fs_disk_quota_t; > > > > >#define FS_DQ_ISOFT (1<<0) >#define FS_DQ_IHARD (1<<1) >#define FS_DQ_BSOFT (1<<2) >#define FS_DQ_BHARD (1<<3) >#define FS_DQ_RTBSOFT (1<<4) >#define FS_DQ_RTBHARD (1<<5) >#define FS_DQ_LIMIT_MASK (FS_DQ_ISOFT | FS_DQ_IHARD | FS_DQ_BSOFT | FS_DQ_BHARD | FS_DQ_RTBSOFT | FS_DQ_RTBHARD) ># 94 "include/linux/dqblk_xfs.h" >#define FS_DQ_BTIMER (1<<6) >#define FS_DQ_ITIMER (1<<7) >#define FS_DQ_RTBTIMER (1<<8) >#define FS_DQ_TIMER_MASK (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER) ># 107 "include/linux/dqblk_xfs.h" >#define FS_DQ_BWARNS (1<<9) >#define FS_DQ_IWARNS (1<<10) >#define FS_DQ_RTBWARNS (1<<11) >#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS) > > > > >#define XFS_QUOTA_UDQ_ACCT (1<<0) >#define XFS_QUOTA_UDQ_ENFD (1<<1) >#define XFS_QUOTA_GDQ_ACCT (1<<2) >#define XFS_QUOTA_GDQ_ENFD (1<<3) >#define XFS_QUOTA_PDQ_ACCT (1<<4) >#define XFS_QUOTA_PDQ_ENFD (1<<5) > >#define XFS_USER_QUOTA (1<<0) >#define XFS_PROJ_QUOTA (1<<1) >#define XFS_GROUP_QUOTA (1<<2) > > > > > > > >#define FS_QSTAT_VERSION 1 > > > > >typedef struct fs_qfilestat { > __u64 qfs_ino; > __u64 qfs_nblks; > __u32 qfs_nextents; >} fs_qfilestat_t; > >typedef struct fs_quota_stat { > __s8 qs_version; > __u16 qs_flags; > __s8 qs_pad; > fs_qfilestat_t qs_uquota; > fs_qfilestat_t qs_gquota; > __u32 qs_incoredqs; > __s32 qs_btimelimit; > __s32 qs_itimelimit; > __s32 qs_rtbtimelimit; > __u16 qs_bwarnlimit; > __u16 qs_iwarnlimit; >} fs_quota_stat_t; ># 138 "include/linux/quota.h" 2 ># 1 "include/linux/dqblk_v1.h" 1 > > > > > >#define _LINUX_DQBLK_V1_H > > >#define QFMT_VFS_OLD 1 > > >#define V1_DQF_RSQUASH 1 > > >#define V1_INIT_ALLOC 1 >#define V1_INIT_REWRITE 1 >#define V1_DEL_ALLOC 0 >#define V1_DEL_REWRITE 2 > > >struct v1_mem_dqinfo { >}; ># 139 "include/linux/quota.h" 2 ># 1 "include/linux/dqblk_v2.h" 1 > > > > > >#define _LINUX_DQBLK_V2_H > > > > >#define QFMT_VFS_V0 2 > > >#define V2_INIT_ALLOC 4 >#define V2_INIT_REWRITE 2 >#define V2_DEL_ALLOC 0 >#define V2_DEL_REWRITE 6 > > >struct v2_mem_dqinfo { > unsigned int dqi_blocks; > unsigned int dqi_free_blk; > unsigned int dqi_free_entry; >}; ># 140 "include/linux/quota.h" 2 > > > >#define DQUOT_INIT_ALLOC max(V1_INIT_ALLOC, V2_INIT_ALLOC) >#define DQUOT_INIT_REWRITE max(V1_INIT_REWRITE, V2_INIT_REWRITE) >#define DQUOT_DEL_ALLOC max(V1_DEL_ALLOC, V2_DEL_ALLOC) >#define DQUOT_DEL_REWRITE max(V1_DEL_REWRITE, V2_DEL_REWRITE) > > > > >struct mem_dqblk { > __u32 dqb_bhardlimit; > __u32 dqb_bsoftlimit; > qsize_t dqb_curspace; > __u32 dqb_ihardlimit; > __u32 dqb_isoftlimit; > __u32 dqb_curinodes; > time_t dqb_btime; > time_t dqb_itime; >}; > > > > >struct quota_format_type; > >struct mem_dqinfo { > struct quota_format_type *dqi_format; > struct list_head dqi_dirty_list; > unsigned long dqi_flags; > unsigned int dqi_bgrace; > unsigned int dqi_igrace; > union { > struct v1_mem_dqinfo v1_i; > struct v2_mem_dqinfo v2_i; > } u; >}; > >struct super_block; > >#define DQF_MASK 0xffff >#define DQF_INFO_DIRTY_B 16 >#define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) > >extern void mark_info_dirty(struct super_block *sb, int type); >#define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags) >#define info_any_dquot_dirty(info) (!list_empty(&(info)->dqi_dirty_list)) >#define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info)) > >#define sb_dqopt(sb) (&(sb)->s_dquot) >#define sb_dqinfo(sb,type) (sb_dqopt(sb)->info+(type)) > >struct dqstats { > int lookups; > int drops; > int reads; > int writes; > int cache_hits; > int allocated_dquots; > int free_dquots; > int syncs; >}; > >extern struct dqstats dqstats; > >#define DQ_MOD_B 0 >#define DQ_BLKS_B 1 >#define DQ_INODES_B 2 >#define DQ_FAKE_B 3 >#define DQ_READ_B 4 >#define DQ_ACTIVE_B 5 > >struct dquot { > struct hlist_node dq_hash; > struct list_head dq_inuse; > struct list_head dq_free; > struct list_head dq_dirty; > struct mutex dq_lock; > atomic_t dq_count; > wait_queue_head_t dq_wait_unused; > struct super_block *dq_sb; > unsigned int dq_id; > loff_t dq_off; > unsigned long dq_flags; > short dq_type; > struct mem_dqblk dq_dqb; >}; > >#define NODQUOT (struct dquot *)NULL > >#define QUOTA_OK 0 >#define NO_QUOTA 1 > > >struct quota_format_ops { > int (*check_quota_file)(struct super_block *sb, int type); > int (*read_file_info)(struct super_block *sb, int type); > int (*write_file_info)(struct super_block *sb, int type); > int (*free_file_info)(struct super_block *sb, int type); > int (*read_dqblk)(struct dquot *dquot); > int (*commit_dqblk)(struct dquot *dquot); > int (*release_dqblk)(struct dquot *dquot); >}; > > >struct dquot_operations { > int (*initialize) (struct inode *, int); > int (*drop) (struct inode *); > int (*alloc_space) (struct inode *, qsize_t, int); > int (*alloc_inode) (const struct inode *, unsigned long); > int (*free_space) (struct inode *, qsize_t); > int (*free_inode) (const struct inode *, unsigned long); > int (*transfer) (struct inode *, struct iattr *); > int (*write_dquot) (struct dquot *); > int (*acquire_dquot) (struct dquot *); > int (*release_dquot) (struct dquot *); > int (*mark_dirty) (struct dquot *); > int (*write_info) (struct super_block *, int); >}; > > >struct quotactl_ops { > int (*quota_on)(struct super_block *, int, int, char *); > int (*quota_off)(struct super_block *, int); > int (*quota_sync)(struct super_block *, int); > int (*get_info)(struct super_block *, int, struct if_dqinfo *); > int (*set_info)(struct super_block *, int, struct if_dqinfo *); > int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); > int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); > int (*get_xstate)(struct super_block *, struct fs_quota_stat *); > int (*set_xstate)(struct super_block *, unsigned int, int); > int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); > int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); >}; > >struct quota_format_type { > int qf_fmt_id; > struct quota_format_ops *qf_ops; > struct module *qf_owner; > struct quota_format_type *qf_next; >}; > >#define DQUOT_USR_ENABLED 0x01 >#define DQUOT_GRP_ENABLED 0x02 > >struct quota_info { > unsigned int flags; > struct mutex dqio_mutex; > struct mutex dqonoff_mutex; > struct rw_semaphore dqptr_sem; > struct inode *files[2]; > struct mem_dqinfo info[2]; > struct quota_format_ops *ops[2]; >}; > > >int mark_dquot_dirty(struct dquot *dquot); > >#define dquot_dirty(dquot) test_bit(DQ_MOD_B, &(dquot)->dq_flags) > >#define sb_has_quota_enabled(sb,type) ((type)==USRQUOTA ? (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) : (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED)) > > >#define sb_any_quota_enabled(sb) (sb_has_quota_enabled(sb, USRQUOTA) | sb_has_quota_enabled(sb, GRPQUOTA)) > > >int register_quota_format(struct quota_format_type *fmt); >void unregister_quota_format(struct quota_format_type *fmt); > >struct quota_module_name { > int qm_fmt_id; > char *qm_mod_name; >}; > >#define INIT_QUOTA_MODULE_NAMES { {QFMT_VFS_OLD, "quota_v1"}, {QFMT_VFS_V0, "quota_v2"}, {0, NULL}} ># 359 "include/linux/fs.h" 2 ># 386 "include/linux/fs.h" >enum positive_aop_returns { > AOP_WRITEPAGE_ACTIVATE = 0x80000, > AOP_TRUNCATED_PAGE = 0x80001, >}; > > > > >struct page; >struct address_space; >struct writeback_control; > >struct address_space_operations { > int (*writepage)(struct page *page, struct writeback_control *wbc); > int (*readpage)(struct file *, struct page *); > void (*sync_page)(struct page *); > > > int (*writepages)(struct address_space *, struct writeback_control *); > > > int (*set_page_dirty)(struct page *page); > > int (*readpages)(struct file *filp, struct address_space *mapping, > struct list_head *pages, unsigned nr_pages); > > > > > > int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); > int (*commit_write)(struct file *, struct page *, unsigned, unsigned); > > sector_t (*bmap)(struct address_space *, sector_t); > void (*invalidatepage) (struct page *, unsigned long); > int (*releasepage) (struct page *, gfp_t); > ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, > loff_t offset, unsigned long nr_segs); > struct page* (*get_xip_page)(struct address_space *, sector_t, > int); > > int (*migratepage) (struct address_space *, > struct page *, struct page *); >}; > >struct backing_dev_info; >struct address_space { > struct inode *host; > struct radix_tree_root page_tree; > rwlock_t tree_lock; > unsigned int i_mmap_writable; > struct prio_tree_root i_mmap; > struct list_head i_mmap_nonlinear; > spinlock_t i_mmap_lock; > unsigned int truncate_count; > unsigned long nrpages; > unsigned long writeback_index; > const struct address_space_operations *a_ops; > unsigned long flags; > struct backing_dev_info *backing_dev_info; > spinlock_t private_lock; > struct list_head private_list; > struct address_space *assoc_mapping; >} __attribute__((aligned(sizeof(long)))); > > > > > > >struct block_device { > dev_t bd_dev; > struct inode * bd_inode; > int bd_openers; > struct mutex bd_mutex; > struct mutex bd_mount_mutex; > struct list_head bd_inodes; > void * bd_holder; > int bd_holders; > > struct list_head bd_holder_list; > > struct block_device * bd_contains; > unsigned bd_block_size; > struct hd_struct * bd_part; > > unsigned bd_part_count; > int bd_invalidated; > struct gendisk * bd_disk; > struct list_head bd_list; > struct backing_dev_info *bd_inode_backing_dev_info; > > > > > > > unsigned long bd_private; >}; > > > > > >#define PAGECACHE_TAG_DIRTY 0 >#define PAGECACHE_TAG_WRITEBACK 1 > >int mapping_tagged(struct address_space *mapping, int tag); > > > > >static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping) >{ > return !prio_tree_empty(&mapping->i_mmap) || > !list_empty(&mapping->i_mmap_nonlinear); >} > > > > > > > >static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping) >{ > return mapping->i_mmap_writable != 0; >} ># 523 "include/linux/fs.h" >#define i_size_ordered_init(inode) do { } while (0) > > >struct inode { > struct hlist_node i_hash; > struct list_head i_list; > struct list_head i_sb_list; > struct list_head i_dentry; > unsigned long i_ino; > atomic_t i_count; > unsigned int i_nlink; > uid_t i_uid; > gid_t i_gid; > dev_t i_rdev; > unsigned long i_version; > loff_t i_size; > > > > struct timespec i_atime; > struct timespec i_mtime; > struct timespec i_ctime; > unsigned int i_blkbits; > blkcnt_t i_blocks; > unsigned short i_bytes; > umode_t i_mode; > spinlock_t i_lock; > struct mutex i_mutex; > struct rw_semaphore i_alloc_sem; > struct inode_operations *i_op; > const struct file_operations *i_fop; > struct super_block *i_sb; > struct file_lock *i_flock; > struct address_space *i_mapping; > struct address_space i_data; > > struct dquot *i_dquot[2]; > > struct list_head i_devices; > union { > struct pipe_inode_info *i_pipe; > struct block_device *i_bdev; > struct cdev *i_cdev; > }; > int i_cindex; > > __u32 i_generation; > > > unsigned long i_dnotify_mask; > struct dnotify_struct *i_dnotify; > > > > struct list_head inotify_watches; > struct mutex inotify_mutex; > > > unsigned long i_state; > unsigned long dirtied_when; > > unsigned int i_flags; > > atomic_t i_writecount; > > > > void *i_private; >}; ># 604 "include/linux/fs.h" >enum inode_i_mutex_lock_class >{ > I_MUTEX_NORMAL, > I_MUTEX_PARENT, > I_MUTEX_CHILD, > I_MUTEX_XATTR, > I_MUTEX_QUOTA >}; > >extern void inode_double_lock(struct inode *inode1, struct inode *inode2); >extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); ># 626 "include/linux/fs.h" >static inline __attribute__((always_inline)) loff_t i_size_read(const struct inode *inode) >{ ># 645 "include/linux/fs.h" > return inode->i_size; > >} > > > > > > >static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size) >{ ># 665 "include/linux/fs.h" > inode->i_size = i_size; > >} > >static inline __attribute__((always_inline)) unsigned iminor(const struct inode *inode) >{ > return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1))); >} > >static inline __attribute__((always_inline)) unsigned imajor(const struct inode *inode) >{ > return ((unsigned int) ((inode->i_rdev) >> 20)); >} > >extern struct block_device *I_BDEV(struct inode *inode); > >struct fown_struct { > rwlock_t lock; > struct pid *pid; > enum pid_type pid_type; > uid_t uid, euid; > int signum; >}; > > > > >struct file_ra_state { > unsigned long start; > unsigned long size; > unsigned long flags; > unsigned long cache_hit; > unsigned long prev_page; > unsigned long ahead_start; > unsigned long ahead_size; > unsigned long ra_pages; > unsigned long mmap_hit; > unsigned long mmap_miss; >}; >#define RA_FLAG_MISS 0x01 >#define RA_FLAG_INCACHE 0x02 > >struct file { > > > > > union { > struct list_head fu_list; > struct rcu_head fu_rcuhead; > } f_u; > struct path f_path; >#define f_dentry f_path.dentry >#define f_vfsmnt f_path.mnt > const struct file_operations *f_op; > atomic_t f_count; > unsigned int f_flags; > mode_t f_mode; > loff_t f_pos; > struct fown_struct f_owner; > unsigned int f_uid, f_gid; > struct file_ra_state f_ra; > > unsigned long f_version; > > > > > void *private_data; > > > > struct list_head f_ep_links; > spinlock_t f_ep_lock; > > struct address_space *f_mapping; >}; >extern spinlock_t files_lock; >#define file_list_lock() spin_lock(&files_lock); >#define file_list_unlock() spin_unlock(&files_lock); > >#define get_file(x) atomic_inc(&(x)->f_count) >#define file_count(x) atomic_read(&(x)->f_count) > >#define MAX_NON_LFS ((1UL<<31) - 1) > > > > >#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) > > > > >#define FL_POSIX 1 >#define FL_FLOCK 2 >#define FL_ACCESS 8 >#define FL_EXISTS 16 >#define FL_LEASE 32 >#define FL_CLOSE 64 >#define FL_SLEEP 128 ># 774 "include/linux/fs.h" >typedef struct files_struct *fl_owner_t; > >struct file_lock_operations { > void (*fl_insert)(struct file_lock *); > void (*fl_remove)(struct file_lock *); > void (*fl_copy_lock)(struct file_lock *, struct file_lock *); > void (*fl_release_private)(struct file_lock *); >}; > >struct lock_manager_operations { > int (*fl_compare_owner)(struct file_lock *, struct file_lock *); > void (*fl_notify)(struct file_lock *); > void (*fl_copy_lock)(struct file_lock *, struct file_lock *); > void (*fl_release_private)(struct file_lock *); > void (*fl_break)(struct file_lock *); > int (*fl_mylease)(struct file_lock *, struct file_lock *); > int (*fl_change)(struct file_lock **, int); >}; > > ># 1 "include/linux/nfs_fs_i.h" 1 > >#define _NFS_FS_I > > > ># 1 "include/linux/nfs.h" 1 > > > > > > > >#define _LINUX_NFS_H > >#define NFS_PROGRAM 100003 >#define NFS_PORT 2049 >#define NFS_MAXDATA 8192 >#define NFS_MAXPATHLEN 1024 >#define NFS_MAXNAMLEN 255 >#define NFS_MAXGROUPS 16 >#define NFS_FHSIZE 32 >#define NFS_COOKIESIZE 4 >#define NFS_FIFO_DEV (-1) >#define NFSMODE_FMT 0170000 >#define NFSMODE_DIR 0040000 >#define NFSMODE_CHR 0020000 >#define NFSMODE_BLK 0060000 >#define NFSMODE_REG 0100000 >#define NFSMODE_LNK 0120000 >#define NFSMODE_SOCK 0140000 >#define NFSMODE_FIFO 0010000 > >#define NFS_MNT_PROGRAM 100005 >#define NFS_MNT_PORT 627 ># 39 "include/linux/nfs.h" > enum nfs_stat { > NFS_OK = 0, > NFSERR_PERM = 1, > NFSERR_NOENT = 2, > NFSERR_IO = 5, > NFSERR_NXIO = 6, > NFSERR_EAGAIN = 11, > NFSERR_ACCES = 13, > NFSERR_EXIST = 17, > NFSERR_XDEV = 18, > NFSERR_NODEV = 19, > NFSERR_NOTDIR = 20, > NFSERR_ISDIR = 21, > NFSERR_INVAL = 22, > NFSERR_FBIG = 27, > NFSERR_NOSPC = 28, > NFSERR_ROFS = 30, > NFSERR_MLINK = 31, > NFSERR_OPNOTSUPP = 45, > NFSERR_NAMETOOLONG = 63, > NFSERR_NOTEMPTY = 66, > NFSERR_DQUOT = 69, > NFSERR_STALE = 70, > NFSERR_REMOTE = 71, > NFSERR_WFLUSH = 99, > NFSERR_BADHANDLE = 10001, > NFSERR_NOT_SYNC = 10002, > NFSERR_BAD_COOKIE = 10003, > NFSERR_NOTSUPP = 10004, > NFSERR_TOOSMALL = 10005, > NFSERR_SERVERFAULT = 10006, > NFSERR_BADTYPE = 10007, > NFSERR_JUKEBOX = 10008, > NFSERR_SAME = 10009, > NFSERR_DENIED = 10010, > NFSERR_EXPIRED = 10011, > NFSERR_LOCKED = 10012, > NFSERR_GRACE = 10013, > NFSERR_FHEXPIRED = 10014, > NFSERR_SHARE_DENIED = 10015, > NFSERR_WRONGSEC = 10016, > NFSERR_CLID_INUSE = 10017, > NFSERR_RESOURCE = 10018, > NFSERR_MOVED = 10019, > NFSERR_NOFILEHANDLE = 10020, > NFSERR_MINOR_VERS_MISMATCH = 10021, > NFSERR_STALE_CLIENTID = 10022, > NFSERR_STALE_STATEID = 10023, > NFSERR_OLD_STATEID = 10024, > NFSERR_BAD_STATEID = 10025, > NFSERR_BAD_SEQID = 10026, > NFSERR_NOT_SAME = 10027, > NFSERR_LOCK_RANGE = 10028, > NFSERR_SYMLINK = 10029, > NFSERR_RESTOREFH = 10030, > NFSERR_LEASE_MOVED = 10031, > NFSERR_ATTRNOTSUPP = 10032, > NFSERR_NO_GRACE = 10033, > NFSERR_RECLAIM_BAD = 10034, > NFSERR_RECLAIM_CONFLICT = 10035, > NFSERR_BAD_XDR = 10036, > NFSERR_LOCKS_HELD = 10037, > NFSERR_OPENMODE = 10038, > NFSERR_BADOWNER = 10039, > NFSERR_BADCHAR = 10040, > NFSERR_BADNAME = 10041, > NFSERR_BAD_RANGE = 10042, > NFSERR_LOCK_NOTSUPP = 10043, > NFSERR_OP_ILLEGAL = 10044, > NFSERR_DEADLOCK = 10045, > NFSERR_FILE_OPEN = 10046, > NFSERR_ADMIN_REVOKED = 10047, > NFSERR_CB_PATH_DOWN = 10048, > NFSERR_REPLAY_ME = 10049 >}; > > > >enum nfs_ftype { > NFNON = 0, > NFREG = 1, > NFDIR = 2, > NFBLK = 3, > NFCHR = 4, > NFLNK = 5, > NFSOCK = 6, > NFBAD = 7, > NFFIFO = 8 >}; > > ># 1 "include/linux/sunrpc/msg_prot.h" 1 > > > > > > > >#define _LINUX_SUNRPC_MSGPROT_H_ > > > >#define RPC_VERSION 2 > > >#define XDR_UNIT (4) > > >typedef u32 rpc_authflavor_t; > >enum rpc_auth_flavors { > RPC_AUTH_NULL = 0, > RPC_AUTH_UNIX = 1, > RPC_AUTH_SHORT = 2, > RPC_AUTH_DES = 3, > RPC_AUTH_KRB = 4, > RPC_AUTH_GSS = 6, > RPC_AUTH_MAXFLAVOR = 8, > > RPC_AUTH_GSS_KRB5 = 390003, > RPC_AUTH_GSS_KRB5I = 390004, > RPC_AUTH_GSS_KRB5P = 390005, > RPC_AUTH_GSS_LKEY = 390006, > RPC_AUTH_GSS_LKEYI = 390007, > RPC_AUTH_GSS_LKEYP = 390008, > RPC_AUTH_GSS_SPKM = 390009, > RPC_AUTH_GSS_SPKMI = 390010, > RPC_AUTH_GSS_SPKMP = 390011, >}; > > >#define RPC_MAX_AUTH_SIZE (400) > >enum rpc_msg_type { > RPC_CALL = 0, > RPC_REPLY = 1 >}; > >enum rpc_reply_stat { > RPC_MSG_ACCEPTED = 0, > RPC_MSG_DENIED = 1 >}; > >enum rpc_accept_stat { > RPC_SUCCESS = 0, > RPC_PROG_UNAVAIL = 1, > RPC_PROG_MISMATCH = 2, > RPC_PROC_UNAVAIL = 3, > RPC_GARBAGE_ARGS = 4, > RPC_SYSTEM_ERR = 5, > > RPC_DROP_REPLY = 60000, >}; > >enum rpc_reject_stat { > RPC_MISMATCH = 0, > RPC_AUTH_ERROR = 1 >}; > >enum rpc_auth_stat { > RPC_AUTH_OK = 0, > RPC_AUTH_BADCRED = 1, > RPC_AUTH_REJECTEDCRED = 2, > RPC_AUTH_BADVERF = 3, > RPC_AUTH_REJECTEDVERF = 4, > RPC_AUTH_TOOWEAK = 5, > > RPCSEC_GSS_CREDPROBLEM = 13, > RPCSEC_GSS_CTXPROBLEM = 14 >}; > >#define RPC_PMAP_PROGRAM 100000 >#define RPC_PMAP_VERSION 2 >#define RPC_PMAP_PORT 111 > >#define RPC_MAXNETNAMELEN 256 ># 106 "include/linux/sunrpc/msg_prot.h" >typedef __be32 rpc_fraghdr; > >#define RPC_LAST_STREAM_FRAGMENT (1U << 31) >#define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT) >#define RPC_MAX_FRAGMENT_SIZE ((1U << 31) - 1) > > > > > >#define RPC_CALLHDRSIZE (6) >#define RPC_REPHDRSIZE (4) ># 142 "include/linux/sunrpc/msg_prot.h" >#define RPC_MAX_HEADER_WITH_AUTH (RPC_CALLHDRSIZE + 2*(2+RPC_MAX_AUTH_SIZE/4)) ># 131 "include/linux/nfs.h" 2 > > > > > >#define NFS_MAXFHSIZE 128 >struct nfs_fh { > unsigned short size; > unsigned char data[128]; >}; > > > > > >static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b) >{ > return a->size != b->size || __builtin_memcmp(a->data, b->data, a->size) != 0; >} > >static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source) >{ > target->size = source->size; > (__builtin_constant_p(source->size) ? __constant_memcpy((target->data),(source->data),(source->size)) : __memcpy((target->data),(source->data),(source->size))); >} > > > > > > >#define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1)) > > >enum nfs3_stable_how { > NFS_UNSTABLE = 0, > NFS_DATA_SYNC = 1, > NFS_FILE_SYNC = 2 >}; ># 7 "include/linux/nfs_fs_i.h" 2 > >struct nlm_lockowner; > > > > >struct nfs_lock_info { > u32 state; > struct nlm_lockowner *owner; > struct list_head list; >}; > >struct nfs4_lock_state; >struct nfs4_lock_info { > struct nfs4_lock_state *owner; >}; ># 795 "include/linux/fs.h" 2 > >struct file_lock { > struct file_lock *fl_next; > struct list_head fl_link; > struct list_head fl_block; > fl_owner_t fl_owner; > unsigned int fl_pid; > wait_queue_head_t fl_wait; > struct file *fl_file; > unsigned char fl_flags; > unsigned char fl_type; > loff_t fl_start; > loff_t fl_end; > > struct fasync_struct * fl_fasync; > unsigned long fl_break_time; > > struct file_lock_operations *fl_ops; > struct lock_manager_operations *fl_lmops; > union { > struct nfs_lock_info nfs_fl; > struct nfs4_lock_info nfs4_fl; > } fl_u; >}; > > > >#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1))) >#define OFFSET_MAX INT_LIMIT(loff_t) >#define OFFT_OFFSET_MAX INT_LIMIT(off_t) > > ># 1 "include/linux/fcntl.h" 1 > >#define _LINUX_FCNTL_H > ># 1 "include/asm/fcntl.h" 1 > >#define __UM_FCNTL_H > ># 1 "include/asm/arch/fcntl.h" 1 ># 1 "include/asm-generic/fcntl.h" 1 > >#define _ASM_GENERIC_FCNTL_H > > > > > >#define O_ACCMODE 00000003 >#define O_RDONLY 00000000 >#define O_WRONLY 00000001 >#define O_RDWR 00000002 > >#define O_CREAT 00000100 > > >#define O_EXCL 00000200 > > >#define O_NOCTTY 00000400 > > >#define O_TRUNC 00001000 > > >#define O_APPEND 00002000 > > >#define O_NONBLOCK 00004000 > > >#define O_SYNC 00010000 > > >#define FASYNC 00020000 > > >#define O_DIRECT 00040000 > > >#define O_LARGEFILE 00100000 > > >#define O_DIRECTORY 00200000 > > >#define O_NOFOLLOW 00400000 > > >#define O_NOATIME 01000000 > > >#define O_NDELAY O_NONBLOCK > > >#define F_DUPFD 0 >#define F_GETFD 1 >#define F_SETFD 2 >#define F_GETFL 3 >#define F_SETFL 4 > >#define F_GETLK 5 >#define F_SETLK 6 >#define F_SETLKW 7 > > >#define F_SETOWN 8 >#define F_GETOWN 9 > > >#define F_SETSIG 10 >#define F_GETSIG 11 > > > >#define FD_CLOEXEC 1 > > > >#define F_RDLCK 0 >#define F_WRLCK 1 >#define F_UNLCK 2 > > > > >#define F_EXLCK 4 >#define F_SHLCK 8 > > > > >#define F_INPROGRESS 16 > > > >#define LOCK_SH 1 >#define LOCK_EX 2 >#define LOCK_NB 4 > >#define LOCK_UN 8 > >#define LOCK_MAND 32 >#define LOCK_READ 64 >#define LOCK_WRITE 128 >#define LOCK_RW 192 > >#define F_LINUX_SPECIFIC_BASE 1024 > > > >#define __ARCH_FLOCK_PAD > > >struct flock { > short l_type; > short l_whence; > off_t l_start; > off_t l_len; > pid_t l_pid; > >}; > > > > > >#define F_GETLK64 12 >#define F_SETLK64 13 >#define F_SETLKW64 14 > > > > >#define __ARCH_FLOCK64_PAD > > >struct flock64 { > short l_type; > short l_whence; > loff_t l_start; > loff_t l_len; > pid_t l_pid; > >}; ># 1 "include/asm/arch/fcntl.h" 2 ># 5 "include/asm/fcntl.h" 2 ># 5 "include/linux/fcntl.h" 2 > >#define F_SETLEASE (F_LINUX_SPECIFIC_BASE+0) >#define F_GETLEASE (F_LINUX_SPECIFIC_BASE+1) > > > > > >#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2) > > > > >#define DN_ACCESS 0x00000001 >#define DN_MODIFY 0x00000002 >#define DN_CREATE 0x00000004 >#define DN_DELETE 0x00000008 >#define DN_RENAME 0x00000010 >#define DN_ATTRIB 0x00000020 >#define DN_MULTISHOT 0x80000000 > >#define AT_FDCWD -100 > > >#define AT_SYMLINK_NOFOLLOW 0x100 >#define AT_REMOVEDIR 0x200 > >#define AT_SYMLINK_FOLLOW 0x400 > > > > >#define force_o_largefile() (BITS_PER_LONG != 32) > > > >#define IS_GETLK32(cmd) ((cmd) == F_GETLK) >#define IS_SETLK32(cmd) ((cmd) == F_SETLK) >#define IS_SETLKW32(cmd) ((cmd) == F_SETLKW) >#define IS_GETLK64(cmd) ((cmd) == F_GETLK64) >#define IS_SETLK64(cmd) ((cmd) == F_SETLK64) >#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW64) ># 56 "include/linux/fcntl.h" >#define IS_GETLK(cmd) (IS_GETLK32(cmd) || IS_GETLK64(cmd)) >#define IS_SETLK(cmd) (IS_SETLK32(cmd) || IS_SETLK64(cmd)) >#define IS_SETLKW(cmd) (IS_SETLKW32(cmd) || IS_SETLKW64(cmd)) ># 828 "include/linux/fs.h" 2 > >extern int fcntl_getlk(struct file *, struct flock *); >extern int fcntl_setlk(unsigned int, struct file *, unsigned int, > struct flock *); > > >extern int fcntl_getlk64(struct file *, struct flock64 *); >extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, > struct flock64 *); > > >extern void send_sigio(struct fown_struct *fown, int fd, int band); >extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); >extern int fcntl_getlease(struct file *filp); > > >extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, > unsigned int flags); > > >extern void locks_init_lock(struct file_lock *); >extern void locks_copy_lock(struct file_lock *, struct file_lock *); >extern void locks_remove_posix(struct file *, fl_owner_t); >extern void locks_remove_flock(struct file *); >extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *); >extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *); >extern int posix_lock_file(struct file *, struct file_lock *); >extern int posix_lock_file_wait(struct file *, struct file_lock *); >extern int posix_unblock_lock(struct file *, struct file_lock *); >extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); >extern int __break_lease(struct inode *inode, unsigned int flags); >extern void lease_get_mtime(struct inode *, struct timespec *time); >extern int setlease(struct file *, long, struct file_lock **); >extern int lease_modify(struct file_lock **, int); >extern int lock_may_read(struct inode *, loff_t start, unsigned long count); >extern int lock_may_write(struct inode *, loff_t start, unsigned long count); > >struct fasync_struct { > int magic; > int fa_fd; > struct fasync_struct *fa_next; > struct file *fa_file; >}; > >#define FASYNC_MAGIC 0x4601 > > >extern int fasync_helper(int, struct file *, int, struct fasync_struct **); > >extern void kill_fasync(struct fasync_struct **, int, int); > >extern void __kill_fasync(struct fasync_struct *, int, int); > >extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); >extern int f_setown(struct file *filp, unsigned long arg, int force); >extern void f_delown(struct file *filp); >extern pid_t f_getown(struct file *filp); >extern int send_sigurg(struct fown_struct *fown); > > > > > >#define MNT_FORCE 0x00000001 >#define MNT_DETACH 0x00000002 >#define MNT_EXPIRE 0x00000004 > >extern struct list_head super_blocks; >extern spinlock_t sb_lock; > >#define sb_entry(list) list_entry((list), struct super_block, s_list) >#define S_BIAS (1<<30) >struct super_block { > struct list_head s_list; > dev_t s_dev; > unsigned long s_blocksize; > unsigned char s_blocksize_bits; > unsigned char s_dirt; > unsigned long long s_maxbytes; > struct file_system_type *s_type; > struct super_operations *s_op; > struct dquot_operations *dq_op; > struct quotactl_ops *s_qcop; > struct export_operations *s_export_op; > unsigned long s_flags; > unsigned long s_magic; > struct dentry *s_root; > struct rw_semaphore s_umount; > struct mutex s_lock; > int s_count; > int s_syncing; > int s_need_sync_fs; > atomic_t s_active; > > > > struct xattr_handler **s_xattr; > > struct list_head s_inodes; > struct list_head s_dirty; > struct list_head s_io; > struct hlist_head s_anon; > struct list_head s_files; > > struct block_device *s_bdev; > struct list_head s_instances; > struct quota_info s_dquot; > > int s_frozen; > wait_queue_head_t s_wait_unfrozen; > > char s_id[32]; > > void *s_fs_info; > > > > > > struct mutex s_vfs_rename_mutex; > > > > u32 s_time_gran; >}; > >extern struct timespec current_fs_time(struct super_block *sb); > > > > >enum { > SB_UNFROZEN = 0, > SB_FREEZE_WRITE = 1, > SB_FREEZE_TRANS = 2, >}; > >#define vfs_check_frozen(sb,level) wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) > > >#define get_fs_excl() atomic_inc(¤t->fs_excl) >#define put_fs_excl() atomic_dec(¤t->fs_excl) >#define has_fs_excl() atomic_read(¤t->fs_excl) > > >extern void lock_super(struct super_block *); >extern void unlock_super(struct super_block *); > > > > >extern int vfs_permission(struct nameidata *, int); >extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); >extern int vfs_mkdir(struct inode *, struct dentry *, int); >extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); >extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); >extern int vfs_link(struct dentry *, struct inode *, struct dentry *); >extern int vfs_rmdir(struct inode *, struct dentry *); >extern int vfs_unlink(struct inode *, struct dentry *); >extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); > > > > >extern void dentry_unhash(struct dentry *dentry); > > > > >extern int file_permission(struct file *, int); > > > > > > > >#define DT_UNKNOWN 0 >#define DT_FIFO 1 >#define DT_CHR 2 >#define DT_DIR 4 >#define DT_BLK 6 >#define DT_REG 8 >#define DT_LNK 10 >#define DT_SOCK 12 >#define DT_WHT 14 > >#define OSYNC_METADATA (1<<0) >#define OSYNC_DATA (1<<1) >#define OSYNC_INODE (1<<2) >int generic_osync_inode(struct inode *, struct address_space *, int); > > > > > > > >typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); > >struct block_device_operations { > int (*open) (struct inode *, struct file *); > int (*release) (struct inode *, struct file *); > int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); > long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); > long (*compat_ioctl) (struct file *, unsigned, unsigned long); > int (*direct_access) (struct block_device *, sector_t, unsigned long *); > int (*media_changed) (struct gendisk *); > int (*revalidate_disk) (struct gendisk *); > int (*getgeo)(struct block_device *, struct hd_geometry *); > struct module *owner; >}; ># 1050 "include/linux/fs.h" >typedef struct { > size_t written; > size_t count; > union { > char * buf; > void *data; > } arg; > int error; >} read_descriptor_t; > >typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); > > > > >#define HAVE_COMPAT_IOCTL 1 >#define HAVE_UNLOCKED_IOCTL 1 > > > > > > >struct file_operations { > struct module *owner; > loff_t (*llseek) (struct file *, loff_t, int); > ssize_t (*read) (struct file *, char *, size_t, loff_t *); > ssize_t (*write) (struct file *, const char *, size_t, loff_t *); > ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); > ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); > int (*readdir) (struct file *, void *, filldir_t); > unsigned int (*poll) (struct file *, struct poll_table_struct *); > int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); > long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); > long (*compat_ioctl) (struct file *, unsigned int, unsigned long); > int (*mmap) (struct file *, struct vm_area_struct *); > int (*open) (struct inode *, struct file *); > int (*flush) (struct file *, fl_owner_t id); > int (*release) (struct inode *, struct file *); > int (*fsync) (struct file *, struct dentry *, int datasync); > int (*aio_fsync) (struct kiocb *, int datasync); > int (*fasync) (int, struct file *, int); > int (*lock) (struct file *, int, struct file_lock *); > ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); > ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); > unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); > int (*check_flags)(int); > int (*dir_notify)(struct file *filp, unsigned long arg); > int (*flock) (struct file *, int, struct file_lock *); > ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); > ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); >}; > >struct inode_operations { > int (*create) (struct inode *,struct dentry *,int, struct nameidata *); > struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); > int (*link) (struct dentry *,struct inode *,struct dentry *); > int (*unlink) (struct inode *,struct dentry *); > int (*symlink) (struct inode *,struct dentry *,const char *); > int (*mkdir) (struct inode *,struct dentry *,int); > int (*rmdir) (struct inode *,struct dentry *); > int (*mknod) (struct inode *,struct dentry *,int,dev_t); > int (*rename) (struct inode *, struct dentry *, > struct inode *, struct dentry *); > int (*readlink) (struct dentry *, char *,int); > void * (*follow_link) (struct dentry *, struct nameidata *); > void (*put_link) (struct dentry *, struct nameidata *, void *); > void (*truncate) (struct inode *); > int (*permission) (struct inode *, int, struct nameidata *); > int (*setattr) (struct dentry *, struct iattr *); > int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); > int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); > ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); > ssize_t (*listxattr) (struct dentry *, char *, size_t); > int (*removexattr) (struct dentry *, const char *); > void (*truncate_range)(struct inode *, loff_t, loff_t); >}; > >struct seq_file; > >ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector, > unsigned long nr_segs, unsigned long fast_segs, > struct iovec *fast_pointer, > struct iovec **ret_pointer); > >extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *); >extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *); >extern ssize_t vfs_readv(struct file *, const struct iovec *, > unsigned long, loff_t *); >extern ssize_t vfs_writev(struct file *, const struct iovec *, > unsigned long, loff_t *); > > > > > >struct super_operations { > struct inode *(*alloc_inode)(struct super_block *sb); > void (*destroy_inode)(struct inode *); > > void (*read_inode) (struct inode *); > > void (*dirty_inode) (struct inode *); > int (*write_inode) (struct inode *, int); > void (*put_inode) (struct inode *); > void (*drop_inode) (struct inode *); > void (*delete_inode) (struct inode *); > void (*put_super) (struct super_block *); > void (*write_super) (struct super_block *); > int (*sync_fs)(struct super_block *sb, int wait); > void (*write_super_lockfs) (struct super_block *); > void (*unlockfs) (struct super_block *); > int (*statfs) (struct dentry *, struct kstatfs *); > int (*remount_fs) (struct super_block *, int *, char *); > void (*clear_inode) (struct inode *); > void (*umount_begin) (struct vfsmount *, int); > > int (*show_options)(struct seq_file *, struct vfsmount *); > int (*show_stats)(struct seq_file *, struct vfsmount *); > > ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); > ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); > >}; > > >#define I_DIRTY_SYNC 1 >#define I_DIRTY_DATASYNC 2 >#define I_DIRTY_PAGES 4 >#define __I_LOCK 3 >#define I_LOCK (1 << __I_LOCK) >#define I_FREEING 16 >#define I_CLEAR 32 >#define I_NEW 64 >#define I_WILL_FREE 128 > >#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) > >extern void __mark_inode_dirty(struct inode *, int); >static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode) >{ > __mark_inode_dirty(inode, (1 | 2 | 4)); >} > >static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode) >{ > __mark_inode_dirty(inode, 1); >} > >static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode) >{ > inode->i_nlink++; >} > >static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode) >{ > inc_nlink(inode); > mark_inode_dirty(inode); >} > >static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode) >{ > inode->i_nlink--; >} > >static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode) >{ > inode->i_nlink = 0; >} > >static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode) >{ > drop_nlink(inode); > mark_inode_dirty(inode); >} > >extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); >static inline __attribute__((always_inline)) void file_accessed(struct file *file) >{ > if (!(file->f_flags & 01000000)) > touch_atime(file->f_path.mnt, file->f_path.dentry); >} > >int sync_inode(struct inode *inode, struct writeback_control *wbc); ># 1321 "include/linux/fs.h" >struct export_operations { > struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type, > int (*acceptable)(void *context, struct dentry *de), > void *context); > int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, > int connectable); > > > int (*get_name)(struct dentry *parent, char *name, > struct dentry *child); > struct dentry * (*get_parent)(struct dentry *child); > struct dentry * (*get_dentry)(struct super_block *sb, void *inump); > > > struct dentry * (*find_exported_dentry)( > struct super_block *sb, void *obj, void *parent, > int (*acceptable)(void *context, struct dentry *de), > void *context); > > >}; > >extern struct dentry * >find_exported_dentry(struct super_block *sb, void *obj, void *parent, > int (*acceptable)(void *context, struct dentry *de), > void *context); > >struct file_system_type { > const char *name; > int fs_flags; > int (*get_sb) (struct file_system_type *, int, > const char *, void *, struct vfsmount *); > void (*kill_sb) (struct super_block *); > struct module *owner; > struct file_system_type * next; > struct list_head fs_supers; > struct lock_class_key s_lock_key; > struct lock_class_key s_umount_key; >}; > >extern int get_sb_bdev(struct file_system_type *fs_type, > int flags, const char *dev_name, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >extern int get_sb_single(struct file_system_type *fs_type, > int flags, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >extern int get_sb_nodev(struct file_system_type *fs_type, > int flags, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >void generic_shutdown_super(struct super_block *sb); >void kill_block_super(struct super_block *sb); >void kill_anon_super(struct super_block *sb); >void kill_litter_super(struct super_block *sb); >void deactivate_super(struct super_block *sb); >int set_anon_super(struct super_block *s, void *data); >struct super_block *sget(struct file_system_type *type, > int (*test)(struct super_block *,void *), > int (*set)(struct super_block *,void *), > void *data); >extern int get_sb_pseudo(struct file_system_type *, char *, > struct super_operations *ops, unsigned long, > struct vfsmount *mnt); >extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); >int __put_super(struct super_block *sb); >int __put_super_and_need_restart(struct super_block *sb); >void unnamed_dev_init(void); > > >#define fops_get(fops) (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) > >#define fops_put(fops) do { if (fops) module_put((fops)->owner); } while(0) > > >extern int register_filesystem(struct file_system_type *); >extern int unregister_filesystem(struct file_system_type *); >extern struct vfsmount *kern_mount(struct file_system_type *); >extern int may_umount_tree(struct vfsmount *); >extern int may_umount(struct vfsmount *); >extern void umount_tree(struct vfsmount *, int, struct list_head *); >extern void release_mounts(struct list_head *); >extern long do_mount(char *, char *, char *, unsigned long, void *); >extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); >extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, > struct vfsmount *); > >extern int vfs_statfs(struct dentry *, struct kstatfs *); > > >extern struct subsystem fs_subsys; > >#define FLOCK_VERIFY_READ 1 >#define FLOCK_VERIFY_WRITE 2 > >extern int locks_mandatory_locked(struct inode *); >extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); > > > > > >#define MANDATORY_LOCK(inode) (IS_MANDLOCK(inode) && ((inode)->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID) > > >static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode) >{ > if ((((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000)) > return locks_mandatory_locked(inode); > return 0; >} > >extern int rw_verify_area(int, struct file *, loff_t *, size_t); > >static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode, > struct file *filp, > loff_t size) >{ > if (inode->i_flock && (((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000)) > return locks_mandatory_area( > 2, inode, filp, > size < inode->i_size ? size : inode->i_size, > (size < inode->i_size ? inode->i_size - size > : size - inode->i_size) > ); > return 0; >} > >static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode) >{ > if (inode->i_flock) > return __break_lease(inode, mode); > return 0; >} > > > >extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, > struct file *filp); >extern long do_sys_open(int fdf, const char *filename, int flags, > int mode); >extern struct file *filp_open(const char *, int, int); >extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); >extern int filp_close(struct file *, fl_owner_t id); >extern char * getname(const char *); > > >extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init_early(void); >extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init(unsigned long); > >extern struct kmem_cache *names_cachep; > >#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) >#define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) > >#define putname(name) __putname(name) > > > > > >extern int register_blkdev(unsigned int, const char *); >extern int unregister_blkdev(unsigned int, const char *); >extern struct block_device *bdget(dev_t); >extern void bd_set_size(struct block_device *, loff_t size); >extern void bd_forget(struct inode *inode); >extern void bdput(struct block_device *); >extern struct block_device *open_by_devnum(dev_t, unsigned); >extern const struct address_space_operations def_blk_aops; > > > >extern const struct file_operations def_blk_fops; >extern const struct file_operations def_chr_fops; >extern const struct file_operations bad_sock_fops; >extern const struct file_operations def_fifo_fops; > >extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); >extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); >extern int blkdev_driver_ioctl(struct inode *inode, struct file *file, > struct gendisk *disk, unsigned cmd, > unsigned long arg); >extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); >extern int blkdev_get(struct block_device *, mode_t, unsigned); >extern int blkdev_put(struct block_device *); >extern int bd_claim(struct block_device *, void *); >extern void bd_release(struct block_device *); > >extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); >extern void bd_release_from_disk(struct block_device *, struct gendisk *); > > > > > > > >#define CHRDEV_MAJOR_HASH_SIZE 255 >extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); >extern int register_chrdev_region(dev_t, unsigned, const char *); >extern int register_chrdev(unsigned int, const char *, > const struct file_operations *); >extern int unregister_chrdev(unsigned int, const char *); >extern void unregister_chrdev_region(dev_t, unsigned); >extern int chrdev_open(struct inode *, struct file *); >extern void chrdev_show(struct seq_file *,off_t); > > >#define BDEVNAME_SIZE 32 > > >#define BLKDEV_MAJOR_HASH_SIZE 255 >extern const char *__bdevname(dev_t, char *buffer); >extern const char *bdevname(struct block_device *bdev, char *buffer); >extern struct block_device *lookup_bdev(const char *); >extern struct block_device *open_bdev_excl(const char *, int, void *); >extern void close_bdev_excl(struct block_device *); >extern void blkdev_show(struct seq_file *,off_t); > > > > >extern void init_special_inode(struct inode *, umode_t, dev_t); > > >extern void make_bad_inode(struct inode *); >extern int is_bad_inode(struct inode *); > >extern const struct file_operations read_fifo_fops; >extern const struct file_operations write_fifo_fops; >extern const struct file_operations rdwr_fifo_fops; > >extern int fs_may_remount_ro(struct super_block *); > > > > > >#define bio_rw(bio) ((bio)->bi_rw & (RW_MASK | RWA_MASK)) > > > > >#define bio_data_dir(bio) ((bio)->bi_rw & 1) > >extern int check_disk_change(struct block_device *); >extern int __invalidate_device(struct block_device *); >extern int invalidate_partition(struct gendisk *, int); > >extern int invalidate_inodes(struct super_block *); >unsigned long invalidate_mapping_pages(struct address_space *mapping, > unsigned long start, unsigned long end); >unsigned long invalidate_inode_pages(struct address_space *mapping); >static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode) >{ > if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || > (((inode->i_mode) & 00170000) == 0120000)) > invalidate_inode_pages(inode->i_mapping); >} >extern int invalidate_inode_pages2(struct address_space *mapping); >extern int invalidate_inode_pages2_range(struct address_space *mapping, > unsigned long start, unsigned long end); >extern int write_inode_now(struct inode *, int); >extern int filemap_fdatawrite(struct address_space *); >extern int filemap_flush(struct address_space *); >extern int filemap_fdatawait(struct address_space *); >extern int filemap_write_and_wait(struct address_space *mapping); >extern int filemap_write_and_wait_range(struct address_space *mapping, > loff_t lstart, loff_t lend); >extern int wait_on_page_writeback_range(struct address_space *mapping, > unsigned long start, unsigned long end); >extern int __filemap_fdatawrite_range(struct address_space *mapping, > loff_t start, loff_t end, int sync_mode); > >extern long do_fsync(struct file *file, int datasync); >extern void sync_supers(void); >extern void sync_filesystems(int wait); >extern void __fsync_super(struct super_block *sb); >extern void emergency_sync(void); >extern void emergency_remount(void); >extern int do_remount_sb(struct super_block *sb, int flags, > void *data, int force); > >extern sector_t bmap(struct inode *, sector_t); > >extern int notify_change(struct dentry *, struct iattr *); >extern int permission(struct inode *, int, struct nameidata *); >extern int generic_permission(struct inode *, int, > int (*check_acl)(struct inode *, int)); > >extern int get_write_access(struct inode *); >extern int deny_write_access(struct file *); >static inline __attribute__((always_inline)) void put_write_access(struct inode * inode) >{ > atomic_dec(&inode->i_writecount); >} >static inline __attribute__((always_inline)) void allow_write_access(struct file *file) >{ > if (file) > atomic_inc(&file->f_path.dentry->d_inode->i_writecount); >} >extern int do_pipe(int *); >extern struct file *create_read_pipe(struct file *f); >extern struct file *create_write_pipe(void); >extern void free_write_pipe(struct file *); > >extern int open_namei(int dfd, const char *, int, int, struct nameidata *); >extern int may_open(struct nameidata *, int, int); > >extern int kernel_read(struct file *, unsigned long, char *, unsigned long); >extern struct file * open_exec(const char *); > > >extern int is_subdir(struct dentry *, struct dentry *); >extern ino_t find_inode_number(struct dentry *, struct qstr *); > ># 1 "include/linux/err.h" 1 > >#define _LINUX_ERR_H ># 16 "include/linux/err.h" >#define MAX_ERRNO 4095 > > > >#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) > >static inline __attribute__((always_inline)) void *ERR_PTR(long error) >{ > return (void *) error; >} > >static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr) >{ > return (long) ptr; >} > >static inline __attribute__((always_inline)) long IS_ERR(const void *ptr) >{ > return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0); >} ># 1639 "include/linux/fs.h" 2 > > >extern loff_t default_llseek(struct file *file, loff_t offset, int origin); > >extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); > >extern void inode_init_once(struct inode *); >extern void iput(struct inode *); >extern struct inode * igrab(struct inode *); >extern ino_t iunique(struct super_block *, ino_t); >extern int inode_needs_sync(struct inode *inode); >extern void generic_delete_inode(struct inode *inode); >extern void generic_drop_inode(struct inode *inode); > >extern struct inode *ilookup5_nowait(struct super_block *sb, > unsigned long hashval, int (*test)(struct inode *, void *), > void *data); >extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, > int (*test)(struct inode *, void *), void *data); >extern struct inode *ilookup(struct super_block *sb, unsigned long ino); > >extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); >extern struct inode * iget_locked(struct super_block *, unsigned long); >extern void unlock_new_inode(struct inode *); > >static inline __attribute__((always_inline)) struct inode *iget(struct super_block *sb, unsigned long ino) >{ > struct inode *inode = iget_locked(sb, ino); > > if (inode && (inode->i_state & 64)) { > sb->s_op->read_inode(inode); > unlock_new_inode(inode); > } > > return inode; >} > >extern void __iget(struct inode * inode); >extern void clear_inode(struct inode *); >extern void destroy_inode(struct inode *); >extern struct inode *new_inode(struct super_block *); >extern int __remove_suid(struct dentry *, int); >extern int should_remove_suid(struct dentry *); >extern int remove_suid(struct dentry *); >extern void remove_dquot_ref(struct super_block *, int, struct list_head *); > >extern void __insert_inode_hash(struct inode *, unsigned long hashval); >extern void remove_inode_hash(struct inode *); >static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) { > __insert_inode_hash(inode, inode->i_ino); >} > >extern struct file * get_empty_filp(void); >extern void file_move(struct file *f, struct list_head *list); >extern void file_kill(struct file *f); > >struct bio; >extern void submit_bio(int, struct bio *); >extern int bdev_read_only(struct block_device *); > >extern int set_blocksize(struct block_device *, int); >extern int sb_set_blocksize(struct super_block *, int); >extern int sb_min_blocksize(struct super_block *, int); > >extern int generic_file_mmap(struct file *, struct vm_area_struct *); >extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); >extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); >extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); >int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); >extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); >extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); >extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, > unsigned long, loff_t); >extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, > unsigned long *, loff_t, loff_t *, size_t, size_t); >extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, > unsigned long, loff_t, loff_t *, size_t, ssize_t); >extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos); >extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos); >extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); >extern void do_generic_mapping_read(struct address_space *mapping, > struct file_ra_state *, struct file *, > loff_t *, read_descriptor_t *, read_actor_t); > > >extern ssize_t generic_file_splice_read(struct file *, loff_t *, > struct pipe_inode_info *, size_t, unsigned int); >extern ssize_t generic_file_splice_write(struct pipe_inode_info *, > struct file *, loff_t *, size_t, unsigned int); >extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *, > struct file *, loff_t *, size_t, unsigned int); >extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, > struct file *out, loff_t *, size_t len, unsigned int flags); >extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, > size_t len, unsigned int flags); > >extern void >file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); >extern loff_t no_llseek(struct file *file, loff_t offset, int origin); >extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); >extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); >extern int generic_file_open(struct inode * inode, struct file * filp); >extern int nonseekable_open(struct inode * inode, struct file * filp); ># 1754 "include/linux/fs.h" >static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from) >{ > return 0; >} > > >static inline __attribute__((always_inline)) void do_generic_file_read(struct file * filp, loff_t *ppos, > read_descriptor_t * desc, > read_actor_t actor) >{ > do_generic_mapping_read(filp->f_mapping, > &filp->f_ra, > filp, > ppos, > desc, > actor); >} > > >ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, > struct block_device *bdev, const struct iovec *iov, loff_t offset, > unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, > int lock_type); > >enum { > DIO_LOCKING = 1, > DIO_NO_LOCKING, > DIO_OWN_LOCKING, >}; > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_LOCKING); >} > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_NO_LOCKING); >} > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_OWN_LOCKING); >} > > >extern const struct file_operations generic_ro_fops; > >#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) > >extern int vfs_readlink(struct dentry *, char *, int, const char *); >extern int vfs_follow_link(struct nameidata *, const char *); >extern int page_readlink(struct dentry *, char *, int); >extern void *page_follow_link_light(struct dentry *, struct nameidata *); >extern void page_put_link(struct dentry *, struct nameidata *, void *); >extern int __page_symlink(struct inode *inode, const char *symname, int len, > gfp_t gfp_mask); >extern int page_symlink(struct inode *inode, const char *symname, int len); >extern struct inode_operations page_symlink_inode_operations; >extern int generic_readlink(struct dentry *, char *, int); >extern void generic_fillattr(struct inode *, struct kstat *); >extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); >void inode_add_bytes(struct inode *inode, loff_t bytes); >void inode_sub_bytes(struct inode *inode, loff_t bytes); >loff_t inode_get_bytes(struct inode *inode); >void inode_set_bytes(struct inode *inode, loff_t bytes); > >extern int vfs_readdir(struct file *, filldir_t, void *); > >extern int vfs_stat(char *, struct kstat *); >extern int vfs_lstat(char *, struct kstat *); >extern int vfs_stat_fd(int dfd, char *, struct kstat *); >extern int vfs_lstat_fd(int dfd, char *, struct kstat *); >extern int vfs_fstat(unsigned int, struct kstat *); > >extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long); > >extern struct file_system_type *get_fs_type(const char *name); >extern struct super_block *get_super(struct block_device *); >extern struct super_block *user_get_super(dev_t); >extern void drop_super(struct super_block *sb); > >extern int dcache_dir_open(struct inode *, struct file *); >extern int dcache_dir_close(struct inode *, struct file *); >extern loff_t dcache_dir_lseek(struct file *, loff_t, int); >extern int dcache_readdir(struct file *, void *, filldir_t); >extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); >extern int simple_statfs(struct dentry *, struct kstatfs *); >extern int simple_link(struct dentry *, struct inode *, struct dentry *); >extern int simple_unlink(struct inode *, struct dentry *); >extern int simple_rmdir(struct inode *, struct dentry *); >extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); >extern int simple_sync_file(struct file *, struct dentry *, int); >extern int simple_empty(struct dentry *); >extern int simple_readpage(struct file *file, struct page *page); >extern int simple_prepare_write(struct file *file, struct page *page, > unsigned offset, unsigned to); >extern int simple_commit_write(struct file *file, struct page *page, > unsigned offset, unsigned to); > >extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); >extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); >extern const struct file_operations simple_dir_operations; >extern struct inode_operations simple_dir_inode_operations; >struct tree_descr { char *name; const struct file_operations *ops; int mode; }; >struct dentry *d_alloc_name(struct dentry *, const char *); >extern int simple_fill_super(struct super_block *, int, struct tree_descr *); >extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); >extern void simple_release_fs(struct vfsmount **mount, int *count); > >extern ssize_t simple_read_from_buffer(void *, size_t, loff_t *, const void *, size_t); > > > > > >#define buffer_migrate_page NULL > > >extern int inode_change_ok(struct inode *, struct iattr *); >extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *); > >extern void file_update_time(struct file *file); > >static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry) >{ > ino_t res; > > _spin_lock(&dentry->d_lock); > res = dentry->d_parent->d_inode->i_ino; > _spin_unlock(&dentry->d_lock); > return res; >} > > >extern int unshare_files(void); > > > > > > > >struct simple_transaction_argresp { > ssize_t size; > char data[0]; >}; > >#define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp)) > >char *simple_transaction_get(struct file *file, const char *buf, > size_t size); >ssize_t simple_transaction_read(struct file *file, char *buf, > size_t size, loff_t *pos); >int simple_transaction_release(struct inode *inode, struct file *file); > >static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n) >{ > struct simple_transaction_argresp *ar = file->private_data; > > do { if (__builtin_expect(!!((n > ((1UL << 12) - sizeof(struct simple_transaction_argresp)))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/fs.h"), "i" (1926), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > > > > > > __asm__ __volatile__("": : :"memory"); > ar->size = n; >} ># 1952 "include/linux/fs.h" >#define DEFINE_SIMPLE_ATTRIBUTE(__fops,__get,__set,__fmt) static int __fops ## _open(struct inode *inode, struct file *file) { __simple_attr_check_format(__fmt, 0ull); return simple_attr_open(inode, file, __get, __set, __fmt); } static struct file_operations __fops = { .owner = THIS_MODULE, .open = __fops ## _open, .release = simple_attr_close, .read = simple_attr_read, .write = simple_attr_write, }; ># 1966 "include/linux/fs.h" >static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2))) >__simple_attr_check_format(const char *fmt, ...) >{ > >} > >int simple_attr_open(struct inode *inode, struct file *file, > u64 (*get)(void *), void (*set)(void *, u64), > const char *fmt); >int simple_attr_close(struct inode *inode, struct file *file); >ssize_t simple_attr_read(struct file *file, char *buf, > size_t len, loff_t *ppos); >ssize_t simple_attr_write(struct file *file, const char *buf, > size_t len, loff_t *ppos); ># 1993 "include/linux/fs.h" >static inline __attribute__((always_inline)) char *alloc_secdata(void) >{ > return (char *)1; >} > >static inline __attribute__((always_inline)) void free_secdata(void *secdata) >{ } ># 16 "include/linux/mm.h" 2 > ># 1 "include/linux/debug_locks.h" 1 > >#define __LINUX_DEBUG_LOCKING_H > >struct task_struct; > >extern int debug_locks; >extern int debug_locks_silent; > > > > >extern int debug_locks_off(void); > > > > > > >#define _RET_IP_ (unsigned long)__builtin_return_address(0) >#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) > >#define DEBUG_LOCKS_WARN_ON(c) ({ int __ret = 0; if (unlikely(c)) { if (debug_locks_silent || debug_locks_off()) WARN_ON(1); __ret = 1; } __ret; }) ># 37 "include/linux/debug_locks.h" >#define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0) > > > > extern void locking_selftest(void); > > > > >struct task_struct; > > > > > > > >static inline __attribute__((always_inline)) void debug_show_all_locks(void) >{ >} > >static inline __attribute__((always_inline)) void debug_show_held_locks(struct task_struct *task) >{ >} > >static inline __attribute__((always_inline)) void >debug_check_no_locks_freed(const void *from, unsigned long len) >{ >} > >static inline __attribute__((always_inline)) void >debug_check_no_locks_held(struct task_struct *task) >{ >} ># 18 "include/linux/mm.h" 2 ># 1 "include/linux/backing-dev.h" 1 ># 9 "include/linux/backing-dev.h" >#define _LINUX_BACKING_DEV_H > > > >struct page; > > > > >enum bdi_state { > BDI_pdflush, > BDI_write_congested, > BDI_read_congested, > BDI_unused, >}; > >typedef int (congested_fn)(void *, int); > >struct backing_dev_info { > unsigned long ra_pages; > unsigned long state; > unsigned int capabilities; > congested_fn *congested_fn; > void *congested_data; > void (*unplug_io_fn)(struct backing_dev_info *, struct page *); > void *unplug_io_data; >}; ># 46 "include/linux/backing-dev.h" >#define BDI_CAP_NO_ACCT_DIRTY 0x00000001 >#define BDI_CAP_NO_WRITEBACK 0x00000002 >#define BDI_CAP_MAP_COPY 0x00000004 >#define BDI_CAP_MAP_DIRECT 0x00000008 >#define BDI_CAP_READ_MAP 0x00000010 >#define BDI_CAP_WRITE_MAP 0x00000020 >#define BDI_CAP_EXEC_MAP 0x00000040 >#define BDI_CAP_VMFLAGS (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP) ># 63 "include/linux/backing-dev.h" >extern struct backing_dev_info default_backing_dev_info; >void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); > >int writeback_acquire(struct backing_dev_info *bdi); >int writeback_in_progress(struct backing_dev_info *bdi); >void writeback_release(struct backing_dev_info *bdi); > >static inline __attribute__((always_inline)) int bdi_congested(struct backing_dev_info *bdi, int bdi_bits) >{ > if (bdi->congested_fn) > return bdi->congested_fn(bdi->congested_data, bdi_bits); > return (bdi->state & bdi_bits); >} > >static inline __attribute__((always_inline)) int bdi_read_congested(struct backing_dev_info *bdi) >{ > return bdi_congested(bdi, 1 << BDI_read_congested); >} > >static inline __attribute__((always_inline)) int bdi_write_congested(struct backing_dev_info *bdi) >{ > return bdi_congested(bdi, 1 << BDI_write_congested); >} > >static inline __attribute__((always_inline)) int bdi_rw_congested(struct backing_dev_info *bdi) >{ > return bdi_congested(bdi, (1 << BDI_read_congested)| > (1 << BDI_write_congested)); >} > >void clear_bdi_congested(struct backing_dev_info *bdi, int rw); >void set_bdi_congested(struct backing_dev_info *bdi, int rw); >long congestion_wait(int rw, long timeout); >void congestion_end(int rw); > >#define bdi_cap_writeback_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK)) > > >#define bdi_cap_account_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY)) > > >#define mapping_cap_writeback_dirty(mapping) bdi_cap_writeback_dirty((mapping)->backing_dev_info) > > >#define mapping_cap_account_dirty(mapping) bdi_cap_account_dirty((mapping)->backing_dev_info) ># 19 "include/linux/mm.h" 2 ># 1 "include/linux/mm_types.h" 1 > >#define _LINUX_MM_TYPES_H > > > > > > >struct address_space; ># 18 "include/linux/mm_types.h" >struct page { > unsigned long flags; > > atomic_t _count; > atomic_t _mapcount; > > > > union { > struct { > unsigned long private; > > > > > > > struct address_space *mapping; > > > > > > > }; > > > > }; > unsigned long index; > struct list_head lru; ># 65 "include/linux/mm_types.h" >}; ># 20 "include/linux/mm.h" 2 > >struct mempolicy; >struct anon_vma; > > >extern unsigned long max_mapnr; > > >extern unsigned long num_physpages; >extern void * high_memory; >extern unsigned long vmalloc_earlyreserve; >extern int page_cluster; > > >extern int sysctl_legacy_va_layout; > > > > > ># 1 "include/asm/pgtable.h" 1 ># 9 "include/asm/pgtable.h" >#define __UM_PGTABLE_H > > > > > ># 1 "include/asm/fixmap.h" 1 ># 16 "include/asm/pgtable.h" 2 > >#define _PAGE_PRESENT 0x001 >#define _PAGE_NEWPAGE 0x002 >#define _PAGE_NEWPROT 0x004 >#define _PAGE_RW 0x020 >#define _PAGE_USER 0x040 >#define _PAGE_ACCESSED 0x080 >#define _PAGE_DIRTY 0x100 > >#define _PAGE_FILE 0x008 >#define _PAGE_PROTNONE 0x010 > > > > > ># 1 "include/asm/pgtable-2level.h" 1 ># 9 "include/asm/pgtable-2level.h" >#define __UM_PGTABLE_2LEVEL_H > ># 1 "include/asm-generic/pgtable-nopmd.h" 1 > >#define _PGTABLE_NOPMD_H > > > ># 1 "include/asm-generic/pgtable-nopud.h" 1 > >#define _PGTABLE_NOPUD_H > > > >#define __PAGETABLE_PUD_FOLDED > > > > > > >typedef struct { pgd_t pgd; } pud_t; > >#define PUD_SHIFT PGDIR_SHIFT >#define PTRS_PER_PUD 1 >#define PUD_SIZE (1UL << PUD_SHIFT) >#define PUD_MASK (~(PUD_SIZE-1)) > > > > > > >static inline __attribute__((always_inline)) int pgd_none(pgd_t pgd) { return 0; } >static inline __attribute__((always_inline)) int pgd_bad(pgd_t pgd) { return 0; } >static inline __attribute__((always_inline)) int pgd_present(pgd_t pgd) { return 1; } >static inline __attribute__((always_inline)) void pgd_clear(pgd_t *pgd) { } >#define pud_ERROR(pud) (pgd_ERROR((pud).pgd)) > >#define pgd_populate(mm,pgd,pud) do { } while (0) > > > > >#define set_pgd(pgdptr,pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval }) > >static inline __attribute__((always_inline)) pud_t * pud_offset(pgd_t * pgd, unsigned long address) >{ > return (pud_t *)pgd; >} > >#define pud_val(x) (pgd_val((x).pgd)) >#define __pud(x) ((pud_t) { __pgd(x) } ) > >#define pgd_page(pgd) (pud_page((pud_t){ pgd })) >#define pgd_page_vaddr(pgd) (pud_page_vaddr((pud_t){ pgd })) > > > > > >#define pud_alloc_one(mm,address) NULL >#define pud_free(x) do { } while (0) >#define __pud_free_tlb(tlb,x) do { } while (0) > >#undef pud_addr_end >#define pud_addr_end(addr,end) (end) ># 7 "include/asm-generic/pgtable-nopmd.h" 2 > >#define __PAGETABLE_PMD_FOLDED > > > > > > >typedef struct { pud_t pud; } pmd_t; > >#define PMD_SHIFT PUD_SHIFT >#define PTRS_PER_PMD 1 >#define PMD_SIZE (1UL << PMD_SHIFT) >#define PMD_MASK (~(PMD_SIZE-1)) > > > > > > >static inline __attribute__((always_inline)) int pud_none(pud_t pud) { return 0; } >static inline __attribute__((always_inline)) int pud_bad(pud_t pud) { return 0; } >static inline __attribute__((always_inline)) int pud_present(pud_t pud) { return 1; } >static inline __attribute__((always_inline)) void pud_clear(pud_t *pud) { } >#define pmd_ERROR(pmd) (pud_ERROR((pmd).pud)) > >#define pud_populate(mm,pmd,pte) do { } while (0) > > > > > >#define set_pud(pudptr,pudval) set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval }) > >static inline __attribute__((always_inline)) pmd_t * pmd_offset(pud_t * pud, unsigned long address) >{ > return (pmd_t *)pud; >} > >#define pmd_val(x) (pud_val((x).pud)) >#define __pmd(x) ((pmd_t) { __pud(x) } ) > >#define pud_page(pud) (pmd_page((pmd_t){ pud })) >#define pud_page_vaddr(pud) (pmd_page_vaddr((pmd_t){ pud })) > > > > > >#define pmd_alloc_one(mm,address) NULL >#define pmd_free(x) do { } while (0) >#define __pmd_free_tlb(tlb,x) do { } while (0) > >#undef pmd_addr_end >#define pmd_addr_end(addr,end) (end) ># 12 "include/asm/pgtable-2level.h" 2 > > > >#define PGDIR_SHIFT 22 >#define PGDIR_SIZE (1UL << PGDIR_SHIFT) >#define PGDIR_MASK (~(PGDIR_SIZE-1)) > > > > > >#define PTRS_PER_PTE 1024 >#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE) >#define PTRS_PER_PGD 1024 >#define FIRST_USER_ADDRESS 0 > >#define pte_ERROR(e) printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e)) > > >#define pgd_ERROR(e) printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) > > > >static inline __attribute__((always_inline)) int pgd_newpage(pgd_t pgd) { return 0; } >static inline __attribute__((always_inline)) void pgd_mkuptodate(pgd_t pgd) { } > >#define set_pmd(pmdptr,pmdval) (*(pmdptr) = (pmdval)) > >#define pte_pfn(x) phys_to_pfn(pte_val(x)) >#define pfn_pte(pfn,prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) >#define pfn_pmd(pfn,prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) > >#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) > > > > > >#define PTE_FILE_MAX_BITS 28 > >#define pte_to_pgoff(pte) (pte_val(pte) >> 4) > >#define pgoff_to_pte(off) ((pte_t) { ((off) << 4) + _PAGE_FILE }) ># 33 "include/asm/pgtable.h" 2 > > >extern pgd_t swapper_pg_dir[1024]; > >extern void *um_virt_to_phys(struct task_struct *task, unsigned long virt, > pte_t *pte_out); > > >extern unsigned long *empty_zero_page; > >#define pgtable_cache_init() do ; while (0) > > > > > >#define USER_PGD_PTRS (TASK_SIZE >> PGDIR_SHIFT) >#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) ># 61 "include/asm/pgtable.h" >extern unsigned long end_iomem; > >#define VMALLOC_OFFSET (__va_space) >#define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) > > > > >#define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) > > >#define REGION_SHIFT (sizeof(pte_t) * 8 - 4) >#define REGION_MASK (((unsigned long) 0xf) << REGION_SHIFT) > >#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY) >#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) >#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) > >#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED) >#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED) >#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) >#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED) >#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) >#define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED) > > > > > >#define __P000 PAGE_NONE >#define __P001 PAGE_READONLY >#define __P010 PAGE_COPY >#define __P011 PAGE_COPY >#define __P100 PAGE_READONLY >#define __P101 PAGE_READONLY >#define __P110 PAGE_COPY >#define __P111 PAGE_COPY > >#define __S000 PAGE_NONE >#define __S001 PAGE_READONLY >#define __S010 PAGE_SHARED >#define __S011 PAGE_SHARED >#define __S100 PAGE_READONLY >#define __S101 PAGE_READONLY >#define __S110 PAGE_SHARED >#define __S111 PAGE_SHARED > > > > > > >#undef TEST_VERIFY_AREA > > >extern unsigned long pg0[1024]; > > > > > > >#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) > > >#define BITS_PER_PTR (8*sizeof(unsigned long)) > > >#define PTR_MASK (~(sizeof(void*)-1)) > > > >#define SIZEOF_PTR_LOG2 3 > > >#define PAGE_PTR(address) ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) > > >#define pte_clear(mm,addr,xp) pte_set_val(*(xp), (phys_t) 0, __pgprot(_PAGE_NEWPAGE)) > >#define pmd_none(x) (!((unsigned long)pmd_val(x) & ~_PAGE_NEWPAGE)) >#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) >#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) >#define pmd_clear(xp) do { pmd_val(*(xp)) = _PAGE_NEWPAGE; } while (0) > >#define pmd_newpage(x) (pmd_val(x) & _PAGE_NEWPAGE) >#define pmd_mkuptodate(x) (pmd_val(x) &= ~_PAGE_NEWPAGE) > >#define pud_newpage(x) (pud_val(x) & _PAGE_NEWPAGE) >#define pud_mkuptodate(x) (pud_val(x) &= ~_PAGE_NEWPAGE) > >#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) > >#define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) > >#define pte_page(x) pfn_to_page(pte_pfn(x)) >#define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) >#define mk_phys(a,r) ((a) + (((unsigned long) r) << REGION_SHIFT)) >#define phys_addr(p) ((p) & ~REGION_MASK) > >#define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE)) > > > > > > > >static inline __attribute__((always_inline)) int pte_none(pte_t pte) >{ > return (!((pte).pte & ~0x002)); >} > > > > > >static inline __attribute__((always_inline)) int pte_user(pte_t pte) >{ > return((((pte).pte & (0x040))) && > !(((pte).pte & (0x010)))); >} > >static inline __attribute__((always_inline)) int pte_read(pte_t pte) >{ > return((((pte).pte & (0x040))) && > !(((pte).pte & (0x010)))); >} > >static inline __attribute__((always_inline)) int pte_exec(pte_t pte){ > return((((pte).pte & (0x040))) && > !(((pte).pte & (0x010)))); >} > >static inline __attribute__((always_inline)) int pte_write(pte_t pte) >{ > return((((pte).pte & (0x020))) && > !(((pte).pte & (0x010)))); >} > > > > >static inline __attribute__((always_inline)) int pte_file(pte_t pte) >{ > return ((pte).pte & (0x008)); >} > >static inline __attribute__((always_inline)) int pte_dirty(pte_t pte) >{ > return ((pte).pte & (0x100)); >} > >static inline __attribute__((always_inline)) int pte_young(pte_t pte) >{ > return ((pte).pte & (0x080)); >} > >static inline __attribute__((always_inline)) int pte_newpage(pte_t pte) >{ > return ((pte).pte & (0x002)); >} > >static inline __attribute__((always_inline)) int pte_newprot(pte_t pte) >{ > return(((pte).pte & ((0x001 | 0x010))) && (((pte).pte & (0x004)))); >} > > > > > > > >static inline __attribute__((always_inline)) pte_t pte_mknewprot(pte_t pte) >{ > ((pte).pte |= (0x004)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_rdprotect(pte_t pte) >{ > ((pte).pte &= ~(0x040)); > return(pte_mknewprot(pte)); >} > >static inline __attribute__((always_inline)) pte_t pte_exprotect(pte_t pte) >{ > ((pte).pte &= ~(0x040)); > return(pte_mknewprot(pte)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t pte) >{ > ((pte).pte &= ~(0x100)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t pte) >{ > ((pte).pte &= ~(0x080)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t pte) >{ > ((pte).pte &= ~(0x020)); > return(pte_mknewprot(pte)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkread(pte_t pte) >{ > ((pte).pte |= (0x020)); > return(pte_mknewprot(pte)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t pte) >{ > ((pte).pte |= (0x100)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t pte) >{ > ((pte).pte |= (0x080)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t pte) >{ > ((pte).pte |= (0x020)); > return(pte_mknewprot(pte)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkuptodate(pte_t pte) >{ > ((pte).pte &= ~(0x002)); > if(((pte).pte & ((0x001 | 0x010)))) > ((pte).pte &= ~(0x004)); > return(pte); >} > >static inline __attribute__((always_inline)) pte_t pte_mknewpage(pte_t pte) >{ > ((pte).pte |= (0x002)); > return(pte); >} > >static inline __attribute__((always_inline)) void set_pte(pte_t *pteptr, pte_t pteval) >{ > ((*pteptr).pte = (pteval).pte); > > > > > > > *pteptr = pte_mknewpage(*pteptr); > if(((*pteptr).pte & ((0x001 | 0x010)))) *pteptr = pte_mknewprot(*pteptr); >} >#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) > > > > > > >#define phys_to_page(phys) pfn_to_page(phys_to_pfn(phys)) >#define __virt_to_page(virt) phys_to_page(__pa(virt)) >#define page_to_phys(page) pfn_to_phys(page_to_pfn(page)) > >#define mk_pte(page,pgprot) ({ pte_t pte; pte_set_val(pte, page_to_phys(page), (pgprot)); if (pte_present(pte)) pte_mknewprot(pte_mknewpage(pte)); pte;}) > > > > > > > >static inline __attribute__((always_inline)) pte_t pte_modify(pte_t pte, pgprot_t newprot) >{ > (pte).pte = ((((pte).pte) & ((~((1UL << 12)-1)) | 0x080 | 0x100)) | ((newprot).pgprot)); > return pte; >} > >#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) > > > > > > > >#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) > >#define pgd_index_k(addr) pgd_index(addr) > > > > > >#define pgd_offset(mm,address) ((mm)->pgd+pgd_index(address)) > > > > > >#define pgd_offset_k(address) pgd_offset(&init_mm, address) > > > > > > > >#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) > > > > > > > >#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) >#define pte_offset_kernel(dir,address) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address)) > >#define pte_offset_map(dir,address) ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address)) > >#define pte_offset_map_nested(dir,address) pte_offset_map(dir, address) >#define pte_unmap(pte) do { } while (0) >#define pte_unmap_nested(pte) do { } while (0) > >#define update_mmu_cache(vma,address,pte) do ; while (0) > > >#define __swp_type(x) (((x).val >> 4) & 0x3f) >#define __swp_offset(x) ((x).val >> 11) > >#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 4) | ((offset) << 11) }) > >#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) }) > >#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) > >#define kern_addr_valid(addr) (1) > ># 1 "include/asm-generic/pgtable.h" 1 > >#define _ASM_GENERIC_PGTABLE_H ># 18 "include/asm-generic/pgtable.h" >#define ptep_establish(__vma,__address,__ptep,__entry) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0) ># 32 "include/asm-generic/pgtable.h" >#define ptep_set_access_flags(__vma,__address,__ptep,__entry,__dirty) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0) > > > > > > > >#define ptep_test_and_clear_young(__vma,__address,__ptep) ({ pte_t __pte = *(__ptep); int r = 1; if (!pte_young(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkold(__pte)); r; }) ># 54 "include/asm-generic/pgtable.h" >#define ptep_clear_flush_young(__vma,__address,__ptep) ({ int __young; __young = ptep_test_and_clear_young(__vma, __address, __ptep); if (__young) flush_tlb_page(__vma, __address); __young; }) ># 65 "include/asm-generic/pgtable.h" >#define ptep_test_and_clear_dirty(__vma,__address,__ptep) ({ pte_t __pte = *__ptep; int r = 1; if (!pte_dirty(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkclean(__pte)); r; }) ># 79 "include/asm-generic/pgtable.h" >#define ptep_clear_flush_dirty(__vma,__address,__ptep) ({ int __dirty; __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); if (__dirty) flush_tlb_page(__vma, __address); __dirty; }) ># 90 "include/asm-generic/pgtable.h" >#define ptep_get_and_clear(__mm,__address,__ptep) ({ pte_t __pte = *(__ptep); pte_clear((__mm), (__address), (__ptep)); __pte; }) ># 99 "include/asm-generic/pgtable.h" >#define ptep_get_and_clear_full(__mm,__address,__ptep,__full) ({ pte_t __pte; __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); __pte; }) ># 113 "include/asm-generic/pgtable.h" >#define pte_clear_not_present_full(__mm,__address,__ptep,__full) do { pte_clear((__mm), (__address), (__ptep)); } while (0) > > > > > > >#define ptep_clear_flush(__vma,__address,__ptep) ({ pte_t __pte; __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); flush_tlb_page(__vma, __address); __pte; }) ># 130 "include/asm-generic/pgtable.h" >struct mm_struct; >static inline __attribute__((always_inline)) void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep) >{ > pte_t old_pte = *ptep; > set_pte(ptep,pte_wrprotect(old_pte)); >} > > > >#define pte_same(A,B) (pte_val(A) == pte_val(B)) > > > >#define page_test_and_clear_dirty(page) (0) >#define pte_maybe_dirty(pte) pte_dirty(pte) > > > > > >#define page_test_and_clear_young(page) (0) > > > >#define pgd_offset_gate(mm,addr) pgd_offset(mm, addr) > > > >#define lazy_mmu_prot_update(pte) do { } while (0) > > > >#define move_pte(pte,prot,old_addr,new_addr) (pte) ># 181 "include/asm-generic/pgtable.h" >#define arch_enter_lazy_mmu_mode() do {} while (0) >#define arch_leave_lazy_mmu_mode() do {} while (0) ># 191 "include/asm-generic/pgtable.h" >#define pgd_addr_end(addr,end) ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); }) ># 215 "include/asm-generic/pgtable.h" >void pgd_clear_bad(pgd_t *); >void pud_clear_bad(pud_t *); >void pmd_clear_bad(pmd_t *); > >static inline __attribute__((always_inline)) int pgd_none_or_clear_bad(pgd_t *pgd) >{ > if (pgd_none(*pgd)) > return 1; > if (__builtin_expect(!!(pgd_bad(*pgd)), 0)) { > pgd_clear_bad(pgd); > return 1; > } > return 0; >} > >static inline __attribute__((always_inline)) int pud_none_or_clear_bad(pud_t *pud) >{ > if (pud_none(*pud)) > return 1; > if (__builtin_expect(!!(pud_bad(*pud)), 0)) { > pud_clear_bad(pud); > return 1; > } > return 0; >} > >static inline __attribute__((always_inline)) int pmd_none_or_clear_bad(pmd_t *pmd) >{ > if ((!((unsigned long)((((((*pmd).pud).pgd).pgd))) & ~0x002))) > return 1; > if (__builtin_expect(!!(((((((((*pmd).pud).pgd).pgd))) & (~(~((1UL << 12)-1)) & ~0x040)) != (0x001 | 0x020 | 0x080 | 0x100))), 0)) { > pmd_clear_bad(pmd); > return 1; > } > return 0; >} ># 408 "include/asm/pgtable.h" 2 > > > > > > >#define virt_to_page(addr) __virt_to_page((const unsigned long) addr) ># 41 "include/linux/mm.h" 2 > > >#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) ># 60 "include/linux/mm.h" >struct vm_area_struct { > struct mm_struct * vm_mm; > unsigned long vm_start; > unsigned long vm_end; > > > > struct vm_area_struct *vm_next; > > pgprot_t vm_page_prot; > unsigned long vm_flags; > > struct rb_node vm_rb; > > > > > > > > union { > struct { > struct list_head list; > void *parent; > struct vm_area_struct *head; > } vm_set; > > struct raw_prio_tree_node prio_tree_node; > } shared; > > > > > > > > struct list_head anon_vma_node; > struct anon_vma *anon_vma; > > > struct vm_operations_struct * vm_ops; > > > unsigned long vm_pgoff; > > struct file * vm_file; > void * vm_private_data; > unsigned long vm_truncate_count; > > > > > > > >}; > >extern struct kmem_cache *vm_area_cachep; > > > > > > >struct vm_list_struct { > struct vm_list_struct *next; > struct vm_area_struct *vma; >}; ># 139 "include/linux/mm.h" >#define VM_READ 0x00000001 >#define VM_WRITE 0x00000002 >#define VM_EXEC 0x00000004 >#define VM_SHARED 0x00000008 > > >#define VM_MAYREAD 0x00000010 >#define VM_MAYWRITE 0x00000020 >#define VM_MAYEXEC 0x00000040 >#define VM_MAYSHARE 0x00000080 > >#define VM_GROWSDOWN 0x00000100 >#define VM_GROWSUP 0x00000200 >#define VM_PFNMAP 0x00000400 >#define VM_DENYWRITE 0x00000800 > >#define VM_EXECUTABLE 0x00001000 >#define VM_LOCKED 0x00002000 >#define VM_IO 0x00004000 > > >#define VM_SEQ_READ 0x00008000 >#define VM_RAND_READ 0x00010000 > >#define VM_DONTCOPY 0x00020000 >#define VM_DONTEXPAND 0x00040000 >#define VM_RESERVED 0x00080000 >#define VM_ACCOUNT 0x00100000 >#define VM_HUGETLB 0x00400000 >#define VM_NONLINEAR 0x00800000 >#define VM_MAPPED_COPY 0x01000000 >#define VM_INSERTPAGE 0x02000000 > > >#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS > > > > > >#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) > > >#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ) >#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK >#define VM_NormalReadHint(v) (!((v)->vm_flags & VM_READHINTMASK)) >#define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ) >#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) > > > > > >extern pgprot_t protection_map[16]; > > > > > > > >struct vm_operations_struct { > void (*open)(struct vm_area_struct * area); > void (*close)(struct vm_area_struct * area); > struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); > unsigned long (*nopfn)(struct vm_area_struct * area, unsigned long address); > int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); > > > > int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); > > > > > > > >}; > >struct mmu_gather; >struct inode; > >#define page_private(page) ((page)->private) >#define set_page_private(page,v) ((page)->private = (v)) > > > > > ># 1 "include/linux/page-flags.h" 1 > > > > > >#define PAGE_FLAGS_H ># 69 "include/linux/page-flags.h" >#define PG_locked 0 >#define PG_error 1 >#define PG_referenced 2 >#define PG_uptodate 3 > >#define PG_dirty 4 >#define PG_lru 5 >#define PG_active 6 >#define PG_slab 7 > >#define PG_checked 8 >#define PG_arch_1 9 >#define PG_reserved 10 >#define PG_private 11 > >#define PG_writeback 12 >#define PG_nosave 13 >#define PG_compound 14 >#define PG_swapcache 15 > >#define PG_mappedtodisk 16 >#define PG_reclaim 17 >#define PG_nosave_free 18 >#define PG_buddy 19 ># 109 "include/linux/page-flags.h" >#define PageLocked(page) test_bit(PG_locked, &(page)->flags) > >#define SetPageLocked(page) set_bit(PG_locked, &(page)->flags) > >#define TestSetPageLocked(page) test_and_set_bit(PG_locked, &(page)->flags) > >#define ClearPageLocked(page) clear_bit(PG_locked, &(page)->flags) > >#define TestClearPageLocked(page) test_and_clear_bit(PG_locked, &(page)->flags) > > >#define PageError(page) test_bit(PG_error, &(page)->flags) >#define SetPageError(page) set_bit(PG_error, &(page)->flags) >#define ClearPageError(page) clear_bit(PG_error, &(page)->flags) > >#define PageReferenced(page) test_bit(PG_referenced, &(page)->flags) >#define SetPageReferenced(page) set_bit(PG_referenced, &(page)->flags) >#define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags) >#define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) > >#define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) > > > > > > > >#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) > >#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) > >#define PageDirty(page) test_bit(PG_dirty, &(page)->flags) >#define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) >#define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) >#define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) >#define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) >#define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) > >#define PageLRU(page) test_bit(PG_lru, &(page)->flags) >#define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) >#define ClearPageLRU(page) clear_bit(PG_lru, &(page)->flags) >#define __ClearPageLRU(page) __clear_bit(PG_lru, &(page)->flags) > >#define PageActive(page) test_bit(PG_active, &(page)->flags) >#define SetPageActive(page) set_bit(PG_active, &(page)->flags) >#define ClearPageActive(page) clear_bit(PG_active, &(page)->flags) >#define __ClearPageActive(page) __clear_bit(PG_active, &(page)->flags) > >#define PageSlab(page) test_bit(PG_slab, &(page)->flags) >#define __SetPageSlab(page) __set_bit(PG_slab, &(page)->flags) >#define __ClearPageSlab(page) __clear_bit(PG_slab, &(page)->flags) > > > > >#define PageHighMem(page) 0 > > >#define PageChecked(page) test_bit(PG_checked, &(page)->flags) >#define SetPageChecked(page) set_bit(PG_checked, &(page)->flags) >#define ClearPageChecked(page) clear_bit(PG_checked, &(page)->flags) > >#define PageReserved(page) test_bit(PG_reserved, &(page)->flags) >#define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) >#define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) >#define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) > >#define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) >#define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) >#define PagePrivate(page) test_bit(PG_private, &(page)->flags) >#define __SetPagePrivate(page) __set_bit(PG_private, &(page)->flags) >#define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags) > >#define PageWriteback(page) test_bit(PG_writeback, &(page)->flags) >#define SetPageWriteback(page) do { if (!test_and_set_bit(PG_writeback, &(page)->flags)) inc_zone_page_state(page, NR_WRITEBACK); } while (0) > > > > > >#define TestSetPageWriteback(page) ({ int ret; ret = test_and_set_bit(PG_writeback, &(page)->flags); if (!ret) inc_zone_page_state(page, NR_WRITEBACK); ret; }) ># 199 "include/linux/page-flags.h" >#define ClearPageWriteback(page) do { if (test_and_clear_bit(PG_writeback, &(page)->flags)) dec_zone_page_state(page, NR_WRITEBACK); } while (0) > > > > > >#define TestClearPageWriteback(page) ({ int ret; ret = test_and_clear_bit(PG_writeback, &(page)->flags); if (ret) dec_zone_page_state(page, NR_WRITEBACK); ret; }) ># 215 "include/linux/page-flags.h" >#define PageNosave(page) test_bit(PG_nosave, &(page)->flags) >#define SetPageNosave(page) set_bit(PG_nosave, &(page)->flags) >#define TestSetPageNosave(page) test_and_set_bit(PG_nosave, &(page)->flags) >#define ClearPageNosave(page) clear_bit(PG_nosave, &(page)->flags) >#define TestClearPageNosave(page) test_and_clear_bit(PG_nosave, &(page)->flags) > >#define PageNosaveFree(page) test_bit(PG_nosave_free, &(page)->flags) >#define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags) >#define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags) > >#define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) >#define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) >#define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags) > >#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags) >#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) >#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) > >#define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) >#define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) >#define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) >#define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) > >#define PageCompound(page) test_bit(PG_compound, &(page)->flags) >#define __SetPageCompound(page) __set_bit(PG_compound, &(page)->flags) >#define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags) > > >#define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) >#define SetPageSwapCache(page) set_bit(PG_swapcache, &(page)->flags) >#define ClearPageSwapCache(page) clear_bit(PG_swapcache, &(page)->flags) > > > > >#define PageUncached(page) test_bit(PG_uncached, &(page)->flags) >#define SetPageUncached(page) set_bit(PG_uncached, &(page)->flags) >#define ClearPageUncached(page) clear_bit(PG_uncached, &(page)->flags) > >struct page; > >int test_clear_page_dirty(struct page *page); >int test_clear_page_writeback(struct page *page); >int test_set_page_writeback(struct page *page); > >static inline __attribute__((always_inline)) void clear_page_dirty(struct page *page) >{ > test_clear_page_dirty(page); >} > >static inline __attribute__((always_inline)) void set_page_writeback(struct page *page) >{ > test_set_page_writeback(page); >} ># 230 "include/linux/mm.h" 2 > > >#define VM_BUG_ON(cond) BUG_ON(cond) ># 253 "include/linux/mm.h" >static inline __attribute__((always_inline)) int put_page_testzero(struct page *page) >{ > do { if (__builtin_expect(!!((((&page->_count)->counter) == 0)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (255), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > return atomic_dec_and_test(&page->_count); >} > > > > > >static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page) >{ > do { if (__builtin_expect(!!(((__builtin_constant_p(14) ? constant_test_bit((14),(&(page)->flags)) : variable_test_bit((14),(&(page)->flags))))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (265), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > return ({ int c, old; c = (((&page->_count))->counter); for (;;) { if (__builtin_expect(!!(c == (0)), 0)) break; old = ((int)((__typeof__(*(&((((&page->_count)))->counter))))__cmpxchg((&((((&page->_count)))->counter)),(unsigned long)(c), (unsigned long)(c + (1)),sizeof(*(&((((&page->_count)))->counter)))))); if (__builtin_expect(!!(old == c), 1)) break; c = old; } c != (0); }); >} > >static inline __attribute__((always_inline)) int page_count(struct page *page) >{ > if (__builtin_expect(!!((__builtin_constant_p(14) ? constant_test_bit((14),(&(page)->flags)) : variable_test_bit((14),(&(page)->flags)))), 0)) > page = (struct page *)((page)->private); > return ((&page->_count)->counter); >} > >static inline __attribute__((always_inline)) void get_page(struct page *page) >{ > if (__builtin_expect(!!((__builtin_constant_p(14) ? constant_test_bit((14),(&(page)->flags)) : variable_test_bit((14),(&(page)->flags)))), 0)) > page = (struct page *)((page)->private); > do { if (__builtin_expect(!!((((&page->_count)->counter) == 0)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (280), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > atomic_inc(&page->_count); >} > > > > > >static inline __attribute__((always_inline)) void init_page_count(struct page *page) >{ > (((&page->_count)->counter) = (1)); >} > >void put_page(struct page *page); >void put_pages_list(struct list_head *pages); > >void split_page(struct page *page, unsigned int order); > > > > > > >typedef void compound_page_dtor(struct page *); > >static inline __attribute__((always_inline)) void set_compound_page_dtor(struct page *page, > compound_page_dtor *dtor) >{ > page[1].lru.next = (void *)dtor; >} > >static inline __attribute__((always_inline)) compound_page_dtor *get_compound_page_dtor(struct page *page) >{ > return (compound_page_dtor *)page[1].lru.next; >} ># 399 "include/linux/mm.h" >#define SECTIONS_WIDTH 0 > > >#define ZONES_WIDTH ZONES_SHIFT > > >#define NODES_WIDTH NODES_SHIFT > > > > > >#define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH) >#define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) >#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) ># 424 "include/linux/mm.h" >#define PFN_SECTION_SHIFT 0 > > > > > > > >#define SECTIONS_PGSHIFT (SECTIONS_PGOFF * (SECTIONS_WIDTH != 0)) >#define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0)) >#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0)) > > > > > >#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) > > > >#define ZONEID_PGSHIFT ZONES_PGSHIFT ># 453 "include/linux/mm.h" >#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1) >#define NODES_MASK ((1UL << NODES_WIDTH) - 1) >#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1) >#define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1) > >static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page) >{ > return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << 1) - 1); >} ># 471 "include/linux/mm.h" >static inline __attribute__((always_inline)) int page_zone_id(struct page *page) >{ > ((void)sizeof(char[1 - 2*!!((((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0)) == 0 && ((1UL << (0 + 1)) - 1))])); > return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << (0 + 1)) - 1); >} > >static inline __attribute__((always_inline)) int zone_to_nid(struct zone *zone) >{ > > > > return 0; > >} > > > > >static inline __attribute__((always_inline)) int page_to_nid(struct page *page) >{ > return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1); >} > > >static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page) >{ > return &(&contig_page_data)->node_zones[page_zonenum(page)]; >} > >static inline __attribute__((always_inline)) unsigned long page_to_section(struct page *page) >{ > return (page->flags >> (((sizeof(unsigned long)*8) - 0) * (0 != 0))) & ((1UL << 0) - 1); >} > >static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone) >{ > page->flags &= ~(((1UL << 1) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))); > page->flags |= (zone & ((1UL << 1) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node) >{ > page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))); > page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section) >{ > page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0))); > page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone, > unsigned long node, unsigned long pfn) >{ > set_page_zone(page, zone); > set_page_node(page, node); > set_page_section(page, ((pfn) >> 0)); >} > > > > ># 1 "include/linux/vmstat.h" 1 > >#define _LINUX_VMSTAT_H ># 23 "include/linux/vmstat.h" >#define DMA32_ZONE(xx) > > > > > >#define HIGHMEM_ZONE(xx) > > >#define FOR_ALL_ZONES(xx) xx ##_DMA, DMA32_ZONE(xx) xx ##_NORMAL HIGHMEM_ZONE(xx) > >enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, > PGALLOC_DMA, PGALLOC_NORMAL , > PGFREE, PGACTIVATE, PGDEACTIVATE, > PGFAULT, PGMAJFAULT, > PGREFILL_DMA, PGREFILL_NORMAL , > PGSTEAL_DMA, PGSTEAL_NORMAL , > PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL , > PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL , > PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, > PAGEOUTRUN, ALLOCSTALL, PGROTATED, > NR_VM_EVENT_ITEMS >}; > >struct vm_event_state { > unsigned long event[NR_VM_EVENT_ITEMS]; >}; > >extern __typeof__(struct vm_event_state) per_cpu__vm_event_states; > >static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item) >{ > per_cpu__vm_event_states.event[item]++; >} > >static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item) >{ > (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item]++; > do { } while (0); >} > >static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta) >{ > per_cpu__vm_event_states.event[item] += delta; >} > >static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta) >{ > (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item] += delta; > do { } while (0); >} > >extern void all_vm_events(unsigned long *); >extern void vm_events_fold_cpu(int cpu); ># 90 "include/linux/vmstat.h" >#define __count_zone_vm_events(item,zone,delta) __count_vm_events(item ##_DMA + zone_idx(zone), delta) > > > > > >extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > >static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone, > enum zone_stat_item item) >{ > atomic_long_add(x, &zone->vm_stat[item]); > atomic_long_add(x, &vm_stat[item]); >} > >static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item) >{ > long x = atomic_long_read(&vm_stat[item]); > > > > > return x; >} > >static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone, > enum zone_stat_item item) >{ > long x = atomic_long_read(&zone->vm_stat[item]); > > > > > return x; >} ># 152 "include/linux/vmstat.h" >#define node_page_state(node,item) global_page_state(item) >#define zone_statistics(_zl,_z) do { } while (0) > > > >#define __add_zone_page_state(__z,__i,__d) __mod_zone_page_state(__z, __i, __d) > >#define __sub_zone_page_state(__z,__i,__d) __mod_zone_page_state(__z, __i,-(__d)) > > >#define add_zone_page_state(__z,__i,__d) mod_zone_page_state(__z, __i, __d) >#define sub_zone_page_state(__z,__i,__d) mod_zone_page_state(__z, __i, -(__d)) > >static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone) >{ > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(zone->vm_stat))) ? __constant_c_and_count_memset(((zone->vm_stat)),((0x01010101UL*(unsigned char)(0))),((sizeof(zone->vm_stat)))) : __constant_c_memset(((zone->vm_stat)),((0x01010101UL*(unsigned char)(0))),((sizeof(zone->vm_stat))))) : (__builtin_constant_p((sizeof(zone->vm_stat))) ? __memset_generic((((zone->vm_stat))),(((0))),(((sizeof(zone->vm_stat))))) : __memset_generic(((zone->vm_stat)),((0)),((sizeof(zone->vm_stat)))))); >} > >extern void inc_zone_state(struct zone *, enum zone_stat_item); ># 192 "include/linux/vmstat.h" >static inline __attribute__((always_inline)) void __mod_zone_page_state(struct zone *zone, > enum zone_stat_item item, int delta) >{ > zone_page_state_add(delta, zone, item); >} > >static inline __attribute__((always_inline)) void __inc_zone_state(struct zone *zone, enum zone_stat_item item) >{ > atomic_long_inc(&zone->vm_stat[item]); > atomic_long_inc(&vm_stat[item]); >} > >static inline __attribute__((always_inline)) void __inc_zone_page_state(struct page *page, > enum zone_stat_item item) >{ > __inc_zone_state(page_zone(page), item); >} > >static inline __attribute__((always_inline)) void __dec_zone_page_state(struct page *page, > enum zone_stat_item item) >{ > atomic_long_dec(&page_zone(page)->vm_stat[item]); > atomic_long_dec(&vm_stat[item]); >} > > > > > >#define inc_zone_page_state __inc_zone_page_state >#define dec_zone_page_state __dec_zone_page_state >#define mod_zone_page_state __mod_zone_page_state > >static inline __attribute__((always_inline)) void refresh_cpu_vm_stats(int cpu) { } >static inline __attribute__((always_inline)) void refresh_vm_stats(void) { } ># 535 "include/linux/mm.h" 2 > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page) >{ > return to_virt((unsigned long) (((unsigned long)((page) - mem_map) + (0UL)) << 12)); >} ># 561 "include/linux/mm.h" >#define page_address(page) lowmem_page_address(page) >#define set_page_address(page,address) do { } while(0) >#define page_address_init() do { } while(0) ># 575 "include/linux/mm.h" >#define PAGE_MAPPING_ANON 1 > >extern struct address_space swapper_space; >static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page) >{ > struct address_space *mapping = page->mapping; > > if (__builtin_expect(!!((__builtin_constant_p(15) ? constant_test_bit((15),(&(page)->flags)) : variable_test_bit((15),(&(page)->flags)))), 0)) > mapping = &swapper_space; > else if (__builtin_expect(!!((unsigned long)mapping & 1), 0)) > mapping = ((void *)0); > return mapping; >} > >static inline __attribute__((always_inline)) int PageAnon(struct page *page) >{ > return ((unsigned long)page->mapping & 1) != 0; >} > > > > > >static inline __attribute__((always_inline)) unsigned long page_index(struct page *page) >{ > if (__builtin_expect(!!((__builtin_constant_p(15) ? constant_test_bit((15),(&(page)->flags)) : variable_test_bit((15),(&(page)->flags)))), 0)) > return ((page)->private); > return page->index; >} > > > > > > >static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page) >{ > (((&(page)->_mapcount)->counter) = (-1)); >} > >static inline __attribute__((always_inline)) int page_mapcount(struct page *page) >{ > return ((&(page)->_mapcount)->counter) + 1; >} > > > > >static inline __attribute__((always_inline)) int page_mapped(struct page *page) >{ > return ((&(page)->_mapcount)->counter) >= 0; >} > > > > >#define NOPAGE_SIGBUS (NULL) >#define NOPAGE_OOM ((struct page *) (-1)) >#define NOPAGE_REFAULT ((struct page *) (-2)) > > > > >#define NOPFN_SIGBUS ((unsigned long) -1) >#define NOPFN_OOM ((unsigned long) -2) > > > > > > >#define VM_FAULT_OOM 0x00 >#define VM_FAULT_SIGBUS 0x01 >#define VM_FAULT_MINOR 0x02 >#define VM_FAULT_MAJOR 0x03 > > > > > >#define VM_FAULT_WRITE 0x10 > >#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) > >extern void show_free_areas(void); > > >struct page *shmem_nopage(struct vm_area_struct *vma, > unsigned long address, int *type); >int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new); >struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, > unsigned long addr); >int shmem_lock(struct file *file, int lock, struct user_struct *user); ># 689 "include/linux/mm.h" >struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); >extern int shmem_mmap(struct file *file, struct vm_area_struct *vma); > >int shmem_zero_setup(struct vm_area_struct *); ># 702 "include/linux/mm.h" >static inline __attribute__((always_inline)) int can_do_mlock(void) >{ > if (capable(14)) > return 1; > if ((current_thread_info()->task)->signal->rlim[8].rlim_cur != 0) > return 1; > return 0; >} >extern int user_shm_lock(size_t, struct user_struct *); >extern void user_shm_unlock(size_t, struct user_struct *); > > > > >struct zap_details { > struct vm_area_struct *nonlinear_vma; > struct address_space *check_mapping; > unsigned long first_index; > unsigned long last_index; > spinlock_t *i_mmap_lock; > unsigned long truncate_count; >}; > >struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t); >unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, > unsigned long size, struct zap_details *); >unsigned long unmap_vmas(struct mmu_gather **tlb, > struct vm_area_struct *start_vma, unsigned long start_addr, > unsigned long end_addr, unsigned long *nr_accounted, > struct zap_details *); >void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, > unsigned long end, unsigned long floor, unsigned long ceiling); >void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, > unsigned long floor, unsigned long ceiling); >int copy_page_range(struct mm_struct *dst, struct mm_struct *src, > struct vm_area_struct *vma); >int zeromap_page_range(struct vm_area_struct *vma, unsigned long from, > unsigned long size, pgprot_t prot); >void unmap_mapping_range(struct address_space *mapping, > loff_t const holebegin, loff_t const holelen, int even_cows); > >static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping, > loff_t const holebegin, loff_t const holelen) >{ > unmap_mapping_range(mapping, holebegin, holelen, 0); >} > >extern int vmtruncate(struct inode * inode, loff_t offset); >extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); >extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); >extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot); > > >extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, > unsigned long address, int write_access); > >static inline __attribute__((always_inline)) int handle_mm_fault(struct mm_struct *mm, > struct vm_area_struct *vma, unsigned long address, > int write_access) >{ > return __handle_mm_fault(mm, vma, address, write_access) & > (~0x10); >} ># 776 "include/linux/mm.h" >extern int make_pages_present(unsigned long addr, unsigned long end); >extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); >void install_arg_page(struct vm_area_struct *, struct page *, unsigned long); > >int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, > int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); >void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long); > >extern int try_to_release_page(struct page * page, gfp_t gfp_mask); >extern void do_invalidatepage(struct page *page, unsigned long offset); > >int __set_page_dirty_nobuffers(struct page *page); >int redirty_page_for_writepage(struct writeback_control *wbc, > struct page *page); >int set_page_dirty(struct page *page) __attribute__((regparm(3))); >int set_page_dirty_lock(struct page *page); >int clear_page_dirty_for_io(struct page *page); > >extern unsigned long do_mremap(unsigned long addr, > unsigned long old_len, unsigned long new_len, > unsigned long flags, unsigned long new_addr); ># 809 "include/linux/mm.h" >typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask); > > > > > > >#define DEFAULT_SEEKS 2 >struct shrinker; >extern struct shrinker *set_shrinker(int, shrinker_t); >extern void remove_shrinker(struct shrinker *shrinker); > > > > > > > >static inline __attribute__((always_inline)) int vma_wants_writenotify(struct vm_area_struct *vma) >{ > unsigned int vm_flags = vma->vm_flags; > > > if ((vm_flags & (0x00000002|0x00000008)) != ((0x00000002|0x00000008))) > return 0; > > > if (vma->vm_ops && vma->vm_ops->page_mkwrite) > return 1; > > > if (((vma->vm_page_prot).pgprot) != > ((protection_map[vm_flags & (0x00000001|0x00000002|0x00000004|0x00000008)]).pgprot)) > > return 0; > > > if (vm_flags & (0x00000400|0x02000000)) > return 0; > > > return vma->vm_file && vma->vm_file->f_mapping && > (!(((vma->vm_file->f_mapping)->backing_dev_info)->capabilities & 0x00000001)); >} > >extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl) __attribute__((regparm(3))); > >int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); >int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); >int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); >int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); > > > > > > >static inline __attribute__((always_inline)) pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) >{ > return (__builtin_expect(!!(pgd_none(*pgd)), 0) && __pud_alloc(mm, pgd, address))? > ((void *)0): pud_offset(pgd, address); >} > >static inline __attribute__((always_inline)) pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) >{ > return (__builtin_expect(!!(pud_none(*pud)), 0) && __pmd_alloc(mm, pud, address))? > ((void *)0): pmd_offset(pud, address); >} ># 896 "include/linux/mm.h" >#define pte_lock_init(page) do {} while (0) >#define pte_lock_deinit(page) do {} while (0) >#define pte_lockptr(mm,pmd) ({(void)(pmd); &(mm)->page_table_lock;}) > > >#define pte_offset_map_lock(mm,pmd,address,ptlp) ({ spinlock_t *__ptl = pte_lockptr(mm, pmd); pte_t *__pte = pte_offset_map(pmd, address); *(ptlp) = __ptl; spin_lock(__ptl); __pte; }) ># 910 "include/linux/mm.h" >#define pte_unmap_unlock(pte,ptl) do { spin_unlock(ptl); pte_unmap(pte); } while (0) > > > > >#define pte_alloc_map(mm,pmd,address) ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? NULL: pte_offset_map(pmd, address)) > > > >#define pte_alloc_map_lock(mm,pmd,address,ptlp) ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) > > > >#define pte_alloc_kernel(pmd,address) ((unlikely(!pmd_present(*(pmd))) && __pte_alloc_kernel(pmd, address))? NULL: pte_offset_kernel(pmd, address)) > > > >extern void free_area_init(unsigned long * zones_size); >extern void free_area_init_node(int nid, pg_data_t *pgdat, > unsigned long * zones_size, unsigned long zone_start_pfn, > unsigned long *zholes_size); ># 980 "include/linux/mm.h" >extern void set_dma_reserve(unsigned long new_dma_reserve); >extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); >extern void setup_per_zone_pages_min(void); >extern void mem_init(void); >extern void show_mem(void); >extern void si_meminfo(struct sysinfo * val); >extern void si_meminfo_node(struct sysinfo *val, int nid); > > > > >static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {} > > > >void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); >void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); >void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *); >struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma, > struct prio_tree_iter *iter); > >#define vma_prio_tree_foreach(vma,iter,root,begin,end) for (prio_tree_iter_init(iter, root, begin, end), vma = NULL; (vma = vma_prio_tree_next(vma, iter)); ) > > > >static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma, > struct list_head *list) >{ > vma->shared.vm_set.parent = ((void *)0); > list_add_tail(&vma->shared.vm_set.list, list); >} > > >extern int __vm_enough_memory(long pages, int cap_sys_admin); >extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, > unsigned long end, unsigned long pgoff, struct vm_area_struct *insert); >extern struct vm_area_struct *vma_merge(struct mm_struct *, > struct vm_area_struct *prev, unsigned long addr, unsigned long end, > unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long, > struct mempolicy *); >extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *); >extern int split_vma(struct mm_struct *, > struct vm_area_struct *, unsigned long addr, int new_below); >extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); >extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, > struct rb_node **, struct rb_node *); >extern void unlink_file_vma(struct vm_area_struct *); >extern struct vm_area_struct *copy_vma(struct vm_area_struct **, > unsigned long addr, unsigned long len, unsigned long pgoff); >extern void exit_mmap(struct mm_struct *); >extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); > >extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); > >extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, > unsigned long len, unsigned long prot, > unsigned long flag, unsigned long pgoff); > >static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr, > unsigned long len, unsigned long prot, > unsigned long flag, unsigned long offset) >{ > unsigned long ret = -22; > if ((offset + (((len)+(1UL << 12)-1)&(~((1UL << 12)-1)))) < offset) > goto out; > if (!(offset & ~(~((1UL << 12)-1)))) > ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12); >out: > return ret; >} > >extern int do_munmap(struct mm_struct *, unsigned long, size_t); > >extern unsigned long do_brk(unsigned long, unsigned long); > > >extern unsigned long page_unuse(struct page *); >extern void truncate_inode_pages(struct address_space *, loff_t); >extern void truncate_inode_pages_range(struct address_space *, > loff_t lstart, loff_t lend); > > >extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *); >extern int filemap_populate(struct vm_area_struct *, unsigned long, > unsigned long, pgprot_t, unsigned long, int); > > >int write_one_page(struct page *page, int wait); > > >#define VM_MAX_READAHEAD 128 >#define VM_MIN_READAHEAD 16 >#define VM_MAX_CACHE_HIT 256 > > >int do_page_cache_readahead(struct address_space *mapping, struct file *filp, > unsigned long offset, unsigned long nr_to_read); >int force_page_cache_readahead(struct address_space *mapping, struct file *filp, > unsigned long offset, unsigned long nr_to_read); >unsigned long page_cache_readahead(struct address_space *mapping, > struct file_ra_state *ra, > struct file *filp, > unsigned long offset, > unsigned long size); >void handle_ra_miss(struct address_space *mapping, > struct file_ra_state *ra, unsigned long offset); >unsigned long max_sane_readahead(unsigned long nr); > > >extern int expand_stack(struct vm_area_struct *vma, unsigned long address); > > > > > >extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); >extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr, > struct vm_area_struct **pprev); > > > >static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr) >{ > struct vm_area_struct * vma = find_vma(mm,start_addr); > > if (vma && end_addr <= vma->vm_start) > vma = ((void *)0); > return vma; >} > >static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma) >{ > return (vma->vm_end - vma->vm_start) >> 12; >} > >pgprot_t vm_get_page_prot(unsigned long vm_flags); >struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); >struct page *vmalloc_to_page(void *addr); >unsigned long vmalloc_to_pfn(void *addr); >int remap_pfn_range(struct vm_area_struct *, unsigned long addr, > unsigned long pfn, unsigned long size, pgprot_t); >int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); > >struct page *follow_page(struct vm_area_struct *, unsigned long address, > unsigned int foll_flags); >#define FOLL_WRITE 0x01 >#define FOLL_TOUCH 0x02 >#define FOLL_GET 0x04 >#define FOLL_ANON 0x08 > > >void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); ># 1140 "include/linux/mm.h" >static inline __attribute__((always_inline)) void >kernel_map_pages(struct page *page, int numpages, int enable) {} > > >extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); > > > > >int in_gate_area_no_task(unsigned long addr); >#define in_gate_area(task,addr) ({(void)task; in_gate_area_no_task(addr);}) > > >int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, > unsigned long lru_pages); >void drop_pagecache(void); >void drop_slab(void); > > > > >extern int randomize_va_space; > > >__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma); ># 54 "net/ipv4/ip_output.c" 2 > > ># 1 "include/linux/highmem.h" 1 > >#define _LINUX_HIGHMEM_H > > > ># 1 "include/linux/uaccess.h" 1 > >#define __LINUX_UACCESS_H__ ># 16 "include/linux/uaccess.h" >static inline __attribute__((always_inline)) void pagefault_disable(void) >{ > do { (current_thread_info()->preempt_count) += (1); } while (0); > > > > > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void pagefault_enable(void) >{ > > > > > __asm__ __volatile__("": : :"memory"); > do { (current_thread_info()->preempt_count) -= (1); } while (0); > > > > __asm__ __volatile__("": : :"memory"); > do { } while (0); >} > > > >static inline __attribute__((always_inline)) unsigned long __copy_from_user_inatomic_nocache(void *to, > const void *from, unsigned long n) >{ > return copy_from_user(to, from, n); >} > >static inline __attribute__((always_inline)) unsigned long __copy_from_user_nocache(void *to, > const void *from, unsigned long n) >{ > return copy_from_user(to, from, n); >} ># 74 "include/linux/uaccess.h" >#define probe_kernel_address(addr,retval) ({ long ret; mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); pagefault_disable(); ret = __get_user(retval, (__force typeof(retval) __user *)(addr)); pagefault_enable(); set_fs(old_fs); ret; }) ># 7 "include/linux/highmem.h" 2 > ># 1 "include/asm/cacheflush.h" 1 > >#define __UM_CACHEFLUSH_H > ># 1 "include/asm/arch/cacheflush.h" 1 > >#define _I386_CACHEFLUSH_H > > > > > >#define flush_cache_all() do { } while (0) >#define flush_cache_mm(mm) do { } while (0) >#define flush_cache_dup_mm(mm) do { } while (0) >#define flush_cache_range(vma,start,end) do { } while (0) >#define flush_cache_page(vma,vmaddr,pfn) do { } while (0) >#define flush_dcache_page(page) do { } while (0) >#define flush_dcache_mmap_lock(mapping) do { } while (0) >#define flush_dcache_mmap_unlock(mapping) do { } while (0) >#define flush_icache_range(start,end) do { } while (0) >#define flush_icache_page(vma,pg) do { } while (0) >#define flush_icache_user_range(vma,pg,adr,len) do { } while (0) >#define flush_cache_vmap(start,end) do { } while (0) >#define flush_cache_vunmap(start,end) do { } while (0) > >#define copy_to_user_page(vma,page,vaddr,dst,src,len) memcpy(dst, src, len) > >#define copy_from_user_page(vma,page,vaddr,dst,src,len) memcpy(dst, src, len) > > >void global_flush_tlb(void); >int change_page_attr(struct page *page, int numpages, pgprot_t prot); ># 5 "include/asm/cacheflush.h" 2 ># 9 "include/linux/highmem.h" 2 > > >static inline __attribute__((always_inline)) void flush_anon_page(struct page *page, unsigned long vmaddr) >{ >} > > > >static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page) >{ >} ># 32 "include/linux/highmem.h" >static inline __attribute__((always_inline)) unsigned int nr_free_highpages(void) { return 0; } > >#define totalhigh_pages 0 > > >static inline __attribute__((always_inline)) void *kmap(struct page *page) >{ > do { __might_sleep("include/linux/highmem.h", 39); do { } while (0); } while (0); > return lowmem_page_address(page); >} > >#define kunmap(page) do { (void) (page); } while (0) > >#define kmap_atomic(page,idx) ({ pagefault_disable(); page_address(page); }) > >#define kunmap_atomic(addr,idx) do { pagefault_enable(); } while (0) >#define kmap_atomic_pfn(pfn,idx) kmap_atomic(pfn_to_page(pfn), (idx)) >#define kmap_atomic_to_page(ptr) virt_to_page(ptr) > > > > > >static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr) >{ > void *addr = ({ pagefault_disable(); lowmem_page_address(page); }); > (__builtin_constant_p(0) ? (__builtin_constant_p(((1UL << 12))) ? __constant_c_and_count_memset((((void *)(addr))),((0x01010101UL*(unsigned char)(0))),(((1UL << 12)))) : __constant_c_memset((((void *)(addr))),((0x01010101UL*(unsigned char)(0))),(((1UL << 12))))) : (__builtin_constant_p(((1UL << 12))) ? __memset_generic(((((void *)(addr)))),(((0))),((((1UL << 12))))) : __memset_generic((((void *)(addr))),((0)),(((1UL << 12)))))); > do { pagefault_enable(); } while (0); > > __asm__ __volatile__("": : :"memory"); >} > > >static inline __attribute__((always_inline)) struct page * >alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr) >{ > struct page *page = alloc_pages_node(((0)), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)), 0); > > if (page) > clear_user_highpage(page, vaddr); > > return page; >} > > >static inline __attribute__((always_inline)) void clear_highpage(struct page *page) >{ > void *kaddr = ({ pagefault_disable(); lowmem_page_address(page); }); > (__builtin_constant_p(0) ? (__builtin_constant_p(((1UL << 12))) ? __constant_c_and_count_memset((((void *)(kaddr))),((0x01010101UL*(unsigned char)(0))),(((1UL << 12)))) : __constant_c_memset((((void *)(kaddr))),((0x01010101UL*(unsigned char)(0))),(((1UL << 12))))) : (__builtin_constant_p(((1UL << 12))) ? __memset_generic(((((void *)(kaddr)))),(((0))),((((1UL << 12))))) : __memset_generic((((void *)(kaddr))),((0)),(((1UL << 12)))))); > do { pagefault_enable(); } while (0); >} > > > > >static inline __attribute__((always_inline)) void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size) >{ > void *kaddr; > > do { if (__builtin_expect(!!((offset + size > (1UL << 12))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/highmem.h"), "i" (91), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > > kaddr = ({ pagefault_disable(); lowmem_page_address(page); }); > (__builtin_constant_p(0) ? (__builtin_constant_p((size)) ? __constant_c_and_count_memset((((char *)kaddr + offset)),((0x01010101UL*(unsigned char)(0))),((size))) : __constant_c_memset((((char *)kaddr + offset)),((0x01010101UL*(unsigned char)(0))),((size)))) : (__builtin_constant_p((size)) ? __memset_generic(((((char *)kaddr + offset))),(((0))),(((size)))) : __memset_generic((((char *)kaddr + offset)),((0)),((size))))); > do { } while (0); > do { pagefault_enable(); } while (0); >} > > > >static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from, > unsigned long vaddr, struct vm_area_struct *vma) >{ > char *vfrom, *vto; > > vfrom = ({ pagefault_disable(); lowmem_page_address(from); }); > vto = ({ pagefault_disable(); lowmem_page_address(to); }); > (__builtin_constant_p((1UL << 12)) ? __constant_memcpy(((void *)(vto)),((void *)(vfrom)),((1UL << 12))) : __memcpy(((void *)(vto)),((void *)(vfrom)),((1UL << 12)))); > do { pagefault_enable(); } while (0); > do { pagefault_enable(); } while (0); > > __asm__ __volatile__("": : :"memory"); >} > > > >static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from) >{ > char *vfrom, *vto; > > vfrom = ({ pagefault_disable(); lowmem_page_address(from); }); > vto = ({ pagefault_disable(); lowmem_page_address(to); }); > (__builtin_constant_p((1UL << 12)) ? __constant_memcpy(((void *)(vto)),((void *)(vfrom)),((1UL << 12))) : __memcpy(((void *)(vto)),((void *)(vfrom)),((1UL << 12)))); > do { pagefault_enable(); } while (0); > do { pagefault_enable(); } while (0); >} ># 57 "net/ipv4/ip_output.c" 2 > ># 1 "include/linux/socket.h" 1 > >#define _LINUX_SOCKET_H > > > > >#define _K_SS_MAXSIZE 128 >#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) > > >struct __kernel_sockaddr_storage { > unsigned short ss_family; > > char __data[128 - sizeof(unsigned short)]; > > >} __attribute__ ((aligned((__alignof__ (struct sockaddr *))))); > > > ># 1 "include/asm/socket.h" 1 > >#define __UM_SOCKET_H > ># 1 "include/asm/arch/socket.h" 1 > >#define _ASM_SOCKET_H > ># 1 "include/asm/sockios.h" 1 > >#define __UM_SOCKIOS_H > ># 1 "include/asm/arch/sockios.h" 1 > >#define __ARCH_I386_SOCKIOS__ > > >#define FIOSETOWN 0x8901 >#define SIOCSPGRP 0x8902 >#define FIOGETOWN 0x8903 >#define SIOCGPGRP 0x8904 >#define SIOCATMARK 0x8905 >#define SIOCGSTAMP 0x8906 ># 5 "include/asm/sockios.h" 2 ># 5 "include/asm/arch/socket.h" 2 > > >#define SOL_SOCKET 1 > >#define SO_DEBUG 1 >#define SO_REUSEADDR 2 >#define SO_TYPE 3 >#define SO_ERROR 4 >#define SO_DONTROUTE 5 >#define SO_BROADCAST 6 >#define SO_SNDBUF 7 >#define SO_RCVBUF 8 >#define SO_SNDBUFFORCE 32 >#define SO_RCVBUFFORCE 33 >#define SO_KEEPALIVE 9 >#define SO_OOBINLINE 10 >#define SO_NO_CHECK 11 >#define SO_PRIORITY 12 >#define SO_LINGER 13 >#define SO_BSDCOMPAT 14 > >#define SO_PASSCRED 16 >#define SO_PEERCRED 17 >#define SO_RCVLOWAT 18 >#define SO_SNDLOWAT 19 >#define SO_RCVTIMEO 20 >#define SO_SNDTIMEO 21 > > >#define SO_SECURITY_AUTHENTICATION 22 >#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 >#define SO_SECURITY_ENCRYPTION_NETWORK 24 > >#define SO_BINDTODEVICE 25 > > >#define SO_ATTACH_FILTER 26 >#define SO_DETACH_FILTER 27 > >#define SO_PEERNAME 28 >#define SO_TIMESTAMP 29 >#define SCM_TIMESTAMP SO_TIMESTAMP > >#define SO_ACCEPTCONN 30 > >#define SO_PEERSEC 31 >#define SO_PASSSEC 34 ># 5 "include/asm/socket.h" 2 ># 22 "include/linux/socket.h" 2 ># 1 "include/linux/sockios.h" 1 ># 19 "include/linux/sockios.h" >#define _LINUX_SOCKIOS_H > > > > >#define SIOCINQ FIONREAD >#define SIOCOUTQ TIOCOUTQ > > >#define SIOCADDRT 0x890B >#define SIOCDELRT 0x890C >#define SIOCRTMSG 0x890D > > >#define SIOCGIFNAME 0x8910 >#define SIOCSIFLINK 0x8911 >#define SIOCGIFCONF 0x8912 >#define SIOCGIFFLAGS 0x8913 >#define SIOCSIFFLAGS 0x8914 >#define SIOCGIFADDR 0x8915 >#define SIOCSIFADDR 0x8916 >#define SIOCGIFDSTADDR 0x8917 >#define SIOCSIFDSTADDR 0x8918 >#define SIOCGIFBRDADDR 0x8919 >#define SIOCSIFBRDADDR 0x891a >#define SIOCGIFNETMASK 0x891b >#define SIOCSIFNETMASK 0x891c >#define SIOCGIFMETRIC 0x891d >#define SIOCSIFMETRIC 0x891e >#define SIOCGIFMEM 0x891f >#define SIOCSIFMEM 0x8920 >#define SIOCGIFMTU 0x8921 >#define SIOCSIFMTU 0x8922 >#define SIOCSIFNAME 0x8923 >#define SIOCSIFHWADDR 0x8924 >#define SIOCGIFENCAP 0x8925 >#define SIOCSIFENCAP 0x8926 >#define SIOCGIFHWADDR 0x8927 >#define SIOCGIFSLAVE 0x8929 >#define SIOCSIFSLAVE 0x8930 >#define SIOCADDMULTI 0x8931 >#define SIOCDELMULTI 0x8932 >#define SIOCGIFINDEX 0x8933 >#define SIOGIFINDEX SIOCGIFINDEX >#define SIOCSIFPFLAGS 0x8934 >#define SIOCGIFPFLAGS 0x8935 >#define SIOCDIFADDR 0x8936 >#define SIOCSIFHWBROADCAST 0x8937 >#define SIOCGIFCOUNT 0x8938 > >#define SIOCGIFBR 0x8940 >#define SIOCSIFBR 0x8941 > >#define SIOCGIFTXQLEN 0x8942 >#define SIOCSIFTXQLEN 0x8943 > > > > >#define SIOCETHTOOL 0x8946 > >#define SIOCGMIIPHY 0x8947 >#define SIOCGMIIREG 0x8948 >#define SIOCSMIIREG 0x8949 > >#define SIOCWANDEV 0x894A > > > >#define SIOCDARP 0x8953 >#define SIOCGARP 0x8954 >#define SIOCSARP 0x8955 > > >#define SIOCDRARP 0x8960 >#define SIOCGRARP 0x8961 >#define SIOCSRARP 0x8962 > > > >#define SIOCGIFMAP 0x8970 >#define SIOCSIFMAP 0x8971 > > > >#define SIOCADDDLCI 0x8980 >#define SIOCDELDLCI 0x8981 > >#define SIOCGIFVLAN 0x8982 >#define SIOCSIFVLAN 0x8983 > > > >#define SIOCBONDENSLAVE 0x8990 >#define SIOCBONDRELEASE 0x8991 >#define SIOCBONDSETHWADDR 0x8992 >#define SIOCBONDSLAVEINFOQUERY 0x8993 >#define SIOCBONDINFOQUERY 0x8994 >#define SIOCBONDCHANGEACTIVE 0x8995 > > >#define SIOCBRADDBR 0x89a0 >#define SIOCBRDELBR 0x89a1 >#define SIOCBRADDIF 0x89a2 >#define SIOCBRDELIF 0x89a3 ># 136 "include/linux/sockios.h" >#define SIOCDEVPRIVATE 0x89F0 > > > > > >#define SIOCPROTOPRIVATE 0x89E0 ># 23 "include/linux/socket.h" 2 > > > > >extern int sysctl_somaxconn; > >struct seq_file; >extern void socket_seq_show(struct seq_file *seq); > > >typedef unsigned short sa_family_t; > > > > > >struct sockaddr { > sa_family_t sa_family; > char sa_data[14]; >}; > >struct linger { > int l_onoff; > int l_linger; >}; > >#define sockaddr_storage __kernel_sockaddr_storage > > > > > > > >struct msghdr { > void * msg_name; > int msg_namelen; > struct iovec * msg_iov; > __kernel_size_t msg_iovlen; > void * msg_control; > __kernel_size_t msg_controllen; > unsigned msg_flags; >}; > > > > > > > >struct cmsghdr { > __kernel_size_t cmsg_len; > int cmsg_level; > int cmsg_type; >}; > > > > > > >#define __CMSG_NXTHDR(ctl,len,cmsg) __cmsg_nxthdr((ctl),(len),(cmsg)) >#define CMSG_NXTHDR(mhdr,cmsg) cmsg_nxthdr((mhdr), (cmsg)) > >#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) ) > >#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))) >#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) >#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) > >#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? (struct cmsghdr *)(ctl) : (struct cmsghdr *)NULL) > > >#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen) >#define CMSG_OK(mhdr,cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char *)(cmsg) - (char *)(mhdr)->msg_control))) ># 107 "include/linux/socket.h" >#define __KINLINE static inline ># 130 "include/linux/socket.h" >static inline __attribute__((always_inline)) struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, > struct cmsghdr *__cmsg) >{ > struct cmsghdr * __ptr; > > __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + ( ((__cmsg->cmsg_len)+sizeof(long)-1) & ~(sizeof(long)-1) )); > if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size) > return (struct cmsghdr *)0; > > return __ptr; >} > >static inline __attribute__((always_inline)) struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) >{ > return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg); >} > > > >#define SCM_RIGHTS 0x01 >#define SCM_CREDENTIALS 0x02 >#define SCM_SECURITY 0x03 > >struct ucred { > __u32 pid; > __u32 uid; > __u32 gid; >}; > > >#define AF_UNSPEC 0 >#define AF_UNIX 1 >#define AF_LOCAL 1 >#define AF_INET 2 >#define AF_AX25 3 >#define AF_IPX 4 >#define AF_APPLETALK 5 >#define AF_NETROM 6 >#define AF_BRIDGE 7 >#define AF_ATMPVC 8 >#define AF_X25 9 >#define AF_INET6 10 >#define AF_ROSE 11 >#define AF_DECnet 12 >#define AF_NETBEUI 13 >#define AF_SECURITY 14 >#define AF_KEY 15 >#define AF_NETLINK 16 >#define AF_ROUTE AF_NETLINK >#define AF_PACKET 17 >#define AF_ASH 18 >#define AF_ECONET 19 >#define AF_ATMSVC 20 >#define AF_SNA 22 >#define AF_IRDA 23 >#define AF_PPPOX 24 >#define AF_WANPIPE 25 >#define AF_LLC 26 >#define AF_TIPC 30 >#define AF_BLUETOOTH 31 >#define AF_MAX 32 > > >#define PF_UNSPEC AF_UNSPEC >#define PF_UNIX AF_UNIX >#define PF_LOCAL AF_LOCAL >#define PF_INET AF_INET >#define PF_AX25 AF_AX25 >#define PF_IPX AF_IPX >#define PF_APPLETALK AF_APPLETALK >#define PF_NETROM AF_NETROM >#define PF_BRIDGE AF_BRIDGE >#define PF_ATMPVC AF_ATMPVC >#define PF_X25 AF_X25 >#define PF_INET6 AF_INET6 >#define PF_ROSE AF_ROSE >#define PF_DECnet AF_DECnet >#define PF_NETBEUI AF_NETBEUI >#define PF_SECURITY AF_SECURITY >#define PF_KEY AF_KEY >#define PF_NETLINK AF_NETLINK >#define PF_ROUTE AF_ROUTE >#define PF_PACKET AF_PACKET >#define PF_ASH AF_ASH >#define PF_ECONET AF_ECONET >#define PF_ATMSVC AF_ATMSVC >#define PF_SNA AF_SNA >#define PF_IRDA AF_IRDA >#define PF_PPPOX AF_PPPOX >#define PF_WANPIPE AF_WANPIPE >#define PF_LLC AF_LLC >#define PF_TIPC AF_TIPC >#define PF_BLUETOOTH AF_BLUETOOTH >#define PF_MAX AF_MAX > > >#define SOMAXCONN 128 > > > > > >#define MSG_OOB 1 >#define MSG_PEEK 2 >#define MSG_DONTROUTE 4 >#define MSG_TRYHARD 4 >#define MSG_CTRUNC 8 >#define MSG_PROBE 0x10 >#define MSG_TRUNC 0x20 >#define MSG_DONTWAIT 0x40 >#define MSG_EOR 0x80 >#define MSG_WAITALL 0x100 >#define MSG_FIN 0x200 >#define MSG_SYN 0x400 >#define MSG_CONFIRM 0x800 >#define MSG_RST 0x1000 >#define MSG_ERRQUEUE 0x2000 >#define MSG_NOSIGNAL 0x4000 >#define MSG_MORE 0x8000 > >#define MSG_EOF MSG_FIN > > > > >#define MSG_CMSG_COMPAT 0 > > > > >#define SOL_IP 0 > >#define SOL_TCP 6 >#define SOL_UDP 17 >#define SOL_IPV6 41 >#define SOL_ICMPV6 58 >#define SOL_SCTP 132 >#define SOL_UDPLITE 136 >#define SOL_RAW 255 >#define SOL_IPX 256 >#define SOL_AX25 257 >#define SOL_ATALK 258 >#define SOL_NETROM 259 >#define SOL_ROSE 260 >#define SOL_DECNET 261 >#define SOL_X25 262 >#define SOL_PACKET 263 >#define SOL_ATM 264 >#define SOL_AAL 265 >#define SOL_IRDA 266 >#define SOL_NETBEUI 267 >#define SOL_LLC 268 >#define SOL_DCCP 269 >#define SOL_NETLINK 270 >#define SOL_TIPC 271 > > >#define IPX_TYPE 1 > > >extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); >extern int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, > int offset, int len); >extern int csum_partial_copy_fromiovecend(unsigned char *kdata, > struct iovec *iov, > int offset, > unsigned int len, __wsum *csump); > >extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode); >extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); >extern int move_addr_to_user(void *kaddr, int klen, void *uaddr, int *ulen); >extern int move_addr_to_kernel(void *uaddr, int ulen, void *kaddr); >extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); ># 59 "net/ipv4/ip_output.c" 2 > ># 1 "include/linux/in.h" 1 ># 19 "include/linux/in.h" >#define _LINUX_IN_H > > > > > >enum { > IPPROTO_IP = 0, > IPPROTO_ICMP = 1, > IPPROTO_IGMP = 2, > IPPROTO_IPIP = 4, > IPPROTO_TCP = 6, > IPPROTO_EGP = 8, > IPPROTO_PUP = 12, > IPPROTO_UDP = 17, > IPPROTO_IDP = 22, > IPPROTO_DCCP = 33, > IPPROTO_RSVP = 46, > IPPROTO_GRE = 47, > > IPPROTO_IPV6 = 41, > > IPPROTO_ESP = 50, > IPPROTO_AH = 51, > IPPROTO_BEETPH = 94, > IPPROTO_PIM = 103, > > IPPROTO_COMP = 108, > IPPROTO_SCTP = 132, > IPPROTO_UDPLITE = 136, > > IPPROTO_RAW = 255, > IPPROTO_MAX >}; > > > >struct in_addr { > __be32 s_addr; >}; > >#define IP_TOS 1 >#define IP_TTL 2 >#define IP_HDRINCL 3 >#define IP_OPTIONS 4 >#define IP_ROUTER_ALERT 5 >#define IP_RECVOPTS 6 >#define IP_RETOPTS 7 >#define IP_PKTINFO 8 >#define IP_PKTOPTIONS 9 >#define IP_MTU_DISCOVER 10 >#define IP_RECVERR 11 >#define IP_RECVTTL 12 >#define IP_RECVTOS 13 >#define IP_MTU 14 >#define IP_FREEBIND 15 >#define IP_IPSEC_POLICY 16 >#define IP_XFRM_POLICY 17 >#define IP_PASSSEC 18 > > >#define IP_RECVRETOPTS IP_RETOPTS > > >#define IP_PMTUDISC_DONT 0 >#define IP_PMTUDISC_WANT 1 >#define IP_PMTUDISC_DO 2 > >#define IP_MULTICAST_IF 32 >#define IP_MULTICAST_TTL 33 >#define IP_MULTICAST_LOOP 34 >#define IP_ADD_MEMBERSHIP 35 >#define IP_DROP_MEMBERSHIP 36 >#define IP_UNBLOCK_SOURCE 37 >#define IP_BLOCK_SOURCE 38 >#define IP_ADD_SOURCE_MEMBERSHIP 39 >#define IP_DROP_SOURCE_MEMBERSHIP 40 >#define IP_MSFILTER 41 >#define MCAST_JOIN_GROUP 42 >#define MCAST_BLOCK_SOURCE 43 >#define MCAST_UNBLOCK_SOURCE 44 >#define MCAST_LEAVE_GROUP 45 >#define MCAST_JOIN_SOURCE_GROUP 46 >#define MCAST_LEAVE_SOURCE_GROUP 47 >#define MCAST_MSFILTER 48 > >#define MCAST_EXCLUDE 0 >#define MCAST_INCLUDE 1 > > >#define IP_DEFAULT_MULTICAST_TTL 1 >#define IP_DEFAULT_MULTICAST_LOOP 1 > > > >struct ip_mreq >{ > struct in_addr imr_multiaddr; > struct in_addr imr_interface; >}; > >struct ip_mreqn >{ > struct in_addr imr_multiaddr; > struct in_addr imr_address; > int imr_ifindex; >}; > >struct ip_mreq_source { > __be32 imr_multiaddr; > __be32 imr_interface; > __be32 imr_sourceaddr; >}; > >struct ip_msfilter { > __be32 imsf_multiaddr; > __be32 imsf_interface; > __u32 imsf_fmode; > __u32 imsf_numsrc; > __be32 imsf_slist[1]; >}; > >#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32)) > > > >struct group_req >{ > __u32 gr_interface; > struct __kernel_sockaddr_storage gr_group; >}; > >struct group_source_req >{ > __u32 gsr_interface; > struct __kernel_sockaddr_storage gsr_group; > struct __kernel_sockaddr_storage gsr_source; >}; > >struct group_filter >{ > __u32 gf_interface; > struct __kernel_sockaddr_storage gf_group; > __u32 gf_fmode; > __u32 gf_numsrc; > struct __kernel_sockaddr_storage gf_slist[1]; >}; > >#define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) > > > >struct in_pktinfo >{ > int ipi_ifindex; > struct in_addr ipi_spec_dst; > struct in_addr ipi_addr; >}; > > >#define __SOCK_SIZE__ 16 >struct sockaddr_in { > sa_family_t sin_family; > __be16 sin_port; > struct in_addr sin_addr; > > > unsigned char __pad[16 - sizeof(short int) - > sizeof(unsigned short int) - sizeof(struct in_addr)]; >}; >#define sin_zero __pad > > > > > > > >#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) >#define IN_CLASSA_NET 0xff000000 >#define IN_CLASSA_NSHIFT 24 >#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) >#define IN_CLASSA_MAX 128 > >#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) >#define IN_CLASSB_NET 0xffff0000 >#define IN_CLASSB_NSHIFT 16 >#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) >#define IN_CLASSB_MAX 65536 > >#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) >#define IN_CLASSC_NET 0xffffff00 >#define IN_CLASSC_NSHIFT 8 >#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) > >#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) >#define IN_MULTICAST(a) IN_CLASSD(a) >#define IN_MULTICAST_NET 0xF0000000 > >#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) >#define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) > > >#define INADDR_ANY ((unsigned long int) 0x00000000) > > >#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) > > >#define INADDR_NONE ((unsigned long int) 0xffffffff) > > >#define IN_LOOPBACKNET 127 > > >#define INADDR_LOOPBACK 0x7f000001 >#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) > > >#define INADDR_UNSPEC_GROUP 0xe0000000U >#define INADDR_ALLHOSTS_GROUP 0xe0000001U >#define INADDR_ALLRTRS_GROUP 0xe0000002U >#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU > > > > > > > >#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000)) >#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) >#define BADCLASS(x) (((x) & htonl(0xf0000000)) == htonl(0xf0000000)) >#define ZERONET(x) (((x) & htonl(0xff000000)) == htonl(0x00000000)) >#define LOCAL_MCAST(x) (((x) & htonl(0xFFFFFF00)) == htonl(0xE0000000)) ># 61 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/inet.h" 1 ># 43 "include/linux/inet.h" >#define _LINUX_INET_H > > > > >extern __be32 in_aton(const char *str); >extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); >extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); ># 62 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/netdevice.h" 1 ># 26 "include/linux/netdevice.h" >#define _LINUX_NETDEVICE_H > ># 1 "include/linux/if.h" 1 ># 20 "include/linux/if.h" >#define _LINUX_IF_H > > > > > >#define IFNAMSIZ 16 ># 1 "include/linux/hdlc/ioctl.h" 1 > >#define __HDLC_IOCTL_H__ > > >#define GENERIC_HDLC_VERSION 4 > >#define CLOCK_DEFAULT 0 >#define CLOCK_EXT 1 >#define CLOCK_INT 2 >#define CLOCK_TXINT 3 >#define CLOCK_TXFROMRX 4 > > >#define ENCODING_DEFAULT 0 >#define ENCODING_NRZ 1 >#define ENCODING_NRZI 2 >#define ENCODING_FM_MARK 3 >#define ENCODING_FM_SPACE 4 >#define ENCODING_MANCHESTER 5 > > >#define PARITY_DEFAULT 0 >#define PARITY_NONE 1 >#define PARITY_CRC16_PR0 2 >#define PARITY_CRC16_PR1 3 >#define PARITY_CRC16_PR0_CCITT 4 >#define PARITY_CRC16_PR1_CCITT 5 >#define PARITY_CRC32_PR0_CCITT 6 >#define PARITY_CRC32_PR1_CCITT 7 > >#define LMI_DEFAULT 0 >#define LMI_NONE 1 >#define LMI_ANSI 2 >#define LMI_CCITT 3 >#define LMI_CISCO 4 > >typedef struct { > unsigned int clock_rate; > unsigned int clock_type; > unsigned short loopback; >} sync_serial_settings; > >typedef struct { > unsigned int clock_rate; > unsigned int clock_type; > unsigned short loopback; > unsigned int slot_map; >} te1_settings; > >typedef struct { > unsigned short encoding; > unsigned short parity; >} raw_hdlc_proto; > >typedef struct { > unsigned int t391; > unsigned int t392; > unsigned int n391; > unsigned int n392; > unsigned int n393; > unsigned short lmi; > unsigned short dce; >} fr_proto; > >typedef struct { > unsigned int dlci; >} fr_proto_pvc; > >typedef struct { > unsigned int dlci; > char master[16]; >}fr_proto_pvc_info; > >typedef struct { > unsigned int interval; > unsigned int timeout; >} cisco_proto; ># 28 "include/linux/if.h" 2 > > >#define IFF_UP 0x1 >#define IFF_BROADCAST 0x2 >#define IFF_DEBUG 0x4 >#define IFF_LOOPBACK 0x8 >#define IFF_POINTOPOINT 0x10 >#define IFF_NOTRAILERS 0x20 >#define IFF_RUNNING 0x40 >#define IFF_NOARP 0x80 >#define IFF_PROMISC 0x100 >#define IFF_ALLMULTI 0x200 > >#define IFF_MASTER 0x400 >#define IFF_SLAVE 0x800 > >#define IFF_MULTICAST 0x1000 > >#define IFF_PORTSEL 0x2000 >#define IFF_AUTOMEDIA 0x4000 >#define IFF_DYNAMIC 0x8000 > >#define IFF_LOWER_UP 0x10000 >#define IFF_DORMANT 0x20000 > >#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) > > > >#define IFF_802_1Q_VLAN 0x1 >#define IFF_EBRIDGE 0x2 >#define IFF_SLAVE_INACTIVE 0x4 >#define IFF_MASTER_8023AD 0x8 >#define IFF_MASTER_ALB 0x10 >#define IFF_BONDING 0x20 >#define IFF_SLAVE_NEEDARP 0x40 > >#define IF_GET_IFACE 0x0001 >#define IF_GET_PROTO 0x0002 > > >#define IF_IFACE_V35 0x1000 >#define IF_IFACE_V24 0x1001 >#define IF_IFACE_X21 0x1002 >#define IF_IFACE_T1 0x1003 >#define IF_IFACE_E1 0x1004 >#define IF_IFACE_SYNC_SERIAL 0x1005 >#define IF_IFACE_X21D 0x1006 > > >#define IF_PROTO_HDLC 0x2000 >#define IF_PROTO_PPP 0x2001 >#define IF_PROTO_CISCO 0x2002 >#define IF_PROTO_FR 0x2003 >#define IF_PROTO_FR_ADD_PVC 0x2004 >#define IF_PROTO_FR_DEL_PVC 0x2005 >#define IF_PROTO_X25 0x2006 >#define IF_PROTO_HDLC_ETH 0x2007 >#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 >#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 >#define IF_PROTO_FR_PVC 0x200A >#define IF_PROTO_FR_ETH_PVC 0x200B >#define IF_PROTO_RAW 0x200C > > >enum { > IF_OPER_UNKNOWN, > IF_OPER_NOTPRESENT, > IF_OPER_DOWN, > IF_OPER_LOWERLAYERDOWN, > IF_OPER_TESTING, > IF_OPER_DORMANT, > IF_OPER_UP, >}; > > >enum { > IF_LINK_MODE_DEFAULT, > IF_LINK_MODE_DORMANT, >}; ># 119 "include/linux/if.h" >struct ifmap >{ > unsigned long mem_start; > unsigned long mem_end; > unsigned short base_addr; > unsigned char irq; > unsigned char dma; > unsigned char port; > >}; > >struct if_settings >{ > unsigned int type; > unsigned int size; > union { > > raw_hdlc_proto *raw_hdlc; > cisco_proto *cisco; > fr_proto *fr; > fr_proto_pvc *fr_pvc; > fr_proto_pvc_info *fr_pvc_info; > > > sync_serial_settings *sync; > te1_settings *te1; > } ifs_ifsu; >}; ># 155 "include/linux/if.h" >struct ifreq >{ >#define IFHWADDRLEN 6 > union > { > char ifrn_name[16]; > } ifr_ifrn; > > union { > struct sockaddr ifru_addr; > struct sockaddr ifru_dstaddr; > struct sockaddr ifru_broadaddr; > struct sockaddr ifru_netmask; > struct sockaddr ifru_hwaddr; > short ifru_flags; > int ifru_ivalue; > int ifru_mtu; > struct ifmap ifru_map; > char ifru_slave[16]; > char ifru_newname[16]; > void * ifru_data; > struct if_settings ifru_settings; > } ifr_ifru; >}; > >#define ifr_name ifr_ifrn.ifrn_name >#define ifr_hwaddr ifr_ifru.ifru_hwaddr >#define ifr_addr ifr_ifru.ifru_addr >#define ifr_dstaddr ifr_ifru.ifru_dstaddr >#define ifr_broadaddr ifr_ifru.ifru_broadaddr >#define ifr_netmask ifr_ifru.ifru_netmask >#define ifr_flags ifr_ifru.ifru_flags >#define ifr_metric ifr_ifru.ifru_ivalue >#define ifr_mtu ifr_ifru.ifru_mtu >#define ifr_map ifr_ifru.ifru_map >#define ifr_slave ifr_ifru.ifru_slave >#define ifr_data ifr_ifru.ifru_data >#define ifr_ifindex ifr_ifru.ifru_ivalue >#define ifr_bandwidth ifr_ifru.ifru_ivalue >#define ifr_qlen ifr_ifru.ifru_ivalue >#define ifr_newname ifr_ifru.ifru_newname >#define ifr_settings ifr_ifru.ifru_settings ># 205 "include/linux/if.h" >struct ifconf >{ > int ifc_len; > union > { > char *ifcu_buf; > struct ifreq *ifcu_req; > } ifc_ifcu; >}; >#define ifc_buf ifc_ifcu.ifcu_buf >#define ifc_req ifc_ifcu.ifcu_req ># 29 "include/linux/netdevice.h" 2 ># 1 "include/linux/if_ether.h" 1 ># 22 "include/linux/if_ether.h" >#define _LINUX_IF_ETHER_H ># 31 "include/linux/if_ether.h" >#define ETH_ALEN 6 >#define ETH_HLEN 14 >#define ETH_ZLEN 60 >#define ETH_DATA_LEN 1500 >#define ETH_FRAME_LEN 1514 > > > > > >#define ETH_P_LOOP 0x0060 >#define ETH_P_PUP 0x0200 >#define ETH_P_PUPAT 0x0201 >#define ETH_P_IP 0x0800 >#define ETH_P_X25 0x0805 >#define ETH_P_ARP 0x0806 >#define ETH_P_BPQ 0x08FF >#define ETH_P_IEEEPUP 0x0a00 >#define ETH_P_IEEEPUPAT 0x0a01 >#define ETH_P_DEC 0x6000 >#define ETH_P_DNA_DL 0x6001 >#define ETH_P_DNA_RC 0x6002 >#define ETH_P_DNA_RT 0x6003 >#define ETH_P_LAT 0x6004 >#define ETH_P_DIAG 0x6005 >#define ETH_P_CUST 0x6006 >#define ETH_P_SCA 0x6007 >#define ETH_P_RARP 0x8035 >#define ETH_P_ATALK 0x809B >#define ETH_P_AARP 0x80F3 >#define ETH_P_8021Q 0x8100 >#define ETH_P_IPX 0x8137 >#define ETH_P_IPV6 0x86DD >#define ETH_P_SLOW 0x8809 >#define ETH_P_WCCP 0x883E > >#define ETH_P_PPP_DISC 0x8863 >#define ETH_P_PPP_SES 0x8864 >#define ETH_P_MPLS_UC 0x8847 >#define ETH_P_MPLS_MC 0x8848 >#define ETH_P_ATMMPOA 0x884c >#define ETH_P_ATMFATE 0x8884 > > >#define ETH_P_AOE 0x88A2 >#define ETH_P_TIPC 0x88CA > > > > > >#define ETH_P_802_3 0x0001 >#define ETH_P_AX25 0x0002 >#define ETH_P_ALL 0x0003 >#define ETH_P_802_2 0x0004 >#define ETH_P_SNAP 0x0005 >#define ETH_P_DDCMP 0x0006 >#define ETH_P_WAN_PPP 0x0007 >#define ETH_P_PPP_MP 0x0008 >#define ETH_P_LOCALTALK 0x0009 >#define ETH_P_PPPTALK 0x0010 >#define ETH_P_TR_802_2 0x0011 >#define ETH_P_MOBITEX 0x0015 >#define ETH_P_CONTROL 0x0016 >#define ETH_P_IRDA 0x0017 >#define ETH_P_ECONET 0x0018 >#define ETH_P_HDLC 0x0019 >#define ETH_P_ARCNET 0x001A > > > > > >struct ethhdr { > unsigned char h_dest[6]; > unsigned char h_source[6]; > __be16 h_proto; >} __attribute__((packed)); > > ># 1 "include/linux/skbuff.h" 1 ># 15 "include/linux/skbuff.h" >#define _LINUX_SKBUFF_H ># 25 "include/linux/skbuff.h" ># 1 "include/linux/net.h" 1 ># 19 "include/linux/net.h" >#define _LINUX_NET_H > > ># 1 "include/linux/random.h" 1 > > > > > > > >#define _LINUX_RANDOM_H > > > > > > >#define RNDGETENTCNT _IOR( 'R', 0x00, int ) > > >#define RNDADDTOENTCNT _IOW( 'R', 0x01, int ) > > >#define RNDGETPOOL _IOR( 'R', 0x02, int [2] ) > > > > > >#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] ) > > >#define RNDZAPENTCNT _IO( 'R', 0x04 ) > > >#define RNDCLEARPOOL _IO( 'R', 0x06 ) > >struct rand_pool_info { > int entropy_count; > int buf_size; > __u32 buf[0]; >}; > > > > > >extern void rand_initialize_irq(int irq); > >extern void add_input_randomness(unsigned int type, unsigned int code, > unsigned int value); >extern void add_interrupt_randomness(int irq); > >extern void get_random_bytes(void *buf, int nbytes); >void generate_random_uuid(unsigned char uuid_out[16]); > >extern __u32 secure_ip_id(__be32 daddr); >extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); >extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, > __be16 dport); >extern __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr, > __be16 sport, __be16 dport); >extern __u32 secure_tcpv6_sequence_number(__be32 *saddr, __be32 *daddr, > __be16 sport, __be16 dport); >extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, > __be16 sport, __be16 dport); > > >extern struct file_operations random_fops, urandom_fops; > > >unsigned int get_random_int(void); >unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); > >u32 random32(void); >void srandom32(u32 seed); ># 23 "include/linux/net.h" 2 > > >struct poll_table_struct; >struct inode; > >#define NPROTO 32 > >#define SYS_SOCKET 1 >#define SYS_BIND 2 >#define SYS_CONNECT 3 >#define SYS_LISTEN 4 >#define SYS_ACCEPT 5 >#define SYS_GETSOCKNAME 6 >#define SYS_GETPEERNAME 7 >#define SYS_SOCKETPAIR 8 >#define SYS_SEND 9 >#define SYS_RECV 10 >#define SYS_SENDTO 11 >#define SYS_RECVFROM 12 >#define SYS_SHUTDOWN 13 >#define SYS_SETSOCKOPT 14 >#define SYS_GETSOCKOPT 15 >#define SYS_SENDMSG 16 >#define SYS_RECVMSG 17 > >typedef enum { > SS_FREE = 0, > SS_UNCONNECTED, > SS_CONNECTING, > SS_CONNECTED, > SS_DISCONNECTING >} socket_state; > >#define __SO_ACCEPTCON (1 << 16) > > > > >#define SOCK_ASYNC_NOSPACE 0 >#define SOCK_ASYNC_WAITDATA 1 >#define SOCK_NOSPACE 2 >#define SOCK_PASSCRED 3 >#define SOCK_PASSSEC 4 ># 83 "include/linux/net.h" >enum sock_type { > SOCK_STREAM = 1, > SOCK_DGRAM = 2, > SOCK_RAW = 3, > SOCK_RDM = 4, > SOCK_SEQPACKET = 5, > SOCK_DCCP = 6, > SOCK_PACKET = 10, >}; > >#define SOCK_MAX (SOCK_PACKET + 1) ># 108 "include/linux/net.h" >struct socket { > socket_state state; > unsigned long flags; > const struct proto_ops *ops; > struct fasync_struct *fasync_list; > struct file *file; > struct sock *sk; > wait_queue_head_t wait; > short type; >}; > >struct vm_area_struct; >struct page; >struct kiocb; >struct sockaddr; >struct msghdr; >struct module; > >struct proto_ops { > int family; > struct module *owner; > int (*release) (struct socket *sock); > int (*bind) (struct socket *sock, > struct sockaddr *myaddr, > int sockaddr_len); > int (*connect) (struct socket *sock, > struct sockaddr *vaddr, > int sockaddr_len, int flags); > int (*socketpair)(struct socket *sock1, > struct socket *sock2); > int (*accept) (struct socket *sock, > struct socket *newsock, int flags); > int (*getname) (struct socket *sock, > struct sockaddr *addr, > int *sockaddr_len, int peer); > unsigned int (*poll) (struct file *file, struct socket *sock, > struct poll_table_struct *wait); > int (*ioctl) (struct socket *sock, unsigned int cmd, > unsigned long arg); > int (*compat_ioctl) (struct socket *sock, unsigned int cmd, > unsigned long arg); > int (*listen) (struct socket *sock, int len); > int (*shutdown) (struct socket *sock, int flags); > int (*setsockopt)(struct socket *sock, int level, > int optname, char *optval, int optlen); > int (*getsockopt)(struct socket *sock, int level, > int optname, char *optval, int *optlen); > int (*compat_setsockopt)(struct socket *sock, int level, > int optname, char *optval, int optlen); > int (*compat_getsockopt)(struct socket *sock, int level, > int optname, char *optval, int *optlen); > int (*sendmsg) (struct kiocb *iocb, struct socket *sock, > struct msghdr *m, size_t total_len); > int (*recvmsg) (struct kiocb *iocb, struct socket *sock, > struct msghdr *m, size_t total_len, > int flags); > int (*mmap) (struct file *file, struct socket *sock, > struct vm_area_struct * vma); > ssize_t (*sendpage) (struct socket *sock, struct page *page, > int offset, size_t size, int flags); >}; > >struct net_proto_family { > int family; > int (*create)(struct socket *sock, int protocol); > struct module *owner; >}; > >struct iovec; >struct kvec; > >extern int sock_wake_async(struct socket *sk, int how, int band); >extern int sock_register(const struct net_proto_family *fam); >extern void sock_unregister(int family); >extern int sock_create(int family, int type, int proto, > struct socket **res); >extern int sock_create_kern(int family, int type, int proto, > struct socket **res); >extern int sock_create_lite(int family, int type, int proto, > struct socket **res); >extern void sock_release(struct socket *sock); >extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, > size_t len); >extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, > size_t size, int flags); >extern int sock_map_fd(struct socket *sock); >extern struct socket *sockfd_lookup(int fd, int *err); >#define sockfd_put(sock) fput(sock->file) >extern int net_ratelimit(void); > >#define net_random() random32() >#define net_srandom(seed) srandom32((__force u32)seed) > >extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, > struct kvec *vec, size_t num, size_t len); >extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, > struct kvec *vec, size_t num, > size_t len, int flags); > >extern int kernel_bind(struct socket *sock, struct sockaddr *addr, > int addrlen); >extern int kernel_listen(struct socket *sock, int backlog); >extern int kernel_accept(struct socket *sock, struct socket **newsock, > int flags); >extern int kernel_connect(struct socket *sock, struct sockaddr *addr, > int addrlen, int flags); >extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, > int *addrlen); >extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, > int *addrlen); >extern int kernel_getsockopt(struct socket *sock, int level, int optname, > char *optval, int *optlen); >extern int kernel_setsockopt(struct socket *sock, int level, int optname, > char *optval, int optlen); >extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, > size_t size, int flags); >extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); > > >#define SOCKOPS_WRAPPED(name) name >#define SOCKOPS_WRAP(name,fam) ># 309 "include/linux/net.h" >#define MODULE_ALIAS_NETPROTO(proto) MODULE_ALIAS("net-pf-" __stringify(proto)) > > >#define MODULE_ALIAS_NET_PF_PROTO(pf,proto) MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto)) > > > ># 1 "include/linux/sysctl.h" 1 ># 26 "include/linux/sysctl.h" >#define _LINUX_SYSCTL_H > > > > > >struct file; >struct completion; > >#define CTL_MAXNAME 10 > > > > >struct __sysctl_args { > int *name; > int nlen; > void *oldval; > size_t *oldlenp; > void *newval; > size_t newlen; > unsigned long __unused[4]; >}; > > > > > > > >#define CTL_ANY -1 >#define CTL_NONE 0 >#define CTL_UNNUMBERED CTL_NONE > > >enum >{ > CTL_KERN=1, > CTL_VM=2, > CTL_NET=3, > > CTL_FS=5, > CTL_DEBUG=6, > CTL_DEV=7, > CTL_BUS=8, > CTL_ABI=9, > CTL_CPU=10 >}; > > >enum >{ > CTL_BUS_ISA=1 >}; > > >enum >{ > INOTIFY_MAX_USER_INSTANCES=1, > INOTIFY_MAX_USER_WATCHES=2, > INOTIFY_MAX_QUEUED_EVENTS=3 >}; > > >enum >{ > KERN_OSTYPE=1, > KERN_OSRELEASE=2, > KERN_OSREV=3, > KERN_VERSION=4, > KERN_SECUREMASK=5, > KERN_PROF=6, > KERN_NODENAME=7, > KERN_DOMAINNAME=8, > > KERN_CAP_BSET=14, > KERN_PANIC=15, > KERN_REALROOTDEV=16, > > KERN_SPARC_REBOOT=21, > KERN_CTLALTDEL=22, > KERN_PRINTK=23, > KERN_NAMETRANS=24, > KERN_PPC_HTABRECLAIM=25, > KERN_PPC_ZEROPAGED=26, > KERN_PPC_POWERSAVE_NAP=27, > KERN_MODPROBE=28, > KERN_SG_BIG_BUFF=29, > KERN_ACCT=30, > KERN_PPC_L2CR=31, > > KERN_RTSIGNR=32, > KERN_RTSIGMAX=33, > > KERN_SHMMAX=34, > KERN_MSGMAX=35, > KERN_MSGMNB=36, > KERN_MSGPOOL=37, > KERN_SYSRQ=38, > KERN_MAX_THREADS=39, > KERN_RANDOM=40, > KERN_SHMALL=41, > KERN_MSGMNI=42, > KERN_SEM=43, > KERN_SPARC_STOP_A=44, > KERN_SHMMNI=45, > KERN_OVERFLOWUID=46, > KERN_OVERFLOWGID=47, > KERN_SHMPATH=48, > KERN_HOTPLUG=49, > KERN_IEEE_EMULATION_WARNINGS=50, > KERN_S390_USER_DEBUG_LOGGING=51, > KERN_CORE_USES_PID=52, > KERN_TAINTED=53, > KERN_CADPID=54, > KERN_PIDMAX=55, > KERN_CORE_PATTERN=56, > KERN_PANIC_ON_OOPS=57, > KERN_HPPA_PWRSW=58, > KERN_HPPA_UNALIGNED=59, > KERN_PRINTK_RATELIMIT=60, > KERN_PRINTK_RATELIMIT_BURST=61, > KERN_PTY=62, > KERN_NGROUPS_MAX=63, > KERN_SPARC_SCONS_PWROFF=64, > KERN_HZ_TIMER=65, > KERN_UNKNOWN_NMI_PANIC=66, > KERN_BOOTLOADER_TYPE=67, > KERN_RANDOMIZE=68, > KERN_SETUID_DUMPABLE=69, > KERN_SPIN_RETRY=70, > KERN_ACPI_VIDEO_FLAGS=71, > KERN_IA64_UNALIGNED=72, > KERN_COMPAT_LOG=73, > KERN_MAX_LOCK_DEPTH=74, > KERN_NMI_WATCHDOG=75, > KERN_PANIC_ON_NMI=76, >}; > > > > >enum >{ > VM_UNUSED1=1, > VM_UNUSED2=2, > VM_UNUSED3=3, > VM_UNUSED4=4, > VM_OVERCOMMIT_MEMORY=5, > VM_UNUSED5=6, > VM_UNUSED7=7, > VM_UNUSED8=8, > VM_UNUSED9=9, > VM_PAGE_CLUSTER=10, > VM_DIRTY_BACKGROUND=11, > VM_DIRTY_RATIO=12, > VM_DIRTY_WB_CS=13, > VM_DIRTY_EXPIRE_CS=14, > VM_NR_PDFLUSH_THREADS=15, > VM_OVERCOMMIT_RATIO=16, > VM_PAGEBUF=17, > VM_HUGETLB_PAGES=18, > VM_SWAPPINESS=19, > VM_LOWMEM_RESERVE_RATIO=20, > VM_MIN_FREE_KBYTES=21, > VM_MAX_MAP_COUNT=22, > VM_LAPTOP_MODE=23, > VM_BLOCK_DUMP=24, > VM_HUGETLB_GROUP=25, > VM_VFS_CACHE_PRESSURE=26, > VM_LEGACY_VA_LAYOUT=27, > VM_SWAP_TOKEN_TIMEOUT=28, > VM_DROP_PAGECACHE=29, > VM_PERCPU_PAGELIST_FRACTION=30, > VM_ZONE_RECLAIM_MODE=31, > VM_MIN_UNMAPPED=32, > VM_PANIC_ON_OOM=33, > VM_VDSO_ENABLED=34, > VM_MIN_SLAB=35, >}; > > > >enum >{ > NET_CORE=1, > NET_ETHER=2, > NET_802=3, > NET_UNIX=4, > NET_IPV4=5, > NET_IPX=6, > NET_ATALK=7, > NET_NETROM=8, > NET_AX25=9, > NET_BRIDGE=10, > NET_ROSE=11, > NET_IPV6=12, > NET_X25=13, > NET_TR=14, > NET_DECNET=15, > NET_ECONET=16, > NET_SCTP=17, > NET_LLC=18, > NET_NETFILTER=19, > NET_DCCP=20, >}; > > >enum >{ > RANDOM_POOLSIZE=1, > RANDOM_ENTROPY_COUNT=2, > RANDOM_READ_THRESH=3, > RANDOM_WRITE_THRESH=4, > RANDOM_BOOT_ID=5, > RANDOM_UUID=6 >}; > > >enum >{ > PTY_MAX=1, > PTY_NR=2 >}; > > >enum >{ > BUS_ISA_MEM_BASE=1, > BUS_ISA_PORT_BASE=2, > BUS_ISA_PORT_SHIFT=3 >}; > > >enum >{ > NET_CORE_WMEM_MAX=1, > NET_CORE_RMEM_MAX=2, > NET_CORE_WMEM_DEFAULT=3, > NET_CORE_RMEM_DEFAULT=4, > > NET_CORE_MAX_BACKLOG=6, > NET_CORE_FASTROUTE=7, > NET_CORE_MSG_COST=8, > NET_CORE_MSG_BURST=9, > NET_CORE_OPTMEM_MAX=10, > NET_CORE_HOT_LIST_LENGTH=11, > NET_CORE_DIVERT_VERSION=12, > NET_CORE_NO_CONG_THRESH=13, > NET_CORE_NO_CONG=14, > NET_CORE_LO_CONG=15, > NET_CORE_MOD_CONG=16, > NET_CORE_DEV_WEIGHT=17, > NET_CORE_SOMAXCONN=18, > NET_CORE_BUDGET=19, > NET_CORE_AEVENT_ETIME=20, > NET_CORE_AEVENT_RSEQTH=21, >}; > > > > > > > >enum >{ > NET_UNIX_DESTROY_DELAY=1, > NET_UNIX_DELETE_DELAY=2, > NET_UNIX_MAX_DGRAM_QLEN=3, >}; > > >enum >{ > NET_NF_CONNTRACK_MAX=1, > NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2, > NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3, > NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4, > NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5, > NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6, > NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7, > NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8, > NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9, > NET_NF_CONNTRACK_UDP_TIMEOUT=10, > NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, > NET_NF_CONNTRACK_ICMP_TIMEOUT=12, > NET_NF_CONNTRACK_GENERIC_TIMEOUT=13, > NET_NF_CONNTRACK_BUCKETS=14, > NET_NF_CONNTRACK_LOG_INVALID=15, > NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16, > NET_NF_CONNTRACK_TCP_LOOSE=17, > NET_NF_CONNTRACK_TCP_BE_LIBERAL=18, > NET_NF_CONNTRACK_TCP_MAX_RETRANS=19, > NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20, > NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21, > NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22, > NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23, > NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24, > NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25, > NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26, > NET_NF_CONNTRACK_COUNT=27, > NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28, > NET_NF_CONNTRACK_FRAG6_TIMEOUT=29, > NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30, > NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31, > NET_NF_CONNTRACK_CHECKSUM=32, >}; > > >enum >{ > > NET_IPV4_FORWARD=8, > NET_IPV4_DYNADDR=9, > > NET_IPV4_CONF=16, > NET_IPV4_NEIGH=17, > NET_IPV4_ROUTE=18, > NET_IPV4_FIB_HASH=19, > NET_IPV4_NETFILTER=20, > > NET_IPV4_TCP_TIMESTAMPS=33, > NET_IPV4_TCP_WINDOW_SCALING=34, > NET_IPV4_TCP_SACK=35, > NET_IPV4_TCP_RETRANS_COLLAPSE=36, > NET_IPV4_DEFAULT_TTL=37, > NET_IPV4_AUTOCONFIG=38, > NET_IPV4_NO_PMTU_DISC=39, > NET_IPV4_TCP_SYN_RETRIES=40, > NET_IPV4_IPFRAG_HIGH_THRESH=41, > NET_IPV4_IPFRAG_LOW_THRESH=42, > NET_IPV4_IPFRAG_TIME=43, > NET_IPV4_TCP_MAX_KA_PROBES=44, > NET_IPV4_TCP_KEEPALIVE_TIME=45, > NET_IPV4_TCP_KEEPALIVE_PROBES=46, > NET_IPV4_TCP_RETRIES1=47, > NET_IPV4_TCP_RETRIES2=48, > NET_IPV4_TCP_FIN_TIMEOUT=49, > NET_IPV4_IP_MASQ_DEBUG=50, > NET_TCP_SYNCOOKIES=51, > NET_TCP_STDURG=52, > NET_TCP_RFC1337=53, > NET_TCP_SYN_TAILDROP=54, > NET_TCP_MAX_SYN_BACKLOG=55, > NET_IPV4_LOCAL_PORT_RANGE=56, > NET_IPV4_ICMP_ECHO_IGNORE_ALL=57, > NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58, > NET_IPV4_ICMP_SOURCEQUENCH_RATE=59, > NET_IPV4_ICMP_DESTUNREACH_RATE=60, > NET_IPV4_ICMP_TIMEEXCEED_RATE=61, > NET_IPV4_ICMP_PARAMPROB_RATE=62, > NET_IPV4_ICMP_ECHOREPLY_RATE=63, > NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64, > NET_IPV4_IGMP_MAX_MEMBERSHIPS=65, > NET_TCP_TW_RECYCLE=66, > NET_IPV4_ALWAYS_DEFRAG=67, > NET_IPV4_TCP_KEEPALIVE_INTVL=68, > NET_IPV4_INET_PEER_THRESHOLD=69, > NET_IPV4_INET_PEER_MINTTL=70, > NET_IPV4_INET_PEER_MAXTTL=71, > NET_IPV4_INET_PEER_GC_MINTIME=72, > NET_IPV4_INET_PEER_GC_MAXTIME=73, > NET_TCP_ORPHAN_RETRIES=74, > NET_TCP_ABORT_ON_OVERFLOW=75, > NET_TCP_SYNACK_RETRIES=76, > NET_TCP_MAX_ORPHANS=77, > NET_TCP_MAX_TW_BUCKETS=78, > NET_TCP_FACK=79, > NET_TCP_REORDERING=80, > NET_TCP_ECN=81, > NET_TCP_DSACK=82, > NET_TCP_MEM=83, > NET_TCP_WMEM=84, > NET_TCP_RMEM=85, > NET_TCP_APP_WIN=86, > NET_TCP_ADV_WIN_SCALE=87, > NET_IPV4_NONLOCAL_BIND=88, > NET_IPV4_ICMP_RATELIMIT=89, > NET_IPV4_ICMP_RATEMASK=90, > NET_TCP_TW_REUSE=91, > NET_TCP_FRTO=92, > NET_TCP_LOW_LATENCY=93, > NET_IPV4_IPFRAG_SECRET_INTERVAL=94, > NET_IPV4_IGMP_MAX_MSF=96, > NET_TCP_NO_METRICS_SAVE=97, > NET_TCP_DEFAULT_WIN_SCALE=105, > NET_TCP_MODERATE_RCVBUF=106, > NET_TCP_TSO_WIN_DIVISOR=107, > NET_TCP_BIC_BETA=108, > NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, > NET_TCP_CONG_CONTROL=110, > NET_TCP_ABC=111, > NET_IPV4_IPFRAG_MAX_DIST=112, > NET_TCP_MTU_PROBING=113, > NET_TCP_BASE_MSS=114, > NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115, > NET_TCP_DMA_COPYBREAK=116, > NET_TCP_SLOW_START_AFTER_IDLE=117, > NET_CIPSOV4_CACHE_ENABLE=118, > NET_CIPSOV4_CACHE_BUCKET_SIZE=119, > NET_CIPSOV4_RBM_OPTFMT=120, > NET_CIPSOV4_RBM_STRICTVALID=121, > NET_TCP_AVAIL_CONG_CONTROL=122, > NET_TCP_ALLOWED_CONG_CONTROL=123, >}; > >enum { > NET_IPV4_ROUTE_FLUSH=1, > NET_IPV4_ROUTE_MIN_DELAY=2, > NET_IPV4_ROUTE_MAX_DELAY=3, > NET_IPV4_ROUTE_GC_THRESH=4, > NET_IPV4_ROUTE_MAX_SIZE=5, > NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, > NET_IPV4_ROUTE_GC_TIMEOUT=7, > NET_IPV4_ROUTE_GC_INTERVAL=8, > NET_IPV4_ROUTE_REDIRECT_LOAD=9, > NET_IPV4_ROUTE_REDIRECT_NUMBER=10, > NET_IPV4_ROUTE_REDIRECT_SILENCE=11, > NET_IPV4_ROUTE_ERROR_COST=12, > NET_IPV4_ROUTE_ERROR_BURST=13, > NET_IPV4_ROUTE_GC_ELASTICITY=14, > NET_IPV4_ROUTE_MTU_EXPIRES=15, > NET_IPV4_ROUTE_MIN_PMTU=16, > NET_IPV4_ROUTE_MIN_ADVMSS=17, > NET_IPV4_ROUTE_SECRET_INTERVAL=18, > NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19, >}; > >enum >{ > NET_PROTO_CONF_ALL=-2, > NET_PROTO_CONF_DEFAULT=-3 > > >}; > >enum >{ > NET_IPV4_CONF_FORWARDING=1, > NET_IPV4_CONF_MC_FORWARDING=2, > NET_IPV4_CONF_PROXY_ARP=3, > NET_IPV4_CONF_ACCEPT_REDIRECTS=4, > NET_IPV4_CONF_SECURE_REDIRECTS=5, > NET_IPV4_CONF_SEND_REDIRECTS=6, > NET_IPV4_CONF_SHARED_MEDIA=7, > NET_IPV4_CONF_RP_FILTER=8, > NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9, > NET_IPV4_CONF_BOOTP_RELAY=10, > NET_IPV4_CONF_LOG_MARTIANS=11, > NET_IPV4_CONF_TAG=12, > NET_IPV4_CONF_ARPFILTER=13, > NET_IPV4_CONF_MEDIUM_ID=14, > NET_IPV4_CONF_NOXFRM=15, > NET_IPV4_CONF_NOPOLICY=16, > NET_IPV4_CONF_FORCE_IGMP_VERSION=17, > NET_IPV4_CONF_ARP_ANNOUNCE=18, > NET_IPV4_CONF_ARP_IGNORE=19, > NET_IPV4_CONF_PROMOTE_SECONDARIES=20, > NET_IPV4_CONF_ARP_ACCEPT=21, > __NET_IPV4_CONF_MAX >}; > > >enum >{ > NET_IPV4_NF_CONNTRACK_MAX=1, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9, > NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10, > NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, > NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12, > NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13, > NET_IPV4_NF_CONNTRACK_BUCKETS=14, > NET_IPV4_NF_CONNTRACK_LOG_INVALID=15, > NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16, > NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17, > NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18, > NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25, > NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26, > NET_IPV4_NF_CONNTRACK_COUNT=27, > NET_IPV4_NF_CONNTRACK_CHECKSUM=28, >}; > > >enum { > NET_IPV6_CONF=16, > NET_IPV6_NEIGH=17, > NET_IPV6_ROUTE=18, > NET_IPV6_ICMP=19, > NET_IPV6_BINDV6ONLY=20, > NET_IPV6_IP6FRAG_HIGH_THRESH=21, > NET_IPV6_IP6FRAG_LOW_THRESH=22, > NET_IPV6_IP6FRAG_TIME=23, > NET_IPV6_IP6FRAG_SECRET_INTERVAL=24, > NET_IPV6_MLD_MAX_MSF=25, >}; > >enum { > NET_IPV6_ROUTE_FLUSH=1, > NET_IPV6_ROUTE_GC_THRESH=2, > NET_IPV6_ROUTE_MAX_SIZE=3, > NET_IPV6_ROUTE_GC_MIN_INTERVAL=4, > NET_IPV6_ROUTE_GC_TIMEOUT=5, > NET_IPV6_ROUTE_GC_INTERVAL=6, > NET_IPV6_ROUTE_GC_ELASTICITY=7, > NET_IPV6_ROUTE_MTU_EXPIRES=8, > NET_IPV6_ROUTE_MIN_ADVMSS=9, > NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10 >}; > >enum { > NET_IPV6_FORWARDING=1, > NET_IPV6_HOP_LIMIT=2, > NET_IPV6_MTU=3, > NET_IPV6_ACCEPT_RA=4, > NET_IPV6_ACCEPT_REDIRECTS=5, > NET_IPV6_AUTOCONF=6, > NET_IPV6_DAD_TRANSMITS=7, > NET_IPV6_RTR_SOLICITS=8, > NET_IPV6_RTR_SOLICIT_INTERVAL=9, > NET_IPV6_RTR_SOLICIT_DELAY=10, > NET_IPV6_USE_TEMPADDR=11, > NET_IPV6_TEMP_VALID_LFT=12, > NET_IPV6_TEMP_PREFERED_LFT=13, > NET_IPV6_REGEN_MAX_RETRY=14, > NET_IPV6_MAX_DESYNC_FACTOR=15, > NET_IPV6_MAX_ADDRESSES=16, > NET_IPV6_FORCE_MLD_VERSION=17, > NET_IPV6_ACCEPT_RA_DEFRTR=18, > NET_IPV6_ACCEPT_RA_PINFO=19, > NET_IPV6_ACCEPT_RA_RTR_PREF=20, > NET_IPV6_RTR_PROBE_INTERVAL=21, > NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22, > NET_IPV6_PROXY_NDP=23, > __NET_IPV6_MAX >}; > > >enum { > NET_IPV6_ICMP_RATELIMIT=1 >}; > > >enum { > NET_NEIGH_MCAST_SOLICIT=1, > NET_NEIGH_UCAST_SOLICIT=2, > NET_NEIGH_APP_SOLICIT=3, > NET_NEIGH_RETRANS_TIME=4, > NET_NEIGH_REACHABLE_TIME=5, > NET_NEIGH_DELAY_PROBE_TIME=6, > NET_NEIGH_GC_STALE_TIME=7, > NET_NEIGH_UNRES_QLEN=8, > NET_NEIGH_PROXY_QLEN=9, > NET_NEIGH_ANYCAST_DELAY=10, > NET_NEIGH_PROXY_DELAY=11, > NET_NEIGH_LOCKTIME=12, > NET_NEIGH_GC_INTERVAL=13, > NET_NEIGH_GC_THRESH1=14, > NET_NEIGH_GC_THRESH2=15, > NET_NEIGH_GC_THRESH3=16, > NET_NEIGH_RETRANS_TIME_MS=17, > NET_NEIGH_REACHABLE_TIME_MS=18, > __NET_NEIGH_MAX >}; > > >enum { > NET_DCCP_DEFAULT=1, >}; > > >enum { > NET_IPX_PPROP_BROADCASTING=1, > NET_IPX_FORWARDING=2 >}; > > >enum { > NET_LLC2=1, > NET_LLC_STATION=2, >}; > > >enum { > NET_LLC2_TIMEOUT=1, >}; > > >enum { > NET_LLC_STATION_ACK_TIMEOUT=1, >}; > > >enum { > NET_LLC2_ACK_TIMEOUT=1, > NET_LLC2_P_TIMEOUT=2, > NET_LLC2_REJ_TIMEOUT=3, > NET_LLC2_BUSY_TIMEOUT=4, >}; > > >enum { > NET_ATALK_AARP_EXPIRY_TIME=1, > NET_ATALK_AARP_TICK_TIME=2, > NET_ATALK_AARP_RETRANSMIT_LIMIT=3, > NET_ATALK_AARP_RESOLVE_TIME=4 >}; > > > >enum { > NET_NETROM_DEFAULT_PATH_QUALITY=1, > NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2, > NET_NETROM_NETWORK_TTL_INITIALISER=3, > NET_NETROM_TRANSPORT_TIMEOUT=4, > NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5, > NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6, > NET_NETROM_TRANSPORT_BUSY_DELAY=7, > NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8, > NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9, > NET_NETROM_ROUTING_CONTROL=10, > NET_NETROM_LINK_FAILS_COUNT=11, > NET_NETROM_RESET=12 >}; > > >enum { > NET_AX25_IP_DEFAULT_MODE=1, > NET_AX25_DEFAULT_MODE=2, > NET_AX25_BACKOFF_TYPE=3, > NET_AX25_CONNECT_MODE=4, > NET_AX25_STANDARD_WINDOW=5, > NET_AX25_EXTENDED_WINDOW=6, > NET_AX25_T1_TIMEOUT=7, > NET_AX25_T2_TIMEOUT=8, > NET_AX25_T3_TIMEOUT=9, > NET_AX25_IDLE_TIMEOUT=10, > NET_AX25_N2=11, > NET_AX25_PACLEN=12, > NET_AX25_PROTOCOL=13, > NET_AX25_DAMA_SLAVE_TIMEOUT=14 >}; > > >enum { > NET_ROSE_RESTART_REQUEST_TIMEOUT=1, > NET_ROSE_CALL_REQUEST_TIMEOUT=2, > NET_ROSE_RESET_REQUEST_TIMEOUT=3, > NET_ROSE_CLEAR_REQUEST_TIMEOUT=4, > NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5, > NET_ROSE_ROUTING_CONTROL=6, > NET_ROSE_LINK_FAIL_TIMEOUT=7, > NET_ROSE_MAX_VCS=8, > NET_ROSE_WINDOW_SIZE=9, > NET_ROSE_NO_ACTIVITY_TIMEOUT=10 >}; > > >enum { > NET_X25_RESTART_REQUEST_TIMEOUT=1, > NET_X25_CALL_REQUEST_TIMEOUT=2, > NET_X25_RESET_REQUEST_TIMEOUT=3, > NET_X25_CLEAR_REQUEST_TIMEOUT=4, > NET_X25_ACK_HOLD_BACK_TIMEOUT=5 >}; > > >enum >{ > NET_TR_RIF_TIMEOUT=1 >}; > > >enum { > NET_DECNET_NODE_TYPE = 1, > NET_DECNET_NODE_ADDRESS = 2, > NET_DECNET_NODE_NAME = 3, > NET_DECNET_DEFAULT_DEVICE = 4, > NET_DECNET_TIME_WAIT = 5, > NET_DECNET_DN_COUNT = 6, > NET_DECNET_DI_COUNT = 7, > NET_DECNET_DR_COUNT = 8, > NET_DECNET_DST_GC_INTERVAL = 9, > NET_DECNET_CONF = 10, > NET_DECNET_NO_FC_MAX_CWND = 11, > NET_DECNET_MEM = 12, > NET_DECNET_RMEM = 13, > NET_DECNET_WMEM = 14, > NET_DECNET_DEBUG_LEVEL = 255 >}; > > >enum { > NET_DECNET_CONF_LOOPBACK = -2, > NET_DECNET_CONF_DDCMP = -3, > NET_DECNET_CONF_PPP = -4, > NET_DECNET_CONF_X25 = -5, > NET_DECNET_CONF_GRE = -6, > NET_DECNET_CONF_ETHER = -7 > > >}; > > >enum { > NET_DECNET_CONF_DEV_PRIORITY = 1, > NET_DECNET_CONF_DEV_T1 = 2, > NET_DECNET_CONF_DEV_T2 = 3, > NET_DECNET_CONF_DEV_T3 = 4, > NET_DECNET_CONF_DEV_FORWARDING = 5, > NET_DECNET_CONF_DEV_BLKSIZE = 6, > NET_DECNET_CONF_DEV_STATE = 7 >}; > > >enum { > NET_SCTP_RTO_INITIAL = 1, > NET_SCTP_RTO_MIN = 2, > NET_SCTP_RTO_MAX = 3, > NET_SCTP_RTO_ALPHA = 4, > NET_SCTP_RTO_BETA = 5, > NET_SCTP_VALID_COOKIE_LIFE = 6, > NET_SCTP_ASSOCIATION_MAX_RETRANS = 7, > NET_SCTP_PATH_MAX_RETRANS = 8, > NET_SCTP_MAX_INIT_RETRANSMITS = 9, > NET_SCTP_HB_INTERVAL = 10, > NET_SCTP_PRESERVE_ENABLE = 11, > NET_SCTP_MAX_BURST = 12, > NET_SCTP_ADDIP_ENABLE = 13, > NET_SCTP_PRSCTP_ENABLE = 14, > NET_SCTP_SNDBUF_POLICY = 15, > NET_SCTP_SACK_TIMEOUT = 16, > NET_SCTP_RCVBUF_POLICY = 17, >}; > > >enum { > NET_BRIDGE_NF_CALL_ARPTABLES = 1, > NET_BRIDGE_NF_CALL_IPTABLES = 2, > NET_BRIDGE_NF_CALL_IP6TABLES = 3, > NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4, >}; > > >enum >{ > FS_NRINODE=1, > FS_STATINODE=2, > FS_MAXINODE=3, > FS_NRDQUOT=4, > FS_MAXDQUOT=5, > FS_NRFILE=6, > FS_MAXFILE=7, > FS_DENTRY=8, > FS_NRSUPER=9, > FS_MAXSUPER=10, > FS_OVERFLOWUID=11, > FS_OVERFLOWGID=12, > FS_LEASES=13, > FS_DIR_NOTIFY=14, > FS_LEASE_TIME=15, > FS_DQSTATS=16, > FS_XFS=17, > FS_AIO_NR=18, > FS_AIO_MAX_NR=19, > FS_INOTIFY=20, >}; > > >enum { > FS_DQ_LOOKUPS = 1, > FS_DQ_DROPS = 2, > FS_DQ_READS = 3, > FS_DQ_WRITES = 4, > FS_DQ_CACHE_HITS = 5, > FS_DQ_ALLOCATED = 6, > FS_DQ_FREE = 7, > FS_DQ_SYNCS = 8, > FS_DQ_WARNINGS = 9, >}; > > > > >enum { > DEV_CDROM=1, > DEV_HWMON=2, > DEV_PARPORT=3, > DEV_RAID=4, > DEV_MAC_HID=5, > DEV_SCSI=6, > DEV_IPMI=7, >}; > > >enum { > DEV_CDROM_INFO=1, > DEV_CDROM_AUTOCLOSE=2, > DEV_CDROM_AUTOEJECT=3, > DEV_CDROM_DEBUG=4, > DEV_CDROM_LOCK=5, > DEV_CDROM_CHECK_MEDIA=6 >}; > > >enum { > DEV_PARPORT_DEFAULT=-3 >}; > > >enum { > DEV_RAID_SPEED_LIMIT_MIN=1, > DEV_RAID_SPEED_LIMIT_MAX=2 >}; > > >enum { > DEV_PARPORT_DEFAULT_TIMESLICE=1, > DEV_PARPORT_DEFAULT_SPINTIME=2 >}; > > >enum { > DEV_PARPORT_SPINTIME=1, > DEV_PARPORT_BASE_ADDR=2, > DEV_PARPORT_IRQ=3, > DEV_PARPORT_DMA=4, > DEV_PARPORT_MODES=5, > DEV_PARPORT_DEVICES=6, > DEV_PARPORT_AUTOPROBE=16 >}; > > >enum { > DEV_PARPORT_DEVICES_ACTIVE=-3, >}; > > >enum { > DEV_PARPORT_DEVICE_TIMESLICE=1, >}; > > >enum { > DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1, > DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2, > DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3, > DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4, > DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5, > DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6 >}; > > >enum { > DEV_SCSI_LOGGING_LEVEL=1, >}; > > >enum { > DEV_IPMI_POWEROFF_POWERCYCLE=1, >}; > > >enum >{ > ABI_DEFHANDLER_COFF=1, > ABI_DEFHANDLER_ELF=2, > ABI_DEFHANDLER_LCALL7=3, > ABI_DEFHANDLER_LIBCSO=4, > ABI_TRACE=5, > ABI_FAKE_UTSNAME=6, >}; > > > > >extern void sysctl_init(void); > >typedef struct ctl_table ctl_table; > >typedef int ctl_handler (ctl_table *table, int *name, int nlen, > void *oldval, size_t *oldlenp, > void *newval, size_t newlen); > >typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, > void *buffer, size_t *lenp, loff_t *ppos); > >extern int proc_dostring(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec_bset(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec_minmax(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, > struct file *, void *, size_t *, loff_t *); > >extern int do_sysctl (int *name, int nlen, > void *oldval, size_t *oldlenp, > void *newval, size_t newlen); > >extern int do_sysctl_strategy (ctl_table *table, > int *name, int nlen, > void *oldval, size_t *oldlenp, > void *newval, size_t newlen); > >extern ctl_handler sysctl_string; >extern ctl_handler sysctl_intvec; >extern ctl_handler sysctl_jiffies; >extern ctl_handler sysctl_ms_jiffies; ># 1001 "include/linux/sysctl.h" >struct ctl_table >{ > int ctl_name; > const char *procname; > void *data; > int maxlen; > mode_t mode; > ctl_table *child; > proc_handler *proc_handler; > ctl_handler *strategy; > struct proc_dir_entry *de; > void *extra1; > void *extra2; >}; > > > >struct ctl_table_header >{ > ctl_table *ctl_table; > struct list_head ctl_entry; > int used; > struct completion *unregistering; >}; > >struct ctl_table_header * register_sysctl_table(ctl_table * table, > int insert_at_head); >void unregister_sysctl_table(struct ctl_table_header * table); ># 317 "include/linux/net.h" 2 >extern ctl_table net_table[]; >extern int net_msg_cost; >extern int net_msg_burst; ># 26 "include/linux/skbuff.h" 2 ># 1 "include/linux/textsearch.h" 1 > >#define __LINUX_TEXTSEARCH_H ># 13 "include/linux/textsearch.h" >struct ts_config; > > > > >#define TS_AUTOLOAD 1 > > > > > > >struct ts_state >{ > unsigned int offset; > char cb[40]; >}; ># 41 "include/linux/textsearch.h" >struct ts_ops >{ > const char *name; > struct ts_config * (*init)(const void *, unsigned int, gfp_t); > unsigned int (*find)(struct ts_config *, > struct ts_state *); > void (*destroy)(struct ts_config *); > void * (*get_pattern)(struct ts_config *); > unsigned int (*get_pattern_len)(struct ts_config *); > struct module *owner; > struct list_head list; >}; > > > > > > > >struct ts_config >{ > struct ts_ops *ops; ># 76 "include/linux/textsearch.h" > unsigned int (*get_next_block)(unsigned int consumed, > const u8 **dst, > struct ts_config *conf, > struct ts_state *state); ># 89 "include/linux/textsearch.h" > void (*finish)(struct ts_config *conf, > struct ts_state *state); >}; ># 105 "include/linux/textsearch.h" >static inline __attribute__((always_inline)) unsigned int textsearch_next(struct ts_config *conf, > struct ts_state *state) >{ > unsigned int ret = conf->ops->find(conf, state); > > if (conf->finish) > conf->finish(conf, state); > > return ret; >} ># 124 "include/linux/textsearch.h" >static inline __attribute__((always_inline)) unsigned int textsearch_find(struct ts_config *conf, > struct ts_state *state) >{ > state->offset = 0; > return textsearch_next(conf, state); >} > > > > > >static inline __attribute__((always_inline)) void *textsearch_get_pattern(struct ts_config *conf) >{ > return conf->ops->get_pattern(conf); >} > > > > > >static inline __attribute__((always_inline)) unsigned int textsearch_get_pattern_len(struct ts_config *conf) >{ > return conf->ops->get_pattern_len(conf); >} > >extern int textsearch_register(struct ts_ops *); >extern int textsearch_unregister(struct ts_ops *); >extern struct ts_config *textsearch_prepare(const char *, const void *, > unsigned int, gfp_t, int); >extern void textsearch_destroy(struct ts_config *conf); >extern unsigned int textsearch_find_continuous(struct ts_config *, > struct ts_state *, > const void *, unsigned int); > > >#define TS_PRIV_ALIGNTO 8 >#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) > >static inline __attribute__((always_inline)) struct ts_config *alloc_ts_config(size_t payload, > gfp_t gfp_mask) >{ > struct ts_config *conf; > > conf = kmalloc((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload, gfp_mask); > if (conf == ((void *)0)) > return ERR_PTR(-12); > > (__builtin_constant_p(0) ? (__builtin_constant_p(((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload)) ? __constant_c_and_count_memset(((conf)),((0x01010101UL*(unsigned char)(0))),(((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload))) : __constant_c_memset(((conf)),((0x01010101UL*(unsigned char)(0))),(((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload)))) : (__builtin_constant_p(((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload)) ? __memset_generic((((conf))),(((0))),((((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload)))) : __memset_generic(((conf)),((0)),(((((sizeof(*conf)) + 8 -1) & ~(8 -1)) + payload))))); > return conf; >} > >static inline __attribute__((always_inline)) void *ts_config_priv(struct ts_config *conf) >{ > return ((u8 *) conf + (((sizeof(struct ts_config)) + 8 -1) & ~(8 -1))); >} ># 27 "include/linux/skbuff.h" 2 ># 1 "include/net/checksum.h" 1 ># 20 "include/net/checksum.h" >#define _CHECKSUM_H > > > > > ># 1 "include/asm/checksum.h" 1 > >#define __UM_CHECKSUM_H > ># 1 "arch/um/include/sysdep/checksum.h" 1 > > > > > >#define __UM_SYSDEP_CHECKSUM_H > ># 1 "include/linux/in6.h" 1 ># 22 "include/linux/in6.h" >#define _LINUX_IN6_H > > > > > > > >struct in6_addr >{ > union > { > __u8 u6_addr8[16]; > __be16 u6_addr16[8]; > __be32 u6_addr32[4]; > } in6_u; >#define s6_addr in6_u.u6_addr8 >#define s6_addr16 in6_u.u6_addr16 >#define s6_addr32 in6_u.u6_addr32 >}; ># 51 "include/linux/in6.h" >extern const struct in6_addr kernel_in6addr_loopback; >#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } > >struct sockaddr_in6 { > unsigned short int sin6_family; > __be16 sin6_port; > __be32 sin6_flowinfo; > struct in6_addr sin6_addr; > __u32 sin6_scope_id; >}; > >struct ipv6_mreq { > > struct in6_addr ipv6mr_multiaddr; > > > int ipv6mr_ifindex; >}; > >#define ipv6mr_acaddr ipv6mr_multiaddr > >struct in6_flowlabel_req >{ > struct in6_addr flr_dst; > __be32 flr_label; > __u8 flr_action; > __u8 flr_share; > __u16 flr_flags; > __u16 flr_expires; > __u16 flr_linger; > __u32 __flr_pad; > >}; > >#define IPV6_FL_A_GET 0 >#define IPV6_FL_A_PUT 1 >#define IPV6_FL_A_RENEW 2 > >#define IPV6_FL_F_CREATE 1 >#define IPV6_FL_F_EXCL 2 > >#define IPV6_FL_S_NONE 0 >#define IPV6_FL_S_EXCL 1 >#define IPV6_FL_S_PROCESS 2 >#define IPV6_FL_S_USER 3 >#define IPV6_FL_S_ANY 255 ># 107 "include/linux/in6.h" >#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff >#define IPV6_FLOWINFO_PRIORITY 0x0ff00000 > > >#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000 >#define IPV6_PRIORITY_FILLER 0x0100 >#define IPV6_PRIORITY_UNATTENDED 0x0200 >#define IPV6_PRIORITY_RESERVED1 0x0300 >#define IPV6_PRIORITY_BULK 0x0400 >#define IPV6_PRIORITY_RESERVED2 0x0500 >#define IPV6_PRIORITY_INTERACTIVE 0x0600 >#define IPV6_PRIORITY_CONTROL 0x0700 >#define IPV6_PRIORITY_8 0x0800 >#define IPV6_PRIORITY_9 0x0900 >#define IPV6_PRIORITY_10 0x0a00 >#define IPV6_PRIORITY_11 0x0b00 >#define IPV6_PRIORITY_12 0x0c00 >#define IPV6_PRIORITY_13 0x0d00 >#define IPV6_PRIORITY_14 0x0e00 >#define IPV6_PRIORITY_15 0x0f00 > > > > >#define IPPROTO_HOPOPTS 0 >#define IPPROTO_ROUTING 43 >#define IPPROTO_FRAGMENT 44 >#define IPPROTO_ICMPV6 58 >#define IPPROTO_NONE 59 >#define IPPROTO_DSTOPTS 60 >#define IPPROTO_MH 135 > > > > >#define IPV6_TLV_PAD0 0 >#define IPV6_TLV_PADN 1 >#define IPV6_TLV_ROUTERALERT 5 >#define IPV6_TLV_JUMBO 194 >#define IPV6_TLV_HAO 201 > > > > > >#define IPV6_ADDRFORM 1 >#define IPV6_2292PKTINFO 2 >#define IPV6_2292HOPOPTS 3 >#define IPV6_2292DSTOPTS 4 >#define IPV6_2292RTHDR 5 >#define IPV6_2292PKTOPTIONS 6 >#define IPV6_CHECKSUM 7 >#define IPV6_2292HOPLIMIT 8 >#define IPV6_NEXTHOP 9 >#define IPV6_AUTHHDR 10 >#define IPV6_FLOWINFO 11 > >#define IPV6_UNICAST_HOPS 16 >#define IPV6_MULTICAST_IF 17 >#define IPV6_MULTICAST_HOPS 18 >#define IPV6_MULTICAST_LOOP 19 >#define IPV6_ADD_MEMBERSHIP 20 >#define IPV6_DROP_MEMBERSHIP 21 >#define IPV6_ROUTER_ALERT 22 >#define IPV6_MTU_DISCOVER 23 >#define IPV6_MTU 24 >#define IPV6_RECVERR 25 >#define IPV6_V6ONLY 26 >#define IPV6_JOIN_ANYCAST 27 >#define IPV6_LEAVE_ANYCAST 28 > > >#define IPV6_PMTUDISC_DONT 0 >#define IPV6_PMTUDISC_WANT 1 >#define IPV6_PMTUDISC_DO 2 > > >#define IPV6_FLOWLABEL_MGR 32 >#define IPV6_FLOWINFO_SEND 33 > >#define IPV6_IPSEC_POLICY 34 >#define IPV6_XFRM_POLICY 35 ># 209 "include/linux/in6.h" >#define IPV6_RECVPKTINFO 49 >#define IPV6_PKTINFO 50 >#define IPV6_RECVHOPLIMIT 51 >#define IPV6_HOPLIMIT 52 >#define IPV6_RECVHOPOPTS 53 >#define IPV6_HOPOPTS 54 >#define IPV6_RTHDRDSTOPTS 55 >#define IPV6_RECVRTHDR 56 >#define IPV6_RTHDR 57 >#define IPV6_RECVDSTOPTS 58 >#define IPV6_DSTOPTS 59 ># 240 "include/linux/in6.h" >#define IPV6_RECVTCLASS 66 >#define IPV6_TCLASS 67 ># 9 "arch/um/include/sysdep/checksum.h" 2 ># 23 "arch/um/include/sysdep/checksum.h" >__wsum csum_partial(const void *buff, int len, __wsum sum); ># 33 "arch/um/include/sysdep/checksum.h" >static __inline__ __attribute__((always_inline)) >__wsum csum_partial_copy_nocheck(const void *src, void *dst, > int len, __wsum sum) >{ > (__builtin_constant_p(len) ? __constant_memcpy((dst),(src),(len)) : __memcpy((dst),(src),(len))); > return csum_partial(dst, len, sum); >} ># 49 "arch/um/include/sysdep/checksum.h" >static __inline__ __attribute__((always_inline)) >__wsum csum_partial_copy_from_user(const void *src, void *dst, > int len, __wsum sum, int *err_ptr) >{ > if (copy_from_user(dst, src, len)) { > *err_ptr = -14; > return ( __wsum)-1; > } > > return csum_partial(dst, len, sum); >} ># 68 "arch/um/include/sysdep/checksum.h" >static inline __attribute__((always_inline)) __sum16 ip_fast_csum(const void *iph, unsigned int ihl) >{ > unsigned int sum; > > __asm__ __volatile__( > "movl (%1), %0 ;\n" > "subl $4, %2 ;\n" > "jbe 2f ;\n" > "addl 4(%1), %0 ;\n" > "adcl 8(%1), %0 ;\n" > "adcl 12(%1), %0 ;\n" >"1: adcl 16(%1), %0 ;\n" > "lea 4(%1), %1 ;\n" > "decl %2 ;\n" > "jne 1b ;\n" > "adcl $0, %0 ;\n" > "movl %0, %2 ;\n" > "shrl $16, %0 ;\n" > "addw %w2, %w0 ;\n" > "adcl $0, %0 ;\n" > "notl %0 ;\n" >"2: ;\n" > > > > : "=r" (sum), "=r" (iph), "=r" (ihl) > : "1" (iph), "2" (ihl) > : "memory"); > return ( __sum16)sum; >} > > > > > >static inline __attribute__((always_inline)) __sum16 csum_fold(__wsum sum) >{ > __asm__( > "addl %1, %0 ;\n" > "adcl $0xffff, %0 ;\n" > : "=r" (sum) > : "r" (( u32)sum << 16), > "0" (( u32)sum & 0xffff0000) > ); > return ( __sum16)(~( u32)sum >> 16); >} > >static inline __attribute__((always_inline)) __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, > unsigned short len, > unsigned short proto, > __wsum sum) >{ > __asm__( > "addl %1, %0 ;\n" > "adcl %2, %0 ;\n" > "adcl %3, %0 ;\n" > "adcl $0, %0 ;\n" > : "=r" (sum) > : "g" (daddr), "g"(saddr), "g"((len + proto) << 8), "0"(sum)); > return sum; >} > > > > > >static inline __attribute__((always_inline)) __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, > unsigned short len, > unsigned short proto, > __wsum sum) >{ > return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); >} > > > > > > >static inline __attribute__((always_inline)) __sum16 ip_compute_csum(const void *buff, int len) >{ > return csum_fold (csum_partial(buff, len, 0)); >} > >#define _HAVE_ARCH_IPV6_CSUM >static __inline__ __attribute__((always_inline)) __sum16 csum_ipv6_magic(const struct in6_addr *saddr, > const struct in6_addr *daddr, > __u32 len, unsigned short proto, > __wsum sum) >{ > __asm__( > "addl 0(%1), %0 ;\n" > "adcl 4(%1), %0 ;\n" > "adcl 8(%1), %0 ;\n" > "adcl 12(%1), %0 ;\n" > "adcl 0(%2), %0 ;\n" > "adcl 4(%2), %0 ;\n" > "adcl 8(%2), %0 ;\n" > "adcl 12(%2), %0 ;\n" > "adcl %3, %0 ;\n" > "adcl %4, %0 ;\n" > "adcl $0, %0 ;\n" > : "=&r" (sum) > : "r" (saddr), "r" (daddr), > "r"(htonl(len)), "r"(htonl(proto)), "0"(sum)); > > return csum_fold(sum); >} > > > > >#define HAVE_CSUM_COPY_USER >static __inline__ __attribute__((always_inline)) __wsum csum_and_copy_to_user(const void *src, > void *dst, > int len, __wsum sum, int *err_ptr) >{ > if ((((unsigned long) (dst) <= ((unsigned long) (dst) + (len))) && ((((unsigned long) (dst) < (task_size)) && (((unsigned long) (dst) + (len)) < (task_size))) || ((1 == 0) && ((unsigned long) (dst) >= vsyscall_ehdr) && ((unsigned long) (dst) + (len) <= vsyscall_end) && ((unsigned long) (dst) + (len) >= (unsigned long)(dst))) || (((current_thread_info()->addr_limit)).seg == (((mm_segment_t) { (0xFFFFFFFF) })).seg) || (0)))) { > if (copy_to_user(dst, src, len)) { > *err_ptr = -14; > return ( __wsum)-1; > } > > return csum_partial(src, len, sum); > } > > if (len) > *err_ptr = -14; > > return ( __wsum)-1; >} ># 5 "include/asm/checksum.h" 2 ># 27 "include/net/checksum.h" 2 > > >static inline __attribute__((always_inline)) >__wsum csum_and_copy_from_user (const void *src, void *dst, > int len, __wsum sum, int *err_ptr) >{ > if ((((unsigned long) (src) <= ((unsigned long) (src) + (len))) && ((((unsigned long) (src) < (task_size)) && (((unsigned long) (src) + (len)) < (task_size))) || ((0 == 0) && ((unsigned long) (src) >= vsyscall_ehdr) && ((unsigned long) (src) + (len) <= vsyscall_end) && ((unsigned long) (src) + (len) >= (unsigned long)(src))) || (((current_thread_info()->addr_limit)).seg == (((mm_segment_t) { (0xFFFFFFFF) })).seg) || (0)))) > return csum_partial_copy_from_user(src, dst, len, sum, err_ptr); > > if (len) > *err_ptr = -14; > > return sum; >} ># 60 "include/net/checksum.h" >static inline __attribute__((always_inline)) __wsum csum_add(__wsum csum, __wsum addend) >{ > u32 res = ( u32)csum; > res += ( u32)addend; > return ( __wsum)(res + (res < ( u32)addend)); >} > >static inline __attribute__((always_inline)) __wsum csum_sub(__wsum csum, __wsum addend) >{ > return csum_add(csum, ~addend); >} > >static inline __attribute__((always_inline)) __wsum >csum_block_add(__wsum csum, __wsum csum2, int offset) >{ > u32 sum = ( u32)csum2; > if (offset&1) > sum = ((sum&0xFF00FF)<<8)+((sum>>8)&0xFF00FF); > return csum_add(csum, ( __wsum)sum); >} > >static inline __attribute__((always_inline)) __wsum >csum_block_sub(__wsum csum, __wsum csum2, int offset) >{ > u32 sum = ( u32)csum2; > if (offset&1) > sum = ((sum&0xFF00FF)<<8)+((sum>>8)&0xFF00FF); > return csum_sub(csum, ( __wsum)sum); >} > >static inline __attribute__((always_inline)) __wsum csum_unfold(__sum16 n) >{ > return ( __wsum)n; >} > >#define CSUM_MANGLED_0 ((__force __sum16)0xffff) ># 28 "include/linux/skbuff.h" 2 > ># 1 "include/linux/dmaengine.h" 1 ># 22 "include/linux/dmaengine.h" >#define DMAENGINE_H ># 30 "include/linux/skbuff.h" 2 > >#define HAVE_ALLOC_SKB >#define HAVE_ALIGNABLE_SKB > >#define CHECKSUM_NONE 0 >#define CHECKSUM_PARTIAL 1 >#define CHECKSUM_UNNECESSARY 2 >#define CHECKSUM_COMPLETE 3 > >#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & ~(SMP_CACHE_BYTES - 1)) > >#define SKB_MAX_ORDER(X,ORDER) (((PAGE_SIZE << (ORDER)) - (X) - sizeof(struct skb_shared_info)) & ~(SMP_CACHE_BYTES - 1)) > > >#define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) >#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) ># 85 "include/linux/skbuff.h" >struct net_device; ># 108 "include/linux/skbuff.h" >struct sk_buff_head { > > struct sk_buff *next; > struct sk_buff *prev; > > __u32 qlen; > spinlock_t lock; >}; > >struct sk_buff; > > >#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) > >typedef struct skb_frag_struct skb_frag_t; > >struct skb_frag_struct { > struct page *page; > __u16 page_offset; > __u16 size; >}; > > > > >struct skb_shared_info { > atomic_t dataref; > unsigned short nr_frags; > unsigned short gso_size; > > unsigned short gso_segs; > unsigned short gso_type; > __be32 ip6_frag_id; > struct sk_buff *frag_list; > skb_frag_t frags[(65536/(1UL << 12) + 2)]; >}; ># 156 "include/linux/skbuff.h" >#define SKB_DATAREF_SHIFT 16 >#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1) > >struct skb_timeval { > u32 off_sec; > u32 off_usec; >}; > > >enum { > SKB_FCLONE_UNAVAILABLE, > SKB_FCLONE_ORIG, > SKB_FCLONE_CLONE, >}; > >enum { > SKB_GSO_TCPV4 = 1 << 0, > SKB_GSO_UDP = 1 << 1, > > > SKB_GSO_DODGY = 1 << 2, > > > SKB_GSO_TCP_ECN = 1 << 3, > > SKB_GSO_TCPV6 = 1 << 4, >}; ># 230 "include/linux/skbuff.h" >struct sk_buff { > > struct sk_buff *next; > struct sk_buff *prev; > > struct sock *sk; > struct skb_timeval tstamp; > struct net_device *dev; > struct net_device *input_dev; > > union { > struct tcphdr *th; > struct udphdr *uh; > struct icmphdr *icmph; > struct igmphdr *igmph; > struct iphdr *ipiph; > struct ipv6hdr *ipv6h; > unsigned char *raw; > } h; > > union { > struct iphdr *iph; > struct ipv6hdr *ipv6h; > struct arphdr *arph; > unsigned char *raw; > } nh; > > union { > unsigned char *raw; > } mac; > > struct dst_entry *dst; > struct sec_path *sp; > > > > > > > > char cb[48]; > > unsigned int len, > data_len, > mac_len; > union { > __wsum csum; > __u32 csum_offset; > }; > __u32 priority; > __u8 local_df:1, > cloned:1, > ip_summed:2, > nohdr:1, > nfctinfo:3; > __u8 pkt_type:3, > fclone:2, > ipvs_property:1; > __be16 protocol; > > void (*destructor)(struct sk_buff *skb); ># 313 "include/linux/skbuff.h" > __u32 mark; > > > unsigned int truesize; > atomic_t users; > unsigned char *head, > *data, > *tail, > *end; >}; ># 332 "include/linux/skbuff.h" >extern void kfree_skb(struct sk_buff *skb); >extern void __kfree_skb(struct sk_buff *skb); >extern struct sk_buff *__alloc_skb(unsigned int size, > gfp_t priority, int fclone, int node); >static inline __attribute__((always_inline)) struct sk_buff *alloc_skb(unsigned int size, > gfp_t priority) >{ > return __alloc_skb(size, priority, 0, -1); >} > >static inline __attribute__((always_inline)) struct sk_buff *alloc_skb_fclone(unsigned int size, > gfp_t priority) >{ > return __alloc_skb(size, priority, 1, -1); >} > >extern struct sk_buff *alloc_skb_from_cache(struct kmem_cache *cp, > unsigned int size, > gfp_t priority); >extern void kfree_skbmem(struct sk_buff *skb); >extern struct sk_buff *skb_clone(struct sk_buff *skb, > gfp_t priority); >extern struct sk_buff *skb_copy(const struct sk_buff *skb, > gfp_t priority); >extern struct sk_buff *pskb_copy(struct sk_buff *skb, > gfp_t gfp_mask); >extern int pskb_expand_head(struct sk_buff *skb, > int nhead, int ntail, > gfp_t gfp_mask); >extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, > unsigned int headroom); >extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, > int newheadroom, int newtailroom, > gfp_t priority); >extern int skb_pad(struct sk_buff *skb, int pad); >#define dev_kfree_skb(a) kfree_skb(a) >extern void skb_over_panic(struct sk_buff *skb, int len, > void *here); >extern void skb_under_panic(struct sk_buff *skb, int len, > void *here); >extern void skb_truesize_bug(struct sk_buff *skb); > >static inline __attribute__((always_inline)) void skb_truesize_check(struct sk_buff *skb) >{ > if (__builtin_expect(!!((int)skb->truesize < sizeof(struct sk_buff) + skb->len), 0)) > skb_truesize_bug(skb); >} > >extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, > int getfrag(void *from, char *to, int offset, > int len,int odd, struct sk_buff *skb), > void *from, int length); > >struct skb_seq_state >{ > __u32 lower_offset; > __u32 upper_offset; > __u32 frag_idx; > __u32 stepped_offset; > struct sk_buff *root_skb; > struct sk_buff *cur_skb; > __u8 *frag_data; >}; > >extern void skb_prepare_seq_read(struct sk_buff *skb, > unsigned int from, unsigned int to, > struct skb_seq_state *st); >extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data, > struct skb_seq_state *st); >extern void skb_abort_seq_read(struct skb_seq_state *st); > >extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, > unsigned int to, struct ts_config *config, > struct ts_state *state); > > >#define skb_shinfo(SKB) ((struct skb_shared_info *)((SKB)->end)) > > > > > > > >static inline __attribute__((always_inline)) int skb_queue_empty(const struct sk_buff_head *list) >{ > return list->next == (struct sk_buff *)list; >} ># 428 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *skb_get(struct sk_buff *skb) >{ > atomic_inc(&skb->users); > return skb; >} ># 447 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_cloned(const struct sk_buff *skb) >{ > return skb->cloned && > (((&((struct skb_shared_info *)((skb)->end))->dataref)->counter) & ((1 << 16) - 1)) != 1; >} ># 460 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_header_cloned(const struct sk_buff *skb) >{ > int dataref; > > if (!skb->cloned) > return 0; > > dataref = ((&((struct skb_shared_info *)((skb)->end))->dataref)->counter); > dataref = (dataref & ((1 << 16) - 1)) - (dataref >> 16); > return dataref != 1; >} ># 480 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_header_release(struct sk_buff *skb) >{ > do { if (__builtin_expect(!!((skb->nohdr)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/skbuff.h"), "i" (482), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > skb->nohdr = 1; > atomic_add(1 << 16, &((struct skb_shared_info *)((skb)->end))->dataref); >} ># 494 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_shared(const struct sk_buff *skb) >{ > return ((&skb->users)->counter) != 1; >} ># 512 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *skb_share_check(struct sk_buff *skb, > gfp_t pri) >{ > do { if (pri & (( gfp_t)0x10u)) do { __might_sleep("include/linux/skbuff.h", 515); do { } while (0); } while (0); } while (0); > if (skb_shared(skb)) { > struct sk_buff *nskb = skb_clone(skb, pri); > kfree_skb(skb); > skb = nskb; > } > return skb; >} ># 544 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *skb_unshare(struct sk_buff *skb, > gfp_t pri) >{ > do { if (pri & (( gfp_t)0x10u)) do { __might_sleep("include/linux/skbuff.h", 547); do { } while (0); } while (0); } while (0); > if (skb_cloned(skb)) { > struct sk_buff *nskb = skb_copy(skb, pri); > kfree_skb(skb); > skb = nskb; > } > return skb; >} ># 569 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *skb_peek(struct sk_buff_head *list_) >{ > struct sk_buff *list = ((struct sk_buff *)list_)->next; > if (list == (struct sk_buff *)list_) > list = ((void *)0); > return list; >} ># 590 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *skb_peek_tail(struct sk_buff_head *list_) >{ > struct sk_buff *list = ((struct sk_buff *)list_)->prev; > if (list == (struct sk_buff *)list_) > list = ((void *)0); > return list; >} > > > > > > > >static inline __attribute__((always_inline)) __u32 skb_queue_len(const struct sk_buff_head *list_) >{ > return list_->qlen; >} ># 617 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_queue_head_init(struct sk_buff_head *list) >{ > do { static struct lock_class_key __key; __spin_lock_init((&list->lock), "&list->lock", &__key); } while (0); > list->prev = list->next = (struct sk_buff *)list; > list->qlen = 0; >} ># 642 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void __skb_queue_after(struct sk_buff_head *list, > struct sk_buff *prev, > struct sk_buff *newsk) >{ > struct sk_buff *next; > list->qlen++; > > next = prev->next; > newsk->next = next; > newsk->prev = prev; > next->prev = prev->next = newsk; >} ># 665 "include/linux/skbuff.h" >extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk); >static inline __attribute__((always_inline)) void __skb_queue_head(struct sk_buff_head *list, > struct sk_buff *newsk) >{ > __skb_queue_after(list, (struct sk_buff *)list, newsk); >} ># 682 "include/linux/skbuff.h" >extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); >static inline __attribute__((always_inline)) void __skb_queue_tail(struct sk_buff_head *list, > struct sk_buff *newsk) >{ > struct sk_buff *prev, *next; > > list->qlen++; > next = (struct sk_buff *)list; > prev = next->prev; > newsk->next = next; > newsk->prev = prev; > next->prev = prev->next = newsk; >} ># 705 "include/linux/skbuff.h" >extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); >static inline __attribute__((always_inline)) struct sk_buff *__skb_dequeue(struct sk_buff_head *list) >{ > struct sk_buff *next, *prev, *result; > > prev = (struct sk_buff *) list; > next = prev->next; > result = ((void *)0); > if (next != prev) { > result = next; > next = next->next; > list->qlen--; > next->prev = prev; > prev->next = next; > result->next = result->prev = ((void *)0); > } > return result; >} > > > > > >extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list); >static inline __attribute__((always_inline)) void __skb_insert(struct sk_buff *newsk, > struct sk_buff *prev, struct sk_buff *next, > struct sk_buff_head *list) >{ > newsk->next = next; > newsk->prev = prev; > next->prev = prev->next = newsk; > list->qlen++; >} > > > > >extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list); >static inline __attribute__((always_inline)) void __skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) >{ > __skb_insert(newsk, old, old->next, list); >} > > > > > >extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list); >static inline __attribute__((always_inline)) void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) >{ > struct sk_buff *next, *prev; > > list->qlen--; > next = skb->next; > prev = skb->prev; > skb->next = skb->prev = ((void *)0); > next->prev = prev; > prev->next = next; >} ># 776 "include/linux/skbuff.h" >extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list); >static inline __attribute__((always_inline)) struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) >{ > struct sk_buff *skb = skb_peek_tail(list); > if (skb) > __skb_unlink(skb, list); > return skb; >} > > >static inline __attribute__((always_inline)) int skb_is_nonlinear(const struct sk_buff *skb) >{ > return skb->data_len; >} > >static inline __attribute__((always_inline)) unsigned int skb_headlen(const struct sk_buff *skb) >{ > return skb->len - skb->data_len; >} > >static inline __attribute__((always_inline)) int skb_pagelen(const struct sk_buff *skb) >{ > int i, len = 0; > > for (i = (int)((struct skb_shared_info *)((skb)->end))->nr_frags - 1; i >= 0; i--) > len += ((struct skb_shared_info *)((skb)->end))->frags[i].size; > return len + skb_headlen(skb); >} > >static inline __attribute__((always_inline)) void skb_fill_page_desc(struct sk_buff *skb, int i, > struct page *page, int off, int size) >{ > skb_frag_t *frag = &((struct skb_shared_info *)((skb)->end))->frags[i]; > > frag->page = page; > frag->page_offset = off; > frag->size = size; > ((struct skb_shared_info *)((skb)->end))->nr_frags = i + 1; >} > >#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) >#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list) >#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb)) > > > > >static inline __attribute__((always_inline)) unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) >{ > unsigned char *tmp = skb->tail; > do { if (__builtin_expect(!!((skb_is_nonlinear(skb))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/skbuff.h"), "i" (826), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > skb->tail += len; > skb->len += len; > return tmp; >} ># 841 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) unsigned char *skb_put(struct sk_buff *skb, unsigned int len) >{ > unsigned char *tmp = skb->tail; > do { if (__builtin_expect(!!((skb_is_nonlinear(skb))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/skbuff.h"), "i" (844), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > skb->tail += len; > skb->len += len; > if (__builtin_expect(!!(skb->tail>skb->end), 0)) > skb_over_panic(skb, len, ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })); > return tmp; >} > >static inline __attribute__((always_inline)) unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) >{ > skb->data -= len; > skb->len += len; > return skb->data; >} ># 868 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) unsigned char *skb_push(struct sk_buff *skb, unsigned int len) >{ > skb->data -= len; > skb->len += len; > if (__builtin_expect(!!(skb->data<skb->head), 0)) > skb_under_panic(skb, len, ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })); > return skb->data; >} > >static inline __attribute__((always_inline)) unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) >{ > skb->len -= len; > do { if (__builtin_expect(!!((skb->len < skb->data_len)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/skbuff.h"), "i" (880), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > return skb->data += len; >} ># 894 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) unsigned char *skb_pull(struct sk_buff *skb, unsigned int len) >{ > return __builtin_expect(!!(len > skb->len), 0) ? ((void *)0) : __skb_pull(skb, len); >} > >extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); > >static inline __attribute__((always_inline)) unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) >{ > if (len > skb_headlen(skb) && > !__pskb_pull_tail(skb, len-skb_headlen(skb))) > return ((void *)0); > skb->len -= len; > return skb->data += len; >} > >static inline __attribute__((always_inline)) unsigned char *pskb_pull(struct sk_buff *skb, unsigned int len) >{ > return __builtin_expect(!!(len > skb->len), 0) ? ((void *)0) : __pskb_pull(skb, len); >} > >static inline __attribute__((always_inline)) int pskb_may_pull(struct sk_buff *skb, unsigned int len) >{ > if (__builtin_expect(!!(len <= skb_headlen(skb)), 1)) > return 1; > if (__builtin_expect(!!(len > skb->len), 0)) > return 0; > return __pskb_pull_tail(skb, len-skb_headlen(skb)) != ((void *)0); >} > > > > > > > >static inline __attribute__((always_inline)) int skb_headroom(const struct sk_buff *skb) >{ > return skb->data - skb->head; >} > > > > > > > >static inline __attribute__((always_inline)) int skb_tailroom(const struct sk_buff *skb) >{ > return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail; >} ># 954 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_reserve(struct sk_buff *skb, int len) >{ > skb->data += len; > skb->tail += len; >} ># 981 "include/linux/skbuff.h" >#define NET_IP_ALIGN 2 ># 1000 "include/linux/skbuff.h" >#define NET_SKB_PAD 16 > > >extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); > >static inline __attribute__((always_inline)) void __skb_trim(struct sk_buff *skb, unsigned int len) >{ > if (__builtin_expect(!!(skb->data_len), 0)) { > ({ typeof(1) __ret_warn_on = (1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("WARNING at %s:%d %s()\n", "include/linux/skbuff.h", 1008, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); }); > return; > } > skb->len = len; > skb->tail = skb->data + len; >} ># 1024 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_trim(struct sk_buff *skb, unsigned int len) >{ > if (skb->len > len) > __skb_trim(skb, len); >} > > >static inline __attribute__((always_inline)) int __pskb_trim(struct sk_buff *skb, unsigned int len) >{ > if (skb->data_len) > return ___pskb_trim(skb, len); > __skb_trim(skb, len); > return 0; >} > >static inline __attribute__((always_inline)) int pskb_trim(struct sk_buff *skb, unsigned int len) >{ > return (len < skb->len) ? __pskb_trim(skb, len) : 0; >} ># 1053 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void pskb_trim_unique(struct sk_buff *skb, unsigned int len) >{ > int err = pskb_trim(skb, len); > do { if (__builtin_expect(!!((err)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/skbuff.h"), "i" (1056), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); >} ># 1067 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_orphan(struct sk_buff *skb) >{ > if (skb->destructor) > skb->destructor(skb); > skb->destructor = ((void *)0); > skb->sk = ((void *)0); >} ># 1083 "include/linux/skbuff.h" >extern void skb_queue_purge(struct sk_buff_head *list); >static inline __attribute__((always_inline)) void __skb_queue_purge(struct sk_buff_head *list) >{ > struct sk_buff *skb; > while ((skb = __skb_dequeue(list)) != ((void *)0)) > kfree_skb(skb); >} ># 1103 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *__dev_alloc_skb(unsigned int length, > gfp_t gfp_mask) >{ > struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); > if (__builtin_expect(!!(skb), 1)) > skb_reserve(skb, 16); > return skb; >} ># 1124 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *dev_alloc_skb(unsigned int length) >{ > return __dev_alloc_skb(length, ((( gfp_t)0x20u))); >} > >extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, > unsigned int length, gfp_t gfp_mask); ># 1145 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) struct sk_buff *netdev_alloc_skb(struct net_device *dev, > unsigned int length) >{ > return __netdev_alloc_skb(dev, length, ((( gfp_t)0x20u))); >} ># 1163 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_cow(struct sk_buff *skb, unsigned int headroom) >{ > int delta = (headroom > 16 ? headroom : 16) - > skb_headroom(skb); > > if (delta < 0) > delta = 0; > > if (delta || skb_cloned(skb)) > return pskb_expand_head(skb, (delta + (16 -1)) & > ~(16 -1), 0, ((( gfp_t)0x20u))); > return 0; >} ># 1188 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_padto(struct sk_buff *skb, unsigned int len) >{ > unsigned int size = skb->len; > if (__builtin_expect(!!(size >= len), 1)) > return 0; > return skb_pad(skb, len-size); >} > >static inline __attribute__((always_inline)) int skb_add_data(struct sk_buff *skb, > char *from, int copy) >{ > const int off = skb->len; > > if (skb->ip_summed == 0) { > int err = 0; > __wsum csum = csum_and_copy_from_user(from, skb_put(skb, copy), > copy, 0, &err); > if (!err) { > skb->csum = csum_block_add(skb->csum, csum, off); > return 0; > } > } else if (!copy_from_user(skb_put(skb, copy), from, copy)) > return 0; > > __skb_trim(skb, off); > return -14; >} > >static inline __attribute__((always_inline)) int skb_can_coalesce(struct sk_buff *skb, int i, > struct page *page, int off) >{ > if (i) { > struct skb_frag_struct *frag = &((struct skb_shared_info *)((skb)->end))->frags[i - 1]; > > return page == frag->page && > off == frag->page_offset + frag->size; > } > return 0; >} > >static inline __attribute__((always_inline)) int __skb_linearize(struct sk_buff *skb) >{ > return __pskb_pull_tail(skb, skb->data_len) ? 0 : -12; >} ># 1240 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_linearize(struct sk_buff *skb) >{ > return skb_is_nonlinear(skb) ? __skb_linearize(skb) : 0; >} ># 1252 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int skb_linearize_cow(struct sk_buff *skb) >{ > return skb_is_nonlinear(skb) || skb_cloned(skb) ? > __skb_linearize(skb) : 0; >} ># 1269 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_postpull_rcsum(struct sk_buff *skb, > const void *start, unsigned int len) >{ > if (skb->ip_summed == 3) > skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); >} > >unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); ># 1287 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) >{ > if (__builtin_expect(!!(len >= skb->len), 1)) > return 0; > if (skb->ip_summed == 3) > skb->ip_summed = 0; > return __pskb_trim(skb, len); >} > >#define skb_queue_walk(queue,skb) for (skb = (queue)->next; prefetch(skb->next), (skb != (struct sk_buff *)(queue)); skb = skb->next) > > > > >#define skb_queue_reverse_walk(queue,skb) for (skb = (queue)->prev; prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); skb = skb->prev) > > > > > >extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, > int noblock, int *err); >extern unsigned int datagram_poll(struct file *file, struct socket *sock, > struct poll_table_struct *wait); >extern int skb_copy_datagram_iovec(const struct sk_buff *from, > int offset, struct iovec *to, > int size); >extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, > int hlen, > struct iovec *iov); >extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); >extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb, > unsigned int flags); >extern __wsum skb_checksum(const struct sk_buff *skb, int offset, > int len, __wsum csum); >extern int skb_copy_bits(const struct sk_buff *skb, int offset, > void *to, int len); >extern int skb_store_bits(const struct sk_buff *skb, int offset, > void *from, int len); >extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, > int offset, u8 *to, int len, > __wsum csum); >extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); >extern void skb_split(struct sk_buff *skb, > struct sk_buff *skb1, const u32 len); > >extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); > >static inline __attribute__((always_inline)) void *skb_header_pointer(const struct sk_buff *skb, int offset, > int len, void *buffer) >{ > int hlen = skb_headlen(skb); > > if (hlen - offset >= len) > return skb->data + offset; > > if (skb_copy_bits(skb, offset, buffer, len) < 0) > return ((void *)0); > > return buffer; >} > >extern void skb_init(void); >extern void skb_add_mtu(int mtu); ># 1361 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp) >{ > stamp->tv_sec = skb->tstamp.off_sec; > stamp->tv_usec = skb->tstamp.off_usec; >} ># 1376 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp) >{ > skb->tstamp.off_sec = stamp->tv_sec; > skb->tstamp.off_usec = stamp->tv_usec; >} > >extern void __net_timestamp(struct sk_buff *skb); > >extern __sum16 __skb_checksum_complete(struct sk_buff *skb); ># 1402 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) unsigned int skb_checksum_complete(struct sk_buff *skb) >{ > return skb->ip_summed != 2 && > __skb_checksum_complete(skb); >} ># 1458 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void nf_reset(struct sk_buff *skb) {} ># 1472 "include/linux/skbuff.h" >static inline __attribute__((always_inline)) void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) >{ } > >static inline __attribute__((always_inline)) void skb_init_secmark(struct sk_buff *skb) >{ } > > >static inline __attribute__((always_inline)) int skb_is_gso(const struct sk_buff *skb) >{ > return ((struct skb_shared_info *)((skb)->end))->gso_size; >} ># 112 "include/linux/if_ether.h" 2 > >static inline __attribute__((always_inline)) struct ethhdr *eth_hdr(const struct sk_buff *skb) >{ > return (struct ethhdr *)skb->mac.raw; >} > > >extern struct ctl_table ether_table[]; ># 30 "include/linux/netdevice.h" 2 ># 1 "include/linux/if_packet.h" 1 > >#define __LINUX_IF_PACKET_H > > > >struct sockaddr_pkt >{ > unsigned short spkt_family; > unsigned char spkt_device[14]; > __be16 spkt_protocol; >}; > >struct sockaddr_ll >{ > unsigned short sll_family; > __be16 sll_protocol; > int sll_ifindex; > unsigned short sll_hatype; > unsigned char sll_pkttype; > unsigned char sll_halen; > unsigned char sll_addr[8]; >}; > > > >#define PACKET_HOST 0 >#define PACKET_BROADCAST 1 >#define PACKET_MULTICAST 2 >#define PACKET_OTHERHOST 3 >#define PACKET_OUTGOING 4 > >#define PACKET_LOOPBACK 5 >#define PACKET_FASTROUTE 6 > > > >#define PACKET_ADD_MEMBERSHIP 1 >#define PACKET_DROP_MEMBERSHIP 2 >#define PACKET_RECV_OUTPUT 3 > >#define PACKET_RX_RING 5 >#define PACKET_STATISTICS 6 >#define PACKET_COPY_THRESH 7 > >struct tpacket_stats >{ > unsigned int tp_packets; > unsigned int tp_drops; >}; > >struct tpacket_hdr >{ > unsigned long tp_status; >#define TP_STATUS_KERNEL 0 >#define TP_STATUS_USER 1 >#define TP_STATUS_COPY 2 >#define TP_STATUS_LOSING 4 >#define TP_STATUS_CSUMNOTREADY 8 > unsigned int tp_len; > unsigned int tp_snaplen; > unsigned short tp_mac; > unsigned short tp_net; > unsigned int tp_sec; > unsigned int tp_usec; >}; > >#define TPACKET_ALIGNMENT 16 >#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) >#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) ># 84 "include/linux/if_packet.h" >struct tpacket_req >{ > unsigned int tp_block_size; > unsigned int tp_block_nr; > unsigned int tp_frame_size; > unsigned int tp_frame_nr; >}; > >struct packet_mreq >{ > int mr_ifindex; > unsigned short mr_type; > unsigned short mr_alen; > unsigned char mr_address[8]; >}; > >#define PACKET_MR_MULTICAST 0 >#define PACKET_MR_PROMISC 1 >#define PACKET_MR_ALLMULTI 2 ># 31 "include/linux/netdevice.h" 2 > > > > > > > ># 1 "include/linux/device.h" 1 ># 12 "include/linux/device.h" >#define _DEVICE_H_ > ># 1 "include/linux/ioport.h" 1 ># 9 "include/linux/ioport.h" >#define _LINUX_IOPORT_H > > > > > > > >struct resource { > resource_size_t start; > resource_size_t end; > const char *name; > unsigned long flags; > struct resource *parent, *sibling, *child; >}; > >struct resource_list { > struct resource_list *next; > struct resource *res; > struct pci_dev *dev; >}; > > > > >#define IORESOURCE_BITS 0x000000ff > >#define IORESOURCE_IO 0x00000100 >#define IORESOURCE_MEM 0x00000200 >#define IORESOURCE_IRQ 0x00000400 >#define IORESOURCE_DMA 0x00000800 > >#define IORESOURCE_PREFETCH 0x00001000 >#define IORESOURCE_READONLY 0x00002000 >#define IORESOURCE_CACHEABLE 0x00004000 >#define IORESOURCE_RANGELENGTH 0x00008000 >#define IORESOURCE_SHADOWABLE 0x00010000 >#define IORESOURCE_BUS_HAS_VGA 0x00080000 > >#define IORESOURCE_DISABLED 0x10000000 >#define IORESOURCE_UNSET 0x20000000 >#define IORESOURCE_AUTO 0x40000000 >#define IORESOURCE_BUSY 0x80000000 > > >#define IORESOURCE_IRQ_HIGHEDGE (1<<0) >#define IORESOURCE_IRQ_LOWEDGE (1<<1) >#define IORESOURCE_IRQ_HIGHLEVEL (1<<2) >#define IORESOURCE_IRQ_LOWLEVEL (1<<3) >#define IORESOURCE_IRQ_SHAREABLE (1<<4) > > >#define IORESOURCE_DMA_TYPE_MASK (3<<0) >#define IORESOURCE_DMA_8BIT (0<<0) >#define IORESOURCE_DMA_8AND16BIT (1<<0) >#define IORESOURCE_DMA_16BIT (2<<0) > >#define IORESOURCE_DMA_MASTER (1<<2) >#define IORESOURCE_DMA_BYTE (1<<3) >#define IORESOURCE_DMA_WORD (1<<4) > >#define IORESOURCE_DMA_SPEED_MASK (3<<6) >#define IORESOURCE_DMA_COMPATIBLE (0<<6) >#define IORESOURCE_DMA_TYPEA (1<<6) >#define IORESOURCE_DMA_TYPEB (2<<6) >#define IORESOURCE_DMA_TYPEF (3<<6) > > >#define IORESOURCE_MEM_WRITEABLE (1<<0) >#define IORESOURCE_MEM_CACHEABLE (1<<1) >#define IORESOURCE_MEM_RANGELENGTH (1<<2) >#define IORESOURCE_MEM_TYPE_MASK (3<<3) >#define IORESOURCE_MEM_8BIT (0<<3) >#define IORESOURCE_MEM_16BIT (1<<3) >#define IORESOURCE_MEM_8AND16BIT (2<<3) >#define IORESOURCE_MEM_32BIT (3<<3) >#define IORESOURCE_MEM_SHADOWABLE (1<<5) >#define IORESOURCE_MEM_EXPANSIONROM (1<<6) > > >#define IORESOURCE_ROM_ENABLE (1<<0) >#define IORESOURCE_ROM_SHADOW (1<<1) >#define IORESOURCE_ROM_COPY (1<<2) >#define IORESOURCE_ROM_BIOS_COPY (1<<3) > > >extern struct resource ioport_resource; >extern struct resource iomem_resource; > >extern int request_resource(struct resource *root, struct resource *new); >extern struct resource * ____request_resource(struct resource *root, struct resource *new); >extern int release_resource(struct resource *new); >extern int insert_resource(struct resource *parent, struct resource *new); >extern int allocate_resource(struct resource *root, struct resource *new, > resource_size_t size, resource_size_t min, > resource_size_t max, resource_size_t align, > void (*alignf)(void *, struct resource *, > resource_size_t, resource_size_t), > void *alignf_data); >int adjust_resource(struct resource *res, resource_size_t start, > resource_size_t size); > > >extern int find_next_system_ram(struct resource *res); > > >#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) >#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) >#define rename_region(region,newname) do { (region)->name = (newname); } while (0) > >extern struct resource * __request_region(struct resource *, > resource_size_t start, > resource_size_t n, const char *name); > > >#define release_region(start,n) __release_region(&ioport_resource, (start), (n)) >#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) >#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) > >extern int __check_region(struct resource *, resource_size_t, resource_size_t); >extern void __release_region(struct resource *, resource_size_t, > resource_size_t); > >static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s, > resource_size_t n) >{ > return __check_region(&ioport_resource, s, n); >} ># 15 "include/linux/device.h" 2 > ># 1 "include/linux/klist.h" 1 ># 13 "include/linux/klist.h" >#define _LINUX_KLIST_H > > > > > > >struct klist_node; >struct klist { > spinlock_t k_lock; > struct list_head k_list; > void (*get)(struct klist_node *); > void (*put)(struct klist_node *); >}; > > >extern void klist_init(struct klist * k, void (*get)(struct klist_node *), > void (*put)(struct klist_node *)); > >struct klist_node { > struct klist * n_klist; > struct list_head n_node; > struct kref n_ref; > struct completion n_removed; >}; > >extern void klist_add_tail(struct klist_node * n, struct klist * k); >extern void klist_add_head(struct klist_node * n, struct klist * k); > >extern void klist_del(struct klist_node * n); >extern void klist_remove(struct klist_node * n); > >extern int klist_node_attached(struct klist_node * n); > > >struct klist_iter { > struct klist * i_klist; > struct list_head * i_head; > struct klist_node * i_cur; >}; > > >extern void klist_iter_init(struct klist * k, struct klist_iter * i); >extern void klist_iter_init_node(struct klist * k, struct klist_iter * i, > struct klist_node * n); >extern void klist_iter_exit(struct klist_iter * i); >extern struct klist_node * klist_next(struct klist_iter * i); ># 17 "include/linux/device.h" 2 > > > > > > > ># 1 "include/asm/device.h" 1 > > > > > ># 1 "include/asm-generic/device.h" 1 > > > > > > >#define _ASM_GENERIC_DEVICE_H > >struct dev_archdata { >}; ># 7 "include/asm/device.h" 2 ># 25 "include/linux/device.h" 2 > >#define DEVICE_NAME_SIZE 50 >#define DEVICE_NAME_HALF __stringify(20) >#define DEVICE_ID_SIZE 32 >#define BUS_ID_SIZE KOBJ_NAME_LEN > > >struct device; >struct device_driver; >struct class; >struct class_device; > >struct bus_type { > const char * name; > > struct subsystem subsys; > struct kset drivers; > struct kset devices; > struct klist klist_devices; > struct klist klist_drivers; > > struct blocking_notifier_head bus_notifier; > > struct bus_attribute * bus_attrs; > struct device_attribute * dev_attrs; > struct driver_attribute * drv_attrs; > > int (*match)(struct device * dev, struct device_driver * drv); > int (*uevent)(struct device *dev, char **envp, > int num_envp, char *buffer, int buffer_size); > int (*probe)(struct device * dev); > int (*remove)(struct device * dev); > void (*shutdown)(struct device * dev); > > int (*suspend)(struct device * dev, pm_message_t state); > int (*suspend_late)(struct device * dev, pm_message_t state); > int (*resume_early)(struct device * dev); > int (*resume)(struct device * dev); >}; > >extern int __attribute__((warn_unused_result)) bus_register(struct bus_type * bus); >extern void bus_unregister(struct bus_type * bus); > >extern int __attribute__((warn_unused_result)) bus_rescan_devices(struct bus_type * bus); > > > >int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, > int (*fn)(struct device *, void *)); >struct device * bus_find_device(struct bus_type *bus, struct device *start, > void *data, int (*match)(struct device *, void *)); > >int __attribute__((warn_unused_result)) bus_for_each_drv(struct bus_type *bus, > struct device_driver *start, void *data, > int (*fn)(struct device_driver *, void *)); > > > > > > > >struct notifier_block; > >extern int bus_register_notifier(struct bus_type *bus, > struct notifier_block *nb); >extern int bus_unregister_notifier(struct bus_type *bus, > struct notifier_block *nb); > > > > > >#define BUS_NOTIFY_ADD_DEVICE 0x00000001 >#define BUS_NOTIFY_DEL_DEVICE 0x00000002 >#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 >#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 > > > > >struct bus_attribute { > struct attribute attr; > ssize_t (*show)(struct bus_type *, char * buf); > ssize_t (*store)(struct bus_type *, const char * buf, size_t count); >}; > >#define BUS_ATTR(_name,_mode,_show,_store) struct bus_attribute bus_attr_ ##_name = __ATTR(_name,_mode,_show,_store) > > >extern int __attribute__((warn_unused_result)) bus_create_file(struct bus_type *, > struct bus_attribute *); >extern void bus_remove_file(struct bus_type *, struct bus_attribute *); > >struct device_driver { > const char * name; > struct bus_type * bus; > > struct completion unloaded; > struct kobject kobj; > struct klist klist_devices; > struct klist_node knode_bus; > > struct module * owner; > > int (*probe) (struct device * dev); > int (*remove) (struct device * dev); > void (*shutdown) (struct device * dev); > int (*suspend) (struct device * dev, pm_message_t state); > int (*resume) (struct device * dev); > > unsigned int multithread_probe:1; >}; > > >extern int __attribute__((warn_unused_result)) driver_register(struct device_driver * drv); >extern void driver_unregister(struct device_driver * drv); > >extern struct device_driver * get_driver(struct device_driver * drv); >extern void put_driver(struct device_driver * drv); >extern struct device_driver *driver_find(const char *name, struct bus_type *bus); >extern int driver_probe_done(void); > > > >struct driver_attribute { > struct attribute attr; > ssize_t (*show)(struct device_driver *, char * buf); > ssize_t (*store)(struct device_driver *, const char * buf, size_t count); >}; > >#define DRIVER_ATTR(_name,_mode,_show,_store) struct driver_attribute driver_attr_ ##_name = __ATTR(_name,_mode,_show,_store) > > >extern int __attribute__((warn_unused_result)) driver_create_file(struct device_driver *, > struct driver_attribute *); >extern void driver_remove_file(struct device_driver *, struct driver_attribute *); > >extern int __attribute__((warn_unused_result)) driver_for_each_device(struct device_driver * drv, > struct device *start, void *data, > int (*fn)(struct device *, void *)); >struct device * driver_find_device(struct device_driver *drv, > struct device *start, void *data, > int (*match)(struct device *, void *)); > > > > >struct class { > const char * name; > struct module * owner; > > struct subsystem subsys; > struct list_head children; > struct list_head devices; > struct list_head interfaces; > struct semaphore sem; > > struct kobject *virtual_dir; > > struct class_attribute * class_attrs; > struct class_device_attribute * class_dev_attrs; > struct device_attribute * dev_attrs; > > int (*uevent)(struct class_device *dev, char **envp, > int num_envp, char *buffer, int buffer_size); > int (*dev_uevent)(struct device *dev, char **envp, int num_envp, > char *buffer, int buffer_size); > > void (*release)(struct class_device *dev); > void (*class_release)(struct class *class); > void (*dev_release)(struct device *dev); > > int (*suspend)(struct device *, pm_message_t state); > int (*resume)(struct device *); >}; > >extern int __attribute__((warn_unused_result)) class_register(struct class *); >extern void class_unregister(struct class *); > > >struct class_attribute { > struct attribute attr; > ssize_t (*show)(struct class *, char * buf); > ssize_t (*store)(struct class *, const char * buf, size_t count); >}; > >#define CLASS_ATTR(_name,_mode,_show,_store) struct class_attribute class_attr_ ##_name = __ATTR(_name,_mode,_show,_store) > > >extern int __attribute__((warn_unused_result)) class_create_file(struct class *, > const struct class_attribute *); >extern void class_remove_file(struct class *, const struct class_attribute *); > >struct class_device_attribute { > struct attribute attr; > ssize_t (*show)(struct class_device *, char * buf); > ssize_t (*store)(struct class_device *, const char * buf, size_t count); >}; > >#define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) struct class_device_attribute class_device_attr_ ##_name = __ATTR(_name,_mode,_show,_store) > > > >extern int __attribute__((warn_unused_result)) class_device_create_file(struct class_device *, > const struct class_device_attribute *); ># 257 "include/linux/device.h" >struct class_device { > struct list_head node; > > struct kobject kobj; > struct class * class; > dev_t devt; > struct class_device_attribute *devt_attr; > struct class_device_attribute uevent_attr; > struct device * dev; > void * class_data; > struct class_device *parent; > struct attribute_group ** groups; > > void (*release)(struct class_device *dev); > int (*uevent)(struct class_device *dev, char **envp, > int num_envp, char *buffer, int buffer_size); > char class_id[20]; >}; > >static inline __attribute__((always_inline)) void * >class_get_devdata (struct class_device *dev) >{ > return dev->class_data; >} > >static inline __attribute__((always_inline)) void >class_set_devdata (struct class_device *dev, void *data) >{ > dev->class_data = data; >} > > >extern int __attribute__((warn_unused_result)) class_device_register(struct class_device *); >extern void class_device_unregister(struct class_device *); >extern void class_device_initialize(struct class_device *); >extern int __attribute__((warn_unused_result)) class_device_add(struct class_device *); >extern void class_device_del(struct class_device *); > >extern int class_device_rename(struct class_device *, char *); > >extern struct class_device * class_device_get(struct class_device *); >extern void class_device_put(struct class_device *); > >extern void class_device_remove_file(struct class_device *, > const struct class_device_attribute *); >extern int __attribute__((warn_unused_result)) class_device_create_bin_file(struct class_device *, > struct bin_attribute *); >extern void class_device_remove_bin_file(struct class_device *, > struct bin_attribute *); > >struct class_interface { > struct list_head node; > struct class *class; > > int (*add) (struct class_device *, struct class_interface *); > void (*remove) (struct class_device *, struct class_interface *); > int (*add_dev) (struct device *, struct class_interface *); > void (*remove_dev) (struct device *, struct class_interface *); >}; > >extern int __attribute__((warn_unused_result)) class_interface_register(struct class_interface *); >extern void class_interface_unregister(struct class_interface *); > >extern struct class *class_create(struct module *owner, const char *name); >extern void class_destroy(struct class *cls); >extern struct class_device *class_device_create(struct class *cls, > struct class_device *parent, > dev_t devt, > struct device *device, > const char *fmt, ...) > __attribute__((format(printf,5,6))); >extern void class_device_destroy(struct class *cls, dev_t devt); > > >struct device_attribute { > struct attribute attr; > ssize_t (*show)(struct device *dev, struct device_attribute *attr, > char *buf); > ssize_t (*store)(struct device *dev, struct device_attribute *attr, > const char *buf, size_t count); >}; > >#define DEVICE_ATTR(_name,_mode,_show,_store) struct device_attribute dev_attr_ ##_name = __ATTR(_name,_mode,_show,_store) > > >extern int __attribute__((warn_unused_result)) device_create_file(struct device *device, > struct device_attribute * entry); >extern void device_remove_file(struct device * dev, struct device_attribute * attr); >extern int __attribute__((warn_unused_result)) device_create_bin_file(struct device *dev, > struct bin_attribute *attr); >extern void device_remove_bin_file(struct device *dev, > struct bin_attribute *attr); >struct device { > struct klist klist_children; > struct klist_node knode_parent; > struct klist_node knode_driver; > struct klist_node knode_bus; > struct device * parent; > > struct kobject kobj; > char bus_id[20]; > unsigned is_registered:1; > struct device_attribute uevent_attr; > struct device_attribute *devt_attr; > > struct semaphore sem; > > > > struct bus_type * bus; > struct device_driver *driver; > > void *driver_data; > void *platform_data; > > struct dev_pm_info power; > > > > > u64 *dma_mask; > u64 coherent_dma_mask; > > > > > > struct list_head dma_pools; > > struct dma_coherent_mem *dma_mem; > > > struct dev_archdata archdata; > > > struct list_head node; > struct class *class; > dev_t devt; > struct attribute_group **groups; > > void (*release)(struct device * dev); >}; ># 410 "include/linux/device.h" >static inline __attribute__((always_inline)) int dev_to_node(struct device *dev) >{ > return -1; >} >static inline __attribute__((always_inline)) void set_dev_node(struct device *dev, int node) >{ >} > > >static inline __attribute__((always_inline)) void * >dev_get_drvdata (struct device *dev) >{ > return dev->driver_data; >} > >static inline __attribute__((always_inline)) void >dev_set_drvdata (struct device *dev, void *data) >{ > dev->driver_data = data; >} > >static inline __attribute__((always_inline)) int device_is_registered(struct device *dev) >{ > return dev->is_registered; >} > > > > >extern int __attribute__((warn_unused_result)) device_register(struct device * dev); >extern void device_unregister(struct device * dev); >extern void device_initialize(struct device * dev); >extern int __attribute__((warn_unused_result)) device_add(struct device * dev); >extern void device_del(struct device * dev); >extern int device_for_each_child(struct device *, void *, > int (*fn)(struct device *, void *)); >extern struct device *device_find_child(struct device *, void *data, > int (*match)(struct device *, void *)); >extern int device_rename(struct device *dev, char *new_name); >extern int device_move(struct device *dev, struct device *new_parent); > > > > > >extern int __attribute__((warn_unused_result)) device_bind_driver(struct device *dev); >extern void device_release_driver(struct device * dev); >extern int __attribute__((warn_unused_result)) device_attach(struct device * dev); >extern int __attribute__((warn_unused_result)) driver_attach(struct device_driver *drv); >extern int __attribute__((warn_unused_result)) device_reprobe(struct device *dev); > > > > >extern struct device *device_create(struct class *cls, struct device *parent, > dev_t devt, const char *fmt, ...) > __attribute__((format(printf,4,5))); >extern void device_destroy(struct class *cls, dev_t devt); > > > > > > > >extern int (*platform_notify)(struct device * dev); > >extern int (*platform_notify_remove)(struct device * dev); > > > > > > >extern struct device * get_device(struct device * dev); >extern void put_device(struct device * dev); > > > >extern void device_shutdown(void); > > > >extern int __attribute__((warn_unused_result)) firmware_register(struct subsystem *); >extern void firmware_unregister(struct subsystem *); > > >extern const char *dev_driver_string(struct device *dev); >#define dev_printk(level,dev,format,arg...) printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg) > > > > > > >#define dev_dbg(dev,format,arg...) do { (void)(dev); } while (0) > > >#define dev_err(dev,format,arg...) dev_printk(KERN_ERR , dev , format , ## arg) > >#define dev_info(dev,format,arg...) dev_printk(KERN_INFO , dev , format , ## arg) > >#define dev_warn(dev,format,arg...) dev_printk(KERN_WARNING , dev , format , ## arg) > >#define dev_notice(dev,format,arg...) dev_printk(KERN_NOTICE , dev , format , ## arg) > > > >#define MODULE_ALIAS_CHARDEV(major,minor) MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) > >#define MODULE_ALIAS_CHARDEV_MAJOR(major) MODULE_ALIAS("char-major-" __stringify(major) "-*") ># 39 "include/linux/netdevice.h" 2 > > > >struct vlan_group; >struct ethtool_ops; >struct netpoll_info; > >#define SET_ETHTOOL_OPS(netdev,ops) ( (netdev)->ethtool_ops = (ops) ) > > >#define HAVE_ALLOC_NETDEV > >#define HAVE_FREE_NETDEV >#define HAVE_NETDEV_PRIV > >#define NET_XMIT_SUCCESS 0 >#define NET_XMIT_DROP 1 >#define NET_XMIT_CN 2 >#define NET_XMIT_POLICED 3 >#define NET_XMIT_BYPASS 4 > > > > >#define NET_RX_SUCCESS 0 >#define NET_RX_DROP 1 >#define NET_RX_CN_LOW 2 >#define NET_RX_CN_MOD 3 >#define NET_RX_CN_HIGH 4 >#define NET_RX_BAD 5 > > > > >#define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) >#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) > > > >#define MAX_ADDR_LEN 32 > > >#define NETDEV_TX_OK 0 >#define NETDEV_TX_BUSY 1 >#define NETDEV_TX_LOCKED -1 > > > > > > > >#define LL_MAX_HEADER 32 ># 106 "include/linux/netdevice.h" >#define MAX_HEADER (LL_MAX_HEADER + 48) > > > > > > > >struct net_device_stats >{ > unsigned long rx_packets; > unsigned long tx_packets; > unsigned long rx_bytes; > unsigned long tx_bytes; > unsigned long rx_errors; > unsigned long tx_errors; > unsigned long rx_dropped; > unsigned long tx_dropped; > unsigned long multicast; > unsigned long collisions; > > > unsigned long rx_length_errors; > unsigned long rx_over_errors; > unsigned long rx_crc_errors; > unsigned long rx_frame_errors; > unsigned long rx_fifo_errors; > unsigned long rx_missed_errors; > > > unsigned long tx_aborted_errors; > unsigned long tx_carrier_errors; > unsigned long tx_fifo_errors; > unsigned long tx_heartbeat_errors; > unsigned long tx_window_errors; > > > unsigned long rx_compressed; > unsigned long tx_compressed; >}; > > > >enum { > IF_PORT_UNKNOWN = 0, > IF_PORT_10BASE2, > IF_PORT_10BASET, > IF_PORT_AUI, > IF_PORT_100BASET, > IF_PORT_100BASETX, > IF_PORT_100BASEFX >}; > > > > > > >struct neighbour; >struct neigh_parms; >struct sk_buff; > >struct netif_rx_stats >{ > unsigned total; > unsigned dropped; > unsigned time_squeeze; > unsigned cpu_collision; >}; > >extern __typeof__(struct netif_rx_stats) per_cpu__netdev_rx_stat; > > > > > > >struct dev_mc_list >{ > struct dev_mc_list *next; > __u8 dmi_addr[32]; > unsigned char dmi_addrlen; > int dmi_users; > int dmi_gusers; >}; > >struct hh_cache >{ > struct hh_cache *hh_next; > atomic_t hh_refcnt; > > > > > > > __be16 hh_type ; > > > > > u16 hh_len; > int (*hh_output)(struct sk_buff *skb); > seqlock_t hh_lock; > > >#define HH_DATA_MOD 16 >#define HH_DATA_OFF(__len) (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1)) > >#define HH_DATA_ALIGN(__len) (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) > > unsigned long hh_data[(((32)+(16 -1))&~(16 - 1)) / sizeof(long)]; >}; ># 228 "include/linux/netdevice.h" >#define LL_RESERVED_SPACE(dev) (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) > >#define LL_RESERVED_SPACE_EXTRA(dev,extra) ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD) > > > > > > > >enum netdev_state_t >{ > __LINK_STATE_XOFF=0, > __LINK_STATE_START, > __LINK_STATE_PRESENT, > __LINK_STATE_SCHED, > __LINK_STATE_NOCARRIER, > __LINK_STATE_RX_SCHED, > __LINK_STATE_LINKWATCH_PENDING, > __LINK_STATE_DORMANT, > __LINK_STATE_QDISC_RUNNING, >}; > > > > > > >struct netdev_boot_setup { > char name[16]; > struct ifmap map; >}; >#define NETDEV_BOOT_SETUP_MAX 8 > >extern int __attribute__ ((__section__ (".init.text"))) netdev_boot_setup(char *str); ># 274 "include/linux/netdevice.h" >struct net_device >{ > > > > > > > char name[16]; > > struct hlist_node name_hlist; > > > > > > unsigned long mem_end; > unsigned long mem_start; > unsigned long base_addr; > unsigned int irq; > > > > > > > unsigned char if_port; > unsigned char dma; > > unsigned long state; > > struct net_device *next; > > > int (*init)(struct net_device *dev); > > > > > unsigned long features; >#define NETIF_F_SG 1 >#define NETIF_F_IP_CSUM 2 >#define NETIF_F_NO_CSUM 4 >#define NETIF_F_HW_CSUM 8 >#define NETIF_F_HIGHDMA 32 >#define NETIF_F_FRAGLIST 64 >#define NETIF_F_HW_VLAN_TX 128 >#define NETIF_F_HW_VLAN_RX 256 >#define NETIF_F_HW_VLAN_FILTER 512 >#define NETIF_F_VLAN_CHALLENGED 1024 >#define NETIF_F_GSO 2048 >#define NETIF_F_LLTX 4096 > > >#define NETIF_F_GSO_SHIFT 16 >#define NETIF_F_GSO_MASK 0xffff0000 >#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) >#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) >#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) >#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) >#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) > > >#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) > >#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) >#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) > > struct net_device *next_sched; > > > int ifindex; > int iflink; > > > struct net_device_stats* (*get_stats)(struct net_device *dev); > > > > const struct iw_handler_def * wireless_handlers; > > struct iw_public_data * wireless_data; > > const struct ethtool_ops *ethtool_ops; ># 366 "include/linux/netdevice.h" > unsigned int flags; > unsigned short gflags; > unsigned short priv_flags; > unsigned short padded; > > unsigned char operstate; > unsigned char link_mode; > > unsigned mtu; > unsigned short type; > unsigned short hard_header_len; > > struct net_device *master; > > > > > unsigned char perm_addr[32]; > unsigned char addr_len; > unsigned short dev_id; > > struct dev_mc_list *mc_list; > int mc_count; > int promiscuity; > int allmulti; > > > > > void *atalk_ptr; > void *ip_ptr; > void *dn_ptr; > void *ip6_ptr; > void *ec_ptr; > void *ax25_ptr; > > > > > struct list_head poll_list ; > > > int (*poll) (struct net_device *dev, int *quota); > int quota; > int weight; > unsigned long last_rx; > > unsigned char dev_addr[32]; > > > unsigned char broadcast[32]; > > > > > > spinlock_t queue_lock ; > struct Qdisc *qdisc; > struct Qdisc *qdisc_sleeping; > struct list_head qdisc_list; > unsigned long tx_queue_len; > > > struct sk_buff *gso_skb; > > > spinlock_t ingress_lock; > struct Qdisc *qdisc_ingress; > > > > > > spinlock_t _xmit_lock ; > > > > int xmit_lock_owner; > void *priv; > int (*hard_start_xmit) (struct sk_buff *skb, > struct net_device *dev); > > unsigned long trans_start; > > int watchdog_timeo; > struct timer_list watchdog_timer; > > > > > > atomic_t refcnt ; > > > struct list_head todo_list; > > struct hlist_node index_hlist; > > > enum { NETREG_UNINITIALIZED=0, > NETREG_REGISTERED, > NETREG_UNREGISTERING, > NETREG_UNREGISTERED, > NETREG_RELEASED, > } reg_state; > > > void (*uninit)(struct net_device *dev); > > void (*destructor)(struct net_device *dev); > > > int (*open)(struct net_device *dev); > int (*stop)(struct net_device *dev); >#define HAVE_NETDEV_POLL > int (*hard_header) (struct sk_buff *skb, > struct net_device *dev, > unsigned short type, > void *daddr, > void *saddr, > unsigned len); > int (*rebuild_header)(struct sk_buff *skb); >#define HAVE_MULTICAST > void (*set_multicast_list)(struct net_device *dev); >#define HAVE_SET_MAC_ADDR > int (*set_mac_address)(struct net_device *dev, > void *addr); >#define HAVE_PRIVATE_IOCTL > int (*do_ioctl)(struct net_device *dev, > struct ifreq *ifr, int cmd); >#define HAVE_SET_CONFIG > int (*set_config)(struct net_device *dev, > struct ifmap *map); >#define HAVE_HEADER_CACHE > int (*hard_header_cache)(struct neighbour *neigh, > struct hh_cache *hh); > void (*header_cache_update)(struct hh_cache *hh, > struct net_device *dev, > unsigned char * haddr); >#define HAVE_CHANGE_MTU > int (*change_mtu)(struct net_device *dev, int new_mtu); > >#define HAVE_TX_TIMEOUT > void (*tx_timeout) (struct net_device *dev); > > void (*vlan_rx_register)(struct net_device *dev, > struct vlan_group *grp); > void (*vlan_rx_add_vid)(struct net_device *dev, > unsigned short vid); > void (*vlan_rx_kill_vid)(struct net_device *dev, > unsigned short vid); > > int (*hard_header_parse)(struct sk_buff *skb, > unsigned char *haddr); > int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); ># 529 "include/linux/netdevice.h" > struct net_bridge_port *br_port; > > > struct class_device class_dev; > > struct attribute_group *sysfs_groups[3]; >}; > >#define NETDEV_ALIGN 32 >#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) > >static inline __attribute__((always_inline)) void *netdev_priv(struct net_device *dev) >{ > return (char *)dev + ((sizeof(struct net_device) > + (32 - 1)) > & ~(32 - 1)); >} > >#define SET_MODULE_OWNER(dev) do { } while (0) > > > >#define SET_NETDEV_DEV(net,pdev) ((net)->class_dev.dev = (pdev)) > >struct packet_type { > __be16 type; > struct net_device *dev; > int (*func) (struct sk_buff *, > struct net_device *, > struct packet_type *, > struct net_device *); > struct sk_buff *(*gso_segment)(struct sk_buff *skb, > int features); > int (*gso_send_check)(struct sk_buff *skb); > void *af_packet_priv; > struct list_head list; >}; > ># 1 "include/linux/interrupt.h" 1 > > >#define _LINUX_INTERRUPT_H > > > > > > ># 1 "include/linux/irqreturn.h" 1 > > >#define _LINUX_IRQRETURN_H ># 19 "include/linux/irqreturn.h" >typedef int irqreturn_t; > >#define IRQ_NONE (0) >#define IRQ_HANDLED (1) >#define IRQ_RETVAL(x) ((x) != 0) ># 11 "include/linux/interrupt.h" 2 ># 1 "include/linux/hardirq.h" 1 > >#define LINUX_HARDIRQ_H > > ># 1 "include/linux/smp_lock.h" 1 > >#define __LINUX_SMPLOCK_H ># 45 "include/linux/smp_lock.h" >#define lock_kernel() do { } while(0) >#define unlock_kernel() do { } while(0) >#define release_kernel_lock(task) do { } while(0) >#define reacquire_kernel_lock(task) 0 >#define kernel_locked() 1 ># 6 "include/linux/hardirq.h" 2 > ># 1 "include/asm/hardirq.h" 1 > > > >#define __ASM_UM_HARDIRQ_H > > ># 1 "include/linux/irq.h" 1 > >#define _LINUX_IRQ_H ># 22 "include/linux/irq.h" ># 1 "include/asm/irq.h" 1 > >#define __UM_IRQ_H > >#define TIMER_IRQ 0 >#define UMN_IRQ 1 >#define CONSOLE_IRQ 2 >#define CONSOLE_WRITE_IRQ 3 >#define UBD_IRQ 4 >#define UM_ETH_IRQ 5 >#define SSL_IRQ 6 >#define SSL_WRITE_IRQ 7 >#define ACCEPT_IRQ 8 >#define MCONSOLE_IRQ 9 >#define WINCH_IRQ 10 >#define SIGIO_WRITE_IRQ 11 >#define TELNETD_IRQ 12 >#define XTERM_IRQ 13 > >#define LAST_IRQ XTERM_IRQ >#define NR_IRQS (LAST_IRQ + 1) ># 23 "include/linux/irq.h" 2 > ># 1 "include/asm/irq_regs.h" 1 ># 1 "include/asm-generic/irq_regs.h" 1 ># 13 "include/asm-generic/irq_regs.h" >#define _ASM_GENERIC_IRQ_REGS_H > > > > > > > >extern __typeof__(struct pt_regs *) per_cpu____irq_regs; > >static inline __attribute__((always_inline)) struct pt_regs *get_irq_regs(void) >{ > return per_cpu____irq_regs; >} > >static inline __attribute__((always_inline)) struct pt_regs *set_irq_regs(struct pt_regs *new_regs) >{ > struct pt_regs *old_regs, **pp_regs = &per_cpu____irq_regs; > > old_regs = *pp_regs; > *pp_regs = new_regs; > return old_regs; >} ># 1 "include/asm/irq_regs.h" 2 ># 25 "include/linux/irq.h" 2 > >struct irq_desc; >typedef void __attribute__((regparm(3))) (*irq_flow_handler_t)(unsigned int irq, > struct irq_desc *desc); ># 38 "include/linux/irq.h" >#define IRQ_TYPE_NONE 0x00000000 >#define IRQ_TYPE_EDGE_RISING 0x00000001 >#define IRQ_TYPE_EDGE_FALLING 0x00000002 >#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) >#define IRQ_TYPE_LEVEL_HIGH 0x00000004 >#define IRQ_TYPE_LEVEL_LOW 0x00000008 >#define IRQ_TYPE_SENSE_MASK 0x0000000f >#define IRQ_TYPE_PROBE 0x00000010 > > >#define IRQ_INPROGRESS 0x00010000 >#define IRQ_DISABLED 0x00020000 >#define IRQ_PENDING 0x00040000 >#define IRQ_REPLAY 0x00080000 >#define IRQ_AUTODETECT 0x00100000 >#define IRQ_WAITING 0x00200000 >#define IRQ_LEVEL 0x00400000 >#define IRQ_MASKED 0x00800000 >#define IRQ_PER_CPU 0x01000000 > > > >#define CHECK_IRQ_PER_CPU(var) 0 > > >#define IRQ_NOPROBE 0x02000000 >#define IRQ_NOREQUEST 0x04000000 >#define IRQ_NOAUTOEN 0x08000000 >#define IRQ_DELAYED_DISABLE 0x10000000 >#define IRQ_WAKEUP 0x20000000 >#define IRQ_MOVE_PENDING 0x40000000 > >struct proc_dir_entry; ># 94 "include/linux/irq.h" >struct irq_chip { > const char *name; > unsigned int (*startup)(unsigned int irq); > void (*shutdown)(unsigned int irq); > void (*enable)(unsigned int irq); > void (*disable)(unsigned int irq); > > void (*ack)(unsigned int irq); > void (*mask)(unsigned int irq); > void (*mask_ack)(unsigned int irq); > void (*unmask)(unsigned int irq); > void (*eoi)(unsigned int irq); > > void (*end)(unsigned int irq); > void (*set_affinity)(unsigned int irq, cpumask_t dest); > int (*retrigger)(unsigned int irq); > int (*set_type)(unsigned int irq, unsigned int flow_type); > int (*set_wake)(unsigned int irq, unsigned int on); > > > > void (*release)(unsigned int irq, void *dev_id); > > > > > > const char *typename; >}; ># 148 "include/linux/irq.h" >struct irq_desc { > irq_flow_handler_t handle_irq; > struct irq_chip *chip; > void *handler_data; > void *chip_data; > struct irqaction *action; > unsigned int status; > > unsigned int depth; > unsigned int wake_depth; > unsigned int irq_count; > unsigned int irqs_unhandled; > spinlock_t lock; ># 169 "include/linux/irq.h" > struct proc_dir_entry *dir; > > const char *name; >} __attribute__((__aligned__((1 << (6))))); > >extern struct irq_desc irq_desc[(13 + 1)]; > > > > >#define hw_interrupt_type irq_chip >typedef struct irq_chip hw_irq_controller; >#define no_irq_type no_irq_chip >typedef struct irq_desc irq_desc_t; > > > > ># 1 "include/asm/hw_irq.h" 1 > >#define _ASM_UM_HW_IRQ_H ># 188 "include/linux/irq.h" 2 > >extern int setup_irq(unsigned int irq, struct irqaction *new); > > > > >#define handle_dynamic_tick(a) do { } while (0) ># 203 "include/linux/irq.h" >static inline __attribute__((always_inline)) void set_native_irq_info(int irq, cpumask_t mask) >{ >} ># 238 "include/linux/irq.h" >#define move_native_irq(x) >#define move_masked_irq(x) > > > > > > >static inline __attribute__((always_inline)) void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) >{ >} > > > > > >static inline __attribute__((always_inline)) int select_smp_affinity(unsigned int irq) >{ > return 1; >} > > >extern int no_irq_affinity; > > >extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); > > > > > >extern void __attribute__((regparm(3))) handle_level_irq(unsigned int irq, struct irq_desc *desc); >extern void __attribute__((regparm(3))) handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); >extern void __attribute__((regparm(3))) handle_edge_irq(unsigned int irq, struct irq_desc *desc); >extern void __attribute__((regparm(3))) handle_simple_irq(unsigned int irq, struct irq_desc *desc); >extern void __attribute__((regparm(3))) handle_percpu_irq(unsigned int irq, struct irq_desc *desc); >extern void __attribute__((regparm(3))) handle_bad_irq(unsigned int irq, struct irq_desc *desc); > > > > > > >extern __attribute__((regparm(3))) unsigned int __do_IRQ(unsigned int irq); ># 290 "include/linux/irq.h" >static inline __attribute__((always_inline)) void generic_handle_irq(unsigned int irq) >{ > struct irq_desc *desc = irq_desc + irq; > > > > > if (__builtin_expect(!!(desc->handle_irq), 1)) > desc->handle_irq(irq, desc); > else > __do_IRQ(irq); > >} > > >extern void note_interrupt(unsigned int irq, struct irq_desc *desc, > int action_ret); > > >void check_irq_resend(struct irq_desc *desc, unsigned int irq); > > >extern void init_irq_proc(void); > > >extern int noirqdebug_setup(char *str); > > >extern int can_request_irq(unsigned int irq, unsigned long irqflags); > > >extern struct irq_chip no_irq_chip; >extern struct irq_chip dummy_irq_chip; > >extern void >set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, > irq_flow_handler_t handle); >extern void >set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, > irq_flow_handler_t handle, const char *name); > >extern void >__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, > const char *name); > > > > >static inline __attribute__((always_inline)) void >set_irq_handler(unsigned int irq, irq_flow_handler_t handle) >{ > __set_irq_handler(irq, handle, 0, ((void *)0)); >} > > > > > > >static inline __attribute__((always_inline)) void >set_irq_chained_handler(unsigned int irq, > irq_flow_handler_t handle) >{ > __set_irq_handler(irq, handle, 1, ((void *)0)); >} > > >extern int create_irq(void); >extern void destroy_irq(unsigned int irq); > > >static inline __attribute__((always_inline)) int irq_has_action(unsigned int irq) >{ > struct irq_desc *desc = irq_desc + irq; > return desc->action != ((void *)0); >} > > >extern void dynamic_irq_init(unsigned int irq); >extern void dynamic_irq_cleanup(unsigned int irq); > > >extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); >extern int set_irq_data(unsigned int irq, void *data); >extern int set_irq_chip_data(unsigned int irq, void *data); >extern int set_irq_type(unsigned int irq, unsigned int type); > >#define get_irq_chip(irq) (irq_desc[irq].chip) >#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) >#define get_irq_data(irq) (irq_desc[irq].handler_data) ># 8 "include/asm/hardirq.h" 2 > > > >typedef struct { > unsigned int __softirq_pending; >} irq_cpustat_t; > ># 1 "include/linux/irq_cpustat.h" 1 > >#define __irq_cpustat_h ># 20 "include/linux/irq_cpustat.h" >extern irq_cpustat_t irq_stat[]; >#define __IRQ_STAT(cpu,member) (irq_stat[cpu].member) > > > >#define local_softirq_pending() __IRQ_STAT(smp_processor_id(), __softirq_pending) > > > >#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) ># 16 "include/asm/hardirq.h" 2 > > > >static inline __attribute__((always_inline)) void ack_bad_irq(unsigned int irq) >{ > printk("<3>" "unexpected IRQ %02x\n", irq); > do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/asm/hardirq.h"), "i" (22), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); >} ># 8 "include/linux/hardirq.h" 2 ># 26 "include/linux/hardirq.h" >#define PREEMPT_BITS 8 >#define SOFTIRQ_BITS 8 > > >#define HARDIRQ_BITS 12 > > >#define MAX_HARDIRQS_PER_CPU NR_IRQS ># 45 "include/linux/hardirq.h" >#define PREEMPT_SHIFT 0 >#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) >#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) > >#define __IRQ_MASK(x) ((1UL << (x))-1) > >#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) >#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) >#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) > >#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) >#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) >#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) > > > > > >#define hardirq_count() (preempt_count() & HARDIRQ_MASK) >#define softirq_count() (preempt_count() & SOFTIRQ_MASK) >#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) > > > > > >#define in_irq() (hardirq_count()) >#define in_softirq() (softirq_count()) >#define in_interrupt() (irq_count()) > > > > >#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) > > > > > > >#define preemptible() 0 >#define IRQ_EXIT_OFFSET HARDIRQ_OFFSET > > > > > >#define synchronize_irq(irq) barrier() > > >struct task_struct; > > >static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk) >{ >} ># 109 "include/linux/hardirq.h" >#define irq_enter() do { account_system_vtime(current); add_preempt_count(HARDIRQ_OFFSET); trace_hardirq_enter(); } while (0) ># 119 "include/linux/hardirq.h" >#define __irq_exit() do { trace_hardirq_exit(); account_system_vtime(current); sub_preempt_count(HARDIRQ_OFFSET); } while (0) ># 129 "include/linux/hardirq.h" >extern void irq_exit(void); > >#define nmi_enter() do { lockdep_off(); irq_enter(); } while (0) >#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) ># 12 "include/linux/interrupt.h" 2 ># 26 "include/linux/interrupt.h" >#define IRQF_TRIGGER_NONE 0x00000000 >#define IRQF_TRIGGER_RISING 0x00000001 >#define IRQF_TRIGGER_FALLING 0x00000002 >#define IRQF_TRIGGER_HIGH 0x00000004 >#define IRQF_TRIGGER_LOW 0x00000008 >#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING) > >#define IRQF_TRIGGER_PROBE 0x00000010 ># 45 "include/linux/interrupt.h" >#define IRQF_DISABLED 0x00000020 >#define IRQF_SAMPLE_RANDOM 0x00000040 >#define IRQF_SHARED 0x00000080 >#define IRQF_PROBE_SHARED 0x00000100 >#define IRQF_TIMER 0x00000200 >#define IRQF_PERCPU 0x00000400 > > > > > >#define SA_INTERRUPT IRQF_DISABLED >#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM >#define SA_SHIRQ IRQF_SHARED >#define SA_PROBEIRQ IRQF_PROBE_SHARED >#define SA_PERCPU IRQF_PERCPU > >#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW >#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH >#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING >#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING >#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK > >typedef irqreturn_t (*irq_handler_t)(int, void *); > >struct irqaction { > irq_handler_t handler; > unsigned long flags; > cpumask_t mask; > const char *name; > void *dev_id; > struct irqaction *next; > int irq; > struct proc_dir_entry *dir; >}; > >extern irqreturn_t no_action(int cpl, void *dev_id); >extern int request_irq(unsigned int, irq_handler_t handler, > unsigned long, const char *, void *); >extern void free_irq(unsigned int, void *); ># 101 "include/linux/interrupt.h" >#define local_irq_enable_in_hardirq() local_irq_enable() > > > >extern void disable_irq_nosync(unsigned int irq); >extern void disable_irq(unsigned int irq); >extern void enable_irq(unsigned int irq); ># 120 "include/linux/interrupt.h" >static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep(unsigned int irq) >{ > disable_irq_nosync(irq); > > > >} > >static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) >{ > disable_irq_nosync(irq); > > > >} > >static inline __attribute__((always_inline)) void disable_irq_lockdep(unsigned int irq) >{ > disable_irq(irq); > > > >} > >static inline __attribute__((always_inline)) void enable_irq_lockdep(unsigned int irq) >{ > > > > enable_irq(irq); >} > >static inline __attribute__((always_inline)) void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) >{ > > > > enable_irq(irq); >} > > >extern int set_irq_wake(unsigned int irq, unsigned int on); > >static inline __attribute__((always_inline)) int enable_irq_wake(unsigned int irq) >{ > return set_irq_wake(irq, 1); >} > >static inline __attribute__((always_inline)) int disable_irq_wake(unsigned int irq) >{ > return set_irq_wake(irq, 0); >} ># 188 "include/linux/interrupt.h" >#define set_softirq_pending(x) (local_softirq_pending() = (x)) >#define or_softirq_pending(x) (local_softirq_pending() |= (x)) > > > > > > >static inline __attribute__((always_inline)) void __attribute__((deprecated)) cli(void) >{ > block_signals(); >} >static inline __attribute__((always_inline)) void __attribute__((deprecated)) sti(void) >{ > unblock_signals(); >} >static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_flags(unsigned long *x) >{ > do { ({ unsigned long __dummy; typeof(*x) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (*x) = get_signals(); } while(0); >} >#define save_flags(x) save_flags(&x) >static inline __attribute__((always_inline)) void __attribute__((deprecated)) restore_flags(unsigned long x) >{ > do { ({ unsigned long __dummy; typeof(x) __dummy2; (void)(&__dummy == &__dummy2); 1; }); set_signals(x); } while(0); >} > >static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_and_cli(unsigned long *x) >{ > do { do { ({ unsigned long __dummy; typeof(*x) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (*x) = get_signals(); } while(0); block_signals(); } while(0); >} >#define save_and_cli(x) save_and_cli(&x) ># 227 "include/linux/interrupt.h" >enum >{ > HI_SOFTIRQ=0, > TIMER_SOFTIRQ, > NET_TX_SOFTIRQ, > NET_RX_SOFTIRQ, > BLOCK_SOFTIRQ, > TASKLET_SOFTIRQ, > SCHED_SOFTIRQ, >}; > > > > > >struct softirq_action >{ > void (*action)(struct softirq_action *); > void *data; >}; > > __attribute__((regparm(0))) void do_softirq(void); >extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); >extern void softirq_init(void); >#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) >extern void raise_softirq_irqoff(unsigned int nr) __attribute__((regparm(3))); >extern void raise_softirq(unsigned int nr) __attribute__((regparm(3))); ># 276 "include/linux/interrupt.h" >struct tasklet_struct >{ > struct tasklet_struct *next; > unsigned long state; > atomic_t count; > void (*func)(unsigned long); > unsigned long data; >}; > >#define DECLARE_TASKLET(name,func,data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data } > > >#define DECLARE_TASKLET_DISABLED(name,func,data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } > > > >enum >{ > TASKLET_STATE_SCHED, > TASKLET_STATE_RUN >}; ># 315 "include/linux/interrupt.h" >#define tasklet_trylock(t) 1 >#define tasklet_unlock_wait(t) do { } while (0) >#define tasklet_unlock(t) do { } while (0) > > >extern void __tasklet_schedule(struct tasklet_struct *t) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) void tasklet_schedule(struct tasklet_struct *t) >{ > if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) > __tasklet_schedule(t); >} > >extern void __tasklet_hi_schedule(struct tasklet_struct *t) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) void tasklet_hi_schedule(struct tasklet_struct *t) >{ > if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) > __tasklet_hi_schedule(t); >} > > >static inline __attribute__((always_inline)) void tasklet_disable_nosync(struct tasklet_struct *t) >{ > atomic_inc(&t->count); > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void tasklet_disable(struct tasklet_struct *t) >{ > tasklet_disable_nosync(t); > do { } while (0); > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void tasklet_enable(struct tasklet_struct *t) >{ > __asm__ __volatile__("": : :"memory"); > atomic_dec(&t->count); >} > >static inline __attribute__((always_inline)) void tasklet_hi_enable(struct tasklet_struct *t) >{ > __asm__ __volatile__("": : :"memory"); > atomic_dec(&t->count); >} > >extern void tasklet_kill(struct tasklet_struct *t); >extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); >extern void tasklet_init(struct tasklet_struct *t, > void (*func)(unsigned long), unsigned long data); ># 396 "include/linux/interrupt.h" >static inline __attribute__((always_inline)) unsigned long probe_irq_on(void) >{ > return 0; >} >static inline __attribute__((always_inline)) int probe_irq_off(unsigned long val) >{ > return 0; >} >static inline __attribute__((always_inline)) unsigned int probe_irq_mask(unsigned long val) >{ > return 0; >} ># 568 "include/linux/netdevice.h" 2 > > >extern struct net_device loopback_dev; >extern struct net_device *dev_base; >extern rwlock_t dev_base_lock; > >extern int netdev_boot_setup_check(struct net_device *dev); >extern unsigned long netdev_boot_base(const char *prefix, int unit); >extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); >extern struct net_device *dev_getfirstbyhwtype(unsigned short type); >extern void dev_add_pack(struct packet_type *pt); >extern void dev_remove_pack(struct packet_type *pt); >extern void __dev_remove_pack(struct packet_type *pt); > >extern struct net_device *dev_get_by_flags(unsigned short flags, > unsigned short mask); >extern struct net_device *dev_get_by_name(const char *name); >extern struct net_device *__dev_get_by_name(const char *name); >extern int dev_alloc_name(struct net_device *dev, const char *name); >extern int dev_open(struct net_device *dev); >extern int dev_close(struct net_device *dev); >extern int dev_queue_xmit(struct sk_buff *skb); >extern int register_netdevice(struct net_device *dev); >extern int unregister_netdevice(struct net_device *dev); >extern void free_netdev(struct net_device *dev); >extern void synchronize_net(void); >extern int register_netdevice_notifier(struct notifier_block *nb); >extern int unregister_netdevice_notifier(struct notifier_block *nb); >extern int call_netdevice_notifiers(unsigned long val, void *v); >extern struct net_device *dev_get_by_index(int ifindex); >extern struct net_device *__dev_get_by_index(int ifindex); >extern int dev_restart(struct net_device *dev); > > > > >typedef int gifconf_func_t(struct net_device * dev, char * bufptr, int len); >extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); >static inline __attribute__((always_inline)) int unregister_gifconf(unsigned int family) >{ > return register_gifconf(family, ((void *)0)); >} > > > > > > >struct softnet_data >{ > struct net_device *output_queue; > struct sk_buff_head input_pkt_queue; > struct list_head poll_list; > struct sk_buff *completion_queue; > > struct net_device backlog_dev; > > > >}; > >extern __typeof__(struct softnet_data) per_cpu__softnet_data; > >#define HAVE_NETIF_QUEUE > >extern void __netif_schedule(struct net_device *dev); > >static inline __attribute__((always_inline)) void netif_schedule(struct net_device *dev) >{ > if (!(__builtin_constant_p(__LINK_STATE_XOFF) ? constant_test_bit((__LINK_STATE_XOFF),(&dev->state)) : variable_test_bit((__LINK_STATE_XOFF),(&dev->state)))) > __netif_schedule(dev); >} > >static inline __attribute__((always_inline)) void netif_start_queue(struct net_device *dev) >{ > clear_bit(__LINK_STATE_XOFF, &dev->state); >} > >static inline __attribute__((always_inline)) void netif_wake_queue(struct net_device *dev) >{ > > > > > if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) > __netif_schedule(dev); >} > >static inline __attribute__((always_inline)) void netif_stop_queue(struct net_device *dev) >{ > > > > > set_bit(__LINK_STATE_XOFF, &dev->state); >} > >static inline __attribute__((always_inline)) int netif_queue_stopped(const struct net_device *dev) >{ > return (__builtin_constant_p(__LINK_STATE_XOFF) ? constant_test_bit((__LINK_STATE_XOFF),(&dev->state)) : variable_test_bit((__LINK_STATE_XOFF),(&dev->state))); >} > >static inline __attribute__((always_inline)) int netif_running(const struct net_device *dev) >{ > return (__builtin_constant_p(__LINK_STATE_START) ? constant_test_bit((__LINK_STATE_START),(&dev->state)) : variable_test_bit((__LINK_STATE_START),(&dev->state))); >} > > > > > >static inline __attribute__((always_inline)) void dev_kfree_skb_irq(struct sk_buff *skb) >{ > if (atomic_dec_and_test(&skb->users)) { > struct softnet_data *sd; > unsigned long flags; > > do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (flags) = get_signals(); } while(0); block_signals(); } while(0); > sd = &per_cpu__softnet_data; > skb->next = sd->completion_queue; > sd->completion_queue = skb; > raise_softirq_irqoff(NET_TX_SOFTIRQ); > do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); set_signals(flags); } while(0); > } >} > > > > >extern void dev_kfree_skb_any(struct sk_buff *skb); > >#define HAVE_NETIF_RX 1 >extern int netif_rx(struct sk_buff *skb); >extern int netif_rx_ni(struct sk_buff *skb); >#define HAVE_NETIF_RECEIVE_SKB 1 >extern int netif_receive_skb(struct sk_buff *skb); >extern int dev_valid_name(const char *name); >extern int dev_ioctl(unsigned int cmd, void *); >extern int dev_ethtool(struct ifreq *); >extern unsigned dev_get_flags(const struct net_device *); >extern int dev_change_flags(struct net_device *, unsigned); >extern int dev_change_name(struct net_device *, char *); >extern int dev_set_mtu(struct net_device *, int); >extern int dev_set_mac_address(struct net_device *, > struct sockaddr *); >extern int dev_hard_start_xmit(struct sk_buff *skb, > struct net_device *dev); > >extern void dev_init(void); > >extern int netdev_budget; > > >extern void netdev_run_todo(void); > >static inline __attribute__((always_inline)) void dev_put(struct net_device *dev) >{ > atomic_dec(&dev->refcnt); >} > >static inline __attribute__((always_inline)) void dev_hold(struct net_device *dev) >{ > atomic_inc(&dev->refcnt); >} ># 742 "include/linux/netdevice.h" >extern void linkwatch_fire_event(struct net_device *dev); > >static inline __attribute__((always_inline)) int netif_carrier_ok(const struct net_device *dev) >{ > return !(__builtin_constant_p(__LINK_STATE_NOCARRIER) ? constant_test_bit((__LINK_STATE_NOCARRIER),(&dev->state)) : variable_test_bit((__LINK_STATE_NOCARRIER),(&dev->state))); >} > >extern void __netdev_watchdog_up(struct net_device *dev); > >extern void netif_carrier_on(struct net_device *dev); > >extern void netif_carrier_off(struct net_device *dev); > >static inline __attribute__((always_inline)) void netif_dormant_on(struct net_device *dev) >{ > if (!test_and_set_bit(__LINK_STATE_DORMANT, &dev->state)) > linkwatch_fire_event(dev); >} > >static inline __attribute__((always_inline)) void netif_dormant_off(struct net_device *dev) >{ > if (test_and_clear_bit(__LINK_STATE_DORMANT, &dev->state)) > linkwatch_fire_event(dev); >} > >static inline __attribute__((always_inline)) int netif_dormant(const struct net_device *dev) >{ > return (__builtin_constant_p(__LINK_STATE_DORMANT) ? constant_test_bit((__LINK_STATE_DORMANT),(&dev->state)) : variable_test_bit((__LINK_STATE_DORMANT),(&dev->state))); >} > > >static inline __attribute__((always_inline)) int netif_oper_up(const struct net_device *dev) { > return (dev->operstate == IF_OPER_UP || > dev->operstate == IF_OPER_UNKNOWN ); >} > > >static inline __attribute__((always_inline)) int netif_device_present(struct net_device *dev) >{ > return (__builtin_constant_p(__LINK_STATE_PRESENT) ? constant_test_bit((__LINK_STATE_PRESENT),(&dev->state)) : variable_test_bit((__LINK_STATE_PRESENT),(&dev->state))); >} > >extern void netif_device_detach(struct net_device *dev); > >extern void netif_device_attach(struct net_device *dev); > > > > >#define HAVE_NETIF_MSG 1 > >enum { > NETIF_MSG_DRV = 0x0001, > NETIF_MSG_PROBE = 0x0002, > NETIF_MSG_LINK = 0x0004, > NETIF_MSG_TIMER = 0x0008, > NETIF_MSG_IFDOWN = 0x0010, > NETIF_MSG_IFUP = 0x0020, > NETIF_MSG_RX_ERR = 0x0040, > NETIF_MSG_TX_ERR = 0x0080, > NETIF_MSG_TX_QUEUED = 0x0100, > NETIF_MSG_INTR = 0x0200, > NETIF_MSG_TX_DONE = 0x0400, > NETIF_MSG_RX_STATUS = 0x0800, > NETIF_MSG_PKTDATA = 0x1000, > NETIF_MSG_HW = 0x2000, > NETIF_MSG_WOL = 0x4000, >}; > >#define netif_msg_drv(p) ((p)->msg_enable & NETIF_MSG_DRV) >#define netif_msg_probe(p) ((p)->msg_enable & NETIF_MSG_PROBE) >#define netif_msg_link(p) ((p)->msg_enable & NETIF_MSG_LINK) >#define netif_msg_timer(p) ((p)->msg_enable & NETIF_MSG_TIMER) >#define netif_msg_ifdown(p) ((p)->msg_enable & NETIF_MSG_IFDOWN) >#define netif_msg_ifup(p) ((p)->msg_enable & NETIF_MSG_IFUP) >#define netif_msg_rx_err(p) ((p)->msg_enable & NETIF_MSG_RX_ERR) >#define netif_msg_tx_err(p) ((p)->msg_enable & NETIF_MSG_TX_ERR) >#define netif_msg_tx_queued(p) ((p)->msg_enable & NETIF_MSG_TX_QUEUED) >#define netif_msg_intr(p) ((p)->msg_enable & NETIF_MSG_INTR) >#define netif_msg_tx_done(p) ((p)->msg_enable & NETIF_MSG_TX_DONE) >#define netif_msg_rx_status(p) ((p)->msg_enable & NETIF_MSG_RX_STATUS) >#define netif_msg_pktdata(p) ((p)->msg_enable & NETIF_MSG_PKTDATA) >#define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW) >#define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL) > >static inline __attribute__((always_inline)) u32 netif_msg_init(int debug_value, int default_msg_enable_bits) >{ > > if (debug_value < 0 || debug_value >= (sizeof(u32) * 8)) > return default_msg_enable_bits; > if (debug_value == 0) > return 0; > > return (1 << debug_value) - 1; >} > > >static inline __attribute__((always_inline)) int __netif_rx_schedule_prep(struct net_device *dev) >{ > return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); >} > > >static inline __attribute__((always_inline)) int netif_rx_schedule_prep(struct net_device *dev) >{ > return netif_running(dev) && __netif_rx_schedule_prep(dev); >} > > > > > >extern void __netif_rx_schedule(struct net_device *dev); > > > >static inline __attribute__((always_inline)) void netif_rx_schedule(struct net_device *dev) >{ > if (netif_rx_schedule_prep(dev)) > __netif_rx_schedule(dev); >} > > > > >static inline __attribute__((always_inline)) int netif_rx_reschedule(struct net_device *dev, int undo) >{ > if (netif_rx_schedule_prep(dev)) { > unsigned long flags; > > dev->quota += undo; > > do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (flags) = get_signals(); } while(0); block_signals(); } while(0); > list_add_tail(&dev->poll_list, &per_cpu__softnet_data.poll_list); > do { ((irq_stat[0].__softirq_pending) |= (1UL << (NET_RX_SOFTIRQ))); } while (0); > do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); set_signals(flags); } while(0); > return 1; > } > return 0; >} > > > > > > >static inline __attribute__((always_inline)) void netif_rx_complete(struct net_device *dev) >{ > unsigned long flags; > > do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); (flags) = get_signals(); } while(0); block_signals(); } while(0); > do { if (__builtin_expect(!!((!(__builtin_constant_p(__LINK_STATE_RX_SCHED) ? constant_test_bit((__LINK_STATE_RX_SCHED),(&dev->state)) : variable_test_bit((__LINK_STATE_RX_SCHED),(&dev->state))))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/netdevice.h"), "i" (893), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > list_del(&dev->poll_list); > __asm__ __volatile__("": : :"memory"); > clear_bit(__LINK_STATE_RX_SCHED, &dev->state); > do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); set_signals(flags); } while(0); >} > >static inline __attribute__((always_inline)) void netif_poll_disable(struct net_device *dev) >{ > while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) > > schedule_timeout_interruptible(1); >} > >static inline __attribute__((always_inline)) void netif_poll_enable(struct net_device *dev) >{ > clear_bit(__LINK_STATE_RX_SCHED, &dev->state); >} > > > > >static inline __attribute__((always_inline)) void __netif_rx_complete(struct net_device *dev) >{ > do { if (__builtin_expect(!!((!(__builtin_constant_p(__LINK_STATE_RX_SCHED) ? constant_test_bit((__LINK_STATE_RX_SCHED),(&dev->state)) : variable_test_bit((__LINK_STATE_RX_SCHED),(&dev->state))))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/netdevice.h"), "i" (917), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > list_del(&dev->poll_list); > __asm__ __volatile__("": : :"memory"); > clear_bit(__LINK_STATE_RX_SCHED, &dev->state); >} > >static inline __attribute__((always_inline)) void netif_tx_lock(struct net_device *dev) >{ > _spin_lock(&dev->_xmit_lock); > dev->xmit_lock_owner = 0; >} > >static inline __attribute__((always_inline)) void netif_tx_lock_bh(struct net_device *dev) >{ > _spin_lock_bh(&dev->_xmit_lock); > dev->xmit_lock_owner = 0; >} > >static inline __attribute__((always_inline)) int netif_tx_trylock(struct net_device *dev) >{ > int ok = (_spin_trylock(&dev->_xmit_lock)); > if (__builtin_expect(!!(ok), 1)) > dev->xmit_lock_owner = 0; > return ok; >} > >static inline __attribute__((always_inline)) void netif_tx_unlock(struct net_device *dev) >{ > dev->xmit_lock_owner = -1; > _spin_unlock(&dev->_xmit_lock); >} > >static inline __attribute__((always_inline)) void netif_tx_unlock_bh(struct net_device *dev) >{ > dev->xmit_lock_owner = -1; > _spin_unlock_bh(&dev->_xmit_lock); >} > >static inline __attribute__((always_inline)) void netif_tx_disable(struct net_device *dev) >{ > netif_tx_lock_bh(dev); > netif_stop_queue(dev); > netif_tx_unlock_bh(dev); >} > > > >extern void ether_setup(struct net_device *dev); > > >extern struct net_device *alloc_netdev(int sizeof_priv, const char *name, > void (*setup)(struct net_device *)); >extern int register_netdev(struct net_device *dev); >extern void unregister_netdev(struct net_device *dev); > >extern void dev_mc_upload(struct net_device *dev); >extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); >extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); >extern void dev_mc_discard(struct net_device *dev); >extern void dev_set_promiscuity(struct net_device *dev, int inc); >extern void dev_set_allmulti(struct net_device *dev, int inc); >extern void netdev_state_change(struct net_device *dev); >extern void netdev_features_change(struct net_device *dev); > >extern void dev_load(const char *name); >extern void dev_mcast_init(void); >extern int netdev_max_backlog; >extern int weight_p; >extern int netdev_set_master(struct net_device *dev, struct net_device *master); >extern int skb_checksum_help(struct sk_buff *skb); >extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features); > >extern void netdev_rx_csum_fault(struct net_device *dev); > > > > > > >extern void net_enable_timestamp(void); >extern void net_disable_timestamp(void); > > >extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); >extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); >extern void dev_seq_stop(struct seq_file *seq, void *v); > > >extern void linkwatch_run_queue(void); > >static inline __attribute__((always_inline)) int net_gso_ok(int features, int gso_type) >{ > int feature = gso_type << 16; > return (features & feature) == feature; >} > >static inline __attribute__((always_inline)) int skb_gso_ok(struct sk_buff *skb, int features) >{ > return net_gso_ok(features, ((struct skb_shared_info *)((skb)->end))->gso_type); >} > >static inline __attribute__((always_inline)) int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) >{ > return skb_is_gso(skb) && > (!skb_gso_ok(skb, dev->features) || > __builtin_expect(!!(skb->ip_summed != 1), 0)); >} > > > > > >static inline __attribute__((always_inline)) int skb_bond_should_drop(struct sk_buff *skb) >{ > struct net_device *dev = skb->dev; > struct net_device *master = dev->master; > > if (master && > (dev->priv_flags & 0x4)) { > if ((dev->priv_flags & 0x40) && > skb->protocol == (( __be16)((__u16)( (((__u16)((0x0806)) & (__u16)0x00ffU) << 8) | (((__u16)((0x0806)) & (__u16)0xff00U) >> 8) )))) > return 0; > > if (master->priv_flags & 0x10) { > if (skb->pkt_type != 1 && > skb->pkt_type != 2) > return 0; > } > if (master->priv_flags & 0x8 && > skb->protocol == (( __be16)((__u16)( (((__u16)((0x8809)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8809)) & (__u16)0xff00U) >> 8) )))) > return 0; > > return 1; > } > return 0; >} ># 63 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/etherdevice.h" 1 ># 25 "include/linux/etherdevice.h" >#define _LINUX_ETHERDEVICE_H > > > > > > >extern int eth_header(struct sk_buff *skb, struct net_device *dev, > unsigned short type, void *daddr, > void *saddr, unsigned len); >extern int eth_rebuild_header(struct sk_buff *skb); >extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); >extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, > unsigned char * haddr); >extern int eth_header_cache(struct neighbour *neigh, > struct hh_cache *hh); > >extern struct net_device *alloc_etherdev(int sizeof_priv); >static inline __attribute__((always_inline)) void eth_copy_and_sum (struct sk_buff *dest, > const unsigned char *src, > int len, int base) >{ > (__builtin_constant_p(len) ? __constant_memcpy((dest->data),(src),(len)) : __memcpy((dest->data),(src),(len))); >} > > > > > > > >static inline __attribute__((always_inline)) int is_zero_ether_addr(const u8 *addr) >{ > return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); >} ># 68 "include/linux/etherdevice.h" >static inline __attribute__((always_inline)) int is_multicast_ether_addr(const u8 *addr) >{ > return (0x01 & addr[0]); >} > > > > > > > >static inline __attribute__((always_inline)) int is_broadcast_ether_addr(const u8 *addr) >{ > return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; >} ># 93 "include/linux/etherdevice.h" >static inline __attribute__((always_inline)) int is_valid_ether_addr(const u8 *addr) >{ > > > return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); >} ># 107 "include/linux/etherdevice.h" >static inline __attribute__((always_inline)) void random_ether_addr(u8 *addr) >{ > get_random_bytes (addr, 6); > addr [0] &= 0xfe; > addr [0] |= 0x02; >} ># 121 "include/linux/etherdevice.h" >static inline __attribute__((always_inline)) unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2) >{ > const u16 *a = (const u16 *) addr1; > const u16 *b = (const u16 *) addr2; > > ((void)sizeof(char[1 - 2*!!(6 != 6)])); > return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; >} ># 64 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/proc_fs.h" 1 > >#define _LINUX_PROC_FS_H > > > > ># 1 "include/linux/magic.h" 1 > >#define __LINUX_MAGIC_H__ > >#define ADFS_SUPER_MAGIC 0xadf5 >#define AFFS_SUPER_MAGIC 0xadff >#define AUTOFS_SUPER_MAGIC 0x0187 >#define CODA_SUPER_MAGIC 0x73757245 >#define EFS_SUPER_MAGIC 0x414A53 >#define EXT2_SUPER_MAGIC 0xEF53 >#define EXT3_SUPER_MAGIC 0xEF53 >#define EXT4_SUPER_MAGIC 0xEF53 >#define HPFS_SUPER_MAGIC 0xf995e849 >#define ISOFS_SUPER_MAGIC 0x9660 >#define JFFS2_SUPER_MAGIC 0x72b6 > >#define MINIX_SUPER_MAGIC 0x137F >#define MINIX_SUPER_MAGIC2 0x138F >#define MINIX2_SUPER_MAGIC 0x2468 >#define MINIX2_SUPER_MAGIC2 0x2478 > >#define MSDOS_SUPER_MAGIC 0x4d44 >#define NCP_SUPER_MAGIC 0x564c >#define NFS_SUPER_MAGIC 0x6969 >#define OPENPROM_SUPER_MAGIC 0x9fa1 >#define PROC_SUPER_MAGIC 0x9fa0 >#define QNX4_SUPER_MAGIC 0x002f > >#define REISERFS_SUPER_MAGIC 0x52654973 > > >#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" >#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" >#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" > >#define SMB_SUPER_MAGIC 0x517B >#define USBDEVICE_SUPER_MAGIC 0x9fa2 ># 8 "include/linux/proc_fs.h" 2 ># 17 "include/linux/proc_fs.h" >#define FIRST_PROCESS_ENTRY 256 > > > > > > >enum { > PROC_ROOT_INO = 1, >}; ># 43 "include/linux/proc_fs.h" >typedef int (read_proc_t)(char *page, char **start, off_t off, > int count, int *eof, void *data); >typedef int (write_proc_t)(struct file *file, const char *buffer, > unsigned long count, void *data); >typedef int (get_info_t)(char *, char **, off_t, int); > >struct proc_dir_entry { > unsigned int low_ino; > unsigned short namelen; > const char *name; > mode_t mode; > nlink_t nlink; > uid_t uid; > gid_t gid; > loff_t size; > struct inode_operations * proc_iops; > const struct file_operations * proc_fops; > get_info_t *get_info; > struct module *owner; > struct proc_dir_entry *next, *parent, *subdir; > void *data; > read_proc_t *read_proc; > write_proc_t *write_proc; > atomic_t count; > int deleted; > void *set; >}; > >struct kcore_list { > struct kcore_list *next; > unsigned long addr; > size_t size; >}; > >struct vmcore { > struct list_head list; > unsigned long long paddr; > unsigned long long size; > loff_t offset; >}; > > > >extern struct proc_dir_entry proc_root; >extern struct proc_dir_entry *proc_root_fs; >extern struct proc_dir_entry *proc_net; >extern struct proc_dir_entry *proc_net_stat; >extern struct proc_dir_entry *proc_bus; >extern struct proc_dir_entry *proc_root_driver; >extern struct proc_dir_entry *proc_root_kcore; > >extern spinlock_t proc_subdir_lock; > >extern void proc_root_init(void); >extern void proc_misc_init(void); > >struct mm_struct; > >void proc_flush_task(struct task_struct *task); >struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); >int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); >unsigned long task_vsize(struct mm_struct *); >int task_statm(struct mm_struct *, int *, int *, int *, int *); >char *task_mem(struct mm_struct *, char *); > >extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, > struct proc_dir_entry *parent); >extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); > >extern struct vfsmount *proc_mnt; >extern int proc_fill_super(struct super_block *,void *,int); >extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *); > >extern int proc_match(int, const char *,struct proc_dir_entry *); ># 125 "include/linux/proc_fs.h" >extern int proc_readdir(struct file *, void *, filldir_t); >extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); > >extern const struct file_operations proc_kcore_operations; >extern const struct file_operations proc_kmsg_operations; >extern const struct file_operations ppc_htab_operations; > > > > >struct tty_driver; >extern void proc_tty_init(void); >extern void proc_tty_register_driver(struct tty_driver *driver); >extern void proc_tty_unregister_driver(struct tty_driver *driver); ># 156 "include/linux/proc_fs.h" >extern struct proc_dir_entry *proc_symlink(const char *, > struct proc_dir_entry *, const char *); >extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); >extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, > struct proc_dir_entry *parent); > >static inline __attribute__((always_inline)) struct proc_dir_entry *create_proc_read_entry(const char *name, > mode_t mode, struct proc_dir_entry *base, > read_proc_t *read_proc, void * data) >{ > struct proc_dir_entry *res=create_proc_entry(name,mode,base); > if (res) { > res->read_proc=read_proc; > res->data=data; > } > return res; >} > >static inline __attribute__((always_inline)) struct proc_dir_entry *create_proc_info_entry(const char *name, > mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) >{ > struct proc_dir_entry *res=create_proc_entry(name,mode,base); > if (res) res->get_info=get_info; > return res; >} > >static inline __attribute__((always_inline)) struct proc_dir_entry *proc_net_create(const char *name, > mode_t mode, get_info_t *get_info) >{ > return create_proc_info_entry(name,mode,proc_net,get_info); >} > >static inline __attribute__((always_inline)) struct proc_dir_entry *proc_net_fops_create(const char *name, > mode_t mode, const struct file_operations *fops) >{ > struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); > if (res) > res->proc_fops = fops; > return res; >} > >static inline __attribute__((always_inline)) void proc_net_remove(const char *name) >{ > remove_proc_entry(name,proc_net); >} ># 244 "include/linux/proc_fs.h" >extern void kclist_add(struct kcore_list *, void *, size_t); > > >union proc_op { > int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); > int (*proc_read)(struct task_struct *task, char *page); >}; > >struct proc_inode { > struct pid *pid; > int fd; > union proc_op op; > struct proc_dir_entry *pde; > struct inode vfs_inode; >}; > >static inline __attribute__((always_inline)) struct proc_inode *PROC_I(const struct inode *inode) >{ > return ({ const typeof( ((struct proc_inode *)0)->vfs_inode ) *__mptr = (inode); (struct proc_inode *)( (char *)__mptr - __builtin_offsetof(struct proc_inode,vfs_inode) );}); >} > >static inline __attribute__((always_inline)) struct proc_dir_entry *PDE(const struct inode *inode) >{ > return PROC_I(inode)->pde; >} > >struct proc_maps_private { > struct pid *pid; > struct task_struct *task; > > struct vm_area_struct *tail_vma; > >}; ># 65 "net/ipv4/ip_output.c" 2 > > > ># 1 "include/net/snmp.h" 1 ># 22 "include/net/snmp.h" >#define _SNMP_H > > ># 1 "include/linux/snmp.h" 1 > > > > > > > >#define _LINUX_SNMP_H ># 18 "include/linux/snmp.h" >enum >{ > IPSTATS_MIB_NUM = 0, > IPSTATS_MIB_INRECEIVES, > IPSTATS_MIB_INHDRERRORS, > IPSTATS_MIB_INTOOBIGERRORS, > IPSTATS_MIB_INNOROUTES, > IPSTATS_MIB_INADDRERRORS, > IPSTATS_MIB_INUNKNOWNPROTOS, > IPSTATS_MIB_INTRUNCATEDPKTS, > IPSTATS_MIB_INDISCARDS, > IPSTATS_MIB_INDELIVERS, > IPSTATS_MIB_OUTFORWDATAGRAMS, > IPSTATS_MIB_OUTREQUESTS, > IPSTATS_MIB_OUTDISCARDS, > IPSTATS_MIB_OUTNOROUTES, > IPSTATS_MIB_REASMTIMEOUT, > IPSTATS_MIB_REASMREQDS, > IPSTATS_MIB_REASMOKS, > IPSTATS_MIB_REASMFAILS, > IPSTATS_MIB_FRAGOKS, > IPSTATS_MIB_FRAGFAILS, > IPSTATS_MIB_FRAGCREATES, > IPSTATS_MIB_INMCASTPKTS, > IPSTATS_MIB_OUTMCASTPKTS, > __IPSTATS_MIB_MAX >}; > > > > > > >enum >{ > ICMP_MIB_NUM = 0, > ICMP_MIB_INMSGS, > ICMP_MIB_INERRORS, > ICMP_MIB_INDESTUNREACHS, > ICMP_MIB_INTIMEEXCDS, > ICMP_MIB_INPARMPROBS, > ICMP_MIB_INSRCQUENCHS, > ICMP_MIB_INREDIRECTS, > ICMP_MIB_INECHOS, > ICMP_MIB_INECHOREPS, > ICMP_MIB_INTIMESTAMPS, > ICMP_MIB_INTIMESTAMPREPS, > ICMP_MIB_INADDRMASKS, > ICMP_MIB_INADDRMASKREPS, > ICMP_MIB_OUTMSGS, > ICMP_MIB_OUTERRORS, > ICMP_MIB_OUTDESTUNREACHS, > ICMP_MIB_OUTTIMEEXCDS, > ICMP_MIB_OUTPARMPROBS, > ICMP_MIB_OUTSRCQUENCHS, > ICMP_MIB_OUTREDIRECTS, > ICMP_MIB_OUTECHOS, > ICMP_MIB_OUTECHOREPS, > ICMP_MIB_OUTTIMESTAMPS, > ICMP_MIB_OUTTIMESTAMPREPS, > ICMP_MIB_OUTADDRMASKS, > ICMP_MIB_OUTADDRMASKREPS, > __ICMP_MIB_MAX >}; > > > > > >enum >{ > ICMP6_MIB_NUM = 0, > ICMP6_MIB_INMSGS, > ICMP6_MIB_INERRORS, > ICMP6_MIB_INDESTUNREACHS, > ICMP6_MIB_INPKTTOOBIGS, > ICMP6_MIB_INTIMEEXCDS, > ICMP6_MIB_INPARMPROBLEMS, > ICMP6_MIB_INECHOS, > ICMP6_MIB_INECHOREPLIES, > ICMP6_MIB_INGROUPMEMBQUERIES, > ICMP6_MIB_INGROUPMEMBRESPONSES, > ICMP6_MIB_INGROUPMEMBREDUCTIONS, > ICMP6_MIB_INROUTERSOLICITS, > ICMP6_MIB_INROUTERADVERTISEMENTS, > ICMP6_MIB_INNEIGHBORSOLICITS, > ICMP6_MIB_INNEIGHBORADVERTISEMENTS, > ICMP6_MIB_INREDIRECTS, > ICMP6_MIB_OUTMSGS, > ICMP6_MIB_OUTDESTUNREACHS, > ICMP6_MIB_OUTPKTTOOBIGS, > ICMP6_MIB_OUTTIMEEXCDS, > ICMP6_MIB_OUTPARMPROBLEMS, > ICMP6_MIB_OUTECHOREPLIES, > ICMP6_MIB_OUTROUTERSOLICITS, > ICMP6_MIB_OUTNEIGHBORSOLICITS, > ICMP6_MIB_OUTNEIGHBORADVERTISEMENTS, > ICMP6_MIB_OUTREDIRECTS, > ICMP6_MIB_OUTGROUPMEMBRESPONSES, > ICMP6_MIB_OUTGROUPMEMBREDUCTIONS, > __ICMP6_MIB_MAX >}; > > > > > > >enum >{ > TCP_MIB_NUM = 0, > TCP_MIB_RTOALGORITHM, > TCP_MIB_RTOMIN, > TCP_MIB_RTOMAX, > TCP_MIB_MAXCONN, > TCP_MIB_ACTIVEOPENS, > TCP_MIB_PASSIVEOPENS, > TCP_MIB_ATTEMPTFAILS, > TCP_MIB_ESTABRESETS, > TCP_MIB_CURRESTAB, > TCP_MIB_INSEGS, > TCP_MIB_OUTSEGS, > TCP_MIB_RETRANSSEGS, > TCP_MIB_INERRS, > TCP_MIB_OUTRSTS, > __TCP_MIB_MAX >}; > > > > > > >enum >{ > UDP_MIB_NUM = 0, > UDP_MIB_INDATAGRAMS, > UDP_MIB_NOPORTS, > UDP_MIB_INERRORS, > UDP_MIB_OUTDATAGRAMS, > UDP_MIB_RCVBUFERRORS, > UDP_MIB_SNDBUFERRORS, > __UDP_MIB_MAX >}; > > >enum >{ > LINUX_MIB_NUM = 0, > LINUX_MIB_SYNCOOKIESSENT, > LINUX_MIB_SYNCOOKIESRECV, > LINUX_MIB_SYNCOOKIESFAILED, > LINUX_MIB_EMBRYONICRSTS, > LINUX_MIB_PRUNECALLED, > LINUX_MIB_RCVPRUNED, > LINUX_MIB_OFOPRUNED, > LINUX_MIB_OUTOFWINDOWICMPS, > LINUX_MIB_LOCKDROPPEDICMPS, > LINUX_MIB_ARPFILTER, > LINUX_MIB_TIMEWAITED, > LINUX_MIB_TIMEWAITRECYCLED, > LINUX_MIB_TIMEWAITKILLED, > LINUX_MIB_PAWSPASSIVEREJECTED, > LINUX_MIB_PAWSACTIVEREJECTED, > LINUX_MIB_PAWSESTABREJECTED, > LINUX_MIB_DELAYEDACKS, > LINUX_MIB_DELAYEDACKLOCKED, > LINUX_MIB_DELAYEDACKLOST, > LINUX_MIB_LISTENOVERFLOWS, > LINUX_MIB_LISTENDROPS, > LINUX_MIB_TCPPREQUEUED, > LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, > LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, > LINUX_MIB_TCPPREQUEUEDROPPED, > LINUX_MIB_TCPHPHITS, > LINUX_MIB_TCPHPHITSTOUSER, > LINUX_MIB_TCPPUREACKS, > LINUX_MIB_TCPHPACKS, > LINUX_MIB_TCPRENORECOVERY, > LINUX_MIB_TCPSACKRECOVERY, > LINUX_MIB_TCPSACKRENEGING, > LINUX_MIB_TCPFACKREORDER, > LINUX_MIB_TCPSACKREORDER, > LINUX_MIB_TCPRENOREORDER, > LINUX_MIB_TCPTSREORDER, > LINUX_MIB_TCPFULLUNDO, > LINUX_MIB_TCPPARTIALUNDO, > LINUX_MIB_TCPDSACKUNDO, > LINUX_MIB_TCPLOSSUNDO, > LINUX_MIB_TCPLOSS, > LINUX_MIB_TCPLOSTRETRANSMIT, > LINUX_MIB_TCPRENOFAILURES, > LINUX_MIB_TCPSACKFAILURES, > LINUX_MIB_TCPLOSSFAILURES, > LINUX_MIB_TCPFASTRETRANS, > LINUX_MIB_TCPFORWARDRETRANS, > LINUX_MIB_TCPSLOWSTARTRETRANS, > LINUX_MIB_TCPTIMEOUTS, > LINUX_MIB_TCPRENORECOVERYFAIL, > LINUX_MIB_TCPSACKRECOVERYFAIL, > LINUX_MIB_TCPSCHEDULERFAILED, > LINUX_MIB_TCPRCVCOLLAPSED, > LINUX_MIB_TCPDSACKOLDSENT, > LINUX_MIB_TCPDSACKOFOSENT, > LINUX_MIB_TCPDSACKRECV, > LINUX_MIB_TCPDSACKOFORECV, > LINUX_MIB_TCPABORTONSYN, > LINUX_MIB_TCPABORTONDATA, > LINUX_MIB_TCPABORTONCLOSE, > LINUX_MIB_TCPABORTONMEMORY, > LINUX_MIB_TCPABORTONTIMEOUT, > LINUX_MIB_TCPABORTONLINGER, > LINUX_MIB_TCPABORTFAILED, > LINUX_MIB_TCPMEMORYPRESSURES, > __LINUX_MIB_MAX >}; ># 26 "include/net/snmp.h" 2 ># 35 "include/net/snmp.h" >struct snmp_mib { > char *name; > int entry; >}; > >#define SNMP_MIB_ITEM(_name,_entry) { .name = _name, .entry = _entry, } > > > > >#define SNMP_MIB_SENTINEL { .name = NULL, .entry = 0, } ># 69 "include/net/snmp.h" >#define __SNMP_MIB_ALIGN__ ____cacheline_aligned > > >#define IPSTATS_MIB_MAX __IPSTATS_MIB_MAX >struct ipstats_mib { > unsigned long mibs[__IPSTATS_MIB_MAX]; >} __attribute__((__aligned__((1 << (6))))); > > >#define ICMP_MIB_DUMMY __ICMP_MIB_MAX >#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1) > >struct icmp_mib { > unsigned long mibs[(__ICMP_MIB_MAX + 1)]; >} __attribute__((__aligned__((1 << (6))))); > > >#define ICMP6_MIB_MAX __ICMP6_MIB_MAX >struct icmpv6_mib { > unsigned long mibs[__ICMP6_MIB_MAX]; >} __attribute__((__aligned__((1 << (6))))); > > >#define TCP_MIB_MAX __TCP_MIB_MAX >struct tcp_mib { > unsigned long mibs[__TCP_MIB_MAX]; >} __attribute__((__aligned__((1 << (6))))); > > >#define UDP_MIB_MAX __UDP_MIB_MAX >struct udp_mib { > unsigned long mibs[__UDP_MIB_MAX]; >} __attribute__((__aligned__((1 << (6))))); > > >#define LINUX_MIB_MAX __LINUX_MIB_MAX >struct linux_mib { > unsigned long mibs[__LINUX_MIB_MAX]; >}; ># 116 "include/net/snmp.h" >#define DEFINE_SNMP_STAT(type,name) __typeof__(type) *name[2] > >#define DECLARE_SNMP_STAT(type,name) extern __typeof__(type) *name[2] > > >#define SNMP_STAT_BHPTR(name) (name[0]) >#define SNMP_STAT_USRPTR(name) (name[1]) > >#define SNMP_INC_STATS_BH(mib,field) (per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field]++) > >#define SNMP_INC_STATS_OFFSET_BH(mib,field,offset) (per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field + (offset)]++) > >#define SNMP_INC_STATS_USER(mib,field) (per_cpu_ptr(mib[1], raw_smp_processor_id())->mibs[field]++) > >#define SNMP_INC_STATS(mib,field) (per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())->mibs[field]++) > >#define SNMP_DEC_STATS(mib,field) (per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())->mibs[field]--) > >#define SNMP_ADD_STATS_BH(mib,field,addend) (per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field] += addend) > >#define SNMP_ADD_STATS_USER(mib,field,addend) (per_cpu_ptr(mib[1], raw_smp_processor_id())->mibs[field] += addend) ># 69 "net/ipv4/ip_output.c" 2 ># 1 "include/net/ip.h" 1 ># 23 "include/net/ip.h" >#define _IP_H > > ># 1 "include/linux/ip.h" 1 ># 18 "include/linux/ip.h" >#define _LINUX_IP_H > > > >#define IPTOS_TOS_MASK 0x1E >#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) >#define IPTOS_LOWDELAY 0x10 >#define IPTOS_THROUGHPUT 0x08 >#define IPTOS_RELIABILITY 0x04 >#define IPTOS_MINCOST 0x02 > >#define IPTOS_PREC_MASK 0xE0 >#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK) >#define IPTOS_PREC_NETCONTROL 0xe0 >#define IPTOS_PREC_INTERNETCONTROL 0xc0 >#define IPTOS_PREC_CRITIC_ECP 0xa0 >#define IPTOS_PREC_FLASHOVERRIDE 0x80 >#define IPTOS_PREC_FLASH 0x60 >#define IPTOS_PREC_IMMEDIATE 0x40 >#define IPTOS_PREC_PRIORITY 0x20 >#define IPTOS_PREC_ROUTINE 0x00 > > > >#define IPOPT_COPY 0x80 >#define IPOPT_CLASS_MASK 0x60 >#define IPOPT_NUMBER_MASK 0x1f > >#define IPOPT_COPIED(o) ((o)&IPOPT_COPY) >#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) >#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) > >#define IPOPT_CONTROL 0x00 >#define IPOPT_RESERVED1 0x20 >#define IPOPT_MEASUREMENT 0x40 >#define IPOPT_RESERVED2 0x60 > >#define IPOPT_END (0 |IPOPT_CONTROL) >#define IPOPT_NOOP (1 |IPOPT_CONTROL) >#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY) >#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY) >#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT) >#define IPOPT_CIPSO (6 |IPOPT_CONTROL|IPOPT_COPY) >#define IPOPT_RR (7 |IPOPT_CONTROL) >#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY) >#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY) >#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY) > >#define IPVERSION 4 >#define MAXTTL 255 >#define IPDEFTTL 64 > >#define IPOPT_OPTVAL 0 >#define IPOPT_OLEN 1 >#define IPOPT_OFFSET 2 >#define IPOPT_MINOFF 4 >#define MAX_IPOPTLEN 40 >#define IPOPT_NOP IPOPT_NOOP >#define IPOPT_EOL IPOPT_END >#define IPOPT_TS IPOPT_TIMESTAMP > >#define IPOPT_TS_TSONLY 0 >#define IPOPT_TS_TSANDADDR 1 >#define IPOPT_TS_PRESPEC 3 > >#define IPV4_BEET_PHMAXLEN 8 > >struct iphdr { > > __u8 ihl:4, > version:4; > > > > > > > __u8 tos; > __be16 tot_len; > __be16 id; > __be16 frag_off; > __u8 ttl; > __u8 protocol; > __sum16 check; > __be32 saddr; > __be32 daddr; > >}; > >struct ip_auth_hdr { > __u8 nexthdr; > __u8 hdrlen; > __be16 reserved; > __be32 spi; > __be32 seq_no; > __u8 auth_data[0]; >}; > >struct ip_esp_hdr { > __be32 spi; > __be32 seq_no; > __u8 enc_data[0]; >}; > >struct ip_comp_hdr { > __u8 nexthdr; > __u8 flags; > __be16 cpi; >}; > >struct ip_beet_phdr { > __u8 nexthdr; > __u8 hdrlen; > __u8 padlen; > __u8 reserved; >}; ># 27 "include/net/ip.h" 2 > > ># 1 "include/net/inet_sock.h" 1 ># 17 "include/net/inet_sock.h" >#define _INET_SOCK_H > > > > > ># 1 "include/net/flow.h" 1 > > > > > > > >#define _NET_FLOW_H > ># 1 "include/linux/in6.h" 1 ># 11 "include/net/flow.h" 2 > > >struct flowi { > int oif; > int iif; > __u32 mark; > > union { > struct { > __be32 daddr; > __be32 saddr; > __u8 tos; > __u8 scope; > } ip4_u; > > struct { > struct in6_addr daddr; > struct in6_addr saddr; > __be32 flowlabel; > } ip6_u; > > struct { > __le16 daddr; > __le16 saddr; > __u8 scope; > } dn_u; > } nl_u; >#define fld_dst nl_u.dn_u.daddr >#define fld_src nl_u.dn_u.saddr >#define fld_scope nl_u.dn_u.scope >#define fl6_dst nl_u.ip6_u.daddr >#define fl6_src nl_u.ip6_u.saddr >#define fl6_flowlabel nl_u.ip6_u.flowlabel >#define fl4_dst nl_u.ip4_u.daddr >#define fl4_src nl_u.ip4_u.saddr >#define fl4_tos nl_u.ip4_u.tos >#define fl4_scope nl_u.ip4_u.scope > > __u8 proto; > __u8 flags; >#define FLOWI_FLAG_MULTIPATHOLDROUTE 0x01 > union { > struct { > __be16 sport; > __be16 dport; > } ports; > > struct { > __u8 type; > __u8 code; > } icmpt; > > struct { > __le16 sport; > __le16 dport; > } dnports; > > __be32 spi; > > > > > > > } uli_u; >#define fl_ip_sport uli_u.ports.sport >#define fl_ip_dport uli_u.ports.dport >#define fl_icmp_type uli_u.icmpt.type >#define fl_icmp_code uli_u.icmpt.code >#define fl_ipsec_spi uli_u.spi > > > > __u32 secid; >} __attribute__((__aligned__(32/8))); > >#define FLOW_DIR_IN 0 >#define FLOW_DIR_OUT 1 >#define FLOW_DIR_FWD 2 > >struct sock; >typedef int (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir, > void **objp, atomic_t **obj_refp); > >extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, > flow_resolve_t resolver); >extern void flow_cache_flush(void); >extern atomic_t flow_cache_genid; ># 24 "include/net/inet_sock.h" 2 ># 1 "include/net/sock.h" 1 ># 41 "include/net/sock.h" >#define _SOCK_H ># 51 "include/net/sock.h" ># 1 "include/linux/security.h" 1 ># 23 "include/linux/security.h" >#define __LINUX_SECURITY_H > > ># 1 "include/linux/binfmts.h" 1 > >#define _LINUX_BINFMTS_H > > > >struct pt_regs; > > > > > > >#define MAX_ARG_PAGES 32 > > >#define BINPRM_BUF_SIZE 128 > > > > > > >struct linux_binprm{ > char buf[128]; > struct page *page[32]; > struct mm_struct *mm; > unsigned long p; > int sh_bang; > struct file * file; > int e_uid, e_gid; > kernel_cap_t cap_inheritable, cap_permitted, cap_effective; > void *security; > int argc, envc; > char * filename; > char * interp; > > > unsigned interp_flags; > unsigned interp_data; > unsigned long loader, exec; >}; > >#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 >#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) > > >#define BINPRM_FLAGS_EXECFD_BIT 1 >#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT) > > > > > > >struct linux_binfmt { > struct linux_binfmt * next; > struct module *module; > int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); > int (*load_shlib)(struct file *); > int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); > unsigned long min_coredump; >}; > >extern int register_binfmt(struct linux_binfmt *); >extern int unregister_binfmt(struct linux_binfmt *); > >extern int prepare_binprm(struct linux_binprm *); >extern void remove_arg_zero(struct linux_binprm *); >extern int search_binary_handler(struct linux_binprm *,struct pt_regs *); >extern int flush_old_exec(struct linux_binprm * bprm); > >extern int suid_dumpable; >#define SUID_DUMP_DISABLE 0 >#define SUID_DUMP_USER 1 >#define SUID_DUMP_ROOT 2 > > >#define EXSTACK_DEFAULT 0 >#define EXSTACK_DISABLE_X 1 >#define EXSTACK_ENABLE_X 2 > >extern int setup_arg_pages(struct linux_binprm * bprm, > unsigned long stack_top, > int executable_stack); >extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); >extern void compute_creds(struct linux_binprm *binprm); >extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); >extern int set_binfmt(struct linux_binfmt *new); ># 27 "include/linux/security.h" 2 > > > ># 1 "include/linux/shm.h" 1 > >#define _LINUX_SHM_H_ ># 13 "include/linux/shm.h" >#define SHMMAX 0x2000000 >#define SHMMIN 1 >#define SHMMNI 4096 >#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) >#define SHMSEG SHMMNI > ># 1 "include/asm/shmparam.h" 1 > >#define __UM_SHMPARAM_H > ># 1 "include/asm/arch/shmparam.h" 1 > >#define _ASMI386_SHMPARAM_H > >#define SHMLBA PAGE_SIZE ># 5 "include/asm/shmparam.h" 2 ># 20 "include/linux/shm.h" 2 > > >struct shmid_ds { > struct ipc_perm shm_perm; > int shm_segsz; > __kernel_time_t shm_atime; > __kernel_time_t shm_dtime; > __kernel_time_t shm_ctime; > __kernel_ipc_pid_t shm_cpid; > __kernel_ipc_pid_t shm_lpid; > unsigned short shm_nattch; > unsigned short shm_unused; > void *shm_unused2; > void *shm_unused3; >}; > > ># 1 "include/asm/shmbuf.h" 1 > >#define __UM_SHMBUF_H > ># 1 "include/asm/arch/shmbuf.h" 1 > >#define _I386_SHMBUF_H ># 14 "include/asm/arch/shmbuf.h" >struct shmid64_ds { > struct ipc64_perm shm_perm; > size_t shm_segsz; > __kernel_time_t shm_atime; > unsigned long __unused1; > __kernel_time_t shm_dtime; > unsigned long __unused2; > __kernel_time_t shm_ctime; > unsigned long __unused3; > __kernel_pid_t shm_cpid; > __kernel_pid_t shm_lpid; > unsigned long shm_nattch; > unsigned long __unused4; > unsigned long __unused5; >}; > >struct shminfo64 { > unsigned long shmmax; > unsigned long shmmin; > unsigned long shmmni; > unsigned long shmseg; > unsigned long shmall; > unsigned long __unused1; > unsigned long __unused2; > unsigned long __unused3; > unsigned long __unused4; >}; ># 5 "include/asm/shmbuf.h" 2 ># 38 "include/linux/shm.h" 2 > > >#define SHM_R 0400 >#define SHM_W 0200 > > >#define SHM_RDONLY 010000 >#define SHM_RND 020000 >#define SHM_REMAP 040000 >#define SHM_EXEC 0100000 > > >#define SHM_LOCK 11 >#define SHM_UNLOCK 12 > > >#define SHM_STAT 13 >#define SHM_INFO 14 > > >struct shminfo { > int shmmax; > int shmmin; > int shmmni; > int shmseg; > int shmall; >}; > >struct shm_info { > int used_ids; > unsigned long shm_tot; > unsigned long shm_rss; > unsigned long shm_swp; > unsigned long swap_attempts; > unsigned long swap_successes; >}; > > >struct shmid_kernel >{ > struct kern_ipc_perm shm_perm; > struct file * shm_file; > int id; > unsigned long shm_nattch; > unsigned long shm_segsz; > time_t shm_atim; > time_t shm_dtim; > time_t shm_ctim; > pid_t shm_cprid; > pid_t shm_lprid; > struct user_struct *mlock_user; >}; > > >#define SHM_DEST 01000 >#define SHM_LOCKED 02000 >#define SHM_HUGETLB 04000 >#define SHM_NORESERVE 010000 > > >long do_shmat(int shmid, char *shmaddr, int shmflg, unsigned long *addr); ># 31 "include/linux/security.h" 2 ># 1 "include/linux/msg.h" 1 > >#define _LINUX_MSG_H > > > > >#define MSG_STAT 11 >#define MSG_INFO 12 > > >#define MSG_NOERROR 010000 >#define MSG_EXCEPT 020000 > > >struct msqid_ds { > struct ipc_perm msg_perm; > struct msg *msg_first; > struct msg *msg_last; > __kernel_time_t msg_stime; > __kernel_time_t msg_rtime; > __kernel_time_t msg_ctime; > unsigned long msg_lcbytes; > unsigned long msg_lqbytes; > unsigned short msg_cbytes; > unsigned short msg_qnum; > unsigned short msg_qbytes; > __kernel_ipc_pid_t msg_lspid; > __kernel_ipc_pid_t msg_lrpid; >}; > > ># 1 "include/asm/msgbuf.h" 1 > >#define __UM_MSGBUF_H > ># 1 "include/asm/arch/msgbuf.h" 1 > >#define _I386_MSGBUF_H ># 14 "include/asm/arch/msgbuf.h" >struct msqid64_ds { > struct ipc64_perm msg_perm; > __kernel_time_t msg_stime; > unsigned long __unused1; > __kernel_time_t msg_rtime; > unsigned long __unused2; > __kernel_time_t msg_ctime; > unsigned long __unused3; > unsigned long msg_cbytes; > unsigned long msg_qnum; > unsigned long msg_qbytes; > __kernel_pid_t msg_lspid; > __kernel_pid_t msg_lrpid; > unsigned long __unused4; > unsigned long __unused5; >}; ># 5 "include/asm/msgbuf.h" 2 ># 33 "include/linux/msg.h" 2 > > >struct msgbuf { > long mtype; > char mtext[1]; >}; > > >struct msginfo { > int msgpool; > int msgmap; > int msgmax; > int msgmnb; > int msgmni; > int msgssz; > int msgtql; > unsigned short msgseg; >}; > >#define MSGMNI 16 >#define MSGMAX 8192 >#define MSGMNB 16384 > > >#define MSGPOOL (MSGMNI*MSGMNB/1024) >#define MSGTQL MSGMNB >#define MSGMAP MSGMNB >#define MSGSSZ 16 >#define __MSGSEG ((MSGPOOL*1024)/ MSGSSZ) >#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) > > > > > >struct msg_msg { > struct list_head m_list; > long m_type; > int m_ts; > struct msg_msgseg* next; > void *security; > >}; > > >struct msg_queue { > struct kern_ipc_perm q_perm; > int q_id; > time_t q_stime; > time_t q_rtime; > time_t q_ctime; > unsigned long q_cbytes; > unsigned long q_qnum; > unsigned long q_qbytes; > pid_t q_lspid; > pid_t q_lrpid; > > struct list_head q_messages; > struct list_head q_receivers; > struct list_head q_senders; >}; > > >extern long do_msgsnd(int msqid, long mtype, void *mtext, > size_t msgsz, int msgflg); >extern long do_msgrcv(int msqid, long *pmtype, void *mtext, > size_t msgsz, long msgtyp, int msgflg); ># 32 "include/linux/security.h" 2 > ># 1 "include/linux/key.h" 1 ># 16 "include/linux/key.h" >#define _LINUX_KEY_H ># 27 "include/linux/key.h" >typedef int32_t key_serial_t; > > >typedef uint32_t key_perm_t; > >struct key; ># 359 "include/linux/key.h" >#define key_validate(k) 0 >#define key_serial(k) 0 >#define key_get(k) ({ NULL; }) >#define key_put(k) do { } while(0) >#define key_ref_put(k) do { } while(0) >#define make_key_ref(k) ({ NULL; }) >#define key_ref_to_ptr(k) ({ NULL; }) >#define is_key_possessed(k) 0 >#define alloc_uid_keyring(u,c) 0 >#define switch_uid_keyring(u) do { } while(0) >#define __install_session_keyring(t,k) ({ NULL; }) >#define copy_keys(f,t) 0 >#define copy_thread_group_keys(t) 0 >#define exit_keys(t) do { } while(0) >#define exit_thread_group_keys(tg) do { } while(0) >#define suid_keys(t) do { } while(0) >#define exec_keys(t) do { } while(0) >#define key_fsuid_changed(t) do { } while(0) >#define key_fsgid_changed(t) do { } while(0) >#define key_init() do { } while(0) > > >extern struct key root_user_keyring; >extern struct key root_session_keyring; ># 34 "include/linux/security.h" 2 ># 1 "include/linux/xfrm.h" 1 > >#define _LINUX_XFRM_H ># 13 "include/linux/xfrm.h" >typedef union >{ > __be32 a4; > __be32 a6[4]; >} xfrm_address_t; > > > > > >struct xfrm_id >{ > xfrm_address_t daddr; > __be32 spi; > __u8 proto; >}; > >struct xfrm_sec_ctx { > __u8 ctx_doi; > __u8 ctx_alg; > __u16 ctx_len; > __u32 ctx_sid; > char ctx_str[0]; >}; > > >#define XFRM_SC_DOI_RESERVED 0 >#define XFRM_SC_DOI_LSM 1 > > >#define XFRM_SC_ALG_RESERVED 0 >#define XFRM_SC_ALG_SELINUX 1 > > > >struct xfrm_selector >{ > xfrm_address_t daddr; > xfrm_address_t saddr; > __be16 dport; > __be16 dport_mask; > __be16 sport; > __be16 sport_mask; > __u16 family; > __u8 prefixlen_d; > __u8 prefixlen_s; > __u8 proto; > int ifindex; > uid_t user; >}; > >#define XFRM_INF (~(__u64)0) > >struct xfrm_lifetime_cfg >{ > __u64 soft_byte_limit; > __u64 hard_byte_limit; > __u64 soft_packet_limit; > __u64 hard_packet_limit; > __u64 soft_add_expires_seconds; > __u64 hard_add_expires_seconds; > __u64 soft_use_expires_seconds; > __u64 hard_use_expires_seconds; >}; > >struct xfrm_lifetime_cur >{ > __u64 bytes; > __u64 packets; > __u64 add_time; > __u64 use_time; >}; > >struct xfrm_replay_state >{ > __u32 oseq; > __u32 seq; > __u32 bitmap; >}; > >struct xfrm_algo { > char alg_name[64]; > int alg_key_len; > char alg_key[0]; >}; > >struct xfrm_stats { > __u32 replay_window; > __u32 replay; > __u32 integrity_failed; >}; > >enum >{ > XFRM_POLICY_TYPE_MAIN = 0, > XFRM_POLICY_TYPE_SUB = 1, > XFRM_POLICY_TYPE_MAX = 2 >}; > >enum >{ > XFRM_POLICY_IN = 0, > XFRM_POLICY_OUT = 1, > XFRM_POLICY_FWD = 2, > XFRM_POLICY_MAX = 3 >}; > >enum >{ > XFRM_SHARE_ANY, > XFRM_SHARE_SESSION, > XFRM_SHARE_USER, > XFRM_SHARE_UNIQUE >}; > >#define XFRM_MODE_TRANSPORT 0 >#define XFRM_MODE_TUNNEL 1 >#define XFRM_MODE_ROUTEOPTIMIZATION 2 >#define XFRM_MODE_IN_TRIGGER 3 >#define XFRM_MODE_BEET 4 >#define XFRM_MODE_MAX 5 > > >enum { > XFRM_MSG_BASE = 0x10, > > XFRM_MSG_NEWSA = 0x10, >#define XFRM_MSG_NEWSA XFRM_MSG_NEWSA > XFRM_MSG_DELSA, >#define XFRM_MSG_DELSA XFRM_MSG_DELSA > XFRM_MSG_GETSA, >#define XFRM_MSG_GETSA XFRM_MSG_GETSA > > XFRM_MSG_NEWPOLICY, >#define XFRM_MSG_NEWPOLICY XFRM_MSG_NEWPOLICY > XFRM_MSG_DELPOLICY, >#define XFRM_MSG_DELPOLICY XFRM_MSG_DELPOLICY > XFRM_MSG_GETPOLICY, >#define XFRM_MSG_GETPOLICY XFRM_MSG_GETPOLICY > > XFRM_MSG_ALLOCSPI, >#define XFRM_MSG_ALLOCSPI XFRM_MSG_ALLOCSPI > XFRM_MSG_ACQUIRE, >#define XFRM_MSG_ACQUIRE XFRM_MSG_ACQUIRE > XFRM_MSG_EXPIRE, >#define XFRM_MSG_EXPIRE XFRM_MSG_EXPIRE > > XFRM_MSG_UPDPOLICY, >#define XFRM_MSG_UPDPOLICY XFRM_MSG_UPDPOLICY > XFRM_MSG_UPDSA, >#define XFRM_MSG_UPDSA XFRM_MSG_UPDSA > > XFRM_MSG_POLEXPIRE, >#define XFRM_MSG_POLEXPIRE XFRM_MSG_POLEXPIRE > > XFRM_MSG_FLUSHSA, >#define XFRM_MSG_FLUSHSA XFRM_MSG_FLUSHSA > XFRM_MSG_FLUSHPOLICY, >#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY > > XFRM_MSG_NEWAE, >#define XFRM_MSG_NEWAE XFRM_MSG_NEWAE > XFRM_MSG_GETAE, >#define XFRM_MSG_GETAE XFRM_MSG_GETAE > > XFRM_MSG_REPORT, >#define XFRM_MSG_REPORT XFRM_MSG_REPORT > > __XFRM_MSG_MAX >}; >#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) > >#define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE) > > > > > >struct xfrm_user_sec_ctx { > __u16 len; > __u16 exttype; > __u8 ctx_alg; > __u8 ctx_doi; > __u16 ctx_len; >}; > >struct xfrm_user_tmpl { > struct xfrm_id id; > __u16 family; > xfrm_address_t saddr; > __u32 reqid; > __u8 mode; > __u8 share; > __u8 optional; > __u32 aalgos; > __u32 ealgos; > __u32 calgos; >}; > >struct xfrm_encap_tmpl { > __u16 encap_type; > __be16 encap_sport; > __be16 encap_dport; > xfrm_address_t encap_oa; >}; > > >enum xfrm_ae_ftype_t { > XFRM_AE_UNSPEC, > XFRM_AE_RTHR=1, > XFRM_AE_RVAL=2, > XFRM_AE_LVAL=4, > XFRM_AE_ETHR=8, > XFRM_AE_CR=16, > XFRM_AE_CE=32, > XFRM_AE_CU=64, > __XFRM_AE_MAX > >#define XFRM_AE_MAX (__XFRM_AE_MAX - 1) >}; > >struct xfrm_userpolicy_type { > __u8 type; > __u16 reserved1; > __u8 reserved2; >}; > > >enum xfrm_attr_type_t { > XFRMA_UNSPEC, > XFRMA_ALG_AUTH, > XFRMA_ALG_CRYPT, > XFRMA_ALG_COMP, > XFRMA_ENCAP, > XFRMA_TMPL, > XFRMA_SA, > XFRMA_POLICY, > XFRMA_SEC_CTX, > XFRMA_LTIME_VAL, > XFRMA_REPLAY_VAL, > XFRMA_REPLAY_THRESH, > XFRMA_ETIMER_THRESH, > XFRMA_SRCADDR, > XFRMA_COADDR, > XFRMA_LASTUSED, > XFRMA_POLICY_TYPE, > __XFRMA_MAX > >#define XFRMA_MAX (__XFRMA_MAX - 1) >}; > >struct xfrm_usersa_info { > struct xfrm_selector sel; > struct xfrm_id id; > xfrm_address_t saddr; > struct xfrm_lifetime_cfg lft; > struct xfrm_lifetime_cur curlft; > struct xfrm_stats stats; > __u32 seq; > __u32 reqid; > __u16 family; > __u8 mode; > __u8 replay_window; > __u8 flags; >#define XFRM_STATE_NOECN 1 >#define XFRM_STATE_DECAP_DSCP 2 >#define XFRM_STATE_NOPMTUDISC 4 >#define XFRM_STATE_WILDRECV 8 >}; > >struct xfrm_usersa_id { > xfrm_address_t daddr; > __be32 spi; > __u16 family; > __u8 proto; >}; > >struct xfrm_aevent_id { > struct xfrm_usersa_id sa_id; > xfrm_address_t saddr; > __u32 flags; > __u32 reqid; >}; > >struct xfrm_userspi_info { > struct xfrm_usersa_info info; > __u32 min; > __u32 max; >}; > >struct xfrm_userpolicy_info { > struct xfrm_selector sel; > struct xfrm_lifetime_cfg lft; > struct xfrm_lifetime_cur curlft; > __u32 priority; > __u32 index; > __u8 dir; > __u8 action; >#define XFRM_POLICY_ALLOW 0 >#define XFRM_POLICY_BLOCK 1 > __u8 flags; >#define XFRM_POLICY_LOCALOK 1 > __u8 share; >}; > >struct xfrm_userpolicy_id { > struct xfrm_selector sel; > __u32 index; > __u8 dir; >}; > >struct xfrm_user_acquire { > struct xfrm_id id; > xfrm_address_t saddr; > struct xfrm_selector sel; > struct xfrm_userpolicy_info policy; > __u32 aalgos; > __u32 ealgos; > __u32 calgos; > __u32 seq; >}; > >struct xfrm_user_expire { > struct xfrm_usersa_info state; > __u8 hard; >}; > >struct xfrm_user_polexpire { > struct xfrm_userpolicy_info pol; > __u8 hard; >}; > >struct xfrm_usersa_flush { > __u8 proto; >}; > >struct xfrm_user_report { > __u8 proto; > struct xfrm_selector sel; >}; ># 363 "include/linux/xfrm.h" >enum xfrm_nlgroups { > XFRMNLGRP_NONE, >#define XFRMNLGRP_NONE XFRMNLGRP_NONE > XFRMNLGRP_ACQUIRE, >#define XFRMNLGRP_ACQUIRE XFRMNLGRP_ACQUIRE > XFRMNLGRP_EXPIRE, >#define XFRMNLGRP_EXPIRE XFRMNLGRP_EXPIRE > XFRMNLGRP_SA, >#define XFRMNLGRP_SA XFRMNLGRP_SA > XFRMNLGRP_POLICY, >#define XFRMNLGRP_POLICY XFRMNLGRP_POLICY > XFRMNLGRP_AEVENTS, >#define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS > XFRMNLGRP_REPORT, >#define XFRMNLGRP_REPORT XFRMNLGRP_REPORT > __XFRMNLGRP_MAX >}; >#define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) ># 35 "include/linux/security.h" 2 > > >struct ctl_table; > > > > > >extern int cap_capable (struct task_struct *tsk, int cap); >extern int cap_settime (struct timespec *ts, struct timezone *tz); >extern int cap_ptrace (struct task_struct *parent, struct task_struct *child); >extern int cap_capget (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); >extern int cap_capset_check (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); >extern void cap_capset_set (struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); >extern int cap_bprm_set_security (struct linux_binprm *bprm); >extern void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe); >extern int cap_bprm_secureexec(struct linux_binprm *bprm); >extern int cap_inode_setxattr(struct dentry *dentry, char *name, void *value, size_t size, int flags); >extern int cap_inode_removexattr(struct dentry *dentry, char *name); >extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); >extern void cap_task_reparent_to_init (struct task_struct *p); >extern int cap_syslog (int type); >extern int cap_vm_enough_memory (long pages); > >struct msghdr; >struct sk_buff; >struct sock; >struct sockaddr; >struct socket; >struct flowi; >struct dst_entry; >struct xfrm_selector; >struct xfrm_policy; >struct xfrm_state; >struct xfrm_user_sec_ctx; > >extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); >extern int cap_netlink_recv(struct sk_buff *skb, int cap); > > > > > >#define LSM_SETID_ID 1 > > >#define LSM_SETID_RE 2 > > >#define LSM_SETID_RES 4 > > >#define LSM_SETID_FS 8 > > >struct nfsctl_arg; >struct sched_param; >struct swap_info_struct; >struct request_sock; > > >#define LSM_UNSAFE_SHARE 1 >#define LSM_UNSAFE_PTRACE 2 >#define LSM_UNSAFE_PTRACE_CAP 4 ># 2145 "include/linux/security.h" >static inline __attribute__((always_inline)) int security_init(void) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_ptrace (struct task_struct *parent, struct task_struct * child) >{ > return cap_ptrace (parent, child); >} > >static inline __attribute__((always_inline)) int security_capget (struct task_struct *target, > kernel_cap_t *effective, > kernel_cap_t *inheritable, > kernel_cap_t *permitted) >{ > return cap_capget (target, effective, inheritable, permitted); >} > >static inline __attribute__((always_inline)) int security_capset_check (struct task_struct *target, > kernel_cap_t *effective, > kernel_cap_t *inheritable, > kernel_cap_t *permitted) >{ > return cap_capset_check (target, effective, inheritable, permitted); >} > >static inline __attribute__((always_inline)) void security_capset_set (struct task_struct *target, > kernel_cap_t *effective, > kernel_cap_t *inheritable, > kernel_cap_t *permitted) >{ > cap_capset_set (target, effective, inheritable, permitted); >} > >static inline __attribute__((always_inline)) int security_capable(struct task_struct *tsk, int cap) >{ > return cap_capable(tsk, cap); >} > >static inline __attribute__((always_inline)) int security_acct (struct file *file) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sysctl(struct ctl_table *table, int op) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_quotactl (int cmds, int type, int id, > struct super_block * sb) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_quota_on (struct dentry * dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_syslog(int type) >{ > return cap_syslog(type); >} > >static inline __attribute__((always_inline)) int security_settime(struct timespec *ts, struct timezone *tz) >{ > return cap_settime(ts, tz); >} > >static inline __attribute__((always_inline)) int security_vm_enough_memory(long pages) >{ > return cap_vm_enough_memory(pages); >} > >static inline __attribute__((always_inline)) int security_bprm_alloc (struct linux_binprm *bprm) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_bprm_free (struct linux_binprm *bprm) >{ } > >static inline __attribute__((always_inline)) void security_bprm_apply_creds (struct linux_binprm *bprm, int unsafe) >{ > cap_bprm_apply_creds (bprm, unsafe); >} > >static inline __attribute__((always_inline)) void security_bprm_post_apply_creds (struct linux_binprm *bprm) >{ > return; >} > >static inline __attribute__((always_inline)) int security_bprm_set (struct linux_binprm *bprm) >{ > return cap_bprm_set_security (bprm); >} > >static inline __attribute__((always_inline)) int security_bprm_check (struct linux_binprm *bprm) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_bprm_secureexec (struct linux_binprm *bprm) >{ > return cap_bprm_secureexec(bprm); >} > >static inline __attribute__((always_inline)) int security_sb_alloc (struct super_block *sb) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_sb_free (struct super_block *sb) >{ } > >static inline __attribute__((always_inline)) int security_sb_copy_data (struct file_system_type *type, > void *orig, void *copy) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sb_kern_mount (struct super_block *sb, void *data) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sb_statfs (struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sb_mount (char *dev_name, struct nameidata *nd, > char *type, unsigned long flags, > void *data) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sb_check_sb (struct vfsmount *mnt, > struct nameidata *nd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sb_umount (struct vfsmount *mnt, int flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_sb_umount_close (struct vfsmount *mnt) >{ } > >static inline __attribute__((always_inline)) void security_sb_umount_busy (struct vfsmount *mnt) >{ } > >static inline __attribute__((always_inline)) void security_sb_post_remount (struct vfsmount *mnt, > unsigned long flags, void *data) >{ } > >static inline __attribute__((always_inline)) void security_sb_post_mountroot (void) >{ } > >static inline __attribute__((always_inline)) void security_sb_post_addmount (struct vfsmount *mnt, > struct nameidata *mountpoint_nd) >{ } > >static inline __attribute__((always_inline)) int security_sb_pivotroot (struct nameidata *old_nd, > struct nameidata *new_nd) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_sb_post_pivotroot (struct nameidata *old_nd, > struct nameidata *new_nd) >{ } > >static inline __attribute__((always_inline)) int security_inode_alloc (struct inode *inode) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_inode_free (struct inode *inode) >{ } > >static inline __attribute__((always_inline)) int security_inode_init_security (struct inode *inode, > struct inode *dir, > char **name, > void **value, > size_t *len) >{ > return -95; >} > >static inline __attribute__((always_inline)) int security_inode_create (struct inode *dir, > struct dentry *dentry, > int mode) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_link (struct dentry *old_dentry, > struct inode *dir, > struct dentry *new_dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_unlink (struct inode *dir, > struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_symlink (struct inode *dir, > struct dentry *dentry, > const char *old_name) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_mkdir (struct inode *dir, > struct dentry *dentry, > int mode) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_rmdir (struct inode *dir, > struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_mknod (struct inode *dir, > struct dentry *dentry, > int mode, dev_t dev) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_rename (struct inode *old_dir, > struct dentry *old_dentry, > struct inode *new_dir, > struct dentry *new_dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_readlink (struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_follow_link (struct dentry *dentry, > struct nameidata *nd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_permission (struct inode *inode, int mask, > struct nameidata *nd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_setattr (struct dentry *dentry, > struct iattr *attr) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_getattr (struct vfsmount *mnt, > struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_inode_delete (struct inode *inode) >{ } > >static inline __attribute__((always_inline)) int security_inode_setxattr (struct dentry *dentry, char *name, > void *value, size_t size, int flags) >{ > return cap_inode_setxattr(dentry, name, value, size, flags); >} > >static inline __attribute__((always_inline)) void security_inode_post_setxattr (struct dentry *dentry, char *name, > void *value, size_t size, int flags) >{ } > >static inline __attribute__((always_inline)) int security_inode_getxattr (struct dentry *dentry, char *name) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_listxattr (struct dentry *dentry) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_inode_removexattr (struct dentry *dentry, char *name) >{ > return cap_inode_removexattr(dentry, name); >} > >static inline __attribute__((always_inline)) const char *security_inode_xattr_getsuffix (void) >{ > return ((void *)0) ; >} > >static inline __attribute__((always_inline)) int security_inode_getsecurity(const struct inode *inode, const char *name, void *buffer, size_t size, int err) >{ > return -95; >} > >static inline __attribute__((always_inline)) int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) >{ > return -95; >} > >static inline __attribute__((always_inline)) int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_permission (struct file *file, int mask) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_alloc (struct file *file) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_file_free (struct file *file) >{ } > >static inline __attribute__((always_inline)) int security_file_ioctl (struct file *file, unsigned int cmd, > unsigned long arg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_mmap (struct file *file, unsigned long reqprot, > unsigned long prot, > unsigned long flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_mprotect (struct vm_area_struct *vma, > unsigned long reqprot, > unsigned long prot) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_lock (struct file *file, unsigned int cmd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_fcntl (struct file *file, unsigned int cmd, > unsigned long arg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_set_fowner (struct file *file) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_send_sigiotask (struct task_struct *tsk, > struct fown_struct *fown, > int sig) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_file_receive (struct file *file) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_create (unsigned long clone_flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_alloc (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_task_free (struct task_struct *p) >{ } > >static inline __attribute__((always_inline)) int security_task_setuid (uid_t id0, uid_t id1, uid_t id2, > int flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_post_setuid (uid_t old_ruid, uid_t old_euid, > uid_t old_suid, int flags) >{ > return cap_task_post_setuid (old_ruid, old_euid, old_suid, flags); >} > >static inline __attribute__((always_inline)) int security_task_setgid (gid_t id0, gid_t id1, gid_t id2, > int flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_setpgid (struct task_struct *p, pid_t pgid) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_getpgid (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_getsid (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_task_getsecid (struct task_struct *p, u32 *secid) >{ } > >static inline __attribute__((always_inline)) int security_task_setgroups (struct group_info *group_info) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_setnice (struct task_struct *p, int nice) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_setioprio (struct task_struct *p, int ioprio) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_getioprio (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_setrlimit (unsigned int resource, > struct rlimit *new_rlim) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_setscheduler (struct task_struct *p, > int policy, > struct sched_param *lp) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_getscheduler (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_movememory (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_kill (struct task_struct *p, > struct siginfo *info, int sig, > u32 secid) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_wait (struct task_struct *p) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_task_prctl (int option, unsigned long arg2, > unsigned long arg3, > unsigned long arg4, > unsigned long arg5) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_task_reparent_to_init (struct task_struct *p) >{ > cap_task_reparent_to_init (p); >} > >static inline __attribute__((always_inline)) void security_task_to_inode(struct task_struct *p, struct inode *inode) >{ } > >static inline __attribute__((always_inline)) int security_ipc_permission (struct kern_ipc_perm *ipcp, > short flag) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_msg_msg_alloc (struct msg_msg * msg) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_msg_msg_free (struct msg_msg * msg) >{ } > >static inline __attribute__((always_inline)) int security_msg_queue_alloc (struct msg_queue *msq) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_msg_queue_free (struct msg_queue *msq) >{ } > >static inline __attribute__((always_inline)) int security_msg_queue_associate (struct msg_queue * msq, > int msqflg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_msg_queue_msgctl (struct msg_queue * msq, int cmd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_msg_queue_msgsnd (struct msg_queue * msq, > struct msg_msg * msg, int msqflg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_msg_queue_msgrcv (struct msg_queue * msq, > struct msg_msg * msg, > struct task_struct * target, > long type, int mode) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_shm_alloc (struct shmid_kernel *shp) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_shm_free (struct shmid_kernel *shp) >{ } > >static inline __attribute__((always_inline)) int security_shm_associate (struct shmid_kernel * shp, > int shmflg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_shm_shmctl (struct shmid_kernel * shp, int cmd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_shm_shmat (struct shmid_kernel * shp, > char *shmaddr, int shmflg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sem_alloc (struct sem_array *sma) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_sem_free (struct sem_array *sma) >{ } > >static inline __attribute__((always_inline)) int security_sem_associate (struct sem_array * sma, int semflg) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sem_semctl (struct sem_array * sma, int cmd) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_sem_semop (struct sem_array * sma, > struct sembuf * sops, unsigned nsops, > int alter) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_d_instantiate (struct dentry *dentry, struct inode *inode) >{ } > >static inline __attribute__((always_inline)) int security_getprocattr(struct task_struct *p, char *name, void *value, size_t size) >{ > return -22; >} > >static inline __attribute__((always_inline)) int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size) >{ > return -22; >} > >static inline __attribute__((always_inline)) int security_netlink_send (struct sock *sk, struct sk_buff *skb) >{ > return cap_netlink_send (sk, skb); >} > >static inline __attribute__((always_inline)) int security_netlink_recv (struct sk_buff *skb, int cap) >{ > return cap_netlink_recv (skb, cap); >} > >static inline __attribute__((always_inline)) struct dentry *securityfs_create_dir(const char *name, > struct dentry *parent) >{ > return ERR_PTR(-19); >} > >static inline __attribute__((always_inline)) struct dentry *securityfs_create_file(const char *name, > mode_t mode, > struct dentry *parent, > void *data, > struct file_operations *fops) >{ > return ERR_PTR(-19); >} > >static inline __attribute__((always_inline)) void securityfs_remove(struct dentry *dentry) >{ >} > >static inline __attribute__((always_inline)) int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) >{ > return -95; >} > >static inline __attribute__((always_inline)) void security_release_secctx(char *secdata, u32 seclen) >{ >} ># 2967 "include/linux/security.h" >static inline __attribute__((always_inline)) int security_unix_stream_connect(struct socket * sock, > struct socket * other, > struct sock * newsk) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_unix_may_send(struct socket * sock, > struct socket * other) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_create (int family, int type, > int protocol, int kern) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_post_create(struct socket * sock, > int family, > int type, > int protocol, int kern) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_bind(struct socket * sock, > struct sockaddr * address, > int addrlen) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_connect(struct socket * sock, > struct sockaddr * address, > int addrlen) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_listen(struct socket * sock, int backlog) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_accept(struct socket * sock, > struct socket * newsock) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_socket_post_accept(struct socket * sock, > struct socket * newsock) >{ >} > >static inline __attribute__((always_inline)) int security_socket_sendmsg(struct socket * sock, > struct msghdr * msg, int size) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_recvmsg(struct socket * sock, > struct msghdr * msg, int size, > int flags) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_getsockname(struct socket * sock) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_getpeername(struct socket * sock) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_getsockopt(struct socket * sock, > int level, int optname) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_setsockopt(struct socket * sock, > int level, int optname) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_shutdown(struct socket * sock, int how) >{ > return 0; >} >static inline __attribute__((always_inline)) int security_sock_rcv_skb (struct sock * sk, > struct sk_buff * skb) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_socket_getpeersec_stream(struct socket *sock, char *optval, > int *optlen, unsigned len) >{ > return -92; >} > >static inline __attribute__((always_inline)) int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) >{ > return -92; >} > >static inline __attribute__((always_inline)) int security_sk_alloc(struct sock *sk, int family, gfp_t priority) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_sk_free(struct sock *sk) >{ >} > >static inline __attribute__((always_inline)) void security_sk_clone(const struct sock *sk, struct sock *newsk) >{ >} > >static inline __attribute__((always_inline)) void security_sk_classify_flow(struct sock *sk, struct flowi *fl) >{ >} > >static inline __attribute__((always_inline)) void security_req_classify_flow(const struct request_sock *req, struct flowi *fl) >{ >} > >static inline __attribute__((always_inline)) void security_sock_graft(struct sock* sk, struct socket *parent) >{ >} > >static inline __attribute__((always_inline)) int security_inet_conn_request(struct sock *sk, > struct sk_buff *skb, struct request_sock *req) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_inet_csk_clone(struct sock *newsk, > const struct request_sock *req) >{ >} > >static inline __attribute__((always_inline)) void security_inet_conn_established(struct sock *sk, > struct sk_buff *skb) >{ >} ># 3194 "include/linux/security.h" >static inline __attribute__((always_inline)) int security_xfrm_policy_alloc(struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_xfrm_policy_clone(struct xfrm_policy *old, struct xfrm_policy *new) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_xfrm_policy_free(struct xfrm_policy *xp) >{ >} > >static inline __attribute__((always_inline)) int security_xfrm_policy_delete(struct xfrm_policy *xp) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_xfrm_state_alloc(struct xfrm_state *x, > struct xfrm_user_sec_ctx *sec_ctx) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_xfrm_state_alloc_acquire(struct xfrm_state *x, > struct xfrm_sec_ctx *polsec, u32 secid) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_xfrm_state_free(struct xfrm_state *x) >{ >} > >static inline __attribute__((always_inline)) int security_xfrm_state_delete(struct xfrm_state *x) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 fl_secid, u8 dir) >{ > return 0; >} > >static inline __attribute__((always_inline)) int security_xfrm_state_pol_flow_match(struct xfrm_state *x, > struct xfrm_policy *xp, struct flowi *fl) >{ > return 1; >} > >static inline __attribute__((always_inline)) int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) >{ > return 0; >} > >static inline __attribute__((always_inline)) void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl) >{ >} ># 52 "include/net/sock.h" 2 > ># 1 "include/linux/filter.h" 1 > > > > > >#define __LINUX_FILTER_H__ ># 18 "include/linux/filter.h" >#define BPF_MAJOR_VERSION 1 >#define BPF_MINOR_VERSION 1 > > > > > > >struct sock_filter >{ > __u16 code; > __u8 jt; > __u8 jf; > __u32 k; >}; > >struct sock_fprog >{ > unsigned short len; > struct sock_filter *filter; >}; > > >struct sk_filter >{ > atomic_t refcnt; > unsigned int len; > struct rcu_head rcu; > struct sock_filter insns[0]; >}; > >static inline __attribute__((always_inline)) unsigned int sk_filter_len(struct sk_filter *fp) >{ > return fp->len*sizeof(struct sock_filter) + sizeof(*fp); >} > > > > > > >#define BPF_CLASS(code) ((code) & 0x07) >#define BPF_LD 0x00 >#define BPF_LDX 0x01 >#define BPF_ST 0x02 >#define BPF_STX 0x03 >#define BPF_ALU 0x04 >#define BPF_JMP 0x05 >#define BPF_RET 0x06 >#define BPF_MISC 0x07 > > >#define BPF_SIZE(code) ((code) & 0x18) >#define BPF_W 0x00 >#define BPF_H 0x08 >#define BPF_B 0x10 >#define BPF_MODE(code) ((code) & 0xe0) >#define BPF_IMM 0x00 >#define BPF_ABS 0x20 >#define BPF_IND 0x40 >#define BPF_MEM 0x60 >#define BPF_LEN 0x80 >#define BPF_MSH 0xa0 > > >#define BPF_OP(code) ((code) & 0xf0) >#define BPF_ADD 0x00 >#define BPF_SUB 0x10 >#define BPF_MUL 0x20 >#define BPF_DIV 0x30 >#define BPF_OR 0x40 >#define BPF_AND 0x50 >#define BPF_LSH 0x60 >#define BPF_RSH 0x70 >#define BPF_NEG 0x80 >#define BPF_JA 0x00 >#define BPF_JEQ 0x10 >#define BPF_JGT 0x20 >#define BPF_JGE 0x30 >#define BPF_JSET 0x40 >#define BPF_SRC(code) ((code) & 0x08) >#define BPF_K 0x00 >#define BPF_X 0x08 > > >#define BPF_RVAL(code) ((code) & 0x18) >#define BPF_A 0x10 > > >#define BPF_MISCOP(code) ((code) & 0xf8) >#define BPF_TAX 0x00 >#define BPF_TXA 0x80 > > >#define BPF_MAXINSNS 4096 > > > > > > >#define BPF_STMT(code,k) { (unsigned short)(code), 0, 0, k } > > >#define BPF_JUMP(code,k,jt,jf) { (unsigned short)(code), jt, jf, k } > > > > > >#define BPF_MEMWORDS 16 > > > > > > >#define SKF_AD_OFF (-0x1000) >#define SKF_AD_PROTOCOL 0 >#define SKF_AD_PKTTYPE 4 >#define SKF_AD_IFINDEX 8 >#define SKF_AD_MAX 12 >#define SKF_NET_OFF (-0x100000) >#define SKF_LL_OFF (-0x200000) > > >struct sk_buff; >struct sock; > >extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); >extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); >extern int sk_chk_filter(struct sock_filter *filter, int flen); ># 54 "include/net/sock.h" 2 > > ># 1 "include/net/dst.h" 1 ># 9 "include/net/dst.h" >#define _NET_DST_H > > ># 1 "include/linux/rtnetlink.h" 1 > >#define __LINUX_RTNETLINK_H > ># 1 "include/linux/netlink.h" 1 > >#define __LINUX_NETLINK_H > > > > >#define NETLINK_ROUTE 0 >#define NETLINK_UNUSED 1 >#define NETLINK_USERSOCK 2 >#define NETLINK_FIREWALL 3 >#define NETLINK_INET_DIAG 4 >#define NETLINK_NFLOG 5 >#define NETLINK_XFRM 6 >#define NETLINK_SELINUX 7 >#define NETLINK_ISCSI 8 >#define NETLINK_AUDIT 9 >#define NETLINK_FIB_LOOKUP 10 >#define NETLINK_CONNECTOR 11 >#define NETLINK_NETFILTER 12 >#define NETLINK_IP6_FW 13 >#define NETLINK_DNRTMSG 14 >#define NETLINK_KOBJECT_UEVENT 15 >#define NETLINK_GENERIC 16 > >#define NETLINK_SCSITRANSPORT 18 > >#define MAX_LINKS 32 > >struct sockaddr_nl >{ > sa_family_t nl_family; > unsigned short nl_pad; > __u32 nl_pid; > __u32 nl_groups; >}; > >struct nlmsghdr >{ > __u32 nlmsg_len; > __u16 nlmsg_type; > __u16 nlmsg_flags; > __u32 nlmsg_seq; > __u32 nlmsg_pid; >}; > > > >#define NLM_F_REQUEST 1 >#define NLM_F_MULTI 2 >#define NLM_F_ACK 4 >#define NLM_F_ECHO 8 > > >#define NLM_F_ROOT 0x100 >#define NLM_F_MATCH 0x200 >#define NLM_F_ATOMIC 0x400 >#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) > > >#define NLM_F_REPLACE 0x100 >#define NLM_F_EXCL 0x200 >#define NLM_F_CREATE 0x400 >#define NLM_F_APPEND 0x800 ># 74 "include/linux/netlink.h" >#define NLMSG_ALIGNTO 4 >#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) >#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) >#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) >#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) >#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) >#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) > >#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) > > >#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) > >#define NLMSG_NOOP 0x1 >#define NLMSG_ERROR 0x2 >#define NLMSG_DONE 0x3 >#define NLMSG_OVERRUN 0x4 > >#define NLMSG_MIN_TYPE 0x10 > >struct nlmsgerr >{ > int error; > struct nlmsghdr msg; >}; > >#define NETLINK_ADD_MEMBERSHIP 1 >#define NETLINK_DROP_MEMBERSHIP 2 >#define NETLINK_PKTINFO 3 > >struct nl_pktinfo >{ > __u32 group; >}; > >#define NET_MAJOR 36 > >enum { > NETLINK_UNCONNECTED = 0, > NETLINK_CONNECTED, >}; ># 125 "include/linux/netlink.h" >struct nlattr >{ > __u16 nla_len; > __u16 nla_type; >}; > >#define NLA_ALIGNTO 4 >#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) >#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) > > > > > > >struct netlink_skb_parms >{ > struct ucred creds; > __u32 pid; > __u32 dst_group; > kernel_cap_t eff_cap; > __u32 loginuid; > __u32 sid; >}; > >#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) >#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) > > >extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*input)(struct sock *sk, int len), struct module *module); >extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); >extern int netlink_has_listeners(struct sock *sk, unsigned int group); >extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); >extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, > __u32 group, gfp_t allocation); >extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); >extern int netlink_register_notifier(struct notifier_block *nb); >extern int netlink_unregister_notifier(struct notifier_block *nb); > > >struct sock *netlink_getsockbyfilp(struct file *filp); >int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, > long timeo, struct sock *ssk); >void netlink_detachskb(struct sock *sk, struct sk_buff *skb); >int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); > > > > >#define NLMSG_GOODORDER 0 >#define NLMSG_GOODSIZE (SKB_MAX_ORDER(0, NLMSG_GOODORDER)) >#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) > > >struct netlink_callback >{ > struct sk_buff *skb; > struct nlmsghdr *nlh; > int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); > int (*done)(struct netlink_callback *cb); > int family; > long args[5]; >}; > >struct netlink_notify >{ > int pid; > int protocol; >}; > >static __inline__ __attribute__((always_inline)) struct nlmsghdr * >__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) >{ > struct nlmsghdr *nlh; > int size = ((len)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )); > > nlh = (struct nlmsghdr*)skb_put(skb, ( ((size)+4 -1) & ~(4 -1) )); > nlh->nlmsg_type = type; > nlh->nlmsg_len = size; > nlh->nlmsg_flags = flags; > nlh->nlmsg_pid = pid; > nlh->nlmsg_seq = seq; > (__builtin_constant_p(0) ? (__builtin_constant_p((( ((size)+4 -1) & ~(4 -1) ) - size)) ? __constant_c_and_count_memset(((((void*)(((char*)nlh) + ((0)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )))) + len)),((0x01010101UL*(unsigned char)(0))),((( ((size)+4 -1) & ~(4 -1) ) - size))) : __constant_c_memset(((((void*)(((char*)nlh) + ((0)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )))) + len)),((0x01010101UL*(unsigned char)(0))),((( ((size)+4 -1) & ~(4 -1) ) - size)))) : (__builtin_constant_p((( ((size)+4 -1) & ~(4 -1) ) - size)) ? __memset_generic((((((void*)(((char*)nlh) + ((0)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )))) + len))),(((0))),(((( ((size)+4 -1) & ~(4 -1) ) - size)))) : __memset_generic(((((void*)(((char*)nlh) + ((0)+( ((((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )))+4 -1) & ~(4 -1) )))) + len)),((0)),((( ((size)+4 -1) & ~(4 -1) ) - size))))); > return nlh; >} > >#define NLMSG_NEW(skb,pid,seq,type,len,flags) ({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) goto nlmsg_failure; __nlmsg_put(skb, pid, seq, type, len, flags); }) > > > > >#define NLMSG_PUT(skb,pid,seq,type,len) NLMSG_NEW(skb, pid, seq, type, len, 0) > > >#define NLMSG_NEW_ANSWER(skb,cb,type,len,flags) NLMSG_NEW(skb, NETLINK_CB((cb)->skb).pid, (cb)->nlh->nlmsg_seq, type, len, flags) > > > >#define NLMSG_END(skb,nlh) ({ (nlh)->nlmsg_len = (skb)->tail - (unsigned char *) (nlh); (skb)->len; }) > > > >#define NLMSG_CANCEL(skb,nlh) ({ skb_trim(skb, (unsigned char *) (nlh) - (skb)->data); -1; }) > > > >extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, > struct nlmsghdr *nlh, > int (*dump)(struct sk_buff *skb, struct netlink_callback*), > int (*done)(struct netlink_callback*)); > > >#define NL_NONROOT_RECV 0x1 >#define NL_NONROOT_SEND 0x2 >extern void netlink_set_nonroot(int protocol, unsigned flag); ># 5 "include/linux/rtnetlink.h" 2 ># 1 "include/linux/if_link.h" 1 > >#define _LINUX_IF_LINK_H > > > > >struct rtnl_link_stats >{ > __u32 rx_packets; > __u32 tx_packets; > __u32 rx_bytes; > __u32 tx_bytes; > __u32 rx_errors; > __u32 tx_errors; > __u32 rx_dropped; > __u32 tx_dropped; > __u32 multicast; > __u32 collisions; > > > __u32 rx_length_errors; > __u32 rx_over_errors; > __u32 rx_crc_errors; > __u32 rx_frame_errors; > __u32 rx_fifo_errors; > __u32 rx_missed_errors; > > > __u32 tx_aborted_errors; > __u32 tx_carrier_errors; > __u32 tx_fifo_errors; > __u32 tx_heartbeat_errors; > __u32 tx_window_errors; > > > __u32 rx_compressed; > __u32 tx_compressed; >}; > > >struct rtnl_link_ifmap >{ > __u64 mem_start; > __u64 mem_end; > __u64 base_addr; > __u16 irq; > __u8 dma; > __u8 port; >}; > >enum >{ > IFLA_UNSPEC, > IFLA_ADDRESS, > IFLA_BROADCAST, > IFLA_IFNAME, > IFLA_MTU, > IFLA_LINK, > IFLA_QDISC, > IFLA_STATS, > IFLA_COST, >#define IFLA_COST IFLA_COST > IFLA_PRIORITY, >#define IFLA_PRIORITY IFLA_PRIORITY > IFLA_MASTER, >#define IFLA_MASTER IFLA_MASTER > IFLA_WIRELESS, >#define IFLA_WIRELESS IFLA_WIRELESS > IFLA_PROTINFO, >#define IFLA_PROTINFO IFLA_PROTINFO > IFLA_TXQLEN, >#define IFLA_TXQLEN IFLA_TXQLEN > IFLA_MAP, >#define IFLA_MAP IFLA_MAP > IFLA_WEIGHT, >#define IFLA_WEIGHT IFLA_WEIGHT > IFLA_OPERSTATE, > IFLA_LINKMODE, > __IFLA_MAX >}; > > >#define IFLA_MAX (__IFLA_MAX - 1) ># 121 "include/linux/if_link.h" >enum >{ > IFLA_INET6_UNSPEC, > IFLA_INET6_FLAGS, > IFLA_INET6_CONF, > IFLA_INET6_STATS, > IFLA_INET6_MCAST, > IFLA_INET6_CACHEINFO, > __IFLA_INET6_MAX >}; > >#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) > >struct ifla_cacheinfo >{ > __u32 max_reasm_len; > __u32 tstamp; > __u32 reachable_time; > __u32 retrans_time; >}; ># 6 "include/linux/rtnetlink.h" 2 ># 1 "include/linux/if_addr.h" 1 > >#define __LINUX_IF_ADDR_H > > > >struct ifaddrmsg >{ > __u8 ifa_family; > __u8 ifa_prefixlen; > __u8 ifa_flags; > __u8 ifa_scope; > __u32 ifa_index; >}; ># 22 "include/linux/if_addr.h" >enum >{ > IFA_UNSPEC, > IFA_ADDRESS, > IFA_LOCAL, > IFA_LABEL, > IFA_BROADCAST, > IFA_ANYCAST, > IFA_CACHEINFO, > IFA_MULTICAST, > __IFA_MAX, >}; > >#define IFA_MAX (__IFA_MAX - 1) > > >#define IFA_F_SECONDARY 0x01 >#define IFA_F_TEMPORARY IFA_F_SECONDARY > >#define IFA_F_NODAD 0x02 >#define IFA_F_HOMEADDRESS 0x10 >#define IFA_F_DEPRECATED 0x20 >#define IFA_F_TENTATIVE 0x40 >#define IFA_F_PERMANENT 0x80 > >struct ifa_cacheinfo >{ > __u32 ifa_prefered; > __u32 ifa_valid; > __u32 cstamp; > __u32 tstamp; >}; ># 7 "include/linux/rtnetlink.h" 2 ># 1 "include/linux/neighbour.h" 1 > >#define __LINUX_NEIGHBOUR_H > > > >struct ndmsg >{ > __u8 ndm_family; > __u8 ndm_pad1; > __u16 ndm_pad2; > __s32 ndm_ifindex; > __u16 ndm_state; > __u8 ndm_flags; > __u8 ndm_type; >}; > >enum >{ > NDA_UNSPEC, > NDA_DST, > NDA_LLADDR, > NDA_CACHEINFO, > NDA_PROBES, > __NDA_MAX >}; > >#define NDA_MAX (__NDA_MAX - 1) > > > > > >#define NTF_PROXY 0x08 >#define NTF_ROUTER 0x80 > > > > > >#define NUD_INCOMPLETE 0x01 >#define NUD_REACHABLE 0x02 >#define NUD_STALE 0x04 >#define NUD_DELAY 0x08 >#define NUD_PROBE 0x10 >#define NUD_FAILED 0x20 > > >#define NUD_NOARP 0x40 >#define NUD_PERMANENT 0x80 >#define NUD_NONE 0x00 > > > > > > >struct nda_cacheinfo >{ > __u32 ndm_confirmed; > __u32 ndm_used; > __u32 ndm_updated; > __u32 ndm_refcnt; >}; ># 90 "include/linux/neighbour.h" >struct ndt_stats >{ > __u64 ndts_allocs; > __u64 ndts_destroys; > __u64 ndts_hash_grows; > __u64 ndts_res_failed; > __u64 ndts_lookups; > __u64 ndts_hits; > __u64 ndts_rcv_probes_mcast; > __u64 ndts_rcv_probes_ucast; > __u64 ndts_periodic_gc_runs; > __u64 ndts_forced_gc_runs; >}; > >enum { > NDTPA_UNSPEC, > NDTPA_IFINDEX, > NDTPA_REFCNT, > NDTPA_REACHABLE_TIME, > NDTPA_BASE_REACHABLE_TIME, > NDTPA_RETRANS_TIME, > NDTPA_GC_STALETIME, > NDTPA_DELAY_PROBE_TIME, > NDTPA_QUEUE_LEN, > NDTPA_APP_PROBES, > NDTPA_UCAST_PROBES, > NDTPA_MCAST_PROBES, > NDTPA_ANYCAST_DELAY, > NDTPA_PROXY_DELAY, > NDTPA_PROXY_QLEN, > NDTPA_LOCKTIME, > __NDTPA_MAX >}; >#define NDTPA_MAX (__NDTPA_MAX - 1) > >struct ndtmsg >{ > __u8 ndtm_family; > __u8 ndtm_pad1; > __u16 ndtm_pad2; >}; > >struct ndt_config >{ > __u16 ndtc_key_len; > __u16 ndtc_entry_size; > __u32 ndtc_entries; > __u32 ndtc_last_flush; > __u32 ndtc_last_rand; > __u32 ndtc_hash_rnd; > __u32 ndtc_hash_mask; > __u32 ndtc_hash_chain_gc; > __u32 ndtc_proxy_qlen; >}; > >enum { > NDTA_UNSPEC, > NDTA_NAME, > NDTA_THRESH1, > NDTA_THRESH2, > NDTA_THRESH3, > NDTA_CONFIG, > NDTA_PARMS, > NDTA_STATS, > NDTA_GC_INTERVAL, > __NDTA_MAX >}; >#define NDTA_MAX (__NDTA_MAX - 1) ># 8 "include/linux/rtnetlink.h" 2 > > > > > > > >enum { > RTM_BASE = 16, >#define RTM_BASE RTM_BASE > > RTM_NEWLINK = 16, >#define RTM_NEWLINK RTM_NEWLINK > RTM_DELLINK, >#define RTM_DELLINK RTM_DELLINK > RTM_GETLINK, >#define RTM_GETLINK RTM_GETLINK > RTM_SETLINK, >#define RTM_SETLINK RTM_SETLINK > > RTM_NEWADDR = 20, >#define RTM_NEWADDR RTM_NEWADDR > RTM_DELADDR, >#define RTM_DELADDR RTM_DELADDR > RTM_GETADDR, >#define RTM_GETADDR RTM_GETADDR > > RTM_NEWROUTE = 24, >#define RTM_NEWROUTE RTM_NEWROUTE > RTM_DELROUTE, >#define RTM_DELROUTE RTM_DELROUTE > RTM_GETROUTE, >#define RTM_GETROUTE RTM_GETROUTE > > RTM_NEWNEIGH = 28, >#define RTM_NEWNEIGH RTM_NEWNEIGH > RTM_DELNEIGH, >#define RTM_DELNEIGH RTM_DELNEIGH > RTM_GETNEIGH, >#define RTM_GETNEIGH RTM_GETNEIGH > > RTM_NEWRULE = 32, >#define RTM_NEWRULE RTM_NEWRULE > RTM_DELRULE, >#define RTM_DELRULE RTM_DELRULE > RTM_GETRULE, >#define RTM_GETRULE RTM_GETRULE > > RTM_NEWQDISC = 36, >#define RTM_NEWQDISC RTM_NEWQDISC > RTM_DELQDISC, >#define RTM_DELQDISC RTM_DELQDISC > RTM_GETQDISC, >#define RTM_GETQDISC RTM_GETQDISC > > RTM_NEWTCLASS = 40, >#define RTM_NEWTCLASS RTM_NEWTCLASS > RTM_DELTCLASS, >#define RTM_DELTCLASS RTM_DELTCLASS > RTM_GETTCLASS, >#define RTM_GETTCLASS RTM_GETTCLASS > > RTM_NEWTFILTER = 44, >#define RTM_NEWTFILTER RTM_NEWTFILTER > RTM_DELTFILTER, >#define RTM_DELTFILTER RTM_DELTFILTER > RTM_GETTFILTER, >#define RTM_GETTFILTER RTM_GETTFILTER > > RTM_NEWACTION = 48, >#define RTM_NEWACTION RTM_NEWACTION > RTM_DELACTION, >#define RTM_DELACTION RTM_DELACTION > RTM_GETACTION, >#define RTM_GETACTION RTM_GETACTION > > RTM_NEWPREFIX = 52, >#define RTM_NEWPREFIX RTM_NEWPREFIX > > RTM_GETMULTICAST = 58, >#define RTM_GETMULTICAST RTM_GETMULTICAST > > RTM_GETANYCAST = 62, >#define RTM_GETANYCAST RTM_GETANYCAST > > RTM_NEWNEIGHTBL = 64, >#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL > RTM_GETNEIGHTBL = 66, >#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL > RTM_SETNEIGHTBL, >#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL > > __RTM_MAX, >#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) >}; > >#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE) >#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) >#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2) > > > > > > > >struct rtattr >{ > unsigned short rta_len; > unsigned short rta_type; >}; > > > >#define RTA_ALIGNTO 4 >#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) >#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) > > >#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) > >#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) >#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) >#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) >#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) ># 141 "include/linux/rtnetlink.h" >struct rtmsg >{ > unsigned char rtm_family; > unsigned char rtm_dst_len; > unsigned char rtm_src_len; > unsigned char rtm_tos; > > unsigned char rtm_table; > unsigned char rtm_protocol; > unsigned char rtm_scope; > unsigned char rtm_type; > > unsigned rtm_flags; >}; > > > >enum >{ > RTN_UNSPEC, > RTN_UNICAST, > RTN_LOCAL, > RTN_BROADCAST, > > RTN_ANYCAST, > > RTN_MULTICAST, > RTN_BLACKHOLE, > RTN_UNREACHABLE, > RTN_PROHIBIT, > RTN_THROW, > RTN_NAT, > RTN_XRESOLVE, > __RTN_MAX >}; > >#define RTN_MAX (__RTN_MAX - 1) > > > > >#define RTPROT_UNSPEC 0 >#define RTPROT_REDIRECT 1 > >#define RTPROT_KERNEL 2 >#define RTPROT_BOOT 3 >#define RTPROT_STATIC 4 ># 196 "include/linux/rtnetlink.h" >#define RTPROT_GATED 8 >#define RTPROT_RA 9 >#define RTPROT_MRT 10 >#define RTPROT_ZEBRA 11 >#define RTPROT_BIRD 12 >#define RTPROT_DNROUTED 13 >#define RTPROT_XORP 14 >#define RTPROT_NTK 15 ># 216 "include/linux/rtnetlink.h" >enum rt_scope_t >{ > RT_SCOPE_UNIVERSE=0, > > RT_SCOPE_SITE=200, > RT_SCOPE_LINK=253, > RT_SCOPE_HOST=254, > RT_SCOPE_NOWHERE=255 >}; > > > >#define RTM_F_NOTIFY 0x100 >#define RTM_F_CLONED 0x200 >#define RTM_F_EQUALIZE 0x400 >#define RTM_F_PREFIX 0x800 > > > >enum rt_class_t >{ > RT_TABLE_UNSPEC=0, > > RT_TABLE_DEFAULT=253, > RT_TABLE_MAIN=254, > RT_TABLE_LOCAL=255, > RT_TABLE_MAX=0xFFFFFFFF >}; > > > > >enum rtattr_type_t >{ > RTA_UNSPEC, > RTA_DST, > RTA_SRC, > RTA_IIF, > RTA_OIF, > RTA_GATEWAY, > RTA_PRIORITY, > RTA_PREFSRC, > RTA_METRICS, > RTA_MULTIPATH, > RTA_PROTOINFO, > RTA_FLOW, > RTA_CACHEINFO, > RTA_SESSION, > RTA_MP_ALGO, > RTA_TABLE, > __RTA_MAX >}; > >#define RTA_MAX (__RTA_MAX - 1) > >#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) >#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg)) ># 283 "include/linux/rtnetlink.h" >struct rtnexthop >{ > unsigned short rtnh_len; > unsigned char rtnh_flags; > unsigned char rtnh_hops; > int rtnh_ifindex; >}; > > > >#define RTNH_F_DEAD 1 >#define RTNH_F_PERVASIVE 2 >#define RTNH_F_ONLINK 4 > > > >#define RTNH_ALIGNTO 4 >#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) >#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && ((int)(rtnh)->rtnh_len) <= (len)) > >#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) >#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) >#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) >#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) > > > >struct rta_cacheinfo >{ > __u32 rta_clntref; > __u32 rta_lastuse; > __s32 rta_expires; > __u32 rta_error; > __u32 rta_used; > >#define RTNETLINK_HAVE_PEERINFO 1 > __u32 rta_id; > __u32 rta_ts; > __u32 rta_tsage; >}; > > > >enum >{ > RTAX_UNSPEC, >#define RTAX_UNSPEC RTAX_UNSPEC > RTAX_LOCK, >#define RTAX_LOCK RTAX_LOCK > RTAX_MTU, >#define RTAX_MTU RTAX_MTU > RTAX_WINDOW, >#define RTAX_WINDOW RTAX_WINDOW > RTAX_RTT, >#define RTAX_RTT RTAX_RTT > RTAX_RTTVAR, >#define RTAX_RTTVAR RTAX_RTTVAR > RTAX_SSTHRESH, >#define RTAX_SSTHRESH RTAX_SSTHRESH > RTAX_CWND, >#define RTAX_CWND RTAX_CWND > RTAX_ADVMSS, >#define RTAX_ADVMSS RTAX_ADVMSS > RTAX_REORDERING, >#define RTAX_REORDERING RTAX_REORDERING > RTAX_HOPLIMIT, >#define RTAX_HOPLIMIT RTAX_HOPLIMIT > RTAX_INITCWND, >#define RTAX_INITCWND RTAX_INITCWND > RTAX_FEATURES, >#define RTAX_FEATURES RTAX_FEATURES > __RTAX_MAX >}; > >#define RTAX_MAX (__RTAX_MAX - 1) > >#define RTAX_FEATURE_ECN 0x00000001 >#define RTAX_FEATURE_SACK 0x00000002 >#define RTAX_FEATURE_TIMESTAMP 0x00000004 >#define RTAX_FEATURE_ALLFRAG 0x00000008 > >struct rta_session >{ > __u8 proto; > __u8 pad1; > __u16 pad2; > > union { > struct { > __u16 sport; > __u16 dport; > } ports; > > struct { > __u8 type; > __u8 code; > __u16 ident; > } icmpt; > > __u32 spi; > } u; >}; > > > > > >struct rtgenmsg >{ > unsigned char rtgen_family; >}; ># 404 "include/linux/rtnetlink.h" >struct ifinfomsg >{ > unsigned char ifi_family; > unsigned char __ifi_pad; > unsigned short ifi_type; > int ifi_index; > unsigned ifi_flags; > unsigned ifi_change; >}; > > > > > >struct prefixmsg >{ > unsigned char prefix_family; > unsigned char prefix_pad1; > unsigned short prefix_pad2; > int prefix_ifindex; > unsigned char prefix_type; > unsigned char prefix_len; > unsigned char prefix_flags; > unsigned char prefix_pad3; >}; > >enum >{ > PREFIX_UNSPEC, > PREFIX_ADDRESS, > PREFIX_CACHEINFO, > __PREFIX_MAX >}; > >#define PREFIX_MAX (__PREFIX_MAX - 1) > >struct prefix_cacheinfo >{ > __u32 preferred_time; > __u32 valid_time; >}; > > > > > > >struct tcmsg >{ > unsigned char tcm_family; > unsigned char tcm__pad1; > unsigned short tcm__pad2; > int tcm_ifindex; > __u32 tcm_handle; > __u32 tcm_parent; > __u32 tcm_info; >}; > >enum >{ > TCA_UNSPEC, > TCA_KIND, > TCA_OPTIONS, > TCA_STATS, > TCA_XSTATS, > TCA_RATE, > TCA_FCNT, > TCA_STATS2, > __TCA_MAX >}; > >#define TCA_MAX (__TCA_MAX - 1) > >#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) >#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) ># 504 "include/linux/rtnetlink.h" >enum rtnetlink_groups { > RTNLGRP_NONE, >#define RTNLGRP_NONE RTNLGRP_NONE > RTNLGRP_LINK, >#define RTNLGRP_LINK RTNLGRP_LINK > RTNLGRP_NOTIFY, >#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY > RTNLGRP_NEIGH, >#define RTNLGRP_NEIGH RTNLGRP_NEIGH > RTNLGRP_TC, >#define RTNLGRP_TC RTNLGRP_TC > RTNLGRP_IPV4_IFADDR, >#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR > RTNLGRP_IPV4_MROUTE, >#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE > RTNLGRP_IPV4_ROUTE, >#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE > RTNLGRP_IPV4_RULE, >#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE > RTNLGRP_IPV6_IFADDR, >#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR > RTNLGRP_IPV6_MROUTE, >#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE > RTNLGRP_IPV6_ROUTE, >#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE > RTNLGRP_IPV6_IFINFO, >#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO > RTNLGRP_DECnet_IFADDR, >#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR > RTNLGRP_NOP2, > RTNLGRP_DECnet_ROUTE, >#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE > RTNLGRP_DECnet_RULE, >#define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE > RTNLGRP_NOP4, > RTNLGRP_IPV6_PREFIX, >#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX > RTNLGRP_IPV6_RULE, >#define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE > __RTNLGRP_MAX >}; >#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) > > >struct tcamsg >{ > unsigned char tca_family; > unsigned char tca__pad1; > unsigned short tca__pad2; >}; >#define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) >#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) >#define TCA_ACT_TAB 1 >#define TCAA_MAX 1 > > > > > > > >extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); >static __inline__ __attribute__((always_inline)) int rtattr_strcmp(const struct rtattr *rta, const char *str) >{ > int len = strlen(str) + 1; > return len > rta->rta_len || __builtin_memcmp(((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))), str, len); >} > >extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); > >#define rtattr_parse_nested(tb,max,rta) rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) > > >struct rtnetlink_link >{ > int (*doit)(struct sk_buff *, struct nlmsghdr*, void *attr); > int (*dumpit)(struct sk_buff *, struct netlink_callback *cb); >}; > >extern struct rtnetlink_link * rtnetlink_links[32]; >extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); >extern int rtnl_unicast(struct sk_buff *skb, u32 pid); >extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group, > struct nlmsghdr *nlh, gfp_t flags); >extern void rtnl_set_sk_err(u32 group, int error); >extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); >extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, > u32 id, u32 ts, u32 tsage, long expires, > u32 error); > >extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); > >#define RTA_PUT(skb,attrtype,attrlen,data) ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) goto rtattr_failure; __rta_fill(skb, attrtype, attrlen, data); }) > > > > >#define RTA_APPEND(skb,attrlen,data) ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) goto rtattr_failure; memcpy(skb_put(skb, attrlen), data, attrlen); }) > > > > >#define RTA_PUT_NOHDR(skb,attrlen,data) ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); memset(skb->tail - (RTA_ALIGN(attrlen) - attrlen), 0, RTA_ALIGN(attrlen) - attrlen); }) > > > > >#define RTA_PUT_U8(skb,attrtype,value) ({ u8 _tmp = (value); RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); }) > > > >#define RTA_PUT_U16(skb,attrtype,value) ({ u16 _tmp = (value); RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); }) > > > >#define RTA_PUT_U32(skb,attrtype,value) ({ u32 _tmp = (value); RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); }) > > > >#define RTA_PUT_U64(skb,attrtype,value) ({ u64 _tmp = (value); RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); }) > > > >#define RTA_PUT_SECS(skb,attrtype,value) RTA_PUT_U64(skb, attrtype, (value) / HZ) > > >#define RTA_PUT_MSECS(skb,attrtype,value) RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value)) > > >#define RTA_PUT_STRING(skb,attrtype,value) RTA_PUT(skb, attrtype, strlen(value) + 1, value) > > >#define RTA_PUT_FLAG(skb,attrtype) RTA_PUT(skb, attrtype, 0, NULL); > > >#define RTA_NEST(skb,type) ({ struct rtattr *__start = (struct rtattr *) (skb)->tail; RTA_PUT(skb, type, 0, NULL); __start; }) > > > > >#define RTA_NEST_END(skb,start) ({ (start)->rta_len = ((skb)->tail - (unsigned char *) (start)); (skb)->len; }) > > > >#define RTA_NEST_CANCEL(skb,start) ({ if (start) skb_trim(skb, (unsigned char *) (start) - (skb)->data); -1; }) > > > > >#define RTA_GET_U8(rta) ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) goto rtattr_failure; *(u8 *) RTA_DATA(rta); }) > > > > >#define RTA_GET_U16(rta) ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) goto rtattr_failure; *(u16 *) RTA_DATA(rta); }) > > > > >#define RTA_GET_U32(rta) ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) goto rtattr_failure; *(u32 *) RTA_DATA(rta); }) > > > > >#define RTA_GET_U64(rta) ({ u64 _tmp; if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) goto rtattr_failure; memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); _tmp; }) > > > > > > >#define RTA_GET_FLAG(rta) (!!(rta)) > >#define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ) >#define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta))) > >static inline __attribute__((always_inline)) struct rtattr * >__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) >{ > struct rtattr *rta; > int size = (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (attrlen)); > > rta = (struct rtattr*)skb_put(skb, ( ((size)+4 -1) & ~(4 -1) )); > rta->rta_type = attrtype; > rta->rta_len = size; > (__builtin_constant_p(0) ? (__builtin_constant_p((( ((size)+4 -1) & ~(4 -1) ) - size)) ? __constant_c_and_count_memset(((((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))) + attrlen)),((0x01010101UL*(unsigned char)(0))),((( ((size)+4 -1) & ~(4 -1) ) - size))) : __constant_c_memset(((((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))) + attrlen)),((0x01010101UL*(unsigned char)(0))),((( ((size)+4 -1) & ~(4 -1) ) - size)))) : (__builtin_constant_p((( ((size)+4 -1) & ~(4 -1) ) - size)) ? __memset_generic((((((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))) + attrlen))),(((0))),(((( ((size)+4 -1) & ~(4 -1) ) - size)))) : __memset_generic(((((void*)(((char*)(rta)) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))) + attrlen)),((0)),((( ((size)+4 -1) & ~(4 -1) ) - size))))); > return rta; >} > >#define __RTA_PUT(skb,attrtype,attrlen) ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) goto rtattr_failure; __rta_reserve(skb, attrtype, attrlen); }) > > > > >extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change); > > >extern void rtnl_lock(void); >extern void rtnl_unlock(void); >extern int rtnl_trylock(void); > >extern void rtnetlink_init(void); >extern void __rtnl_unlock(void); > >#define ASSERT_RTNL() do { if (unlikely(rtnl_trylock())) { rtnl_unlock(); printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", __FILE__, __LINE__); dump_stack(); } } while(0) ># 717 "include/linux/rtnetlink.h" >#define BUG_TRAP(x) do { if (unlikely(!(x))) { printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", #x, __FILE__ , __LINE__); } } while(0) > > > > > > >static inline __attribute__((always_inline)) u32 rtm_get_table(struct rtattr **rta, u8 table) >{ > return ({ if (!rta[RTA_TABLE-1] || ((int)((rta[RTA_TABLE-1])->rta_len) - (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0))) < sizeof(u32)) goto rtattr_failure; *(u32 *) ((void*)(((char*)(rta[RTA_TABLE-1])) + (( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + (0)))); }); >rtattr_failure: > return table; >} ># 13 "include/net/dst.h" 2 > > ># 1 "include/net/neighbour.h" 1 > >#define _NET_NEIGHBOUR_H ># 23 "include/net/neighbour.h" ># 1 "include/linux/seq_file.h" 1 > >#define _LINUX_SEQ_FILE_H > > > > > > >struct seq_operations; >struct file; >struct vfsmount; >struct dentry; >struct inode; > >struct seq_file { > char *buf; > size_t size; > size_t from; > size_t count; > loff_t index; > loff_t version; > struct mutex lock; > const struct seq_operations *op; > void *private; >}; > >struct seq_operations { > void * (*start) (struct seq_file *m, loff_t *pos); > void (*stop) (struct seq_file *m, void *v); > void * (*next) (struct seq_file *m, void *v, loff_t *pos); > int (*show) (struct seq_file *m, void *v); >}; > >int seq_open(struct file *, const struct seq_operations *); >ssize_t seq_read(struct file *, char *, size_t, loff_t *); >loff_t seq_lseek(struct file *, loff_t, int); >int seq_release(struct inode *, struct file *); >int seq_escape(struct seq_file *, const char *, const char *); >int seq_putc(struct seq_file *m, char c); >int seq_puts(struct seq_file *m, const char *s); > >int seq_printf(struct seq_file *, const char *, ...) > __attribute__ ((format (printf,2,3))); > >int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *); > >int single_open(struct file *, int (*)(struct seq_file *, void *), void *); >int single_release(struct inode *, struct file *); >int seq_release_private(struct inode *, struct file *); > >#define SEQ_START_TOKEN ((void *)1) ># 24 "include/net/neighbour.h" 2 > > > > >#define NUD_IN_TIMER (NUD_INCOMPLETE|NUD_REACHABLE|NUD_DELAY|NUD_PROBE) >#define NUD_VALID (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY) >#define NUD_CONNECTED (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE) > >struct neighbour; > >struct neigh_parms >{ > struct net_device *dev; > struct neigh_parms *next; > int (*neigh_setup)(struct neighbour *); > void (*neigh_destructor)(struct neighbour *); > struct neigh_table *tbl; > > void *sysctl_table; > > int dead; > atomic_t refcnt; > struct rcu_head rcu_head; > > int base_reachable_time; > int retrans_time; > int gc_staletime; > int reachable_time; > int delay_probe_time; > > int queue_len; > int ucast_probes; > int app_probes; > int mcast_probes; > int anycast_delay; > int proxy_delay; > int proxy_qlen; > int locktime; >}; > >struct neigh_statistics >{ > unsigned long allocs; > unsigned long destroys; > unsigned long hash_grows; > > unsigned long res_failed; > > unsigned long lookups; > unsigned long hits; > > unsigned long rcv_probes_mcast; > unsigned long rcv_probes_ucast; > > unsigned long periodic_gc_runs; > unsigned long forced_gc_runs; >}; > >#define NEIGH_CACHE_STAT_INC(tbl,field) do { preempt_disable(); (per_cpu_ptr((tbl)->stats, smp_processor_id())->field)++; preempt_enable(); } while (0) > > > > > > >struct neighbour >{ > struct neighbour *next; > struct neigh_table *tbl; > struct neigh_parms *parms; > struct net_device *dev; > unsigned long used; > unsigned long confirmed; > unsigned long updated; > __u8 flags; > __u8 nud_state; > __u8 type; > __u8 dead; > atomic_t probes; > rwlock_t lock; > unsigned char ha[(((32)+((typeof(32))(sizeof(unsigned long))-1))&~((typeof(32))(sizeof(unsigned long))-1))]; > struct hh_cache *hh; > atomic_t refcnt; > int (*output)(struct sk_buff *skb); > struct sk_buff_head arp_queue; > struct timer_list timer; > struct neigh_ops *ops; > u8 primary_key[0]; >}; > >struct neigh_ops >{ > int family; > void (*solicit)(struct neighbour *, struct sk_buff*); > void (*error_report)(struct neighbour *, struct sk_buff*); > int (*output)(struct sk_buff*); > int (*connected_output)(struct sk_buff*); > int (*hh_output)(struct sk_buff*); > int (*queue_xmit)(struct sk_buff*); >}; > >struct pneigh_entry >{ > struct pneigh_entry *next; > struct net_device *dev; > u8 flags; > u8 key[0]; >}; > > > > > > >struct neigh_table >{ > struct neigh_table *next; > int family; > int entry_size; > int key_len; > __u32 (*hash)(const void *pkey, const struct net_device *); > int (*constructor)(struct neighbour *); > int (*pconstructor)(struct pneigh_entry *); > void (*pdestructor)(struct pneigh_entry *); > void (*proxy_redo)(struct sk_buff *skb); > char *id; > struct neigh_parms parms; > > int gc_interval; > int gc_thresh1; > int gc_thresh2; > int gc_thresh3; > unsigned long last_flush; > struct timer_list gc_timer; > struct timer_list proxy_timer; > struct sk_buff_head proxy_queue; > atomic_t entries; > rwlock_t lock; > unsigned long last_rand; > struct kmem_cache *kmem_cachep; > struct neigh_statistics *stats; > struct neighbour **hash_buckets; > unsigned int hash_mask; > __u32 hash_rnd; > unsigned int hash_chain_gc; > struct pneigh_entry **phash_buckets; > > struct proc_dir_entry *pde; > >}; > > >#define NEIGH_UPDATE_F_OVERRIDE 0x00000001 >#define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002 >#define NEIGH_UPDATE_F_OVERRIDE_ISROUTER 0x00000004 >#define NEIGH_UPDATE_F_ISROUTER 0x40000000 >#define NEIGH_UPDATE_F_ADMIN 0x80000000 > >extern void neigh_table_init(struct neigh_table *tbl); >extern void neigh_table_init_no_netlink(struct neigh_table *tbl); >extern int neigh_table_clear(struct neigh_table *tbl); >extern struct neighbour * neigh_lookup(struct neigh_table *tbl, > const void *pkey, > struct net_device *dev); >extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, > const void *pkey); >extern struct neighbour * neigh_create(struct neigh_table *tbl, > const void *pkey, > struct net_device *dev); >extern void neigh_destroy(struct neighbour *neigh); >extern int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb); >extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, > u32 flags); >extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); >extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); >extern int neigh_resolve_output(struct sk_buff *skb); >extern int neigh_connected_output(struct sk_buff *skb); >extern int neigh_compat_output(struct sk_buff *skb); >extern struct neighbour *neigh_event_ns(struct neigh_table *tbl, > u8 *lladdr, void *saddr, > struct net_device *dev); > >extern struct neigh_parms *neigh_parms_alloc(struct net_device *dev, struct neigh_table *tbl); >extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); >extern void neigh_parms_destroy(struct neigh_parms *parms); >extern unsigned long neigh_rand_reach_time(unsigned long base); > >extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, > struct sk_buff *skb); >extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, const void *key, struct net_device *dev, int creat); >extern int pneigh_delete(struct neigh_table *tbl, const void *key, struct net_device *dev); > >struct netlink_callback; >struct nlmsghdr; >extern int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb); >extern int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); >extern int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); >extern void neigh_app_ns(struct neighbour *n); > >extern int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb); >extern int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); > >extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); >extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); >extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); > >struct neigh_seq_state { > struct neigh_table *tbl; > void *(*neigh_sub_iter)(struct neigh_seq_state *state, > struct neighbour *n, loff_t *pos); > unsigned int bucket; > unsigned int flags; >#define NEIGH_SEQ_NEIGH_ONLY 0x00000001 >#define NEIGH_SEQ_IS_PNEIGH 0x00000002 >#define NEIGH_SEQ_SKIP_NOARP 0x00000004 >}; >extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int); >extern void *neigh_seq_next(struct seq_file *, void *, loff_t *); >extern void neigh_seq_stop(struct seq_file *, void *); > >extern int neigh_sysctl_register(struct net_device *dev, > struct neigh_parms *p, > int p_id, int pdev_id, > char *p_name, > proc_handler *proc_handler, > ctl_handler *strategy); >extern void neigh_sysctl_unregister(struct neigh_parms *p); > >static inline __attribute__((always_inline)) void __neigh_parms_put(struct neigh_parms *parms) >{ > atomic_dec(&parms->refcnt); >} > >static inline __attribute__((always_inline)) void neigh_parms_put(struct neigh_parms *parms) >{ > if (atomic_dec_and_test(&parms->refcnt)) > neigh_parms_destroy(parms); >} > >static inline __attribute__((always_inline)) struct neigh_parms *neigh_parms_clone(struct neigh_parms *parms) >{ > atomic_inc(&parms->refcnt); > return parms; >} > > > > > >static inline __attribute__((always_inline)) void neigh_release(struct neighbour *neigh) >{ > if (atomic_dec_and_test(&neigh->refcnt)) > neigh_destroy(neigh); >} > >static inline __attribute__((always_inline)) struct neighbour * neigh_clone(struct neighbour *neigh) >{ > if (neigh) > atomic_inc(&neigh->refcnt); > return neigh; >} > >#define neigh_hold(n) atomic_inc(&(n)->refcnt) > >static inline __attribute__((always_inline)) void neigh_confirm(struct neighbour *neigh) >{ > if (neigh) > neigh->confirmed = jiffies; >} > >static inline __attribute__((always_inline)) int neigh_is_connected(struct neighbour *neigh) >{ > return neigh->nud_state&(0x80|0x40|0x02); >} > >static inline __attribute__((always_inline)) int neigh_is_valid(struct neighbour *neigh) >{ > return neigh->nud_state&(0x80|0x40|0x02|0x10|0x04|0x08); >} > >static inline __attribute__((always_inline)) int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) >{ > neigh->used = jiffies; > if (!(neigh->nud_state&((0x80|0x40|0x02)|0x08|0x10))) > return __neigh_event_send(neigh, skb); > return 0; >} > >static inline __attribute__((always_inline)) int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb) >{ > unsigned seq; > int hh_len; > > do { > int hh_alen; > > seq = read_seqbegin(&hh->hh_lock); > hh_len = hh->hh_len; > hh_alen = (((hh_len)+(16 -1))&~(16 - 1)); > (__builtin_constant_p(hh_alen) ? __constant_memcpy((skb->data - hh_alen),(hh->hh_data),(hh_alen)) : __memcpy((skb->data - hh_alen),(hh->hh_data),(hh_alen))); > } while (read_seqretry(&hh->hh_lock, seq)); > > skb_push(skb, hh_len); > return hh->hh_output(skb); >} > >static inline __attribute__((always_inline)) struct neighbour * >__neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat) >{ > struct neighbour *n = neigh_lookup(tbl, pkey, dev); > > if (n || !creat) > return n; > > n = neigh_create(tbl, pkey, dev); > return IS_ERR(n) ? ((void *)0) : n; >} > >static inline __attribute__((always_inline)) struct neighbour * >__neigh_lookup_errno(struct neigh_table *tbl, const void *pkey, > struct net_device *dev) >{ > struct neighbour *n = neigh_lookup(tbl, pkey, dev); > > if (n) > return n; > > return neigh_create(tbl, pkey, dev); >} > >struct neighbour_cb { > unsigned long sched_next; > unsigned int flags; >}; > >#define LOCALLY_ENQUEUED 0x1 > >#define NEIGH_CB(skb) ((struct neighbour_cb *)(skb)->cb) ># 16 "include/net/dst.h" 2 > > > > > > > >#define RT_CACHE_DEBUG 0 > >#define DST_GC_MIN (HZ/10) >#define DST_GC_INC (HZ/2) >#define DST_GC_MAX (120*HZ) ># 36 "include/net/dst.h" >struct sk_buff; > >struct dst_entry >{ > struct dst_entry *next; > atomic_t __refcnt; > int __use; > struct dst_entry *child; > struct net_device *dev; > short error; > short obsolete; > int flags; >#define DST_HOST 1 >#define DST_NOXFRM 2 >#define DST_NOPOLICY 4 >#define DST_NOHASH 8 >#define DST_BALANCED 0x10 > unsigned long lastuse; > unsigned long expires; > > unsigned short header_len; > unsigned short nfheader_len; > unsigned short trailer_len; > > u32 metrics[(__RTAX_MAX - 1)]; > struct dst_entry *path; > > unsigned long rate_last; > unsigned long rate_tokens; > > struct neighbour *neighbour; > struct hh_cache *hh; > struct xfrm_state *xfrm; > > int (*input)(struct sk_buff*); > int (*output)(struct sk_buff*); > > > > > > struct dst_ops *ops; > struct rcu_head rcu_head; > > char info[0]; >}; > > >struct dst_ops >{ > unsigned short family; > __be16 protocol; > unsigned gc_thresh; > > int (*gc)(void); > struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); > void (*destroy)(struct dst_entry *); > void (*ifdown)(struct dst_entry *, > struct net_device *dev, int how); > struct dst_entry * (*negative_advice)(struct dst_entry *); > void (*link_failure)(struct sk_buff *); > void (*update_pmtu)(struct dst_entry *dst, u32 mtu); > int entry_size; > > atomic_t entries; > struct kmem_cache *kmem_cachep; >}; > > > >static inline __attribute__((always_inline)) u32 >dst_metric(const struct dst_entry *dst, int metric) >{ > return dst->metrics[metric-1]; >} > >static inline __attribute__((always_inline)) u32 dst_mtu(const struct dst_entry *dst) >{ > u32 mtu = dst_metric(dst, RTAX_MTU); > > > > __asm__ __volatile__("": : :"memory"); > return mtu; >} > >static inline __attribute__((always_inline)) u32 >dst_allfrag(const struct dst_entry *dst) >{ > int ret = dst_metric(dst, RTAX_FEATURES) & 0x00000008; > > __asm__ __volatile__("": : :"memory"); > return ret; >} > >static inline __attribute__((always_inline)) int >dst_metric_locked(struct dst_entry *dst, int metric) >{ > return dst_metric(dst, RTAX_LOCK) & (1<<metric); >} > >static inline __attribute__((always_inline)) void dst_hold(struct dst_entry * dst) >{ > atomic_inc(&dst->__refcnt); >} > >static inline __attribute__((always_inline)) >struct dst_entry * dst_clone(struct dst_entry * dst) >{ > if (dst) > atomic_inc(&dst->__refcnt); > return dst; >} > >static inline __attribute__((always_inline)) >void dst_release(struct dst_entry * dst) >{ > if (dst) { > ({ typeof(((&dst->__refcnt)->counter) < 1) __ret_warn_on = (((&dst->__refcnt)->counter) < 1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("WARNING at %s:%d %s()\n", "include/net/dst.h", 154, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); }); > __asm__ __volatile__("": : :"memory"); > atomic_dec(&dst->__refcnt); > } >} > > > > > >static inline __attribute__((always_inline)) struct dst_entry *dst_pop(struct dst_entry *dst) >{ > struct dst_entry *child = dst_clone(dst->child); > > dst_release(dst); > return child; >} > >extern void * dst_alloc(struct dst_ops * ops); >extern void __dst_free(struct dst_entry * dst); >extern struct dst_entry *dst_destroy(struct dst_entry * dst); > >static inline __attribute__((always_inline)) void dst_free(struct dst_entry * dst) >{ > if (dst->obsolete > 1) > return; > if (!((&dst->__refcnt)->counter)) { > dst = dst_destroy(dst); > if (!dst) > return; > } > __dst_free(dst); >} > >static inline __attribute__((always_inline)) void dst_rcu_free(struct rcu_head *head) >{ > struct dst_entry *dst = ({ const typeof( ((struct dst_entry *)0)->rcu_head ) *__mptr = (head); (struct dst_entry *)( (char *)__mptr - __builtin_offsetof(struct dst_entry,rcu_head) );}); > dst_free(dst); >} > >static inline __attribute__((always_inline)) void dst_confirm(struct dst_entry *dst) >{ > if (dst) > neigh_confirm(dst->neighbour); >} > >static inline __attribute__((always_inline)) void dst_negative_advice(struct dst_entry **dst_p) >{ > struct dst_entry * dst = *dst_p; > if (dst && dst->ops->negative_advice) > *dst_p = dst->ops->negative_advice(dst); >} > >static inline __attribute__((always_inline)) void dst_link_failure(struct sk_buff *skb) >{ > struct dst_entry * dst = skb->dst; > if (dst && dst->ops && dst->ops->link_failure) > dst->ops->link_failure(skb); >} > >static inline __attribute__((always_inline)) void dst_set_expires(struct dst_entry *dst, int timeout) >{ > unsigned long expires = jiffies + timeout; > > if (expires == 0) > expires = 1; > > if (dst->expires == 0 || (({ unsigned long __dummy; typeof(dst->expires) __dummy2; (void)(&__dummy == &__dummy2); 1; }) && ({ unsigned long __dummy; typeof(expires) __dummy2; (void)(&__dummy == &__dummy2); 1; }) && ((long)(expires) - (long)(dst->expires) < 0))) > dst->expires = expires; >} > > >static inline __attribute__((always_inline)) int dst_output(struct sk_buff *skb) >{ > return skb->dst->output(skb); >} > > >static inline __attribute__((always_inline)) int dst_input(struct sk_buff *skb) >{ > int err; > > for (;;) { > err = skb->dst->input(skb); > > if (__builtin_expect(!!(err == 0), 1)) > return err; > > if (__builtin_expect(!!(err != 4), 0)) > return err; > } >} > >static inline __attribute__((always_inline)) struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) >{ > if (dst->obsolete) > dst = dst->ops->check(dst, cookie); > return dst; >} > >extern void dst_init(void); > >struct flowi; > >static inline __attribute__((always_inline)) int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, > struct sock *sk, int flags) >{ > return 0; >} ># 57 "include/net/sock.h" 2 ># 66 "include/net/sock.h" >#define SOCK_DEBUGGING > >#define SOCK_DEBUG(sk,msg...) do { if ((sk) && sock_flag((sk), SOCK_DBG)) printk(KERN_DEBUG msg); } while (0) ># 78 "include/net/sock.h" >struct sock_iocb; >typedef struct { > spinlock_t slock; > struct sock_iocb *owner; > wait_queue_head_t wq; ># 92 "include/net/sock.h" >} socket_lock_t; > >struct sock; >struct proto; ># 112 "include/net/sock.h" >struct sock_common { > unsigned short skc_family; > volatile unsigned char skc_state; > unsigned char skc_reuse; > int skc_bound_dev_if; > struct hlist_node skc_node; > struct hlist_node skc_bind_node; > atomic_t skc_refcnt; > unsigned int skc_hash; > struct proto *skc_prot; >}; ># 183 "include/net/sock.h" >struct sock { > > > > > struct sock_common __sk_common; >#define sk_family __sk_common.skc_family >#define sk_state __sk_common.skc_state >#define sk_reuse __sk_common.skc_reuse >#define sk_bound_dev_if __sk_common.skc_bound_dev_if >#define sk_node __sk_common.skc_node >#define sk_bind_node __sk_common.skc_bind_node >#define sk_refcnt __sk_common.skc_refcnt >#define sk_hash __sk_common.skc_hash >#define sk_prot __sk_common.skc_prot > unsigned char sk_shutdown : 2, > sk_no_check : 2, > sk_userlocks : 4; > unsigned char sk_protocol; > unsigned short sk_type; > int sk_rcvbuf; > socket_lock_t sk_lock; > wait_queue_head_t *sk_sleep; > struct dst_entry *sk_dst_cache; > struct xfrm_policy *sk_policy[2]; > rwlock_t sk_dst_lock; > atomic_t sk_rmem_alloc; > atomic_t sk_wmem_alloc; > atomic_t sk_omem_alloc; > struct sk_buff_head sk_receive_queue; > struct sk_buff_head sk_write_queue; > struct sk_buff_head sk_async_wait_queue; > int sk_wmem_queued; > int sk_forward_alloc; > gfp_t sk_allocation; > int sk_sndbuf; > int sk_route_caps; > int sk_gso_type; > int sk_rcvlowat; > unsigned long sk_flags; > unsigned long sk_lingertime; > > > > > > struct { > struct sk_buff *head; > struct sk_buff *tail; > } sk_backlog; > struct sk_buff_head sk_error_queue; > struct proto *sk_prot_creator; > rwlock_t sk_callback_lock; > int sk_err, > sk_err_soft; > unsigned short sk_ack_backlog; > unsigned short sk_max_ack_backlog; > __u32 sk_priority; > struct ucred sk_peercred; > long sk_rcvtimeo; > long sk_sndtimeo; > struct sk_filter *sk_filter; > void *sk_protinfo; > struct timer_list sk_timer; > struct timeval sk_stamp; > struct socket *sk_socket; > void *sk_user_data; > struct page *sk_sndmsg_page; > struct sk_buff *sk_send_head; > __u32 sk_sndmsg_off; > int sk_write_pending; > void *sk_security; > void (*sk_state_change)(struct sock *sk); > void (*sk_data_ready)(struct sock *sk, int bytes); > void (*sk_write_space)(struct sock *sk); > void (*sk_error_report)(struct sock *sk); > int (*sk_backlog_rcv)(struct sock *sk, > struct sk_buff *skb); > void (*sk_destruct)(struct sock *sk); >}; > > > > >static inline __attribute__((always_inline)) struct sock *__sk_head(const struct hlist_head *head) >{ > return ({ const typeof( ((struct sock *)0)->__sk_common.skc_node ) *__mptr = (head->first); (struct sock *)( (char *)__mptr - __builtin_offsetof(struct sock,__sk_common.skc_node) );}); >} > >static inline __attribute__((always_inline)) struct sock *sk_head(const struct hlist_head *head) >{ > return hlist_empty(head) ? ((void *)0) : __sk_head(head); >} > >static inline __attribute__((always_inline)) struct sock *sk_next(const struct sock *sk) >{ > return sk->__sk_common.skc_node.next ? > ({ const typeof( ((struct sock *)0)->__sk_common.skc_node ) *__mptr = (sk->__sk_common.skc_node.next); (struct sock *)( (char *)__mptr - __builtin_offsetof(struct sock,__sk_common.skc_node) );}) : ((void *)0); >} > >static inline __attribute__((always_inline)) int sk_unhashed(const struct sock *sk) >{ > return hlist_unhashed(&sk->__sk_common.skc_node); >} > >static inline __attribute__((always_inline)) int sk_hashed(const struct sock *sk) >{ > return !sk_unhashed(sk); >} > >static __inline__ __attribute__((always_inline)) void sk_node_init(struct hlist_node *node) >{ > node->pprev = ((void *)0); >} > >static __inline__ __attribute__((always_inline)) void __sk_del_node(struct sock *sk) >{ > __hlist_del(&sk->__sk_common.skc_node); >} > >static __inline__ __attribute__((always_inline)) int __sk_del_node_init(struct sock *sk) >{ > if (sk_hashed(sk)) { > __sk_del_node(sk); > sk_node_init(&sk->__sk_common.skc_node); > return 1; > } > return 0; >} > > > > > > > >static inline __attribute__((always_inline)) void sock_hold(struct sock *sk) >{ > atomic_inc(&sk->__sk_common.skc_refcnt); >} > > > > >static inline __attribute__((always_inline)) void __sock_put(struct sock *sk) >{ > atomic_dec(&sk->__sk_common.skc_refcnt); >} > >static __inline__ __attribute__((always_inline)) int sk_del_node_init(struct sock *sk) >{ > int rc = __sk_del_node_init(sk); > > if (rc) { > > ({ typeof(((&sk->__sk_common.skc_refcnt)->counter) == 1) __ret_warn_on = (((&sk->__sk_common.skc_refcnt)->counter) == 1); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("WARNING at %s:%d %s()\n", "include/net/sock.h", 338, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); }); > __sock_put(sk); > } > return rc; >} > >static __inline__ __attribute__((always_inline)) void __sk_add_node(struct sock *sk, struct hlist_head *list) >{ > hlist_add_head(&sk->__sk_common.skc_node, list); >} > >static __inline__ __attribute__((always_inline)) void sk_add_node(struct sock *sk, struct hlist_head *list) >{ > sock_hold(sk); > __sk_add_node(sk, list); >} > >static __inline__ __attribute__((always_inline)) void __sk_del_bind_node(struct sock *sk) >{ > __hlist_del(&sk->__sk_common.skc_bind_node); >} > >static __inline__ __attribute__((always_inline)) void sk_add_bind_node(struct sock *sk, > struct hlist_head *list) >{ > hlist_add_head(&sk->__sk_common.skc_bind_node, list); >} > >#define sk_for_each(__sk,node,list) hlist_for_each_entry(__sk, node, list, sk_node) > >#define sk_for_each_from(__sk,node) if (__sk && ({ node = &(__sk)->sk_node; 1; })) hlist_for_each_entry_from(__sk, node, sk_node) > > >#define sk_for_each_continue(__sk,node) if (__sk && ({ node = &(__sk)->sk_node; 1; })) hlist_for_each_entry_continue(__sk, node, sk_node) > > >#define sk_for_each_safe(__sk,node,tmp,list) hlist_for_each_entry_safe(__sk, node, tmp, list, sk_node) > >#define sk_for_each_bound(__sk,node,list) hlist_for_each_entry(__sk, node, list, sk_bind_node) > > > >enum sock_flags { > SOCK_DEAD, > SOCK_DONE, > SOCK_URGINLINE, > SOCK_KEEPOPEN, > SOCK_LINGER, > SOCK_DESTROY, > SOCK_BROADCAST, > SOCK_TIMESTAMP, > SOCK_ZAPPED, > SOCK_USE_WRITE_QUEUE, > SOCK_DBG, > SOCK_RCVTSTAMP, > SOCK_LOCALROUTE, > SOCK_QUEUE_SHRUNK, >}; > >static inline __attribute__((always_inline)) void sock_copy_flags(struct sock *nsk, struct sock *osk) >{ > nsk->sk_flags = osk->sk_flags; >} > >static inline __attribute__((always_inline)) void sock_set_flag(struct sock *sk, enum sock_flags flag) >{ > __set_bit(flag, &sk->sk_flags); >} > >static inline __attribute__((always_inline)) void sock_reset_flag(struct sock *sk, enum sock_flags flag) >{ > __clear_bit(flag, &sk->sk_flags); >} > >static inline __attribute__((always_inline)) int sock_flag(struct sock *sk, enum sock_flags flag) >{ > return (__builtin_constant_p(flag) ? constant_test_bit((flag),(&sk->sk_flags)) : variable_test_bit((flag),(&sk->sk_flags))); >} > >static inline __attribute__((always_inline)) void sk_acceptq_removed(struct sock *sk) >{ > sk->sk_ack_backlog--; >} > >static inline __attribute__((always_inline)) void sk_acceptq_added(struct sock *sk) >{ > sk->sk_ack_backlog++; >} > >static inline __attribute__((always_inline)) int sk_acceptq_is_full(struct sock *sk) >{ > return sk->sk_ack_backlog > sk->sk_max_ack_backlog; >} > > > > >static inline __attribute__((always_inline)) int sk_stream_min_wspace(struct sock *sk) >{ > return sk->sk_wmem_queued / 2; >} > >static inline __attribute__((always_inline)) int sk_stream_wspace(struct sock *sk) >{ > return sk->sk_sndbuf - sk->sk_wmem_queued; >} > >extern void sk_stream_write_space(struct sock *sk); > >static inline __attribute__((always_inline)) int sk_stream_memory_free(struct sock *sk) >{ > return sk->sk_wmem_queued < sk->sk_sndbuf; >} > >extern void sk_stream_rfree(struct sk_buff *skb); > >static inline __attribute__((always_inline)) void sk_stream_set_owner_r(struct sk_buff *skb, struct sock *sk) >{ > skb->sk = sk; > skb->destructor = sk_stream_rfree; > atomic_add(skb->truesize, &sk->sk_rmem_alloc); > sk->sk_forward_alloc -= skb->truesize; >} > >static inline __attribute__((always_inline)) void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb) >{ > skb_truesize_check(skb); > sock_set_flag(sk, SOCK_QUEUE_SHRUNK); > sk->sk_wmem_queued -= skb->truesize; > sk->sk_forward_alloc += skb->truesize; > __kfree_skb(skb); >} > > >static inline __attribute__((always_inline)) void sk_add_backlog(struct sock *sk, struct sk_buff *skb) >{ > if (!sk->sk_backlog.tail) { > sk->sk_backlog.head = sk->sk_backlog.tail = skb; > } else { > sk->sk_backlog.tail->next = skb; > sk->sk_backlog.tail = skb; > } > skb->next = ((void *)0); >} > >#define sk_wait_event(__sk,__timeo,__condition) ({ int rc; release_sock(__sk); rc = __condition; if (!rc) { *(__timeo) = schedule_timeout(*(__timeo)); } lock_sock(__sk); rc = __condition; rc; }) ># 495 "include/net/sock.h" >extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p); >extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p); >extern void sk_stream_wait_close(struct sock *sk, long timeo_p); >extern int sk_stream_error(struct sock *sk, int flags, int err); >extern void sk_stream_kill_queues(struct sock *sk); > >extern int sk_wait_data(struct sock *sk, long *timeo); > >struct request_sock_ops; >struct timewait_sock_ops; > > > > > >struct proto { > void (*close)(struct sock *sk, > long timeout); > int (*connect)(struct sock *sk, > struct sockaddr *uaddr, > int addr_len); > int (*disconnect)(struct sock *sk, int flags); > > struct sock * (*accept) (struct sock *sk, int flags, int *err); > > int (*ioctl)(struct sock *sk, int cmd, > unsigned long arg); > int (*init)(struct sock *sk); > int (*destroy)(struct sock *sk); > void (*shutdown)(struct sock *sk, int how); > int (*setsockopt)(struct sock *sk, int level, > int optname, char *optval, > int optlen); > int (*getsockopt)(struct sock *sk, int level, > int optname, char *optval, > int *option); > int (*compat_setsockopt)(struct sock *sk, > int level, > int optname, char *optval, > int optlen); > int (*compat_getsockopt)(struct sock *sk, > int level, > int optname, char *optval, > int *option); > int (*sendmsg)(struct kiocb *iocb, struct sock *sk, > struct msghdr *msg, size_t len); > int (*recvmsg)(struct kiocb *iocb, struct sock *sk, > struct msghdr *msg, > size_t len, int noblock, int flags, > int *addr_len); > int (*sendpage)(struct sock *sk, struct page *page, > int offset, size_t size, int flags); > int (*bind)(struct sock *sk, > struct sockaddr *uaddr, int addr_len); > > int (*backlog_rcv) (struct sock *sk, > struct sk_buff *skb); > > > void (*hash)(struct sock *sk); > void (*unhash)(struct sock *sk); > int (*get_port)(struct sock *sk, unsigned short snum); > > > void (*enter_memory_pressure)(void); > atomic_t *memory_allocated; > atomic_t *sockets_allocated; > > > > > > > int *memory_pressure; > int *sysctl_mem; > int *sysctl_wmem; > int *sysctl_rmem; > int max_header; > > struct kmem_cache *slab; > unsigned int obj_size; > > atomic_t *orphan_count; > > struct request_sock_ops *rsk_prot; > struct timewait_sock_ops *twsk_prot; > > struct module *owner; > > char name[32]; > > struct list_head node; > > > > struct { > int inuse; > u8 __pad[(1 << (6)) - sizeof(int)]; > } stats[1]; >}; > >extern int proto_register(struct proto *prot, int alloc_slab); >extern void proto_unregister(struct proto *prot); ># 619 "include/net/sock.h" >#define sk_refcnt_debug_inc(sk) do { } while (0) >#define sk_refcnt_debug_dec(sk) do { } while (0) >#define sk_refcnt_debug_release(sk) do { } while (0) > > > >static __inline__ __attribute__((always_inline)) void sock_prot_inc_use(struct proto *prot) >{ > prot->stats[0].inuse++; >} > >static __inline__ __attribute__((always_inline)) void sock_prot_dec_use(struct proto *prot) >{ > prot->stats[0].inuse--; >} > > > > >static inline __attribute__((always_inline)) void __sk_prot_rehash(struct sock *sk) >{ > sk->__sk_common.skc_prot->unhash(sk); > sk->__sk_common.skc_prot->hash(sk); >} > > >#define SOCK_DESTROY_TIME (10*HZ) > > >#define PROT_SOCK 1024 > >#define SHUTDOWN_MASK 3 >#define RCV_SHUTDOWN 1 >#define SEND_SHUTDOWN 2 > >#define SOCK_SNDBUF_LOCK 1 >#define SOCK_RCVBUF_LOCK 2 >#define SOCK_BINDADDR_LOCK 4 >#define SOCK_BINDPORT_LOCK 8 > > >struct sock_iocb { > struct list_head list; > > int flags; > int size; > struct socket *sock; > struct sock *sk; > struct scm_cookie *scm; > struct msghdr *msg, async_msg; > struct kiocb *kiocb; >}; > >static inline __attribute__((always_inline)) struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb) >{ > return (struct sock_iocb *)iocb->private; >} > >static inline __attribute__((always_inline)) struct kiocb *siocb_to_kiocb(struct sock_iocb *si) >{ > return si->kiocb; >} > >struct socket_alloc { > struct socket socket; > struct inode vfs_inode; >}; > >static inline __attribute__((always_inline)) struct socket *SOCKET_I(struct inode *inode) >{ > return &({ const typeof( ((struct socket_alloc *)0)->vfs_inode ) *__mptr = (inode); (struct socket_alloc *)( (char *)__mptr - __builtin_offsetof(struct socket_alloc,vfs_inode) );})->socket; >} > >static inline __attribute__((always_inline)) struct inode *SOCK_INODE(struct socket *socket) >{ > return &({ const typeof( ((struct socket_alloc *)0)->socket ) *__mptr = (socket); (struct socket_alloc *)( (char *)__mptr - __builtin_offsetof(struct socket_alloc,socket) );})->vfs_inode; >} > >extern void __sk_stream_mem_reclaim(struct sock *sk); >extern int sk_stream_mem_schedule(struct sock *sk, int size, int kind); > >#define SK_STREAM_MEM_QUANTUM ((int)PAGE_SIZE) > >static inline __attribute__((always_inline)) int sk_stream_pages(int amt) >{ > return (amt + ((int)(1UL << 12)) - 1) / ((int)(1UL << 12)); >} > >static inline __attribute__((always_inline)) void sk_stream_mem_reclaim(struct sock *sk) >{ > if (sk->sk_forward_alloc >= ((int)(1UL << 12))) > __sk_stream_mem_reclaim(sk); >} > >static inline __attribute__((always_inline)) void sk_stream_writequeue_purge(struct sock *sk) >{ > struct sk_buff *skb; > > while ((skb = __skb_dequeue(&sk->sk_write_queue)) != ((void *)0)) > sk_stream_free_skb(sk, skb); > sk_stream_mem_reclaim(sk); >} > >static inline __attribute__((always_inline)) int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb) >{ > return (int)skb->truesize <= sk->sk_forward_alloc || > sk_stream_mem_schedule(sk, skb->truesize, 1); >} > >static inline __attribute__((always_inline)) int sk_stream_wmem_schedule(struct sock *sk, int size) >{ > return size <= sk->sk_forward_alloc || > sk_stream_mem_schedule(sk, size, 0); >} ># 747 "include/net/sock.h" >#define sock_owned_by_user(sk) ((sk)->sk_lock.owner) ># 756 "include/net/sock.h" >#define sock_lock_init_class_and_name(sk,sname,skey,name,key) do { sk->sk_lock.owner = NULL; init_waitqueue_head(&sk->sk_lock.wq); spin_lock_init(&(sk)->sk_lock.slock); debug_check_no_locks_freed((void *)&(sk)->sk_lock, sizeof((sk)->sk_lock)); lockdep_set_class_and_name(&(sk)->sk_lock.slock, (skey), (sname)); lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); } while (0) ># 768 "include/net/sock.h" >extern void lock_sock_nested(struct sock *sk, int subclass) __attribute__((regparm(3))); > >static inline __attribute__((always_inline)) void lock_sock(struct sock *sk) >{ > lock_sock_nested(sk, 0); >} > >extern void release_sock(struct sock *sk) __attribute__((regparm(3))); > > >#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) >#define bh_lock_sock_nested(__sk) spin_lock_nested(&((__sk)->sk_lock.slock), SINGLE_DEPTH_NESTING) > > >#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) > >extern struct sock *sk_alloc(int family, > gfp_t priority, > struct proto *prot, int zero_it); >extern void sk_free(struct sock *sk); >extern struct sock *sk_clone(const struct sock *sk, > const gfp_t priority); > >extern struct sk_buff *sock_wmalloc(struct sock *sk, > unsigned long size, int force, > gfp_t priority); >extern struct sk_buff *sock_rmalloc(struct sock *sk, > unsigned long size, int force, > gfp_t priority); >extern void sock_wfree(struct sk_buff *skb); >extern void sock_rfree(struct sk_buff *skb); > >extern int sock_setsockopt(struct socket *sock, int level, > int op, char *optval, > int optlen); > >extern int sock_getsockopt(struct socket *sock, int level, > int op, char *optval, > int *optlen); >extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, > unsigned long size, > int noblock, > int *errcode); >extern void *sock_kmalloc(struct sock *sk, int size, > gfp_t priority); >extern void sock_kfree_s(struct sock *sk, void *mem, int size); >extern void sk_send_sigurg(struct sock *sk); > > > > > >extern int sock_no_bind(struct socket *, > struct sockaddr *, int); >extern int sock_no_connect(struct socket *, > struct sockaddr *, int, int); >extern int sock_no_socketpair(struct socket *, > struct socket *); >extern int sock_no_accept(struct socket *, > struct socket *, int); >extern int sock_no_getname(struct socket *, > struct sockaddr *, int *, int); >extern unsigned int sock_no_poll(struct file *, struct socket *, > struct poll_table_struct *); >extern int sock_no_ioctl(struct socket *, unsigned int, > unsigned long); >extern int sock_no_listen(struct socket *, int); >extern int sock_no_shutdown(struct socket *, int); >extern int sock_no_getsockopt(struct socket *, int , int, > char *, int *); >extern int sock_no_setsockopt(struct socket *, int, int, > char *, int); >extern int sock_no_sendmsg(struct kiocb *, struct socket *, > struct msghdr *, size_t); >extern int sock_no_recvmsg(struct kiocb *, struct socket *, > struct msghdr *, size_t, int); >extern int sock_no_mmap(struct file *file, > struct socket *sock, > struct vm_area_struct *vma); >extern ssize_t sock_no_sendpage(struct socket *sock, > struct page *page, > int offset, size_t size, > int flags); > > > > > >extern int sock_common_getsockopt(struct socket *sock, int level, int optname, > char *optval, int *optlen); >extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, > struct msghdr *msg, size_t size, int flags); >extern int sock_common_setsockopt(struct socket *sock, int level, int optname, > char *optval, int optlen); >extern int compat_sock_common_getsockopt(struct socket *sock, int level, > int optname, char *optval, int *optlen); >extern int compat_sock_common_setsockopt(struct socket *sock, int level, > int optname, char *optval, int optlen); > >extern void sk_common_release(struct sock *sk); > > > > > > >extern void sock_init_data(struct socket *sock, struct sock *sk); ># 890 "include/net/sock.h" >static inline __attribute__((always_inline)) int sk_filter(struct sock *sk, struct sk_buff *skb) >{ > int err; > struct sk_filter *filter; > > err = security_sock_rcv_skb(sk, skb); > if (err) > return err; > > do { local_bh_disable(); (void)0; } while(0); > filter = sk->sk_filter; > if (filter) { > unsigned int pkt_len = sk_run_filter(skb, filter->insns, > filter->len); > err = pkt_len ? pskb_trim(skb, pkt_len) : -1; > } > do { (void)0; local_bh_enable(); } while(0); > > return err; >} > > > > > >static inline __attribute__((always_inline)) void sk_filter_rcu_free(struct rcu_head *rcu) >{ > struct sk_filter *fp = ({ const typeof( ((struct sk_filter *)0)->rcu ) *__mptr = (rcu); (struct sk_filter *)( (char *)__mptr - __builtin_offsetof(struct sk_filter,rcu) );}); > kfree(fp); >} ># 929 "include/net/sock.h" >static inline __attribute__((always_inline)) void sk_filter_release(struct sock *sk, struct sk_filter *fp) >{ > unsigned int size = sk_filter_len(fp); > > atomic_sub(size, &sk->sk_omem_alloc); > > if (atomic_dec_and_test(&fp->refcnt)) > call_rcu_bh(&fp->rcu, sk_filter_rcu_free); >} > >static inline __attribute__((always_inline)) void sk_filter_charge(struct sock *sk, struct sk_filter *fp) >{ > atomic_inc(&fp->refcnt); > atomic_add(sk_filter_len(fp), &sk->sk_omem_alloc); >} ># 971 "include/net/sock.h" >static inline __attribute__((always_inline)) void sock_put(struct sock *sk) >{ > if (atomic_dec_and_test(&sk->__sk_common.skc_refcnt)) > sk_free(sk); >} > >extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb, > const int nested); ># 987 "include/net/sock.h" >static inline __attribute__((always_inline)) void sock_orphan(struct sock *sk) >{ > _write_lock_bh(&sk->sk_callback_lock); > sock_set_flag(sk, SOCK_DEAD); > sk->sk_socket = ((void *)0); > sk->sk_sleep = ((void *)0); > _write_unlock_bh(&sk->sk_callback_lock); >} > >static inline __attribute__((always_inline)) void sock_graft(struct sock *sk, struct socket *parent) >{ > _write_lock_bh(&sk->sk_callback_lock); > sk->sk_sleep = &parent->wait; > parent->sk = sk; > sk->sk_socket = parent; > security_sock_graft(sk, parent); > _write_unlock_bh(&sk->sk_callback_lock); >} > >static inline __attribute__((always_inline)) void sock_copy(struct sock *nsk, const struct sock *osk) >{ > > > > > (__builtin_constant_p(osk->__sk_common.skc_prot->obj_size) ? __constant_memcpy((nsk),(osk),(osk->__sk_common.skc_prot->obj_size)) : __memcpy((nsk),(osk),(osk->__sk_common.skc_prot->obj_size))); > > > > >} > >extern int sock_i_uid(struct sock *sk); >extern unsigned long sock_i_ino(struct sock *sk); > >static inline __attribute__((always_inline)) struct dst_entry * >__sk_dst_get(struct sock *sk) >{ > return sk->sk_dst_cache; >} > >static inline __attribute__((always_inline)) struct dst_entry * >sk_dst_get(struct sock *sk) >{ > struct dst_entry *dst; > > _read_lock(&sk->sk_dst_lock); > dst = sk->sk_dst_cache; > if (dst) > dst_hold(dst); > _read_unlock(&sk->sk_dst_lock); > return dst; >} > >static inline __attribute__((always_inline)) void >__sk_dst_set(struct sock *sk, struct dst_entry *dst) >{ > struct dst_entry *old_dst; > > old_dst = sk->sk_dst_cache; > sk->sk_dst_cache = dst; > dst_release(old_dst); >} > >static inline __attribute__((always_inline)) void >sk_dst_set(struct sock *sk, struct dst_entry *dst) >{ > _write_lock(&sk->sk_dst_lock); > __sk_dst_set(sk, dst); > _write_unlock(&sk->sk_dst_lock); >} > >static inline __attribute__((always_inline)) void >__sk_dst_reset(struct sock *sk) >{ > struct dst_entry *old_dst; > > old_dst = sk->sk_dst_cache; > sk->sk_dst_cache = ((void *)0); > dst_release(old_dst); >} > >static inline __attribute__((always_inline)) void >sk_dst_reset(struct sock *sk) >{ > _write_lock(&sk->sk_dst_lock); > __sk_dst_reset(sk); > _write_unlock(&sk->sk_dst_lock); >} > >extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); > >extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie); > >static inline __attribute__((always_inline)) int sk_can_gso(const struct sock *sk) >{ > return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type); >} > >static inline __attribute__((always_inline)) void sk_setup_caps(struct sock *sk, struct dst_entry *dst) >{ > __sk_dst_set(sk, dst); > sk->sk_route_caps = dst->dev->features; > if (sk->sk_route_caps & 2048) > sk->sk_route_caps |= 0xffff0000; > if (sk_can_gso(sk)) { > if (dst->header_len) > sk->sk_route_caps &= ~0xffff0000; > else > sk->sk_route_caps |= 1 | 8; > } >} > >static inline __attribute__((always_inline)) void sk_charge_skb(struct sock *sk, struct sk_buff *skb) >{ > sk->sk_wmem_queued += skb->truesize; > sk->sk_forward_alloc -= skb->truesize; >} > >static inline __attribute__((always_inline)) int skb_copy_to_page(struct sock *sk, char *from, > struct sk_buff *skb, struct page *page, > int off, int copy) >{ > if (skb->ip_summed == 0) { > int err = 0; > __wsum csum = csum_and_copy_from_user(from, > lowmem_page_address(page) + off, > copy, 0, &err); > if (err) > return err; > skb->csum = csum_block_add(skb->csum, csum, skb->len); > } else if (copy_from_user(lowmem_page_address(page) + off, from, copy)) > return -14; > > skb->len += copy; > skb->data_len += copy; > skb->truesize += copy; > sk->sk_wmem_queued += copy; > sk->sk_forward_alloc -= copy; > return 0; >} ># 1138 "include/net/sock.h" >static inline __attribute__((always_inline)) void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) >{ > sock_hold(sk); > skb->sk = sk; > skb->destructor = sock_wfree; > atomic_add(skb->truesize, &sk->sk_wmem_alloc); >} > >static inline __attribute__((always_inline)) void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) >{ > skb->sk = sk; > skb->destructor = sock_rfree; > atomic_add(skb->truesize, &sk->sk_rmem_alloc); >} > >extern void sk_reset_timer(struct sock *sk, struct timer_list* timer, > unsigned long expires); > >extern void sk_stop_timer(struct sock *sk, struct timer_list* timer); > >extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); > >static inline __attribute__((always_inline)) int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb) >{ > > > > if (((&sk->sk_rmem_alloc)->counter) + skb->truesize >= > (unsigned)sk->sk_rcvbuf) > return -12; > skb_set_owner_r(skb, sk); > skb_queue_tail(&sk->sk_error_queue, skb); > if (!sock_flag(sk, SOCK_DEAD)) > sk->sk_data_ready(sk, skb->len); > return 0; >} > > > > > >static inline __attribute__((always_inline)) int sock_error(struct sock *sk) >{ > int err; > if (__builtin_expect(!!(!sk->sk_err), 1)) > return 0; > err = ((__typeof__(*(&sk->sk_err)))__xchg((unsigned long)(0),(&sk->sk_err),sizeof(*(&sk->sk_err)))); > return -err; >} > >static inline __attribute__((always_inline)) unsigned long sock_wspace(struct sock *sk) >{ > int amt = 0; > > if (!(sk->sk_shutdown & 2)) { > amt = sk->sk_sndbuf - ((&sk->sk_wmem_alloc)->counter); > if (amt < 0) > amt = 0; > } > return amt; >} > >static inline __attribute__((always_inline)) void sk_wake_async(struct sock *sk, int how, int band) >{ > if (sk->sk_socket && sk->sk_socket->fasync_list) > sock_wake_async(sk->sk_socket, how, band); >} > >#define SOCK_MIN_SNDBUF 2048 >#define SOCK_MIN_RCVBUF 256 > >static inline __attribute__((always_inline)) void sk_stream_moderate_sndbuf(struct sock *sk) >{ > if (!(sk->sk_userlocks & 1)) { > sk->sk_sndbuf = ({ typeof(sk->sk_sndbuf) _x = (sk->sk_sndbuf); typeof(sk->sk_wmem_queued / 2) _y = (sk->sk_wmem_queued / 2); (void) (&_x == &_y); _x < _y ? _x : _y; }); > sk->sk_sndbuf = ({ typeof(sk->sk_sndbuf) _x = (sk->sk_sndbuf); typeof(2048) _y = (2048); (void) (&_x == &_y); _x > _y ? _x : _y; }); > } >} > >static inline __attribute__((always_inline)) struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, > int size, int mem, > gfp_t gfp) >{ > struct sk_buff *skb; > int hdr_len; > > hdr_len = (((sk->__sk_common.skc_prot->max_header) + ((1 << (6)) - 1)) & ~((1 << (6)) - 1)); > skb = alloc_skb_fclone(size + hdr_len, gfp); > if (skb) { > skb->truesize += mem; > if (sk_stream_wmem_schedule(sk, skb->truesize)) { > skb_reserve(skb, hdr_len); > return skb; > } > __kfree_skb(skb); > } else { > sk->__sk_common.skc_prot->enter_memory_pressure(); > sk_stream_moderate_sndbuf(sk); > } > return ((void *)0); >} > >static inline __attribute__((always_inline)) struct sk_buff *sk_stream_alloc_skb(struct sock *sk, > int size, > gfp_t gfp) >{ > return sk_stream_alloc_pskb(sk, size, 0, gfp); >} > >static inline __attribute__((always_inline)) struct page *sk_stream_alloc_page(struct sock *sk) >{ > struct page *page = ((void *)0); > > page = alloc_pages_node(((0)), sk->sk_allocation, 0); > if (!page) { > sk->__sk_common.skc_prot->enter_memory_pressure(); > sk_stream_moderate_sndbuf(sk); > } > return page; >} > >#define sk_stream_for_retrans_queue(skb,sk) for (skb = (sk)->sk_write_queue.next; (skb != (sk)->sk_send_head) && (skb != (struct sk_buff *)&(sk)->sk_write_queue); skb = skb->next) > > > > > > >#define sk_stream_for_retrans_queue_from(skb,sk) for (; (skb != (sk)->sk_send_head) && (skb != (struct sk_buff *)&(sk)->sk_write_queue); skb = skb->next) > > > > > > > >static inline __attribute__((always_inline)) int sock_writeable(const struct sock *sk) >{ > return ((&sk->sk_wmem_alloc)->counter) < (sk->sk_sndbuf / 2); >} > >static inline __attribute__((always_inline)) gfp_t gfp_any(void) >{ > return (((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8)))) ? ((( gfp_t)0x20u)) : ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)); >} > >static inline __attribute__((always_inline)) long sock_rcvtimeo(const struct sock *sk, int noblock) >{ > return noblock ? 0 : sk->sk_rcvtimeo; >} > >static inline __attribute__((always_inline)) long sock_sndtimeo(const struct sock *sk, int noblock) >{ > return noblock ? 0 : sk->sk_sndtimeo; >} > >static inline __attribute__((always_inline)) int sock_rcvlowat(const struct sock *sk, int waitall, int len) >{ > return (waitall ? len : ({ int __x = (sk->sk_rcvlowat); int __y = (len); __x < __y ? __x: __y; })) ? : 1; >} > > > > >static inline __attribute__((always_inline)) int sock_intr_errno(long timeo) >{ > return timeo == ((long)(~0UL>>1)) ? -512 : -4; >} > >static __inline__ __attribute__((always_inline)) void >sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) >{ > struct timeval stamp; > > skb_get_timestamp(skb, &stamp); > if (sock_flag(sk, SOCK_RCVTSTAMP)) { > > > if (stamp.tv_sec == 0) > do_gettimeofday(&stamp); > skb_set_timestamp(skb, &stamp); > put_cmsg(msg, 1, 29, sizeof(struct timeval), > &stamp); > } else > sk->sk_stamp = stamp; >} ># 1344 "include/net/sock.h" >static inline __attribute__((always_inline)) void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) >{ > __skb_unlink(skb, &sk->sk_receive_queue); > __kfree_skb(skb); >} > > >extern void sock_enable_timestamp(struct sock *sk); >extern int sock_get_timestamp(struct sock *, struct timeval *); ># 1362 "include/net/sock.h" >#define NETDEBUG(fmt,args...) do { } while (0) >#define LIMIT_NETDEBUG(fmt,args...) do { } while(0) ># 1379 "include/net/sock.h" >#define SOCK_SLEEP_PRE(sk) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); tsk->state = TASK_INTERRUPTIBLE; add_wait_queue((sk)->sk_sleep, &wait); release_sock(sk); > > > > > >#define SOCK_SLEEP_POST(sk) tsk->state = TASK_RUNNING; remove_wait_queue((sk)->sk_sleep, &wait); lock_sock(sk); } > > > > >static inline __attribute__((always_inline)) void sock_valbool_flag(struct sock *sk, int bit, int valbool) >{ > if (valbool) > sock_set_flag(sk, bit); > else > sock_reset_flag(sk, bit); >} > >extern __u32 sysctl_wmem_max; >extern __u32 sysctl_rmem_max; > > >int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); > > > > > > > >extern void sk_init(void); > > >extern struct ctl_table core_table[]; > > >extern int sysctl_optmem_max; > >extern __u32 sysctl_wmem_default; >extern __u32 sysctl_rmem_default; ># 25 "include/net/inet_sock.h" 2 ># 1 "include/net/request_sock.h" 1 ># 16 "include/net/request_sock.h" >#define _REQUEST_SOCK_H > > > > > > > >struct request_sock; >struct sk_buff; >struct dst_entry; >struct proto; > >struct request_sock_ops { > int family; > int obj_size; > struct kmem_cache *slab; > int (*rtx_syn_ack)(struct sock *sk, > struct request_sock *req, > struct dst_entry *dst); > void (*send_ack)(struct sk_buff *skb, > struct request_sock *req); > void (*send_reset)(struct sock *sk, > struct sk_buff *skb); > void (*destructor)(struct request_sock *req); >}; > > > >struct request_sock { > struct request_sock *dl_next; > u16 mss; > u8 retrans; > u8 __pad; > > u32 window_clamp; > u32 rcv_wnd; > u32 ts_recent; > unsigned long expires; > const struct request_sock_ops *rsk_ops; > struct sock *sk; > u32 secid; > u32 peer_secid; >}; > >static inline __attribute__((always_inline)) struct request_sock *reqsk_alloc(const struct request_sock_ops *ops) >{ > struct request_sock *req = kmem_cache_alloc(ops->slab, ((( gfp_t)0x20u))); > > if (req != ((void *)0)) > req->rsk_ops = ops; > > return req; >} > >static inline __attribute__((always_inline)) void __reqsk_free(struct request_sock *req) >{ > kmem_cache_free(req->rsk_ops->slab, req); >} > >static inline __attribute__((always_inline)) void reqsk_free(struct request_sock *req) >{ > req->rsk_ops->destructor(req); > __reqsk_free(req); >} > >extern int sysctl_max_syn_backlog; > > > > > >struct listen_sock { > u8 max_qlen_log; > > int qlen; > int qlen_young; > int clock_hand; > u32 hash_rnd; > u32 nr_table_entries; > struct request_sock *syn_table[0]; >}; ># 115 "include/net/request_sock.h" >struct request_sock_queue { > struct request_sock *rskq_accept_head; > struct request_sock *rskq_accept_tail; > rwlock_t syn_wait_lock; > u8 rskq_defer_accept; > > struct listen_sock *listen_opt; >}; > >extern int reqsk_queue_alloc(struct request_sock_queue *queue, > unsigned int nr_table_entries); > >static inline __attribute__((always_inline)) struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue) >{ > struct listen_sock *lopt; > > _write_lock_bh(&queue->syn_wait_lock); > lopt = queue->listen_opt; > queue->listen_opt = ((void *)0); > _write_unlock_bh(&queue->syn_wait_lock); > > return lopt; >} > >static inline __attribute__((always_inline)) void __reqsk_queue_destroy(struct request_sock_queue *queue) >{ > kfree(reqsk_queue_yank_listen_sk(queue)); >} > >extern void reqsk_queue_destroy(struct request_sock_queue *queue); > >static inline __attribute__((always_inline)) struct request_sock * > reqsk_queue_yank_acceptq(struct request_sock_queue *queue) >{ > struct request_sock *req = queue->rskq_accept_head; > > queue->rskq_accept_head = ((void *)0); > return req; >} > >static inline __attribute__((always_inline)) int reqsk_queue_empty(struct request_sock_queue *queue) >{ > return queue->rskq_accept_head == ((void *)0); >} > >static inline __attribute__((always_inline)) void reqsk_queue_unlink(struct request_sock_queue *queue, > struct request_sock *req, > struct request_sock **prev_req) >{ > _write_lock(&queue->syn_wait_lock); > *prev_req = req->dl_next; > _write_unlock(&queue->syn_wait_lock); >} > >static inline __attribute__((always_inline)) void reqsk_queue_add(struct request_sock_queue *queue, > struct request_sock *req, > struct sock *parent, > struct sock *child) >{ > req->sk = child; > sk_acceptq_added(parent); > > if (queue->rskq_accept_head == ((void *)0)) > queue->rskq_accept_head = req; > else > queue->rskq_accept_tail->dl_next = req; > > queue->rskq_accept_tail = req; > req->dl_next = ((void *)0); >} > >static inline __attribute__((always_inline)) struct request_sock *reqsk_queue_remove(struct request_sock_queue *queue) >{ > struct request_sock *req = queue->rskq_accept_head; > > do { if (__builtin_expect(!!(!(req != ((void *)0))), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "req != NULL", "include/net/request_sock.h" , 190); } } while(0); > > queue->rskq_accept_head = req->dl_next; > if (queue->rskq_accept_head == ((void *)0)) > queue->rskq_accept_tail = ((void *)0); > > return req; >} > >static inline __attribute__((always_inline)) struct sock *reqsk_queue_get_child(struct request_sock_queue *queue, > struct sock *parent) >{ > struct request_sock *req = reqsk_queue_remove(queue); > struct sock *child = req->sk; > > do { if (__builtin_expect(!!(!(child != ((void *)0))), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "child != NULL", "include/net/request_sock.h" , 205); } } while(0); > > sk_acceptq_removed(parent); > __reqsk_free(req); > return child; >} > >static inline __attribute__((always_inline)) int reqsk_queue_removed(struct request_sock_queue *queue, > struct request_sock *req) >{ > struct listen_sock *lopt = queue->listen_opt; > > if (req->retrans == 0) > --lopt->qlen_young; > > return --lopt->qlen; >} > >static inline __attribute__((always_inline)) int reqsk_queue_added(struct request_sock_queue *queue) >{ > struct listen_sock *lopt = queue->listen_opt; > const int prev_qlen = lopt->qlen; > > lopt->qlen_young++; > lopt->qlen++; > return prev_qlen; >} > >static inline __attribute__((always_inline)) int reqsk_queue_len(const struct request_sock_queue *queue) >{ > return queue->listen_opt != ((void *)0) ? queue->listen_opt->qlen : 0; >} > >static inline __attribute__((always_inline)) int reqsk_queue_len_young(const struct request_sock_queue *queue) >{ > return queue->listen_opt->qlen_young; >} > >static inline __attribute__((always_inline)) int reqsk_queue_is_full(const struct request_sock_queue *queue) >{ > return queue->listen_opt->qlen >> queue->listen_opt->max_qlen_log; >} > >static inline __attribute__((always_inline)) void reqsk_queue_hash_req(struct request_sock_queue *queue, > u32 hash, struct request_sock *req, > unsigned long timeout) >{ > struct listen_sock *lopt = queue->listen_opt; > > req->expires = jiffies + timeout; > req->retrans = 0; > req->sk = ((void *)0); > req->dl_next = lopt->syn_table[hash]; > > _write_lock(&queue->syn_wait_lock); > lopt->syn_table[hash] = req; > _write_unlock(&queue->syn_wait_lock); >} ># 26 "include/net/inet_sock.h" 2 ># 38 "include/net/inet_sock.h" >struct ip_options { > __be32 faddr; > unsigned char optlen; > unsigned char srr; > unsigned char rr; > unsigned char ts; > unsigned char is_data:1, > is_strictroute:1, > srr_is_hit:1, > is_changed:1, > rr_needaddr:1, > ts_needtime:1, > ts_needaddr:1; > unsigned char router_alert; > unsigned char cipso; > unsigned char __pad2; > unsigned char __data[0]; >}; > >#define optlength(opt) (sizeof(struct ip_options) + opt->optlen) > >struct inet_request_sock { > struct request_sock req; > > u16 inet6_rsk_offset; > > > __be32 loc_addr; > __be32 rmt_addr; > __be16 rmt_port; > u16 snd_wscale : 4, > rcv_wscale : 4, > tstamp_ok : 1, > sack_ok : 1, > wscale_ok : 1, > ecn_ok : 1, > acked : 1; > struct ip_options *opt; >}; > >static inline __attribute__((always_inline)) struct inet_request_sock *inet_rsk(const struct request_sock *sk) >{ > return (struct inet_request_sock *)sk; >} > >struct ip_mc_socklist; >struct ipv6_pinfo; >struct rtable; ># 106 "include/net/inet_sock.h" >struct inet_sock { > > struct sock sk; > > struct ipv6_pinfo *pinet6; > > > __be32 daddr; > __be32 rcv_saddr; > __be16 dport; > __u16 num; > __be32 saddr; > __s16 uc_ttl; > __u16 cmsg_flags; > struct ip_options *opt; > __be16 sport; > __u16 id; > __u8 tos; > __u8 mc_ttl; > __u8 pmtudisc; > __u8 recverr:1, > is_icsk:1, > freebind:1, > hdrincl:1, > mc_loop:1; > int mc_index; > __be32 mc_addr; > struct ip_mc_socklist *mc_list; > struct { > unsigned int flags; > unsigned int fragsize; > struct ip_options *opt; > struct rtable *rt; > int length; > __be32 addr; > struct flowi fl; > } cork; >}; > >#define IPCORK_OPT 1 >#define IPCORK_ALLFRAG 2 > >static inline __attribute__((always_inline)) struct inet_sock *inet_sk(const struct sock *sk) >{ > return (struct inet_sock *)sk; >} > >static inline __attribute__((always_inline)) void __inet_sk_copy_descendant(struct sock *sk_to, > const struct sock *sk_from, > const int ancestor_size) >{ > (__builtin_constant_p(sk_from->__sk_common.skc_prot->obj_size - ancestor_size) ? __constant_memcpy((inet_sk(sk_to) + 1),(inet_sk(sk_from) + 1),(sk_from->__sk_common.skc_prot->obj_size - ancestor_size)) : __memcpy((inet_sk(sk_to) + 1),(inet_sk(sk_from) + 1),(sk_from->__sk_common.skc_prot->obj_size - ancestor_size))); > >} ># 168 "include/net/inet_sock.h" >extern int inet_sk_rebuild_header(struct sock *sk); > >static inline __attribute__((always_inline)) unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, > const __be32 faddr, const __be16 fport) >{ > unsigned int h = (( __u32)laddr ^ lport) ^ (( __u32)faddr ^ ( __u32)fport); > h ^= h >> 16; > h ^= h >> 8; > return h; >} > >static inline __attribute__((always_inline)) int inet_sk_ehashfn(const struct sock *sk) >{ > const struct inet_sock *inet = inet_sk(sk); > const __be32 laddr = inet->rcv_saddr; > const __u16 lport = inet->num; > const __be32 faddr = inet->daddr; > const __be16 fport = inet->dport; > > return inet_ehashfn(laddr, lport, faddr, fport); >} ># 30 "include/net/ip.h" 2 > > >struct sock; > >struct inet_skb_parm >{ > struct ip_options opt; > unsigned char flags; > >#define IPSKB_FORWARDED 1 >#define IPSKB_XFRM_TUNNEL_SIZE 2 >#define IPSKB_XFRM_TRANSFORMED 4 >#define IPSKB_FRAG_COMPLETE 8 >#define IPSKB_REROUTED 16 >}; > >struct ipcm_cookie >{ > __be32 addr; > int oif; > struct ip_options *opt; >}; > >#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) > >struct ip_ra_chain >{ > struct ip_ra_chain *next; > struct sock *sk; > void (*destructor)(struct sock *); >}; > >extern struct ip_ra_chain *ip_ra_chain; >extern rwlock_t ip_ra_lock; > > >#define IP_CE 0x8000 >#define IP_DF 0x4000 >#define IP_MF 0x2000 >#define IP_OFFSET 0x1FFF > >#define IP_FRAG_TIME (30 * HZ) > >struct msghdr; >struct net_device; >struct packet_type; >struct rtable; >struct sk_buff; >struct sockaddr; > >extern void ip_mc_dropsocket(struct sock *); >extern void ip_mc_dropdevice(struct net_device *dev); >extern int igmp_mc_proc_init(void); > > > > > >extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, > __be32 saddr, __be32 daddr, > struct ip_options *opt); >extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, > struct packet_type *pt, struct net_device *orig_dev); >extern int ip_local_deliver(struct sk_buff *skb); >extern int ip_mr_input(struct sk_buff *skb); >extern int ip_output(struct sk_buff *skb); >extern int ip_mc_output(struct sk_buff *skb); >extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); >extern int ip_do_nat(struct sk_buff *skb); >extern void ip_send_check(struct iphdr *ip); >extern int ip_queue_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok); >extern void ip_init(void); >extern int ip_append_data(struct sock *sk, > int getfrag(void *from, char *to, int offset, int len, > int odd, struct sk_buff *skb), > void *from, int len, int protolen, > struct ipcm_cookie *ipc, > struct rtable *rt, > unsigned int flags); >extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); >extern ssize_t ip_append_page(struct sock *sk, struct page *page, > int offset, size_t size, int flags); >extern int ip_push_pending_frames(struct sock *sk); >extern void ip_flush_pending_frames(struct sock *sk); > > >extern int ip4_datagram_connect(struct sock *sk, > struct sockaddr *uaddr, int addr_len); ># 126 "include/net/ip.h" >static inline __attribute__((always_inline)) void ip_tr_mc_map(__be32 addr, char *buf) >{ > buf[0]=0xC0; > buf[1]=0x00; > buf[2]=0x00; > buf[3]=0x04; > buf[4]=0x00; > buf[5]=0x00; >} > >struct ip_reply_arg { > struct kvec iov[1]; > __wsum csum; > int csumoffset; > >}; > >void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, > unsigned int len); > >struct ipv4_config >{ > int log_martians; > int no_pmtu_disc; >}; > >extern struct ipv4_config ipv4_config; >extern __typeof__(struct ipstats_mib) *ip_statistics[2]; >#define IP_INC_STATS(field) SNMP_INC_STATS(ip_statistics, field) >#define IP_INC_STATS_BH(field) SNMP_INC_STATS_BH(ip_statistics, field) >#define IP_INC_STATS_USER(field) SNMP_INC_STATS_USER(ip_statistics, field) >extern __typeof__(struct linux_mib) *net_statistics[2]; >#define NET_INC_STATS(field) SNMP_INC_STATS(net_statistics, field) >#define NET_INC_STATS_BH(field) SNMP_INC_STATS_BH(net_statistics, field) >#define NET_INC_STATS_USER(field) SNMP_INC_STATS_USER(net_statistics, field) >#define NET_ADD_STATS_BH(field,adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) >#define NET_ADD_STATS_USER(field,adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd) > >extern int sysctl_local_port_range[2]; >extern int sysctl_ip_default_ttl; >extern int sysctl_ip_nonlocal_bind; > > >extern int sysctl_ipfrag_high_thresh; >extern int sysctl_ipfrag_low_thresh; >extern int sysctl_ipfrag_time; >extern int sysctl_ipfrag_secret_interval; >extern int sysctl_ipfrag_max_dist; > > >extern int inet_peer_threshold; >extern int inet_peer_minttl; >extern int inet_peer_maxttl; >extern int inet_peer_gc_mintime; >extern int inet_peer_gc_maxtime; > > >extern int sysctl_ip_dynaddr; > >extern void ipfrag_init(void); > > > > > > >static inline __attribute__((always_inline)) >int ip_decrease_ttl(struct iphdr *iph) >{ > u32 check = ( u32)iph->check; > check += ( u32)htons(0x0100); > iph->check = ( __sum16)(check + (check>=0xFFFF)); > return --iph->ttl; >} > >static inline __attribute__((always_inline)) >int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) >{ > return (inet_sk(sk)->pmtudisc == 2 || > (inet_sk(sk)->pmtudisc == 1 && > !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU)))); >} > >extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); > >static inline __attribute__((always_inline)) void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, struct sock *sk) >{ > if (iph->frag_off & htons(0x4000)) { > > > > > > iph->id = (sk && inet_sk(sk)->daddr) ? > htons(inet_sk(sk)->id++) : 0; > } else > __ip_select_ident(iph, dst, 0); >} > >static inline __attribute__((always_inline)) void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more) >{ > if (iph->frag_off & htons(0x4000)) { > if (sk && inet_sk(sk)->daddr) { > iph->id = htons(inet_sk(sk)->id); > inet_sk(sk)->id += 1 + more; > } else > iph->id = 0; > } else > __ip_select_ident(iph, dst, more); >} > > > > > >static inline __attribute__((always_inline)) void ip_eth_mc_map(__be32 naddr, char *buf) >{ > __u32 addr=ntohl(naddr); > buf[0]=0x01; > buf[1]=0x00; > buf[2]=0x5e; > buf[5]=addr&0xFF; > addr>>=8; > buf[4]=addr&0xFF; > addr>>=8; > buf[3]=addr&0x7F; >} > > > > > > >static inline __attribute__((always_inline)) void ip_ib_mc_map(__be32 naddr, char *buf) >{ > __u32 addr; > buf[0] = 0; > buf[1] = 0xff; > buf[2] = 0xff; > buf[3] = 0xff; > addr = ntohl(naddr); > buf[4] = 0xff; > buf[5] = 0x12; > buf[6] = 0x40; > buf[7] = 0x1b; > buf[8] = 0; > buf[9] = 0; > buf[10] = 0; > buf[11] = 0; > buf[12] = 0; > buf[13] = 0; > buf[14] = 0; > buf[15] = 0; > buf[19] = addr & 0xff; > addr >>= 8; > buf[18] = addr & 0xff; > addr >>= 8; > buf[17] = addr & 0xff; > addr >>= 8; > buf[16] = addr & 0x0f; >} > > ># 1 "include/linux/ipv6.h" 1 > >#define _IPV6_H > > > > > > >#define IPV6_MIN_MTU 1280 ># 18 "include/linux/ipv6.h" >struct in6_pktinfo { > struct in6_addr ipi6_addr; > int ipi6_ifindex; >}; > > >struct in6_ifreq { > struct in6_addr ifr6_addr; > __u32 ifr6_prefixlen; > int ifr6_ifindex; >}; > >#define IPV6_SRCRT_STRICT 0x01 >#define IPV6_SRCRT_TYPE_0 0 >#define IPV6_SRCRT_TYPE_2 2 > > > > >struct ipv6_rt_hdr { > __u8 nexthdr; > __u8 hdrlen; > __u8 type; > __u8 segments_left; > > > > > >}; > > >struct ipv6_opt_hdr { > __u8 nexthdr; > __u8 hdrlen; > > > >}; > >#define ipv6_destopt_hdr ipv6_opt_hdr >#define ipv6_hopopt_hdr ipv6_opt_hdr > > >#define ipv6_optlen(p) (((p)->hdrlen+1) << 3) > > > > > > >struct rt0_hdr { > struct ipv6_rt_hdr rt_hdr; > __u32 reserved; > struct in6_addr addr[0]; > >#define rt0_type rt_hdr.type >}; > > > > > >struct rt2_hdr { > struct ipv6_rt_hdr rt_hdr; > __u32 reserved; > struct in6_addr addr; > >#define rt2_type rt_hdr.type >}; > > > > > >struct ipv6_destopt_hao { > __u8 type; > __u8 length; > struct in6_addr addr; >} __attribute__ ((__packed__)); > >struct ipv6_auth_hdr { > __u8 nexthdr; > __u8 hdrlen; > __be16 reserved; > __be32 spi; > __be32 seq_no; > __u8 auth_data[0]; >}; > >struct ipv6_esp_hdr { > __be32 spi; > __be32 seq_no; > __u8 enc_data[0]; >}; > >struct ipv6_comp_hdr { > __u8 nexthdr; > __u8 flags; > __be16 cpi; >}; ># 127 "include/linux/ipv6.h" >struct ipv6hdr { > > __u8 priority:4, > version:4; > > > > > > > __u8 flow_lbl[3]; > > __be16 payload_len; > __u8 nexthdr; > __u8 hop_limit; > > struct in6_addr saddr; > struct in6_addr daddr; >}; > > > > >struct ipv6_devconf { > __s32 forwarding; > __s32 hop_limit; > __s32 mtu6; > __s32 accept_ra; > __s32 accept_redirects; > __s32 autoconf; > __s32 dad_transmits; > __s32 rtr_solicits; > __s32 rtr_solicit_interval; > __s32 rtr_solicit_delay; > __s32 force_mld_version; > > > > > > > > __s32 max_addresses; > __s32 accept_ra_defrtr; > __s32 accept_ra_pinfo; > > > > > > > > __s32 proxy_ndp; > void *sysctl; >}; > > >enum { > DEVCONF_FORWARDING = 0, > DEVCONF_HOPLIMIT, > DEVCONF_MTU6, > DEVCONF_ACCEPT_RA, > DEVCONF_ACCEPT_REDIRECTS, > DEVCONF_AUTOCONF, > DEVCONF_DAD_TRANSMITS, > DEVCONF_RTR_SOLICITS, > DEVCONF_RTR_SOLICIT_INTERVAL, > DEVCONF_RTR_SOLICIT_DELAY, > DEVCONF_USE_TEMPADDR, > DEVCONF_TEMP_VALID_LFT, > DEVCONF_TEMP_PREFERED_LFT, > DEVCONF_REGEN_MAX_RETRY, > DEVCONF_MAX_DESYNC_FACTOR, > DEVCONF_MAX_ADDRESSES, > DEVCONF_FORCE_MLD_VERSION, > DEVCONF_ACCEPT_RA_DEFRTR, > DEVCONF_ACCEPT_RA_PINFO, > DEVCONF_ACCEPT_RA_RTR_PREF, > DEVCONF_RTR_PROBE_INTERVAL, > DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, > DEVCONF_PROXY_NDP, > DEVCONF_MAX >}; > > ># 1 "include/linux/icmpv6.h" 1 > >#define _LINUX_ICMPV6_H > > > >struct icmp6hdr { > > __u8 icmp6_type; > __u8 icmp6_code; > __sum16 icmp6_cksum; > > > union { > __be32 un_data32[1]; > __be16 un_data16[2]; > __u8 un_data8[4]; > > struct icmpv6_echo { > __be16 identifier; > __be16 sequence; > } u_echo; > > struct icmpv6_nd_advt { > > __u32 reserved:5, > override:1, > solicited:1, > router:1, > reserved2:24; ># 38 "include/linux/icmpv6.h" > } u_nd_advt; > > struct icmpv6_nd_ra { > __u8 hop_limit; > > __u8 reserved:4, > router_pref:2, > other:1, > managed:1; ># 56 "include/linux/icmpv6.h" > __be16 rt_lifetime; > } u_nd_ra; > > } icmp6_dataun; > >#define icmp6_identifier icmp6_dataun.u_echo.identifier >#define icmp6_sequence icmp6_dataun.u_echo.sequence >#define icmp6_pointer icmp6_dataun.un_data32[0] >#define icmp6_mtu icmp6_dataun.un_data32[0] >#define icmp6_unused icmp6_dataun.un_data32[0] >#define icmp6_maxdelay icmp6_dataun.un_data16[0] >#define icmp6_router icmp6_dataun.u_nd_advt.router >#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited >#define icmp6_override icmp6_dataun.u_nd_advt.override >#define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved >#define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit >#define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed >#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other >#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime >#define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref >}; > >#define ICMPV6_ROUTER_PREF_LOW 0x3 >#define ICMPV6_ROUTER_PREF_MEDIUM 0x0 >#define ICMPV6_ROUTER_PREF_HIGH 0x1 >#define ICMPV6_ROUTER_PREF_INVALID 0x2 > >#define ICMPV6_DEST_UNREACH 1 >#define ICMPV6_PKT_TOOBIG 2 >#define ICMPV6_TIME_EXCEED 3 >#define ICMPV6_PARAMPROB 4 > >#define ICMPV6_INFOMSG_MASK 0x80 > >#define ICMPV6_ECHO_REQUEST 128 >#define ICMPV6_ECHO_REPLY 129 >#define ICMPV6_MGM_QUERY 130 >#define ICMPV6_MGM_REPORT 131 >#define ICMPV6_MGM_REDUCTION 132 > >#define ICMPV6_NI_QUERY 139 >#define ICMPV6_NI_REPLY 140 > >#define ICMPV6_MLD2_REPORT 143 > >#define ICMPV6_DHAAD_REQUEST 144 >#define ICMPV6_DHAAD_REPLY 145 >#define ICMPV6_MOBILE_PREFIX_SOL 146 >#define ICMPV6_MOBILE_PREFIX_ADV 147 > > > > >#define ICMPV6_NOROUTE 0 >#define ICMPV6_ADM_PROHIBITED 1 >#define ICMPV6_NOT_NEIGHBOUR 2 >#define ICMPV6_ADDR_UNREACH 3 >#define ICMPV6_PORT_UNREACH 4 > > > > >#define ICMPV6_EXC_HOPLIMIT 0 >#define ICMPV6_EXC_FRAGTIME 1 > > > > >#define ICMPV6_HDR_FIELD 0 >#define ICMPV6_UNK_NEXTHDR 1 >#define ICMPV6_UNK_OPTION 2 > > > > > >#define ICMPV6_FILTER 1 > > > > > >#define ICMPV6_FILTER_BLOCK 1 >#define ICMPV6_FILTER_PASS 2 >#define ICMPV6_FILTER_BLOCKOTHERS 3 >#define ICMPV6_FILTER_PASSONLY 4 > >struct icmp6_filter { > __u32 data[8]; >}; > > > > >#define MLD2_MODE_IS_INCLUDE 1 >#define MLD2_MODE_IS_EXCLUDE 2 >#define MLD2_CHANGE_TO_INCLUDE 3 >#define MLD2_CHANGE_TO_EXCLUDE 4 >#define MLD2_ALLOW_NEW_SOURCES 5 >#define MLD2_BLOCK_OLD_SOURCES 6 > >#define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } } > > > > > > > >extern void icmpv6_send(struct sk_buff *skb, > int type, int code, > __u32 info, > struct net_device *dev); > >extern int icmpv6_init(struct net_proto_family *ops); >extern int icmpv6_err_convert(int type, int code, > int *err); >extern void icmpv6_cleanup(void); >extern void icmpv6_param_prob(struct sk_buff *skb, > int code, int pos); ># 213 "include/linux/ipv6.h" 2 ># 1 "include/linux/tcp.h" 1 ># 18 "include/linux/tcp.h" >#define _LINUX_TCP_H > > > > > >struct tcphdr { > __be16 source; > __be16 dest; > __be32 seq; > __be32 ack_seq; > > __u16 res1:4, > doff:4, > fin:1, > syn:1, > rst:1, > psh:1, > ack:1, > urg:1, > ece:1, > cwr:1; ># 54 "include/linux/tcp.h" > __be16 window; > __sum16 check; > __be16 urg_ptr; >}; > > > > > > >union tcp_word_hdr { > struct tcphdr hdr; > __be32 words[5]; >}; > >#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) > >enum { > TCP_FLAG_CWR = (( __be32)((__u32)( (((__u32)((0x00800000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00800000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00800000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00800000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_ECE = (( __be32)((__u32)( (((__u32)((0x00400000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00400000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00400000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00400000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_URG = (( __be32)((__u32)( (((__u32)((0x00200000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00200000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00200000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00200000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_ACK = (( __be32)((__u32)( (((__u32)((0x00100000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00100000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00100000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00100000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_PSH = (( __be32)((__u32)( (((__u32)((0x00080000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00080000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00080000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00080000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_RST = (( __be32)((__u32)( (((__u32)((0x00040000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00040000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00040000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00040000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_SYN = (( __be32)((__u32)( (((__u32)((0x00020000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00020000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00020000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00020000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_FLAG_FIN = (( __be32)((__u32)( (((__u32)((0x00010000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00010000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00010000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00010000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_RESERVED_BITS = (( __be32)((__u32)( (((__u32)((0x0F000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x0F000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x0F000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x0F000000)) & (__u32)0xff000000UL) >> 24) ))), > TCP_DATA_OFFSET = (( __be32)((__u32)( (((__u32)((0xF0000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0xF0000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0xF0000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0xF0000000)) & (__u32)0xff000000UL) >> 24) ))) >}; > > >#define TCP_NODELAY 1 >#define TCP_MAXSEG 2 >#define TCP_CORK 3 >#define TCP_KEEPIDLE 4 >#define TCP_KEEPINTVL 5 >#define TCP_KEEPCNT 6 >#define TCP_SYNCNT 7 >#define TCP_LINGER2 8 >#define TCP_DEFER_ACCEPT 9 >#define TCP_WINDOW_CLAMP 10 >#define TCP_INFO 11 >#define TCP_QUICKACK 12 >#define TCP_CONGESTION 13 >#define TCP_MD5SIG 14 > >#define TCPI_OPT_TIMESTAMPS 1 >#define TCPI_OPT_SACK 2 >#define TCPI_OPT_WSCALE 4 >#define TCPI_OPT_ECN 8 > >enum tcp_ca_state >{ > TCP_CA_Open = 0, >#define TCPF_CA_Open (1<<TCP_CA_Open) > TCP_CA_Disorder = 1, >#define TCPF_CA_Disorder (1<<TCP_CA_Disorder) > TCP_CA_CWR = 2, >#define TCPF_CA_CWR (1<<TCP_CA_CWR) > TCP_CA_Recovery = 3, >#define TCPF_CA_Recovery (1<<TCP_CA_Recovery) > TCP_CA_Loss = 4 >#define TCPF_CA_Loss (1<<TCP_CA_Loss) >}; > >struct tcp_info >{ > __u8 tcpi_state; > __u8 tcpi_ca_state; > __u8 tcpi_retransmits; > __u8 tcpi_probes; > __u8 tcpi_backoff; > __u8 tcpi_options; > __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; > > __u32 tcpi_rto; > __u32 tcpi_ato; > __u32 tcpi_snd_mss; > __u32 tcpi_rcv_mss; > > __u32 tcpi_unacked; > __u32 tcpi_sacked; > __u32 tcpi_lost; > __u32 tcpi_retrans; > __u32 tcpi_fackets; > > > __u32 tcpi_last_data_sent; > __u32 tcpi_last_ack_sent; > __u32 tcpi_last_data_recv; > __u32 tcpi_last_ack_recv; > > > __u32 tcpi_pmtu; > __u32 tcpi_rcv_ssthresh; > __u32 tcpi_rtt; > __u32 tcpi_rttvar; > __u32 tcpi_snd_ssthresh; > __u32 tcpi_snd_cwnd; > __u32 tcpi_advmss; > __u32 tcpi_reordering; > > __u32 tcpi_rcv_rtt; > __u32 tcpi_rcv_space; > > __u32 tcpi_total_retrans; >}; > > >#define TCP_MD5SIG_MAXKEYLEN 80 > >struct tcp_md5sig { > struct __kernel_sockaddr_storage tcpm_addr; > __u16 __tcpm_pad1; > __u16 tcpm_keylen; > __u32 __tcpm_pad2; > __u8 tcpm_key[80]; >}; > > > > > > ># 1 "include/net/inet_connection_sock.h" 1 ># 16 "include/net/inet_connection_sock.h" >#define _INET_CONNECTION_SOCK_H > > > > ># 1 "include/linux/poll.h" 1 > >#define _LINUX_POLL_H > ># 1 "include/asm/poll.h" 1 > >#define __UM_POLL_H > ># 1 "include/asm/arch/poll.h" 1 > >#define __i386_POLL_H > > >#define POLLIN 0x0001 >#define POLLPRI 0x0002 >#define POLLOUT 0x0004 >#define POLLERR 0x0008 >#define POLLHUP 0x0010 >#define POLLNVAL 0x0020 > > >#define POLLRDNORM 0x0040 >#define POLLRDBAND 0x0080 >#define POLLWRNORM 0x0100 >#define POLLWRBAND 0x0200 >#define POLLMSG 0x0400 >#define POLLREMOVE 0x1000 >#define POLLRDHUP 0x2000 > >struct pollfd { > int fd; > short events; > short revents; >}; ># 5 "include/asm/poll.h" 2 ># 5 "include/linux/poll.h" 2 ># 17 "include/linux/poll.h" >#define MAX_STACK_ALLOC 832 >#define FRONTEND_STACK_ALLOC 256 >#define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC >#define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC >#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) >#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) > >struct poll_table_struct; > > > > >typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); > >typedef struct poll_table_struct { > poll_queue_proc qproc; >} poll_table; > >static inline __attribute__((always_inline)) void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) >{ > if (p && wait_address) > p->qproc(filp, wait_address, p); >} > >static inline __attribute__((always_inline)) void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) >{ > pt->qproc = qproc; >} > >struct poll_table_entry { > struct file * filp; > wait_queue_t wait; > wait_queue_head_t * wait_address; >}; > > > > >struct poll_wqueues { > poll_table pt; > struct poll_table_page * table; > int error; > int inline_index; > struct poll_table_entry inline_entries[((832 - 256) / sizeof(struct poll_table_entry))]; >}; > >extern void poll_initwait(struct poll_wqueues *pwq); >extern void poll_freewait(struct poll_wqueues *pwq); > > > > > >typedef struct { > unsigned long *in, *out, *ex; > unsigned long *res_in, *res_out, *res_ex; >} fd_set_bits; > > > > >#define FDS_BITPERLONG (8*sizeof(long)) >#define FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG) >#define FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long)) > > > > > > > >static inline __attribute__((always_inline)) >int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset) >{ > nr = ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)); > if (ufdset) > return copy_from_user(fdset, ufdset, nr) ? -14 : 0; > > (__builtin_constant_p(0) ? (__builtin_constant_p((nr)) ? __constant_c_and_count_memset(((fdset)),((0x01010101UL*(unsigned char)(0))),((nr))) : __constant_c_memset(((fdset)),((0x01010101UL*(unsigned char)(0))),((nr)))) : (__builtin_constant_p((nr)) ? __memset_generic((((fdset))),(((0))),(((nr)))) : __memset_generic(((fdset)),((0)),((nr))))); > return 0; >} > >static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) >set_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset) >{ > if (ufdset) > return copy_to_user(ufdset, fdset, ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long))); > return 0; >} > >static inline __attribute__((always_inline)) >void zero_fd_set(unsigned long nr, unsigned long *fdset) >{ > (__builtin_constant_p(0) ? (__builtin_constant_p((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)))) ? __constant_c_and_count_memset(((fdset)),((0x01010101UL*(unsigned char)(0))),((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long))))) : __constant_c_memset(((fdset)),((0x01010101UL*(unsigned char)(0))),((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)))))) : (__builtin_constant_p((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)))) ? __memset_generic((((fdset))),(((0))),(((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)))))) : __memset_generic(((fdset)),((0)),((((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long))))))); >} > >#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) > >extern int do_select(int n, fd_set_bits *fds, s64 *timeout); >extern int do_sys_poll(struct pollfd * ufds, unsigned int nfds, > s64 *timeout); ># 22 "include/net/inet_connection_sock.h" 2 > > > > >#define INET_CSK_DEBUG 1 > > >#undef INET_CSK_CLEAR_TIMERS > >struct inet_bind_bucket; >struct inet_hashinfo; >struct tcp_congestion_ops; > > > > > >struct inet_connection_sock_af_ops { > int (*queue_xmit)(struct sk_buff *skb, struct sock *sk, > int ipfragok); > void (*send_check)(struct sock *sk, int len, > struct sk_buff *skb); > int (*rebuild_header)(struct sock *sk); > int (*conn_request)(struct sock *sk, struct sk_buff *skb); > struct sock *(*syn_recv_sock)(struct sock *sk, struct sk_buff *skb, > struct request_sock *req, > struct dst_entry *dst); > int (*remember_stamp)(struct sock *sk); > u16 net_header_len; > u16 sockaddr_len; > int (*setsockopt)(struct sock *sk, int level, int optname, > char *optval, int optlen); > int (*getsockopt)(struct sock *sk, int level, int optname, > char *optval, int *optlen); > int (*compat_setsockopt)(struct sock *sk, > int level, int optname, > char *optval, int optlen); > int (*compat_getsockopt)(struct sock *sk, > int level, int optname, > char *optval, int *optlen); > void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); >}; ># 85 "include/net/inet_connection_sock.h" >struct inet_connection_sock { > > struct inet_sock icsk_inet; > struct request_sock_queue icsk_accept_queue; > struct inet_bind_bucket *icsk_bind_hash; > unsigned long icsk_timeout; > struct timer_list icsk_retransmit_timer; > struct timer_list icsk_delack_timer; > __u32 icsk_rto; > __u32 icsk_pmtu_cookie; > const struct tcp_congestion_ops *icsk_ca_ops; > const struct inet_connection_sock_af_ops *icsk_af_ops; > unsigned int (*icsk_sync_mss)(struct sock *sk, u32 pmtu); > __u8 icsk_ca_state; > __u8 icsk_retransmits; > __u8 icsk_pending; > __u8 icsk_backoff; > __u8 icsk_syn_retries; > __u8 icsk_probes_out; > __u16 icsk_ext_hdr_len; > struct { > __u8 pending; > __u8 quick; > __u8 pingpong; > __u8 blocked; > __u32 ato; > unsigned long timeout; > __u32 lrcvtime; > __u16 last_seg_size; > __u16 rcv_mss; > } icsk_ack; > struct { > int enabled; > > > int search_high; > int search_low; > > > int probe_size; > } icsk_mtup; > u32 icsk_ca_priv[16]; >#define ICSK_CA_PRIV_SIZE (16 * sizeof(u32)) >}; > >#define ICSK_TIME_RETRANS 1 >#define ICSK_TIME_DACK 2 >#define ICSK_TIME_PROBE0 3 >#define ICSK_TIME_KEEPOPEN 4 > >static inline __attribute__((always_inline)) struct inet_connection_sock *inet_csk(const struct sock *sk) >{ > return (struct inet_connection_sock *)sk; >} > >static inline __attribute__((always_inline)) void *inet_csk_ca(const struct sock *sk) >{ > return (void *)inet_csk(sk)->icsk_ca_priv; >} > >extern struct sock *inet_csk_clone(struct sock *sk, > const struct request_sock *req, > const gfp_t priority); > >enum inet_csk_ack_state_t { > ICSK_ACK_SCHED = 1, > ICSK_ACK_TIMER = 2, > ICSK_ACK_PUSHED = 4, > ICSK_ACK_PUSHED2 = 8 >}; > >extern void inet_csk_init_xmit_timers(struct sock *sk, > void (*retransmit_handler)(unsigned long), > void (*delack_handler)(unsigned long), > void (*keepalive_handler)(unsigned long)); >extern void inet_csk_clear_xmit_timers(struct sock *sk); > >static inline __attribute__((always_inline)) void inet_csk_schedule_ack(struct sock *sk) >{ > inet_csk(sk)->icsk_ack.pending |= ICSK_ACK_SCHED; >} > >static inline __attribute__((always_inline)) int inet_csk_ack_scheduled(const struct sock *sk) >{ > return inet_csk(sk)->icsk_ack.pending & ICSK_ACK_SCHED; >} > >static inline __attribute__((always_inline)) void inet_csk_delack_init(struct sock *sk) >{ > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(inet_csk(sk)->icsk_ack))) ? __constant_c_and_count_memset(((&inet_csk(sk)->icsk_ack)),((0x01010101UL*(unsigned char)(0))),((sizeof(inet_csk(sk)->icsk_ack)))) : __constant_c_memset(((&inet_csk(sk)->icsk_ack)),((0x01010101UL*(unsigned char)(0))),((sizeof(inet_csk(sk)->icsk_ack))))) : (__builtin_constant_p((sizeof(inet_csk(sk)->icsk_ack))) ? __memset_generic((((&inet_csk(sk)->icsk_ack))),(((0))),(((sizeof(inet_csk(sk)->icsk_ack))))) : __memset_generic(((&inet_csk(sk)->icsk_ack)),((0)),((sizeof(inet_csk(sk)->icsk_ack)))))); >} > >extern void inet_csk_delete_keepalive_timer(struct sock *sk); >extern void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long timeout); > > >extern const char inet_csk_timer_bug_msg[]; > > >static inline __attribute__((always_inline)) void inet_csk_clear_xmit_timer(struct sock *sk, const int what) >{ > struct inet_connection_sock *icsk = inet_csk(sk); > > if (what == 1 || what == 3) { > icsk->icsk_pending = 0; > > > > } else if (what == 2) { > icsk->icsk_ack.blocked = icsk->icsk_ack.pending = 0; > > > > } > > else { > pr_debug("%s", inet_csk_timer_bug_msg); > } > >} > > > > >static inline __attribute__((always_inline)) void inet_csk_reset_xmit_timer(struct sock *sk, const int what, > unsigned long when, > const unsigned long max_when) >{ > struct inet_connection_sock *icsk = inet_csk(sk); > > if (when > max_when) { > > pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n", > sk, what, when, ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })); > > when = max_when; > } > > if (what == 1 || what == 3) { > icsk->icsk_pending = what; > icsk->icsk_timeout = jiffies + when; > sk_reset_timer(sk, &icsk->icsk_retransmit_timer, icsk->icsk_timeout); > } else if (what == 2) { > icsk->icsk_ack.pending |= ICSK_ACK_TIMER; > icsk->icsk_ack.timeout = jiffies + when; > sk_reset_timer(sk, &icsk->icsk_delack_timer, icsk->icsk_ack.timeout); > } > > else { > pr_debug("%s", inet_csk_timer_bug_msg); > } > >} > >extern struct sock *inet_csk_accept(struct sock *sk, int flags, int *err); > >extern struct request_sock *inet_csk_search_req(const struct sock *sk, > struct request_sock ***prevp, > const __be16 rport, > const __be32 raddr, > const __be32 laddr); >extern int inet_csk_bind_conflict(const struct sock *sk, > const struct inet_bind_bucket *tb); >extern int inet_csk_get_port(struct inet_hashinfo *hashinfo, > struct sock *sk, unsigned short snum, > int (*bind_conflict)(const struct sock *sk, > const struct inet_bind_bucket *tb)); > >extern struct dst_entry* inet_csk_route_req(struct sock *sk, > const struct request_sock *req); > >static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_add(struct sock *sk, > struct request_sock *req, > struct sock *child) >{ > reqsk_queue_add(&inet_csk(sk)->icsk_accept_queue, req, sk, child); >} > >extern void inet_csk_reqsk_queue_hash_add(struct sock *sk, > struct request_sock *req, > unsigned long timeout); > >static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_removed(struct sock *sk, > struct request_sock *req) >{ > if (reqsk_queue_removed(&inet_csk(sk)->icsk_accept_queue, req) == 0) > inet_csk_delete_keepalive_timer(sk); >} > >static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_added(struct sock *sk, > const unsigned long timeout) >{ > if (reqsk_queue_added(&inet_csk(sk)->icsk_accept_queue) == 0) > inet_csk_reset_keepalive_timer(sk, timeout); >} > >static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_len(const struct sock *sk) >{ > return reqsk_queue_len(&inet_csk(sk)->icsk_accept_queue); >} > >static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_young(const struct sock *sk) >{ > return reqsk_queue_len_young(&inet_csk(sk)->icsk_accept_queue); >} > >static inline __attribute__((always_inline)) int inet_csk_reqsk_queue_is_full(const struct sock *sk) >{ > return reqsk_queue_is_full(&inet_csk(sk)->icsk_accept_queue); >} > >static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_unlink(struct sock *sk, > struct request_sock *req, > struct request_sock **prev) >{ > reqsk_queue_unlink(&inet_csk(sk)->icsk_accept_queue, req, prev); >} > >static inline __attribute__((always_inline)) void inet_csk_reqsk_queue_drop(struct sock *sk, > struct request_sock *req, > struct request_sock **prev) >{ > inet_csk_reqsk_queue_unlink(sk, req, prev); > inet_csk_reqsk_queue_removed(sk, req); > reqsk_free(req); >} > >extern void inet_csk_reqsk_queue_prune(struct sock *parent, > const unsigned long interval, > const unsigned long timeout, > const unsigned long max_rto); > >extern void inet_csk_destroy_sock(struct sock *sk); > > > > >static inline __attribute__((always_inline)) unsigned int inet_csk_listen_poll(const struct sock *sk) >{ > return !reqsk_queue_empty(&inet_csk(sk)->icsk_accept_queue) ? > (0x0001 | 0x0040) : 0; >} > >extern int inet_csk_listen_start(struct sock *sk, const int nr_table_entries); >extern void inet_csk_listen_stop(struct sock *sk); > >extern void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr); > >extern int inet_csk_ctl_sock_create(struct socket **sock, > unsigned short family, > unsigned short type, > unsigned char protocol); > >extern int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname, > char *optval, int *optlen); >extern int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname, > char *optval, int optlen); ># 179 "include/linux/tcp.h" 2 ># 1 "include/net/inet_timewait_sock.h" 1 ># 16 "include/net/inet_timewait_sock.h" >#define _INET_TIMEWAIT_SOCK_ ># 27 "include/net/inet_timewait_sock.h" ># 1 "include/net/tcp_states.h" 1 ># 14 "include/net/tcp_states.h" >#define _LINUX_TCP_STATES_H > >enum { > TCP_ESTABLISHED = 1, > TCP_SYN_SENT, > TCP_SYN_RECV, > TCP_FIN_WAIT1, > TCP_FIN_WAIT2, > TCP_TIME_WAIT, > TCP_CLOSE, > TCP_CLOSE_WAIT, > TCP_LAST_ACK, > TCP_LISTEN, > TCP_CLOSING, > > TCP_MAX_STATES >}; > >#define TCP_STATE_MASK 0xF > >#define TCP_ACTION_FIN (1 << 7) > >enum { > TCPF_ESTABLISHED = (1 << 1), > TCPF_SYN_SENT = (1 << 2), > TCPF_SYN_RECV = (1 << 3), > TCPF_FIN_WAIT1 = (1 << 4), > TCPF_FIN_WAIT2 = (1 << 5), > TCPF_TIME_WAIT = (1 << 6), > TCPF_CLOSE = (1 << 7), > TCPF_CLOSE_WAIT = (1 << 8), > TCPF_LAST_ACK = (1 << 9), > TCPF_LISTEN = (1 << 10), > TCPF_CLOSING = (1 << 11) >}; ># 28 "include/net/inet_timewait_sock.h" 2 ># 1 "include/net/timewait_sock.h" 1 ># 12 "include/net/timewait_sock.h" >#define _TIMEWAIT_SOCK_H > > > > >struct timewait_sock_ops { > struct kmem_cache *twsk_slab; > unsigned int twsk_obj_size; > int (*twsk_unique)(struct sock *sk, > struct sock *sktw, void *twp); > void (*twsk_destructor)(struct sock *sk); >}; > >static inline __attribute__((always_inline)) int twsk_unique(struct sock *sk, struct sock *sktw, void *twp) >{ > if (sk->__sk_common.skc_prot->twsk_prot->twsk_unique != ((void *)0)) > return sk->__sk_common.skc_prot->twsk_prot->twsk_unique(sk, sktw, twp); > return 0; >} > >static inline __attribute__((always_inline)) void twsk_destructor(struct sock *sk) >{ > do { if (__builtin_expect(!!((sk == ((void *)0))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/net/timewait_sock.h"), "i" (34), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > do { if (__builtin_expect(!!((sk->__sk_common.skc_prot == ((void *)0))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/net/timewait_sock.h"), "i" (35), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > do { if (__builtin_expect(!!((sk->__sk_common.skc_prot->twsk_prot == ((void *)0))!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/net/timewait_sock.h"), "i" (36), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > if (sk->__sk_common.skc_prot->twsk_prot->twsk_destructor != ((void *)0)) > sk->__sk_common.skc_prot->twsk_prot->twsk_destructor(sk); >} ># 29 "include/net/inet_timewait_sock.h" 2 > > > >struct inet_hashinfo; > >#define INET_TWDR_RECYCLE_SLOTS_LOG 5 >#define INET_TWDR_RECYCLE_SLOTS (1 << INET_TWDR_RECYCLE_SLOTS_LOG) ># 48 "include/net/inet_timewait_sock.h" >#define INET_TWDR_RECYCLE_TICK (7 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) ># 62 "include/net/inet_timewait_sock.h" >#define INET_TWDR_TWKILL_SLOTS 8 > >#define INET_TWDR_TWKILL_QUOTA 100 > >struct inet_timewait_death_row { > > int twcal_hand; > int twcal_jiffie; > struct timer_list twcal_timer; > struct hlist_head twcal_row[(1 << 5)]; > > spinlock_t death_lock; > int tw_count; > int period; > u32 thread_slots; > struct work_struct twkill_work; > struct timer_list tw_timer; > int slot; > struct hlist_head cells[8]; > struct inet_hashinfo *hashinfo; > int sysctl_tw_recycle; > int sysctl_max_tw_buckets; >}; > >extern void inet_twdr_hangman(unsigned long data); >extern void inet_twdr_twkill_work(struct work_struct *work); >extern void inet_twdr_twcal_tick(unsigned long data); > > > > >#define INET_TIMEWAIT_ADDRCMP_ALIGN_BYTES 4 > > >struct inet_bind_bucket; > > > > > > >struct inet_timewait_sock { > > > > > struct sock_common __tw_common; >#define tw_family __tw_common.skc_family >#define tw_state __tw_common.skc_state >#define tw_reuse __tw_common.skc_reuse >#define tw_bound_dev_if __tw_common.skc_bound_dev_if >#define tw_node __tw_common.skc_node >#define tw_bind_node __tw_common.skc_bind_node >#define tw_refcnt __tw_common.skc_refcnt >#define tw_hash __tw_common.skc_hash >#define tw_prot __tw_common.skc_prot > volatile unsigned char tw_substate; > > unsigned char tw_rcv_wscale; > > > __be16 tw_sport; > __be32 tw_daddr __attribute__((aligned(4))); > __be32 tw_rcv_saddr; > __be16 tw_dport; > __u16 tw_num; > > __u8 tw_ipv6only:1; > > __u16 tw_ipv6_offset; > int tw_timeout; > unsigned long tw_ttd; > struct inet_bind_bucket *tw_tb; > struct hlist_node tw_death_node; >}; > >static inline __attribute__((always_inline)) void inet_twsk_add_node(struct inet_timewait_sock *tw, > struct hlist_head *list) >{ > hlist_add_head(&tw->__tw_common.skc_node, list); >} > >static inline __attribute__((always_inline)) void inet_twsk_add_bind_node(struct inet_timewait_sock *tw, > struct hlist_head *list) >{ > hlist_add_head(&tw->__tw_common.skc_bind_node, list); >} > >static inline __attribute__((always_inline)) int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) >{ > return !hlist_unhashed(&tw->tw_death_node); >} > >static inline __attribute__((always_inline)) void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) >{ > tw->tw_death_node.pprev = ((void *)0); >} > >static inline __attribute__((always_inline)) void __inet_twsk_del_dead_node(struct inet_timewait_sock *tw) >{ > __hlist_del(&tw->tw_death_node); > inet_twsk_dead_node_init(tw); >} > >static inline __attribute__((always_inline)) int inet_twsk_del_dead_node(struct inet_timewait_sock *tw) >{ > if (inet_twsk_dead_hashed(tw)) { > __inet_twsk_del_dead_node(tw); > return 1; > } > return 0; >} > >#define inet_twsk_for_each(tw,node,head) hlist_for_each_entry(tw, node, head, tw_node) > > >#define inet_twsk_for_each_inmate(tw,node,jail) hlist_for_each_entry(tw, node, jail, tw_death_node) > > >#define inet_twsk_for_each_inmate_safe(tw,node,safe,jail) hlist_for_each_entry_safe(tw, node, safe, jail, tw_death_node) > > >static inline __attribute__((always_inline)) struct inet_timewait_sock *inet_twsk(const struct sock *sk) >{ > return (struct inet_timewait_sock *)sk; >} > >static inline __attribute__((always_inline)) __be32 inet_rcv_saddr(const struct sock *sk) >{ > return __builtin_expect(!!(sk->__sk_common.skc_state != TCP_TIME_WAIT), 1) ? > inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr; >} > >static inline __attribute__((always_inline)) void inet_twsk_put(struct inet_timewait_sock *tw) >{ > if (atomic_dec_and_test(&tw->__tw_common.skc_refcnt)) { > struct module *owner = tw->__tw_common.skc_prot->owner; > twsk_destructor((struct sock *)tw); > > > > > kmem_cache_free(tw->__tw_common.skc_prot->twsk_prot->twsk_slab, tw); > module_put(owner); > } >} > >extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, > const int state); > >extern void __inet_twsk_kill(struct inet_timewait_sock *tw, > struct inet_hashinfo *hashinfo); > >extern void __inet_twsk_hashdance(struct inet_timewait_sock *tw, > struct sock *sk, > struct inet_hashinfo *hashinfo); > >extern void inet_twsk_schedule(struct inet_timewait_sock *tw, > struct inet_timewait_death_row *twdr, > const int timeo, const int timewait_len); >extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, > struct inet_timewait_death_row *twdr); ># 180 "include/linux/tcp.h" 2 > > >struct tcp_sack_block_wire { > __be32 start_seq; > __be32 end_seq; >}; > >struct tcp_sack_block { > u32 start_seq; > u32 end_seq; >}; > >struct tcp_options_received { > > long ts_recent_stamp; > u32 ts_recent; > u32 rcv_tsval; > u32 rcv_tsecr; > u16 saw_tstamp : 1, > tstamp_ok : 1, > dsack : 1, > wscale_ok : 1, > sack_ok : 4, > snd_wscale : 4, > rcv_wscale : 4; > > u8 eff_sacks; > u8 num_sacks; > u16 user_mss; > u16 mss_clamp; >}; > >struct tcp_request_sock { > struct inet_request_sock req; > > > > > u32 rcv_isn; > u32 snt_isn; >}; > >static inline __attribute__((always_inline)) struct tcp_request_sock *tcp_rsk(const struct request_sock *req) >{ > return (struct tcp_request_sock *)req; >} > >struct tcp_sock { > > struct inet_connection_sock inet_conn; > u16 tcp_header_len; > u16 xmit_size_goal; > > > > > > __be32 pred_flags; > > > > > > > u32 rcv_nxt; > u32 snd_nxt; > > u32 snd_una; > u32 snd_sml; > u32 rcv_tstamp; > u32 lsndtime; > > > struct { > struct sk_buff_head prequeue; > struct task_struct *task; > struct iovec *iov; > int memory; > int len; > > > > > > > > } ucopy; > > u32 snd_wl1; > u32 snd_wnd; > u32 max_window; > u32 mss_cache; > > u32 window_clamp; > u32 rcv_ssthresh; > > u32 frto_highmark; > u8 reordering; > u8 frto_counter; > u8 nonagle; > u8 keepalive_probes; > > > u32 srtt; > u32 mdev; > u32 mdev_max; > u32 rttvar; > u32 rtt_seq; > > u32 packets_out; > u32 left_out; > u32 retrans_out; > > > > struct tcp_options_received rx_opt; > > > > > u32 snd_ssthresh; > u32 snd_cwnd; > u16 snd_cwnd_cnt; > u16 snd_cwnd_clamp; > u32 snd_cwnd_used; > u32 snd_cwnd_stamp; > > struct sk_buff_head out_of_order_queue; > > u32 rcv_wnd; > u32 rcv_wup; > u32 write_seq; > u32 pushed_seq; > u32 copied_seq; > > > struct tcp_sack_block duplicate_sack[1]; > struct tcp_sack_block selective_acks[4]; > > struct tcp_sack_block recv_sack_cache[4]; > > > struct sk_buff* lost_skb_hint; > > struct sk_buff *scoreboard_skb_hint; > struct sk_buff *retransmit_skb_hint; > struct sk_buff *forward_skb_hint; > struct sk_buff *fastpath_skb_hint; > > int fastpath_cnt_hint; > int lost_cnt_hint; > int retransmit_cnt_hint; > int forward_cnt_hint; > > u16 advmss; > u16 prior_ssthresh; > u32 lost_out; > u32 sacked_out; > u32 fackets_out; > u32 high_seq; > > u32 retrans_stamp; > > > u32 undo_marker; > int undo_retrans; > u32 urg_seq; > u16 urg_data; > u8 urg_mode; > u8 ecn_flags; > u32 snd_up; > > u32 total_retrans; > u32 bytes_acked; > > unsigned int keepalive_time; > unsigned int keepalive_intvl; > int linger2; > > unsigned long last_synq_overflow; > > u32 tso_deferred; > > > struct { > u32 rtt; > u32 seq; > u32 time; > } rcv_rtt_est; > > > struct { > int space; > u32 seq; > u32 time; > } rcvq_space; > > > struct { > u32 probe_seq_start; > u32 probe_seq_end; > } mtu_probe; ># 390 "include/linux/tcp.h" >}; > >static inline __attribute__((always_inline)) struct tcp_sock *tcp_sk(const struct sock *sk) >{ > return (struct tcp_sock *)sk; >} > >struct tcp_timewait_sock { > struct inet_timewait_sock tw_sk; > u32 tw_rcv_nxt; > u32 tw_snd_nxt; > u32 tw_rcv_wnd; > u32 tw_ts_recent; > long tw_ts_recent_stamp; > > > > >}; > >static inline __attribute__((always_inline)) struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) >{ > return (struct tcp_timewait_sock *)sk; >} ># 214 "include/linux/ipv6.h" 2 ># 1 "include/linux/udp.h" 1 ># 18 "include/linux/udp.h" >#define _LINUX_UDP_H > > > >struct udphdr { > __be16 source; > __be16 dest; > __be16 len; > __sum16 check; >}; > > >#define UDP_CORK 1 >#define UDP_ENCAP 100 > > >#define UDP_ENCAP_ESPINUDP_NON_IKE 1 >#define UDP_ENCAP_ESPINUDP 2 > > > > > >#define UDP_HTABLE_SIZE 128 > >struct udp_sock { > > struct inet_sock inet; > int pending; > unsigned int corkflag; > __u16 encap_type; > > > > > __u16 len; > > > > __u16 pcslen; > __u16 pcrlen; > >#define UDPLITE_BIT 0x1 >#define UDPLITE_SEND_CC 0x2 >#define UDPLITE_RECV_CC 0x4 > __u8 pcflag; >}; > >static inline __attribute__((always_inline)) struct udp_sock *udp_sk(const struct sock *sk) >{ > return (struct udp_sock *)sk; >} >#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) ># 215 "include/linux/ipv6.h" 2 > ># 1 "include/net/if_inet6.h" 1 ># 16 "include/net/if_inet6.h" >#define _NET_IF_INET6_H > > ># 1 "include/linux/ipv6.h" 1 ># 20 "include/net/if_inet6.h" 2 > > > >#define IF_RA_OTHERCONF 0x80 >#define IF_RA_MANAGED 0x40 >#define IF_RA_RCVD 0x20 >#define IF_RS_SENT 0x10 >#define IF_READY 0x80000000 > > >#define IF_PREFIX_ONLINK 0x01 >#define IF_PREFIX_AUTOCONF 0x02 > > > >struct inet6_ifaddr >{ > struct in6_addr addr; > __u32 prefix_len; > > __u32 valid_lft; > __u32 prefered_lft; > unsigned long cstamp; > unsigned long tstamp; > atomic_t refcnt; > spinlock_t lock; > > __u8 probes; > __u8 flags; > > __u16 scope; > > struct timer_list timer; > > struct inet6_dev *idev; > struct rt6_info *rt; > > struct inet6_ifaddr *lst_next; > struct inet6_ifaddr *if_next; > > > > > > > > int dead; >}; > >struct ip6_sf_socklist >{ > unsigned int sl_max; > unsigned int sl_count; > struct in6_addr sl_addr[0]; >}; > >#define IP6_SFLSIZE(count) (sizeof(struct ip6_sf_socklist) + (count) * sizeof(struct in6_addr)) > > >#define IP6_SFBLOCK 10 > >struct ipv6_mc_socklist >{ > struct in6_addr addr; > int ifindex; > struct ipv6_mc_socklist *next; > rwlock_t sflock; > unsigned int sfmode; > struct ip6_sf_socklist *sflist; >}; > >struct ip6_sf_list >{ > struct ip6_sf_list *sf_next; > struct in6_addr sf_addr; > unsigned long sf_count[2]; > unsigned char sf_gsresp; > unsigned char sf_oldin; > unsigned char sf_crcount; >}; > >#define MAF_TIMER_RUNNING 0x01 >#define MAF_LAST_REPORTER 0x02 >#define MAF_LOADED 0x04 >#define MAF_NOREPORT 0x08 >#define MAF_GSQUERY 0x10 > >struct ifmcaddr6 >{ > struct in6_addr mca_addr; > struct inet6_dev *idev; > struct ifmcaddr6 *next; > struct ip6_sf_list *mca_sources; > struct ip6_sf_list *mca_tomb; > unsigned int mca_sfmode; > unsigned long mca_sfcount[2]; > struct timer_list mca_timer; > unsigned mca_flags; > int mca_users; > atomic_t mca_refcnt; > spinlock_t mca_lock; > unsigned char mca_crcount; > unsigned long mca_cstamp; > unsigned long mca_tstamp; >}; > > > >struct ipv6_ac_socklist >{ > struct in6_addr acl_addr; > int acl_ifindex; > struct ipv6_ac_socklist *acl_next; >}; > >struct ifacaddr6 >{ > struct in6_addr aca_addr; > struct inet6_dev *aca_idev; > struct rt6_info *aca_rt; > struct ifacaddr6 *aca_next; > int aca_users; > atomic_t aca_refcnt; > spinlock_t aca_lock; > unsigned long aca_cstamp; > unsigned long aca_tstamp; >}; > >#define IFA_HOST IPV6_ADDR_LOOPBACK >#define IFA_LINK IPV6_ADDR_LINKLOCAL >#define IFA_SITE IPV6_ADDR_SITELOCAL >#define IFA_GLOBAL 0x0000U > >struct ipv6_devstat { > struct proc_dir_entry *proc_dir_entry; > __typeof__(struct ipstats_mib) *ipv6[2]; > __typeof__(struct icmpv6_mib) *icmpv6[2]; >}; > >struct inet6_dev >{ > struct net_device *dev; > > struct inet6_ifaddr *addr_list; > > struct ifmcaddr6 *mc_list; > struct ifmcaddr6 *mc_tomb; > rwlock_t mc_lock; > unsigned long mc_v1_seen; > unsigned long mc_maxdelay; > unsigned char mc_qrv; > unsigned char mc_gq_running; > unsigned char mc_ifc_count; > struct timer_list mc_gq_timer; > struct timer_list mc_ifc_timer; > > struct ifacaddr6 *ac_list; > rwlock_t lock; > atomic_t refcnt; > __u32 if_flags; > int dead; > > > > > > > > struct neigh_parms *nd_parms; > struct inet6_dev *next; > struct ipv6_devconf cnf; > struct ipv6_devstat stats; > unsigned long tstamp; > struct rcu_head rcu; >}; > >extern struct ipv6_devconf ipv6_devconf; > >static inline __attribute__((always_inline)) void ipv6_eth_mc_map(struct in6_addr *addr, char *buf) >{ > > > > > > > buf[0]= 0x33; > buf[1]= 0x33; > > (__builtin_constant_p(sizeof(__u32)) ? __constant_memcpy((buf + 2),(&addr->in6_u.u6_addr32[3]),(sizeof(__u32))) : __memcpy((buf + 2),(&addr->in6_u.u6_addr32[3]),(sizeof(__u32)))); >} > >static inline __attribute__((always_inline)) void ipv6_tr_mc_map(struct in6_addr *addr, char *buf) >{ > > > if (((addr->in6_u.u6_addr8[0] == 0xFF) && > ((addr->in6_u.u6_addr8[1] == 0x01) || (addr->in6_u.u6_addr8[1] == 0x02)) && > (addr->in6_u.u6_addr16[1] == 0) && > (addr->in6_u.u6_addr32[1] == 0) && > (addr->in6_u.u6_addr32[2] == 0) && > (addr->in6_u.u6_addr16[6] == 0) && > (addr->in6_u.u6_addr8[15] == 1)) || > ((addr->in6_u.u6_addr8[0] == 0xFF) && > (addr->in6_u.u6_addr8[1] == 0x02) && > (addr->in6_u.u6_addr16[1] == 0) && > (addr->in6_u.u6_addr32[1] == 0) && > (addr->in6_u.u6_addr16[4] == 0) && > (addr->in6_u.u6_addr8[10] == 0) && > (addr->in6_u.u6_addr8[11] == 1) && > (addr->in6_u.u6_addr8[12] == 0xff))) > { > buf[0]=0xC0; > buf[1]=0x00; > buf[2]=0x01; > buf[3]=0x00; > buf[4]=0x00; > buf[5]=0x00; > > } else if ((addr->in6_u.u6_addr8[0] ==0xff) && > ((addr->in6_u.u6_addr8[1] & 0xF0) == 0) && > (addr->in6_u.u6_addr16[1] == 0) && > (addr->in6_u.u6_addr32[1] == 0) && > (addr->in6_u.u6_addr32[2] == 0) && > (addr->in6_u.u6_addr16[6] == 0) && > (addr->in6_u.u6_addr8[15] == 2)) > { > buf[0]=0xC0; > buf[1]=0x00; > buf[2]=0x02; > buf[3]=0x00; > buf[4]=0x00; > buf[5]=0x00; > } else { > unsigned char i ; > > i = addr->in6_u.u6_addr8[15] & 7 ; > buf[0]=0xC0; > buf[1]=0x00; > buf[2]=0x00; > buf[3]=0x01 << i ; > buf[4]=0x00; > buf[5]=0x00; > } >} > >static inline __attribute__((always_inline)) void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf) >{ > buf[0] = 0x00; >} > >static inline __attribute__((always_inline)) void ipv6_ib_mc_map(struct in6_addr *addr, char *buf) >{ > buf[0] = 0; > buf[1] = 0xff; > buf[2] = 0xff; > buf[3] = 0xff; > buf[4] = 0xff; > buf[5] = 0x12; > buf[6] = 0x60; > buf[7] = 0x1b; > buf[8] = 0; > buf[9] = 0; > (__builtin_constant_p(10) ? __constant_memcpy((buf + 10),(addr->in6_u.u6_addr8 + 6),(10)) : __memcpy((buf + 10),(addr->in6_u.u6_addr8 + 6),(10))); >} ># 217 "include/linux/ipv6.h" 2 > > > > > > > >struct inet6_skb_parm { > int iif; > __u16 ra; > __u16 hop; > __u16 dst0; > __u16 srcrt; > __u16 dst1; > __u16 lastopt; > __u32 nhoff; > __u16 flags; > > > > >#define IP6SKB_XFRM_TRANSFORMED 1 >}; > >#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) > >static inline __attribute__((always_inline)) int inet6_iif(const struct sk_buff *skb) >{ > return ((struct inet6_skb_parm*)((skb)->cb))->iif; >} > >struct inet6_request_sock { > struct in6_addr loc_addr; > struct in6_addr rmt_addr; > struct sk_buff *pktopts; > int iif; >}; > >struct tcp6_request_sock { > struct tcp_request_sock tcp6rsk_tcp; > struct inet6_request_sock tcp6rsk_inet6; >}; ># 268 "include/linux/ipv6.h" >struct ipv6_pinfo { > struct in6_addr saddr; > struct in6_addr rcv_saddr; > struct in6_addr daddr; > struct in6_addr *daddr_cache; > > > > > __be32 flow_label; > __u32 frag_size; > __s16 hop_limit; > __s16 mcast_hops; > int mcast_oif; > > > union { > struct { > __u16 srcrt:2, > osrcrt:2, > rxinfo:1, > rxoinfo:1, > rxhlim:1, > rxohlim:1, > hopopts:1, > ohopopts:1, > dstopts:1, > odstopts:1, > rxflow:1, > rxtclass:1; > } bits; > __u16 all; > } rxopt; > > > __u8 mc_loop:1, > recverr:1, > sndflow:1, > pmtudisc:2, > ipv6only:1; > __u8 tclass; > > __u32 dst_cookie; > > struct ipv6_mc_socklist *ipv6_mc_list; > struct ipv6_ac_socklist *ipv6_ac_list; > struct ipv6_fl_socklist *ipv6_fl_list; > > struct ipv6_txoptions *opt; > struct sk_buff *pktoptions; > struct { > struct ipv6_txoptions *opt; > struct rt6_info *rt; > int hop_limit; > int tclass; > } cork; >}; > > >struct raw6_sock { > > struct inet_sock inet; > __u32 checksum; > __u32 offset; > struct icmp6_filter filter; > > struct ipv6_pinfo inet6; >}; > >struct udp6_sock { > struct udp_sock udp; > > struct ipv6_pinfo inet6; >}; > >struct tcp6_sock { > struct tcp_sock tcp; > > struct ipv6_pinfo inet6; >}; > >extern int inet6_sk_rebuild_header(struct sock *sk); > > >static inline __attribute__((always_inline)) struct ipv6_pinfo * inet6_sk(const struct sock *__sk) >{ > return inet_sk(__sk)->pinet6; >} > >static inline __attribute__((always_inline)) struct inet6_request_sock * > inet6_rsk(const struct request_sock *rsk) >{ > return (struct inet6_request_sock *)(((u8 *)rsk) + > inet_rsk(rsk)->inet6_rsk_offset); >} > >static inline __attribute__((always_inline)) u32 inet6_rsk_offset(struct request_sock *rsk) >{ > return rsk->rsk_ops->obj_size - sizeof(struct inet6_request_sock); >} > >static inline __attribute__((always_inline)) struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *ops) >{ > struct request_sock *req = reqsk_alloc(ops); > > if (req != ((void *)0)) > inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); > > return req; >} > >static inline __attribute__((always_inline)) struct raw6_sock *raw6_sk(const struct sock *sk) >{ > return (struct raw6_sock *)sk; >} > >static inline __attribute__((always_inline)) void inet_sk_copy_descendant(struct sock *sk_to, > const struct sock *sk_from) >{ > int ancestor_size = sizeof(struct inet_sock); > > if (sk_from->__sk_common.skc_family == 10) > ancestor_size += sizeof(struct ipv6_pinfo); > > __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size); >} > >#define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) >#define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) > >struct inet6_timewait_sock { > struct in6_addr tw_v6_daddr; > struct in6_addr tw_v6_rcv_saddr; >}; > >struct tcp6_timewait_sock { > struct tcp_timewait_sock tcp6tw_tcp; > struct inet6_timewait_sock tcp6tw_inet6; >}; > >static inline __attribute__((always_inline)) u16 inet6_tw_offset(const struct proto *prot) >{ > return prot->twsk_prot->twsk_obj_size - > sizeof(struct inet6_timewait_sock); >} > >static inline __attribute__((always_inline)) struct inet6_timewait_sock *inet6_twsk(const struct sock *sk) >{ > return (struct inet6_timewait_sock *)(((u8 *)sk) + > inet_twsk(sk)->tw_ipv6_offset); >} > >static inline __attribute__((always_inline)) struct in6_addr *__inet6_rcv_saddr(const struct sock *sk) >{ > return __builtin_expect(!!(sk->__sk_common.skc_state != TCP_TIME_WAIT), 1) ? > &inet6_sk(sk)->rcv_saddr : &inet6_twsk(sk)->tw_v6_rcv_saddr; >} > >static inline __attribute__((always_inline)) struct in6_addr *inet6_rcv_saddr(const struct sock *sk) >{ > return sk->__sk_common.skc_family == 10 ? __inet6_rcv_saddr(sk) : ((void *)0); >} > >static inline __attribute__((always_inline)) int inet_v6_ipv6only(const struct sock *sk) >{ > return __builtin_expect(!!(sk->__sk_common.skc_state != TCP_TIME_WAIT), 1) ? > ((sk)->__sk_common.skc_family == 10 && (inet6_sk(sk)->ipv6only)) : inet_twsk(sk)->tw_ipv6only; >} ># 462 "include/linux/ipv6.h" >#define INET6_MATCH(__sk,__hash,__saddr,__daddr,__ports,__dif) (((__sk)->sk_hash == (__hash)) && ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && ((__sk)->sk_family == AF_INET6) && ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) ># 290 "include/net/ip.h" 2 > > >static __inline__ __attribute__((always_inline)) void inet_reset_saddr(struct sock *sk) >{ > inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0; > > if (sk->__sk_common.skc_family == 10) { > struct ipv6_pinfo *np = inet6_sk(sk); > > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(np->saddr))) ? __constant_c_and_count_memset(((&np->saddr)),((0x01010101UL*(unsigned char)(0))),((sizeof(np->saddr)))) : __constant_c_memset(((&np->saddr)),((0x01010101UL*(unsigned char)(0))),((sizeof(np->saddr))))) : (__builtin_constant_p((sizeof(np->saddr))) ? __memset_generic((((&np->saddr))),(((0))),(((sizeof(np->saddr))))) : __memset_generic(((&np->saddr)),((0)),((sizeof(np->saddr)))))); > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(np->rcv_saddr))) ? __constant_c_and_count_memset(((&np->rcv_saddr)),((0x01010101UL*(unsigned char)(0))),((sizeof(np->rcv_saddr)))) : __constant_c_memset(((&np->rcv_saddr)),((0x01010101UL*(unsigned char)(0))),((sizeof(np->rcv_saddr))))) : (__builtin_constant_p((sizeof(np->rcv_saddr))) ? __memset_generic((((&np->rcv_saddr))),(((0))),(((sizeof(np->rcv_saddr))))) : __memset_generic(((&np->rcv_saddr)),((0)),((sizeof(np->rcv_saddr)))))); > } > >} > > > >extern int ip_call_ra_chain(struct sk_buff *skb); > > > > > >enum ip_defrag_users >{ > IP_DEFRAG_LOCAL_DELIVER, > IP_DEFRAG_CALL_RA_CHAIN, > IP_DEFRAG_CONNTRACK_IN, > IP_DEFRAG_CONNTRACK_OUT, > IP_DEFRAG_VS_IN, > IP_DEFRAG_VS_OUT, > IP_DEFRAG_VS_FWD >}; > >struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user); >extern int ip_frag_nqueues; >extern atomic_t ip_frag_mem; > > > > > >extern int ip_forward(struct sk_buff *skb); >extern int ip_net_unreachable(struct sk_buff *skb); > > > > > >extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag); >extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); >extern void ip_options_fragment(struct sk_buff *skb); >extern int ip_options_compile(struct ip_options *opt, struct sk_buff *skb); >extern int ip_options_get(struct ip_options **optp, > unsigned char *data, int optlen); >extern int ip_options_get_from_user(struct ip_options **optp, > unsigned char *data, int optlen); >extern void ip_options_undo(struct ip_options * opt); >extern void ip_forward_options(struct sk_buff *skb); >extern int ip_options_rcv_srr(struct sk_buff *skb); > > > > > >extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); >extern int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc); >extern int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen); >extern int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen); >extern int compat_ip_setsockopt(struct sock *sk, int level, > int optname, char *optval, int optlen); >extern int compat_ip_getsockopt(struct sock *sk, int level, > int optname, char *optval, int *optlen); >extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); > >extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); >extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, > __be16 port, u32 info, u8 *payload); >extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, > u32 info); > > > > >int ipv4_doint_and_flush(ctl_table *ctl, int write, > struct file* filp, void *buffer, > size_t *lenp, loff_t *ppos); >int ipv4_doint_and_flush_strategy(ctl_table *table, int *name, int nlen, > void *oldval, size_t *oldlenp, > void *newval, size_t newlen); > >extern int ip_misc_proc_init(void); > > >extern struct ctl_table ipv4_table[]; ># 70 "net/ipv4/ip_output.c" 2 ># 1 "include/net/protocol.h" 1 ># 25 "include/net/protocol.h" >#define _PROTOCOL_H > > > > > > >#define MAX_INET_PROTOS 256 > > > >struct net_protocol { > int (*handler)(struct sk_buff *skb); > void (*err_handler)(struct sk_buff *skb, u32 info); > int (*gso_send_check)(struct sk_buff *skb); > struct sk_buff *(*gso_segment)(struct sk_buff *skb, > int features); > int no_policy; >}; > > >struct inet6_protocol >{ > int (*handler)(struct sk_buff **skb); > > void (*err_handler)(struct sk_buff *skb, > struct inet6_skb_parm *opt, > int type, int code, int offset, > __be32 info); > > int (*gso_send_check)(struct sk_buff *skb); > struct sk_buff *(*gso_segment)(struct sk_buff *skb, > int features); > > unsigned int flags; >}; > >#define INET6_PROTO_NOPOLICY 0x1 >#define INET6_PROTO_FINAL 0x2 > >#define INET6_PROTO_GSO_EXTHDR 0x4 > > > >struct inet_protosw { > struct list_head list; > > > unsigned short type; > unsigned short protocol; > > struct proto *prot; > const struct proto_ops *ops; > > int capability; > > > > char no_check; > unsigned char flags; >}; >#define INET_PROTOSW_REUSE 0x01 >#define INET_PROTOSW_PERMANENT 0x02 >#define INET_PROTOSW_ICSK 0x04 > >extern struct net_protocol *inet_protocol_base; >extern struct net_protocol *inet_protos[256]; > > >extern struct inet6_protocol *inet6_protos[256]; > > >extern int inet_add_protocol(struct net_protocol *prot, unsigned char num); >extern int inet_del_protocol(struct net_protocol *prot, unsigned char num); >extern void inet_register_protosw(struct inet_protosw *p); >extern void inet_unregister_protosw(struct inet_protosw *p); > > >extern int inet6_add_protocol(struct inet6_protocol *prot, unsigned char num); >extern int inet6_del_protocol(struct inet6_protocol *prot, unsigned char num); >extern void inet6_register_protosw(struct inet_protosw *p); >extern void inet6_unregister_protosw(struct inet_protosw *p); ># 71 "net/ipv4/ip_output.c" 2 ># 1 "include/net/route.h" 1 ># 25 "include/net/route.h" >#define _ROUTE_H > > ># 1 "include/net/inetpeer.h" 1 ># 10 "include/net/inetpeer.h" >#define _NET_INETPEER_H > > > > > > > >struct inet_peer >{ > > struct inet_peer *avl_left, *avl_right; > __be32 v4daddr; > __u16 avl_height; > __u16 ip_id_count; > struct inet_peer *unused_next, **unused_prevp; > __u32 dtime; > > atomic_t refcnt; > atomic_t rid; > __u32 tcp_ts; > unsigned long tcp_ts_stamp; >}; > >void inet_initpeers(void) __attribute__ ((__section__ (".init.text"))); > > >struct inet_peer *inet_getpeer(__be32 daddr, int create); > > >extern void inet_putpeer(struct inet_peer *p); > >extern spinlock_t inet_peer_idlock; > >static inline __attribute__((always_inline)) __u16 inet_getid(struct inet_peer *p, int more) >{ > __u16 id; > > _spin_lock_bh(&inet_peer_idlock); > id = p->ip_id_count; > p->ip_id_count += 1 + more; > _spin_unlock_bh(&inet_peer_idlock); > return id; >} ># 29 "include/net/route.h" 2 > ># 1 "include/linux/in_route.h" 1 > >#define _LINUX_IN_ROUTE_H > > > >#define RTCF_DEAD RTNH_F_DEAD >#define RTCF_ONLINK RTNH_F_ONLINK > > >#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC > >#define RTCF_NOTIFY 0x00010000 >#define RTCF_DIRECTDST 0x00020000 >#define RTCF_REDIRECTED 0x00040000 >#define RTCF_TPROXY 0x00080000 > >#define RTCF_FAST 0x00200000 >#define RTCF_MASQ 0x00400000 >#define RTCF_SNAT 0x00800000 >#define RTCF_DOREDIRECT 0x01000000 >#define RTCF_DIRECTSRC 0x04000000 >#define RTCF_DNAT 0x08000000 >#define RTCF_BROADCAST 0x10000000 >#define RTCF_MULTICAST 0x20000000 >#define RTCF_REJECT 0x40000000 >#define RTCF_LOCAL 0x80000000 > >#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) > >#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK) ># 31 "include/net/route.h" 2 > ># 1 "include/linux/route.h" 1 ># 24 "include/linux/route.h" >#define _LINUX_ROUTE_H > > > > > >struct rtentry >{ > unsigned long rt_pad1; > struct sockaddr rt_dst; > struct sockaddr rt_gateway; > struct sockaddr rt_genmask; > unsigned short rt_flags; > short rt_pad2; > unsigned long rt_pad3; > void *rt_pad4; > short rt_metric; > char *rt_dev; > unsigned long rt_mtu; > > > > unsigned long rt_window; > unsigned short rt_irtt; >}; > > >#define RTF_UP 0x0001 >#define RTF_GATEWAY 0x0002 >#define RTF_HOST 0x0004 >#define RTF_REINSTATE 0x0008 >#define RTF_DYNAMIC 0x0010 >#define RTF_MODIFIED 0x0020 >#define RTF_MTU 0x0040 >#define RTF_MSS RTF_MTU >#define RTF_WINDOW 0x0080 >#define RTF_IRTT 0x0100 >#define RTF_REJECT 0x0200 ># 33 "include/net/route.h" 2 ># 41 "include/net/route.h" >#define RTO_ONLINK 0x01 > >#define RTO_CONN 0 > > > >#define RT_CONN_FLAGS(sk) (RT_TOS(inet_sk(sk)->tos) | sock_flag(sk, SOCK_LOCALROUTE)) > >struct fib_nh; >struct inet_peer; >struct rtable >{ > union > { > struct dst_entry dst; > struct rtable *rt_next; > } u; > > struct in_device *idev; > > unsigned rt_flags; > __u16 rt_type; > __u16 rt_multipath_alg; > > __be32 rt_dst; > __be32 rt_src; > int rt_iif; > > > __be32 rt_gateway; > > > struct flowi fl; > > > __be32 rt_spec_dst; > struct inet_peer *peer; >}; > >struct ip_rt_acct >{ > __u32 o_bytes; > __u32 o_packets; > __u32 i_bytes; > __u32 i_packets; >}; > >struct rt_cache_stat >{ > unsigned int in_hit; > unsigned int in_slow_tot; > unsigned int in_slow_mc; > unsigned int in_no_route; > unsigned int in_brd; > unsigned int in_martian_dst; > unsigned int in_martian_src; > unsigned int out_hit; > unsigned int out_slow_tot; > unsigned int out_slow_mc; > unsigned int gc_total; > unsigned int gc_ignored; > unsigned int gc_goal_miss; > unsigned int gc_dst_overflow; > unsigned int in_hlist_search; > unsigned int out_hlist_search; >}; > >extern struct ip_rt_acct *ip_rt_acct; > >struct in_device; >extern int ip_rt_init(void); >extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, > __be32 src, struct net_device *dev); >extern void ip_rt_advice(struct rtable **rp, int advice); >extern void rt_cache_flush(int how); >extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); >extern int ip_route_output_key(struct rtable **, struct flowi *flp); >extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); >extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin); >extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); >extern void ip_rt_send_redirect(struct sk_buff *skb); > >extern unsigned inet_addr_type(__be32 addr); >extern void ip_rt_multicast_event(struct in_device *); >extern int ip_rt_ioctl(unsigned int cmd, void *arg); >extern void ip_rt_get_source(u8 *src, struct rtable *rt); >extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); > >struct in_ifaddr; >extern void fib_add_ifaddr(struct in_ifaddr *); > >static inline __attribute__((always_inline)) void ip_rt_put(struct rtable * rt) >{ > if (rt) > dst_release(&rt->u.dst); >} > >#define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) > >extern __u8 ip_tos2prio[16]; > >static inline __attribute__((always_inline)) char rt_tos2priority(u8 tos) >{ > return ip_tos2prio[((tos)&0x1E)>>1]; >} > >static inline __attribute__((always_inline)) int ip_route_connect(struct rtable **rp, __be32 dst, > __be32 src, u32 tos, int oif, u8 protocol, > __be16 sport, __be16 dport, struct sock *sk) >{ > struct flowi fl = { .oif = oif, > .nl_u = { .ip4_u = { .daddr = dst, > .saddr = src, > .tos = tos } }, > .proto = protocol, > .uli_u = { .ports = > { .sport = sport, > .dport = dport } } }; > > int err; > if (!dst || !src) { > err = __ip_route_output_key(rp, &fl); > if (err) > return err; > fl.nl_u.ip4_u.daddr = (*rp)->rt_dst; > fl.nl_u.ip4_u.saddr = (*rp)->rt_src; > ip_rt_put(*rp); > *rp = ((void *)0); > } > security_sk_classify_flow(sk, &fl); > return ip_route_output_flow(rp, &fl, sk, 0); >} > >static inline __attribute__((always_inline)) int ip_route_newports(struct rtable **rp, u8 protocol, > __be16 sport, __be16 dport, struct sock *sk) >{ > if (sport != (*rp)->fl.uli_u.ports.sport || > dport != (*rp)->fl.uli_u.ports.dport) { > struct flowi fl; > > (__builtin_constant_p(sizeof(fl)) ? __constant_memcpy((&fl),(&(*rp)->fl),(sizeof(fl))) : __memcpy((&fl),(&(*rp)->fl),(sizeof(fl)))); > fl.uli_u.ports.sport = sport; > fl.uli_u.ports.dport = dport; > fl.proto = protocol; > ip_rt_put(*rp); > *rp = ((void *)0); > security_sk_classify_flow(sk, &fl); > return ip_route_output_flow(rp, &fl, sk, 0); > } > return 0; >} > >extern void rt_bind_peer(struct rtable *rt, int create); > >static inline __attribute__((always_inline)) struct inet_peer *rt_get_peer(struct rtable *rt) >{ > if (rt->peer) > return rt->peer; > > rt_bind_peer(rt, 0); > return rt->peer; >} > >extern ctl_table ipv4_route_table[]; ># 72 "net/ipv4/ip_output.c" 2 ># 1 "include/net/xfrm.h" 1 > >#define _NET_XFRM_H ># 11 "include/net/xfrm.h" ># 1 "include/linux/pfkeyv2.h" 1 > > > > > > >#define _LINUX_PFKEY2_H > > > >#define PF_KEY_V2 2 >#define PFKEYV2_REVISION 199806L > >struct sadb_msg { > uint8_t sadb_msg_version; > uint8_t sadb_msg_type; > uint8_t sadb_msg_errno; > uint8_t sadb_msg_satype; > uint16_t sadb_msg_len; > uint16_t sadb_msg_reserved; > uint32_t sadb_msg_seq; > uint32_t sadb_msg_pid; >} __attribute__((packed)); > > >struct sadb_ext { > uint16_t sadb_ext_len; > uint16_t sadb_ext_type; >} __attribute__((packed)); > > >struct sadb_sa { > uint16_t sadb_sa_len; > uint16_t sadb_sa_exttype; > __be32 sadb_sa_spi; > uint8_t sadb_sa_replay; > uint8_t sadb_sa_state; > uint8_t sadb_sa_auth; > uint8_t sadb_sa_encrypt; > uint32_t sadb_sa_flags; >} __attribute__((packed)); > > >struct sadb_lifetime { > uint16_t sadb_lifetime_len; > uint16_t sadb_lifetime_exttype; > uint32_t sadb_lifetime_allocations; > uint64_t sadb_lifetime_bytes; > uint64_t sadb_lifetime_addtime; > uint64_t sadb_lifetime_usetime; >} __attribute__((packed)); > > >struct sadb_address { > uint16_t sadb_address_len; > uint16_t sadb_address_exttype; > uint8_t sadb_address_proto; > uint8_t sadb_address_prefixlen; > uint16_t sadb_address_reserved; >} __attribute__((packed)); > > >struct sadb_key { > uint16_t sadb_key_len; > uint16_t sadb_key_exttype; > uint16_t sadb_key_bits; > uint16_t sadb_key_reserved; >} __attribute__((packed)); > > >struct sadb_ident { > uint16_t sadb_ident_len; > uint16_t sadb_ident_exttype; > uint16_t sadb_ident_type; > uint16_t sadb_ident_reserved; > uint64_t sadb_ident_id; >} __attribute__((packed)); > > >struct sadb_sens { > uint16_t sadb_sens_len; > uint16_t sadb_sens_exttype; > uint32_t sadb_sens_dpd; > uint8_t sadb_sens_sens_level; > uint8_t sadb_sens_sens_len; > uint8_t sadb_sens_integ_level; > uint8_t sadb_sens_integ_len; > uint32_t sadb_sens_reserved; >} __attribute__((packed)); > > > > > > >struct sadb_prop { > uint16_t sadb_prop_len; > uint16_t sadb_prop_exttype; > uint8_t sadb_prop_replay; > uint8_t sadb_prop_reserved[3]; >} __attribute__((packed)); > > > > > > > >struct sadb_comb { > uint8_t sadb_comb_auth; > uint8_t sadb_comb_encrypt; > uint16_t sadb_comb_flags; > uint16_t sadb_comb_auth_minbits; > uint16_t sadb_comb_auth_maxbits; > uint16_t sadb_comb_encrypt_minbits; > uint16_t sadb_comb_encrypt_maxbits; > uint32_t sadb_comb_reserved; > uint32_t sadb_comb_soft_allocations; > uint32_t sadb_comb_hard_allocations; > uint64_t sadb_comb_soft_bytes; > uint64_t sadb_comb_hard_bytes; > uint64_t sadb_comb_soft_addtime; > uint64_t sadb_comb_hard_addtime; > uint64_t sadb_comb_soft_usetime; > uint64_t sadb_comb_hard_usetime; >} __attribute__((packed)); > > >struct sadb_supported { > uint16_t sadb_supported_len; > uint16_t sadb_supported_exttype; > uint32_t sadb_supported_reserved; >} __attribute__((packed)); > > > > > > > >struct sadb_alg { > uint8_t sadb_alg_id; > uint8_t sadb_alg_ivlen; > uint16_t sadb_alg_minbits; > uint16_t sadb_alg_maxbits; > uint16_t sadb_alg_reserved; >} __attribute__((packed)); > > >struct sadb_spirange { > uint16_t sadb_spirange_len; > uint16_t sadb_spirange_exttype; > uint32_t sadb_spirange_min; > uint32_t sadb_spirange_max; > uint32_t sadb_spirange_reserved; >} __attribute__((packed)); > > >struct sadb_x_kmprivate { > uint16_t sadb_x_kmprivate_len; > uint16_t sadb_x_kmprivate_exttype; > uint32_t sadb_x_kmprivate_reserved; >} __attribute__((packed)); > > >struct sadb_x_sa2 { > uint16_t sadb_x_sa2_len; > uint16_t sadb_x_sa2_exttype; > uint8_t sadb_x_sa2_mode; > uint8_t sadb_x_sa2_reserved1; > uint16_t sadb_x_sa2_reserved2; > uint32_t sadb_x_sa2_sequence; > uint32_t sadb_x_sa2_reqid; >} __attribute__((packed)); > > >struct sadb_x_policy { > uint16_t sadb_x_policy_len; > uint16_t sadb_x_policy_exttype; > uint16_t sadb_x_policy_type; > uint8_t sadb_x_policy_dir; > uint8_t sadb_x_policy_reserved; > uint32_t sadb_x_policy_id; > uint32_t sadb_x_policy_priority; >} __attribute__((packed)); > > >struct sadb_x_ipsecrequest { > uint16_t sadb_x_ipsecrequest_len; > uint16_t sadb_x_ipsecrequest_proto; > uint8_t sadb_x_ipsecrequest_mode; > uint8_t sadb_x_ipsecrequest_level; > uint16_t sadb_x_ipsecrequest_reserved1; > uint32_t sadb_x_ipsecrequest_reqid; > uint32_t sadb_x_ipsecrequest_reserved2; >} __attribute__((packed)); > > > > > >struct sadb_x_nat_t_type { > uint16_t sadb_x_nat_t_type_len; > uint16_t sadb_x_nat_t_type_exttype; > uint8_t sadb_x_nat_t_type_type; > uint8_t sadb_x_nat_t_type_reserved[3]; >} __attribute__((packed)); > > > >struct sadb_x_nat_t_port { > uint16_t sadb_x_nat_t_port_len; > uint16_t sadb_x_nat_t_port_exttype; > __be16 sadb_x_nat_t_port_port; > uint16_t sadb_x_nat_t_port_reserved; >} __attribute__((packed)); > > > >struct sadb_x_sec_ctx { > uint16_t sadb_x_sec_len; > uint16_t sadb_x_sec_exttype; > uint8_t sadb_x_ctx_alg; > uint8_t sadb_x_ctx_doi; > uint16_t sadb_x_ctx_len; >} __attribute__((packed)); > > > >#define SADB_RESERVED 0 >#define SADB_GETSPI 1 >#define SADB_UPDATE 2 >#define SADB_ADD 3 >#define SADB_DELETE 4 >#define SADB_GET 5 >#define SADB_ACQUIRE 6 >#define SADB_REGISTER 7 >#define SADB_EXPIRE 8 >#define SADB_FLUSH 9 >#define SADB_DUMP 10 >#define SADB_X_PROMISC 11 >#define SADB_X_PCHANGE 12 >#define SADB_X_SPDUPDATE 13 >#define SADB_X_SPDADD 14 >#define SADB_X_SPDDELETE 15 >#define SADB_X_SPDGET 16 >#define SADB_X_SPDACQUIRE 17 >#define SADB_X_SPDDUMP 18 >#define SADB_X_SPDFLUSH 19 >#define SADB_X_SPDSETIDX 20 >#define SADB_X_SPDEXPIRE 21 >#define SADB_X_SPDDELETE2 22 >#define SADB_X_NAT_T_NEW_MAPPING 23 >#define SADB_MAX 23 > > >#define SADB_SAFLAGS_PFS 1 >#define SADB_SAFLAGS_NOPMTUDISC 0x20000000 >#define SADB_SAFLAGS_DECAP_DSCP 0x40000000 >#define SADB_SAFLAGS_NOECN 0x80000000 > > >#define SADB_SASTATE_LARVAL 0 >#define SADB_SASTATE_MATURE 1 >#define SADB_SASTATE_DYING 2 >#define SADB_SASTATE_DEAD 3 >#define SADB_SASTATE_MAX 3 > > >#define SADB_SATYPE_UNSPEC 0 >#define SADB_SATYPE_AH 2 >#define SADB_SATYPE_ESP 3 >#define SADB_SATYPE_RSVP 5 >#define SADB_SATYPE_OSPFV2 6 >#define SADB_SATYPE_RIPV2 7 >#define SADB_SATYPE_MIP 8 >#define SADB_X_SATYPE_IPCOMP 9 >#define SADB_SATYPE_MAX 9 > > >#define SADB_AALG_NONE 0 >#define SADB_AALG_MD5HMAC 2 >#define SADB_AALG_SHA1HMAC 3 >#define SADB_X_AALG_SHA2_256HMAC 5 >#define SADB_X_AALG_SHA2_384HMAC 6 >#define SADB_X_AALG_SHA2_512HMAC 7 >#define SADB_X_AALG_RIPEMD160HMAC 8 >#define SADB_X_AALG_AES_XCBC_MAC 9 >#define SADB_X_AALG_NULL 251 >#define SADB_AALG_MAX 251 > > >#define SADB_EALG_NONE 0 >#define SADB_EALG_DESCBC 2 >#define SADB_EALG_3DESCBC 3 >#define SADB_X_EALG_CASTCBC 6 >#define SADB_X_EALG_BLOWFISHCBC 7 >#define SADB_EALG_NULL 11 >#define SADB_X_EALG_AESCBC 12 >#define SADB_EALG_MAX 253 > >#define SADB_X_EALG_SERPENTCBC 252 >#define SADB_X_EALG_TWOFISHCBC 253 > > >#define SADB_X_CALG_NONE 0 >#define SADB_X_CALG_OUI 1 >#define SADB_X_CALG_DEFLATE 2 >#define SADB_X_CALG_LZS 3 >#define SADB_X_CALG_LZJH 4 >#define SADB_X_CALG_MAX 4 > > >#define SADB_EXT_RESERVED 0 >#define SADB_EXT_SA 1 >#define SADB_EXT_LIFETIME_CURRENT 2 >#define SADB_EXT_LIFETIME_HARD 3 >#define SADB_EXT_LIFETIME_SOFT 4 >#define SADB_EXT_ADDRESS_SRC 5 >#define SADB_EXT_ADDRESS_DST 6 >#define SADB_EXT_ADDRESS_PROXY 7 >#define SADB_EXT_KEY_AUTH 8 >#define SADB_EXT_KEY_ENCRYPT 9 >#define SADB_EXT_IDENTITY_SRC 10 >#define SADB_EXT_IDENTITY_DST 11 >#define SADB_EXT_SENSITIVITY 12 >#define SADB_EXT_PROPOSAL 13 >#define SADB_EXT_SUPPORTED_AUTH 14 >#define SADB_EXT_SUPPORTED_ENCRYPT 15 >#define SADB_EXT_SPIRANGE 16 >#define SADB_X_EXT_KMPRIVATE 17 >#define SADB_X_EXT_POLICY 18 >#define SADB_X_EXT_SA2 19 > >#define SADB_X_EXT_NAT_T_TYPE 20 >#define SADB_X_EXT_NAT_T_SPORT 21 >#define SADB_X_EXT_NAT_T_DPORT 22 >#define SADB_X_EXT_NAT_T_OA 23 >#define SADB_X_EXT_SEC_CTX 24 >#define SADB_EXT_MAX 24 > > >#define SADB_IDENTTYPE_RESERVED 0 >#define SADB_IDENTTYPE_PREFIX 1 >#define SADB_IDENTTYPE_FQDN 2 >#define SADB_IDENTTYPE_USERFQDN 3 >#define SADB_IDENTTYPE_MAX 3 ># 12 "include/net/xfrm.h" 2 ># 1 "include/linux/ipsec.h" 1 > >#define _LINUX_IPSEC_H > > > > > >#define IPSEC_PORT_ANY 0 >#define IPSEC_ULPROTO_ANY 255 >#define IPSEC_PROTO_ANY 255 > >enum { > IPSEC_MODE_ANY = 0, > IPSEC_MODE_TRANSPORT = 1, > IPSEC_MODE_TUNNEL = 2, > IPSEC_MODE_BEET = 3 >}; > >enum { > IPSEC_DIR_ANY = 0, > IPSEC_DIR_INBOUND = 1, > IPSEC_DIR_OUTBOUND = 2, > IPSEC_DIR_FWD = 3, > IPSEC_DIR_MAX = 4, > IPSEC_DIR_INVALID = 5 >}; > >enum { > IPSEC_POLICY_DISCARD = 0, > IPSEC_POLICY_NONE = 1, > IPSEC_POLICY_IPSEC = 2, > IPSEC_POLICY_ENTRUST = 3, > IPSEC_POLICY_BYPASS = 4 >}; > >enum { > IPSEC_LEVEL_DEFAULT = 0, > IPSEC_LEVEL_USE = 1, > IPSEC_LEVEL_REQUIRE = 2, > IPSEC_LEVEL_UNIQUE = 3 >}; > >#define IPSEC_MANUAL_REQID_MAX 0x3fff > >#define IPSEC_REPLAYWSIZE 32 ># 13 "include/net/xfrm.h" 2 > > > > > > ># 1 "include/net/ipv6.h" 1 ># 16 "include/net/ipv6.h" >#define _NET_IPV6_H > > > ># 1 "include/net/ndisc.h" 1 > >#define _NDISC_H > > > > > >#define NDISC_ROUTER_SOLICITATION 133 >#define NDISC_ROUTER_ADVERTISEMENT 134 >#define NDISC_NEIGHBOUR_SOLICITATION 135 >#define NDISC_NEIGHBOUR_ADVERTISEMENT 136 >#define NDISC_REDIRECT 137 > > > > > >enum { > __ND_OPT_PREFIX_INFO_END = 0, > ND_OPT_SOURCE_LL_ADDR = 1, > ND_OPT_TARGET_LL_ADDR = 2, > ND_OPT_PREFIX_INFO = 3, > ND_OPT_REDIRECT_HDR = 4, > ND_OPT_MTU = 5, > __ND_OPT_ARRAY_MAX, > ND_OPT_ROUTE_INFO = 24, > __ND_OPT_MAX >}; > >#define MAX_RTR_SOLICITATION_DELAY HZ > >#define ND_REACHABLE_TIME (30*HZ) >#define ND_RETRANS_TIMER HZ > >#define ND_MIN_RANDOM_FACTOR (1/2) >#define ND_MAX_RANDOM_FACTOR (3/2) ># 47 "include/net/ndisc.h" >struct ctl_table; >struct file; >struct inet6_dev; >struct net_device; >struct net_proto_family; >struct sk_buff; > >extern struct neigh_table nd_tbl; > >struct nd_msg { > struct icmp6hdr icmph; > struct in6_addr target; > __u8 opt[0]; >}; > >struct rs_msg { > struct icmp6hdr icmph; > __u8 opt[0]; >}; > >struct ra_msg { > struct icmp6hdr icmph; > __be32 reachable_time; > __be32 retrans_timer; >}; > >struct nd_opt_hdr { > __u8 nd_opt_type; > __u8 nd_opt_len; >} __attribute__((__packed__)); > > >extern int ndisc_init(struct net_proto_family *ops); > >extern void ndisc_cleanup(void); > >extern int ndisc_rcv(struct sk_buff *skb); > >extern void ndisc_send_ns(struct net_device *dev, > struct neighbour *neigh, > struct in6_addr *solicit, > struct in6_addr *daddr, > struct in6_addr *saddr); > >extern void ndisc_send_rs(struct net_device *dev, > struct in6_addr *saddr, > struct in6_addr *daddr); > >extern void ndisc_forwarding_on(void); >extern void ndisc_forwarding_off(void); > >extern void ndisc_send_redirect(struct sk_buff *skb, > struct neighbour *neigh, > struct in6_addr *target); > >extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); > > >struct rt6_info * dflt_rt_lookup(void); > > > > >extern int igmp6_init(struct net_proto_family *ops); > >extern void igmp6_cleanup(void); > >extern int igmp6_event_query(struct sk_buff *skb); > >extern int igmp6_event_report(struct sk_buff *skb); > >extern void igmp6_cleanup(void); > > >extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, > int write, > struct file * filp, > void *buffer, > size_t *lenp, > loff_t *ppos); > > >extern void inet6_ifinfo_notify(int event, > struct inet6_dev *idev); > >static inline __attribute__((always_inline)) struct neighbour * ndisc_get_neigh(struct net_device *dev, struct in6_addr *addr) >{ > > if (dev) > return __neigh_lookup(&nd_tbl, addr, dev, 1); > > return ((void *)0); >} ># 21 "include/net/ipv6.h" 2 > > > >#define SIN6_LEN_RFC2133 24 > >#define IPV6_MAXPLEN 65535 > > > > > >#define NEXTHDR_HOP 0 >#define NEXTHDR_TCP 6 >#define NEXTHDR_UDP 17 >#define NEXTHDR_IPV6 41 >#define NEXTHDR_ROUTING 43 >#define NEXTHDR_FRAGMENT 44 >#define NEXTHDR_ESP 50 >#define NEXTHDR_AUTH 51 >#define NEXTHDR_ICMP 58 >#define NEXTHDR_NONE 59 >#define NEXTHDR_DEST 60 >#define NEXTHDR_MOBILITY 135 > >#define NEXTHDR_MAX 255 > > > >#define IPV6_DEFAULT_HOPLIMIT 64 >#define IPV6_DEFAULT_MCASTHOPS 1 ># 63 "include/net/ipv6.h" >#define IPV6_ADDR_ANY 0x0000U > >#define IPV6_ADDR_UNICAST 0x0001U >#define IPV6_ADDR_MULTICAST 0x0002U > >#define IPV6_ADDR_LOOPBACK 0x0010U >#define IPV6_ADDR_LINKLOCAL 0x0020U >#define IPV6_ADDR_SITELOCAL 0x0040U > >#define IPV6_ADDR_COMPATv4 0x0080U > >#define IPV6_ADDR_SCOPE_MASK 0x00f0U > >#define IPV6_ADDR_MAPPED 0x1000U >#define IPV6_ADDR_RESERVED 0x2000U > > > > > >#define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) > >#define __IPV6_ADDR_SCOPE_INVALID -1 > >#define IPV6_ADDR_SCOPE_NODELOCAL 0x01 >#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 >#define IPV6_ADDR_SCOPE_SITELOCAL 0x05 >#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08 >#define IPV6_ADDR_SCOPE_GLOBAL 0x0e > > > > > >struct frag_hdr { > __u8 nexthdr; > __u8 reserved; > __be16 frag_off; > __be32 identification; >}; > >#define IP6_MF 0x0001 > > > > > > >extern int sysctl_ipv6_bindv6only; >extern int sysctl_mld_max_msf; > > >extern __typeof__(struct ipstats_mib) *ipv6_statistics[2]; >#define IP6_INC_STATS(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS(_idev->stats.ipv6, field); SNMP_INC_STATS(ipv6_statistics, field); }) > > > > > >#define IP6_INC_STATS_BH(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS_BH(_idev->stats.ipv6, field); SNMP_INC_STATS_BH(ipv6_statistics, field); }) > > > > > >#define IP6_INC_STATS_USER(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS_USER(_idev->stats.ipv6, field); SNMP_INC_STATS_USER(ipv6_statistics, field); }) > > > > > >extern __typeof__(struct icmpv6_mib) *icmpv6_statistics[2]; >#define ICMP6_INC_STATS(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS(idev->stats.icmpv6, field); SNMP_INC_STATS(icmpv6_statistics, field); }) > > > > > >#define ICMP6_INC_STATS_BH(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS_BH((_idev)->stats.icmpv6, field); SNMP_INC_STATS_BH(icmpv6_statistics, field); }) > > > > > >#define ICMP6_INC_STATS_USER(idev,field) ({ struct inet6_dev *_idev = (idev); if (likely(_idev != NULL)) SNMP_INC_STATS_USER(_idev->stats.icmpv6, field); SNMP_INC_STATS_USER(icmpv6_statistics, field); }) > > > > > >#define ICMP6_INC_STATS_OFFSET_BH(idev,field,offset) ({ struct inet6_dev *_idev = idev; __typeof__(offset) _offset = (offset); if (likely(_idev != NULL)) SNMP_INC_STATS_OFFSET_BH(_idev->stats.icmpv6, field, _offset); SNMP_INC_STATS_OFFSET_BH(icmpv6_statistics, field, _offset); }) > > > > > > >extern __typeof__(struct udp_mib) *udp_stats_in6[2]; >extern __typeof__(struct udp_mib) *udplite_stats_in6[2]; >#define UDP6_INC_STATS_BH(field,is_udplite) do { if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0) > > >#define UDP6_INC_STATS_USER(field,is_udplite) do { if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) > > > >int snmp6_register_dev(struct inet6_dev *idev); >int snmp6_unregister_dev(struct inet6_dev *idev); >int snmp6_alloc_dev(struct inet6_dev *idev); >int snmp6_free_dev(struct inet6_dev *idev); >int snmp6_mib_init(void *ptr[2], size_t mibsize, size_t mibalign); >void snmp6_mib_free(void *ptr[2]); > >struct ip6_ra_chain >{ > struct ip6_ra_chain *next; > struct sock *sk; > int sel; > void (*destructor)(struct sock *); >}; > >extern struct ip6_ra_chain *ip6_ra_chain; >extern rwlock_t ip6_ra_lock; > > > > > > >struct ipv6_txoptions >{ > > int tot_len; > > > > __u16 opt_flen; > __u16 opt_nflen; > > struct ipv6_opt_hdr *hopopt; > struct ipv6_opt_hdr *dst0opt; > struct ipv6_rt_hdr *srcrt; > struct ipv6_opt_hdr *dst1opt; > > >}; > >struct ip6_flowlabel >{ > struct ip6_flowlabel *next; > __be32 label; > struct in6_addr dst; > struct ipv6_txoptions *opt; > atomic_t users; > unsigned long linger; > u8 share; > u32 owner; > unsigned long lastuse; > unsigned long expires; >}; > >#define IPV6_FLOWINFO_MASK __constant_htonl(0x0FFFFFFF) >#define IPV6_FLOWLABEL_MASK __constant_htonl(0x000FFFFF) > >struct ipv6_fl_socklist >{ > struct ipv6_fl_socklist *next; > struct ip6_flowlabel *fl; >}; > >extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); >extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space, > struct ip6_flowlabel * fl, > struct ipv6_txoptions * fopt); >extern void fl6_free_socklist(struct sock *sk); >extern int ipv6_flowlabel_opt(struct sock *sk, char *optval, int optlen); >extern void ip6_flowlabel_init(void); >extern void ip6_flowlabel_cleanup(void); > >static inline __attribute__((always_inline)) void fl6_sock_release(struct ip6_flowlabel *fl) >{ > if (fl) > atomic_dec(&fl->users); >} > >extern int ip6_ra_control(struct sock *sk, int sel, > void (*destructor)(struct sock *)); > > >extern int ipv6_parse_hopopts(struct sk_buff **skbp); > >extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); >extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, > int newtype, > struct ipv6_opt_hdr *newopt, > int newoptlen); >struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, > struct ipv6_txoptions *opt); > >extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); > >extern int ip6_frag_nqueues; >extern atomic_t ip6_frag_mem; > >#define IPV6_FRAG_TIMEOUT (60*HZ) > > > > > >typedef int (*inet_getfrag_t) (const void *data, > struct in6_addr *addr, > char *, > unsigned int, unsigned int); > >extern int __ipv6_addr_type(const struct in6_addr *addr); >static inline __attribute__((always_inline)) int ipv6_addr_type(const struct in6_addr *addr) >{ > return __ipv6_addr_type(addr) & 0xffff; >} > >static inline __attribute__((always_inline)) int ipv6_addr_scope(const struct in6_addr *addr) >{ > return __ipv6_addr_type(addr) & 0x00f0U; >} > >static inline __attribute__((always_inline)) int __ipv6_addr_src_scope(int type) >{ > return (type == 0x0000U ? -1 : (type >> 16)); >} > >static inline __attribute__((always_inline)) int ipv6_addr_src_scope(const struct in6_addr *addr) >{ > return __ipv6_addr_src_scope(__ipv6_addr_type(addr)); >} > >static inline __attribute__((always_inline)) int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) >{ > return __builtin_memcmp((const void *) a1, (const void *) a2, sizeof(struct in6_addr)); >} > >static inline __attribute__((always_inline)) int >ipv6_masked_addr_cmp(const struct in6_addr *a1, const struct in6_addr *m, > const struct in6_addr *a2) >{ > unsigned int i; > > for (i = 0; i < 4; i++) > if ((a1->in6_u.u6_addr32[i] ^ a2->in6_u.u6_addr32[i]) & m->in6_u.u6_addr32[i]) > return 1; > return 0; >} > >static inline __attribute__((always_inline)) void ipv6_addr_copy(struct in6_addr *a1, const struct in6_addr *a2) >{ > (__builtin_constant_p(sizeof(struct in6_addr)) ? __constant_memcpy(((void *) a1),((const void *) a2),(sizeof(struct in6_addr))) : __memcpy(((void *) a1),((const void *) a2),(sizeof(struct in6_addr)))); >} > >static inline __attribute__((always_inline)) void ipv6_addr_prefix(struct in6_addr *pfx, > const struct in6_addr *addr, > int plen) >{ > > int o = plen >> 3, > b = plen & 0x7; > > (__builtin_constant_p(o) ? __constant_memcpy((pfx->in6_u.u6_addr8),(addr),(o)) : __memcpy((pfx->in6_u.u6_addr8),(addr),(o))); > if (b != 0) { > pfx->in6_u.u6_addr8[o] = addr->in6_u.u6_addr8[o] & (0xff00 >> b); > o++; > } > if (o < 16) > (__builtin_constant_p(0) ? (__builtin_constant_p((16 - o)) ? __constant_c_and_count_memset(((pfx->in6_u.u6_addr8 + o)),((0x01010101UL*(unsigned char)(0))),((16 - o))) : __constant_c_memset(((pfx->in6_u.u6_addr8 + o)),((0x01010101UL*(unsigned char)(0))),((16 - o)))) : (__builtin_constant_p((16 - o)) ? __memset_generic((((pfx->in6_u.u6_addr8 + o))),(((0))),(((16 - o)))) : __memset_generic(((pfx->in6_u.u6_addr8 + o)),((0)),((16 - o))))); >} > > >static inline __attribute__((always_inline)) void ipv6_addr_set(struct in6_addr *addr, > __be32 w1, __be32 w2, > __be32 w3, __be32 w4) >{ > addr->in6_u.u6_addr32[0] = w1; > addr->in6_u.u6_addr32[1] = w2; > addr->in6_u.u6_addr32[2] = w3; > addr->in6_u.u6_addr32[3] = w4; >} > > >static inline __attribute__((always_inline)) int ipv6_addr_equal(const struct in6_addr *a1, > const struct in6_addr *a2) >{ > return (a1->in6_u.u6_addr32[0] == a2->in6_u.u6_addr32[0] && > a1->in6_u.u6_addr32[1] == a2->in6_u.u6_addr32[1] && > a1->in6_u.u6_addr32[2] == a2->in6_u.u6_addr32[2] && > a1->in6_u.u6_addr32[3] == a2->in6_u.u6_addr32[3]); >} > >static inline __attribute__((always_inline)) int __ipv6_prefix_equal(const __be32 *a1, const __be32 *a2, > unsigned int prefixlen) >{ > unsigned pdw, pbi; > > > pdw = prefixlen >> 5; > if (pdw && __builtin_memcmp(a1, a2, pdw << 2)) > return 0; > > > pbi = prefixlen & 0x1f; > if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi)))) > return 0; > > return 1; >} > >static inline __attribute__((always_inline)) int ipv6_prefix_equal(const struct in6_addr *a1, > const struct in6_addr *a2, > unsigned int prefixlen) >{ > return __ipv6_prefix_equal(a1->in6_u.u6_addr32, a2->in6_u.u6_addr32, > prefixlen); >} > >static inline __attribute__((always_inline)) int ipv6_addr_any(const struct in6_addr *a) >{ > return ((a->in6_u.u6_addr32[0] | a->in6_u.u6_addr32[1] | > a->in6_u.u6_addr32[2] | a->in6_u.u6_addr32[3] ) == 0); >} > > > > > >static inline __attribute__((always_inline)) int __ipv6_addr_diff(const void *token1, const void *token2, int addrlen) >{ > const __be32 *a1 = token1, *a2 = token2; > int i; > > addrlen >>= 2; > > for (i = 0; i < addrlen; i++) { > __be32 xb = a1[i] ^ a2[i]; > if (xb) > return i * 32 + 32 - fls(ntohl(xb)); > } ># 424 "include/net/ipv6.h" > return (addrlen << 5); >} > >static inline __attribute__((always_inline)) int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) >{ > return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); >} ># 440 "include/net/ipv6.h" >extern int ipv6_rcv(struct sk_buff *skb, > struct net_device *dev, > struct packet_type *pt, > struct net_device *orig_dev); > >extern int ip6_rcv_finish(struct sk_buff *skb); > > > > >extern int ip6_xmit(struct sock *sk, > struct sk_buff *skb, > struct flowi *fl, > struct ipv6_txoptions *opt, > int ipfragok); > >extern int ip6_nd_hdr(struct sock *sk, > struct sk_buff *skb, > struct net_device *dev, > struct in6_addr *saddr, > struct in6_addr *daddr, > int proto, int len); > >extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); > >extern int ip6_append_data(struct sock *sk, > int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), > void *from, > int length, > int transhdrlen, > int hlimit, > int tclass, > struct ipv6_txoptions *opt, > struct flowi *fl, > struct rt6_info *rt, > unsigned int flags); > >extern int ip6_push_pending_frames(struct sock *sk); > >extern void ip6_flush_pending_frames(struct sock *sk); > >extern int ip6_dst_lookup(struct sock *sk, > struct dst_entry **dst, > struct flowi *fl); >extern int ip6_sk_dst_lookup(struct sock *sk, > struct dst_entry **dst, > struct flowi *fl); > > > > > >extern int ip6_output(struct sk_buff *skb); >extern int ip6_forward(struct sk_buff *skb); >extern int ip6_input(struct sk_buff *skb); >extern int ip6_mc_input(struct sk_buff *skb); > > > > > >extern u8 * ipv6_build_nfrag_opts(struct sk_buff *skb, > u8 *prev_hdr, > struct ipv6_txoptions *opt, > struct in6_addr *daddr, > u32 jumbolen); >extern u8 * ipv6_build_frag_opts(struct sk_buff *skb, > u8 *prev_hdr, > struct ipv6_txoptions *opt); >extern void ipv6_push_nfrag_opts(struct sk_buff *skb, > struct ipv6_txoptions *opt, > u8 *proto, > struct in6_addr **daddr_p); >extern void ipv6_push_frag_opts(struct sk_buff *skb, > struct ipv6_txoptions *opt, > u8 *proto); > >extern int ipv6_skip_exthdr(const struct sk_buff *, int start, > u8 *nexthdrp); > >extern int ipv6_ext_hdr(u8 nexthdr); > >extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); > >extern struct ipv6_txoptions * ipv6_invert_rthdr(struct sock *sk, > struct ipv6_rt_hdr *hdr); > > > > > > >extern int ipv6_setsockopt(struct sock *sk, int level, > int optname, > char *optval, > int optlen); >extern int ipv6_getsockopt(struct sock *sk, int level, > int optname, > char *optval, > int *optlen); >extern int compat_ipv6_setsockopt(struct sock *sk, > int level, > int optname, > char *optval, > int optlen); >extern int compat_ipv6_getsockopt(struct sock *sk, > int level, > int optname, > char *optval, > int *optlen); > >extern void ipv6_packet_init(void); > >extern void ipv6_packet_cleanup(void); > >extern int ip6_datagram_connect(struct sock *sk, > struct sockaddr *addr, int addr_len); > >extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); >extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, > u32 info, u8 *payload); >extern void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info); > >extern int inet6_release(struct socket *sock); >extern int inet6_bind(struct socket *sock, struct sockaddr *uaddr, > int addr_len); >extern int inet6_getname(struct socket *sock, struct sockaddr *uaddr, > int *uaddr_len, int peer); >extern int inet6_ioctl(struct socket *sock, unsigned int cmd, > unsigned long arg); > >extern int inet6_hash_connect(struct inet_timewait_death_row *death_row, > struct sock *sk); > > > > >extern int sysctl_ip6frag_high_thresh; >extern int sysctl_ip6frag_low_thresh; >extern int sysctl_ip6frag_time; >extern int sysctl_ip6frag_secret_interval; > >extern const struct proto_ops inet6_stream_ops; >extern const struct proto_ops inet6_dgram_ops; > >struct group_source_req; >struct group_filter; > >extern int ip6_mc_source(int add, int omode, struct sock *sk, > struct group_source_req *pgsr); >extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); >extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, > struct group_filter *optval, > int *optlen); > > >extern int ac6_proc_init(void); >extern void ac6_proc_exit(void); >extern int raw6_proc_init(void); >extern void raw6_proc_exit(void); >extern int tcp6_proc_init(void); >extern void tcp6_proc_exit(void); >extern int udp6_proc_init(void); >extern void udp6_proc_exit(void); >extern int udplite6_proc_init(void); >extern void udplite6_proc_exit(void); >extern int ipv6_misc_proc_init(void); >extern void ipv6_misc_proc_exit(void); > >extern struct rt6_statistics rt6_stats; > > > >extern ctl_table ipv6_route_table[]; >extern ctl_table ipv6_icmp_table[]; > >extern void ipv6_sysctl_register(void); >extern void ipv6_sysctl_unregister(void); ># 20 "include/net/xfrm.h" 2 ># 1 "include/net/ip6_fib.h" 1 ># 14 "include/net/ip6_fib.h" >#define _IP6_FIB_H > > > ># 1 "include/linux/ipv6_route.h" 1 ># 14 "include/linux/ipv6_route.h" >#define _LINUX_IPV6_ROUTE_H > >#define RTF_DEFAULT 0x00010000 >#define RTF_ALLONLINK 0x00020000 > >#define RTF_ADDRCONF 0x00040000 >#define RTF_PREFIX_RT 0x00080000 >#define RTF_ANYCAST 0x00100000 > >#define RTF_NONEXTHOP 0x00200000 >#define RTF_EXPIRES 0x00400000 > >#define RTF_ROUTEINFO 0x00800000 > >#define RTF_CACHE 0x01000000 >#define RTF_FLOW 0x02000000 >#define RTF_POLICY 0x04000000 > >#define RTF_PREF(pref) ((pref) << 27) >#define RTF_PREF_MASK 0x18000000 > >#define RTF_LOCAL 0x80000000 > > >#define IPV6_EXTRACT_PREF(flag) (((flag) & RTF_PREF_MASK) >> 27) >#define IPV6_DECODE_PREF(pref) ((pref) ^ 2) > > >struct in6_rtmsg { > struct in6_addr rtmsg_dst; > struct in6_addr rtmsg_src; > struct in6_addr rtmsg_gateway; > __u32 rtmsg_type; > __u16 rtmsg_dst_len; > __u16 rtmsg_src_len; > __u32 rtmsg_metric; > unsigned long rtmsg_info; > __u32 rtmsg_flags; > int rtmsg_ifindex; >}; > >#define RTMSG_NEWDEVICE 0x11 >#define RTMSG_DELDEVICE 0x12 >#define RTMSG_NEWROUTE 0x21 >#define RTMSG_DELROUTE 0x22 ># 19 "include/net/ip6_fib.h" 2 > > > > ># 1 "include/net/netlink.h" 1 > >#define __NET_NETLINK_H ># 163 "include/net/netlink.h" >enum { > NLA_UNSPEC, > NLA_U8, > NLA_U16, > NLA_U32, > NLA_U64, > NLA_STRING, > NLA_FLAG, > NLA_MSECS, > NLA_NESTED, > NLA_NUL_STRING, > __NLA_TYPE_MAX, >}; > >#define NLA_TYPE_MAX (__NLA_TYPE_MAX - 1) ># 200 "include/net/netlink.h" >struct nla_policy { > u16 type; > u16 len; >}; > > > > > > >struct nl_info { > struct nlmsghdr *nlh; > u32 pid; >}; > >extern void netlink_run_queue(struct sock *sk, unsigned int *qlen, > int (*cb)(struct sk_buff *, > struct nlmsghdr *, int *)); >extern void netlink_queue_skip(struct nlmsghdr *nlh, > struct sk_buff *skb); >extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, > u32 pid, unsigned int group, int report, > gfp_t flags); > >extern int nla_validate(struct nlattr *head, int len, int maxtype, > struct nla_policy *policy); >extern int nla_parse(struct nlattr *tb[], int maxtype, > struct nlattr *head, int len, > struct nla_policy *policy); >extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); >extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, > size_t dstsize); >extern int nla_memcpy(void *dest, struct nlattr *src, int count); >extern int nla_memcmp(const struct nlattr *nla, const void *data, > size_t size); >extern int nla_strcmp(const struct nlattr *nla, const char *str); >extern struct nlattr * __nla_reserve(struct sk_buff *skb, int attrtype, > int attrlen); >extern void * __nla_reserve_nohdr(struct sk_buff *skb, int attrlen); >extern struct nlattr * nla_reserve(struct sk_buff *skb, int attrtype, > int attrlen); >extern void * nla_reserve_nohdr(struct sk_buff *skb, int attrlen); >extern void __nla_put(struct sk_buff *skb, int attrtype, > int attrlen, const void *data); >extern void __nla_put_nohdr(struct sk_buff *skb, int attrlen, > const void *data); >extern int nla_put(struct sk_buff *skb, int attrtype, > int attrlen, const void *data); >extern int nla_put_nohdr(struct sk_buff *skb, int attrlen, > const void *data); ># 259 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_msg_size(int payload) >{ > return ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )) + payload; >} > > > > > >static inline __attribute__((always_inline)) int nlmsg_total_size(int payload) >{ > return ( ((nlmsg_msg_size(payload))+4 -1) & ~(4 -1) ); >} > > > > > >static inline __attribute__((always_inline)) int nlmsg_padlen(int payload) >{ > return nlmsg_total_size(payload) - nlmsg_msg_size(payload); >} > > > > > >static inline __attribute__((always_inline)) void *nlmsg_data(const struct nlmsghdr *nlh) >{ > return (unsigned char *) nlh + ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )); >} > > > > > >static inline __attribute__((always_inline)) int nlmsg_len(const struct nlmsghdr *nlh) >{ > return nlh->nlmsg_len - ((int) ( ((sizeof(struct nlmsghdr))+4 -1) & ~(4 -1) )); >} > > > > > > >static inline __attribute__((always_inline)) struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, > int hdrlen) >{ > unsigned char *data = nlmsg_data(nlh); > return (struct nlattr *) (data + ( ((hdrlen)+4 -1) & ~(4 -1) )); >} > > > > > > >static inline __attribute__((always_inline)) int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) >{ > return nlmsg_len(nlh) - ( ((hdrlen)+4 -1) & ~(4 -1) ); >} > > > > > > >static inline __attribute__((always_inline)) int nlmsg_ok(const struct nlmsghdr *nlh, int remaining) >{ > return (remaining >= sizeof(struct nlmsghdr) && > nlh->nlmsg_len >= sizeof(struct nlmsghdr) && > nlh->nlmsg_len <= remaining); >} ># 342 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining) >{ > int totlen = ( ((nlh->nlmsg_len)+4 -1) & ~(4 -1) ); > > *remaining -= totlen; > > return (struct nlmsghdr *) ((unsigned char *) nlh + totlen); >} ># 361 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, > struct nlattr *tb[], int maxtype, > struct nla_policy *policy) >{ > if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) > return -22; > > return nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen), > nlmsg_attrlen(nlh, hdrlen), policy); >} ># 380 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh, > int hdrlen, int attrtype) >{ > return nla_find(nlmsg_attrdata(nlh, hdrlen), > nlmsg_attrlen(nlh, hdrlen), attrtype); >} ># 394 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, > struct nla_policy *policy) >{ > if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) > return -22; > > return nla_validate(nlmsg_attrdata(nlh, hdrlen), > nlmsg_attrlen(nlh, hdrlen), maxtype, policy); >} > > > > > > > >static inline __attribute__((always_inline)) int nlmsg_report(struct nlmsghdr *nlh) >{ > return !!(nlh->nlmsg_flags & 8); >} ># 422 "include/net/netlink.h" >#define nlmsg_for_each_attr(pos,nlh,hdrlen,rem) nla_for_each_attr(pos, nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), rem) ># 473 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, > int type, int payload, int flags) >{ > if (__builtin_expect(!!(skb_tailroom(skb) < nlmsg_total_size(payload)), 0)) > return ((void *)0); > > return __nlmsg_put(skb, pid, seq, type, payload, flags); >} ># 493 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlmsghdr *nlmsg_put_answer(struct sk_buff *skb, > struct netlink_callback *cb, > int type, int payload, > int flags) >{ > return nlmsg_put(skb, (*(struct netlink_skb_parms*)&((cb->skb)->cb)).pid, cb->nlh->nlmsg_seq, > type, payload, flags); >} ># 510 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct sk_buff *nlmsg_new(size_t payload, gfp_t flags) >{ > return alloc_skb(nlmsg_total_size(payload), flags); >} ># 526 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_end(struct sk_buff *skb, struct nlmsghdr *nlh) >{ > nlh->nlmsg_len = skb->tail - (unsigned char *) nlh; > > return skb->len; >} > > > > > > > >static inline __attribute__((always_inline)) void *nlmsg_get_pos(struct sk_buff *skb) >{ > return skb->tail; >} ># 551 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_trim(struct sk_buff *skb, void *mark) >{ > if (mark) > skb_trim(skb, (unsigned char *) mark - skb->data); > > return -1; >} ># 567 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) >{ > return nlmsg_trim(skb, nlh); >} > > > > > >static inline __attribute__((always_inline)) void nlmsg_free(struct sk_buff *skb) >{ > kfree_skb(skb); >} ># 589 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nlmsg_multicast(struct sock *sk, struct sk_buff *skb, > u32 pid, unsigned int group, gfp_t flags) >{ > int err; > > (*(struct netlink_skb_parms*)&((skb)->cb)).dst_group = group; > > err = netlink_broadcast(sk, skb, pid, group, flags); > if (err > 0) > err = 0; > > return err; >} > > > > > > > >static inline __attribute__((always_inline)) int nlmsg_unicast(struct sock *sk, struct sk_buff *skb, u32 pid) >{ > int err; > > err = netlink_unicast(sk, skb, pid, 0x40); > if (err > 0) > err = 0; > > return err; >} ># 627 "include/net/netlink.h" >#define nlmsg_for_each_msg(pos,head,len,rem) for (pos = head, rem = len; nlmsg_ok(pos, rem); pos = nlmsg_next(pos, &(rem))) ># 640 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nla_attr_size(int payload) >{ > return ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1))) + payload; >} > > > > > >static inline __attribute__((always_inline)) int nla_total_size(int payload) >{ > return (((nla_attr_size(payload)) + 4 - 1) & ~(4 - 1)); >} > > > > > >static inline __attribute__((always_inline)) int nla_padlen(int payload) >{ > return nla_total_size(payload) - nla_attr_size(payload); >} > > > > > >static inline __attribute__((always_inline)) void *nla_data(const struct nlattr *nla) >{ > return (char *) nla + ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1))); >} > > > > > >static inline __attribute__((always_inline)) int nla_len(const struct nlattr *nla) >{ > return nla->nla_len - ((int) (((sizeof(struct nlattr)) + 4 - 1) & ~(4 - 1))); >} > > > > > > >static inline __attribute__((always_inline)) int nla_ok(const struct nlattr *nla, int remaining) >{ > return remaining >= sizeof(*nla) && > nla->nla_len >= sizeof(*nla) && > nla->nla_len <= remaining; >} ># 701 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlattr *nla_next(const struct nlattr *nla, int *remaining) >{ > int totlen = (((nla->nla_len) + 4 - 1) & ~(4 - 1)); > > *remaining -= totlen; > return (struct nlattr *) ((char *) nla + totlen); >} ># 716 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype) >{ > return nla_find(nla_data(nla), nla_len(nla), attrtype); >} ># 730 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nla_parse_nested(struct nlattr *tb[], int maxtype, > struct nlattr *nla, > struct nla_policy *policy) >{ > return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); >} > > > > > > >static inline __attribute__((always_inline)) int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value) >{ > return nla_put(skb, attrtype, sizeof(u8), &value); >} > > > > > > > >static inline __attribute__((always_inline)) int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value) >{ > return nla_put(skb, attrtype, sizeof(u16), &value); >} > > > > > > > >static inline __attribute__((always_inline)) int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value) >{ > return nla_put(skb, attrtype, sizeof(u32), &value); >} > > > > > > > >static inline __attribute__((always_inline)) int nla_put_u64(struct sk_buff *skb, int attrtype, u64 value) >{ > return nla_put(skb, attrtype, sizeof(u64), &value); >} > > > > > > > >static inline __attribute__((always_inline)) int nla_put_string(struct sk_buff *skb, int attrtype, > const char *str) >{ > return nla_put(skb, attrtype, strlen(str) + 1, str); >} > > > > > > >static inline __attribute__((always_inline)) int nla_put_flag(struct sk_buff *skb, int attrtype) >{ > return nla_put(skb, attrtype, 0, ((void *)0)); >} > > > > > > > >static inline __attribute__((always_inline)) int nla_put_msecs(struct sk_buff *skb, int attrtype, > unsigned long jiffies) >{ > u64 tmp = jiffies_to_msecs(jiffies); > return nla_put(skb, attrtype, sizeof(u64), &tmp); >} > >#define NLA_PUT(skb,attrtype,attrlen,data) do { if (nla_put(skb, attrtype, attrlen, data) < 0) goto nla_put_failure; } while(0) > > > > > >#define NLA_PUT_TYPE(skb,type,attrtype,value) do { type __tmp = value; NLA_PUT(skb, attrtype, sizeof(type), &__tmp); } while(0) > > > > > >#define NLA_PUT_U8(skb,attrtype,value) NLA_PUT_TYPE(skb, u8, attrtype, value) > > >#define NLA_PUT_U16(skb,attrtype,value) NLA_PUT_TYPE(skb, u16, attrtype, value) > > >#define NLA_PUT_LE16(skb,attrtype,value) NLA_PUT_TYPE(skb, __le16, attrtype, value) > > >#define NLA_PUT_U32(skb,attrtype,value) NLA_PUT_TYPE(skb, u32, attrtype, value) > > >#define NLA_PUT_BE32(skb,attrtype,value) NLA_PUT_TYPE(skb, __be32, attrtype, value) > > >#define NLA_PUT_U64(skb,attrtype,value) NLA_PUT_TYPE(skb, u64, attrtype, value) > > >#define NLA_PUT_STRING(skb,attrtype,value) NLA_PUT(skb, attrtype, strlen(value) + 1, value) > > >#define NLA_PUT_FLAG(skb,attrtype) NLA_PUT(skb, attrtype, 0, NULL) > > >#define NLA_PUT_MSECS(skb,attrtype,jiffies) NLA_PUT_U64(skb, attrtype, jiffies_to_msecs(jiffies)) > > > > > > >static inline __attribute__((always_inline)) u32 nla_get_u32(struct nlattr *nla) >{ > return *(u32 *) nla_data(nla); >} > > > > > >static inline __attribute__((always_inline)) __be32 nla_get_be32(struct nlattr *nla) >{ > return *(__be32 *) nla_data(nla); >} > > > > > >static inline __attribute__((always_inline)) u16 nla_get_u16(struct nlattr *nla) >{ > return *(u16 *) nla_data(nla); >} > > > > > >static inline __attribute__((always_inline)) __le16 nla_get_le16(struct nlattr *nla) >{ > return *(__le16 *) nla_data(nla); >} > > > > > >static inline __attribute__((always_inline)) u8 nla_get_u8(struct nlattr *nla) >{ > return *(u8 *) nla_data(nla); >} > > > > > >static inline __attribute__((always_inline)) u64 nla_get_u64(struct nlattr *nla) >{ > u64 tmp; > > nla_memcpy(&tmp, nla, sizeof(tmp)); > > return tmp; >} > > > > > >static inline __attribute__((always_inline)) int nla_get_flag(struct nlattr *nla) >{ > return !!nla; >} > > > > > > > >static inline __attribute__((always_inline)) unsigned long nla_get_msecs(struct nlattr *nla) >{ > u64 msecs = nla_get_u64(nla); > > return msecs_to_jiffies((unsigned long) msecs); >} ># 941 "include/net/netlink.h" >static inline __attribute__((always_inline)) struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype) >{ > struct nlattr *start = (struct nlattr *) skb->tail; > > if (nla_put(skb, attrtype, 0, ((void *)0)) < 0) > return ((void *)0); > > return start; >} ># 961 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nla_nest_end(struct sk_buff *skb, struct nlattr *start) >{ > start->nla_len = skb->tail - (unsigned char *) start; > return skb->len; >} ># 975 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) >{ > return nlmsg_trim(skb, start); >} ># 992 "include/net/netlink.h" >static inline __attribute__((always_inline)) int nla_validate_nested(struct nlattr *start, int maxtype, > struct nla_policy *policy) >{ > return nla_validate(nla_data(start), nla_len(start), maxtype, policy); >} ># 1005 "include/net/netlink.h" >#define nla_for_each_attr(pos,head,len,rem) for (pos = head, rem = len; nla_ok(pos, rem); pos = nla_next(pos, &(rem))) ># 1016 "include/net/netlink.h" >#define nla_for_each_nested(pos,nla,rem) nla_for_each_attr(pos, nla_data(nla), nla_len(nla), rem) ># 24 "include/net/ip6_fib.h" 2 > >struct rt6_info; > >struct fib6_config >{ > u32 fc_table; > u32 fc_metric; > int fc_dst_len; > int fc_src_len; > int fc_ifindex; > u32 fc_flags; > u32 fc_protocol; > > struct in6_addr fc_dst; > struct in6_addr fc_src; > struct in6_addr fc_gateway; > > unsigned long fc_expires; > struct nlattr *fc_mx; > int fc_mx_len; > > struct nl_info fc_nlinfo; >}; > >struct fib6_node >{ > struct fib6_node *parent; > struct fib6_node *left; > struct fib6_node *right; > > > > struct rt6_info *leaf; > > __u16 fn_bit; > __u16 fn_flags; > __u32 fn_sernum; >}; > > >#define FIB6_SUBTREE(fn) NULL ># 74 "include/net/ip6_fib.h" >struct rt6key >{ > struct in6_addr addr; > int plen; >}; > >struct fib6_table; > >struct rt6_info >{ > union { > struct dst_entry dst; > struct rt6_info *next; > } u; > > struct inet6_dev *rt6i_idev; > >#define rt6i_dev u.dst.dev >#define rt6i_nexthop u.dst.neighbour >#define rt6i_expires u.dst.expires > > struct fib6_node *rt6i_node; > > struct in6_addr rt6i_gateway; > > u32 rt6i_flags; > u32 rt6i_metric; > atomic_t rt6i_ref; > struct fib6_table *rt6i_table; > > struct rt6key rt6i_dst; > struct rt6key rt6i_src; > > u8 rt6i_protocol; >}; > >static inline __attribute__((always_inline)) struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) >{ > return ((struct rt6_info *)dst)->rt6i_idev; >} > >struct fib6_walker_t >{ > struct fib6_walker_t *prev, *next; > struct fib6_node *root, *node; > struct rt6_info *leaf; > unsigned char state; > unsigned char prune; > int (*func)(struct fib6_walker_t *); > void *args; >}; > >struct rt6_statistics { > __u32 fib_nodes; > __u32 fib_route_nodes; > __u32 fib_rt_alloc; > __u32 fib_rt_entries; > __u32 fib_rt_cache; > __u32 fib_discarded_routes; >}; > >#define RTN_TL_ROOT 0x0001 >#define RTN_ROOT 0x0002 >#define RTN_RTINFO 0x0004 > > > > > > >#define RTPRI_FIREWALL 8 >#define RTPRI_FLOW 16 >#define RTPRI_KERN_CTL 32 > >#define RTPRI_USER_MIN 256 >#define RTPRI_USER_MAX 1024 > >#define RTPRI_KERN_DFLT 4096 > >#define MAX_FLOW_BACKTRACE 32 > > >typedef void (*f_pnode)(struct fib6_node *fn, void *); > >struct fib6_table { > struct hlist_node tb6_hlist; > u32 tb6_id; > rwlock_t tb6_lock; > struct fib6_node tb6_root; >}; > >#define RT6_TABLE_UNSPEC RT_TABLE_UNSPEC >#define RT6_TABLE_MAIN RT_TABLE_MAIN >#define RT6_TABLE_DFLT RT6_TABLE_MAIN >#define RT6_TABLE_INFO RT6_TABLE_MAIN >#define RT6_TABLE_PREFIX RT6_TABLE_MAIN > > > > > > >#define FIB6_TABLE_MIN RT_TABLE_MAIN >#define FIB6_TABLE_MAX FIB6_TABLE_MIN >#define RT6_TABLE_LOCAL RT6_TABLE_MAIN > > >typedef struct rt6_info *(*pol_lookup_t)(struct fib6_table *, > struct flowi *, int); > > > > > >extern struct fib6_table * fib6_get_table(u32 id); >extern struct fib6_table * fib6_new_table(u32 id); >extern struct dst_entry * fib6_rule_lookup(struct flowi *fl, int flags, > pol_lookup_t lookup); > >extern struct fib6_node *fib6_lookup(struct fib6_node *root, > struct in6_addr *daddr, > struct in6_addr *saddr); > >struct fib6_node *fib6_locate(struct fib6_node *root, > struct in6_addr *daddr, int dst_len, > struct in6_addr *saddr, int src_len); > >extern void fib6_clean_all(int (*func)(struct rt6_info *, void *arg), > int prune, void *arg); > >extern int fib6_add(struct fib6_node *root, > struct rt6_info *rt, > struct nl_info *info); > >extern int fib6_del(struct rt6_info *rt, > struct nl_info *info); > >extern void inet6_rt_notify(int event, struct rt6_info *rt, > struct nl_info *info); > >extern void fib6_run_gc(unsigned long dummy); > >extern void fib6_gc_cleanup(void); > >extern void fib6_init(void); > >extern void fib6_rules_init(void); >extern void fib6_rules_cleanup(void); >extern int fib6_rules_dump(struct sk_buff *, > struct netlink_callback *); ># 21 "include/net/xfrm.h" 2 > >#define XFRM_ALIGN8(len) (((len) + 7) & ~7) >#define MODULE_ALIAS_XFRM_MODE(family,encap) MODULE_ALIAS("xfrm-mode-" __stringify(family) "-" __stringify(encap)) > > >extern struct sock *xfrm_nl; >extern u32 sysctl_xfrm_aevent_etime; >extern u32 sysctl_xfrm_aevent_rseqth; > >extern struct mutex xfrm_cfg_mutex; ># 94 "include/net/xfrm.h" >struct xfrm_state >{ > > struct hlist_node bydst; > struct hlist_node bysrc; > struct hlist_node byspi; > > atomic_t refcnt; > spinlock_t lock; > > struct xfrm_id id; > struct xfrm_selector sel; > > u32 genid; > > > struct { > u8 state; > u8 dying; > u32 seq; > } km; > > > struct { > u32 reqid; > u8 mode; > u8 replay_window; > u8 aalgo, ealgo, calgo; > u8 flags; > u16 family; > xfrm_address_t saddr; > int header_len; > int trailer_len; > } props; > > struct xfrm_lifetime_cfg lft; > > > struct xfrm_algo *aalg; > struct xfrm_algo *ealg; > struct xfrm_algo *calg; > > > struct xfrm_encap_tmpl *encap; > > > xfrm_address_t *coaddr; > > > struct xfrm_state *tunnel; > > > atomic_t tunnel_users; > > > struct xfrm_replay_state replay; > > > struct xfrm_replay_state preplay; > > > > > u32 xflags; > > > u32 replay_maxage; > u32 replay_maxdiff; > > > struct timer_list rtimer; > > > struct xfrm_stats stats; > > struct xfrm_lifetime_cur curlft; > struct timer_list timer; > > > u64 lastused; > > > > struct xfrm_type *type; > struct xfrm_mode *mode; > > > struct xfrm_sec_ctx *security; > > > > void *data; >}; > > >#define XFRM_TIME_DEFER 1 > >enum { > XFRM_STATE_VOID, > XFRM_STATE_ACQ, > XFRM_STATE_VALID, > XFRM_STATE_ERROR, > XFRM_STATE_EXPIRED, > XFRM_STATE_DEAD >}; > > >struct km_event >{ > union { > u32 hard; > u32 proto; > u32 byid; > u32 aevent; > u32 type; > } data; > > u32 seq; > u32 pid; > u32 event; >}; > >struct xfrm_type; >struct xfrm_dst; >struct xfrm_policy_afinfo { > unsigned short family; > struct xfrm_type *type_map[IPPROTO_MAX]; > struct xfrm_mode *mode_map[5]; > struct dst_ops *dst_ops; > void (*garbage_collect)(void); > int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl); > int (*get_saddr)(xfrm_address_t *saddr, xfrm_address_t *daddr); > struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy); > int (*bundle_create)(struct xfrm_policy *policy, > struct xfrm_state **xfrm, > int nx, > struct flowi *fl, > struct dst_entry **dst_p); > void (*decode_session)(struct sk_buff *skb, > struct flowi *fl); >}; > >extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); >extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); >extern void km_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c); >extern void km_state_notify(struct xfrm_state *x, struct km_event *c); >#define XFRM_ACQ_EXPIRES 30 > >struct xfrm_tmpl; >extern int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); >extern void km_state_expired(struct xfrm_state *x, int hard, u32 pid); >extern int __xfrm_state_delete(struct xfrm_state *x); > >struct xfrm_state_afinfo { > unsigned short family; > int (*init_flags)(struct xfrm_state *x); > void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl, > struct xfrm_tmpl *tmpl, > xfrm_address_t *daddr, xfrm_address_t *saddr); > int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); > int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); >}; > >extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); >extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); > >extern void xfrm_state_delete_tunnel(struct xfrm_state *x); > >struct xfrm_type >{ > char *description; > struct module *owner; > __u8 proto; > __u8 flags; >#define XFRM_TYPE_NON_FRAGMENT 1 > > int (*init_state)(struct xfrm_state *x); > void (*destructor)(struct xfrm_state *); > int (*input)(struct xfrm_state *, struct sk_buff *skb); > int (*output)(struct xfrm_state *, struct sk_buff *pskb); > int (*reject)(struct xfrm_state *, struct sk_buff *, struct flowi *); > int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **); > xfrm_address_t *(*local_addr)(struct xfrm_state *, xfrm_address_t *); > xfrm_address_t *(*remote_addr)(struct xfrm_state *, xfrm_address_t *); > > u32 (*get_max_size)(struct xfrm_state *, int size); >}; > >extern int xfrm_register_type(struct xfrm_type *type, unsigned short family); >extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family); >extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family); >extern void xfrm_put_type(struct xfrm_type *type); > >struct xfrm_mode { > int (*input)(struct xfrm_state *x, struct sk_buff *skb); > int (*output)(struct xfrm_state *x,struct sk_buff *skb); > > struct module *owner; > unsigned int encap; >}; > >extern int xfrm_register_mode(struct xfrm_mode *mode, int family); >extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); >extern struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family); >extern void xfrm_put_mode(struct xfrm_mode *mode); > >struct xfrm_tmpl >{ > > > > > > > struct xfrm_id id; > > > xfrm_address_t saddr; > > unsigned short encap_family; > > __u32 reqid; > > > __u8 mode; > > > __u8 share; > > > __u8 optional; > > > __u32 aalgos; > __u32 ealgos; > __u32 calgos; >}; > >#define XFRM_MAX_DEPTH 6 > >struct xfrm_policy >{ > struct xfrm_policy *next; > struct hlist_node bydst; > struct hlist_node byidx; > > > rwlock_t lock; > atomic_t refcnt; > struct timer_list timer; > > u32 priority; > u32 index; > struct xfrm_selector selector; > struct xfrm_lifetime_cfg lft; > struct xfrm_lifetime_cur curlft; > struct dst_entry *bundles; > u16 family; > u8 type; > u8 action; > u8 flags; > u8 dead; > u8 xfrm_nr; > > struct xfrm_sec_ctx *security; > struct xfrm_tmpl xfrm_vec[6]; >}; > >#define XFRM_KM_TIMEOUT 30 > >#define XFRM_REPLAY_SEQ 1 >#define XFRM_REPLAY_OSEQ 2 >#define XFRM_REPLAY_SEQ_MASK 3 > >#define XFRM_REPLAY_UPDATE XFRM_AE_CR >#define XFRM_REPLAY_TIMEOUT XFRM_AE_CE > > >#define XFRM_AE_ETIME 10 > >#define XFRM_AE_ETH_M 10 > >#define XFRM_AE_SEQT_SIZE 2 > >struct xfrm_mgr >{ > struct list_head list; > char *id; > int (*notify)(struct xfrm_state *x, struct km_event *c); > int (*acquire)(struct xfrm_state *x, struct xfrm_tmpl *, struct xfrm_policy *xp, int dir); > struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir); > int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); > int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c); > int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); >}; > >extern int xfrm_register_km(struct xfrm_mgr *km); >extern int xfrm_unregister_km(struct xfrm_mgr *km); > >extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2]; > > >struct xfrm_audit >{ > uid_t loginuid; > u32 secid; >}; > > > > > >#define xfrm_audit_log(a,s,t,r,p,x) do { ; } while (0) > > >static inline __attribute__((always_inline)) void xfrm_pol_hold(struct xfrm_policy *policy) >{ > if (__builtin_expect(!!(policy != ((void *)0)), 1)) > atomic_inc(&policy->refcnt); >} > >extern void __xfrm_policy_destroy(struct xfrm_policy *policy); > >static inline __attribute__((always_inline)) void xfrm_pol_put(struct xfrm_policy *policy) >{ > if (atomic_dec_and_test(&policy->refcnt)) > __xfrm_policy_destroy(policy); >} ># 431 "include/net/xfrm.h" >static inline __attribute__((always_inline)) void xfrm_pols_put(struct xfrm_policy **pols, int npols) >{ > xfrm_pol_put(pols[0]); >} > > >extern void __xfrm_state_destroy(struct xfrm_state *); > >static inline __attribute__((always_inline)) void __xfrm_state_put(struct xfrm_state *x) >{ > atomic_dec(&x->refcnt); >} > >static inline __attribute__((always_inline)) void xfrm_state_put(struct xfrm_state *x) >{ > if (atomic_dec_and_test(&x->refcnt)) > __xfrm_state_destroy(x); >} > >static inline __attribute__((always_inline)) void xfrm_state_hold(struct xfrm_state *x) >{ > atomic_inc(&x->refcnt); >} > >static __inline__ __attribute__((always_inline)) int addr_match(void *token1, void *token2, int prefixlen) >{ > __be32 *a1 = token1; > __be32 *a2 = token2; > int pdw; > int pbi; > > pdw = prefixlen >> 5; > pbi = prefixlen & 0x1f; > > if (pdw) > if (__builtin_memcmp(a1, a2, pdw << 2)) > return 0; > > if (pbi) { > __be32 mask; > > mask = htonl((0xffffffff) << (32 - pbi)); > > if ((a1[pdw] ^ a2[pdw]) & mask) > return 0; > } > > return 1; >} > >static __inline__ __attribute__((always_inline)) >__be16 xfrm_flowi_sport(struct flowi *fl) >{ > __be16 port; > switch(fl->proto) { > case IPPROTO_TCP: > case IPPROTO_UDP: > case IPPROTO_UDPLITE: > case IPPROTO_SCTP: > port = fl->uli_u.ports.sport; > break; > case IPPROTO_ICMP: > case 58: > port = htons(fl->uli_u.icmpt.type); > break; > > > > > > default: > port = 0; > } > return port; >} > >static __inline__ __attribute__((always_inline)) >__be16 xfrm_flowi_dport(struct flowi *fl) >{ > __be16 port; > switch(fl->proto) { > case IPPROTO_TCP: > case IPPROTO_UDP: > case IPPROTO_UDPLITE: > case IPPROTO_SCTP: > port = fl->uli_u.ports.dport; > break; > case IPPROTO_ICMP: > case 58: > port = htons(fl->uli_u.icmpt.code); > break; > default: > port = 0; > } > return port; >} > >extern int xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl, > unsigned short family); ># 544 "include/net/xfrm.h" >static inline __attribute__((always_inline)) int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ctx *s2) >{ > return 1; >} ># 561 "include/net/xfrm.h" >struct xfrm_dst >{ > union { > struct xfrm_dst *next; > struct dst_entry dst; > struct rtable rt; > struct rt6_info rt6; > } u; > struct dst_entry *route; > u32 genid; > u32 route_mtu_cached; > u32 child_mtu_cached; > u32 route_cookie; > u32 path_cookie; >}; > >static inline __attribute__((always_inline)) void xfrm_dst_destroy(struct xfrm_dst *xdst) >{ > dst_release(xdst->route); > if (__builtin_expect(!!(xdst->u.dst.xfrm), 1)) > xfrm_state_put(xdst->u.dst.xfrm); >} > >extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); > >struct sec_path >{ > atomic_t refcnt; > int len; > struct xfrm_state *xvec[6]; >}; > >static inline __attribute__((always_inline)) struct sec_path * >secpath_get(struct sec_path *sp) >{ > if (sp) > atomic_inc(&sp->refcnt); > return sp; >} > >extern void __secpath_destroy(struct sec_path *sp); > >static inline __attribute__((always_inline)) void >secpath_put(struct sec_path *sp) >{ > if (sp && atomic_dec_and_test(&sp->refcnt)) > __secpath_destroy(sp); >} > >extern struct sec_path *secpath_dup(struct sec_path *src); > >static inline __attribute__((always_inline)) void >secpath_reset(struct sk_buff *skb) >{ > > > > >} > >static inline __attribute__((always_inline)) int >xfrm_addr_any(xfrm_address_t *addr, unsigned short family) >{ > switch (family) { > case 2: > return addr->a4 == 0; > case 10: > return ipv6_addr_any((struct in6_addr *)&addr->a6); > } > return 0; >} > >static inline __attribute__((always_inline)) int >__xfrm4_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x) >{ > return (tmpl->saddr.a4 && > tmpl->saddr.a4 != x->props.saddr.a4); >} > >static inline __attribute__((always_inline)) int >__xfrm6_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x) >{ > return (!ipv6_addr_any((struct in6_addr*)&tmpl->saddr) && > ipv6_addr_cmp((struct in6_addr *)&tmpl->saddr, (struct in6_addr*)&x->props.saddr)); >} > >static inline __attribute__((always_inline)) int >xfrm_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x, unsigned short family) >{ > switch (family) { > case 2: > return __xfrm4_state_addr_cmp(tmpl, x); > case 10: > return __xfrm6_state_addr_cmp(tmpl, x); > } > return !0; >} ># 728 "include/net/xfrm.h" >static inline __attribute__((always_inline)) void xfrm_sk_free_policy(struct sock *sk) {} >static inline __attribute__((always_inline)) int xfrm_sk_clone_policy(struct sock *sk) { return 0; } >static inline __attribute__((always_inline)) int xfrm6_route_forward(struct sk_buff *skb) { return 1; } >static inline __attribute__((always_inline)) int xfrm4_route_forward(struct sk_buff *skb) { return 1; } >static inline __attribute__((always_inline)) int xfrm6_policy_check(struct sock *sk, int dir, struct sk_buff *skb) >{ > return 1; >} >static inline __attribute__((always_inline)) int xfrm4_policy_check(struct sock *sk, int dir, struct sk_buff *skb) >{ > return 1; >} >static inline __attribute__((always_inline)) int xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family) >{ > return 1; >} > > >static __inline__ __attribute__((always_inline)) >xfrm_address_t *xfrm_flowi_daddr(struct flowi *fl, unsigned short family) >{ > switch (family){ > case 2: > return (xfrm_address_t *)&fl->nl_u.ip4_u.daddr; > case 10: > return (xfrm_address_t *)&fl->nl_u.ip6_u.daddr; > } > return ((void *)0); >} > >static __inline__ __attribute__((always_inline)) >xfrm_address_t *xfrm_flowi_saddr(struct flowi *fl, unsigned short family) >{ > switch (family){ > case 2: > return (xfrm_address_t *)&fl->nl_u.ip4_u.saddr; > case 10: > return (xfrm_address_t *)&fl->nl_u.ip6_u.saddr; > } > return ((void *)0); >} > >static __inline__ __attribute__((always_inline)) int >__xfrm4_state_addr_check(struct xfrm_state *x, > xfrm_address_t *daddr, xfrm_address_t *saddr) >{ > if (daddr->a4 == x->id.daddr.a4 && > (saddr->a4 == x->props.saddr.a4 || !saddr->a4 || !x->props.saddr.a4)) > return 1; > return 0; >} > >static __inline__ __attribute__((always_inline)) int >__xfrm6_state_addr_check(struct xfrm_state *x, > xfrm_address_t *daddr, xfrm_address_t *saddr) >{ > if (!ipv6_addr_cmp((struct in6_addr *)daddr, (struct in6_addr *)&x->id.daddr) && > (!ipv6_addr_cmp((struct in6_addr *)saddr, (struct in6_addr *)&x->props.saddr)|| > ipv6_addr_any((struct in6_addr *)saddr) || > ipv6_addr_any((struct in6_addr *)&x->props.saddr))) > return 1; > return 0; >} > >static __inline__ __attribute__((always_inline)) int >xfrm_state_addr_check(struct xfrm_state *x, > xfrm_address_t *daddr, xfrm_address_t *saddr, > unsigned short family) >{ > switch (family) { > case 2: > return __xfrm4_state_addr_check(x, daddr, saddr); > case 10: > return __xfrm6_state_addr_check(x, daddr, saddr); > } > return 0; >} > >static __inline__ __attribute__((always_inline)) int >xfrm_state_addr_flow_check(struct xfrm_state *x, struct flowi *fl, > unsigned short family) >{ > switch (family) { > case 2: > return __xfrm4_state_addr_check(x, > (xfrm_address_t *)&fl->nl_u.ip4_u.daddr, > (xfrm_address_t *)&fl->nl_u.ip4_u.saddr); > case 10: > return __xfrm6_state_addr_check(x, > (xfrm_address_t *)&fl->nl_u.ip6_u.daddr, > (xfrm_address_t *)&fl->nl_u.ip6_u.saddr); > } > return 0; >} > >static inline __attribute__((always_inline)) int xfrm_state_kern(struct xfrm_state *x) >{ > return ((&x->tunnel_users)->counter); >} > >static inline __attribute__((always_inline)) int xfrm_id_proto_match(u8 proto, u8 userproto) >{ > return (!userproto || proto == userproto || > (userproto == 255 && (proto == IPPROTO_AH || > proto == IPPROTO_ESP || > proto == IPPROTO_COMP))); >} > > > > >struct xfrm_algo_auth_info { > u16 icv_truncbits; > u16 icv_fullbits; >}; > >struct xfrm_algo_encr_info { > u16 blockbits; > u16 defkeybits; >}; > >struct xfrm_algo_comp_info { > u16 threshold; >}; > >struct xfrm_algo_desc { > char *name; > char *compat; > u8 available:1; > union { > struct xfrm_algo_auth_info auth; > struct xfrm_algo_encr_info encr; > struct xfrm_algo_comp_info comp; > } uinfo; > struct sadb_alg desc; >}; > > >struct xfrm_tunnel { > int (*handler)(struct sk_buff *skb); > int (*err_handler)(struct sk_buff *skb, __u32 info); > > struct xfrm_tunnel *next; > int priority; >}; > >struct xfrm6_tunnel { > int (*handler)(struct sk_buff *skb); > int (*err_handler)(struct sk_buff *skb, struct inet6_skb_parm *opt, > int type, int code, int offset, __be32 info); > struct xfrm6_tunnel *next; > int priority; >}; > >extern void xfrm_init(void); >extern void xfrm4_init(void); >extern void xfrm6_init(void); >extern void xfrm6_fini(void); >extern void xfrm_state_init(void); >extern void xfrm4_state_init(void); >extern void xfrm6_state_init(void); >extern void xfrm6_state_fini(void); > >extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *); >extern struct xfrm_state *xfrm_state_alloc(void); >extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, > struct flowi *fl, struct xfrm_tmpl *tmpl, > struct xfrm_policy *pol, int *err, > unsigned short family); >extern int xfrm_state_check_expire(struct xfrm_state *x); >extern void xfrm_state_insert(struct xfrm_state *x); >extern int xfrm_state_add(struct xfrm_state *x); >extern int xfrm_state_update(struct xfrm_state *x); >extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family); >extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); > > > > > > >static inline __attribute__((always_inline)) int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, > int n, unsigned short family) >{ > return -38; >} > >static inline __attribute__((always_inline)) int xfrm_state_sort(struct xfrm_state **dst, struct xfrm_state **src, > int n, unsigned short family) >{ > return -38; >} > >extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); >extern int xfrm_state_delete(struct xfrm_state *x); >extern void xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); >extern int xfrm_replay_check(struct xfrm_state *x, __be32 seq); >extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); >extern void xfrm_replay_notify(struct xfrm_state *x, int event); >extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); >extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); >extern int xfrm_init_state(struct xfrm_state *x); >extern int xfrm4_rcv(struct sk_buff *skb); >extern int xfrm4_output(struct sk_buff *skb); >extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); >extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); >extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi); >extern int xfrm6_rcv(struct sk_buff **pskb); >extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, > xfrm_address_t *saddr, u8 proto); >extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); >extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); >extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); >extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); >extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); >extern int xfrm6_output(struct sk_buff *skb); >extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, > u8 **prevhdr); > > > > > > >static inline __attribute__((always_inline)) int xfrm_user_policy(struct sock *sk, int optname, u8 *optval, int optlen) >{ > return -92; >} > >static inline __attribute__((always_inline)) int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) >{ > > kfree_skb(skb); > return 0; >} >static inline __attribute__((always_inline)) int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family) >{ > return -22; >} > > >struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp); >extern int xfrm_policy_walk(u8 type, int (*func)(struct xfrm_policy *, int, int, void*), void *); >int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); >struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, > struct xfrm_selector *sel, > struct xfrm_sec_ctx *ctx, int delete); >struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete); >void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); >u32 xfrm_get_acqseq(void); >void xfrm_alloc_spi(struct xfrm_state *x, __be32 minspi, __be32 maxspi); >struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, > xfrm_address_t *daddr, xfrm_address_t *saddr, > int create, unsigned short family); >extern void xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); >extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); >extern int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *xdst, > struct flowi *fl, int family, int strict); >extern void xfrm_init_pmtu(struct dst_entry *dst); > >extern wait_queue_head_t km_waitq; >extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); >extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); >extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); > >extern void xfrm_input_init(void); >extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq); > >extern void xfrm_probe_algs(void); >extern int xfrm_count_auth_supported(void); >extern int xfrm_count_enc_supported(void); >extern struct xfrm_algo_desc *xfrm_aalg_get_byidx(unsigned int idx); >extern struct xfrm_algo_desc *xfrm_ealg_get_byidx(unsigned int idx); >extern struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id); >extern struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id); >extern struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id); >extern struct xfrm_algo_desc *xfrm_aalg_get_byname(char *name, int probe); >extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe); >extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe); > >struct hash_desc; >struct scatterlist; >typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *, > unsigned int); > >extern int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *tfm, > int offset, int len, icv_update_fn_t icv_update); > >static inline __attribute__((always_inline)) int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, > int family) >{ > switch (family) { > default: > case 2: > return ( __u32)a->a4 - ( __u32)b->a4; > case 10: > return ipv6_addr_cmp((struct in6_addr *)a, > (struct in6_addr *)b); > } >} > >static inline __attribute__((always_inline)) int xfrm_policy_id2dir(u32 index) >{ > return index & 7; >} > >static inline __attribute__((always_inline)) int xfrm_aevent_is_on(void) >{ > struct sock *nlsk; > int ret = 0; > > do { do { } while (0); (void)0; } while(0); > nlsk = ({ typeof(xfrm_nl) _________p1 = xfrm_nl; do { } while(0); (_________p1); }); > if (nlsk) > ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); > do { (void)0; do { } while (0); } while(0); > return ret; >} > >static inline __attribute__((always_inline)) void xfrm_aevent_doreplay(struct xfrm_state *x) >{ > if (xfrm_aevent_is_on()) > xfrm_replay_notify(x, XFRM_AE_CR); >} ># 73 "net/ipv4/ip_output.c" 2 > > ># 1 "include/net/arp.h" 1 > > >#define _ARP_H > ># 1 "include/linux/if_arp.h" 1 ># 24 "include/linux/if_arp.h" >#define _LINUX_IF_ARP_H > > > > >#define ARPHRD_NETROM 0 >#define ARPHRD_ETHER 1 >#define ARPHRD_EETHER 2 >#define ARPHRD_AX25 3 >#define ARPHRD_PRONET 4 >#define ARPHRD_CHAOS 5 >#define ARPHRD_IEEE802 6 >#define ARPHRD_ARCNET 7 >#define ARPHRD_APPLETLK 8 >#define ARPHRD_DLCI 15 >#define ARPHRD_ATM 19 >#define ARPHRD_METRICOM 23 >#define ARPHRD_IEEE1394 24 >#define ARPHRD_EUI64 27 >#define ARPHRD_INFINIBAND 32 > > >#define ARPHRD_SLIP 256 >#define ARPHRD_CSLIP 257 >#define ARPHRD_SLIP6 258 >#define ARPHRD_CSLIP6 259 >#define ARPHRD_RSRVD 260 >#define ARPHRD_ADAPT 264 >#define ARPHRD_ROSE 270 >#define ARPHRD_X25 271 >#define ARPHRD_HWX25 272 >#define ARPHRD_PPP 512 >#define ARPHRD_CISCO 513 >#define ARPHRD_HDLC ARPHRD_CISCO >#define ARPHRD_LAPB 516 >#define ARPHRD_DDCMP 517 >#define ARPHRD_RAWHDLC 518 > >#define ARPHRD_TUNNEL 768 >#define ARPHRD_TUNNEL6 769 >#define ARPHRD_FRAD 770 >#define ARPHRD_SKIP 771 >#define ARPHRD_LOOPBACK 772 >#define ARPHRD_LOCALTLK 773 >#define ARPHRD_FDDI 774 >#define ARPHRD_BIF 775 >#define ARPHRD_SIT 776 >#define ARPHRD_IPDDP 777 >#define ARPHRD_IPGRE 778 >#define ARPHRD_PIMREG 779 >#define ARPHRD_HIPPI 780 >#define ARPHRD_ASH 781 >#define ARPHRD_ECONET 782 >#define ARPHRD_IRDA 783 > >#define ARPHRD_FCPP 784 >#define ARPHRD_FCAL 785 >#define ARPHRD_FCPL 786 >#define ARPHRD_FCFABRIC 787 > >#define ARPHRD_IEEE802_TR 800 >#define ARPHRD_IEEE80211 801 >#define ARPHRD_IEEE80211_PRISM 802 >#define ARPHRD_IEEE80211_RADIOTAP 803 > >#define ARPHRD_VOID 0xFFFF >#define ARPHRD_NONE 0xFFFE > > >#define ARPOP_REQUEST 1 >#define ARPOP_REPLY 2 >#define ARPOP_RREQUEST 3 >#define ARPOP_RREPLY 4 >#define ARPOP_InREQUEST 8 >#define ARPOP_InREPLY 9 >#define ARPOP_NAK 10 > > > >struct arpreq { > struct sockaddr arp_pa; > struct sockaddr arp_ha; > int arp_flags; > struct sockaddr arp_netmask; > char arp_dev[16]; >}; > >struct arpreq_old { > struct sockaddr arp_pa; > struct sockaddr arp_ha; > int arp_flags; > struct sockaddr arp_netmask; >}; > > >#define ATF_COM 0x02 >#define ATF_PERM 0x04 >#define ATF_PUBL 0x08 >#define ATF_USETRAILERS 0x10 >#define ATF_NETMASK 0x20 > >#define ATF_DONTPUB 0x40 > > > > > >struct arphdr >{ > __be16 ar_hrd; > __be16 ar_pro; > unsigned char ar_hln; > unsigned char ar_pln; > __be16 ar_op; ># 149 "include/linux/if_arp.h" >}; ># 6 "include/net/arp.h" 2 > > >#define HAVE_ARP_CREATE > >extern struct neigh_table arp_tbl; > >extern void arp_init(void); >extern int arp_find(unsigned char *haddr, struct sk_buff *skb); >extern int arp_ioctl(unsigned int cmd, void *arg); >extern void arp_send(int type, int ptype, __be32 dest_ip, > struct net_device *dev, __be32 src_ip, > unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); >extern int arp_bind_neighbour(struct dst_entry *dst); >extern int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir); >extern void arp_ifdown(struct net_device *dev); > >extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, > struct net_device *dev, __be32 src_ip, > unsigned char *dest_hw, unsigned char *src_hw, > unsigned char *target_hw); >extern void arp_xmit(struct sk_buff *skb); > >extern struct neigh_ops arp_broken_ops; ># 76 "net/ipv4/ip_output.c" 2 ># 1 "include/net/icmp.h" 1 ># 19 "include/net/icmp.h" >#define _ICMP_H > ># 1 "include/linux/icmp.h" 1 ># 18 "include/linux/icmp.h" >#define _LINUX_ICMP_H > > > >#define ICMP_ECHOREPLY 0 >#define ICMP_DEST_UNREACH 3 >#define ICMP_SOURCE_QUENCH 4 >#define ICMP_REDIRECT 5 >#define ICMP_ECHO 8 >#define ICMP_TIME_EXCEEDED 11 >#define ICMP_PARAMETERPROB 12 >#define ICMP_TIMESTAMP 13 >#define ICMP_TIMESTAMPREPLY 14 >#define ICMP_INFO_REQUEST 15 >#define ICMP_INFO_REPLY 16 >#define ICMP_ADDRESS 17 >#define ICMP_ADDRESSREPLY 18 >#define NR_ICMP_TYPES 18 > > > >#define ICMP_NET_UNREACH 0 >#define ICMP_HOST_UNREACH 1 >#define ICMP_PROT_UNREACH 2 >#define ICMP_PORT_UNREACH 3 >#define ICMP_FRAG_NEEDED 4 >#define ICMP_SR_FAILED 5 >#define ICMP_NET_UNKNOWN 6 >#define ICMP_HOST_UNKNOWN 7 >#define ICMP_HOST_ISOLATED 8 >#define ICMP_NET_ANO 9 >#define ICMP_HOST_ANO 10 >#define ICMP_NET_UNR_TOS 11 >#define ICMP_HOST_UNR_TOS 12 >#define ICMP_PKT_FILTERED 13 >#define ICMP_PREC_VIOLATION 14 >#define ICMP_PREC_CUTOFF 15 >#define NR_ICMP_UNREACH 15 > > >#define ICMP_REDIR_NET 0 >#define ICMP_REDIR_HOST 1 >#define ICMP_REDIR_NETTOS 2 >#define ICMP_REDIR_HOSTTOS 3 > > >#define ICMP_EXC_TTL 0 >#define ICMP_EXC_FRAGTIME 1 > > >struct icmphdr { > __u8 type; > __u8 code; > __sum16 checksum; > union { > struct { > __be16 id; > __be16 sequence; > } echo; > __be32 gateway; > struct { > __be16 __unused; > __be16 mtu; > } frag; > } un; >}; > > > > > >#define ICMP_FILTER 1 > >struct icmp_filter { > __u32 data; >}; ># 22 "include/net/icmp.h" 2 > > > > >struct icmp_err { > int kernel_errno; > unsigned fatal:1; >}; > >extern struct icmp_err icmp_err_convert[]; >extern __typeof__(struct icmp_mib) *icmp_statistics[2]; >#define ICMP_INC_STATS(field) SNMP_INC_STATS(icmp_statistics, field) >#define ICMP_INC_STATS_BH(field) SNMP_INC_STATS_BH(icmp_statistics, field) >#define ICMP_INC_STATS_USER(field) SNMP_INC_STATS_USER(icmp_statistics, field) > >struct dst_entry; >struct net_proto_family; >struct sk_buff; > >extern void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info); >extern int icmp_rcv(struct sk_buff *skb); >extern int icmp_ioctl(struct sock *sk, int cmd, unsigned long arg); >extern void icmp_init(struct net_proto_family *ops); > > >extern int xrlim_allow(struct dst_entry *dst, int timeout); > >struct raw_sock { > > struct inet_sock inet; > struct icmp_filter filter; >}; > >static inline __attribute__((always_inline)) struct raw_sock *raw_sk(const struct sock *sk) >{ > return (struct raw_sock *)sk; >} > >extern int sysctl_icmp_echo_ignore_all; >extern int sysctl_icmp_echo_ignore_broadcasts; >extern int sysctl_icmp_ignore_bogus_error_responses; >extern int sysctl_icmp_errors_use_inbound_ifaddr; >extern int sysctl_icmp_ratelimit; >extern int sysctl_icmp_ratemask; ># 77 "net/ipv4/ip_output.c" 2 > > > ># 1 "include/linux/igmp.h" 1 ># 17 "include/linux/igmp.h" >#define _LINUX_IGMP_H ># 29 "include/linux/igmp.h" >struct igmphdr >{ > __u8 type; > __u8 code; > __sum16 csum; > __be32 group; >}; > > >#define IGMPV3_MODE_IS_INCLUDE 1 >#define IGMPV3_MODE_IS_EXCLUDE 2 >#define IGMPV3_CHANGE_TO_INCLUDE 3 >#define IGMPV3_CHANGE_TO_EXCLUDE 4 >#define IGMPV3_ALLOW_NEW_SOURCES 5 >#define IGMPV3_BLOCK_OLD_SOURCES 6 > >struct igmpv3_grec { > __u8 grec_type; > __u8 grec_auxwords; > __be16 grec_nsrcs; > __be32 grec_mca; > __be32 grec_src[0]; >}; > >struct igmpv3_report { > __u8 type; > __u8 resv1; > __be16 csum; > __be16 resv2; > __be16 ngrec; > struct igmpv3_grec grec[0]; >}; > >struct igmpv3_query { > __u8 type; > __u8 code; > __be16 csum; > __be32 group; > > __u8 qrv:3, > suppress:1, > resv:4; > > > > > > > > __u8 qqic; > __be16 nsrcs; > __be32 srcs[0]; >}; > >#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 >#define IGMP_HOST_MEMBERSHIP_REPORT 0x12 >#define IGMP_DVMRP 0x13 >#define IGMP_PIM 0x14 >#define IGMP_TRACE 0x15 >#define IGMPV2_HOST_MEMBERSHIP_REPORT 0x16 >#define IGMP_HOST_LEAVE_MESSAGE 0x17 >#define IGMPV3_HOST_MEMBERSHIP_REPORT 0x22 > >#define IGMP_MTRACE_RESP 0x1e >#define IGMP_MTRACE 0x1f > > > > > > >#define IGMP_DELAYING_MEMBER 0x01 >#define IGMP_IDLE_MEMBER 0x02 >#define IGMP_LAZY_MEMBER 0x03 >#define IGMP_SLEEPING_MEMBER 0x04 >#define IGMP_AWAKENING_MEMBER 0x05 > >#define IGMP_MINLEN 8 > >#define IGMP_MAX_HOST_REPORT_DELAY 10 > > >#define IGMP_TIMER_SCALE 10 > > >#define IGMP_AGE_THRESHOLD 400 > > > >#define IGMP_ALL_HOSTS htonl(0xE0000001L) >#define IGMP_ALL_ROUTER htonl(0xE0000002L) >#define IGMPV3_ALL_MCR htonl(0xE0000016L) >#define IGMP_LOCAL_GROUP htonl(0xE0000000L) >#define IGMP_LOCAL_GROUP_MASK htonl(0xFFFFFF00L) ># 133 "include/linux/igmp.h" >extern int sysctl_igmp_max_memberships; >extern int sysctl_igmp_max_msf; > >struct ip_sf_socklist >{ > unsigned int sl_max; > unsigned int sl_count; > __be32 sl_addr[0]; >}; > >#define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + (count) * sizeof(__be32)) > > >#define IP_SFBLOCK 10 > > > > > >struct ip_mc_socklist >{ > struct ip_mc_socklist *next; > struct ip_mreqn multi; > unsigned int sfmode; > struct ip_sf_socklist *sflist; >}; > >struct ip_sf_list >{ > struct ip_sf_list *sf_next; > __be32 sf_inaddr; > unsigned long sf_count[2]; > unsigned char sf_gsresp; > unsigned char sf_oldin; > unsigned char sf_crcount; >}; > >struct ip_mc_list >{ > struct in_device *interface; > __be32 multiaddr; > struct ip_sf_list *sources; > struct ip_sf_list *tomb; > unsigned int sfmode; > unsigned long sfcount[2]; > struct ip_mc_list *next; > struct timer_list timer; > int users; > atomic_t refcnt; > spinlock_t lock; > char tm_running; > char reporter; > char unsolicit_count; > char loaded; > unsigned char gsquery; > unsigned char crcount; >}; > > >#define IGMPV3_MASK(value,nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value)) >#define IGMPV3_EXP(thresh,nbmant,nbexp,value) ((value) < (thresh) ? (value) : ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant))) << (IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp)))) > > > > >#define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) >#define IGMPV3_MRC(value) IGMPV3_EXP(0x80, 4, 3, value) > >extern int ip_check_mc(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u16 proto); >extern int igmp_rcv(struct sk_buff *); >extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); >extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); >extern void ip_mc_drop_socket(struct sock *sk); >extern int ip_mc_source(int add, int omode, struct sock *sk, > struct ip_mreq_source *mreqs, int ifindex); >extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex); >extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, > struct ip_msfilter *optval, int *optlen); >extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, > struct group_filter *optval, int *optlen); >extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); >extern void ip_mr_init(void); >extern void ip_mc_init_dev(struct in_device *); >extern void ip_mc_destroy_dev(struct in_device *); >extern void ip_mc_up(struct in_device *); >extern void ip_mc_down(struct in_device *); >extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); >extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); ># 81 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/netfilter_ipv4.h" 1 > >#define __LINUX_IP_NETFILTER_H > > > > > ># 1 "include/linux/netfilter.h" 1 > >#define __LINUX_NETFILTER_H ># 16 "include/linux/netfilter.h" >#define NF_DROP 0 >#define NF_ACCEPT 1 >#define NF_STOLEN 2 >#define NF_QUEUE 3 >#define NF_REPEAT 4 >#define NF_STOP 5 >#define NF_MAX_VERDICT NF_STOP > > > >#define NF_VERDICT_MASK 0x0000ffff >#define NF_VERDICT_BITS 16 > >#define NF_VERDICT_QMASK 0xffff0000 >#define NF_VERDICT_QBITS 16 > >#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE) ># 374 "include/linux/netfilter.h" >#define NF_HOOK(pf,hook,skb,indev,outdev,okfn) (okfn)(skb) >#define NF_HOOK_COND(pf,hook,skb,indev,outdev,okfn,cond) (okfn)(skb) >static inline __attribute__((always_inline)) int nf_hook_thresh(int pf, unsigned int hook, > struct sk_buff **pskb, > struct net_device *indev, > struct net_device *outdev, > int (*okfn)(struct sk_buff *), int thresh, > int cond) >{ > return okfn(*pskb); >} >static inline __attribute__((always_inline)) int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, > struct net_device *indev, struct net_device *outdev, > int (*okfn)(struct sk_buff *)) >{ > return 1; >} >static inline __attribute__((always_inline)) void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} >struct flowi; >static inline __attribute__((always_inline)) void >nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} ># 9 "include/linux/netfilter_ipv4.h" 2 ># 43 "include/linux/netfilter_ipv4.h" >#define NF_IP_PRE_ROUTING 0 > >#define NF_IP_LOCAL_IN 1 > >#define NF_IP_FORWARD 2 > >#define NF_IP_LOCAL_OUT 3 > >#define NF_IP_POST_ROUTING 4 >#define NF_IP_NUMHOOKS 5 > >enum nf_ip_hook_priorities { > NF_IP_PRI_FIRST = (-((int)(~0U>>1)) - 1), > NF_IP_PRI_CONNTRACK_DEFRAG = -400, > NF_IP_PRI_RAW = -300, > NF_IP_PRI_SELINUX_FIRST = -225, > NF_IP_PRI_CONNTRACK = -200, > NF_IP_PRI_MANGLE = -150, > NF_IP_PRI_NAT_DST = -100, > NF_IP_PRI_FILTER = 0, > NF_IP_PRI_NAT_SRC = 100, > NF_IP_PRI_SELINUX_LAST = 225, > NF_IP_PRI_CONNTRACK_HELPER = ((int)(~0U>>1)) - 2, > NF_IP_PRI_NAT_SEQ_ADJUST = ((int)(~0U>>1)) - 1, > NF_IP_PRI_CONNTRACK_CONFIRM = ((int)(~0U>>1)), > NF_IP_PRI_LAST = ((int)(~0U>>1)), >}; > > > > > >#define SO_ORIGINAL_DST 80 > > >extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); >extern int ip_xfrm_me_harder(struct sk_buff **pskb); >extern __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, > unsigned int dataoff, u_int8_t protocol); ># 82 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/netfilter_bridge.h" 1 > >#define __LINUX_BRIDGE_NETFILTER_H > > > > > > ># 1 "include/linux/if_vlan.h" 1 ># 14 "include/linux/if_vlan.h" >#define _LINUX_IF_VLAN_H_ > > > > >struct vlan_group; >struct net_device; >struct packet_type; >struct vlan_collection; >struct vlan_dev_info; >struct hlist_node; > > > > >#define VLAN_HLEN 4 > > >#define VLAN_ETH_ALEN 6 >#define VLAN_ETH_HLEN 18 >#define VLAN_ETH_ZLEN 64 > > > > >#define VLAN_ETH_DATA_LEN 1500 >#define VLAN_ETH_FRAME_LEN 1518 > >struct vlan_ethhdr { > unsigned char h_dest[6]; > unsigned char h_source[6]; > __be16 h_vlan_proto; > __be16 h_vlan_TCI; > __be16 h_vlan_encapsulated_proto; >}; > > > >static inline __attribute__((always_inline)) struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) >{ > return (struct vlan_ethhdr *)skb->mac.raw; >} > >struct vlan_hdr { > __be16 h_vlan_TCI; > __be16 h_vlan_encapsulated_proto; >}; > >#define VLAN_VID_MASK 0xfff > > >extern void vlan_ioctl_set(int (*hook)(void *)); > >#define VLAN_NAME "vlan" > > > > > >#define VLAN_GROUP_ARRAY_LEN 4096 > >struct vlan_group { > int real_dev_ifindex; > struct hlist_node hlist; > struct net_device *vlan_devices[4096]; > struct rcu_head rcu; >}; > >struct vlan_priority_tci_mapping { > unsigned long priority; > unsigned short vlan_qos; > > > > struct vlan_priority_tci_mapping *next; >}; > > >struct vlan_dev_info { > > > > unsigned long ingress_priority_map[8]; > struct vlan_priority_tci_mapping *egress_priority_map[16]; > > unsigned short vlan_id; > unsigned short flags; > > > > > > > > struct dev_mc_list *old_mc_list; > > > > > int old_allmulti; > int old_promiscuity; > struct net_device *real_dev; > struct proc_dir_entry *dent; > unsigned long cnt_inc_headroom_on_tx; > unsigned long cnt_encap_on_xmit; > struct net_device_stats dev_stats; >}; > >#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv)) > > > >static inline __attribute__((always_inline)) struct net_device_stats *vlan_dev_get_stats(struct net_device *dev) >{ > return &(((struct vlan_dev_info *)(dev->priv))->dev_stats); >} > >static inline __attribute__((always_inline)) __u32 vlan_get_ingress_priority(struct net_device *dev, > unsigned short vlan_tag) >{ > struct vlan_dev_info *vip = ((struct vlan_dev_info *)(dev->priv)); > > return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7]; >} > > >struct vlan_skb_tx_cookie { > u32 magic; > u32 vlan_tag; >}; > >#define VLAN_TX_COOKIE_MAGIC 0x564c414e >#define VLAN_TX_SKB_CB(__skb) ((struct vlan_skb_tx_cookie *)&((__skb)->cb[0])) >#define vlan_tx_tag_present(__skb) (VLAN_TX_SKB_CB(__skb)->magic == VLAN_TX_COOKIE_MAGIC) > >#define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag) > > >static inline __attribute__((always_inline)) int __vlan_hwaccel_rx(struct sk_buff *skb, > struct vlan_group *grp, > unsigned short vlan_tag, int polling) >{ > struct net_device_stats *stats; > > if (skb_bond_should_drop(skb)) { > dev_kfree_skb_any(skb); > return 1; > } > > skb->dev = grp->vlan_devices[vlan_tag & 0xfff]; > if (skb->dev == ((void *)0)) { > dev_kfree_skb_any(skb); > > > > > return 0; > } > > skb->dev->last_rx = jiffies; > > stats = vlan_dev_get_stats(skb->dev); > stats->rx_packets++; > stats->rx_bytes += skb->len; > > skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tag); > switch (skb->pkt_type) { > case 1: > break; > > case 2: > stats->multicast++; > break; > > case 3: > > > > > if (!compare_ether_addr(eth_hdr(skb)->h_dest, > skb->dev->dev_addr)) > skb->pkt_type = 0; > break; > }; > > return (polling ? netif_receive_skb(skb) : netif_rx(skb)); >} > >static inline __attribute__((always_inline)) int vlan_hwaccel_rx(struct sk_buff *skb, > struct vlan_group *grp, > unsigned short vlan_tag) >{ > return __vlan_hwaccel_rx(skb, grp, vlan_tag, 0); >} > >static inline __attribute__((always_inline)) int vlan_hwaccel_receive_skb(struct sk_buff *skb, > struct vlan_group *grp, > unsigned short vlan_tag) >{ > return __vlan_hwaccel_rx(skb, grp, vlan_tag, 1); >} ># 227 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short tag) >{ > struct vlan_ethhdr *veth; > > if (skb_headroom(skb) < 4) { > struct sk_buff *sk_tmp = skb; > skb = skb_realloc_headroom(sk_tmp, 4); > kfree_skb(sk_tmp); > if (!skb) { > printk("<3>" "vlan: failed to realloc headroom\n"); > return ((void *)0); > } > } else { > skb = skb_unshare(skb, ((( gfp_t)0x20u))); > if (!skb) { > printk("<3>" "vlan: failed to unshare skbuff\n"); > return ((void *)0); > } > } > > veth = (struct vlan_ethhdr *)skb_push(skb, 4); > > > memmove(skb->data, skb->data + 4, 2 * 6); > > > veth->h_vlan_proto = (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) ))); > > > veth->h_vlan_TCI = htons(tag); > > skb->protocol = (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) ))); > skb->mac.raw -= 4; > skb->nh.raw -= 4; > > return skb; >} ># 272 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, unsigned short tag) >{ > struct vlan_skb_tx_cookie *cookie; > > cookie = ((struct vlan_skb_tx_cookie *)&((skb)->cb[0])); > cookie->magic = 0x564c414e; > cookie->vlan_tag = tag; > > return skb; >} > >#define HAVE_VLAN_PUT_TAG ># 293 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) struct sk_buff *vlan_put_tag(struct sk_buff *skb, unsigned short tag) >{ > if (skb->dev->features & 128) { > return __vlan_hwaccel_put_tag(skb, tag); > } else { > return __vlan_put_tag(skb, tag); > } >} ># 309 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) >{ > struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; > > if (veth->h_vlan_proto != (( __be16)((__u16)( (((__u16)((0x8100)) & (__u16)0x00ffU) << 8) | (((__u16)((0x8100)) & (__u16)0xff00U) >> 8) )))) { > return -22; > } > > *tag = ntohs(veth->h_vlan_TCI); > > return 0; >} ># 329 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) int __vlan_hwaccel_get_tag(struct sk_buff *skb, unsigned short *tag) >{ > struct vlan_skb_tx_cookie *cookie; > > cookie = ((struct vlan_skb_tx_cookie *)&((skb)->cb[0])); > if (cookie->magic == 0x564c414e) { > *tag = cookie->vlan_tag; > return 0; > } else { > *tag = 0; > return -22; > } >} > >#define HAVE_VLAN_GET_TAG ># 352 "include/linux/if_vlan.h" >static inline __attribute__((always_inline)) int vlan_get_tag(struct sk_buff *skb, unsigned short *tag) >{ > if (skb->dev->features & 128) { > return __vlan_hwaccel_get_tag(skb, tag); > } else { > return __vlan_get_tag(skb, tag); > } >} > > > > > > >enum vlan_ioctl_cmds { > ADD_VLAN_CMD, > DEL_VLAN_CMD, > SET_VLAN_INGRESS_PRIORITY_CMD, > SET_VLAN_EGRESS_PRIORITY_CMD, > GET_VLAN_INGRESS_PRIORITY_CMD, > GET_VLAN_EGRESS_PRIORITY_CMD, > SET_VLAN_NAME_TYPE_CMD, > SET_VLAN_FLAG_CMD, > GET_VLAN_REALDEV_NAME_CMD, > GET_VLAN_VID_CMD >}; > >enum vlan_name_types { > VLAN_NAME_TYPE_PLUS_VID, > VLAN_NAME_TYPE_RAW_PLUS_VID, > VLAN_NAME_TYPE_PLUS_VID_NO_PAD, > VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, > VLAN_NAME_TYPE_HIGHEST >}; > >struct vlan_ioctl_args { > int cmd; > char device1[24]; > > union { > char device2[24]; > int VID; > unsigned int skb_priority; > unsigned int name_type; > unsigned int bind_type; > unsigned int flag; > } u; > > short vlan_qos; >}; ># 10 "include/linux/netfilter_bridge.h" 2 > > > >#define NF_BR_PRE_ROUTING 0 > >#define NF_BR_LOCAL_IN 1 > >#define NF_BR_FORWARD 2 > >#define NF_BR_LOCAL_OUT 3 > >#define NF_BR_POST_ROUTING 4 > >#define NF_BR_BROUTING 5 >#define NF_BR_NUMHOOKS 6 > > > >enum nf_br_hook_priorities { > NF_BR_PRI_FIRST = (-((int)(~0U>>1)) - 1), > NF_BR_PRI_NAT_DST_BRIDGED = -300, > NF_BR_PRI_FILTER_BRIDGED = -200, > NF_BR_PRI_BRNF = 0, > NF_BR_PRI_NAT_DST_OTHER = 100, > NF_BR_PRI_FILTER_OTHER = 200, > NF_BR_PRI_NAT_SRC = 300, > NF_BR_PRI_LAST = ((int)(~0U>>1)), >}; ># 72 "include/linux/netfilter_bridge.h" >#define nf_bridge_maybe_copy_header(skb) (0) >#define nf_bridge_pad(skb) (0) ># 83 "net/ipv4/ip_output.c" 2 ># 1 "include/linux/mroute.h" 1 > >#define __LINUX_MROUTE_H ># 18 "include/linux/mroute.h" >#define MRT_BASE 200 >#define MRT_INIT (MRT_BASE) >#define MRT_DONE (MRT_BASE+1) >#define MRT_ADD_VIF (MRT_BASE+2) >#define MRT_DEL_VIF (MRT_BASE+3) >#define MRT_ADD_MFC (MRT_BASE+4) >#define MRT_DEL_MFC (MRT_BASE+5) >#define MRT_VERSION (MRT_BASE+6) >#define MRT_ASSERT (MRT_BASE+7) >#define MRT_PIM (MRT_BASE+8) > >#define SIOCGETVIFCNT SIOCPROTOPRIVATE >#define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) >#define SIOCGETRPF (SIOCPROTOPRIVATE+2) > >#define MAXVIFS 32 >typedef unsigned long vifbitmap_t; >typedef unsigned short vifi_t; >#define ALL_VIFS ((vifi_t)(-1)) > > > > > >#define VIFM_SET(n,m) ((m)|=(1<<(n))) >#define VIFM_CLR(n,m) ((m)&=~(1<<(n))) >#define VIFM_ISSET(n,m) ((m)&(1<<(n))) >#define VIFM_CLRALL(m) ((m)=0) >#define VIFM_COPY(mfrom,mto) ((mto)=(mfrom)) >#define VIFM_SAME(m1,m2) ((m1)==(m2)) > > > > > > >struct vifctl { > vifi_t vifc_vifi; > unsigned char vifc_flags; > unsigned char vifc_threshold; > unsigned int vifc_rate_limit; > struct in_addr vifc_lcl_addr; > struct in_addr vifc_rmt_addr; >}; > >#define VIFF_TUNNEL 0x1 >#define VIFF_SRCRT 0x2 >#define VIFF_REGISTER 0x4 > > > > > >struct mfcctl >{ > struct in_addr mfcc_origin; > struct in_addr mfcc_mcastgrp; > vifi_t mfcc_parent; > unsigned char mfcc_ttls[32]; > unsigned int mfcc_pkt_cnt; > unsigned int mfcc_byte_cnt; > unsigned int mfcc_wrong_if; > int mfcc_expire; >}; > > > > > >struct sioc_sg_req >{ > struct in_addr src; > struct in_addr grp; > unsigned long pktcnt; > unsigned long bytecnt; > unsigned long wrong_if; >}; > > > > > >struct sioc_vif_req >{ > vifi_t vifi; > unsigned long icount; > unsigned long ocount; > unsigned long ibytes; > unsigned long obytes; >}; > > > > > > >struct igmpmsg >{ > __u32 unused1,unused2; > unsigned char im_msgtype; > unsigned char im_mbz; > unsigned char im_vif; > unsigned char unused3; > struct in_addr im_src,im_dst; >}; ># 131 "include/linux/mroute.h" >extern int ip_mroute_setsockopt(struct sock *, int, char *, int); >extern int ip_mroute_getsockopt(struct sock *, int, char *, int *); >extern int ipmr_ioctl(struct sock *sk, int cmd, void *arg); >extern void ip_mr_init(void); > > >struct vif_device >{ > struct net_device *dev; > unsigned long bytes_in,bytes_out; > unsigned long pkt_in,pkt_out; > unsigned long rate_limit; > unsigned char threshold; > unsigned short flags; > __be32 local,remote; > int link; >}; > >#define VIFF_STATIC 0x8000 > >struct mfc_cache >{ > struct mfc_cache *next; > __be32 mfc_mcastgrp; > __be32 mfc_origin; > vifi_t mfc_parent; > int mfc_flags; > > union { > struct { > unsigned long expires; > struct sk_buff_head unresolved; > } unres; > struct { > unsigned long last_assert; > int minvif; > int maxvif; > unsigned long bytes; > unsigned long pkt; > unsigned long wrong_if; > unsigned char ttls[32]; > } res; > } mfc_un; >}; > >#define MFC_STATIC 1 >#define MFC_NOTIFY 2 > >#define MFC_LINES 64 > > > > >#define MFC_HASH(a,b) ((((__force u32)(__be32)a)^(((__force u32)(__be32)b)>>2))&(MFC_LINES-1)) > > > > > >#define MFC_ASSERT_THRESH (3*HZ) > > > > > >#define IGMPMSG_NOCACHE 1 >#define IGMPMSG_WRONGVIF 2 >#define IGMPMSG_WHOLEPKT 3 > > > >#define PIM_V1_VERSION __constant_htonl(0x10000000) >#define PIM_V1_REGISTER 1 > >#define PIM_VERSION 2 >#define PIM_REGISTER 1 > >#define PIM_NULL_REGISTER __constant_htonl(0x40000000) > > > >struct pimreghdr >{ > __u8 type; > __u8 reserved; > __be16 csum; > __be32 flags; >}; > >extern int pim_rcv_v1(struct sk_buff *); > >struct rtmsg; >extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); ># 84 "net/ipv4/ip_output.c" 2 > > > >int sysctl_ip_default_ttl = 64; > > >void ip_send_check(struct iphdr *iph) >{ > iph->check = 0; > iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); >} > > >static int ip_dev_loopback_xmit(struct sk_buff *newskb) >{ > newskb->mac.raw = newskb->data; > __skb_pull(newskb, newskb->nh.raw - newskb->data); > newskb->pkt_type = 5; > newskb->ip_summed = 2; > do { if (__builtin_expect(!!(!(newskb->dst)), 0)) { printk("<3>" "KERNEL: assertion (%s) failed at %s (%d)\n", "newskb->dst", "net/ipv4/ip_output.c" , 103); } } while(0); > netif_rx(newskb); > return 0; >} > >static inline __attribute__((always_inline)) int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst) >{ > int ttl = inet->uc_ttl; > > if (ttl < 0) > ttl = dst_metric(dst, RTAX_HOPLIMIT); > return ttl; >} > > > > > >int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, > __be32 saddr, __be32 daddr, struct ip_options *opt) >{ > struct inet_sock *inet = inet_sk(sk); > struct rtable *rt = (struct rtable *)skb->dst; > struct iphdr *iph; > > > if (opt) > iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr) + opt->optlen); > else > iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); > > iph->version = 4; > iph->ihl = 5; > iph->tos = inet->tos; > if (ip_dont_fragment(sk, &rt->u.dst)) > iph->frag_off = htons(0x4000); > else > iph->frag_off = 0; > iph->ttl = ip_select_ttl(inet, &rt->u.dst); > iph->daddr = rt->rt_dst; > iph->saddr = rt->rt_src; > iph->protocol = sk->sk_protocol; > iph->tot_len = htons(skb->len); > ip_select_ident(iph, &rt->u.dst, sk); > skb->nh.iph = iph; > > if (opt && opt->optlen) { > iph->ihl += opt->optlen>>2; > ip_options_build(skb, opt, daddr, rt, 0); > } > ip_send_check(iph); > > skb->priority = sk->sk_priority; > > > return (dst_output)(skb); > >} > >extern typeof(ip_build_and_send_pkt) ip_build_and_send_pkt; extern void *__crc_ip_build_and_send_pkt __attribute__((weak)); static const unsigned long __kcrctab_ip_build_and_send_pkt __attribute__((__used__)) __attribute__((section("__kcrctab" "_gpl"), unused)) = (unsigned long) &__crc_ip_build_and_send_pkt; static const char __kstrtab_ip_build_and_send_pkt[] __attribute__((section("__ksymtab_strings"))) = "" "ip_build_and_send_pkt"; static const struct kernel_symbol __ksymtab_ip_build_and_send_pkt __attribute__((__used__)) __attribute__((section("__ksymtab" "_gpl"), unused)) = { (unsigned long)&ip_build_and_send_pkt, __kstrtab_ip_build_and_send_pkt }; > >static inline __attribute__((always_inline)) int ip_finish_output2(struct sk_buff *skb) >{ > struct dst_entry *dst = skb->dst; > struct net_device *dev = dst->dev; > int hh_len = (((dev)->hard_header_len&~(16 - 1)) + 16); > > > if (__builtin_expect(!!(skb_headroom(skb) < hh_len && dev->hard_header), 0)) { > struct sk_buff *skb2; > > skb2 = skb_realloc_headroom(skb, (((dev)->hard_header_len&~(16 - 1)) + 16)); > if (skb2 == ((void *)0)) { > kfree_skb(skb); > return -12; > } > if (skb->sk) > skb_set_owner_w(skb2, skb->sk); > kfree_skb(skb); > skb = skb2; > } > > if (dst->hh) > return neigh_hh_output(dst->hh, skb); > else if (dst->neighbour) > return dst->neighbour->output(skb); > > if (net_ratelimit()) > printk("<7>" "ip_finish_output2: No header cache and no neighbour!\n"); > kfree_skb(skb); > return -22; >} > >static inline __attribute__((always_inline)) int ip_finish_output(struct sk_buff *skb) >{ > > > > > > > > if (skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb)) > return ip_fragment(skb, ip_finish_output2); > else > return ip_finish_output2(skb); >} > >int ip_mc_output(struct sk_buff *skb) >{ > struct sock *sk = skb->sk; > struct rtable *rt = (struct rtable*)skb->dst; > struct net_device *dev = rt->u.dst.dev; > > > > > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTREQUESTS]++); > > skb->dev = dev; > skb->protocol = htons(0x0800); > > > > > > if (rt->rt_flags&0x20000000) { > if ((!sk || inet_sk(sk)->mc_loop) ># 240 "net/ipv4/ip_output.c" > && ((rt->rt_flags&0x80000000) || !(((struct inet_skb_parm*)((skb)->cb))->flags&1)) > > ) { > struct sk_buff *newskb = skb_clone(skb, ((( gfp_t)0x20u))); > if (newskb) > (ip_dev_loopback_xmit)(newskb); > > > } > > > > if (skb->nh.iph->ttl == 0) { > kfree_skb(skb); > return 0; > } > } > > if (rt->rt_flags&0x10000000) { > struct sk_buff *newskb = skb_clone(skb, ((( gfp_t)0x20u))); > if (newskb) > (ip_dev_loopback_xmit)(newskb); > > } > > return (ip_finish_output)(skb); > > >} > >int ip_output(struct sk_buff *skb) >{ > struct net_device *dev = skb->dst->dev; > > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTREQUESTS]++); > > skb->dev = dev; > skb->protocol = htons(0x0800); > > return (ip_finish_output)(skb); > > >} > >int ip_queue_xmit(struct sk_buff *skb, struct sock *sk, int ipfragok) >{ > struct inet_sock *inet = inet_sk(sk); > struct ip_options *opt = inet->opt; > struct rtable *rt; > struct iphdr *iph; > > > > > rt = (struct rtable *) skb->dst; > if (rt != ((void *)0)) > goto packet_routed; > > > rt = (struct rtable *)__sk_dst_check(sk, 0); > if (rt == ((void *)0)) { > __be32 daddr; > > > daddr = inet->daddr; > if(opt && opt->srr) > daddr = opt->faddr; > > { > struct flowi fl = { .oif = sk->__sk_common.skc_bound_dev_if, > .nl_u = { .ip4_u = > { .daddr = daddr, > .saddr = inet->saddr, > .tos = (((inet_sk(sk)->tos)&0x1E) | sock_flag(sk, SOCK_LOCALROUTE)) } }, > .proto = sk->sk_protocol, > .uli_u = { .ports = > { .sport = inet->sport, > .dport = inet->dport } } }; > > > > > > security_sk_classify_flow(sk, &fl); > if (ip_route_output_flow(&rt, &fl, sk, 0)) > goto no_route; > } > sk_setup_caps(sk, &rt->u.dst); > } > skb->dst = dst_clone(&rt->u.dst); > >packet_routed: > if (opt && opt->is_strictroute && rt->rt_dst != rt->rt_gateway) > goto no_route; > > > iph = (struct iphdr *) skb_push(skb, sizeof(struct iphdr) + (opt ? opt->optlen : 0)); > *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); > iph->tot_len = htons(skb->len); > if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok) > iph->frag_off = htons(0x4000); > else > iph->frag_off = 0; > iph->ttl = ip_select_ttl(inet, &rt->u.dst); > iph->protocol = sk->sk_protocol; > iph->saddr = rt->rt_src; > iph->daddr = rt->rt_dst; > skb->nh.iph = iph; > > > if (opt && opt->optlen) { > iph->ihl += opt->optlen >> 2; > ip_options_build(skb, opt, inet->daddr, rt, 0); > } > > ip_select_ident_more(iph, &rt->u.dst, sk, > (((struct skb_shared_info *)((skb)->end))->gso_segs ?: 1) - 1); > > > ip_send_check(iph); > > skb->priority = sk->sk_priority; > > return (dst_output)(skb); > > >no_route: > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTNOROUTES]++); > kfree_skb(skb); > return -113; >} > > >static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) >{ > to->pkt_type = from->pkt_type; > to->priority = from->priority; > to->protocol = from->protocol; > dst_release(to->dst); > to->dst = dst_clone(from->dst); > to->dev = from->dev; > to->mark = from->mark; > > > ((struct inet_skb_parm*)((to)->cb))->flags = ((struct inet_skb_parm*)((from)->cb))->flags; ># 404 "net/ipv4/ip_output.c" > skb_copy_secmark(to, from); >} ># 414 "net/ipv4/ip_output.c" >int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) >{ > struct iphdr *iph; > int raw = 0; > int ptr; > struct net_device *dev; > struct sk_buff *skb2; > unsigned int mtu, hlen, left, len, ll_rs, pad; > int offset; > __be16 not_last_frag; > struct rtable *rt = (struct rtable*)skb->dst; > int err = 0; > > dev = rt->u.dst.dev; > > > > > > iph = skb->nh.iph; > > if (__builtin_expect(!!((iph->frag_off & htons(0x4000)) && !skb->local_df), 0)) { > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++); > icmp_send(skb, 3, 4, > htonl(dst_mtu(&rt->u.dst))); > kfree_skb(skb); > return -90; > } > > > > > > hlen = iph->ihl * 4; > mtu = dst_mtu(&rt->u.dst) - hlen; > ((struct inet_skb_parm*)((skb)->cb))->flags |= 8; ># 458 "net/ipv4/ip_output.c" > if (((struct skb_shared_info *)((skb)->end))->frag_list) { > struct sk_buff *frag; > int first_len = skb_pagelen(skb); > > if (first_len - hlen > mtu || > ((first_len - hlen) & 7) || > (iph->frag_off & htons(0x2000|0x1FFF)) || > skb_cloned(skb)) > goto slow_path; > > for (frag = ((struct skb_shared_info *)((skb)->end))->frag_list; frag; frag = frag->next) { > > if (frag->len > mtu || > ((frag->len & 7) && frag->next) || > skb_headroom(frag) < hlen) > goto slow_path; > > > if (skb_shared(frag)) > goto slow_path; > > do { if (__builtin_expect(!!((frag->sk)!=0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("net/ipv4/ip_output.c"), "i" (479), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); } while(0); > if (skb->sk) { > sock_hold(skb->sk); > frag->sk = skb->sk; > frag->destructor = sock_wfree; > skb->truesize -= frag->truesize; > } > } > > > > err = 0; > offset = 0; > frag = ((struct skb_shared_info *)((skb)->end))->frag_list; > ((struct skb_shared_info *)((skb)->end))->frag_list = ((void *)0); > skb->data_len = first_len - skb_headlen(skb); > skb->len = first_len; > iph->tot_len = htons(first_len); > iph->frag_off = htons(0x2000); > ip_send_check(iph); > > for (;;) { > > > if (frag) { > frag->ip_summed = 0; > frag->h.raw = frag->data; > frag->nh.raw = __skb_push(frag, hlen); > (__builtin_constant_p(hlen) ? __constant_memcpy((frag->nh.raw),(iph),(hlen)) : __memcpy((frag->nh.raw),(iph),(hlen))); > iph = frag->nh.iph; > iph->tot_len = htons(frag->len); > ip_copy_metadata(frag, skb); > if (offset == 0) > ip_options_fragment(frag); > offset += skb->len - hlen; > iph->frag_off = htons(offset>>3); > if (frag->next != ((void *)0)) > iph->frag_off |= htons(0x2000); > > ip_send_check(iph); > } > > err = output(skb); > > if (!err) > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGCREATES]++); > if (err || !frag) > break; > > skb = frag; > frag = skb->next; > skb->next = ((void *)0); > } > > if (err == 0) { > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGOKS]++); > return 0; > } > > while (frag) { > skb = frag->next; > kfree_skb(frag); > frag = skb; > } > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++); > return err; > } > >slow_path: > left = skb->len - hlen; > ptr = raw + hlen; > > > > > pad = (0); > ll_rs = ((((rt->u.dst.dev)->hard_header_len+pad)&~(16 - 1)) + 16); > mtu -= pad; > > > > > > offset = (ntohs(iph->frag_off) & 0x1FFF) << 3; > not_last_frag = iph->frag_off & htons(0x2000); > > > > > > while(left > 0) { > len = left; > > if (len > mtu) > len = mtu; > > > if (len < left) { > len &= ~7; > } > > > > > if ((skb2 = alloc_skb(len+hlen+ll_rs, ((( gfp_t)0x20u)))) == ((void *)0)) { > do { } while (0); > err = -12; > goto fail; > } > > > > > > ip_copy_metadata(skb2, skb); > skb_reserve(skb2, ll_rs); > skb_put(skb2, len + hlen); > skb2->nh.raw = skb2->data; > skb2->h.raw = skb2->data + hlen; > > > > > > > if (skb->sk) > skb_set_owner_w(skb2, skb->sk); > > > > > > (__builtin_constant_p(hlen) ? __constant_memcpy((skb2->nh.raw),(skb->data),(hlen)) : __memcpy((skb2->nh.raw),(skb->data),(hlen))); > > > > > if (skb_copy_bits(skb, ptr, skb2->h.raw, len)) > do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("net/ipv4/ip_output.c"), "i" (617), "i" (sizeof(struct bug_entry))); for(;;) ; } while(0); > left -= len; > > > > > iph = skb2->nh.iph; > iph->frag_off = htons((offset >> 3)); > > > > > > > > if (offset == 0) > ip_options_fragment(skb); > > > > > > if (left > 0 || not_last_frag) > iph->frag_off |= htons(0x2000); > ptr += len; > offset += len; > > > > > iph->tot_len = htons(len + hlen); > > ip_send_check(iph); > > err = output(skb2); > if (err) > goto fail; > > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGCREATES]++); > } > kfree_skb(skb); > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGOKS]++); > return err; > >fail: > kfree_skb(skb); > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_FRAGFAILS]++); > return err; >} > >extern typeof(ip_fragment) ip_fragment; extern void *__crc_ip_fragment __attribute__((weak)); static const unsigned long __kcrctab_ip_fragment __attribute__((__used__)) __attribute__((section("__kcrctab" ""), unused)) = (unsigned long) &__crc_ip_fragment; static const char __kstrtab_ip_fragment[] __attribute__((section("__ksymtab_strings"))) = "" "ip_fragment"; static const struct kernel_symbol __ksymtab_ip_fragment __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_fragment, __kstrtab_ip_fragment }; > >int >ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb) >{ > struct iovec *iov = from; > > if (skb->ip_summed == 1) { > if (memcpy_fromiovecend(to, iov, offset, len) < 0) > return -14; > } else { > __wsum csum = 0; > if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0) > return -14; > skb->csum = csum_block_add(skb->csum, csum, odd); > } > return 0; >} > >static inline __attribute__((always_inline)) __wsum >csum_page(struct page *page, int offset, int copy) >{ > char *kaddr; > __wsum csum; > kaddr = kmap(page); > csum = csum_partial(kaddr + offset, copy, 0); > do { (void) (page); } while (0); > return csum; >} > >static inline __attribute__((always_inline)) int ip_ufo_append_data(struct sock *sk, > int getfrag(void *from, char *to, int offset, int len, > int odd, struct sk_buff *skb), > void *from, int length, int hh_len, int fragheaderlen, > int transhdrlen, int mtu,unsigned int flags) >{ > struct sk_buff *skb; > int err; > > > > > > if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0)) { > skb = sock_alloc_send_skb(sk, > hh_len + fragheaderlen + transhdrlen + 20, > (flags & 0x40), &err); > > if (skb == ((void *)0)) > return err; > > > skb_reserve(skb, hh_len); > > > skb_put(skb,fragheaderlen + transhdrlen); > > > skb->nh.raw = skb->data; > > > skb->h.raw = skb->data + fragheaderlen; > > skb->ip_summed = 1; > skb->csum = 0; > sk->sk_sndmsg_off = 0; > } > > err = skb_append_datato_frags(sk,skb, getfrag, from, > (length - transhdrlen)); > if (!err) { > > ((struct skb_shared_info *)((skb)->end))->gso_size = mtu - fragheaderlen; > ((struct skb_shared_info *)((skb)->end))->gso_type = SKB_GSO_UDP; > __skb_queue_tail(&sk->sk_write_queue, skb); > > return 0; > } > > > > kfree_skb(skb); > return err; >} ># 763 "net/ipv4/ip_output.c" >int ip_append_data(struct sock *sk, > int getfrag(void *from, char *to, int offset, int len, > int odd, struct sk_buff *skb), > void *from, int length, int transhdrlen, > struct ipcm_cookie *ipc, struct rtable *rt, > unsigned int flags) >{ > struct inet_sock *inet = inet_sk(sk); > struct sk_buff *skb; > > struct ip_options *opt = ((void *)0); > int hh_len; > int exthdrlen; > int mtu; > int copy; > int err; > int offset = 0; > unsigned int maxfraglen, fragheaderlen; > int csummode = 0; > > if (flags&0x10) > return 0; > > if (skb_queue_empty(&sk->sk_write_queue)) { > > > > opt = ipc->opt; > if (opt) { > if (inet->cork.opt == ((void *)0)) { > inet->cork.opt = kmalloc(sizeof(struct ip_options) + 40, sk->sk_allocation); > if (__builtin_expect(!!(inet->cork.opt == ((void *)0)), 0)) > return -105; > } > (__builtin_constant_p(sizeof(struct ip_options)+opt->optlen) ? __constant_memcpy((inet->cork.opt),(opt),(sizeof(struct ip_options)+opt->optlen)) : __memcpy((inet->cork.opt),(opt),(sizeof(struct ip_options)+opt->optlen))); > inet->cork.flags |= 1; > inet->cork.addr = ipc->addr; > } > dst_hold(&rt->u.dst); > inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path); > inet->cork.rt = rt; > inet->cork.length = 0; > sk->sk_sndmsg_page = ((void *)0); > sk->sk_sndmsg_off = 0; > if ((exthdrlen = rt->u.dst.header_len) != 0) { > length += exthdrlen; > transhdrlen += exthdrlen; > } > } else { > rt = inet->cork.rt; > if (inet->cork.flags & 1) > opt = inet->cork.opt; > > transhdrlen = 0; > exthdrlen = 0; > mtu = inet->cork.fragsize; > } > hh_len = (((rt->u.dst.dev)->hard_header_len&~(16 - 1)) + 16); > > fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); > maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen; > > if (inet->cork.length + length > 0xFFFF - fragheaderlen) { > ip_local_error(sk, 90, rt->rt_dst, inet->dport, mtu-exthdrlen); > return -90; > } > > > > > > if (transhdrlen && > length + fragheaderlen <= mtu && > rt->u.dst.dev->features & (2 | (4 | 8)) && > !exthdrlen) > csummode = 1; > > inet->cork.length += length; > if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && > (rt->u.dst.dev->features & (SKB_GSO_UDP << 16))) { > > err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, > fragheaderlen, transhdrlen, mtu, > flags); > if (err) > goto error; > return 0; > } ># 859 "net/ipv4/ip_output.c" > if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0)) > goto alloc_new_skb; > > while (length > 0) { > > copy = mtu - skb->len; > if (copy < length) > copy = maxfraglen - skb->len; > if (copy <= 0) { > char *data; > unsigned int datalen; > unsigned int fraglen; > unsigned int fraggap; > unsigned int alloclen; > struct sk_buff *skb_prev; >alloc_new_skb: > skb_prev = skb; > if (skb_prev) > fraggap = skb_prev->len - maxfraglen; > else > fraggap = 0; > > > > > > datalen = length + fraggap; > if (datalen > mtu - fragheaderlen) > datalen = maxfraglen - fragheaderlen; > fraglen = datalen + fragheaderlen; > > if ((flags & 0x8000) && > !(rt->u.dst.dev->features&1)) > alloclen = mtu; > else > alloclen = datalen + fragheaderlen; > > > > > > > if (datalen == length + fraggap) > alloclen += rt->u.dst.trailer_len; > > if (transhdrlen) { > skb = sock_alloc_send_skb(sk, > alloclen + hh_len + 15, > (flags & 0x40), &err); > } else { > skb = ((void *)0); > if (((&sk->sk_wmem_alloc)->counter) <= > 2 * sk->sk_sndbuf) > skb = sock_wmalloc(sk, > alloclen + hh_len + 15, 1, > sk->sk_allocation); > if (__builtin_expect(!!(skb == ((void *)0)), 0)) > err = -105; > } > if (skb == ((void *)0)) > goto error; > > > > > skb->ip_summed = csummode; > skb->csum = 0; > skb_reserve(skb, hh_len); > > > > > data = skb_put(skb, fraglen); > skb->nh.raw = data + exthdrlen; > data += fragheaderlen; > skb->h.raw = data + exthdrlen; > > if (fraggap) { > skb->csum = skb_copy_and_csum_bits( > skb_prev, maxfraglen, > data + transhdrlen, fraggap, 0); > skb_prev->csum = csum_sub(skb_prev->csum, > skb->csum); > data += fraggap; > pskb_trim_unique(skb_prev, maxfraglen); > } > > copy = datalen - transhdrlen - fraggap; > if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, fraggap, skb) < 0) { > err = -14; > kfree_skb(skb); > goto error; > } > > offset += copy; > length -= datalen - fraggap; > transhdrlen = 0; > exthdrlen = 0; > csummode = 0; > > > > > __skb_queue_tail(&sk->sk_write_queue, skb); > continue; > } > > if (copy > length) > copy = length; > > if (!(rt->u.dst.dev->features&1)) { > unsigned int off; > > off = skb->len; > if (getfrag(from, skb_put(skb, copy), > offset, copy, off, skb) < 0) { > __skb_trim(skb, off); > err = -14; > goto error; > } > } else { > int i = ((struct skb_shared_info *)((skb)->end))->nr_frags; > skb_frag_t *frag = &((struct skb_shared_info *)((skb)->end))->frags[i-1]; > struct page *page = sk->sk_sndmsg_page; > int off = sk->sk_sndmsg_off; > unsigned int left; > > if (page && (left = (1UL << 12) - off) > 0) { > if (copy >= left) > copy = left; > if (page != frag->page) { > if (i == (65536/(1UL << 12) + 2)) { > err = -90; > goto error; > } > get_page(page); > skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0); > frag = &((struct skb_shared_info *)((skb)->end))->frags[i]; > } > } else if (i < (65536/(1UL << 12) + 2)) { > if (copy > (1UL << 12)) > copy = (1UL << 12); > page = alloc_pages_node(((0)), sk->sk_allocation, 0); > if (page == ((void *)0)) { > err = -12; > goto error; > } > sk->sk_sndmsg_page = page; > sk->sk_sndmsg_off = 0; > > skb_fill_page_desc(skb, i, page, 0, 0); > frag = &((struct skb_shared_info *)((skb)->end))->frags[i]; > skb->truesize += (1UL << 12); > atomic_add((1UL << 12), &sk->sk_wmem_alloc); > } else { > err = -90; > goto error; > } > if (getfrag(from, lowmem_page_address(frag->page)+frag->page_offset+frag->size, offset, copy, skb->len, skb) < 0) { > err = -14; > goto error; > } > sk->sk_sndmsg_off += copy; > frag->size += copy; > skb->len += copy; > skb->data_len += copy; > } > offset += copy; > length -= copy; > } > > return 0; > >error: > inet->cork.length -= length; > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++); > return err; >} > >ssize_t ip_append_page(struct sock *sk, struct page *page, > int offset, size_t size, int flags) >{ > struct inet_sock *inet = inet_sk(sk); > struct sk_buff *skb; > struct rtable *rt; > struct ip_options *opt = ((void *)0); > int hh_len; > int mtu; > int len; > int err; > unsigned int maxfraglen, fragheaderlen, fraggap; > > if (inet->hdrincl) > return -1; > > if (flags&0x10) > return 0; > > if (skb_queue_empty(&sk->sk_write_queue)) > return -22; > > rt = inet->cork.rt; > if (inet->cork.flags & 1) > opt = inet->cork.opt; > > if (!(rt->u.dst.dev->features&1)) > return -95; > > hh_len = (((rt->u.dst.dev)->hard_header_len&~(16 - 1)) + 16); > mtu = inet->cork.fragsize; > > fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); > maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen; > > if (inet->cork.length + size > 0xFFFF - fragheaderlen) { > ip_local_error(sk, 90, rt->rt_dst, inet->dport, mtu); > return -90; > } > > if ((skb = skb_peek_tail(&sk->sk_write_queue)) == ((void *)0)) > return -22; > > inet->cork.length += size; > if ((sk->sk_protocol == IPPROTO_UDP) && > (rt->u.dst.dev->features & (SKB_GSO_UDP << 16))) { > ((struct skb_shared_info *)((skb)->end))->gso_size = mtu - fragheaderlen; > ((struct skb_shared_info *)((skb)->end))->gso_type = SKB_GSO_UDP; > } > > > while (size > 0) { > int i; > > if (skb_is_gso(skb)) > len = size; > else { > > > len = mtu - skb->len; > if (len < size) > len = maxfraglen - skb->len; > } > if (len <= 0) { > struct sk_buff *skb_prev; > char *data; > struct iphdr *iph; > int alloclen; > > skb_prev = skb; > fraggap = skb_prev->len - maxfraglen; > > alloclen = fragheaderlen + hh_len + fraggap + 15; > skb = sock_wmalloc(sk, alloclen, 1, sk->sk_allocation); > if (__builtin_expect(!!(!skb), 0)) { > err = -105; > goto error; > } > > > > > skb->ip_summed = 0; > skb->csum = 0; > skb_reserve(skb, hh_len); > > > > > data = skb_put(skb, fragheaderlen + fraggap); > skb->nh.iph = iph = (struct iphdr *)data; > data += fragheaderlen; > skb->h.raw = data; > > if (fraggap) { > skb->csum = skb_copy_and_csum_bits( > skb_prev, maxfraglen, > data, fraggap, 0); > skb_prev->csum = csum_sub(skb_prev->csum, > skb->csum); > pskb_trim_unique(skb_prev, maxfraglen); > } > > > > > __skb_queue_tail(&sk->sk_write_queue, skb); > continue; > } > > i = ((struct skb_shared_info *)((skb)->end))->nr_frags; > if (len > size) > len = size; > if (skb_can_coalesce(skb, i, page, offset)) { > ((struct skb_shared_info *)((skb)->end))->frags[i-1].size += len; > } else if (i < (65536/(1UL << 12) + 2)) { > get_page(page); > skb_fill_page_desc(skb, i, page, offset, len); > } else { > err = -90; > goto error; > } > > if (skb->ip_summed == 0) { > __wsum csum; > csum = csum_page(page, offset, len); > skb->csum = csum_block_add(skb->csum, csum, skb->len); > } > > skb->len += len; > skb->data_len += len; > offset += len; > size -= len; > } > return 0; > >error: > inet->cork.length -= size; > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++); > return err; >} > > > > > >int ip_push_pending_frames(struct sock *sk) >{ > struct sk_buff *skb, *tmp_skb; > struct sk_buff **tail_skb; > struct inet_sock *inet = inet_sk(sk); > struct ip_options *opt = ((void *)0); > struct rtable *rt = inet->cork.rt; > struct iphdr *iph; > __be16 df = 0; > __u8 ttl; > int err = 0; > > if ((skb = __skb_dequeue(&sk->sk_write_queue)) == ((void *)0)) > goto out; > tail_skb = &(((struct skb_shared_info *)((skb)->end))->frag_list); > > > if (skb->data < skb->nh.raw) > __skb_pull(skb, skb->nh.raw - skb->data); > while ((tmp_skb = __skb_dequeue(&sk->sk_write_queue)) != ((void *)0)) { > __skb_pull(tmp_skb, skb->h.raw - skb->nh.raw); > *tail_skb = tmp_skb; > tail_skb = &(tmp_skb->next); > skb->len += tmp_skb->len; > skb->data_len += tmp_skb->len; > skb->truesize += tmp_skb->truesize; > __sock_put(tmp_skb->sk); > tmp_skb->destructor = ((void *)0); > tmp_skb->sk = ((void *)0); > } > > > > > > if (inet->pmtudisc != 2) > skb->local_df = 1; > > > > > if (inet->pmtudisc == 2 || > (skb->len <= dst_mtu(&rt->u.dst) && > ip_dont_fragment(sk, &rt->u.dst))) > df = htons(0x4000); > > if (inet->cork.flags & 1) > opt = inet->cork.opt; > > if (rt->rt_type == RTN_MULTICAST) > ttl = inet->mc_ttl; > else > ttl = ip_select_ttl(inet, &rt->u.dst); > > iph = (struct iphdr *)skb->data; > iph->version = 4; > iph->ihl = 5; > if (opt) { > iph->ihl += opt->optlen>>2; > ip_options_build(skb, opt, inet->cork.addr, rt, 0); > } > iph->tos = inet->tos; > iph->tot_len = htons(skb->len); > iph->frag_off = df; > ip_select_ident(iph, &rt->u.dst, sk); > iph->ttl = ttl; > iph->protocol = sk->sk_protocol; > iph->saddr = rt->rt_src; > iph->daddr = rt->rt_dst; > ip_send_check(iph); > > skb->priority = sk->sk_priority; > skb->dst = dst_clone(&rt->u.dst); > > > err = (dst_output)(skb); > > if (err) { > if (err > 0) > err = inet->recverr ? ((err) != 2 ? -105 : 0) : 0; > if (err) > goto error; > } > >out: > inet->cork.flags &= ~1; > kfree(inet->cork.opt); > inet->cork.opt = ((void *)0); > if (inet->cork.rt) { > ip_rt_put(inet->cork.rt); > inet->cork.rt = ((void *)0); > } > return err; > >error: > (({ (void)((0)); ((ip_statistics[!(((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))])); })->mibs[IPSTATS_MIB_OUTDISCARDS]++); > goto out; >} > > > > >void ip_flush_pending_frames(struct sock *sk) >{ > struct inet_sock *inet = inet_sk(sk); > struct sk_buff *skb; > > while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != ((void *)0)) > kfree_skb(skb); > > inet->cork.flags &= ~1; > kfree(inet->cork.opt); > inet->cork.opt = ((void *)0); > if (inet->cork.rt) { > ip_rt_put(inet->cork.rt); > inet->cork.rt = ((void *)0); > } >} > > > > > >static int ip_reply_glue_bits(void *dptr, char *to, int offset, > int len, int odd, struct sk_buff *skb) >{ > __wsum csum; > > csum = csum_partial_copy_nocheck(dptr+offset, to, len, 0); > skb->csum = csum_block_add(skb->csum, csum, odd); > return 0; >} ># 1326 "net/ipv4/ip_output.c" >void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, > unsigned int len) >{ > struct inet_sock *inet = inet_sk(sk); > struct { > struct ip_options opt; > char data[40]; > } replyopts; > struct ipcm_cookie ipc; > __be32 daddr; > struct rtable *rt = (struct rtable*)skb->dst; > > if (ip_options_echo(&replyopts.opt, skb)) > return; > > daddr = ipc.addr = rt->rt_src; > ipc.opt = ((void *)0); > > if (replyopts.opt.optlen) { > ipc.opt = &replyopts.opt; > > if (ipc.opt->srr) > daddr = replyopts.opt.faddr; > } > > { > struct flowi fl = { .nl_u = { .ip4_u = > { .daddr = daddr, > .saddr = rt->rt_spec_dst, > .tos = ((skb->nh.iph->tos)&0x1E) } }, > > .uli_u = { .ports = > { .sport = skb->h.th->dest, > .dport = skb->h.th->source } }, > .proto = sk->sk_protocol }; > security_skb_classify_flow(skb, &fl); > if (ip_route_output_key(&rt, &fl)) > return; > } > > > > > > > > _spin_lock(&((sk)->sk_lock.slock)); > inet->tos = skb->nh.iph->tos; > sk->sk_priority = skb->priority; > sk->sk_protocol = skb->nh.iph->protocol; > ip_append_data(sk, ip_reply_glue_bits, arg->iov->iov_base, len, 0, > &ipc, rt, 0x40); > if ((skb = skb_peek(&sk->sk_write_queue)) != ((void *)0)) { > if (arg->csumoffset >= 0) > *((__sum16 *)skb->h.raw + arg->csumoffset) = csum_fold(csum_add(skb->csum, arg->csum)); > skb->ip_summed = 0; > ip_push_pending_frames(sk); > } > > _spin_unlock(&((sk)->sk_lock.slock)); > > ip_rt_put(rt); >} > >void __attribute__ ((__section__ (".init.text"))) ip_init(void) >{ > ip_rt_init(); > inet_initpeers(); > > > igmp_mc_proc_init(); > >} > >extern typeof(ip_generic_getfrag) ip_generic_getfrag; extern void *__crc_ip_generic_getfrag __attribute__((weak)); static const unsigned long __kcrctab_ip_generic_getfrag __attribute__((__used__)) __attribute__((section("__kcrctab" ""), unused)) = (unsigned long) &__crc_ip_generic_getfrag; static const char __kstrtab_ip_generic_getfrag[] __attribute__((section("__ksymtab_strings"))) = "" "ip_generic_getfrag"; static const struct kernel_symbol __ksymtab_ip_generic_getfrag __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_generic_getfrag, __kstrtab_ip_generic_getfrag }; >extern typeof(ip_queue_xmit) ip_queue_xmit; extern void *__crc_ip_queue_xmit __attribute__((weak)); static const unsigned long __kcrctab_ip_queue_xmit __attribute__((__used__)) __attribute__((section("__kcrctab" ""), unused)) = (unsigned long) &__crc_ip_queue_xmit; static const char __kstrtab_ip_queue_xmit[] __attribute__((section("__ksymtab_strings"))) = "" "ip_queue_xmit"; static const struct kernel_symbol __ksymtab_ip_queue_xmit __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_queue_xmit, __kstrtab_ip_queue_xmit }; >extern typeof(ip_send_check) ip_send_check; extern void *__crc_ip_send_check __attribute__((weak)); static const unsigned long __kcrctab_ip_send_check __attribute__((__used__)) __attribute__((section("__kcrctab" ""), unused)) = (unsigned long) &__crc_ip_send_check; static const char __kstrtab_ip_send_check[] __attribute__((section("__ksymtab_strings"))) = "" "ip_send_check"; static const struct kernel_symbol __ksymtab_ip_send_check __attribute__((__used__)) __attribute__((section("__ksymtab" ""), unused)) = { (unsigned long)&ip_send_check, __kstrtab_ip_send_check };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 220588
: 144266