diff options
| author | Ard Biesheuvel <[email protected]> | 2021-11-20 00:43:55 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-11-20 18:35:54 +0000 |
| commit | 825c43f50e3aa811a291ffcb40e02fbf6d91ba86 (patch) | |
| tree | 729daf64405cf0fe6c772150b5ec0eb283c0fb8c /net/unix/af_unix.c | |
| parent | mm/damon/dbgfs: fix missed use of damon_dbgfs_lock (diff) | |
| download | kernel-825c43f50e3aa811a291ffcb40e02fbf6d91ba86.tar.gz kernel-825c43f50e3aa811a291ffcb40e02fbf6d91ba86.zip | |
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: 2a15ba82fa6c ("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]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
