| ▲ | amluto 8 hours ago | ||||||||||||||||||||||||||||
Nice sleuthing, nonsense explanation. An extra TLB flush is never an error. (The CPU is free to flush whenever it feels like doing so.) The error seems to be that somehow a zero-page PTE was present when it shouldn’t have been. This sounds to me like either (a) a complex race involving a CPU migration at an awkward time or (b) a bug in the zap path transiently exposing wrong PTEs. Also, I don’t think the zero page has pfn zero. If I had to throw a dart, I would guess that direct page table zapping is allowing a CPU to read through a higher-level-paging-structure cached entry to a table that has been freed and reused. Yuck. I’ve debugged one of these before. | |||||||||||||||||||||||||||||
| ▲ | Retr0id 7 hours ago | parent | next [-] | ||||||||||||||||||||||||||||
The part that doesn't make sense to me is that trying to read through a zeroed PTE should be an immediate segfault, not something that reads back zeroes (regardless of whether the zero page is pfn 0 (it isn't)). I think the broad strokes are that, due to bad locking in the kernel, mmap() returns a VA that a concurrent munmap() is still in the middle of unmapping. The specifics beyond that seem murky/speculative/inconsistent. Alternatively, it could be a hardware bug, since afaict it's only been repro'd on one hardware config. (I know there are a bunch of ARM cores with erratas around TLB invalidation) | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ▲ | inigyou 8 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
The explanation is obviously written by an AI agent. | |||||||||||||||||||||||||||||