[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support
yes, the queue switch is used as a barrier to detect a new leak event.Right, so I think that there is a race condition between the time the driver sees the used buffers of the firstbatch and until it adds the second batch on the next leak queue. 1. driver adds batch 1 2. leak event 3. device uses batch 1 4. driver sees the used buffers and  a. switches leak queues   b. adds batch 2.5. devices finds initial leak queue empty and sees buffers in second leak queue.If a second leak event happens after step 3 above and before all of steps 4 complete then batch 2 will notbe processed as part of the second leak event.
Hey Michael, any thoughts on this? I think the my Linux RFC patch[1] showcases the problem in the `entropy_leak_detected` function which handles the used buffers. If on the VMM we receive a new leak event before `entropy_leak_detected` runs to completion (and adds a new batch of buffers) the leak
event will not have any buffers to handle.[1] https://lore.kernel.org/lkml/20230823090107.65749-3-bchalios@amazon.es/T/#m085769c7b9c08f4acac626e7b4ecde11af13a5be
Cheers, Babis
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]