News for hackers. Stuff that matters.
Re:An EPYC escape: Case-study of a KVM breakout by wyager on Tuesday June 29, 2021 @09:14PM (#27683818)
I think the way you’d want to implement it would be to only allow atomic copies (no aliasing) of the configuration blocks. There might be a way to do it efficiently without just pausing all the virtual cores. For example, you could blow out the memory mapping to that block so that it would trigger a page fault if and only if the guest tried to access that block, and you could make the page fault handler block until the supervisor was done copying. Or something along those lines.
Re:An EPYC escape: Case-study of a KVM breakout by amluto on Wednesday June 30, 2021 @10:55AM (#27689290)
Blowing away the memory mapping is a rather expensive operation. It’s also unclear why an atomic copy is useful. To prevent TOCTOU, you also need to prevent two consecutive atomic copies that inadvertently assume they get the same result each time.