Files
Linux/mm
Ard Biesheuvel 825c43f50e kmap_local: don't assume kmap PTEs are linear arrays in memory
The kmap_local conversion broke the ARM architecture, because the new
code assumes that all PTEs used for creating kmaps form a linear array
in memory, and uses array indexing to look up the kmap PTE belonging to
a certain kmap index.

On ARM, this cannot work, not only because the PTE pages may be
non-adjacent in memory, but also because ARM/!LPAE interleaves hardware
entries and extended entries (carrying software-only bits) in a way that
is not compatible with array indexing.

Fortunately, this only seems to affect configurations with more than 8
CPUs, due to the way the per-CPU kmap slots are organized in memory.

Work around this by permitting an architecture to set a Kconfig symbol
that signifies that the kmap PTEs do not form a lineary array in memory,
and so the only way to locate the appropriate one is to walk the page
tables.

Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 2a15ba82fa ("ARM: highmem: Switch to generic kmap atomic")
Signed-off-by: Ard Biesheuvel <[email protected]>
Reported-by: Quanyang Wang <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Russell King (Oracle) <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2021-11-20 10:35:54 -08:00
..
2021-05-07 00:26:35 -07:00
…
2021-06-29 10:53:52 -07:00
…
2021-10-18 07:49:41 -04:00
2021-10-18 07:49:39 -04:00
2021-10-14 13:29:22 +02:00
2021-11-11 09:34:35 -08:00
…
…
…
…
…
2021-11-06 13:30:34 -07:00
2021-06-05 20:43:15 +00:00
2021-05-07 00:26:35 -07:00
…
…
2021-10-18 07:49:39 -04:00
2021-05-07 00:26:35 -07:00