mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-04 23:59:07 +08:00
ci: remove outdated temporary patches
Remove patches, they don't apply and are not needed anymore. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
10da3d2384
commit
aadf88d4f6
@@ -1,70 +0,0 @@
|
|||||||
From 6fba14e2ed9d159f76b23fa5c16f3ea99acbc003 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Masahiro Yamada <masahiroy@kernel.org>
|
|
||||||
Date: Thu, 5 Jan 2023 12:13:06 +0900
|
|
||||||
Subject: [PATCH] s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU
|
|
||||||
ld < 2.36
|
|
||||||
|
|
||||||
Nathan Chancellor reports that the s390 vmlinux fails to link with
|
|
||||||
GNU ld < 2.36 since commit 99cb0d917ffa ("arch: fix broken BuildID
|
|
||||||
for arm64 and riscv").
|
|
||||||
|
|
||||||
It happens for defconfig, or more specifically for CONFIG_EXPOLINE=y.
|
|
||||||
|
|
||||||
$ s390x-linux-gnu-ld --version | head -n1
|
|
||||||
GNU ld (GNU Binutils for Debian) 2.35.2
|
|
||||||
$ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- allnoconfig
|
|
||||||
$ ./scripts/config -e CONFIG_EXPOLINE
|
|
||||||
$ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- olddefconfig
|
|
||||||
$ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu-
|
|
||||||
`.exit.text' referenced in section `.s390_return_reg' of drivers/base/dd.o: defined in discarded section `.exit.text' of drivers/base/dd.o
|
|
||||||
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
|
|
||||||
make: *** [Makefile:1252: vmlinux] Error 2
|
|
||||||
|
|
||||||
arch/s390/kernel/vmlinux.lds.S wants to keep EXIT_TEXT:
|
|
||||||
|
|
||||||
.exit.text : {
|
|
||||||
EXIT_TEXT
|
|
||||||
}
|
|
||||||
|
|
||||||
But, at the same time, EXIT_TEXT is thrown away by DISCARD because
|
|
||||||
s390 does not define RUNTIME_DISCARD_EXIT.
|
|
||||||
|
|
||||||
I still do not understand why the latter wins after 99cb0d917ffa,
|
|
||||||
but defining RUNTIME_DISCARD_EXIT seems correct because the comment
|
|
||||||
line in arch/s390/kernel/vmlinux.lds.S says:
|
|
||||||
|
|
||||||
/*
|
|
||||||
* .exit.text is discarded at runtime, not link time,
|
|
||||||
* to deal with references from __bug_table
|
|
||||||
*/
|
|
||||||
|
|
||||||
Nathan also found that binutils commit 21401fc7bf67 ("Duplicate output
|
|
||||||
sections in scripts") cured this issue, so we cannot reproduce it with
|
|
||||||
binutils 2.36+, but it is better to not rely on it.
|
|
||||||
|
|
||||||
Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv")
|
|
||||||
Link: https://lore.kernel.org/all/Y7Jal56f6UBh1abE@dev-arch.thelio-3990X/
|
|
||||||
Reported-by: Nathan Chancellor <nathan@kernel.org>
|
|
||||||
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
|
|
||||||
Link: https://lore.kernel.org/r/20230105031306.1455409-1-masahiroy@kernel.org
|
|
||||||
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
|
|
||||||
---
|
|
||||||
arch/s390/kernel/vmlinux.lds.S | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
|
|
||||||
index 5ea3830af0cc..6e101e6f499d 100644
|
|
||||||
--- a/arch/s390/kernel/vmlinux.lds.S
|
|
||||||
+++ b/arch/s390/kernel/vmlinux.lds.S
|
|
||||||
@@ -17,6 +17,8 @@
|
|
||||||
/* Handle ro_after_init data on our own. */
|
|
||||||
#define RO_AFTER_INIT_DATA
|
|
||||||
|
|
||||||
+#define RUNTIME_DISCARD_EXIT
|
|
||||||
+
|
|
||||||
#define EMITS_PT_NOTE
|
|
||||||
|
|
||||||
#include <asm-generic/vmlinux.lds.h>
|
|
||||||
--
|
|
||||||
2.30.2
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
From ff8be5401b359e23ec2b74184034082564bac7c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Daniel=20M=C3=BCller?= <deso@posteo.net>
|
|
||||||
Date: Thu, 25 May 2023 16:04:20 -0700
|
|
||||||
Subject: [PATCH] selftests/bpf: Check whether to run selftest
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
The sockopt test invokes test__start_subtest and then unconditionally
|
|
||||||
asserts the success. That means that even if deny-listed, any test will
|
|
||||||
still run and potentially fail.
|
|
||||||
Evaluate the return value of test__start_subtest() to achieve the
|
|
||||||
desired behavior, as other tests do.
|
|
||||||
|
|
||||||
Signed-off-by: Daniel Müller <deso@posteo.net>
|
|
||||||
---
|
|
||||||
tools/testing/selftests/bpf/prog_tests/sockopt.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt.c b/tools/testing/selftests/bpf/prog_tests/sockopt.c
|
|
||||||
index 33dd45..9e6a5e 100644
|
|
||||||
--- a/tools/testing/selftests/bpf/prog_tests/sockopt.c
|
|
||||||
+++ b/tools/testing/selftests/bpf/prog_tests/sockopt.c
|
|
||||||
@@ -1060,7 +1060,9 @@ void test_sockopt(void)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(tests); i++) {
|
|
||||||
- test__start_subtest(tests[i].descr);
|
|
||||||
+ if (!test__start_subtest(tests[i].descr))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
ASSERT_OK(run_test(cgroup_fd, &tests[i]), tests[i].descr);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
From a8dfde09c90109e3a98af54847e91bde7dc2d5c2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Song Liu <song@kernel.org>
|
|
||||||
Date: Tue, 13 Dec 2022 14:05:00 -0800
|
|
||||||
Subject: [PATCH] selftests/bpf: Select CONFIG_FUNCTION_ERROR_INJECTION
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
|
|
||||||
CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after recent
|
|
||||||
changes. As a result, we are seeing errors like the following from BPF CI:
|
|
||||||
|
|
||||||
bpf_testmod_test_read() is not modifiable
|
|
||||||
__x64_sys_setdomainname is not sleepable
|
|
||||||
__x64_sys_getpgid is not sleepable
|
|
||||||
|
|
||||||
Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the
|
|
||||||
selftest config.
|
|
||||||
|
|
||||||
Fixes: a4412fdd49dc ("error-injection: Add prompt for function error injection")
|
|
||||||
Reported-by: Daniel Müller <deso@posteo.net>
|
|
||||||
Signed-off-by: Song Liu <song@kernel.org>
|
|
||||||
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
|
|
||||||
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
||||||
Acked-by: Daniel Müller <deso@posteo.net>
|
|
||||||
Link: https://lore.kernel.org/bpf/20221213220500.3427947-1-song@kernel.org
|
|
||||||
Signed-off-by: Daniel Müller <deso@posteo.net>
|
|
||||||
---
|
|
||||||
tools/testing/selftests/bpf/config | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
|
|
||||||
index 612f69..63cd4a 100644
|
|
||||||
--- a/tools/testing/selftests/bpf/config
|
|
||||||
+++ b/tools/testing/selftests/bpf/config
|
|
||||||
@@ -16,6 +16,7 @@ CONFIG_CRYPTO_USER_API_HASH=y
|
|
||||||
CONFIG_DYNAMIC_FTRACE=y
|
|
||||||
CONFIG_FPROBE=y
|
|
||||||
CONFIG_FTRACE_SYSCALLS=y
|
|
||||||
+CONFIG_FUNCTION_ERROR_INJECTION=y
|
|
||||||
CONFIG_FUNCTION_TRACER=y
|
|
||||||
CONFIG_GENEVE=y
|
|
||||||
CONFIG_IKCONFIG=y
|
|
||||||
--
|
|
||||||
2.30.2
|
|
||||||
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
From d3484f640bc82cff459beb85a00f7ebab20f0a41 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
|
|
||||||
Date: Sun, 9 Apr 2023 11:28:31 +0900
|
|
||||||
Subject: [PATCH] tracing: fprobe: Initialize ret valiable to fix smatch error
|
|
||||||
|
|
||||||
The commit 39d954200bf6 ("fprobe: Skip exit_handler if entry_handler returns
|
|
||||||
!0") introduced a hidden dependency of 'ret' local variable in the
|
|
||||||
fprobe_handler(), Smatch warns the `ret` can be accessed without
|
|
||||||
initialization.
|
|
||||||
|
|
||||||
kernel/trace/fprobe.c:59 fprobe_handler()
|
|
||||||
error: uninitialized symbol 'ret'.
|
|
||||||
|
|
||||||
kernel/trace/fprobe.c
|
|
||||||
49 fpr->entry_ip = ip;
|
|
||||||
50 if (fp->entry_data_size)
|
|
||||||
51 entry_data = fpr->data;
|
|
||||||
52 }
|
|
||||||
53
|
|
||||||
54 if (fp->entry_handler)
|
|
||||||
55 ret = fp->entry_handler(fp, ip, ftrace_get_regs(fregs), entry_data);
|
|
||||||
|
|
||||||
ret is only initialized if there is an ->entry_handler
|
|
||||||
|
|
||||||
56
|
|
||||||
57 /* If entry_handler returns !0, nmissed is not counted. */
|
|
||||||
58 if (rh) {
|
|
||||||
|
|
||||||
rh is only true if there is an ->exit_handler. Presumably if you have
|
|
||||||
and ->exit_handler that means you also have a ->entry_handler but Smatch
|
|
||||||
is not smart enough to figure it out.
|
|
||||||
|
|
||||||
--> 59 if (ret)
|
|
||||||
^^^
|
|
||||||
Warning here.
|
|
||||||
|
|
||||||
60 rethook_recycle(rh);
|
|
||||||
61 else
|
|
||||||
62 rethook_hook(rh, ftrace_get_regs(fregs), true);
|
|
||||||
63 }
|
|
||||||
64 out:
|
|
||||||
65 ftrace_test_recursion_unlock(bit);
|
|
||||||
66 }
|
|
||||||
|
|
||||||
Reported-by: Dan Carpenter <error27@gmail.com>
|
|
||||||
Link: https://lore.kernel.org/all/85429a5c-a4b9-499e-b6c0-cbd313291c49@kili.mountain
|
|
||||||
Fixes: 39d954200bf6 ("fprobe: Skip exit_handler if entry_handler returns !0")
|
|
||||||
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
|
|
||||||
---
|
|
||||||
kernel/trace/fprobe.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
|
|
||||||
index 9abb3905bc8e..293184227394 100644
|
|
||||||
--- a/kernel/trace/fprobe.c
|
|
||||||
+++ b/kernel/trace/fprobe.c
|
|
||||||
@@ -27,7 +27,7 @@ static void fprobe_handler(unsigned long ip, unsigned long parent_ip,
|
|
||||||
struct rethook_node *rh = NULL;
|
|
||||||
struct fprobe *fp;
|
|
||||||
void *entry_data = NULL;
|
|
||||||
- int bit, ret;
|
|
||||||
+ int bit, ret = 0;
|
|
||||||
|
|
||||||
fp = container_of(ops, struct fprobe, ops);
|
|
||||||
if (fprobe_disabled(fp))
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
From 8267fc71abb2dc47338570e56dd3473a58313fce Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
||||||
Date: Mon, 17 Apr 2023 23:53:22 +0200
|
|
||||||
Subject: [PATCH] veth: take into account peer device for
|
|
||||||
NETDEV_XDP_ACT_NDO_XMIT xdp_features flag
|
|
||||||
|
|
||||||
For veth pairs, NETDEV_XDP_ACT_NDO_XMIT is supported by the current
|
|
||||||
device if the peer one is running a XDP program or if it has GRO enabled.
|
|
||||||
Fix the xdp_features flags reporting considering peer device and not
|
|
||||||
current one for NETDEV_XDP_ACT_NDO_XMIT.
|
|
||||||
|
|
||||||
Fixes: fccca038f300 ("veth: take into account device reconfiguration for xdp_features flag")
|
|
||||||
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
||||||
Link: https://lore.kernel.org/r/4f1ca6f6f6b42ae125bfdb5c7782217c83968b2e.1681767806.git.lorenzo@kernel.org
|
|
||||||
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|
|
||||||
---
|
|
||||||
drivers/net/veth.c | 17 +++++++++++------
|
|
||||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
|
|
||||||
index e1b38fbf1dd9..4b3c6647edc6 100644
|
|
||||||
--- a/drivers/net/veth.c
|
|
||||||
+++ b/drivers/net/veth.c
|
|
||||||
@@ -1262,11 +1262,12 @@ static void veth_set_xdp_features(struct net_device *dev)
|
|
||||||
|
|
||||||
peer = rtnl_dereference(priv->peer);
|
|
||||||
if (peer && peer->real_num_tx_queues <= dev->real_num_rx_queues) {
|
|
||||||
+ struct veth_priv *priv_peer = netdev_priv(peer);
|
|
||||||
xdp_features_t val = NETDEV_XDP_ACT_BASIC |
|
|
||||||
NETDEV_XDP_ACT_REDIRECT |
|
|
||||||
NETDEV_XDP_ACT_RX_SG;
|
|
||||||
|
|
||||||
- if (priv->_xdp_prog || veth_gro_requested(dev))
|
|
||||||
+ if (priv_peer->_xdp_prog || veth_gro_requested(peer))
|
|
||||||
val |= NETDEV_XDP_ACT_NDO_XMIT |
|
|
||||||
NETDEV_XDP_ACT_NDO_XMIT_SG;
|
|
||||||
xdp_set_features_flag(dev, val);
|
|
||||||
@@ -1504,19 +1505,23 @@ static int veth_set_features(struct net_device *dev,
|
|
||||||
{
|
|
||||||
netdev_features_t changed = features ^ dev->features;
|
|
||||||
struct veth_priv *priv = netdev_priv(dev);
|
|
||||||
+ struct net_device *peer;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
if (!(changed & NETIF_F_GRO) || !(dev->flags & IFF_UP) || priv->_xdp_prog)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
+ peer = rtnl_dereference(priv->peer);
|
|
||||||
if (features & NETIF_F_GRO) {
|
|
||||||
err = veth_napi_enable(dev);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
- xdp_features_set_redirect_target(dev, true);
|
|
||||||
+ if (peer)
|
|
||||||
+ xdp_features_set_redirect_target(peer, true);
|
|
||||||
} else {
|
|
||||||
- xdp_features_clear_redirect_target(dev);
|
|
||||||
+ if (peer)
|
|
||||||
+ xdp_features_clear_redirect_target(peer);
|
|
||||||
veth_napi_del(dev);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
@@ -1598,13 +1603,13 @@ static int veth_xdp_set(struct net_device *dev, struct bpf_prog *prog,
|
|
||||||
peer->max_mtu = max_mtu;
|
|
||||||
}
|
|
||||||
|
|
||||||
- xdp_features_set_redirect_target(dev, true);
|
|
||||||
+ xdp_features_set_redirect_target(peer, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (old_prog) {
|
|
||||||
if (!prog) {
|
|
||||||
- if (!veth_gro_requested(dev))
|
|
||||||
- xdp_features_clear_redirect_target(dev);
|
|
||||||
+ if (peer && !veth_gro_requested(dev))
|
|
||||||
+ xdp_features_clear_redirect_target(peer);
|
|
||||||
|
|
||||||
if (dev->flags & IFF_UP)
|
|
||||||
veth_disable_xdp(dev);
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user