<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/arch/riscv, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-07-08T16:41:40+00:00</updated>
<entry>
<title>riscv: defconfig: enable ARCH_ULTRARISC</title>
<updated>2026-07-08T16:41:40+00:00</updated>
<author>
<name>Jia Wang</name>
<email>wangjia@ultrarisc.com</email>
</author>
<published>2026-05-15T01:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3fb29495b486b1ec61708248cb388745fc607278'/>
<id>urn:sha1:3fb29495b486b1ec61708248cb388745fc607278</id>
<content type='text'>
Enable `ARCH_ULTRARISC` in the default RISC-V defconfig.

Signed-off-by: Jia Wang &lt;wangjia@ultrarisc.com&gt;
Link: https://patch.msgid.link/20260515-ultrarisc-pinctrl-v1-9-bf559589ea8a@ultrarisc.com
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: add UltraRISC SoC family Kconfig support</title>
<updated>2026-07-08T16:39:49+00:00</updated>
<author>
<name>Jia Wang</name>
<email>wangjia@ultrarisc.com</email>
</author>
<published>2026-04-27T01:32:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3320469e3c8a58c808a090f3e1b5bfccb4c59c6'/>
<id>urn:sha1:a3320469e3c8a58c808a090f3e1b5bfccb4c59c6</id>
<content type='text'>
The first SoC in the UltraRISC series is UR-DP1000, containing octa
UltraRISC CP100 cores.

Signed-off-by: Jia Wang &lt;wangjia@ultrarisc.com&gt;
Acked-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Link: https://patch.msgid.link/20260427-ultrarisc-pcie-v4-1-98935f6cdfb5@ultrarisc.com
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: Prevent NULL pointer dereference in machine_kexec_prepare()</title>
<updated>2026-07-07T00:24:06+00:00</updated>
<author>
<name>Tao Liu</name>
<email>ltao@redhat.com</email>
</author>
<published>2026-07-05T23:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=81bbcff0c053c4f5c711c31a9b72fc492bd96c3f'/>
<id>urn:sha1:81bbcff0c053c4f5c711c31a9b72fc492bd96c3f</id>
<content type='text'>
A NULL pointer dereference issue is noticed in riscv's
machine_kexec_prepare(), where image-&gt;segment[i].buf might be NULL and
copied unchecked.

The NULL buf comes from ima_add_kexec_buffer(), where kbuf is added by
kexec_add_buffer(), but kbuf.buffer is NULL, then it is copied without
a check in machine_kexec_prepare():

  kexec_file_load
    -&gt; kimage_file_alloc_init()
       -&gt; kimage_file_prepare_segments()
          -&gt; ima_add_kexec_buffer()
             -&gt; kexec_add_buffer()
    -&gt; machine_kexec_prepare()
       -&gt; memcpy()

Address this by adding a check before the data copy attempt.

Fixes: b7fb4d78a6ad ("RISC-V: use memcpy for kexec_file mode")
Cc: stable@vger.kernel.org
Closes: https://lore.kernel.org/kexec/CAO7dBbVftLUhd2qrh7hmijTB3PEPfZAhykCGqEfrPoOcSrrj-w@mail.gmail.com/
Acked-by: Baoquan He &lt;bhe@redhat.com&gt;
Acked-by: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Reviewed-by: Nutty Liu &lt;nutty.liu@hotmail.com&gt;
Signed-off-by: Tao Liu &lt;ltao@redhat.com&gt;
Link: https://patch.msgid.link/20260705232706.30265-2-ltao@redhat.com
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>Merge tag 'riscv-for-linus-7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux</title>
<updated>2026-07-04T01:07:24+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-07-04T01:07:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=590cae7152cab2dd954b8db20522769e1c62deec'/>
<id>urn:sha1:590cae7152cab2dd954b8db20522769e1c62deec</id>
<content type='text'>
Pull RISC-V fixes from Paul Walmsley:

 - Fix a crash when a kretprobe reads from the stack

 - Fix an issue with the build-time mcount sorter that broke ftrace

 - Fix the rv32 IRQ stack frame padding to match the ABI

 - Only defer IOMMU configuration during initialization. This avoids an
   issue where IOMMU configuration could be indefinitely deferred

 - Add the missing build salt to the vDSO

 - Now that RISC-V systems with higher numbers of cores are starting to
   become available, raise NR_CPUS for RISC-V to 256

 - Clean up some warnings from sparse caused by the RISC-V-optimized
   RAID6 code

 - Clean up our __cpu_up() code with a few minor fixes

* tag 'riscv-for-linus-7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  riscv: probes: save original sp in rethook trampoline
  riscv: Fix 32-bit call_on_irq_stack() frame pointer ABI
  scripts/sorttable: Handle RISC-V patchable ftrace entries
  riscv: smp: use secs_to_jiffies in __cpu_up
  ACPI: RIMT: Only defer the IOMMU configuration in init stage
  riscv: Add build salt to the vDSO
  raid6: fix raid6_recov_rvv symbol undeclared warning
  raid6: fix riscv symbol undeclared warnigns
  riscv: Raise default NR_CPUS for 64BIT to 256
</content>
</entry>
<entry>
<title>bpf: Restrict JIT predictor flush to cBPF</title>
<updated>2026-07-01T08:33:38+00:00</updated>
<author>
<name>Pawan Gupta</name>
<email>pawan.kumar.gupta@linux.intel.com</email>
</author>
<published>2026-06-30T05:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0bb99f2cfaae6822d734d69722de30af823efdf3'/>
<id>urn:sha1:0bb99f2cfaae6822d734d69722de30af823efdf3</id>
<content type='text'>
Currently predictor flush on memory reuse is done for all BPF JIT
allocations, but only cBPF programs can be loaded by an unprivileged user.
eBPF is privileged by default, and flushing predictors for all CPUs on
every eBPF reuse penalizes the common case for no security benefit.

eBPF allocations can be frequent on busy systems, only flush predictors
for cBPF programs. Trampoline and dispatcher allocations also skip the
flush as they are eBPF-only.

Signed-off-by: Pawan Gupta &lt;pawan.kumar.gupta@linux.intel.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>riscv: probes: save original sp in rethook trampoline</title>
<updated>2026-07-01T00:46:54+00:00</updated>
<author>
<name>Martin Kaiser</name>
<email>martin@kaiser.cx</email>
</author>
<published>2026-06-30T19:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bc7b086a45521a986a49045907f017e3e46c763e'/>
<id>urn:sha1:bc7b086a45521a986a49045907f017e3e46c763e</id>
<content type='text'>
Reading a word from the stack in a kretprobe crashes a risc-v kernel.

$ cd /sys/kernel/tracing/
$ echo 'r n_tty_write $stack0' &gt; dynamic_events
$ echo 1 &gt; events/kprobes/enable
Unable to handle kernel paging request at virtual address 0000000200000128
...
[&lt;ffffffff80016d16&gt;] regs_get_kernel_stack_nth+0x26/0x38
[&lt;ffffffff80177196&gt;] process_fetch_insn+0x3ee/0x760
[&lt;ffffffff80177836&gt;] kretprobe_trace_func+0x116/0x1f0
[&lt;ffffffff8017795a&gt;] kretprobe_dispatcher+0x4a/0x58
[&lt;ffffffff8013572e&gt;] kretprobe_rethook_handler+0x5e/0x90
[&lt;ffffffff80180838&gt;] rethook_trampoline_handler+0x70/0x108
[&lt;ffffffff8001ba32&gt;] arch_rethook_trampoline_callback+0x12/0x1c
[&lt;ffffffff8001ba84&gt;] arch_rethook_trampoline+0x48/0x94
[&lt;ffffffff8067872a&gt;] tty_write+0x1a/0x30

In regs_get_kernel_stack_nth, regs-&gt;sp contains an arbitrary value.

arch_rethook_trampoline saves the registers from the probed function in a
struct pt_regs. sp is not saved. Instead, sp is decremented for
arch_rethook_trampoline's local stack.

Fix this crash and save the original sp along with the other registers.
Use a0 as a temporary register, it is overwritten anyway.

Cc: stable@vger.kernel.org
Fixes: c22b0bcb1dd02 ("riscv: Add kprobes supported")
Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Acked-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Link: https://patch.msgid.link/20260630194010.1824039-1-martin@kaiser.cx
[pjw@kernel.org: added Fixes tag; cc'ed stable]
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: Fix 32-bit call_on_irq_stack() frame pointer ABI</title>
<updated>2026-06-25T19:44:27+00:00</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2026-06-24T11:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c4c7756a81b5baef286bf9be1ea404f3e4dd7a3c'/>
<id>urn:sha1:c4c7756a81b5baef286bf9be1ea404f3e4dd7a3c</id>
<content type='text'>
call_on_irq_stack() uses struct member offsets to set up its link in the
frame record list. On riscv32, struct stackframe is the wrong size to
maintain stack pointer alignment, so STACKFRAME_SIZE_ON_STACK includes
padding. However, the ABI requires the frame record to be placed
immediately below the address stored in s0, so the padding must come
before the struct members.

Fix the layout by making STACKFRAME_FP and STACKFRAME_RA the negative
offsets from s0, instead of the positive offsets from sp.

Fixes: 82982fdd5133 ("riscv: Deduplicate IRQ stack switching")
Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Matthew Bystrin &lt;dev.mbstr@gmail.com&gt;
Signed-off-by: Rui Qi &lt;qirui.001@bytedance.com&gt;
Link: https://lore.kernel.org/all/20240530001733.1407654-2-samuel.holland@sifive.com/
Reviewed-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/20260624113148.3723541-1-qirui.001@bytedance.com
[pjw@kernel.org: cleaned up the patch tags and added Matthew's Reviewed-by]
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: smp: use secs_to_jiffies in __cpu_up</title>
<updated>2026-06-25T18:24:25+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2026-06-11T23:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=68fb3c026bec6f5dbd8ed5f2e57ef6535ec13341'/>
<id>urn:sha1:68fb3c026bec6f5dbd8ed5f2e57ef6535ec13341</id>
<content type='text'>
Use secs_to_jiffies() to simplify the code. Drop the redundant zero
initialization while at it.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Link: https://patch.msgid.link/20260611232537.467398-3-thorsten.blum@linux.dev
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: Add build salt to the vDSO</title>
<updated>2026-06-25T18:05:05+00:00</updated>
<author>
<name>Bastian Blank</name>
<email>waldi@debian.org</email>
</author>
<published>2026-06-18T16:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c8c5a7835f5c9e34c8a15190519a2cc9ecb9b5b5'/>
<id>urn:sha1:c8c5a7835f5c9e34c8a15190519a2cc9ecb9b5b5</id>
<content type='text'>
The vDSO needs to have a unique build id in a similar manner
to the kernel and modules. Use the build salt macro.

Signed-off-by: Bastian Blank &lt;waldi@debian.org&gt;
Reviewed-by: Nam Cao &lt;namcao@linutronix.de&gt;
Link: https://patch.msgid.link/ajQY7n0an0YwQ--j@steamhammer.waldi.eu.org
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: Raise default NR_CPUS for 64BIT to 256</title>
<updated>2026-06-25T17:41:15+00:00</updated>
<author>
<name>Vivian Wang</name>
<email>wangruikang@iscas.ac.cn</email>
</author>
<published>2026-06-25T06:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0fa749771993033befb9dda60b023782cb5fd2d9'/>
<id>urn:sha1:0fa749771993033befb9dda60b023782cb5fd2d9</id>
<content type='text'>
SpacemiT has already produced a 80-core RVA23 RISC-V server [1], and
going further back, the dual-socket SG2042-based Sophgo Pisces has 128
cores (although that had some issues achieving mainline support).
Therefore, an NR_CPUS of 64 is not enough.

Raise default NR_CPUS to 256 for 64BIT (when !RISCV_SBI_V01, since very
old firmware can't support more than 64 cores). The number was picked as
a power of two that is at least double the known max. I believe this
should be the right balance between not wasting too much memory and not
having to touch this too often.

Ubuntu has already been shipping NR_CPUS=512 for riscv64. We have also
been testing NR_CPUS=256 internally at ISCAS and found negligible
performance impact and no ill effects.

Reported-by: Lufei Zheng &lt;lufei.zheng@spacemit.com&gt;
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1140651 # [1]
Suggested-by: Han Gao &lt;gaohan@iscas.ac.cn&gt;
Signed-off-by: Vivian Wang &lt;wangruikang@iscas.ac.cn&gt;
Link: https://patch.msgid.link/20260625-riscv-more-nr-cpus-v1-1-5da8c72b9269@iscas.ac.cn
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
</feed>
