Thread (51 messages) flat view 51 messages, 7 authors, 2021-01-15

Re: [PATCH 10/11] kasan: fix bug detection via ksize for HW_TAGS mode

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2021-01-07 00:02:55
Also in: oe-kbuild-all

On Wed, 6 Jan 2021 08:09:00 +0800 kernel test robot [off-list ref] wrote:
Hi Andrey,
   In file included from arch/x86/boot/compressed/cmdline.c:2:
   In file included from arch/x86/boot/compressed/misc.h:30:
   In file included from include/linux/acpi.h:14:
   In file included from include/linux/resource_ext.h:11:
   In file included from include/linux/slab.h:136:
quoted
quoted
include/linux/kasan.h:314:77: warning: non-void function does not return a value [-Wreturn-type]
   static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
                                                                               ^
   1 warning generated.
This?
--- a/include/linux/kasan.h~kasan-fix-bug-detection-via-ksize-for-hw_tags-mode-fix
+++ a/include/linux/kasan.h
@@ -311,7 +311,10 @@ static inline void *kasan_krealloc(const
 	return (void *)object;
 }
 static inline void kasan_kfree_large(void *ptr, unsigned long ip) {}
-static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
+static inline bool kasan_check_byte(const void *address, unsigned long ip)
+{
+	return true;
+}
 
 #endif /* CONFIG_KASAN */
 
btw, "kasan_check_byte" isn't a good function name.  Check for what? 
Does it return true for a check which passed, or for a check which
failed?  Something like "kasan_byte_valid" would be better - the name
explains the return value.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help