linux/drivers
Jonathan McDowell 1dbf74e00a tpm: End any active auth session before shutdown
Lazy flushing of TPM auth sessions can interact badly with IMA + kexec,
resulting in loaded session handles being leaked across the kexec and
not cleaned up. Fix by ensuring any active auth session is ended before
the TPM is told about the shutdown, matching what is done when
suspending.

Before:

root@debian-qemu-efi:~# tpm2_getcap handles-loaded-session
root@debian-qemu-efi:~# tpm2_getcap handles-saved-session
root@debian-qemu-efi:~# kexec --load --kexec-file-syscall …
root@debian-qemu-efi:~# systemctl kexec
…
root@debian-qemu-efi:~# tpm2_getcap handles-loaded-session
- 0x2000000
root@debian-qemu-efi:~# tpm2_getcap handles-saved-session
root@debian-qemu-efi:~#
(repeat kexec steps)
root@debian-qemu-efi:~# tpm2_getcap handles-loaded-session
- 0x2000000
- 0x2000001
root@debian-qemu-efi:~# tpm2_getcap handles-saved-session
root@debian-qemu-efi:~#

After:

root@debian-qemu-efi:~# tpm2_getcap handles-loaded-session
root@debian-qemu-efi:~# tpm2_getcap handles-saved-session
root@debian-qemu-efi:~# kexec --load --kexec-file-syscall …
root@debian-qemu-efi:~# systemctl kexec
…
root@debian-qemu-efi:~# tpm2_getcap handles-loaded-session
root@debian-qemu-efi:~# tpm2_getcap handles-saved-session
root@debian-qemu-efi:~#

Signed-off-by: Jonathan McDowell <noodles@meta.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2025-03-27 15:34:05 +02:00
..
accel A sched fence reference leak fix, two fence fixes for v3d, two overflow 2025-03-21 10:41:51 +10:00
accessibility
acpi Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
amba iommu: Get DT/ACPI parsing into the proper probe path 2025-03-11 14:05:43 +01:00
android binderfs: fix use-after-free in binder_devices 2025-02-20 15:20:11 +01:00
ata ata changes for 6.15 2025-03-26 19:49:02 -07:00
atm
auxdisplay auxdisplay: hd44780: Rename hd to hdc in hd44780_common_alloc() 2025-03-10 18:03:02 +02:00
base IOMMU Updates for Linux v6.15 2025-03-26 20:10:09 -07:00
bcma
block for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
bluetooth Bluetooth: btnxpuart: Fix kernel panic during FW release 2025-03-25 15:22:17 -04:00
bus Merge branches 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'rockchip', 's390', 'core', 'intel/vt-d' and 'amd/amd-vi' into next 2025-03-20 09:11:09 +01:00
cache
cdrom treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
cdx Merge branches 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'rockchip', 's390', 'core', 'intel/vt-d' and 'amd/amd-vi' into next 2025-03-20 09:11:09 +01:00
char tpm: End any active auth session before shutdown 2025-03-27 15:34:05 +02:00
clk Samsung clock controller fixes for v6.14 2025-03-11 10:51:13 -07:00
clocksource Updates for clocksource/event drivers: 2025-03-26 13:30:27 -07:00
comedi
connector
counter
cpufreq Power management updates for 6.15-rc1 2025-03-25 15:00:18 -07:00
cpuidle pmdomain core: 2025-03-25 20:40:51 -07:00
crypto CRC updates for 6.15 2025-03-25 18:33:04 -07:00
cxl cxl changes for v6.14 2025-01-29 11:23:22 -08:00
dax
dca
devfreq PM / devfreq: rockchip-dfi: Switch to use hrtimer_setup() 2025-02-18 10:32:34 +01:00
dio
dma dmaengine fixes for v6.14 2025-03-02 10:08:45 -08:00
dma-buf
dpll Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-20 21:38:01 +01:00
edac - Add infrastructure support to EDAC in order to be able to register memory 2025-03-25 14:00:26 -07:00
eisa
extcon Update extcon next for v6.14 2025-01-12 13:44:27 +01:00
firewire Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
firmware sound updates for 6.15-rc1 2025-03-26 09:41:55 -07:00
fpga FPGA Manager changes for 6.14-rc1 2025-01-09 10:56:57 +01:00
fsi
gnss
gpio Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
gpu A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
greybus
hid Merge branch 'for-6.15/wacom' into for-linus 2025-03-26 13:56:38 +01:00
hsi
hte
hv hyperv-next for 6.15 2025-03-25 14:47:04 -07:00
hwmon platform-drivers-x86 for v6.15-1 2025-03-26 09:54:40 -07:00
hwspinlock
hwtracing ARM: 2025-03-25 14:22:07 -07:00
i2c A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
i3c I3C for 6.14 2025-01-24 15:48:01 -08:00
idle Power management updates for 6.15-rc1 2025-03-25 15:00:18 -07:00
iio regulator: Updates for v6.15 2025-03-25 19:04:20 -07:00
infiniband Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
input Input updates for v6.14-rc6 2025-03-15 15:46:29 -10:00
interconnect interconnect changes for 6.14 2025-01-16 14:01:40 +01:00
iommu IOMMU Updates for Linux v6.15 2025-03-26 20:10:09 -07:00
ipack
irqchip IOMMU Updates for Linux v6.15 2025-03-26 20:10:09 -07:00
isdn
leds gpio updates for v6.15-rc1 2025-03-25 20:05:43 -07:00
macintosh The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
mailbox mailbox: Switch to use hrtimer_setup() 2025-02-18 11:19:04 +01:00
mcb
md for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
media [GIT PULL for v6.15] media updates 2025-03-25 21:00:31 -07:00
memory memory: omap-gpmc: drop no compatible check 2025-03-14 17:59:17 +01:00
memstick for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
message SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
mfd PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally 2025-02-19 13:22:12 +01:00
misc A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
mmc for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
most
mtd for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
mux mux: gpio: use gpiod_multi_set_value_cansleep 2025-02-17 14:27:34 +01:00
net Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
nfc nfc: mrvl: Don't use "proxy" headers 2025-01-18 17:10:05 -08:00
ntb A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
nubus
nvdimm badblocks: use sector_t instead of int to avoid truncation of badblocks length 2025-03-06 08:04:52 -07:00
nvme for-6.15/block-20250322 2025-03-26 18:08:55 -07:00
nvmem net, treewide: define and use MAC_ADDR_STR_LEN 2025-03-19 19:17:58 +01:00
of Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
opp Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
parisc
parport
pci IOMMU Updates for Linux v6.15 2025-03-26 20:10:09 -07:00
pcmcia
peci
perf lsm/stable-6.15 PR 20250323 2025-03-25 15:44:19 -07:00
phy Linux 6.14-rc5 2025-03-03 09:32:11 +01:00
pinctrl pinctrl: spacemit: PINCTRL_SPACEMIT_K1 should not default to y unconditionally 2025-03-18 14:11:46 +01:00
platform platform-drivers-x86 for v6.15-1 2025-03-26 09:54:40 -07:00
pmdomain pmdomain: arm: scmi_pm_domain: Remove redundant state verification 2025-03-17 11:12:01 +01:00
pnp PNP: Remove prehistoric deadcode 2025-03-12 20:37:56 +01:00
power A treewide hrtimer timer cleanup 2025-03-25 10:54:15 -07:00
powercap Power management updates for 6.15-rc1 2025-03-25 15:00:18 -07:00
pps pps: generators: pps_gen_parport: Switch to use hrtimer_setup() 2025-02-18 11:19:03 +01:00
ps3
ptp ptp: ocp: reject unsupported periodic output flags 2025-03-20 08:50:03 +01:00
pwm pwm: stmpe: Allow to compile as a module 2025-03-03 10:38:54 +01:00
rapidio rapidio: add check for rio_add_net() in rio_scan_alloc_net() 2025-03-05 21:36:19 -08:00
ras x86/amd_nb: Move SMN access code to a new amd_node driver 2025-01-08 10:59:44 +01:00
regulator regulator: Updates for v6.15 2025-03-25 19:04:20 -07:00
remoteproc remoteproc: st: Use syscon_regmap_lookup_by_phandle_args 2025-01-15 10:04:27 -07:00
reset reset: mchp: sparx5: Fix for lan966x 2025-03-13 09:40:26 +01:00
rpmsg
rtc rtc: class: Switch to use hrtimer_setup() 2025-02-18 11:19:03 +01:00
s390 Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
sbus
scsi SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
sh
siox
slimbus slimbus: messaging: Free transaction ID in delayed interrupt scenario 2025-02-20 15:19:51 +01:00
soc Updates for MSI interrupts 2025-03-25 09:15:17 -07:00
soundwire soundwire: qcom: Add set_channel_map api support 2025-02-06 11:49:22 +00:00
spi spi: Updates for v6.15 2025-03-25 19:28:14 -07:00
spmi spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() 2025-01-17 12:58:49 +01:00
ssb
staging [GIT PULL for v6.15] media updates 2025-03-25 21:00:31 -07:00
target SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
tc
tee tee: optee: Fix supplicant wait loop 2025-02-14 15:17:34 +01:00
thermal Thermal control updates for 6.15-rc1 2025-03-25 15:13:31 -07:00
thunderbolt CRC updates for 6.15 2025-03-25 18:33:04 -07:00
tty serial: xilinx_uartps: Use helper function hrtimer_update_function() 2025-02-18 17:41:35 +01:00
ufs SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
uio Char/Misc/IIO driver updates for 6.14-rc1 2025-01-27 16:51:51 -08:00
usb SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
vdpa virtio: features, fixes, cleanups 2025-01-27 15:26:06 -08:00
vfio make use of anon_inode_getfile_fmode() 2025-02-21 10:25:31 +01:00
vhost vhost: return task creation error instead of NULL 2025-03-01 02:52:52 -05:00
video fbdev: hyperv_fb: Allow graceful removal of framebuffer 2025-03-09 23:56:29 +00:00
virt Linux 6.14-rc7 2025-03-19 11:03:06 +01:00
virtio virtio: mem: Switch to use hrtimer_setup() 2025-02-18 11:19:07 +01:00
w1 1-Wire bus drivers for v6.14 2025-01-09 10:54:19 +01:00
watchdog watchdog: Switch to use hrtimer_setup() 2025-02-18 10:32:33 +01:00
xen xen/pci: Do not register devices with segments >= 0x10000 2025-03-21 08:15:26 +01:00
zorro zorro: Constify 'struct bin_attribute' 2025-01-08 18:04:36 +01:00
Kconfig
Makefile