[akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   3271cacfede84a7e27d318fdf12fbeb7cab7b305
commit: 082b07014f97afe25e73493a58f21b45c2742cd7 [315/342] kmsan: support SLAB_POISON
config: arc-allnoconfig (https://download.01.org/0day-ci/archive/20231215/202312151925.c1R7UpLE-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312151925.c1R7UpLE-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312151925.c1R7UpLE-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   mm/slub.c: In function 'init_object':
>> mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'? [-Werror=implicit-function-declaration]
    1038 |                 __memset(p - s->red_left_pad, val, s->red_left_pad);
         |                 ^~~~~~~~
         |                 memset
   cc1: some warnings being treated as errors


vim +1038 mm/slub.c

  1026	
  1027	static void init_object(struct kmem_cache *s, void *object, u8 val)
  1028	{
  1029		u8 *p = kasan_reset_tag(object);
  1030		unsigned int poison_size = s->object_size;
  1031	
  1032		if (s->flags & SLAB_RED_ZONE) {
  1033			/*
  1034			 * Use __memset() here and below in order to avoid overwriting
  1035			 * the KMSAN shadow. Keeping the shadow makes it possible to
  1036			 * distinguish uninit-value from use-after-free.
  1037			 */
> 1038			__memset(p - s->red_left_pad, val, s->red_left_pad);
  1039	
  1040			if (slub_debug_orig_size(s) && val == SLUB_RED_ACTIVE) {
  1041				/*
  1042				 * Redzone the extra allocated space by kmalloc than
  1043				 * requested, and the poison size will be limited to
  1044				 * the original request size accordingly.
  1045				 */
  1046				poison_size = get_orig_size(s, object);
  1047			}
  1048		}
  1049	
  1050		if (s->flags & __OBJECT_POISON) {
  1051			__memset(p, POISON_FREE, poison_size - 1);
  1052			__memset(p + poison_size - 1, POISON_END, 1);
  1053		}
  1054	
  1055		if (s->flags & SLAB_RED_ZONE)
  1056			__memset(p + poison_size, val, s->inuse - poison_size);
  1057	}
  1058	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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