Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416729

Re: [PATCH 4/5] lkdtm: add usercopy tests

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/5] lkdtm: add usercopy tests
Date 2016-06-08 01:40 +0200
Message-ID <rHyLf-GT-1@gated-at.bofh.it> (permalink)
References <rHxct-85W-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4/5] lkdtm: add usercopy tests Kees Cook <keescook@chromium.org> - 2016-06-08 00:00 +0200
  Re: [PATCH 4/5] lkdtm: add usercopy tests kbuild test robot <lkp@intel.com> - 2016-06-08 01:40 +0200
  Re: [PATCH 4/5] lkdtm: add usercopy tests kbuild test robot <lkp@intel.com> - 2016-06-08 02:10 +0200

csiph-web