* [PATCH bpf-next] bpf: support bpf_jit_enable=2 for CONFIG_BPF_JIT_ALWAYS_ON
@ 2021-12-31 15:35 Hou Tao
2021-12-31 16:32 ` Alexei Starovoitov
0 siblings, 1 reply; 2+ messages in thread
From: Hou Tao @ 2021-12-31 15:35 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Martin KaFai Lau, Yonghong Song, Daniel Borkmann,
Andrii Nakryiko, David S . Miller, Jakub Kicinski, netdev, bpf,
houtao1
bpf_jit_enable=2 is used to dump the jited images for debug purpose,
however if CONFIG_BPF_JIT_ALWAYS_ON is enabled, its value is fixed
as one and can not be changed. So make the debug switch work again.
Signed-off-by: Hou Tao <houtao1@huawei.com>
---
net/core/sysctl_net_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 7b4d485aac7a..20e44427afa8 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -387,7 +387,7 @@ static struct ctl_table net_core_table[] = {
.proc_handler = proc_dointvec_minmax_bpf_enable,
# ifdef CONFIG_BPF_JIT_ALWAYS_ON
.extra1 = SYSCTL_ONE,
- .extra2 = SYSCTL_ONE,
+ .extra2 = &two,
# else
.extra1 = SYSCTL_ZERO,
.extra2 = &two,
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf: support bpf_jit_enable=2 for CONFIG_BPF_JIT_ALWAYS_ON
2021-12-31 15:35 [PATCH bpf-next] bpf: support bpf_jit_enable=2 for CONFIG_BPF_JIT_ALWAYS_ON Hou Tao
@ 2021-12-31 16:32 ` Alexei Starovoitov
0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2021-12-31 16:32 UTC (permalink / raw)
To: Hou Tao
Cc: Alexei Starovoitov, Martin KaFai Lau, Yonghong Song,
Daniel Borkmann, Andrii Nakryiko, David S . Miller,
Jakub Kicinski, Network Development, bpf
On Fri, Dec 31, 2021 at 7:20 AM Hou Tao <houtao1@huawei.com> wrote:
>
> bpf_jit_enable=2 is used to dump the jited images for debug purpose,
> however if CONFIG_BPF_JIT_ALWAYS_ON is enabled, its value is fixed
> as one and can not be changed. So make the debug switch work again.
>
> Signed-off-by: Hou Tao <houtao1@huawei.com>
That was discussed in the past:
https://lore.kernel.org/bpf/20210326124030.1138964-1-Jianlin.Lv@arm.com/
The old point stands.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-31 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31 15:35 [PATCH bpf-next] bpf: support bpf_jit_enable=2 for CONFIG_BPF_JIT_ALWAYS_ON Hou Tao
2021-12-31 16:32 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).