Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 6 May 2006 18:59:18 +0000 (19:59 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 6 May 2006 18:59:18 +0000 (19:59 +0100)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
12 files changed:
1  2 
include/asm-arm/bug.h
include/asm-arm/unistd.h
include/asm-powerpc/spu.h
include/asm-powerpc/topology.h
include/asm-ppc/commproc.h
include/asm-sparc/unistd.h
include/asm-sparc64/tlbflush.h
include/asm-sparc64/unistd.h
include/linux/audit.h
include/net/ax25.h
include/net/inet_timewait_sock.h
include/net/sock.h

diff --combined include/asm-arm/bug.h
@@@ -1,6 -1,8 +1,7 @@@
  #ifndef _ASMARM_BUG_H
  #define _ASMARM_BUG_H
  
 -#include <linux/stddef.h>
+ #include <linux/config.h>
  
  #ifdef CONFIG_BUG
  #ifdef CONFIG_DEBUG_BUGVERBOSE
diff --combined include/asm-arm/unistd.h
@@@ -13,6 -13,8 +13,6 @@@
  #ifndef __ASM_ARM_UNISTD_H
  #define __ASM_ARM_UNISTD_H
  
 -#include <linux/linkage.h>
 -
  #define __NR_OABI_SYSCALL_BASE        0x900000
  
  #if defined(__thumb__) || defined(__ARM_EABI__)
  /*
   * The following syscalls are obsolete and no longer available for EABI.
   */
- #if defined(__ARM_EABI__)
+ #if defined(__ARM_EABI__) && !defined(__KERNEL__)
  #undef __NR_time
  #undef __NR_umount
  #undef __NR_stime
  #undef __NR_ipc
  #endif
  
 +#ifdef __KERNEL__
 +#include <linux/linkage.h>
 +
  #define __sys2(x) #x
  #define __sys1(x) __sys2(x)
  
@@@ -411,7 -410,8 +411,8 @@@ type name(void) {                                                  
    __asm__ __volatile__ (                                              \
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
-       : __SYS_REG_LIST() );                                           \
+       : __SYS_REG_LIST()                                              \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -425,7 -425,8 +426,8 @@@ type name(type1 arg1) {                                            
    __asm__ __volatile__ (                                              \
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
-       : __SYS_REG_LIST( "0" (__r0) ) );                               \
+       : __SYS_REG_LIST( "0" (__r0) )                                  \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -440,7 -441,8 +442,8 @@@ type name(type1 arg1,type2 arg2) {                                 
    __asm__ __volatile__ (                                              \
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
-       : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) );                   \
+       : __SYS_REG_LIST( "0" (__r0), "r" (__r1) )                      \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -457,7 -459,8 +460,8 @@@ type name(type1 arg1,type2 arg2,type3 a
    __asm__ __volatile__ (                                              \
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
-       : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) );       \
+       : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) )          \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -475,7 -478,8 +479,8 @@@ type name(type1 arg1, type2 arg2, type
    __asm__ __volatile__ (                                              \
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
-       : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) ); \
+       : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -495,7 -499,8 +500,8 @@@ type name(type1 arg1, type2 arg2, type
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
        : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2),           \
-                         "r" (__r3), "r" (__r4) ) );                   \
+                         "r" (__r3), "r" (__r4) )                      \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
@@@ -515,11 -520,13 +521,12 @@@ type name(type1 arg1, type2 arg2, type
    __syscall(name)                                                     \
        : "=r" (__res_r0)                                               \
        : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2),           \
-                         "r" (__r3), "r" (__r4), "r" (__r5) ) );       \
+                         "r" (__r3), "r" (__r4), "r" (__r5) )          \
+       : "memory" );                                                   \
    __res = __res_r0;                                                   \
    __syscall_return(type,__res);                                               \
  }
  
 -#ifdef __KERNEL__
  #define __ARCH_WANT_IPC_PARSE_VERSION
  #define __ARCH_WANT_STAT64
  #define __ARCH_WANT_SYS_GETHOSTNAME
  #define __ARCH_WANT_OLD_READDIR
  #define __ARCH_WANT_SYS_SOCKETCALL
  #endif
 -#endif
  
  #ifdef __KERNEL_SYSCALLS__
  
@@@ -563,7 -571,7 +570,7 @@@ asmlinkage long sys_rt_sigaction(int si
                                struct sigaction __user *oact,
                                size_t sigsetsize);
  
 -#endif
 +#endif /* __KERNEL_SYSCALLS__ */
  
  /*
   * "Conditional" syscalls
   */
  #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  
 +#endif /* __KERNEL__ */
  #endif /* __ASM_ARM_UNISTD_H */
@@@ -24,6 -24,7 +24,6 @@@
  #define _SPU_H
  #ifdef __KERNEL__
  
 -#include <linux/config.h>
  #include <linux/kref.h>
  #include <linux/workqueue.h>
  
@@@ -116,6 -117,7 +116,7 @@@ struct spu 
        struct list_head list;
        struct list_head sched_list;
        int number;
+       int nid;
        u32 isrc;
        u32 node;
        u64 flags;
@@@ -2,7 -2,11 +2,10 @@@
  #define _ASM_POWERPC_TOPOLOGY_H
  #ifdef __KERNEL__
  
 -#include <linux/config.h>
  
+ struct sys_device;
+ struct device_node;
  #ifdef CONFIG_NUMA
  
  #include <asm/mmzone.h>
@@@ -26,6 -30,8 +29,8 @@@ static inline int node_to_first_cpu(in
        return first_cpu(tmp);
  }
  
+ int of_node_to_nid(struct device_node *device);
  #define pcibus_to_node(node)    (-1)
  #define pcibus_to_cpumask(bus)        (cpu_online_map)
  
  
  extern void __init dump_numa_cpu_topology(void);
  
+ extern int sysfs_add_device_to_node(struct sys_device *dev, int nid);
+ extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid);
  #else
  
+ static inline int of_node_to_nid(struct device_node *device)
+ {
+       return 0;
+ }
  static inline void dump_numa_cpu_topology(void) {}
  
+ static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid)
+ {
+       return 0;
+ }
+ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
+                                               int nid)
+ {
+ }
  #include <asm-generic/topology.h>
  
  #endif /* CONFIG_NUMA */
@@@ -17,6 -17,7 +17,6 @@@
  #ifndef __CPM_8XX__
  #define __CPM_8XX__
  
 -#include <linux/config.h>
  #include <asm/8xx_immap.h>
  #include <asm/ptrace.h>
  
@@@ -34,6 -35,7 +34,7 @@@
  #define CPM_CR_INIT_TX                ((ushort)0x0002)
  #define CPM_CR_HUNT_MODE      ((ushort)0x0003)
  #define CPM_CR_STOP_TX                ((ushort)0x0004)
+ #define CPM_CR_GRA_STOP_TX    ((ushort)0x0005)
  #define CPM_CR_RESTART_TX     ((ushort)0x0006)
  #define CPM_CR_CLOSE_RX_BD    ((ushort)0x0007)
  #define CPM_CR_SET_GADDR      ((ushort)0x0008)
@@@ -41,7 -41,7 +41,7 @@@
  #define __NR_capset            22 /* Linux Specific                              */
  #define __NR_setuid              23 /* Implemented via setreuid in SunOS           */
  #define __NR_getuid              24 /* Common                                      */
/* #define __NR_time alias     25    ENOSYS under SunOS                          */
#define __NR_vmsplice          25 /* ENOSYS under SunOS                          */
  #define __NR_ptrace              26 /* Common                                      */
  #define __NR_alarm               27 /* Implemented via setitimer in SunOS          */
  #define __NR_sigaltstack       28 /* Common                                      */
  #define __NR_ppoll            298
  #define __NR_unshare          299
  
 +#ifdef __KERNEL__
  /* WARNING: You MAY NOT add syscall numbers larger than 299, since
   *          all of the syscall tables in the Sparc kernel are
   *          sized to have 299 entries (starting at zero).  Therefore
@@@ -454,6 -453,7 +454,6 @@@ errno = -__res; 
  return -1; \
  }
  
 -#ifdef __KERNEL__
  #define __ARCH_WANT_IPC_PARSE_VERSION
  #define __ARCH_WANT_OLD_READDIR
  #define __ARCH_WANT_STAT64
  #define __ARCH_WANT_SYS_SIGPENDING
  #define __ARCH_WANT_SYS_SIGPROCMASK
  #define __ARCH_WANT_SYS_RT_SIGSUSPEND
 -#endif
  
  #ifdef __KERNEL_SYSCALLS__
  
@@@ -531,5 -532,4 +531,5 @@@ asmlinkage long sys_rt_sigaction(int si
   */
  #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  
 +#endif /* __KERNEL__ */
  #endif /* _SPARC_UNISTD_H */
@@@ -1,6 -1,7 +1,6 @@@
  #ifndef _SPARC64_TLBFLUSH_H
  #define _SPARC64_TLBFLUSH_H
  
 -#include <linux/config.h>
  #include <linux/mm.h>
  #include <asm/mmu_context.h>
  
@@@ -21,8 -22,6 +21,6 @@@ extern void flush_tlb_pending(void)
  /* Local cpu only.  */
  extern void __flush_tlb_all(void);
  
- extern void __flush_tlb_page(unsigned long context, unsigned long page, unsigned long r);
  extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
  
  #ifndef CONFIG_SMP
@@@ -41,7 -41,7 +41,7 @@@
  #define __NR_capset            22 /* Linux Specific                              */
  #define __NR_setuid              23 /* Implemented via setreuid in SunOS           */
  #define __NR_getuid              24 /* Common                                      */
/* #define __NR_time alias     25    ENOSYS under SunOS                          */
#define __NR_vmsplice          25 /* ENOSYS under SunOS                          */
  #define __NR_ptrace              26 /* Common                                      */
  #define __NR_alarm               27 /* Implemented via setitimer in SunOS          */
  #define __NR_sigaltstack       28 /* Common                                      */
  #define __NR_ppoll            298
  #define __NR_unshare          299
  
 +#ifdef __KERNEL__
  /* WARNING: You MAY NOT add syscall numbers larger than 299, since
   *          all of the syscall tables in the Sparc kernel are
   *          sized to have 299 entries (starting at zero).  Therefore
@@@ -486,6 -485,7 +486,6 @@@ asmlinkage long sys_rt_sigaction(int si
  
  #endif /* __KERNEL_SYSCALLS__ */
  
 -#ifdef __KERNEL__
  /* sysconf options, for SunOS compatibility */
  #define   _SC_ARG_MAX             1
  #define   _SC_CHILD_MAX           2
  #define __ARCH_WANT_SYS_SIGPROCMASK
  #define __ARCH_WANT_SYS_RT_SIGSUSPEND
  #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
 -#endif
  
  /*
   * "Conditional" syscalls
   */
  #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
  
 +#endif /* __KERNEL__ */
  #endif /* _SPARC64_UNISTD_H */
diff --combined include/linux/audit.h
@@@ -24,7 -24,8 +24,7 @@@
  #ifndef _LINUX_AUDIT_H_
  #define _LINUX_AUDIT_H_
  
 -#include <linux/sched.h>
 -#include <linux/elf.h>
 +#include <linux/elf-em.h>
  
  /* The netlink messages for the audit system is divided into blocks:
   * 1000 - 1099 are for commanding the audit system
@@@ -82,6 -83,7 +82,7 @@@
  #define AUDIT_CONFIG_CHANGE   1305    /* Audit system configuration change */
  #define AUDIT_SOCKADDR                1306    /* sockaddr copied as syscall arg */
  #define AUDIT_CWD             1307    /* Current working directory */
+ #define AUDIT_IPC_SET_PERM    1311    /* IPC new permissions record type */
  
  #define AUDIT_AVC             1400    /* SE Linux avc denial or grant */
  #define AUDIT_SELINUX_ERR     1401    /* Internal SE Linux Errors */
  #define AUDIT_PERS    10
  #define AUDIT_ARCH    11
  #define AUDIT_MSGTYPE 12
+ #define AUDIT_SE_USER 13      /* security label user */
+ #define AUDIT_SE_ROLE 14      /* security label role */
+ #define AUDIT_SE_TYPE 15      /* security label type */
+ #define AUDIT_SE_SEN  16      /* security label sensitivity label */
+ #define AUDIT_SE_CLR  17      /* security label clearance label */
  
                                /* These are ONLY useful when checking
                                 * at syscall exit time (AUDIT_AT_EXIT). */
@@@ -266,7 -273,6 +272,7 @@@ struct audit_rule {                /* for AUDIT_LIST
  };
  
  #ifdef __KERNEL__
 +#include <linux/sched.h>
  
  struct audit_sig_info {
        uid_t           uid;
@@@ -287,10 -293,10 +293,10 @@@ struct netlink_skb_parms
                                /* Public API */
  extern int  audit_alloc(struct task_struct *task);
  extern void audit_free(struct task_struct *task);
- extern void audit_syscall_entry(struct task_struct *task, int arch,
+ extern void audit_syscall_entry(int arch,
                                int major, unsigned long a0, unsigned long a1,
                                unsigned long a2, unsigned long a3);
- extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code);
+ extern void audit_syscall_exit(int failed, long return_code);
  extern void audit_getname(const char *name);
  extern void audit_putname(const char *name);
  extern void __audit_inode(const char *name, const struct inode *inode, unsigned flags);
@@@ -314,7 -320,8 +320,8 @@@ extern void auditsc_get_stamp(struct au
                              struct timespec *t, unsigned int *serial);
  extern int  audit_set_loginuid(struct task_struct *task, uid_t loginuid);
  extern uid_t audit_get_loginuid(struct audit_context *ctx);
- extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp);
+ extern int audit_ipc_obj(struct kern_ipc_perm *ipcp);
+ extern int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp);
  extern int audit_socketcall(int nargs, unsigned long *args);
  extern int audit_sockaddr(int len, void *addr);
  extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt);
@@@ -323,8 -330,8 +330,8 @@@ extern int audit_set_macxattr(const cha
  #else
  #define audit_alloc(t) ({ 0; })
  #define audit_free(t) do { ; } while (0)
- #define audit_syscall_entry(t,ta,a,b,c,d,e) do { ; } while (0)
- #define audit_syscall_exit(t,f,r) do { ; } while (0)
+ #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
+ #define audit_syscall_exit(f,r) do { ; } while (0)
  #define audit_getname(n) do { ; } while (0)
  #define audit_putname(n) do { ; } while (0)
  #define __audit_inode(n,i,f) do { ; } while (0)
  #define audit_inode_child(d,i,p) do { ; } while (0)
  #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
  #define audit_get_loginuid(c) ({ -1; })
- #define audit_ipc_perms(q,u,g,m,i) ({ 0; })
+ #define audit_ipc_obj(i) ({ 0; })
+ #define audit_ipc_set_perm(q,u,g,m,i) ({ 0; })
  #define audit_socketcall(n,a) ({ 0; })
  #define audit_sockaddr(len, addr) ({ 0; })
  #define audit_avc_path(dentry, mnt) ({ 0; })
@@@ -366,7 -374,7 +374,7 @@@ extern void                    audit_log_d_path(struc
  extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
  extern int audit_filter_type(int type);
  extern int  audit_receive_filter(int type, int pid, int uid, int seq,
-                                void *data, size_t datasz, uid_t loginuid);
+                        void *data, size_t datasz, uid_t loginuid, u32 sid);
  #else
  #define audit_log(c,g,t,f,...) do { ; } while (0)
  #define audit_log_start(c,g,t) ({ NULL; })
diff --combined include/net/ax25.h
@@@ -6,6 -6,7 +6,6 @@@
  #ifndef _AX25_H
  #define _AX25_H 
  
 -#include <linux/config.h>
  #include <linux/ax25.h>
  #include <linux/spinlock.h>
  #include <linux/timer.h>
@@@ -144,14 -145,14 +144,14 @@@ enum 
  #define       AX25_DEF_CONMODE        2                       /* Connected mode allowed */
  #define       AX25_DEF_WINDOW         2                       /* Window=2 */
  #define       AX25_DEF_EWINDOW        32                      /* Module-128 Window=32 */
- #define       AX25_DEF_T1             (10 * HZ)               /* T1=10s */
- #define       AX25_DEF_T2             (3 * HZ)                /* T2=3s  */
- #define       AX25_DEF_T3             (300 * HZ)              /* T3=300s */
+ #define       AX25_DEF_T1             10000                   /* T1=10s */
+ #define       AX25_DEF_T2             3000                    /* T2=3s  */
+ #define       AX25_DEF_T3             300000                  /* T3=300s */
  #define       AX25_DEF_N2             10                      /* N2=10 */
- #define AX25_DEF_IDLE         (0 * 60 * HZ)           /* Idle=None */
+ #define AX25_DEF_IDLE         0                       /* Idle=None */
  #define AX25_DEF_PACLEN               256                     /* Paclen=256 */
  #define       AX25_DEF_PROTOCOL       AX25_PROTO_STD_SIMPLEX  /* Standard AX.25 */
- #define AX25_DEF_DS_TIMEOUT   (3 * 60 * HZ)           /* DAMA timeout 3 minutes */
+ #define AX25_DEF_DS_TIMEOUT   180000                  /* DAMA timeout 3 minutes */
  
  typedef struct ax25_uid_assoc {
        struct hlist_node       uid_node;
@@@ -15,6 -15,7 +15,6 @@@
  #ifndef _INET_TIMEWAIT_SOCK_
  #define _INET_TIMEWAIT_SOCK_
  
 -#include <linux/config.h>
  
  #include <linux/list.h>
  #include <linux/module.h>
@@@ -149,7 -150,7 +149,7 @@@ static inline void inet_twsk_add_bind_n
  
  static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw)
  {
-       return tw->tw_death_node.pprev != NULL;
+       return !hlist_unhashed(&tw->tw_death_node);
  }
  
  static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw)
diff --combined include/net/sock.h
@@@ -40,6 -40,7 +40,6 @@@
  #ifndef _SOCK_H
  #define _SOCK_H
  
 -#include <linux/config.h>
  #include <linux/list.h>
  #include <linux/timer.h>
  #include <linux/cache.h>
@@@ -278,7 -279,7 +278,7 @@@ static inline int sk_unhashed(const str
  
  static inline int sk_hashed(const struct sock *sk)
  {
-       return sk->sk_node.pprev != NULL;
+       return !sk_unhashed(sk);
  }
  
  static __inline__ void sk_node_init(struct hlist_node *node)