mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
parent
87c1793b1b
commit
fa9dd599b4
13 changed files with 24 additions and 42 deletions
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#include "bpf_jit_32.h"
|
||||
|
||||
int bpf_jit_enable __read_mostly;
|
||||
|
||||
static inline bool is_simm13(unsigned int value)
|
||||
{
|
||||
return value + 0x1000 < 0x2000;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
#include "bpf_jit_64.h"
|
||||
|
||||
int bpf_jit_enable __read_mostly;
|
||||
|
||||
static inline bool is_simm13(unsigned int value)
|
||||
{
|
||||
return value + 0x1000 < 0x2000;
|
||||
|
|
|
|||
Loading…
Reference in a new issue