|
Message-ID: <201606080821.2ILzOcsM%fengguang.wu@intel.com>
Date: Wed, 8 Jun 2016 08:07:21 +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: x86_64-randconfig-s2-06080621 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/misc/lkdtm_core.c: In function 'do_usercopy_stack_callee':
>> drivers/misc/lkdtm_core.c:420:9: warning: function may return 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" (26281 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.