hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/linux/skbuff.h
....@@ -260,6 +260,7 @@
260260 u8 pkt_otherhost:1;
261261 u8 in_prerouting:1;
262262 u8 bridged_dnat:1;
263
+ u8 sabotage_in_done:1;
263264 __u16 frag_max_size;
264265 struct net_device *physindev;
265266
....@@ -297,7 +298,6 @@
297298
298299 __u32 qlen;
299300 spinlock_t lock;
300
- raw_spinlock_t raw_lock;
301301 };
302302
303303 struct sk_buff;
....@@ -707,6 +707,7 @@
707707 * @transport_header: Transport layer header
708708 * @network_header: Network layer header
709709 * @mac_header: Link layer header
710
+ * @kcov_handle: KCOV remote handle for remote coverage collection
710711 * @tail: Tail pointer
711712 * @end: End pointer
712713 * @head: Head of buffer
....@@ -909,6 +910,10 @@
909910 __u16 transport_header;
910911 __u16 network_header;
911912 __u16 mac_header;
913
+
914
+#ifdef CONFIG_KCOV
915
+ u64 kcov_handle;
916
+#endif
912917
913918 /* private: */
914919 __u32 headers_end[0];
....@@ -1930,12 +1935,6 @@
19301935 static inline void skb_queue_head_init(struct sk_buff_head *list)
19311936 {
19321937 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);
19391938 __skb_queue_head_init(list);
19401939 }
19411940
....@@ -4214,9 +4213,6 @@
42144213 #if IS_ENABLED(CONFIG_MPTCP)
42154214 SKB_EXT_MPTCP,
42164215 #endif
4217
-#if IS_ENABLED(CONFIG_KCOV)
4218
- SKB_EXT_KCOV_HANDLE,
4219
-#endif
42204216 SKB_EXT_NUM, /* must be last */
42214217 };
42224218
....@@ -4327,7 +4323,7 @@
43274323
43284324 static inline void nf_reset_trace(struct sk_buff *skb)
43294325 {
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)
43314327 skb->nf_trace = 0;
43324328 #endif
43334329 }
....@@ -4347,7 +4343,7 @@
43474343 dst->_nfct = src->_nfct;
43484344 nf_conntrack_get(skb_nfct(src));
43494345 #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)
43514347 if (copy)
43524348 dst->nf_trace = src->nf_trace;
43534349 #endif
....@@ -4671,35 +4667,27 @@
46714667 #endif
46724668 }
46734669
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
+
46754675 static inline void skb_set_kcov_handle(struct sk_buff *skb,
46764676 const u64 kcov_handle)
46774677 {
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
46904681 }
46914682
46924683 static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
46934684 {
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;
46984687 #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
+}
47034691
47044692 #endif /* __KERNEL__ */
47054693 #endif /* _LINUX_SKBUFF_H */