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
....@@ -706,6 +707,7 @@
706707 * @transport_header: Transport layer header
707708 * @network_header: Network layer header
708709 * @mac_header: Link layer header
710
+ * @kcov_handle: KCOV remote handle for remote coverage collection
709711 * @tail: Tail pointer
710712 * @end: End pointer
711713 * @head: Head of buffer
....@@ -908,6 +910,10 @@
908910 __u16 transport_header;
909911 __u16 network_header;
910912 __u16 mac_header;
913
+
914
+#ifdef CONFIG_KCOV
915
+ u64 kcov_handle;
916
+#endif
911917
912918 /* private: */
913919 __u32 headers_end[0];
....@@ -4207,9 +4213,6 @@
42074213 #if IS_ENABLED(CONFIG_MPTCP)
42084214 SKB_EXT_MPTCP,
42094215 #endif
4210
-#if IS_ENABLED(CONFIG_KCOV)
4211
- SKB_EXT_KCOV_HANDLE,
4212
-#endif
42134216 SKB_EXT_NUM, /* must be last */
42144217 };
42154218
....@@ -4320,7 +4323,7 @@
43204323
43214324 static inline void nf_reset_trace(struct sk_buff *skb)
43224325 {
4323
-#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)
43244327 skb->nf_trace = 0;
43254328 #endif
43264329 }
....@@ -4340,7 +4343,7 @@
43404343 dst->_nfct = src->_nfct;
43414344 nf_conntrack_get(skb_nfct(src));
43424345 #endif
4343
-#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)
43444347 if (copy)
43454348 dst->nf_trace = src->nf_trace;
43464349 #endif
....@@ -4664,35 +4667,27 @@
46644667 #endif
46654668 }
46664669
4667
-#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
+
46684675 static inline void skb_set_kcov_handle(struct sk_buff *skb,
46694676 const u64 kcov_handle)
46704677 {
4671
- /* Do not allocate skb extensions only to set kcov_handle to zero
4672
- * (as it is zero by default). However, if the extensions are
4673
- * already allocated, update kcov_handle anyway since
4674
- * skb_set_kcov_handle can be called to zero a previously set
4675
- * value.
4676
- */
4677
- if (skb_has_extensions(skb) || kcov_handle) {
4678
- u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
4679
-
4680
- if (kcov_handle_ptr)
4681
- *kcov_handle_ptr = kcov_handle;
4682
- }
4678
+#ifdef CONFIG_KCOV
4679
+ skb->kcov_handle = kcov_handle;
4680
+#endif
46834681 }
46844682
46854683 static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
46864684 {
4687
- u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
4688
-
4689
- return kcov_handle ? *kcov_handle : 0;
4690
-}
4685
+#ifdef CONFIG_KCOV
4686
+ return skb->kcov_handle;
46914687 #else
4692
-static inline void skb_set_kcov_handle(struct sk_buff *skb,
4693
- const u64 kcov_handle) { }
4694
-static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
4695
-#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */
4688
+ return 0;
4689
+#endif
4690
+}
46964691
46974692 #endif /* __KERNEL__ */
46984693 #endif /* _LINUX_SKBUFF_H */