On 3/5/25 19:46, Andrew Morton wrote:currently the scenario that causes this issue only happens on x86, therfore I did a hotfix to make sure it would not affect other archtecture.
Can we please have review from x86 maintainers?
I didn't respond here because I thought this was the same problem from
the same contributor that we addressed in another thread:
https://lore.kernel.org/all/d1da214c-53d3-45ac-a8b6-51821c5416e4@xxxxxxxxx/
I think this approach is a hack. It basically requires that every bit of
code that _might_ update (and then use) a PGD in the init_mm know how to
find the direct map alias and then use that instead. This would further
specialize the x86 code. I have no reason to believe that this is truly
an x86-specific problem. Are we really the only arch that has a
per-process PGD that maps the shared kernel page tables?
The right solution (like I mentioned in the other thread) is to sync theI'll send a new patch that introdues helper functions suggested by Dave above.
PGDs more aggressively. Syncing them is expensive, of course, but it's a
pretty darn rare operation.