linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] kasan: add kasan_tag_mismatch prototype
@ 2023-05-09 14:57 Arnd Bergmann
  2023-05-09 14:57 ` [PATCH 2/2] [v3] kasan: use internal prototypes matching gcc-13 builtins Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-09 14:57 UTC (permalink / raw)
  To: Andrey Ryabinin, Andrew Morton
  Cc: Arnd Bergmann, Alexander Potapenko, Andrey Konovalov,
	Dmitry Vyukov, Vincenzo Frascino, Marco Elver, kasan-dev,
	linux-mm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The kasan sw-tags implementation contains one function that is only
called from assembler and has no prototype in a header. This causes
a W=1 warning:

mm/kasan/sw_tags.c:171:6: warning: no previous prototype for 'kasan_tag_mismatch' [-Wmissing-prototypes]
  171 | void kasan_tag_mismatch(unsigned long addr, unsigned long access_info,

Add a prototype in the local header to get a clean build.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kasan/kasan.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index f5e4f5f2ba20..cd846ca34f44 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -646,4 +646,7 @@ void *__hwasan_memset(void *addr, int c, size_t len);
 void *__hwasan_memmove(void *dest, const void *src, size_t len);
 void *__hwasan_memcpy(void *dest, const void *src, size_t len);
 
+void kasan_tag_mismatch(unsigned long addr, unsigned long access_info,
+			unsigned long ret_ip);
+
 #endif /* __MM_KASAN_KASAN_H */
-- 
2.35.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-12 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 14:57 [PATCH 1/2] kasan: add kasan_tag_mismatch prototype Arnd Bergmann
2023-05-09 14:57 ` [PATCH 2/2] [v3] kasan: use internal prototypes matching gcc-13 builtins Arnd Bergmann
2023-05-12 23:50   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox