Blame SOURCES/bcc-0.14.0-Delete-existing-kbuild_modname-definitions.patch

a6780e
From 8999b2f610e84a2413dbea1717fe6e2ebcd1eea0 Mon Sep 17 00:00:00 2001
a6780e
From: William Findlay <william@williamfindlay.com>
a6780e
Date: Wed, 17 Jun 2020 18:59:43 -0400
a6780e
Subject: [PATCH] Delete existing kbuild_modname definitions
a6780e
a6780e
---
a6780e
 examples/networking/xdp/xdp_drop_count.py    | 1 -
a6780e
 examples/networking/xdp/xdp_macswap_count.py | 1 -
a6780e
 examples/networking/xdp/xdp_redirect_cpu.py  | 1 -
a6780e
 examples/networking/xdp/xdp_redirect_map.py  | 1 -
a6780e
 examples/tracing/nflatency.py                | 1 -
a6780e
 tests/python/test_clang.py                   | 8 --------
a6780e
 tools/tcplife.lua                            | 1 -
a6780e
 tools/tcplife.py                             | 1 -
a6780e
 tools/tcpstates.py                           | 1 -
a6780e
 9 files changed, 16 deletions(-)
a6780e
a6780e
diff --git a/examples/networking/xdp/xdp_drop_count.py b/examples/networking/xdp/xdp_drop_count.py
a6780e
index f03273e9..512e0a20 100755
a6780e
--- a/examples/networking/xdp/xdp_drop_count.py
a6780e
+++ b/examples/networking/xdp/xdp_drop_count.py
a6780e
@@ -52,7 +52,6 @@ mode = BPF.XDP
a6780e
 
a6780e
 # load BPF program
a6780e
 b = BPF(text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/bpf.h>
a6780e
 #include <linux/in.h>
a6780e
 #include <linux/if_ether.h>
a6780e
diff --git a/examples/networking/xdp/xdp_macswap_count.py b/examples/networking/xdp/xdp_macswap_count.py
a6780e
index 0e2b21ca..770ce8ca 100755
a6780e
--- a/examples/networking/xdp/xdp_macswap_count.py
a6780e
+++ b/examples/networking/xdp/xdp_macswap_count.py
a6780e
@@ -50,7 +50,6 @@ mode = BPF.XDP
a6780e
 
a6780e
 # load BPF program
a6780e
 b = BPF(text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/bpf.h>
a6780e
 #include <linux/in.h>
a6780e
 #include <linux/if_ether.h>
a6780e
diff --git a/examples/networking/xdp/xdp_redirect_cpu.py b/examples/networking/xdp/xdp_redirect_cpu.py
a6780e
index 15b0d09b..470079f4 100755
a6780e
--- a/examples/networking/xdp/xdp_redirect_cpu.py
a6780e
+++ b/examples/networking/xdp/xdp_redirect_cpu.py
a6780e
@@ -30,7 +30,6 @@ max_cpu = cpu_count()
a6780e
 
a6780e
 # load BPF program
a6780e
 b = BPF(text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/bpf.h>
a6780e
 #include <linux/in.h>
a6780e
 #include <linux/if_ether.h>
a6780e
diff --git a/examples/networking/xdp/xdp_redirect_map.py b/examples/networking/xdp/xdp_redirect_map.py
a6780e
index 4a622723..4936ac1e 100755
a6780e
--- a/examples/networking/xdp/xdp_redirect_map.py
a6780e
+++ b/examples/networking/xdp/xdp_redirect_map.py
a6780e
@@ -29,7 +29,6 @@ out_idx = ip.link_lookup(ifname=out_if)[0]
a6780e
 
a6780e
 # load BPF program
a6780e
 b = BPF(text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/bpf.h>
a6780e
 #include <linux/in.h>
a6780e
 #include <linux/if_ether.h>
a6780e
diff --git a/examples/tracing/nflatency.py b/examples/tracing/nflatency.py
a6780e
index 76716490..c201930a 100755
a6780e
--- a/examples/tracing/nflatency.py
a6780e
+++ b/examples/tracing/nflatency.py
a6780e
@@ -12,7 +12,6 @@ import time
a6780e
 from bcc import BPF
a6780e
 
a6780e
 BPF_SRC = """
a6780e
-#define KBUILD_MODNAME "bpf_hook_nflatency"
a6780e
 #include <linux/ip.h>
a6780e
 #include <linux/ipv6.h>
a6780e
 #include <linux/tcp.h>
a6780e
diff --git a/tests/python/test_clang.py b/tests/python/test_clang.py
a6780e
index 886eebed..648494cf 100755
a6780e
--- a/tests/python/test_clang.py
a6780e
+++ b/tests/python/test_clang.py
a6780e
@@ -78,7 +78,6 @@ int count_foo(struct pt_regs *ctx, unsigned long a, unsigned long b) {
a6780e
 
a6780e
     def test_probe_read3(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <net/tcp.h>
a6780e
 #define _(P) ({typeof(P) val = 0; bpf_probe_read(&val, sizeof(val), &P); val;})
a6780e
 int count_tcp(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
@@ -90,7 +89,6 @@ int count_tcp(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read4(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <net/tcp.h>
a6780e
 #define _(P) ({typeof(P) val = 0; bpf_probe_read(&val, sizeof(val), &P); val;})
a6780e
 int test(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
@@ -102,7 +100,6 @@ int test(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read_whitelist1(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <net/tcp.h>
a6780e
 int count_tcp(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
     // The below define is in net/tcp.h:
a6780e
@@ -120,7 +117,6 @@ int count_tcp(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read_whitelist2(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <net/tcp.h>
a6780e
 int count_tcp(struct pt_regs *ctx, struct sk_buff *skb) {
a6780e
     // The below define is in net/tcp.h:
a6780e
@@ -1072,7 +1068,6 @@ int test(struct __sk_buff *ctx) {
a6780e
 
a6780e
     def test_probe_read_return(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
 #include <linux/tcp.h>
a6780e
 static inline unsigned char *my_skb_transport_header(struct sk_buff *skb) {
a6780e
@@ -1088,7 +1083,6 @@ int test(struct pt_regs *ctx, struct sock *sk, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read_multiple_return(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
 #include <linux/tcp.h>
a6780e
 static inline u64 error_function() {
a6780e
@@ -1109,7 +1103,6 @@ int test(struct pt_regs *ctx, struct sock *sk, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read_return_expr(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
 #include <linux/tcp.h>
a6780e
 static inline unsigned char *my_skb_transport_header(struct sk_buff *skb) {
a6780e
@@ -1125,7 +1118,6 @@ int test(struct pt_regs *ctx, struct sock *sk, struct sk_buff *skb) {
a6780e
 
a6780e
     def test_probe_read_return_call(self):
a6780e
         text = """
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
 #include <linux/tcp.h>
a6780e
 static inline struct tcphdr *my_skb_transport_header(struct sk_buff *skb) {
a6780e
diff --git a/tools/tcplife.lua b/tools/tcplife.lua
a6780e
index 3f4f6afd..5e311631 100755
a6780e
--- a/tools/tcplife.lua
a6780e
+++ b/tools/tcplife.lua
a6780e
@@ -25,7 +25,6 @@ uint16_t ntohs(uint16_t netshort);
a6780e
 
a6780e
 local program = [[
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <linux/tcp.h>
a6780e
 #include <net/sock.h>
a6780e
 #include <bcc/proto.h>
a6780e
diff --git a/tools/tcplife.py b/tools/tcplife.py
a6780e
index d4e679dd..c2bd8236 100755
a6780e
--- a/tools/tcplife.py
a6780e
+++ b/tools/tcplife.py
a6780e
@@ -66,7 +66,6 @@ debug = 0
a6780e
 # define BPF program
a6780e
 bpf_text = """
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <linux/tcp.h>
a6780e
 #include <net/sock.h>
a6780e
 #include <bcc/proto.h>
a6780e
diff --git a/tools/tcpstates.py b/tools/tcpstates.py
a6780e
index 48f87884..0fe5d89a 100755
a6780e
--- a/tools/tcpstates.py
a6780e
+++ b/tools/tcpstates.py
a6780e
@@ -61,7 +61,6 @@ debug = 0
a6780e
 # define BPF program
a6780e
 bpf_header = """
a6780e
 #include <uapi/linux/ptrace.h>
a6780e
-#define KBUILD_MODNAME "foo"
a6780e
 #include <linux/tcp.h>
a6780e
 #include <net/sock.h>
a6780e
 #include <bcc/proto.h>
a6780e
-- 
a6780e
2.25.4
a6780e