From 90e3e05ed8ddd4a362942861677856a25acf39ab Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Wed, 29 Jan 2020 17:32:58 -0800 Subject: [PATCH] ANDROID: Revert "ANDROID: arm64: bpf: implement arch_bpf_jit_check_func" This reverts commit d9756ba082c13d928d6904bc3741a1c08b4bd783. Reason for revert: fixes a conflict with upcoming upstream BPF changes. Bug: 145210207 Change-Id: I0e7e76c117ab3608b6dd5a1bc6b949b9e109038f Signed-off-by: Sami Tolvanen --- arch/arm64/net/bpf_jit_comp.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 0aa97d634866..cdc79de0c794 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -976,14 +976,3 @@ void bpf_jit_free_exec(void *addr) { return vfree(addr); } - -#ifdef CONFIG_CFI_CLANG -bool arch_bpf_jit_check_func(const struct bpf_prog *prog) -{ - const uintptr_t func = (const uintptr_t)prog->bpf_func; - - /* bpf_func must be correctly aligned and within the BPF JIT region */ - return (func >= BPF_JIT_REGION_START && func < BPF_JIT_REGION_END && - IS_ALIGNED(func, sizeof(u32))); -} -#endif