Skip to content

[PW_SID:1066745] [bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE#1610

Open
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1066745
Open

[PW_SID:1066745] [bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE#1610
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1066745

Conversation

@linux-riscv-bot
Copy link

PR for series 1066745 applied to workflow__riscv__fixes

Name: [bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1066745
Version: 3

kmalloc_nolock always fails for architectures that lack cmpxchg16b.
For example, this causes bpf_task_storage_get with flag
BPF_LOCAL_STORAGE_GET_F_CREATE to fails on riscv64 6.19 kernel.

Fix it by enabling use_kmalloc_nolock only when HAVE_CMPXCHG_DOUBLE.
But leave the PREEMPT_RT case as is because it requires kmalloc_nolock
for correctness. Add a comment about this limitation that architecture's
lack of CMPXCHG_DOUBLE combined with PREEMPT_RT could make
bpf_local_storage_alloc always fail.

Fixes: f484f4a ("bpf: Replace bpf memory allocator with kmalloc_nolock() in local storage")
Cc: stable@vger.kernel.org
Signed-off-by: Levi Zim <rsworktech@outlook.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.93 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1129.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1652.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.78 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[bpf,v3] bpf: do not use kmalloc_nolock when !HAVE_CMPXCHG_DOUBLE"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants