[PATCH 03/47] backports: Add empty implementation for skb_get_kcov_handle()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 backport/backport-include/linux/skbuff.h | 8 ++++++++
 1 file changed, 8 insertions(+)

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 */
-- 
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux