mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: arm64: Add kasan_hw_tags_enable() prototype to silence sparse
This function is only called from assembly, no need for a prototype
declaration in a header file. In addition, add #ifdef around the
function since it is only used when CONFIG_KASAN_HW_TAGS.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: kernel test robot <lkp@intel.com>
Bug: 254721825
(cherry picked from commit 78cdaf3f42)
Change-Id: I222d17ae6cf5df53c922ef8c126115efaf6d9eee
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
This commit is contained in:
committed by
Todd Kjos
parent
982740822c
commit
2ae46ec391
@@ -248,6 +248,11 @@ static void mte_update_gcr_excl(struct task_struct *task)
|
||||
SYS_GCR_EL1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KASAN_HW_TAGS
|
||||
/* Only called from assembly, silence sparse */
|
||||
void __init kasan_hw_tags_enable(struct alt_instr *alt, __le32 *origptr,
|
||||
__le32 *updptr, int nr_inst);
|
||||
|
||||
void __init kasan_hw_tags_enable(struct alt_instr *alt, __le32 *origptr,
|
||||
__le32 *updptr, int nr_inst)
|
||||
{
|
||||
@@ -256,6 +261,7 @@ void __init kasan_hw_tags_enable(struct alt_instr *alt, __le32 *origptr,
|
||||
if (kasan_hw_tags_enabled())
|
||||
*updptr = cpu_to_le32(aarch64_insn_gen_nop());
|
||||
}
|
||||
#endif
|
||||
|
||||
void mte_thread_init_user(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user