Re: mm/kmsan/instrumentation.c:41:26: warning: no previous prototype for function '__msan_metadata_ptr_for_load_n'
From: Marco Elver
Date: Mon Jan 02 2023 - 05:28:12 EST
On Mon, Jan 02, 2023 at 11:01AM +0100, Vlastimil Babka wrote:
> +CC kmsan folks.
>
> I think it's another side-effect where CONFIG_SLUB_TINY excludes KASAN which
> in turn allows KMSAN to be enabled and uncover a pre-existing issue.
>
> On 1/1/23 20:10, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: e4cf7c25bae5c3b5089a3c23a897f450149caef2
> > commit: e240e53ae0abb0896e0f399bdfef41c69cec3123 mm, slub: add CONFIG_SLUB_TINY
> > date: 5 weeks ago
> > config: x86_64-randconfig-a013-20230102
> > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> > 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
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e240e53ae0abb0896e0f399bdfef41c69cec3123
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout e240e53ae0abb0896e0f399bdfef41c69cec3123
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash mm/kmsan/
> >
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> >
> > All warnings (new ones prefixed by >>):
> >
> >>> mm/kmsan/instrumentation.c:41:26: warning: no previous prototype for function '__msan_metadata_ptr_for_load_n' [-Wmissing-prototypes]
> > struct shadow_origin_ptr __msan_metadata_ptr_for_load_n(void *addr,
Probably needs a fix similar to:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9dd979bae4cf76558ff816abe83283308fb1ae8c