| .. | .. |
|---|
| 260 | 260 | u8 pkt_otherhost:1; |
|---|
| 261 | 261 | u8 in_prerouting:1; |
|---|
| 262 | 262 | u8 bridged_dnat:1; |
|---|
| 263 | + u8 sabotage_in_done:1; |
|---|
| 263 | 264 | __u16 frag_max_size; |
|---|
| 264 | 265 | struct net_device *physindev; |
|---|
| 265 | 266 | |
|---|
| .. | .. |
|---|
| 297 | 298 | |
|---|
| 298 | 299 | __u32 qlen; |
|---|
| 299 | 300 | spinlock_t lock; |
|---|
| 300 | | - raw_spinlock_t raw_lock; |
|---|
| 301 | 301 | }; |
|---|
| 302 | 302 | |
|---|
| 303 | 303 | struct sk_buff; |
|---|
| .. | .. |
|---|
| 707 | 707 | * @transport_header: Transport layer header |
|---|
| 708 | 708 | * @network_header: Network layer header |
|---|
| 709 | 709 | * @mac_header: Link layer header |
|---|
| 710 | + * @kcov_handle: KCOV remote handle for remote coverage collection |
|---|
| 710 | 711 | * @tail: Tail pointer |
|---|
| 711 | 712 | * @end: End pointer |
|---|
| 712 | 713 | * @head: Head of buffer |
|---|
| .. | .. |
|---|
| 909 | 910 | __u16 transport_header; |
|---|
| 910 | 911 | __u16 network_header; |
|---|
| 911 | 912 | __u16 mac_header; |
|---|
| 913 | + |
|---|
| 914 | +#ifdef CONFIG_KCOV |
|---|
| 915 | + u64 kcov_handle; |
|---|
| 916 | +#endif |
|---|
| 912 | 917 | |
|---|
| 913 | 918 | /* private: */ |
|---|
| 914 | 919 | __u32 headers_end[0]; |
|---|
| .. | .. |
|---|
| 1930 | 1935 | static inline void skb_queue_head_init(struct sk_buff_head *list) |
|---|
| 1931 | 1936 | { |
|---|
| 1932 | 1937 | spin_lock_init(&list->lock); |
|---|
| 1933 | | - __skb_queue_head_init(list); |
|---|
| 1934 | | -} |
|---|
| 1935 | | - |
|---|
| 1936 | | -static inline void skb_queue_head_init_raw(struct sk_buff_head *list) |
|---|
| 1937 | | -{ |
|---|
| 1938 | | - raw_spin_lock_init(&list->raw_lock); |
|---|
| 1939 | 1938 | __skb_queue_head_init(list); |
|---|
| 1940 | 1939 | } |
|---|
| 1941 | 1940 | |
|---|
| .. | .. |
|---|
| 4214 | 4213 | #if IS_ENABLED(CONFIG_MPTCP) |
|---|
| 4215 | 4214 | SKB_EXT_MPTCP, |
|---|
| 4216 | 4215 | #endif |
|---|
| 4217 | | -#if IS_ENABLED(CONFIG_KCOV) |
|---|
| 4218 | | - SKB_EXT_KCOV_HANDLE, |
|---|
| 4219 | | -#endif |
|---|
| 4220 | 4216 | SKB_EXT_NUM, /* must be last */ |
|---|
| 4221 | 4217 | }; |
|---|
| 4222 | 4218 | |
|---|
| .. | .. |
|---|
| 4327 | 4323 | |
|---|
| 4328 | 4324 | static inline void nf_reset_trace(struct sk_buff *skb) |
|---|
| 4329 | 4325 | { |
|---|
| 4330 | | -#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
|---|
| 4326 | +#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES) |
|---|
| 4331 | 4327 | skb->nf_trace = 0; |
|---|
| 4332 | 4328 | #endif |
|---|
| 4333 | 4329 | } |
|---|
| .. | .. |
|---|
| 4347 | 4343 | dst->_nfct = src->_nfct; |
|---|
| 4348 | 4344 | nf_conntrack_get(skb_nfct(src)); |
|---|
| 4349 | 4345 | #endif |
|---|
| 4350 | | -#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
|---|
| 4346 | +#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES) |
|---|
| 4351 | 4347 | if (copy) |
|---|
| 4352 | 4348 | dst->nf_trace = src->nf_trace; |
|---|
| 4353 | 4349 | #endif |
|---|
| .. | .. |
|---|
| 4671 | 4667 | #endif |
|---|
| 4672 | 4668 | } |
|---|
| 4673 | 4669 | |
|---|
| 4674 | | -#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS) |
|---|
| 4670 | +static inline bool skb_csum_is_sctp(struct sk_buff *skb) |
|---|
| 4671 | +{ |
|---|
| 4672 | + return skb->csum_not_inet; |
|---|
| 4673 | +} |
|---|
| 4674 | + |
|---|
| 4675 | 4675 | static inline void skb_set_kcov_handle(struct sk_buff *skb, |
|---|
| 4676 | 4676 | const u64 kcov_handle) |
|---|
| 4677 | 4677 | { |
|---|
| 4678 | | - /* Do not allocate skb extensions only to set kcov_handle to zero |
|---|
| 4679 | | - * (as it is zero by default). However, if the extensions are |
|---|
| 4680 | | - * already allocated, update kcov_handle anyway since |
|---|
| 4681 | | - * skb_set_kcov_handle can be called to zero a previously set |
|---|
| 4682 | | - * value. |
|---|
| 4683 | | - */ |
|---|
| 4684 | | - if (skb_has_extensions(skb) || kcov_handle) { |
|---|
| 4685 | | - u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE); |
|---|
| 4686 | | - |
|---|
| 4687 | | - if (kcov_handle_ptr) |
|---|
| 4688 | | - *kcov_handle_ptr = kcov_handle; |
|---|
| 4689 | | - } |
|---|
| 4678 | +#ifdef CONFIG_KCOV |
|---|
| 4679 | + skb->kcov_handle = kcov_handle; |
|---|
| 4680 | +#endif |
|---|
| 4690 | 4681 | } |
|---|
| 4691 | 4682 | |
|---|
| 4692 | 4683 | static inline u64 skb_get_kcov_handle(struct sk_buff *skb) |
|---|
| 4693 | 4684 | { |
|---|
| 4694 | | - u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE); |
|---|
| 4695 | | - |
|---|
| 4696 | | - return kcov_handle ? *kcov_handle : 0; |
|---|
| 4697 | | -} |
|---|
| 4685 | +#ifdef CONFIG_KCOV |
|---|
| 4686 | + return skb->kcov_handle; |
|---|
| 4698 | 4687 | #else |
|---|
| 4699 | | -static inline void skb_set_kcov_handle(struct sk_buff *skb, |
|---|
| 4700 | | - const u64 kcov_handle) { } |
|---|
| 4701 | | -static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; } |
|---|
| 4702 | | -#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */ |
|---|
| 4688 | + return 0; |
|---|
| 4689 | +#endif |
|---|
| 4690 | +} |
|---|
| 4703 | 4691 | |
|---|
| 4704 | 4692 | #endif /* __KERNEL__ */ |
|---|
| 4705 | 4693 | #endif /* _LINUX_SKBUFF_H */ |
|---|