Skip to content

Commit 8568df8

Browse files
seehearfeelchenhuacai
authored andcommitted
LoongArch: BPF: Set bpf_jit_bypass_spec_v1/v4()
JITs can set bpf_jit_bypass_spec_v1/v4() if they want the verifier to skip analysis/patching for the respective vulnerability, it is safe to set both bpf_jit_bypass_spec_v1/v4(), because there is no speculation barrier instruction for LoongArch. Suggested-by: Luis Gerhorst <luis.gerhorst@fau.de> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent c0fcc95 commit 8568df8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

arch/loongarch/net/bpf_jit.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,16 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
19151915
goto out_offset;
19161916
}
19171917

1918+
bool bpf_jit_bypass_spec_v1(void)
1919+
{
1920+
return true;
1921+
}
1922+
1923+
bool bpf_jit_bypass_spec_v4(void)
1924+
{
1925+
return true;
1926+
}
1927+
19181928
/* Indicate the JIT backend supports mixing bpf2bpf and tailcalls. */
19191929
bool bpf_jit_supports_subprog_tailcalls(void)
19201930
{

0 commit comments

Comments
 (0)