summaryrefslogtreecommitdiffstats
path: root/arch/parisc/net
Commit message (Collapse)AuthorAgeFilesLines
* parisc: fix unaligned accesses in BPFMikulas Patocka2024-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | There were spurious unaligned access warnings when calling BPF code. Sometimes, the warnings were triggered with any incoming packet, making the machine hard to use. The reason for the warnings is this: on parisc64, pointers to functions are not really pointers to functions, they are pointers to 16-byte descriptor. The first 8 bytes of the descriptor is a pointer to the function and the next 8 bytes of the descriptor is the content of the "dp" register. This descriptor is generated in the function bpf_jit_build_prologue. The problem is that the function bpf_int_jit_compile advertises 4-byte alignment when calling bpf_jit_binary_alloc, bpf_jit_binary_alloc randomizes the returned array and if the array happens to be not aligned on 8-byte boundary, the descriptor generated in bpf_jit_build_prologue is also not aligned and this triggers the unaligned access warning. Fix this by advertising 8-byte alignment on parisc64 when calling bpf_jit_binary_alloc. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Helge Deller <deller@gmx.de>
* bpf: Take return from set_memory_rox() into account with ↵Christophe Leroy2024-03-141-1/+7
| | | | | | | | | | | | | | | | | | | | bpf_jit_binary_lock_ro() set_memory_rox() can fail, leaving memory unprotected. Check return and bail out when bpf_jit_binary_lock_ro() returns an error. Link: https://github.com/KSPP/linux/issues/7 Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: linux-hardening@vger.kernel.org <linux-hardening@vger.kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Puranjay Mohan <puranjay12@gmail.com> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> # s390x Acked-by: Tiezhu Yang <yangtiezhu@loongson.cn> # LoongArch Reviewed-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> # MIPS Part Message-ID: <036b6393f23a2032ce75a1c92220b2afcb798d5d.1709850515.git.christophe.leroy@csgroup.eu> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* parisc: Add eBPF JIT compiler glue code and MakefileHelge Deller2023-08-223-0/+689
| | | | Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Add 64-bit eBPF JIT compilerHelge Deller2023-08-221-0/+1209
| | | | Signed-off-by: Helge Deller <deller@gmx.de>
* parisc: Add 32-bit eBPF JIT compilerHelge Deller2023-08-221-0/+1615
Signed-off-by: Helge Deller <deller@gmx.de>