diff options
author | Puranjay Mohan <puranjay12@gmail.com> | 2024-04-04 11:42:03 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2024-04-04 16:48:42 +0200 |
commit | 21ab0b6d0cfcb8aa98e33baa83f933f963514027 (patch) | |
tree | 95efbd4fc58efc0831780ed0dd79305f136e4375 /kernel/trace/bpf_trace.c | |
parent | 633a6e01d1a20b24a16899094c249a8cb2aad4b2 (diff) |
bpf, riscv: Implement bpf_addr_space_cast instruction
LLVM generates bpf_addr_space_cast instruction while translating
pointers between native (zero) address space and
__attribute__((address_space(N))). The addr_space=0 is reserved as
bpf_arena address space.
rY = addr_space_cast(rX, 0, 1) is processed by the verifier and
converted to normal 32-bit move: wX = wY
rY = addr_space_cast(rX, 1, 0) has to be converted by JIT.
Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Pu Lehui <pulehui@huawei.com>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/bpf/20240404114203.105970-3-puranjay12@gmail.com
Diffstat (limited to 'kernel/trace/bpf_trace.c')
0 files changed, 0 insertions, 0 deletions