Re: [PATCH] strscpy: zero any trailing garbage bytes in the destination

From: kbuild test robot
Date: Tue Oct 06 2015 - 12:59:58 EST


Hi Chris,

[auto build test ERROR on v4.3-rc4 -- if it's inappropriate base, please ignore]

config: alpha-defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All errors (new ones prefixed by >>):

lib/string.c: In function 'strscpy':
>> lib/string.c:209:4: error: implicit declaration of function 'zero_bytemask' [-Werror=implicit-function-declaration]
*(unsigned long *)(dest+res) = c & zero_bytemask(data);
^
cc1: some warnings being treated as errors

vim +/zero_bytemask +209 lib/string.c

203 unsigned long c, data;
204
205 c = *(unsigned long *)(src+res);
206 if (has_zero(c, &data, &constants)) {
207 data = prep_zero_mask(c, data, &constants);
208 data = create_zero_mask(data);
> 209 *(unsigned long *)(dest+res) = c & zero_bytemask(data);
210 return res + find_zero(data);
211 }
212 *(unsigned long *)(dest+res) = c;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data