]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 14 Nov 2019 00:06:42 +0000 (16:06 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 13:57:22 +0000 (07:57 -0600)
commitfc95536d5303faf4b8253becb0be4fdbf536a937
treeb5f19337968291e1021790ffac97ebe9cc41a76a
parent75e8ebf63e81a2cadeee7c93c142eb39c280669c
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map

BugLink: https://bugs.launchpad.net/bugs/1858427
commit e64681b487c897ec871465083bf0874087d47b66 upstream.

KASAN shadow map doesn't need to be accessible through the linear kernel
mapping, allocate its pages with MEMBLOCK_ALLOC_ANYWHERE so that high
memory can be used. This frees up to ~100MB of low memory on xtensa
configurations with KASAN and high memory.

Cc: stable@vger.kernel.org # v5.1+
Fixes: f240ec09bb8a ("memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc")
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/xtensa/mm/kasan_init.c