linux/arch/riscv
Xu Kuohai 54bfc9ef60 riscv, bpf: Fix incorrect runtime stats
[ Upstream commit 10541b374a ]

When __bpf_prog_enter() returns zero, the s1 register is not set to zero,
resulting in incorrect runtime stats. Fix it by setting s1 immediately upon
the return of __bpf_prog_enter().

Fixes: 49b5e77ae3 ("riscv, bpf: Add bpf trampoline support for RV64")
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/bpf/20240416064208.2919073-3-xukuohai@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 12:02:01 +02:00
..
boot riscv: dts: sifive: add missing #interrupt-cells to pmic 2024-03-26 18:19:11 -04:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
errata riscv: errata: andes: Probe for IOCP only once in boot stage 2023-12-13 18:45:19 +01:00
include riscv: Fix loading 64-bit NOMMU kernels past the start of RAM 2024-05-02 16:32:49 +02:00
kernel Revert "riscv: kdump: fix crashkernel reserving problem on RISC-V" 2024-05-02 16:32:50 +02:00
kvm RISC-V: KVM: Fix APLIC in_clrip[x] read emulation 2024-04-10 16:35:48 +02:00
lib riscv: uaccess: Return the number of bytes effectively not copied 2023-08-16 07:30:06 -07:00
mm riscv: Fix loading 64-bit NOMMU kernels past the start of RAM 2024-05-02 16:32:49 +02:00
net riscv, bpf: Fix incorrect runtime stats 2024-05-17 12:02:01 +02:00
purgatory riscv/purgatory: Disable CFI 2023-08-23 14:16:40 -07:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild kexec: rename ARCH_HAS_KEXEC_PURGATORY 2023-08-18 10:18:54 -07:00
Kconfig RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH 2024-03-06 14:48:41 +00:00
Kconfig.debug
Kconfig.errata riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM and ERRATA_THEAD_PBMT 2023-10-26 09:42:38 +02:00
Kconfig.socs riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE 2023-12-13 18:45:35 +01:00
Makefile riscv: Remove duplicate objcopy flag 2023-10-12 11:34:03 -07:00
Makefile.postlink riscv: Use --emit-relocs in order to move .rela.dyn in init 2023-04-19 07:46:33 -07:00