linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'?
@ 2023-12-15 11:23 kernel test robot
  2023-12-15 19:03 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-12-15 11:23 UTC (permalink / raw)
  To: Ilya Leoshkevich
  Cc: oe-kbuild-all, Andrew Morton, Linux Memory Management List

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312151925.c1R7UpLE-lkp@intel.com/

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


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

* Re: [akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'?
  2023-12-15 11:23 [akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'? kernel test robot
@ 2023-12-15 19:03 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2023-12-15 19:03 UTC (permalink / raw)
  To: kernel test robot
  Cc: Ilya Leoshkevich, oe-kbuild-all, Linux Memory Management List

On Fri, 15 Dec 2023 19:23:07 +0800 kernel test robot <lkp@intel.com> wrote:

> ree:   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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202312151925.c1R7UpLE-lkp@intel.com/
> 
> 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

Not all architectures implement __memset().

I'll disable the series for now, thanks.


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

end of thread, other threads:[~2023-12-15 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-15 11:23 [akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'? kernel test robot
2023-12-15 19:03 ` Andrew Morton

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