[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201606080727.qdZlSJTL%fengguang.wu@intel.com>
Date: Wed, 8 Jun 2016 07:36:31 +0800
From: kbuild test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: kbuild-all@...org, kernel-hardening@...ts.openwall.com,
Kees Cook <keescook@...omium.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Jiri Slaby <jslaby@...e.cz>,
Guenter Roeck <linux@...ck-us.net>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] lkdtm: add usercopy tests
Hi,
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.7-rc2 next-20160607]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kees-Cook/lkdtm-add-usercopy-and-rodata-fix-atomic/20160608-060444
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
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=s390
All warnings (new ones prefixed by >>):
drivers/misc/lkdtm_core.c: In function 'do_usercopy_stack_callee.isra.0':
>> drivers/misc/lkdtm_core.c:420:9: warning: function returns address of local variable [-Wreturn-local-addr]
return ptr;
^
drivers/misc/lkdtm_core.c:405:16: note: declared here
unsigned char buf[32];
^
vim +420 drivers/misc/lkdtm_core.c
404 {
405 unsigned char buf[32];
406 unsigned char *ptr = NULL;
407 int i;
408
409 /* Exercise stack to avoid everything living in registers. */
410 for (i = 0; i < sizeof(buf); i++) {
411 /*
412 * Hack to trick gcc into letting us return a reference
413 * to a local stack frame.
414 */
415 if (i == 0)
416 ptr = buf;
417 buf[i] = value & 0xff;
418 }
419
> 420 return ptr;
421 }
422
423 static noinline void do_usercopy_stack(bool to_user)
424 {
425 unsigned long user_addr;
426 unsigned char good_stack[32];
427 unsigned char *bad_stack;
428 int i;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/octet-stream" (16142 bytes)
Powered by blists - more mailing lists