diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/ptrace.h | 8 | ||||
-rw-r--r-- | include/linux/netdevice.h | 9 | ||||
-rw-r--r-- | include/net/netlink.h | 11 |
3 files changed, 17 insertions, 11 deletions
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index d8a56cddf7f2..b163da79bb6d 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -126,6 +126,8 @@ struct sparc_trapf { | |||
126 | #define TRACEREG32_SZ sizeof(struct pt_regs32) | 126 | #define TRACEREG32_SZ sizeof(struct pt_regs32) |
127 | #define STACKFRAME32_SZ sizeof(struct sparc_stackf32) | 127 | #define STACKFRAME32_SZ sizeof(struct sparc_stackf32) |
128 | 128 | ||
129 | #ifdef __KERNEL__ | ||
130 | |||
129 | struct global_reg_snapshot { | 131 | struct global_reg_snapshot { |
130 | unsigned long tstate; | 132 | unsigned long tstate; |
131 | unsigned long tpc; | 133 | unsigned long tpc; |
@@ -137,8 +139,6 @@ struct global_reg_snapshot { | |||
137 | unsigned long pad2; | 139 | unsigned long pad2; |
138 | }; | 140 | }; |
139 | 141 | ||
140 | #ifdef __KERNEL__ | ||
141 | |||
142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | 142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE |
143 | 143 | ||
144 | #define force_successful_syscall_return() \ | 144 | #define force_successful_syscall_return() \ |
@@ -306,6 +306,8 @@ extern void __show_regs(struct pt_regs *); | |||
306 | #define SF_XARG5 0x58 | 306 | #define SF_XARG5 0x58 |
307 | #define SF_XXARG 0x5c | 307 | #define SF_XXARG 0x5c |
308 | 308 | ||
309 | #ifdef __KERNEL__ | ||
310 | |||
309 | /* global_reg_snapshot offsets */ | 311 | /* global_reg_snapshot offsets */ |
310 | #define GR_SNAP_TSTATE 0x00 | 312 | #define GR_SNAP_TSTATE 0x00 |
311 | #define GR_SNAP_TPC 0x08 | 313 | #define GR_SNAP_TPC 0x08 |
@@ -316,6 +318,8 @@ extern void __show_regs(struct pt_regs *); | |||
316 | #define GR_SNAP_PAD1 0x30 | 318 | #define GR_SNAP_PAD1 0x30 |
317 | #define GR_SNAP_PAD2 0x38 | 319 | #define GR_SNAP_PAD2 0x38 |
318 | 320 | ||
321 | #endif /* __KERNEL__ */ | ||
322 | |||
319 | /* Stuff for the ptrace system call */ | 323 | /* Stuff for the ptrace system call */ |
320 | #define PTRACE_SPARC_DETACH 11 | 324 | #define PTRACE_SPARC_DETACH 11 |
321 | #define PTRACE_GETREGS 12 | 325 | #define PTRACE_GETREGS 12 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2b0266484c84..f27fd2009334 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -514,12 +514,10 @@ struct net_device | |||
514 | #define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */ | 514 | #define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */ |
515 | #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ | 515 | #define NETIF_F_MULTI_QUEUE 16384 /* Has multiple TX/RX queues */ |
516 | #define NETIF_F_LRO 32768 /* large receive offload */ | 516 | #define NETIF_F_LRO 32768 /* large receive offload */ |
517 | #define NETIF_F_VLAN_TSO 65536 /* Supports TSO for VLANs */ | ||
518 | #define NETIF_F_VLAN_CSUM 131072 /* Supports TX checksumming for VLANs */ | ||
519 | 517 | ||
520 | /* Segmentation offload features */ | 518 | /* Segmentation offload features */ |
521 | #define NETIF_F_GSO_SHIFT 20 | 519 | #define NETIF_F_GSO_SHIFT 16 |
522 | #define NETIF_F_GSO_MASK 0xfff00000 | 520 | #define NETIF_F_GSO_MASK 0xffff0000 |
523 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) | 521 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) |
524 | #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) | 522 | #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) |
525 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) | 523 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) |
@@ -747,6 +745,9 @@ struct net_device | |||
747 | /* rtnetlink link ops */ | 745 | /* rtnetlink link ops */ |
748 | const struct rtnl_link_ops *rtnl_link_ops; | 746 | const struct rtnl_link_ops *rtnl_link_ops; |
749 | 747 | ||
748 | /* VLAN feature mask */ | ||
749 | unsigned long vlan_features; | ||
750 | |||
750 | /* for setting kernel sock attribute on TCP connection setup */ | 751 | /* for setting kernel sock attribute on TCP connection setup */ |
751 | #define GSO_MAX_SIZE 65536 | 752 | #define GSO_MAX_SIZE 65536 |
752 | unsigned int gso_max_size; | 753 | unsigned int gso_max_size; |
diff --git a/include/net/netlink.h b/include/net/netlink.h index a5506c42f03c..112dcdf7e34e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -772,12 +772,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
772 | const struct nla_policy *policy, | 772 | const struct nla_policy *policy, |
773 | int len) | 773 | int len) |
774 | { | 774 | { |
775 | if (nla_len(nla) < len) | 775 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | |||
777 | if (nested_len < 0) | ||
776 | return -1; | 778 | return -1; |
777 | if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) | 779 | if (nested_len >= nla_attr_size(0)) |
778 | return nla_parse_nested(tb, maxtype, | 780 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
779 | nla_data(nla) + NLA_ALIGN(len), | 781 | nested_len, policy); |
780 | policy); | ||
781 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); | 782 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); |
782 | return 0; | 783 | return 0; |
783 | } | 784 | } |