public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: torvalds@linux-foundation.org
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] RISC-V updates for v7.0-rc8
Date: Fri, 10 Apr 2026 16:16:33 -0600 (MDT)	[thread overview]
Message-ID: <46ab01fb-e1db-1cd8-4d85-3ac68c7dddf5@kernel.org> (raw)

Linus,

The changes in this pull request expand abbreviations in the per-task
CFI prctl() and ptrace interfaces.  They also restructure the indirect
branch tracking prctl() interface to follow the style of the
speculation control interface, rather than the shadow stack control
interface.  While here, we fix a few other embarrassing bugs that we
should have caught earlier, and clean up the naming of the
kernel-internal architecture-common prctl() function names to expand
out the abbreviations.

The hope is that these fixes can be pulled before the v7.0 release.
That should clean up these userspace interfaces before upstream C
libraries start using them.


thanks,

- Paul

The following changes since commit 9156585280f161fc1c3552cf1860559edb2bb7e3:

  ACPI: RIMT: Add dependency between iommu and devices (2026-04-04 18:38:03 -0600)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux tags/riscv-for-linus-v7.0-rc8

for you to fetch changes up to 08ee1559052be302f1d3752f48360b89517d9f8d:

  prctl: cfi: change the branch landing pad prctl()s to be more descriptive (2026-04-04 18:40:58 -0600)

----------------------------------------------------------------
RISC-V updates for v7.0-rc8

Before v7.0 is released, fix a few issues with the CFI patchset,
merged earlier in v7.0-rc, that primarily affect interfaces to
non-kernel code:

- Improve the prctl() interface for per-task indirect branch landing
  pad control to expand abbreviations and to resemble the speculation
  control prctl() interface

- Expand the "LP" and "SS" abbreviations in the ptrace uapi header
  file to "branch landing pad" and "shadow stack", to improve
  readability

- Fix a typo in a CFI-related macro name in the ptrace uapi header
  file

- Ensure that the indirect branch tracking state and shadow stack
  state are unlocked immediately after an exec() on the new task so
  that libc subsequently can control it

- While working in this area, clean up the kernel-internal,
  cross-architecture prctl() function names by expanding the
  abbreviations mentioned above

----------------------------------------------------------------
Paul Walmsley (5):
      riscv: ptrace: cfi: fix "PRACE" typo in uapi header
      riscv: ptrace: expand "LP" references to "branch landing pads" in uapi headers
      prctl: rename branch landing pad implementation functions to be more explicit
      riscv: ptrace: cfi: expand "SS" references to "shadow stack" in uapi headers
      prctl: cfi: change the branch landing pad prctl()s to be more descriptive

Zong Li (1):
      riscv: cfi: clear CFI lock status in start_thread()

 Documentation/arch/riscv/zicfilp.rst               | 63 +++++++++++++---------
 arch/riscv/include/asm/usercfi.h                   |  8 +--
 arch/riscv/include/uapi/asm/ptrace.h               | 42 ++++++++-------
 arch/riscv/kernel/process.c                        |  2 +
 arch/riscv/kernel/ptrace.c                         | 22 ++++----
 arch/riscv/kernel/usercfi.c                        | 39 +++++++-------
 include/linux/cpu.h                                |  6 +--
 include/uapi/linux/prctl.h                         | 37 ++++++-------
 kernel/sys.c                                       | 30 ++++++-----
 tools/perf/trace/beauty/include/uapi/linux/prctl.h | 36 ++++++-------
 tools/testing/selftests/riscv/cfi/cfitests.c       | 13 ++---
 11 files changed, 154 insertions(+), 144 deletions(-)

vmlinux size differences in bytes (from 9156585280f1):
 text  data  bss    dec    hex  filename                             
  +72     .    .    +72    +48  vmlinux.defconfig.gcc-15             
  +64   -64    .      .      .  vmlinux.nosmp_defconfig.gcc-15       
   +8   +32    .    +40    +28  vmlinux.rv32_defconfig.gcc-15        
   -8   +32    .    +24    +18  vmlinux.rv32_nosmp_defconfig.gcc-15  
  +28     .    .    +28    +1c  vmlinux.nommu_virt_defconfig.gcc-15  
   -8     .    .     -8     -8  vmlinux.defconfig.clang-20           
   -8     .    .     -8     -8  vmlinux.nosmp_defconfig.clang-20     
   -8     .    .     -8     -8  vmlinux.rv32_defconfig.clang-20      
   -8     .    .     -8     -8  vmlinux.rv32_nosmp_defconfig.clang-20
  +36     .    .    +36    +24  vmlinux.nommu_virt_defconfig.clang-20
    .   +32    .    +32    +20  vmlinux.defconfig.gcc-14             
    .     .    .      .      .  vmlinux.nosmp_defconfig.gcc-14       
    .     .    .      .      .  vmlinux.rv32_defconfig.gcc-14        
    .   +32    .    +32    +20  vmlinux.rv32_nosmp_defconfig.gcc-14  
  +44     .    .    +44    +2c  vmlinux.nommu_virt_defconfig.gcc-14  
   -8   -64    .    -72    -48  vmlinux.defconfig.clang-19           
    .     .    .      .      .  vmlinux.nosmp_defconfig.clang-19     
   -8     .    .     -8     -8  vmlinux.rv32_defconfig.clang-19      
  -16   +32    .    +16    +10  vmlinux.rv32_nosmp_defconfig.clang-19
  +28     .    .    +28    +1c  vmlinux.nommu_virt_defconfig.clang-19
   -8     .    .     -8     -8  vmlinux.defconfig.gcc-13             
   -8     .    .     -8     -8  vmlinux.nosmp_defconfig.gcc-13       
   -8   +32    .    +24    +18  vmlinux.rv32_defconfig.gcc-13        
    .     .    .      .      .  vmlinux.rv32_nosmp_defconfig.gcc-13  
  +52     .    .    +52    +34  vmlinux.nommu_virt_defconfig.gcc-13  
   -8     .    .     -8     -8  vmlinux.defconfig.clang-18           
    .     .    .      .      .  vmlinux.nosmp_defconfig.clang-18     
  -16     .    .    -16    -10  vmlinux.rv32_defconfig.clang-18      
  -16   +32    .    +16    +10  vmlinux.rv32_nosmp_defconfig.clang-18
  +28     .    .    +28    +1c  vmlinux.nommu_virt_defconfig.clang-18
  -16     .    .    -16    -10  vmlinux.defconfig.gcc-12             
   -8     .    .     -8     -8  vmlinux.nosmp_defconfig.gcc-12       
    .   +32    .    +32    +20  vmlinux.rv32_defconfig.gcc-12        
   +8     .    .     +8     +8  vmlinux.rv32_nosmp_defconfig.gcc-12  
  +28     .    .    +28    +1c  vmlinux.nommu_virt_defconfig.gcc-12  
   -8   +32    .    +24    +18  vmlinux.defconfig.clang-17           
    .   +32    .    +32    +20  vmlinux.nosmp_defconfig.clang-17     
    .   +32    .    +32    +20  vmlinux.rv32_defconfig.clang-17      
    .   +32    .    +32    +20  vmlinux.rv32_nosmp_defconfig.clang-17
  +28     .    .    +28    +1c  vmlinux.nommu_virt_defconfig.clang-17
    .   -64    .    -64    -40  vmlinux.defconfig.gcc-11             
  -16     .    .    -16    -10  vmlinux.nosmp_defconfig.gcc-11       
    .   +32    .    +32    +20  vmlinux.rv32_defconfig.gcc-11        
    .   +32    .    +32    +20  vmlinux.rv32_nosmp_defconfig.gcc-11  
  +52     .    .    +52    +34  vmlinux.nommu_virt_defconfig.gcc-11  
  +16     .    .    +16    +10  vmlinux.allnoconfig.gcc-14           
   +4     .    .     +4     +4  vmlinux.allmodconfig.gcc-14          
   -4     .    .     -4     -4  vmlinux.allnoconfig.clang-19         
+5440     .    .  +5440  +1540  vmlinux.allmodconfig.clang-19        

             reply	other threads:[~2026-04-10 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 22:16 Paul Walmsley [this message]
2026-04-11  4:04 ` [GIT PULL] RISC-V updates for v7.0-rc8 pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46ab01fb-e1db-1cd8-4d85-3ac68c7dddf5@kernel.org \
    --to=pjw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox