linux-stable/drivers
Palmer Dabbelt 24005d184a
Merge patch series "riscv: SCS support"
Sami Tolvanen <samitolvanen@google.com> says:

This series adds Shadow Call Stack (SCS) support for RISC-V. SCS
uses compiler instrumentation to store return addresses in a
separate shadow stack to protect them against accidental or
malicious overwrites. More information about SCS can be found
here:

  https://clang.llvm.org/docs/ShadowCallStack.html

Patch 1 is from Deepak, and it simplifies VMAP_STACK overflow
handling by adding support for accessing per-CPU variables
directly in assembly. The patch is included in this series to
make IRQ stack switching cleaner with SCS, and I've simply
rebased it and fixed a couple of minor issues. Patch 2 uses this
functionality to clean up the stack switching by moving duplicate
code into a single function. On RISC-V, the compiler uses the
gp register for storing the current shadow call stack pointer,
which is incompatible with global pointer relaxation. Patch 3
moves global pointer loading into a macro that can be easily
disabled with SCS. Patch 4 implements SCS register loading and
switching, and allows the feature to be enabled, and patch 5 adds
separate per-CPU IRQ shadow call stacks when CONFIG_IRQ_STACKS is
enabled. Patch 6 fixes the backward-edge CFI test in lkdtm for
RISC-V.

Note that this series requires Clang 17. Earlier Clang versions
support SCS on RISC-V, but use the x18 register instead of gp,
which isn't ideal. gcc has SCS support for arm64, but I'm not
aware of plans to support RISC-V. Once the Zicfiss extension is
ratified, it's probably preferable to use hardware-backed shadow
stacks instead of SCS on hardware that supports the extension,
and we may want to consider implementing CONFIG_DYNAMIC_SCS to
patch between the implementation at runtime (similarly to the
arm64 implementation, which switches to SCS when hardware PAC
support isn't available).

* b4-shazam-merge:
  lkdtm: Fix CFI_BACKWARD on RISC-V
  riscv: Use separate IRQ shadow call stacks
  riscv: Implement Shadow Call Stack
  riscv: Move global pointer loading to a macro
  riscv: Deduplicate IRQ stack switching
  riscv: VMAP_STACK overflow detection thread-safe

Link: https://lore.kernel.org/r/20230927224757.1154247-8-samitolvanen@google.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-11-02 14:05:23 -07:00
..
accel Short summary of fixes pull: 2023-09-08 06:36:36 +10:00
accessibility
acpi RISC-V: ACPI: RHCT: Add function to get CBO block sizes 2023-10-26 09:40:33 -07:00
amba
android Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
ata SCSI misc on 20230909 2023-09-09 12:01:33 -07:00
atm
auxdisplay
base Driver core changes for 6.6-rc1 2023-09-01 09:43:18 -07:00
bcma
block block-6.6-2023-09-08 2023-09-08 21:39:54 -07:00
bluetooth TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
bus Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
cache cache: Add L2 cache management for Andes AX45MP RISC-V core 2023-09-01 09:08:59 -07:00
cdrom
cdx
char tpm: Enable hwrng only for Pluton on AMD CPUs 2023-09-04 21:57:59 +03:00
clk
clocksource clocksource: timer-riscv: Increase rating of clock_event_device for Sstc 2023-10-31 19:15:49 -07:00
comedi
connector
counter - New Drivers 2023-09-04 13:47:59 -07:00
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma dmaengine updates for v6.6 2023-09-03 10:49:42 -07:00
dma-buf
edac
eisa
extcon
firewire
firmware RISC-V Patches for the 6.6 Merge Window, Part 2 (try 2) 2023-09-09 14:25:11 -07:00
fpga
fsi
genpd
gnss
gpio gpio: zynq: restore zynq_gpio_irq_reqres/zynq_gpio_irq_relres callbacks 2023-09-06 17:08:51 +02:00
gpu drm ci for 6.6-rc1 2023-09-10 11:55:26 -07:00
greybus
hid for-linus-2023083101 2023-09-01 12:31:44 -07:00
hsi
hte
hv hyperv-next for v6.6 2023-09-04 11:26:29 -07:00
hwmon Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
hwspinlock
hwtracing
i2c I2C has mainly cleanups this time and a few driver improvements. Because 2023-09-04 13:44:11 -07:00
i3c i3c: master: svc: fix probe failure when no i3c device exist 2023-09-06 01:21:47 +02:00
idle
iio Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
infiniband SCSI misc on 20230902 2023-09-02 12:02:41 -07:00
input Input updates for 6.6 merge window: 2023-09-06 09:24:25 -07:00
interconnect
iommu IOMMU Updates for Linux v6.6 2023-09-01 16:54:25 -07:00
ipack
irqchip
isdn
leds - Core Frameworks 2023-09-04 13:52:58 -07:00
macintosh
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-05 10:11:01 -05:00
mcb
md
media media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
memory
memstick
message
mfd
misc lkdtm: Fix CFI_BACKWARD on RISC-V 2023-10-27 14:43:10 -07:00
mmc TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
most
mtd - New Drivers 2023-09-04 13:47:59 -07:00
mux
net Including fixes from netfilter and bpf. 2023-09-07 18:33:07 -07:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
pci pci-v6.6-fixes-1 2023-09-09 11:35:28 -07:00
pcmcia
peci
perf arm64 fixes for -rc1 2023-09-08 12:48:37 -07:00
phy phy-for-6.6 2023-09-03 10:38:02 -07:00
pinctrl
platform USB / Thunderbolt / PHY driver update for 6.6-rc1 2023-09-01 09:23:34 -07:00
pnp
power thermal: Use thermal_tripless_zone_device_register() 2023-09-05 21:42:18 +02:00
powercap powercap: intel_rapl: Fix invalid setting of Power Limit 4 2023-09-06 22:21:22 +02:00
pps
ps3
ptp
pwm pwm: Changes for v6.6-rc1 2023-09-07 18:05:58 -07:00
rapidio
ras
regulator regulator: Fixes for v6.6 2023-09-07 15:51:07 -07:00
remoteproc remoteproc updates for v6.6 2023-09-04 15:12:26 -07:00
reset
rpmsg rpmsg updates for v6.6 2023-09-04 15:08:52 -07:00
rtc RTC for 6.6 2023-09-07 16:07:35 -07:00
s390 block-6.6-2023-09-08 2023-09-08 21:39:54 -07:00
sbus
scsi SCSI misc on 20230909 2023-09-09 12:01:33 -07:00
sh
siox
slimbus
soc soc: renesas: Kconfig: For ARCH_R9A07G043 select the required configs if dependencies are met 2023-09-08 11:25:29 -07:00
soundwire soundwire updates for 6.6 2023-09-03 10:20:57 -07:00
spi spi: Fixes for v6.6 2023-09-07 15:49:20 -07:00
spmi
ssb
staging media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
target SCSI misc on 20230902 2023-09-02 12:02:41 -07:00
tc
tee
thermal thermal: core: Drop thermal_zone_device_register() 2023-09-05 21:42:18 +02:00
thunderbolt
tty TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
ufs Merge branch 'fixes' into misc 2023-09-02 08:25:19 +01:00
uio
usb just cleanups and fixes 2023-09-07 10:35:14 -07:00
vdpa virtio: features 2023-09-04 10:43:44 -07:00
vfio
vhost vdpa: add get_backend_features vdpa operation 2023-09-03 18:10:22 -04:00
video - New Functionality 2023-09-06 09:00:37 -07:00
virt
virtio virtio_ring: fix avail_wrap_counter in virtqueue_add_packed 2023-09-03 18:10:24 -04:00
vlynq
w1
watchdog linux-watchdog 6.6-rc1 tag 2023-09-06 09:19:12 -07:00
xen
zorro
Kconfig Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
Makefile Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00