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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrey,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc2]
[cannot apply to arm64/for-next/core hnaz-linux-mm/master next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andrey-Konovalov/kasan-HW_TAGS-tests-support-and-fixes/20210106-022940
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
config: x86_64-randconfig-a006-20210105 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/15d82adbf82e57e44789e091da9e141ba4247dba
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrey-Konovalov/kasan-HW_TAGS-tests-support-and-fixes/20210106-022940
        git checkout 15d82adbf82e57e44789e091da9e141ba4247dba
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:136:
>> include/linux/kasan.h:314:77: error: non-void function does not return a value [-Werror,-Wreturn-type]
   static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
                                                                               ^
   1 error generated.
--
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:136:
>> include/linux/kasan.h:314:77: error: non-void function does not return a value [-Werror,-Wreturn-type]
   static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
                                                                               ^
   1 error generated.
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:136:
>> include/linux/kasan.h:314:77: error: non-void function does not return a value [-Werror,-Wreturn-type]
   static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
                                                                               ^
   1 error generated.
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1206: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +314 include/linux/kasan.h

   262	
   263	static inline bool kasan_enabled(void)
   264	{
   265		return false;
   266	}
   267	static inline slab_flags_t kasan_never_merge(void)
   268	{
   269		return 0;
   270	}
   271	static inline void kasan_unpoison_range(const void *address, size_t size) {}
   272	static inline void kasan_alloc_pages(struct page *page, unsigned int order) {}
   273	static inline void kasan_free_pages(struct page *page, unsigned int order) {}
   274	static inline void kasan_cache_create(struct kmem_cache *cache,
   275					      unsigned int *size,
   276					      slab_flags_t *flags) {}
   277	static inline size_t kasan_metadata_size(struct kmem_cache *cache) { return 0; }
   278	static inline void kasan_poison_slab(struct page *page) {}
   279	static inline void kasan_unpoison_object_data(struct kmem_cache *cache,
   280						void *object) {}
   281	static inline void kasan_poison_object_data(struct kmem_cache *cache,
   282						void *object) {}
   283	static inline void *kasan_init_slab_obj(struct kmem_cache *cache,
   284					const void *object)
   285	{
   286		return (void *)object;
   287	}
   288	static inline bool kasan_slab_free(struct kmem_cache *s, void *object,
   289					   unsigned long ip)
   290	{
   291		return false;
   292	}
   293	static inline void kasan_slab_free_mempool(void *ptr, unsigned long ip) {}
   294	static inline void *kasan_slab_alloc(struct kmem_cache *s, void *object,
   295					   gfp_t flags)
   296	{
   297		return object;
   298	}
   299	static inline void *kasan_kmalloc(struct kmem_cache *s, const void *object,
   300					size_t size, gfp_t flags)
   301	{
   302		return (void *)object;
   303	}
   304	static inline void *kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags)
   305	{
   306		return (void *)ptr;
   307	}
   308	static inline void *kasan_krealloc(const void *object, size_t new_size,
   309					 gfp_t flags)
   310	{
   311		return (void *)object;
   312	}
   313	static inline void kasan_kfree_large(void *ptr, unsigned long ip) {}
 > 314	static inline bool kasan_check_byte(const void *address, unsigned long ip) {}
   315	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux