linux/drivers
Jisheng Zhang b5db73fb18
riscv: enable HAVE_ARCH_STACKLEAK
Add support for the stackleak feature. Whenever the kernel returns to user
space the kernel stack is filled with a poison value.

At the same time, disables the plugin in EFI stub code because EFI stub
is out of scope for the protection.

Tested on qemu and milkv duo:
/ # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT
[   38.675575] lkdtm: Performing direct entry STACKLEAK_ERASING
[   38.678448] lkdtm: stackleak stack usage:
[   38.678448]   high offset: 288 bytes
[   38.678448]   current:     496 bytes
[   38.678448]   lowest:      1328 bytes
[   38.678448]   tracked:     1328 bytes
[   38.678448]   untracked:   448 bytes
[   38.678448]   poisoned:    14312 bytes
[   38.678448]   low offset:  8 bytes
[   38.689887] lkdtm: OK: the rest of the thread stack is properly erased

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240623235316.2010-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
History 2024-07-26 05:50:47 -07:00
..
accel Merge tag 'drm-habanalabs-next-2024-06-23' of https://github.com/HabanaAI/drivers.accel.habanalabs.kernel into drm-next 2024-06-28 09:41:04 +10:00
accessibility Char/Misc bugfix for 6.10-rc1 2024-05-24 08:43:25 -07:00
acpi Merge patch series "Add ACPI NUMA support for RISC-V" 2024-07-22 10:31:51 -07:00
amba ARM: 9361/1: amba: store owner from modules with amba_driver_register() 2024-04-18 12:09:14 +01:00
android binder: fix hang of unregistered readers 2024-07-12 11:31:37 +02:00
ata Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
atm atm/fore200e: Delete unused 'fore200e_boards' 2024-05-06 18:26:47 -07:00
auxdisplay parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
base Merge patch series "Add ACPI NUMA support for RISC-V" 2024-07-22 10:31:51 -07:00
bcma bcma: convert to platform remove callback returning void 2024-03-12 17:32:55 +02:00
block virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
bluetooth virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
bus Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
cache cache: Add StarFive StarLink cache management 2024-05-28 12:34:11 +01:00
cdrom cdrom: Add missing MODULE_DESCRIPTION() 2024-06-22 19:36:08 -06:00
cdx cdx: Convert to platform remove callback returning void 2024-04-13 12:41:01 +02:00
char Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
clk This a large collection of clk driver updates and a handful of new SoC 2024-07-19 12:16:28 -07:00
clocksource clocksource/drivers/realtek: Add timer driver for rtl-otto platforms 2024-07-12 16:07:06 +02:00
comedi Merge 6.9-rc5 into char-misc-next 2024-04-23 13:16:03 +02:00
connector connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" 2024-02-13 11:15:44 +01:00
counter Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
cpufreq Power management updates for 6.11-rc1 2024-07-16 15:54:03 -07:00
cpuidle cpuidle: teo: Don't count non-existent intercepts 2024-07-01 18:58:55 +02:00
crypto virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
cxl cxl: documentation: add missing files to cxl driver-api 2024-06-25 14:45:27 -07:00
dax The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
dca dca: add missing MODULE_DESCRIPTION() macro 2024-07-03 16:40:41 +02:00
devfreq PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions 2024-05-09 00:30:37 +09:00
dio dio: make dio_bus_type const 2024-03-07 20:37:04 +00:00
dma Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
dma-buf drm-misc-next for 6.11: 2024-06-21 11:06:56 +10:00
dpll dpll: fix return value check for kmemdup 2024-05-13 16:53:53 -07:00
edac - Make error checking of AMD SMN accesses more robust in the callers as 2024-07-15 19:53:07 -07:00
eisa alpha: remove DECpc AXP150 (Jensen) support 2024-05-03 22:09:50 +02:00
extcon extcon: adc-jack: Document missing struct members 2024-05-09 01:03:39 +09:00
firewire firewire: core: record card index in bus_reset_handle tracepoints event 2024-06-15 14:59:26 +09:00
firmware riscv: enable HAVE_ARCH_STACKLEAK 2024-07-26 05:50:47 -07:00
fpga fpga: altera-fpga2sdram: remove unused struct 'prop_map' 2024-06-14 10:18:11 +08:00
fsi fsi: i2cr: Switch to use struct i2c_driver's .probe() 2023-08-22 15:51:33 +02:00
gnss treewide, serdev: change receive_buf() return type to size_t 2024-01-27 18:13:53 -08:00
gpio virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
gpu pci-v6.11-changes 2024-07-19 19:03:18 -07:00
greybus greybus: add missing MODULE_DESCRIPTION() macros 2024-07-03 16:40:35 +02:00
hid for-linus-2024071601 2024-07-17 17:28:31 -07:00
hsi HSI: omap_ssi_port: Convert to platform remove callback returning void 2024-04-16 11:31:09 +02:00
hte hte: tegra-194: add missing MODULE_DESCRIPTION() macro 2024-06-19 12:24:03 -07:00
hv Drivers: hv: Cosmetic changes for hv.c and balloon.c 2024-06-06 06:03:29 +00:00
hwmon Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
hwspinlock hwspinlock: omap: Use index to get hwspinlock pointer 2024-03-05 20:01:14 -08:00
hwtracing intel_th: msu-sink: add missing MODULE_DESCRIPTION() 2024-07-03 16:40:30 +02:00
i2c The I2C core gains documentation updates for the testunit, a cleanup 2024-07-19 16:46:26 -07:00
i3c i3c: dw: Add hot-join support. 2024-05-23 00:29:19 +02:00
idle intel_idle: Switch to new Intel CPU model defines 2024-06-07 20:35:54 +02:00
iio Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
infiniband IOMMU Updates for Linux v6.11 2024-07-19 09:59:58 -07:00
input Input updates for v6.11-rc0 2024-07-19 16:51:39 -07:00
interconnect Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
iommu virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
ipack ipack: make ipack_bus_type const 2024-03-07 20:32:47 +00:00
irqchip arm64 updates for 6.11: 2024-07-15 17:06:19 -07:00
isdn isdn: add missing MODULE_DESCRIPTION() macros 2024-06-10 18:08:50 -07:00
leds - Core Frameworks 2024-07-17 17:51:30 -07:00
macintosh macintosh/therm_windtunnel: fix module unload. 2024-07-11 17:32:31 +10:00
mailbox mailbox: zynqmp-ipi: drop irq_to_desc() call 2024-05-31 12:39:15 -05:00
mcb mcb: remove unused struct 'mcb_parse_priv' 2024-07-03 16:41:48 +02:00
md - Optimize processing of flush bios in the dm-linear and dm-stripe 2024-07-19 10:48:44 -07:00
media media updates for v6.11-rc1 2024-07-17 18:30:10 -07:00
memory memory: fsl_ifc: Make FSL_IFC config visible and selectable 2024-06-12 10:17:37 +02:00
memstick memstick: rtsx_pci_ms: Remove Realtek PCI memstick driver 2024-07-08 10:59:06 +02:00
message SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
mfd - New Drivers 2024-07-17 17:42:20 -07:00
misc pci-v6.11-changes 2024-07-19 19:03:18 -07:00
mmc - New Drivers 2024-07-17 17:42:20 -07:00
most most: core: make mostbus const 2024-03-07 20:32:38 +00:00
mtd soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
mux mux: remove usage of the deprecated ida_simple_xx() API 2024-04-29 08:20:07 -07:00
net Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
nfc nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
ntb PCI: switchtec: Make switchtec_class constant 2024-06-10 15:03:30 -05:00
nubus nubus: Make nubus_bus_type static and constant 2024-01-03 13:33:59 +01:00
nvdimm block: move the dax flag to queue_limits 2024-06-19 07:58:28 -06:00
nvme for-6.11/block-20240710 2024-07-15 14:20:22 -07:00
nvmem Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
of IOMMU Updates for Linux v6.11 2024-07-19 09:59:58 -07:00
opp Merge branches 'pm-opp' and 'pm-tools' 2024-07-15 18:55:14 +02:00
parisc change alloc_pages name in dma_map_ops to avoid name conflicts 2024-04-25 20:55:53 -07:00
parport dev/parport: fix the array out-of-bounds risk 2024-07-10 14:59:45 +02:00
pci powerpc updates for 6.11 2024-07-19 21:00:33 -07:00
pcmcia pcmcia: cs: make pcmcia_socket_class constant 2024-03-10 09:07:00 +01:00
peci peci: aspeed: Clear clock_divider value before setting it 2024-06-17 15:18:29 +02:00
perf Merge patch series "riscv: Separate vendor extensions from standard extensions" 2024-07-22 15:37:01 -07:00
phy USB/Thunderbolt updates for 6.11-rc1 2024-07-19 15:37:48 -07:00
pinctrl gpio updates for v6.11-rc1 2024-07-15 17:53:24 -07:00
platform - added support for Realtek RTL9302C 2024-07-20 09:03:36 -07:00
pmdomain mdomain: Merge branch fixes into next 2024-07-09 13:12:41 +02:00
pnp PNP: Hide pnp_bus_type from the non-PNP code 2024-05-28 21:53:51 +02:00
power power sequencing fixes for v6.11-rc1 2024-07-19 14:31:18 -07:00
powercap powercap: idle_inject: Simplify if condition 2024-06-07 20:57:20 +02:00
pps parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
ps3 driver/ps3: Include <video/cmdline.h> for mode parsing 2023-02-20 14:56:51 +01:00
ptp Networking changes for 6.11. Not much excitement - a handful of large 2024-07-16 19:28:34 -07:00
pwm pwm: axi-pwmgen: add .max_register to regmap 2024-07-11 15:44:40 +02:00
rapidio rapidio: remove choice for enumeration 2024-05-14 23:36:19 +09:00
ras - The AMD memory controllers data fabric version 4.5 supports 2024-07-15 18:20:24 -07:00
regulator - New Drivers 2024-07-17 17:42:20 -07:00
remoteproc virtio: rename find_vqs_info() op to find_vqs() 2024-07-17 05:20:57 -04:00
reset soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
rpmsg virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00
rtc pcf8563: add wakeup-source support 2024-05-07 23:40:46 +02:00
s390 virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
sbus sbus: add missing MODULE_DESCRIPTION() macros 2024-07-11 15:42:03 +02:00
scsi Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
sh sh: intc: Make intc_subsys const 2024-02-15 18:12:01 +01:00
siox siox: bus-gpio: add missing MODULE_DESCRIPTION() 2024-06-04 17:41:53 +02:00
slimbus slimbus: Fix struct and documentation alignment in stream.c 2024-07-05 10:13:04 +02:00
soc sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
soundwire sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
spi Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
spmi spmi: add missing MODULE_DESCRIPTION() macros 2024-07-12 10:44:53 +02:00
ssb ssb: use "break" on default case to prevent warning 2024-03-14 10:56:31 +02:00
staging Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
target block: remove the blk_integrity_profile structure 2024-06-14 10:20:06 -06:00
tc tc: make tc_bus_type const 2024-02-20 13:36:34 +01:00
tee soc: driver updates for 6.11 2024-07-16 11:35:27 -07:00
thermal Merge branch 'thermal-intel' 2024-07-15 20:44:31 +02:00
thunderbolt thunderbolt: debugfs: Use FIELD_GET() 2024-06-19 07:30:20 +03:00
tty TTY/Serial updates for 6.11-rc1 2024-07-19 15:22:14 -07:00
ufs SCSI misc on 20240718 2024-07-19 10:56:58 -07:00
uio uio: add missing MODULE_DESCRIPTION() macros 2024-06-04 17:39:12 +02:00
usb pci-v6.11-changes 2024-07-19 19:03:18 -07:00
vdpa vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() 2024-07-09 08:42:51 -04:00
vfio powerpc updates for 6.11 2024-07-19 21:00:33 -07:00
vhost virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
video fbdev fixes and cleanups for 6.11-rc1: 2024-07-18 11:47:14 -07:00
virt virt: sev-guest: Mark driver struct with __refdata to prevent section mismatch 2024-06-20 20:28:50 +02:00
virtio RISC-V Patches for the 6.11 Merge Window, Part 1 2024-07-20 09:11:27 -07:00
w1 w1: Drop allocation error message 2024-05-28 17:45:02 +02:00
watchdog - New Drivers 2024-07-17 17:42:20 -07:00
xen dma-mapping updates for Linux 6.11 2024-07-19 10:20:26 -07:00
zorro zorro: Use str_plural() in amiga_zorro_probe() 2024-06-24 12:16:33 +02:00
Kconfig - removed AR7 platform support 2023-11-10 09:19:46 -08:00
Makefile kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00