Conversation

lwn.net/SubscriberLink … 'Bounce buffers for untrusted devices' An approach like this should be done for all devices, not only 'untrusted' ones, since internal hardware can be compromised by an attacker or even malicious from the start. Recent thread:
Quote Tweet
Replying to @vyodaiken @billhuey and 6 others
Sharing actual list (including access to pointers) with hardware is unsafe, bogus to do. Sharing the data buffer space does not require any complex data structures. Storage for that should be allocated and managed by OS infrastructure outside of the driver.
2
10
Replying to
Quote Tweet
Replying to @DanielMicay @RichFelker and 7 others
As in never directly use that kind of data without first copying it out and sanity checking the copy. It's a common anti-pattern in the drivers to trust the hardware completely or to do racy checks where they sanity check it but then use the memory the driver can write to.
1