Why does the PAT disable mmaping /dev/mem
Posted: Tue Jul 23, 2024 7:10 am
Linux has a check for mmap, if the PAT is enabled, then mmaping /dev/mem may fail.
In the source it says "This check is needed to avoid cache aliasing when PAT is enabled"
https://elixir.bootlin.com/linux/v6.10/ ... ype.c#L799
My questions is why would mapping /dev/mem cause aliasing, how is it different than any other map into the userspace process?
In the source it says "This check is needed to avoid cache aliasing when PAT is enabled"
https://elixir.bootlin.com/linux/v6.10/ ... ype.c#L799
My questions is why would mapping /dev/mem cause aliasing, how is it different than any other map into the userspace process?