Skip to content

[PW_SID:1143053] riscv: net: bpf: add bpf_jit_supports_private_stack() - #2439

Open
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1143053
Open

[PW_SID:1143053] riscv: net: bpf: add bpf_jit_supports_private_stack()#2439
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1143053

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1143053 applied to workflow__riscv__fixes

Name: riscv: net: bpf: add bpf_jit_supports_private_stack()
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1143053
Version: 1

The bpf_jit_supports_private_stack() function is defined with the __weak
attribute in kernel/bpf/core.c as shown below, and returns false.

include/linux/filter.h:1191:bool bpf_jit_supports_private_stack(void);
kernel/bpf/core.c:3381:bool __weak bpf_jit_supports_private_stack(void)

However, if this function is not defined in the corresponding architecture to
return true, an error occurs when loading BPF as follows, and it is not loaded.

$ cd tools/sched_ext
$ make
$ sudo ./build/bin/scx_simple

libbpf: prog 'simple_dispatch': BPF program load failed: -EACCES
libbpf: prog 'simple_dispatch': -- BEGIN PROG LOAD LOG --
Private stack not supported by jit

arm64, powerpc, and x86 are defined as follows and return true.

arch/arm64/net/bpf_jit_comp.c:2318:bool bpf_jit_supports_private_stack(void)
arch/powerpc/net/bpf_jit_comp.c:530:bool bpf_jit_supports_private_stack(void)
arch/x86/net/bpf_jit_comp.c:4111:bool bpf_jit_supports_private_stack(void)

It seems that it should be defined in the same way in RISCV as well.

Signed-off-by: JaeJoon Jung <rgbi3307@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 117.13 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1381.99 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1699.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.07 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.47 seconds
Result: ERROR
Output:

ERROR: code indent should use tabs where possible
#48: FILE: arch/riscv/net/bpf_jit_comp64.c:2163:
+        return true;$

WARNING: please, no spaces at the start of a line
#48: FILE: arch/riscv/net/bpf_jit_comp64.c:2163:
+        return true;$

total: 1 errors, 1 warnings, 0 checks, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

Commit 69522ade1b4e ("riscv: net: bpf: add bpf_jit_supports_private_stack()") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 78.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
module-param
Desc: Detect module_param changes
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv: net: bpf: add bpf_jit_supports_private_stack()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 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