arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 1 Apr 2022 15:13:56 +0000 (16:13 +0100)
committerWill Deacon <will@kernel.org>
Mon, 4 Apr 2022 08:59:27 +0000 (09:59 +0100)
commit16decce22efa0813beafbc9084181e299b69a1a1
tree6ba4c5a4c0a53b1776017006569a01ff200ddb8b
parenta0ab7e5bc9651d65637f50ee9c09e083919677ed
arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()

With 64K page configurations, the tags array stored on the stack of the
mte_dump_tag_range() function is 2048 bytes, triggering a compiler
warning when CONFIG_FRAME_WARN is enabled. Switch to a kmalloc()
allocation via mte_allocate_tag_storage().

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Fixes: 6dd8b1a0b6cb ("arm64: mte: Dump the MTE tags in the core file")
Reported-by: kernel test robot <lkp@intel.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220401151356.1674232-1-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/elfcore.c