aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2018-01-19 19:24:33 -0500
committerAlexei Starovoitov <ast@kernel.org>2018-01-19 21:37:00 -0500
commitfa9dd599b4dae841924b022768354cfde9affecb (patch)
tree9f26c547aa46c73afa8ad85cc63ef9931fb86821 /net/socket.c
parent87c1793b1b7f34915e9e64cdb503efb281c769a7 (diff)
bpf: get rid of pure_initcall dependency to enable jits
Having a pure_initcall() callback just to permanently enable BPF JITs under CONFIG_BPF_JIT_ALWAYS_ON is unnecessary and could leave a small race window in future where JIT is still disabled on boot. Since we know about the setting at compilation time anyway, just initialize it properly there. Also consolidate all the individual bpf_jit_enable variables into a single one and move them under one location. Moreover, don't allow for setting unspecified garbage values on them. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/net/socket.c b/net/socket.c
index fbfae1ed3ff5..1536515b6437 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2613,15 +2613,6 @@ out_fs:
2613 2613
2614core_initcall(sock_init); /* early initcall */ 2614core_initcall(sock_init); /* early initcall */
2615 2615
2616static int __init jit_init(void)
2617{
2618#ifdef CONFIG_BPF_JIT_ALWAYS_ON
2619 bpf_jit_enable = 1;
2620#endif
2621 return 0;
2622}
2623pure_initcall(jit_init);
2624
2625#ifdef CONFIG_PROC_FS 2616#ifdef CONFIG_PROC_FS
2626void socket_seq_show(struct seq_file *seq) 2617void socket_seq_show(struct seq_file *seq)
2627{ 2618{