linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 315/342] mm/slub.c:1038:17: error: implicit declaration of function '__memset'; did you mean 'memset'?
Date: Fri, 15 Dec 2023 19:23:07 +0800	[thread overview]
Message-ID: <202312151925.c1R7UpLE-lkp@intel.com> (raw)

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


             reply	other threads:[~2023-12-15 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 11:23 kernel test robot [this message]
2023-12-15 19:03 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202312151925.c1R7UpLE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=iii@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox