On Wed, Oct 30, 2019 at 03:22:34PM +0100, glider@xxxxxxxxxx wrote: > When data is copied to memory from a device KMSAN should treat it as > initialized. In most cases it's enough to just unpoison the buffer that > is known to come from a device. > In the case with __do_page_cache_readahead() and bio_copy_user_iov() we > have to mark the whole pages as ignored by KMSAN, as it's not obvious > where these pages are read again. A lot of this looks pretty strange. Why don't you instrument the dma_map / dma_sync infrastucture? That should avoid most of the driver hooks.