sys/macppc: bound OF_getprop() bounce copy
The Open Firmware getprop service returns the full property size while
copying at most buflen bytes. macppc redirects the firmware write through
OF_buf, but copied the returned size into the caller's buffer, allowing an
oversized property to overwrite adjacent memory.
Here, I limit the second copy to buflen while preserving getprop's return
value.
This fixes stack corruption when QEMU OpenBIOS returns the 60 byte e1000 reg
property to pci_intr_map(), which requests one 20 byte PCI record. With this
change, em0 attaches and the ramdisk reaches the installer.
OK: kettenis@, jca@
Make use of the RISC-V Sstc extension for the system clock
Lets us program the timer without doing an SBI ecall, saving a bunch of
cycles. Bonus, on platforms which implement it, it works around an
ongoing issue in Linux kvm.
Initial diff from Nick Owens, ok kettenis@
Management commands with no data buffer still need the pointer to the
command itself set. Fixes crashes seen after using the patrol read start/stop
commands as reported by job@
ok dlg@
pci_resize_resource() takes another argument in 6.18.40 drm
A bitmask of pci bars to skip. No callers of this are currently enabled
and the code we have is only for bar 0.
PCI: Fix restoring BARs on BAR resize rollback path
From Ilpo Jarvinen
4b5322f0002aac02a0f9907ac2358811330d982c in linux-6.18.y/6.18.40
337b1b566db087347194e4543ddfdfa5645275cc in mainline linux
drm/edid: fix OOB read in drm_parse_tiled_block()
From Xiang Mei
9cc0f8e63e8c34cf43def35cbd305ba711181a1f in linux-6.18.y/6.18.40
faaa1e1155833e7d4ce7e3cfaf64c0d636b190db in mainline linux
drm/amdgpu: initialize irq.lock spinlock earlier
From Thadeu Lima de Souza Cascardo
290ad0a548915bc2f457e6d315e1537f00e16497 in linux-6.18.y/6.18.40
a2b270c0ecf6d95bcd14ef4c20d0301a88143ff5 in mainline linux
drm/amdkfd: fix list_del corruption in kfd_criu_resume_svm
From Mario Limonciello
96ac562a9ea3020981f536384711190841c81aa8 in linux-6.18.y/6.18.40
8fa5655da368d0306c03e9dc9cda8ae2a7840926 in mainline linux