[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210010107.C5eEgCI2-lkp@intel.com>
Date: Sat, 1 Oct 2022 01:26:22 +0800
From: kernel test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [kees:devel/hardening 37/69] fs/coredump.c:73: undefined reference
to `kmalloc_size_roundup'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git devel/hardening
head: 4b677c85590798c3141758109cc5be7ba068a3ff
commit: 4bc8c6167ed8206657c42b55791d742765aea0fc [37/69] coredump: Proactively round up to kmalloc bucket size
config: arm-randconfig-s043-20220925
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=4bc8c6167ed8206657c42b55791d742765aea0fc
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees devel/hardening
git checkout 4bc8c6167ed8206657c42b55791d742765aea0fc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: fs/coredump.o: in function `expand_corename':
>> fs/coredump.c:73: undefined reference to `kmalloc_size_roundup'
arm-linux-gnueabi-ld: drivers/dma-buf/dma-resv.o: in function `dma_resv_list_alloc':
drivers/dma-buf/dma-resv.c:104: undefined reference to `kmalloc_size_roundup'
arm-linux-gnueabi-ld: net/core/skbuff.o: in function `kmalloc_reserve':
net/core/skbuff.c:356: undefined reference to `kmalloc_size_roundup'
vim +73 fs/coredump.c
68
69 static int expand_corename(struct core_name *cn, int size)
70 {
71 char *corename;
72
> 73 size = kmalloc_size_roundup(size);
74 corename = krealloc(cn->corename, size, GFP_KERNEL);
75
76 if (!corename)
77 return -ENOMEM;
78
79 if (size > core_name_size) /* racy but harmless */
80 core_name_size = size;
81
82 cn->size = size;
83 cn->corename = corename;
84 return 0;
85 }
86
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (141648 bytes)
Powered by blists - more mailing lists