Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
c479639
riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
huth Jun 6, 2025
b5eb1f1
riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers
huth Jun 6, 2025
8bff2a2
Merge patch series "riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ in…
Jul 27, 2025
cc750fa
riscv: pi: use 'targets' instead of extra-y in Makefile
masahir0y Jun 2, 2025
3de2935
riscv: cpufeature: add validation for zfa, zfh and zfhmin
clementleger May 27, 2025
ccf4b41
riscv: Fix typo EXRACT -> EXTRACT
Jun 20, 2025
f95d2f2
riscv: Strengthen duplicate and inconsistent definition of RV_X()
Jun 20, 2025
548c3b6
riscv: Move all duplicate insn parsing macros into asm/insn.h
Jun 20, 2025
98c338f
Merge patch series "Move duplicated instructions macros into asm/insn.h"
Jul 31, 2025
10edac3
riscv: kprobes: Move branch_rs2_idx to insn.h
covanam May 14, 2025
3519e89
riscv: kprobes: Move branch_funct3 to insn.h
covanam May 14, 2025
6d446b4
riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM
covanam May 14, 2025
f37f01e
riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG
covanam May 14, 2025
7f47936
riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM
covanam May 14, 2025
0f8e566
riscv: kproves: Remove duplication of RVC_EXTRACT_JTYPE_IMM
covanam May 14, 2025
c64e2ed
riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG
covanam May 14, 2025
6b04a73
riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM
covanam May 14, 2025
2e6ebda
riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG
covanam May 14, 2025
715fe42
riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM
covanam May 14, 2025
49330b1
riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM
covanam May 14, 2025
f77d2a8
Merge patch series "riscv: kprobes: Clean up instruction simulation"
Jul 31, 2025
114a5c9
riscv: Add kprobes KUnit test
covanam May 13, 2025
5169c08
riscv: mmap(): use unsigned offset type in riscv_sys_mmap
Jul 7, 2025
736d67e
riscv: Move vendor errata definitions to new header
guoren83 Jul 13, 2025
b7f09bd
riscv: errata: Add ERRATA_THEAD_WRITE_ONCE fixup
guoren83 Jul 13, 2025
37b36d5
raid6: riscv: Clean up unused header file inclusion
Chunyan-iscas Jul 18, 2025
ae1e25a
raid6: riscv: replace one load with a move to speed up the caculation
Chunyan-iscas Jul 18, 2025
eda4602
raid6: riscv: Prevent compiler with vector support to build already v…
Chunyan-iscas Jul 18, 2025
e3493fd
raid6: riscv: Allow code to be compiled in userspace
Chunyan-iscas Jul 18, 2025
db001a4
raid6: test: Add support for RISC-V
lyrazhang Jul 18, 2025
75ede0a
riscv: mm: Return intended SATP mode for noXlvl options
pigmoral Jul 21, 2025
a870d4f
riscv: mm: Use mmu-type from FDT to limit SATP mode
pigmoral Jul 21, 2025
9ad032b
riscv: Enable ARCH_HAVE_NMI_SAFE_CMPXCHG
Jul 11, 2025
bf65943
selftests: riscv: add misaligned access testing
clementleger Jul 11, 2025
3460a88
Merge patch series "riscv: errata: Add ERRATA_THEAD_WRITE_ONCE fixup"
Jul 31, 2025
c0edf8c
Merge patch series "Add an optimization also raid6test for RISC-V sup…
Jul 31, 2025
16b0622
riscv: introduce asm/swab.h
IEncinas10 Jul 23, 2025
52f43e3
Merge patch series "riscv: mm: Use mmu-type from FDT as SATP mode limit"
Jul 31, 2025
a10ce19
riscv: uaccess: fix __put_user_nocheck for unaligned accesses
aurel32 Jul 24, 2025
5fcea02
riscv: use lw when reading int cpu in new_vmalloc_check
radimkrcmar Jul 25, 2025
47e006c
riscv: use lw when reading int cpu in asm_per_cpu
radimkrcmar Jul 25, 2025
a1984b2
riscv: use TASK_TI_CPU instead of TASK_TI_CPU_NUM
radimkrcmar Jul 25, 2025
9b3a86b
riscv: pack rv64 thread_info better
radimkrcmar Jul 25, 2025
1145fb2
Merge patch series "riscv: minor thread_info.cpu improvements"
Jul 31, 2025
06d48c2
dt-bindings: riscv: Add xmipsexectl ISA extension description
aleksapaunovic-htec Jul 24, 2025
02b01df
riscv: Add xmipsexectl as a vendor extension
aleksapaunovic-htec Jul 24, 2025
d85071f
riscv: Add xmipsexectl instructions
aleksapaunovic-htec Jul 24, 2025
20b80c7
riscv: hwprobe: Add MIPS vendor extension probing
aleksapaunovic-htec Jul 24, 2025
c714fbc
riscv: hwprobe: Document MIPS xmipsexectl vendor extension
aleksapaunovic-htec Jul 24, 2025
378afb5
riscv: Add tools support for xmipsexectl
aleksapaunovic-htec Jul 24, 2025
8382189
riscv: errata: Fix the PAUSE Opcode for MIPS P8700
djtodoro Jul 24, 2025
7df869e
Merge patch series "riscv: Add support for xmipsexectl"
Jul 31, 2025
1f76866
RISC-V: ACPI: enable parsing the BGRT table
xypron Jul 29, 2025
bf2825b
ACPI: support BGRT table on RISC-V
xypron Jul 29, 2025
c172529
Merge patch series "ACPI: support BGRT table on RISC-V"
Jul 31, 2025
5ec6b49
riscv: introduce ioremap_wc()
cuiyunhui Jul 22, 2025
cbac192
mm: VM_SHADOW_STACK definition for riscv
deepak0414 Jul 31, 2025
529ea23
dt-bindings: riscv: zicfilp and zicfiss in dt-bindings (extensions.yaml)
deepak0414 Jul 31, 2025
2672fcc
riscv: zicfiss / zicfilp enumeration
deepak0414 Jul 31, 2025
9c6a894
riscv: zicfiss / zicfilp extension csr and bit definitions
deepak0414 Jul 31, 2025
b01f653
riscv: usercfi state for task and save/restore of CSR_SSP on trap ent…
deepak0414 Jul 31, 2025
c13b2d7
riscv/mm : ensure PROT_WRITE leads to VM_READ | VM_WRITE
deepak0414 Jul 31, 2025
68cd733
riscv/mm: manufacture shadow stack pte
deepak0414 Jul 31, 2025
50c9b96
riscv/mm: teach pte_mkwrite to manufacture shadow stack PTEs
deepak0414 Jul 31, 2025
cbcccac
riscv/mm: write protect and shadow stack
deepak0414 Jul 31, 2025
26e35e7
riscv/mm: Implement map_shadow_stack() syscall
deepak0414 Jul 31, 2025
9c72a71
riscv/shstk: If needed allocate a new shadow stack on clone
deepak0414 Jul 31, 2025
52eff0a
riscv: Implements arch agnostic shadow stack prctls
deepak0414 Jul 31, 2025
1576906
prctl: arch-agnostic prctl for indirect branch tracking
deepak0414 Jul 31, 2025
e97ca20
riscv: Implements arch agnostic indirect branch tracking prctls
deepak0414 Jul 31, 2025
d88b767
riscv/traps: Introduce software check exception and uprobe handling
deepak0414 Jul 31, 2025
63e713f
riscv: signal: abstract header saving for setup_sigcontext
AndybnACT Jul 31, 2025
5b04bbd
riscv/signal: save and restore of shadow stack for signal
deepak0414 Jul 31, 2025
1400341
riscv/kernel: update __show_regs to print shadow stack register
deepak0414 Jul 31, 2025
982c862
riscv/ptrace: riscv cfi status and state via ptrace and in core files
deepak0414 Jul 31, 2025
07b1d75
riscv/hwprobe: zicfilp / zicfiss enumeration in hwprobe
deepak0414 Jul 31, 2025
2c268d3
riscv: kernel command line option to opt out of user cfi
deepak0414 Jul 31, 2025
4ff7e89
riscv: enable kernel access to shadow stack memory via FWFT sbi call
deepak0414 Jul 31, 2025
a824222
arch/riscv: compile vdso with landing pad and shadow stack note
cwshu Jul 31, 2025
5bb3663
riscv: create a config for shadow stack and landing pad instr support
deepak0414 Jul 31, 2025
9868b87
riscv: Documentation for landing pad / indirect branch tracking
deepak0414 Jul 31, 2025
a56a537
riscv: Documentation for shadow stack on riscv
deepak0414 Jul 31, 2025
fd40e4a
kselftest/riscv: kselftest for user mode cfi
deepak0414 Jul 31, 2025
e040fd6
Merge patch series "riscv control-flow integrity for usermode"
Aug 1, 2025
e8f6f1c
Adding CI files
Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/.MISSING_LINARO_DEP.swp
Binary file not shown.
Binary file added .github/.swp
Binary file not shown.
11 changes: 11 additions & 0 deletions .github/MISSING_LINARO_DEP
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
gdb (ltp vma05)
libnuma (ltp vma02-4)
swap file (swapping01)
fusermount (run_fuse_test.sh)
libfuse (run_fuse_test.sh)
mkisofs genisoimage xorrisofs (isofs.sh)
all modules (binfmt_misc0X)
mksquashfs
LTP_TIMEOUT_MUL > 1 (starvation)
libubsan ()
XXX (ltp-aiodio MUST be added)
Binary file added .github/scripts/.kunit_tests.sh.swp
Binary file not shown.
Binary file added .github/scripts/.patches.sh.swp
Binary file not shown.
30 changes: 30 additions & 0 deletions .github/scripts/build_ubuntu_defconfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2024 Rivos Inc.
#
# SPDX-License-Identifier: Apache-2.0

set -euox pipefail
d=$(dirname "${BASH_SOURCE[0]}")
. $d/series/utils.sh

logs=$(get_logs_dir)
f=${logs}/build_ubuntu_defconfig.log

date -Iseconds | tee -a ${f}
echo "Build an ubuntu kernel" | tee -a ${f}
echo "Top 16 commits" | tee -a ${f}
git log -16 --abbrev=12 --pretty="commit %h (\"%s\")" | tee -a ${f}

kernel_base_sha=$(git log -1 --pretty=%H $(git log -1 --reverse --pretty=%H .github)^)
build_name=$(git describe --tags --abbrev=13 ${kernel_base_sha})
echo "build_name ${build_name}" | tee -a ${f}

# Build the kernel that will run LTP
export CI_TRIPLE="riscv64-unknown-linux-gnu"
# Use a CFI-enabled toolchain
export PATH=/build/INSTALL_June/bin:$PATH
cp $d/series/kconfigs/ubuntu_defconfig arch/riscv/configs/
$d/series/kernel_builder.sh rv64 testsuites plain gcc | tee -a ${f}

kernel_dir="/build/$(gen_kernel_name rv64 testsuites plain gcc)"
echo $build_name > $kernel_dir/kernel_version
2 changes: 2 additions & 0 deletions .github/scripts/ci/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .base import Base, EndTest, Verdict, submit_pw_check
from .shelltest import ShellTest
120 changes: 120 additions & 0 deletions .github/scripts/ci/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
from abc import ABC, abstractmethod
from enum import Enum
import time
import sys

from libs import utils

sys.path.insert(0, '../libs')
from libs import log_debug

class Verdict(Enum):
PENDING = 0
PASS = 1
FAIL = 2
ERROR = 3
SKIP = 4
WARNING = 5


class EndTest(Exception):
"""
End of Test
"""

class Base(ABC):
"""
Base class for CI Tests.
"""
def __init__(self):
self.start_time = 0
self.end_time = 0
self.verdict = Verdict.PENDING
self.output = ""

def success(self):
self.end_timer()
self.verdict = Verdict.PASS

def error(self, msg):
self.verdict = Verdict.ERROR
self.output = msg
self.end_timer()
raise EndTest

def warning(self, msg):
self.verdict = Verdict.WARNING
self.output = msg
self.end_timer()

def skip(self, msg):
self.verdict = Verdict.SKIP
self.output = msg
self.end_timer()
raise EndTest

def add_failure(self, msg):
self.verdict = Verdict.FAIL
if not self.output:
self.output = msg
else:
self.output += "\n" + msg

def add_failure_end_test(self, msg):
self.add_failure(msg)
self.end_timer()
raise EndTest

def start_timer(self):
self.start_time = time.time()

def end_timer(self):
self.end_time = time.time()

def elapsed(self):
if self.start_time == 0:
return 0
if self.end_time == 0:
self.end_timer()
return self.end_time - self.start_time

def log_err(self, msg):
utils.log_error(f"CI: {self.name}: {msg}")

def log_info(self, msg):
utils.log_info(f"CI: {self.name}: {msg}")

def log_dbg(self, msg):
utils.log_debug(f"CI: {self.name}: {msg}")

@abstractmethod
def run(self, worktree=None):
"""
The child class should implement run() method
If the test fail, it should raise the EndTest exception
"""
pass

@abstractmethod
def post_run(self):
"""
The child class should implement post_run() method
"""
pass


def submit_pw_check(pw, patch, name, verdict, desc, url=None, dry_run=False):

utils.log_debug(f"Submitting the result to PW: dry_run={dry_run}")

if not dry_run:
state = 0

if verdict == Verdict.PASS:
state = 1
if verdict == Verdict.WARNING:
state = 2
if verdict == Verdict.FAIL:
state = 3

pw.post_check(patch, name, state, desc, url)
67 changes: 67 additions & 0 deletions .github/scripts/ci/shelltest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
from gettext import install
import os
import sys

sys.path.insert(0, '../libs')
from libs import RepoTool, cmd_run

from ci import Base, Verdict, EndTest, submit_pw_check

class ShellTest(Base):
"""Run shell test class
This class runs a shell based test
"""

def __init__(self, ci_data, patch, name, desc, sh):

# Common
self.name = name
self.desc = desc
self.ci_data = ci_data

self.sh = sh
self.patch = patch

super().__init__()

self.log_dbg("Initialization completed")

def run(self, worktree=None):

self.log_dbg("Run")
self.start_timer()

current_script_path = os.path.dirname(os.path.abspath(__file__))

cwd = worktree if worktree else self.ci_data.src_dir
cmd = ["bash", f"{current_script_path}/../pw_tests/{self.sh}"]
(ret, stdout, stderr) = cmd_run(cmd, cwd=cwd)

if ret == 0:
submit_pw_check(self.ci_data.pw, self.patch,
self.name, Verdict.PASS,
self.name,
None, self.ci_data.config['dry_run'])
self.success()
elif ret == 250:
url = self.ci_data.gh.create_gist(f"pw{self.ci_data.series['id']}-p{self.patch['id']}",
f"{self.name}-WARNING",
stdout + '\n' + stderr)
submit_pw_check(self.ci_data.pw, self.patch,
self.name, Verdict.WARNING,
self.name,
url, self.ci_data.config['dry_run'])
self.warning(stdout + '\n' + stderr)
else:
url = self.ci_data.gh.create_gist(f"pw{self.ci_data.series['id']}-p{self.patch['id']}",
f"{self.name}-FAIL",
stdout + '\n' + stderr)
submit_pw_check(self.ci_data.pw, self.patch,
self.name, Verdict.FAIL,
self.name,
url, self.ci_data.config['dry_run'])
self.error(stdout + '\n' + stderr)

def post_run(self):

self.log_dbg("Post Run...")
Loading
Loading