A security fix briefly breaks DMA
A security fix briefly breaks DMA
Posted Apr 1, 2022 18:30 UTC (Fri) by mb (subscriber, #50428)In reply to: A security fix briefly breaks DMA by mario-campos
Parent article: A security fix briefly breaks DMA
Posted Apr 2, 2022 3:20 UTC (Sat)
by developer122 (guest, #152928)
[Link] (2 responses)
Posted Apr 4, 2022 8:17 UTC (Mon)
by taladar (subscriber, #68407)
[Link]
Posted Apr 7, 2022 15:16 UTC (Thu)
by kpfleming (subscriber, #23250)
[Link]
You tell a NIC it can receive a packet directly into a buffer. It does so. You don't know how large the packet was until you look into the buffer to find out.
The NIC could conceivably communicate the 'bytes written' amount in some other location outside the buffer, but that significantly complicates the data handling.
Posted Apr 2, 2022 6:24 UTC (Sat)
by NYKevin (subscriber, #129325)
[Link]
* It's something like a NIC, and the data is eventually going to end up in some sort of userspace buffer (e.g. via read() or recv()). This implies that some part of the kernel is going to have to figure out the size at some point, because you can't leak extraneous data to userspace, so you might as well do it in the driver.
Is there really a lot of variable-sized input hardware where the input *doesn't* eventually end up in userspace?
A security fix briefly breaks DMA
A security fix briefly breaks DMA
A security fix briefly breaks DMA
A security fix briefly breaks DMA
* It's something like a keyboard or capture card, and the data has a fixed or configurable size and/or format, which the driver should already know because it presumably configured the size/format in the first place.