aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-10-04 22:54:59 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-10-18 23:01:19 +0200
commit19dfc59b897d31804ed860a0590d7b3d4ed789c0 (patch)
tree0d1e3918862600f8e95a6692455d114a1c7895c5
parent48d6d038bb9f8ea09cf4e9cbfd00a9a3baeaa5e5 (diff)
downloadbackports-19dfc59b897d31804ed860a0590d7b3d4ed789c0.tar.gz
backports: Add empty implementation for skb_get_kcov_handle()
In kernel >= 5.11 skb_get_kcov_handle() returns skb->kcov_handle when CONFIG_KCOV is set and otherwise 0. It should even be fine when CONFIG_KCOV is set on older kernels to return 0 here, kcov will not work as good as on recent kernels, but it should work ok. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/skbuff.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 6b02c857..1fd25fcd 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -122,4 +122,12 @@ static inline __u32 skb_queue_len_lockless(const struct sk_buff_head *list_)
}
#endif /* < 5.6.0 */
+#if LINUX_VERSION_IS_LESS(5,11,0)
+#define skb_get_kcov_handle LINUX_BACKPORT(skb_get_kcov_handle)
+static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
+{
+ return 0;
+}
+#endif
+
#endif /* __BACKPORT_SKBUFF_H */