1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00
freebsd/sys/x86
Mitchell Horne 558c1b3733 busdma: avoid buflen underflow
The loop condition in the dmamap_load_buffer() method is 'buflen > 0',
and buflen is an unsigned type (bus_size_t).

A recent change made it possible for sgsize to exceed the remaining
buflen, when the tag has a large alignment requirement. The result is
that we would not break out of the loop at the correct time. Fix this by
avoiding underflow in the subtraction at the end of the loop.

PR:		279383
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	jhibbits
Fixes:		a77e1f0f81 ("busdma: better handling of small segment bouncing")
Differential Revision:	https://reviews.freebsd.org/D45732
2024-07-08 11:51:31 -03:00
..
acpica madt: print CPU APIC ID as signed int 2024-05-10 15:20:40 -04:00
bios
conf guestrpc module to handle VMware backdoor port GuestRPC functionality 2024-05-01 15:45:45 -04:00
cpufreq
include x86/iommu: extract useful utilities into x86_iommu.c 2024-05-25 08:32:01 +03:00
iommu x86_iommu: use roundup_pow_of_two 2024-06-26 04:23:54 -05:00
isa atrtc(4): Fix a typo in a sysctl description 2024-04-12 14:32:48 +02:00
linux
pci x86/pci_early_quirks: Sync Intel 11th+ gen PCI IDs with Linux 2024-06-26 23:42:25 +03:00
x86 busdma: avoid buflen underflow 2024-07-08 11:51:31 -03:00
xen x86/xen: use correct printf specifier. 2024-02-22 15:32:36 +01:00