Skip to content

[PW_SID:958311] riscv control-flow integrity for usermode#356

Closed
linux-riscv-bot wants to merge 28 commits into
workflow__riscv__fixesfrom
pw958311
Closed

[PW_SID:958311] riscv control-flow integrity for usermode#356
linux-riscv-bot wants to merge 28 commits into
workflow__riscv__fixesfrom
pw958311

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 958311 applied to workflow__riscv__fixes

Name: riscv control-flow integrity for usermode
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=958311
Version: 14

Linux RISC-V bot and others added 28 commits April 24, 2025 20:46
VM_HIGH_ARCH_5 is used for riscv

Reviewed-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Make an entry for cfi extensions in extensions.yaml.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This patch adds support for detecting zicfiss and zicfilp. zicfiss and
zicfilp stands for unprivleged integer spec extension for shadow stack
and branch tracking on indirect branches, respectively.

This patch looks for zicfiss and zicfilp in device tree and accordinlgy
lights up bit in cpu feature bitmap. Furthermore this patch adds detection
utility functions to return whether shadow stack or landing pads are
supported by cpu.

Reviewed-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
zicfiss and zicfilp extension gets enabled via b3 and b2 in *envcfg CSR.
menvcfg controls enabling for S/HS mode. henvcfg control enabling for VS
while senvcfg controls enabling for U/VU mode.

zicfilp extension extends *status CSR to hold `expected landing pad` bit.
A trap or interrupt can occur between an indirect jmp/call and target
instr. `expected landing pad` bit from CPU is recorded into xstatus CSR so
that when supervisor performs xret, `expected landing pad` state of CPU can
be restored.

zicfiss adds one new CSR
- CSR_SSP: CSR_SSP contains current shadow stack pointer.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…ry/exit

Carves out space in arch specific thread struct for cfi status and shadow
stack in usermode on riscv.

This patch does following
- defines a new structure cfi_status with status bit for cfi feature
- defines shadow stack pointer, base and size in cfi_status structure
- defines offsets to new member fields in thread in asm-offsets.c
- Saves and restore shadow stack pointer on trap entry (U --> S) and exit
  (S --> U)

Shadow stack save/restore is gated on feature availiblity and implemented
using alternative. CSR can be context switched in `switch_to` as well but
soon as kernel shadow stack support gets rolled in, shadow stack pointer
will need to be switched at trap entry/exit point (much like `sp`). It can
be argued that kernel using shadow stack deployment scenario may not be as
prevalant as user mode using this feature. But even if there is some
minimal deployment of kernel shadow stack, that means that it needs to be
supported. And thus save/restore of shadow stack pointer in entry.S instead
of in `switch_to.h`.

Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
`arch_calc_vm_prot_bits` is implemented on risc-v to return VM_READ |
VM_WRITE if PROT_WRITE is specified. Similarly `riscv_sys_mmap` is
updated to convert all incoming PROT_WRITE to (PROT_WRITE | PROT_READ).
This is to make sure that any existing apps using PROT_WRITE still work.

Earlier `protection_map[VM_WRITE]` used to pick read-write PTE encodings.
Now `protection_map[VM_WRITE]` will always pick PAGE_SHADOWSTACK PTE
encodings for shadow stack. Above changes ensure that existing apps
continue to work because underneath kernel will be picking
`protection_map[VM_WRITE|VM_READ]` PTE encodings.

Reviewed-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This patch implements creating shadow stack pte (on riscv). Creating
shadow stack PTE on riscv means that clearing RWX and then setting W=1.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
pte_mkwrite creates PTEs with WRITE encodings for underlying arch.
Underlying arch can have two types of writeable mappings. One that can be
written using regular store instructions. Another one that can only be
written using specialized store instructions (like shadow stack stores).
pte_mkwrite can select write PTE encoding based on VMA range (i.e.
VM_SHADOW_STACK)

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
`fork` implements copy on write (COW) by making pages readonly in child
and parent both.

ptep_set_wrprotect and pte_wrprotect clears _PAGE_WRITE in PTE.
Assumption is that page is readable and on fault copy on write happens.

To implement COW on shadow stack pages, clearing up W bit makes them XWR =
000. This will result in wrong PTE setting which says no perms but V=1 and
PFN field pointing to final page. Instead desired behavior is to turn it
into a readable page, take an access (load/store) fault on sspush/sspop
(shadow stack) and then perform COW on such pages. This way regular reads
would still be allowed and not lead to COW maintaining current behavior
of COW on non-shadow stack but writeable memory.

On the other hand it doesn't interfere with existing COW for read-write
memory. Assumption is always that _PAGE_READ must have been set and thus
setting _PAGE_READ is harmless.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As discussed extensively in the changelog for the addition of this
syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the
existing mmap() and madvise() syscalls do not map entirely well onto the
security requirements for shadow stack memory since they lead to windows
where memory is allocated but not yet protected or stacks which are not
properly and safely initialised. Instead a new syscall map_shadow_stack()
has been defined which allocates and initialises a shadow stack page.

This patch implements this syscall for riscv. riscv doesn't require token
to be setup by kernel because user mode can do that by itself. However to
provide compatibility and portability with other architectues, user mode
can specify token set flag.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Userspace specifies CLONE_VM to share address space and spawn new thread.
`clone` allow userspace to specify a new stack for new thread. However
there is no way to specify new shadow stack base address without changing
API. This patch allocates a new shadow stack whenever CLONE_VM is given.

In case of CLONE_VFORK, parent is suspended until child finishes and thus
can child use parent shadow stack. In case of !CLONE_VM, COW kicks in
because entire address space is copied from parent to child.

`clone3` is extensible and can provide mechanisms using which shadow stack
as an input parameter can be provided. This is not settled yet and being
extensively discussed on mailing list. Once that's settled, this commit
will adapt to that.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Implement architecture agnostic prctls() interface for setting and getting
shadow stack status.

prctls implemented are PR_GET_SHADOW_STACK_STATUS,
PR_SET_SHADOW_STACK_STATUS and PR_LOCK_SHADOW_STACK_STATUS.

As part of PR_SET_SHADOW_STACK_STATUS/PR_GET_SHADOW_STACK_STATUS, only
PR_SHADOW_STACK_ENABLE is implemented because RISCV allows each mode to
write to their own shadow stack using `sspush` or `ssamoswap`.

PR_LOCK_SHADOW_STACK_STATUS locks current configuration of shadow stack
enabling.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Three architectures (x86, aarch64, riscv) have support for indirect branch
tracking feature in a very similar fashion. On a very high level, indirect
branch tracking is a CPU feature where CPU tracks branches which uses
memory operand to perform control transfer in program. As part of this
tracking on indirect branches, CPU goes in a state where it expects a
landing pad instr on target and if not found then CPU raises some fault
(architecture dependent)

x86 landing pad instr - `ENDBRANCH`
arch64 landing pad instr - `BTI`
riscv landing instr - `lpad`

Given that three major arches have support for indirect branch tracking,
This patch makes `prctl` for indirect branch tracking arch agnostic.

To allow userspace to enable this feature for itself, following prtcls are
defined:
 - PR_GET_INDIR_BR_LP_STATUS: Gets current configured status for indirect
   branch tracking.
 - PR_SET_INDIR_BR_LP_STATUS: Sets a configuration for indirect branch
   tracking.
   Following status options are allowed
       - PR_INDIR_BR_LP_ENABLE: Enables indirect branch tracking on user
         thread.
       - PR_INDIR_BR_LP_DISABLE; Disables indirect branch tracking on user
         thread.
 - PR_LOCK_INDIR_BR_LP_STATUS: Locks configured status for indirect branch
   tracking for user thread.

Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
prctls implemented are:
PR_SET_INDIR_BR_LP_STATUS, PR_GET_INDIR_BR_LP_STATUS and
PR_LOCK_INDIR_BR_LP_STATUS

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
zicfiss / zicfilp introduces a new exception to priv isa `software check
exception` with cause code = 18. This patch implements software check
exception.

Additionally it implements a cfi violation handler which checks for code
in xtval. If xtval=2, it means that sw check exception happened because of
an indirect branch not landing on 4 byte aligned PC or not landing on
`lpad` instruction or label value embedded in `lpad` not matching label
value setup in `x7`. If xtval=3, it means that sw check exception happened
because of mismatch between link register (x1 or x5) and top of shadow
stack (on execution of `sspopchk`).

In case of cfi violation, SIGSEGV is raised with code=SEGV_CPERR.
SEGV_CPERR was introduced by x86 shadow stack patches.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The function save_v_state() served two purposes. First, it saved
extension context into the signal stack. Then, it constructed the
extension header if there was no fault. The second part is independent
of the extension itself. As a result, we can pull that part out, so
future extensions may reuse it. This patch adds arch_ext_list and makes
setup_sigcontext() go through all possible extensions' save() callback.
The callback returns a positive value indicating the size of the
successfully saved extension. Then the kernel proceeds to construct the
header for that extension. The kernel skips an extension if it does
not exist, or if the saving fails for some reasons. The error code is
propagated out on the later case.

This patch does not introduce any functional changes.

Signed-off-by: Andy Chiu <andybnac@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Save shadow stack pointer in sigcontext structure while delivering signal.
Restore shadow stack pointer from sigcontext on sigreturn.

As part of save operation, kernel uses `ssamoswap` to save snapshot of
current shadow stack on shadow stack itself (can be called as a save
token). During restore on sigreturn, kernel retrieves token from top of
shadow stack and validates it. This allows that user mode can't arbitrary
pivot to any shadow stack address without having a token and thus provide
strong security assurance between signaly delivery and sigreturn window.

Use ABI compatible way of saving/restoring shadow stack pointer into
signal stack. This follows what Vector extension, where extra registers
are placed in a form of extension header + extension body in the stack.
The extension header indicates the size of the extra architectural
states plus the size of header itself, and a magic identifier of the
extension. Then, the extensions body contains the new architectural
states in the form defined by uapi.

Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Updating __show_regs to print captured shadow stack pointer as well.
On tasks where shadow stack is disabled, it'll simply print 0.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Expose a new register type NT_RISCV_USER_CFI for risc-v cfi status and
state. Intentionally both landing pad and shadow stack status and state
are rolled into cfi state. Creating two different NT_RISCV_USER_XXX would
not be useful and wastage of a note type. Enabling, disabling and locking
of feature is not allowed via ptrace set interface. However setting `elp`
state or setting shadow stack pointer are allowed via ptrace set interface
. It is expected `gdb` might have use to fixup `elp` state or `shadow
stack` pointer.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Adding enumeration of zicfilp and zicfiss extensions in hwprobe syscall.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This commit adds a kernel command line option using which user cfi can be
disabled. User backward cfi and forward cfi can be enabled independently.
Kernel command line parameter "riscv_nousercfi" can take below values:
 - "all" : Disable forward and backward cfi both.
 - "bcfi" : Disable backward cfi.
 - "fcfi" : Disable forward cfi

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Kernel will have to perform shadow stack operations on user shadow stack.
Like during signal delivery and sigreturn, shadow stack token must be
created and validated respectively. Thus shadow stack access for kernel
must be enabled.

In future when kernel shadow stacks are enabled for linux kernel, it must
be enabled as early as possible for better coverage and prevent imbalance
between regular stack and shadow stack. After `relocate_enable_mmu` has
been done, this is as early as possible it can enabled.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
user mode tasks compiled with zicfilp may call indirectly into vdso (like
hwprobe indirect calls). Add landing pad compile support in vdso. vdso
with landing pad in it will be nop for tasks which have not enabled
landing pad.
This patch allows to run user mode tasks with cfi eanbled and do no harm.

Future work can be done on this to do below
 - labeled landing pad on vdso functions (whenever labeling support shows
   up in gnu-toolchain)
 - emit shadow stack instructions only in vdso compiled objects as part of
   kernel compile.

Signed-off-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This patch creates a config for shadow stack support and landing pad instr
support. Shadow stack support and landing instr support can be enabled by
selecting `CONFIG_RISCV_USER_CFI`. Selecting `CONFIG_RISCV_USER_CFI` wires
up path to enumerate CPU support and if cpu support exists, kernel will
support cpu assisted user mode cfi.

If CONFIG_RISCV_USER_CFI is selected, select `ARCH_USES_HIGH_VMA_FLAGS`,
`ARCH_HAS_USER_SHADOW_STACK` and DYNAMIC_SIGFRAME for riscv.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Adding documentation on landing pad aka indirect branch tracking on riscv
and kernel interfaces exposed so that user tasks can enable it.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Adding documentation on shadow stack for user mode on riscv and kernel
interfaces exposed so that user tasks can enable it.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Adds kselftest for RISC-V control flow integrity implementation for user
mode. There is not a lot going on in kernel for enabling landing pad for
user mode. cfi selftest are intended to be compiled with zicfilp and
zicfiss enabled compiler. Thus kselftest simply checks if landing pad /
shadow stack for the process are enabled or not and executes ptrace
selftests on cfi. selftest then register a signal handler for SIGSEGV.
Any control flow violation are reported as SIGSEGV with si_code =
SEGV_CPERR. Test will fail on receiving any SEGV_CPERR. Shadow stack part
has more changes in kernel and thus there are separate tests for that

- Exercise `map_shadow_stack` syscall
- `fork` test to make sure COW works for shadow stack pages
- gup tests
  Kernel uses FOLL_FORCE when access happens to memory via
  /proc/<pid>/mem. Not breaking that for shadow stack.
- signal test. Make sure signal delivery results in token creation on
  shadow stack and consumes (and verifies) token on sigreturn
- shadow stack protection test. attempts to write using regular store
  instruction on shadow stack memory must result in access faults

Test outut
==========

"""
TAP version 13
1..5
  This is to ensure shadow stack is indeed enabled and working
  This is to ensure shadow stack is indeed enabled and working
ok 1 shstk fork test
ok 2 map shadow stack syscall
ok 3 shadow stack gup tests
ok 4 shadow stack signal tests
ok 5 memory protections of shadow stack memory
"""

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v14,01/27] mm: VM_SHADOW_STACK definition for riscv"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 110.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v14,01/27] mm: VM_SHADOW_STACK definition for riscv"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1616.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 25: "[v14,25/27] riscv: Documentation for landing pad / indirect branch tracking"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 25: "[v14,25/27] riscv: Documentation for landing pad / indirect branch tracking"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 25: "[v14,25/27] riscv: Documentation for landing pad / indirect branch tracking"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 25: "[v14,25/27] riscv: Documentation for landing pad / indirect branch tracking"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 29.52 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:14.557996
I: default: FAIL in 0:00:08.176899
I: kernel: SKIP in 0:00:00.000008
I: xipkernel: SKIP in 0:00:00.000005
I: modules: FAIL in 0:00:00.101196
I: dtbs: PASS in 0:00:01.964707
I: dtbs-legacy: SKIP in 0:00:00.004827
I: debugkernel: SKIP in 0:00:00.000004
I: headers: PASS in 0:00:01.018963
I: build output in /build/tmp.gUya8SQDqk
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=rv32_defconfig --toolchain=llvm --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.gUya8SQDqk/build/= --runtime=null --image=docker.io/tuxmake/riscv_clang CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' rv32_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang'
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
      |                              SBI_EXT_SRST
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^
/build/tmp7vx4d7tp/arch/riscv/include/asm/sbi.h:32:2: note: 'SBI_EXT_SRST' declared here
   32 |         SBI_EXT_SRST = 0x53525354,
      |         ^
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
      |                                  SBI_EXT_SRST_RESET
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^
/build/tmp7vx4d7tp/arch/riscv/include/asm/sbi.h:107:2: note: 'SBI_EXT_SRST_RESET' declared here
  107 |         SBI_EXT_SRST_RESET = 0,
      |         ^
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^
4 errors generated.
make[3]: *** [/build/tmp7vx4d7tp/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmp7vx4d7tp/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmp7vx4d7tp/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
rm -rf /build/tmp.gUya8SQDqk/build/modinstall
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=/build/tmp.gUya8SQDqk/build/modinstall ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' modules_install
make[3]: *** No rule to make target 'modules.order', needed by '/build/tmp.gUya8SQDqk/build/modinstall/lib/modules/6.15.0-rc3-00029-g62a85319c933/modules.order'.
make[3]: *** No rule to make target 'modules.builtin', needed by '/build/tmp.gUya8SQDqk/build/modinstall/lib/modules/6.15.0-rc3-00029-g62a85319c933/modules.builtin'.
make[3]: *** No rule to make target 'modules.builtin.modinfo', needed by '/build/tmp.gUya8SQDqk/build/modinstall/lib/modules/6.15.0-rc3-00029-g62a85319c933/modules.builtin.modinfo'.
make[3]: Target '__modinst' not remade because of errors.
make[2]: *** [/build/tmp7vx4d7tp/Makefile:1917: modules_install] Error 2
make[1]: *** [/build/tmp7vx4d7tp/Makefile:248: __sub-make] Error 2
make[1]: Target 'modules_install' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'modules_install' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build INSTALL_DTBS_PATH=/build/tmp.gUya8SQDqk/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs
rm -rf /build/tmp.gUya8SQDqk/build/dtbsinstall
mkdir -p /build/tmp.gUya8SQDqk/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build INSTALL_DTBS_PATH=/build/tmp.gUya8SQDqk/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.gUya8SQDqk/build/dtbs.tar -C /build/tmp.gUya8SQDqk/build/dtbsinstall dtbs
rm -rf /build/tmp.gUya8SQDqk/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.gUya8SQDqk/build INSTALL_HDR_PATH=/build/tmp.gUya8SQDqk/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.gUya8SQDqk/build/headers.tar -C /build/tmp.gUya8SQDqk/build/install_hdr .
warnings/errors:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 20.28 seconds
Result: ERROR
Output:

Redirect to /build/tmp.u19qGkkF8t and /build/tmp.adNKXhw67A
Tree base:
4171c7c84c5a3 ("riscv: Documentation for landing pad / indirect branch tracking")
Building the whole tree with the patch
error:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'



real	0m19.074s
user	0m12.869s
sys	0m22.108s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 18.77 seconds
Result: ERROR
Output:

Redirect to /build/tmp.QGNJZMOB4F and /build/tmp.tNmUfcPA5j
Tree base:
4171c7c84c5a3 ("riscv: Documentation for landing pad / indirect branch tracking")
Building the whole tree with the patch
error:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function); did you mean 'SBI_EXT_SRST'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function); did you mean 'SBI_EXT_SRST_RESET'?
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)



real	0m17.429s
user	0m19.439s
sys	0m19.294s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 11.39 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:03.733072
I: default: FAIL in 0:00:02.346490
I: kernel: SKIP in 0:00:00.000008
I: xipkernel: SKIP in 0:00:00.000004
I: modules: SKIP in 0:00:00.002859
I: dtbs: PASS in 0:00:01.477079
I: dtbs-legacy: SKIP in 0:00:00.004686
I: debugkernel: SKIP in 0:00:00.000004
I: headers: PASS in 0:00:01.167927
I: build output in /build/tmp.nAroJzPhqz
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=nommu_k210_defconfig --toolchain=gcc --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.nAroJzPhqz/build/= --runtime=null --image=docker.io/tuxmake/riscv_gcc CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.nAroJzPhqz/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' nommu_k210_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.nAroJzPhqz/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc'
In file included from /build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:7:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: note: each undeclared identifier is reported only once for each function it appears in
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
make[3]: *** [/build/tmp7vx4d7tp/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmp7vx4d7tp/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmp7vx4d7tp/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.nAroJzPhqz/build INSTALL_DTBS_PATH=/build/tmp.nAroJzPhqz/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs
rm -rf /build/tmp.nAroJzPhqz/build/dtbsinstall
mkdir -p /build/tmp.nAroJzPhqz/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.nAroJzPhqz/build INSTALL_DTBS_PATH=/build/tmp.nAroJzPhqz/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.nAroJzPhqz/build/dtbs.tar -C /build/tmp.nAroJzPhqz/build/dtbsinstall dtbs
rm -rf /build/tmp.nAroJzPhqz/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.nAroJzPhqz/build INSTALL_HDR_PATH=/build/tmp.nAroJzPhqz/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.nAroJzPhqz/build/headers.tar -C /build/tmp.nAroJzPhqz/build/install_hdr .
warnings/errors:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 11.29 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:03.700028
I: default: FAIL in 0:00:02.374779
I: kernel: SKIP in 0:00:00.000008
I: xipkernel: SKIP in 0:00:00.000004
I: modules: SKIP in 0:00:00.001627
I: dtbs: PASS in 0:00:01.501470
I: dtbs-legacy: SKIP in 0:00:00.004727
I: debugkernel: SKIP in 0:00:00.000016
I: headers: PASS in 0:00:01.140378
I: build output in /build/tmp.uRnrpXiAsU
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=nommu_virt_defconfig --toolchain=gcc --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.uRnrpXiAsU/build/= --runtime=null --image=docker.io/tuxmake/riscv_gcc CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.uRnrpXiAsU/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' nommu_virt_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.uRnrpXiAsU/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc'
In file included from /build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:7:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: note: each undeclared identifier is reported only once for each function it appears in
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
/build/tmp7vx4d7tp/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
make[3]: *** [/build/tmp7vx4d7tp/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmp7vx4d7tp/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmp7vx4d7tp/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.uRnrpXiAsU/build INSTALL_DTBS_PATH=/build/tmp.uRnrpXiAsU/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs
rm -rf /build/tmp.uRnrpXiAsU/build/dtbsinstall
mkdir -p /build/tmp.uRnrpXiAsU/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.uRnrpXiAsU/build INSTALL_DTBS_PATH=/build/tmp.uRnrpXiAsU/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.uRnrpXiAsU/build/dtbs.tar -C /build/tmp.uRnrpXiAsU/build/dtbsinstall dtbs
rm -rf /build/tmp.uRnrpXiAsU/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.uRnrpXiAsU/build INSTALL_HDR_PATH=/build/tmp.uRnrpXiAsU/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.uRnrpXiAsU/build/headers.tar -C /build/tmp.uRnrpXiAsU/build/install_hdr .
warnings/errors:
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmp7vx4d7tp/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.84 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#31: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 186 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.

Commit 62a85319c933 ("riscv: Documentation for shadow stack on riscv") 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.
total: 0 errors, 1 warnings, 0 checks, 186 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 68.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 26: "[v14,26/27] riscv: Documentation for shadow stack on riscv"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 28.52 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:14.609310
I: default: FAIL in 0:00:07.618940
I: kernel: SKIP in 0:00:00.000009
I: xipkernel: SKIP in 0:00:00.000005
I: modules: FAIL in 0:00:00.092732
I: dtbs: PASS in 0:00:01.568835
I: dtbs-legacy: SKIP in 0:00:00.004544
I: debugkernel: SKIP in 0:00:00.000004
I: headers: PASS in 0:00:00.995460
I: build output in /build/tmp.MPBkH3GS8O
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=rv32_defconfig --toolchain=llvm --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.MPBkH3GS8O/build/= --runtime=null --image=docker.io/tuxmake/riscv_clang CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' rv32_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang'
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
      |                              SBI_EXT_SRST
/build/tmpglhewrmi/include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^
/build/tmpglhewrmi/arch/riscv/include/asm/sbi.h:32:2: note: 'SBI_EXT_SRST' declared here
   32 |         SBI_EXT_SRST = 0x53525354,
      |         ^
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
      |                                  SBI_EXT_SRST_RESET
/build/tmpglhewrmi/include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^
/build/tmpglhewrmi/arch/riscv/include/asm/sbi.h:107:2: note: 'SBI_EXT_SRST_RESET' declared here
  107 |         SBI_EXT_SRST_RESET = 0,
      |         ^
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^
4 errors generated.
make[3]: *** [/build/tmpglhewrmi/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmpglhewrmi/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmpglhewrmi/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
rm -rf /build/tmp.MPBkH3GS8O/build/modinstall
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=/build/tmp.MPBkH3GS8O/build/modinstall ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' modules_install
make[3]: *** No rule to make target 'modules.order', needed by '/build/tmp.MPBkH3GS8O/build/modinstall/lib/modules/6.15.0-rc3-00030-gae65c14e1010/modules.order'.
make[3]: *** No rule to make target 'modules.builtin', needed by '/build/tmp.MPBkH3GS8O/build/modinstall/lib/modules/6.15.0-rc3-00030-gae65c14e1010/modules.builtin'.
make[3]: *** No rule to make target 'modules.builtin.modinfo', needed by '/build/tmp.MPBkH3GS8O/build/modinstall/lib/modules/6.15.0-rc3-00030-gae65c14e1010/modules.builtin.modinfo'.
make[3]: Target '__modinst' not remade because of errors.
make[2]: *** [/build/tmpglhewrmi/Makefile:1917: modules_install] Error 2
make[1]: *** [/build/tmpglhewrmi/Makefile:248: __sub-make] Error 2
make[1]: Target 'modules_install' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'modules_install' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build INSTALL_DTBS_PATH=/build/tmp.MPBkH3GS8O/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs
rm -rf /build/tmp.MPBkH3GS8O/build/dtbsinstall
mkdir -p /build/tmp.MPBkH3GS8O/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build INSTALL_DTBS_PATH=/build/tmp.MPBkH3GS8O/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.MPBkH3GS8O/build/dtbs.tar -C /build/tmp.MPBkH3GS8O/build/dtbsinstall dtbs
rm -rf /build/tmp.MPBkH3GS8O/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.MPBkH3GS8O/build INSTALL_HDR_PATH=/build/tmp.MPBkH3GS8O/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- LLVM=1 'CC=ccache clang' 'HOSTCC=ccache clang' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.MPBkH3GS8O/build/headers.tar -C /build/tmp.MPBkH3GS8O/build/install_hdr .
warnings/errors:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 20.23 seconds
Result: ERROR
Output:

Redirect to /build/tmp.IZtE8qvJbI and /build/tmp.Rr4FRfB51J
Tree base:
62a85319c9336 ("riscv: Documentation for shadow stack on riscv")
Building the whole tree with the patch
error:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:23: error: use of undeclared identifier 'SBI_EXT_FWFT'; did you mean 'SBI_EXT_SRST'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:27: error: use of undeclared identifier 'SBI_EXT_FWFT_SET'; did you mean 'SBI_EXT_SRST_RESET'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:32: error: use of undeclared identifier 'SBI_FWFT_SHADOW_STACK'
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:33: error: use of undeclared identifier 'SBI_FWFT_SET_FLAG_LOCK'



real	0m18.859s
user	0m12.844s
sys	0m22.170s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 19.06 seconds
Result: ERROR
Output:

Redirect to /build/tmp.hgCCKz3eeU and /build/tmp.8ZD00nsQWl
Tree base:
62a85319c9336 ("riscv: Documentation for shadow stack on riscv")
Building the whole tree with the patch
error:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function); did you mean 'SBI_EXT_SRST'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function); did you mean 'SBI_EXT_SRST_RESET'?
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)



real	0m17.613s
user	0m19.490s
sys	0m19.247s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 10.35 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:03.710947
I: default: FAIL in 0:00:02.027353
I: kernel: SKIP in 0:00:00.000008
I: xipkernel: SKIP in 0:00:00.000004
I: modules: SKIP in 0:00:00.003137
I: dtbs: PASS in 0:00:01.195188
I: dtbs-legacy: SKIP in 0:00:00.004482
I: debugkernel: SKIP in 0:00:00.000005
I: headers: PASS in 0:00:01.174015
I: build output in /build/tmp.sBLKVeuoeo
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=nommu_k210_defconfig --toolchain=gcc --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.sBLKVeuoeo/build/= --runtime=null --image=docker.io/tuxmake/riscv_gcc CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.sBLKVeuoeo/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' nommu_k210_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.sBLKVeuoeo/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc'
In file included from /build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:7:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: note: each undeclared identifier is reported only once for each function it appears in
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
make[3]: *** [/build/tmpglhewrmi/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmpglhewrmi/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmpglhewrmi/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.sBLKVeuoeo/build INSTALL_DTBS_PATH=/build/tmp.sBLKVeuoeo/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs
rm -rf /build/tmp.sBLKVeuoeo/build/dtbsinstall
mkdir -p /build/tmp.sBLKVeuoeo/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.sBLKVeuoeo/build INSTALL_DTBS_PATH=/build/tmp.sBLKVeuoeo/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.sBLKVeuoeo/build/dtbs.tar -C /build/tmp.sBLKVeuoeo/build/dtbsinstall dtbs
rm -rf /build/tmp.sBLKVeuoeo/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.sBLKVeuoeo/build INSTALL_HDR_PATH=/build/tmp.sBLKVeuoeo/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.sBLKVeuoeo/build/headers.tar -C /build/tmp.sBLKVeuoeo/build/install_hdr .
warnings/errors:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 10.11 seconds
Result: ERROR
Output:

Full log:
W: Support for running offline not available (unshare: unshare failed: Operation not permitted)
I: config: PASS in 0:00:03.566259
I: default: FAIL in 0:00:02.016361
I: kernel: SKIP in 0:00:00.000009
I: xipkernel: SKIP in 0:00:00.000004
I: modules: SKIP in 0:00:00.002523
I: dtbs: PASS in 0:00:01.181033
I: dtbs-legacy: SKIP in 0:00:00.004733
I: debugkernel: SKIP in 0:00:00.000004
I: headers: PASS in 0:00:01.132687
I: build output in /build/tmp.YycHLG0Lgu
tuxmake --download-all-korg-gcc-toolchains --target-arch=riscv --kconfig=nommu_virt_defconfig --toolchain=gcc --wrapper=ccache --environment=KBUILD_BUILD_TIMESTAMP=@1621270510 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --environment=KCFLAGS=-ffile-prefix-map=/build/tmp.YycHLG0Lgu/build/= --runtime=null --image=docker.io/tuxmake/riscv_gcc CROSS_COMPILE=riscv64-linux- config default kernel xipkernel modules dtbs dtbs-legacy debugkernel headers
make --silent --keep-going --jobs=48 O=/build/tmp.YycHLG0Lgu/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' nommu_virt_defconfig
make --silent --keep-going --jobs=48 O=/build/tmp.YycHLG0Lgu/build ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc'
In file included from /build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:7:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: note: each undeclared identifier is reported only once for each function it appears in
  517 |         DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
      |                              ^~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
  518 |         DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
      |                                  ^~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
  519 |         DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)
  520 |         DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
/build/tmpglhewrmi/include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
    6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
      |                                                                     ^~~
make[3]: *** [/build/tmpglhewrmi/scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [/build/tmpglhewrmi/Makefile:1282: prepare0] Error 2
make[2]: Target '__all' not remade because of errors.
make[1]: *** [/build/tmpglhewrmi/Makefile:248: __sub-make] Error 2
make[1]: Target '__all' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target '__all' not remade because of errors.
make --silent --keep-going --jobs=48 O=/build/tmp.YycHLG0Lgu/build INSTALL_DTBS_PATH=/build/tmp.YycHLG0Lgu/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs
rm -rf /build/tmp.YycHLG0Lgu/build/dtbsinstall
mkdir -p /build/tmp.YycHLG0Lgu/build/dtbsinstall/dtbs
make --silent --keep-going --jobs=48 O=/build/tmp.YycHLG0Lgu/build INSTALL_DTBS_PATH=/build/tmp.YycHLG0Lgu/build/dtbsinstall/dtbs ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' dtbs_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.YycHLG0Lgu/build/dtbs.tar -C /build/tmp.YycHLG0Lgu/build/dtbsinstall dtbs
rm -rf /build/tmp.YycHLG0Lgu/build/install_hdr
make --silent --keep-going --jobs=48 O=/build/tmp.YycHLG0Lgu/build INSTALL_HDR_PATH=/build/tmp.YycHLG0Lgu/build/install_hdr/ ARCH=riscv CROSS_COMPILE=riscv64-linux- 'CC=ccache riscv64-linux-gcc' 'HOSTCC=ccache gcc' headers_install
tar --sort=name --owner=tuxmake:1000 --group=tuxmake:1000 --mtime=@1745990405 --clamp-mtime -caf /build/tmp.YycHLG0Lgu/build/headers.tar -C /build/tmp.YycHLG0Lgu/build/install_hdr .
warnings/errors:
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:517:30: error: 'SBI_EXT_FWFT' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:518:34: error: 'SBI_EXT_FWFT_SET' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:519:39: error: 'SBI_FWFT_SHADOW_STACK' undeclared (first use in this function)
/build/tmpglhewrmi/arch/riscv/kernel/asm-offsets.c:520:40: error: 'SBI_FWFT_SET_FLAG_LOCK' undeclared (first use in this function)


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.83 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#73: 
new file mode 100644

CHECK: Lines should not end with a '('
#258: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:68:
+		asm volatile (

WARNING: unnecessary whitespace before a quoted newline
#260: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:70:
+		"jalr a5 \n"

WARNING: unnecessary whitespace before a quoted newline
#261: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:71:
+		"nop \n"

WARNING: unnecessary whitespace before a quoted newline
#262: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:72:
+		"nop \n"

CHECK: braces {} should be used on all arms of this statement
#276: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:86:
+		if (WIFSTOPPED(status)) {
[...]
+		} else
[...]

CHECK: Unbalanced braces around else statement
#281: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:91:
+		} else

CHECK: Alignment should match open parenthesis
#291: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:101:
+				ksft_exit_fail_msg("%s: ptrace_getregset failed, %llu\n", __func__,
+				cfi_reg.cfi_status.cfi_state);

CHECK: Alignment should match open parenthesis
#294: FILE: tools/testing/selftests/riscv/cfi/riscv_cfi_test.c:104:
+				ksft_exit_fail_msg("%s: NULL shadow stack pointer, test failed\n",
+				__func__);

WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
#647: FILE: tools/testing/selftests/riscv/cfi/shadowstack.c:280:
+volatile bool break_loop;

total: 0 errors, 5 warnings, 5 checks, 686 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.

Commit ae65c14e1010 ("kselftest/riscv: kselftest for user mode cfi") 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.
total: 0 errors, 5 warnings, 5 checks, 686 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Lines should not end with a '('
CHECK: Unbalanced braces around else statement
CHECK: braces {} should be used on all arms of this statement
WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
WARNING: unnecessary whitespace before a quoted newline


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 68.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
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 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 27: "[v14,27/27] kselftest/riscv: kselftest for user mode cfi"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw958311 branch May 3, 2025 01:01
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.

4 participants