mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
FROMGIT: arm64: fix warning in mte_get_random_tag()
The simplification of mte_get_random_tag() caused the introduction of the
warning below:
In file included from arch/arm64/include/asm/kasan.h:9,
from include/linux/kasan.h:16,
from mm/kasan/common.c:14:
mm/kasan/common.c: In function `mte_get_random_tag':
arch/arm64/include/asm/mte-kasan.h:45:9: warning: `addr' is used
uninitialized [-Wuninitialized]
45 | asm(__MTE_PREAMBLE "irg %0, %0"
|
Fix the warning using "=r" for the address in the asm inline.
Link: https://lkml.kernel.org/r/20210211152208.23811-1-vincenzo.frascino@arm.com
Fixes: c8f8de4c0887 ("arm64: kasan: simplify and inline MTE functions")
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
(cherry picked from commit 37a7f3b88e3dde2479e1aa93847093b5e97a9c01
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Bug: 172318110
Change-Id: I7c52f84b9d746373c341a7cd36b12309ab993141
This commit is contained in:
committed by
Andrey Konovalov
parent
9e7985701d
commit
b989c94cb2
@@ -43,7 +43,7 @@ static inline u8 mte_get_random_tag(void)
|
||||
void *addr;
|
||||
|
||||
asm(__MTE_PREAMBLE "irg %0, %0"
|
||||
: "+r" (addr));
|
||||
: "=r" (addr));
|
||||
|
||||
return mte_get_ptr_tag(addr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user