linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: trace jit code when enable BPF_JIT_ALWAYS_ON
@ 2021-03-26 12:40 Jianlin Lv
  2021-03-26 14:24 ` Alexei Starovoitov
  0 siblings, 1 reply; 5+ messages in thread
From: Jianlin Lv @ 2021-03-26 12:40 UTC (permalink / raw)
  To: bpf
  Cc: davem, kuba, ast, daniel, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, viro, rdna, dvyukov, nicolas.dichtel,
	keescook, masahiroy, maheshb, linux-kernel, netdev, Jianlin.Lv,
	iecedge, nd

When CONFIG_BPF_JIT_ALWAYS_ON is enabled, the value of bpf_jit_enable in
/proc/sys is limited to SYSCTL_ONE. This is not convenient for debugging.
This patch modifies the value of extra2 (max) to 2 that support developers
to emit traces on kernel log.

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.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 d84c8a1b280e..aa16883ac445 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -386,7 +386,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.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-28  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 12:40 [PATCH bpf-next] bpf: trace jit code when enable BPF_JIT_ALWAYS_ON Jianlin Lv
2021-03-26 14:24 ` Alexei Starovoitov
2021-03-27  8:19   ` Jianlin Lv
2021-03-27 15:19     ` Alexei Starovoitov
2021-03-28  1:59       ` Jianlin Lv

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).