bpf: implement insn_is_cast_user() helper for JITs
authorPuranjay Mohan <puranjay12@gmail.com>
Sun, 24 Mar 2024 18:32:26 +0000 (18:32 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 25 Mar 2024 16:10:51 +0000 (09:10 -0700)
commit770546ae9f4c1ae1ebcaf0874f0dd9631d77ec97
tree3a7bbdf305e2c5ab7154fdd2c40216f17f3e4e69
parenta8497506cd2c0fc90a64f6f5d2744a0ddb2c81eb
bpf: implement insn_is_cast_user() helper for JITs

Implement a helper function to check if an instruction is
addr_space_cast from as(0) to as(1). Use this helper in the x86 JIT.

Other JITs can use this helper when they add support for this instruction.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Link: https://lore.kernel.org/r/20240324183226.29674-1-puranjay12@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c
include/linux/filter.h