When CONFIG_DEBUG_VIRTUAL is enabled, the default page_to_virt() macro
implementation from include/linux/mm.h is used. That definition doesn't
account for KASAN tags, which leads to no tags on page_alloc allocations.
Provide an arm64-specific definition for page_to_virt() when
CONFIG_DEBUG_VIRTUAL is enabled that takes care of KASAN tags.
Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc")
Cc: <redacted>
Signed-off-by: Andrey Konovalov <redacted>
---
arch/arm64/include/asm/memory.h | 5 +++++
1 file changed, 5 insertions(+)
On Mon, Mar 08, 2021 at 05:10:23PM +0100, Andrey Konovalov wrote:
quoted hunk
When CONFIG_DEBUG_VIRTUAL is enabled, the default page_to_virt() macro
implementation from include/linux/mm.h is used. That definition doesn't
account for KASAN tags, which leads to no tags on page_alloc allocations.
Provide an arm64-specific definition for page_to_virt() when
CONFIG_DEBUG_VIRTUAL is enabled that takes care of KASAN tags.
Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc")
Cc: <redacted>
Signed-off-by: Andrey Konovalov <redacted>
---
arch/arm64/include/asm/memory.h | 5 +++++
1 file changed, 5 insertions(+)
From: Will Deacon <will@kernel.org> Date: 2021-03-09 15:39:22
On Mon, 8 Mar 2021 17:10:23 +0100, Andrey Konovalov wrote:
When CONFIG_DEBUG_VIRTUAL is enabled, the default page_to_virt() macro
implementation from include/linux/mm.h is used. That definition doesn't
account for KASAN tags, which leads to no tags on page_alloc allocations.
Provide an arm64-specific definition for page_to_virt() when
CONFIG_DEBUG_VIRTUAL is enabled that takes care of KASAN tags.