From: kbuild test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: kbuild-all@01.org, Alexander Viro <viro@zeniv.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [INFO] ratio of const vs dynamic usercopy
Date: Tue, 20 Sep 2016 13:48:01 +0800 [thread overview]
Message-ID: <201609201341.9OzrwRFU%fengguang.wu@intel.com> (raw)
In-Reply-To: <20160920045839.GA139098@beast>
[-- Attachment #1: Type: text/plain, Size: 6300 bytes --]
Hi Kees,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.8-rc7 next-20160919]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Kees-Cook/ratio-of-const-vs-dynamic-usercopy/20160920-130133
config: i386-randconfig-s0-09191616 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/preempt.h:6:0,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/mm_types.h:8,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from include/linux/if_arp.h:26,
from net/ipx/af_ipx.c:33:
In function 'check_object_size',
inlined from 'copy_to_user' at arch/x86/include/asm/uaccess.h:742:3,
inlined from 'ipx_getsockopt' at net/ipx/af_ipx.c:1316:2:
>> include/linux/thread_info.h:129:3: warning: call to '__check_object_size' declared with attribute warning: dynamic usercopy
__check_object_size(ptr, n, to_user);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'check_object_size',
inlined from 'copy_from_user' at arch/x86/include/asm/uaccess.h:722:3,
inlined from 'ipxitf_ioctl' at net/ipx/af_ipx.c:1129:3,
inlined from 'ipx_ioctl' at net/ipx/af_ipx.c:1872:6:
>> include/linux/thread_info.h:131:3: warning: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
__skip_check_object_size();
^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'check_object_size',
inlined from 'copy_from_user' at arch/x86/include/asm/uaccess.h:722:3,
inlined from 'ipxitf_ioctl' at net/ipx/af_ipx.c:1154:3,
inlined from 'ipx_ioctl' at net/ipx/af_ipx.c:1872:6:
>> include/linux/thread_info.h:131:3: warning: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
__skip_check_object_size();
^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'check_object_size',
inlined from 'copy_to_user' at arch/x86/include/asm/uaccess.h:742:3,
inlined from 'ipxitf_ioctl' at net/ipx/af_ipx.c:1172:3,
inlined from 'ipx_ioctl' at net/ipx/af_ipx.c:1872:6:
>> include/linux/thread_info.h:131:3: warning: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
__skip_check_object_size();
^~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'check_object_size',
inlined from 'copy_to_user' at arch/x86/include/asm/uaccess.h:742:3,
inlined from 'ipxcfg_get_config_data' at net/ipx/af_ipx.c:105:9,
inlined from 'ipx_ioctl' at net/ipx/af_ipx.c:1875:6:
>> include/linux/thread_info.h:131:3: warning: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
__skip_check_object_size();
^~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/preempt.h:6:0,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from net/ipx/ipx_route.c:12:
In function 'check_object_size',
inlined from 'copy_from_user' at arch/x86/include/asm/uaccess.h:722:3,
inlined from 'ipxrtr_ioctl' at net/ipx/ipx_route.c:264:2:
>> include/linux/thread_info.h:131:3: warning: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
__skip_check_object_size();
^~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/preempt.h:6:0,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:19,
from include/linux/uaccess.h:4,
from security/keys/encrypted-keys/encrypted.c:17:
In function 'check_object_size',
inlined from 'copy_to_user' at arch/x86/include/asm/uaccess.h:742:3,
inlined from 'encrypted_read' at security/keys/encrypted-keys/encrypted.c:961:2:
>> include/linux/thread_info.h:129:3: warning: call to '__check_object_size' declared with attribute warning: dynamic usercopy
__check_object_size(ptr, n, to_user);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__check_object_size +129 include/linux/thread_info.h
2c4beea2 Kees Cook 2016-09-19 123 __skip_check_object_size(void);
2c4beea2 Kees Cook 2016-09-19 124
a85d6b82 Kees Cook 2016-09-07 125 static __always_inline void check_object_size(const void *ptr, unsigned long n,
f5509cc1 Kees Cook 2016-06-07 126 bool to_user)
f5509cc1 Kees Cook 2016-06-07 127 {
81409e9e Kees Cook 2016-08-31 128 if (!__builtin_constant_p(n))
f5509cc1 Kees Cook 2016-06-07 @129 __check_object_size(ptr, n, to_user);
2c4beea2 Kees Cook 2016-09-19 130 else
2c4beea2 Kees Cook 2016-09-19 @131 __skip_check_object_size();
f5509cc1 Kees Cook 2016-06-07 132 }
f5509cc1 Kees Cook 2016-06-07 133 #else
f5509cc1 Kees Cook 2016-06-07 134 static inline void check_object_size(const void *ptr, unsigned long n,
:::::: The code at line 129 was first introduced by commit
:::::: f5509cc18daa7f82bcc553be70df2117c8eedc16 mm: Hardened usercopy
:::::: TO: Kees Cook <keescook@chromium.org>
:::::: CC: Kees Cook <keescook@chromium.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23624 bytes --]
next prev parent reply other threads:[~2016-09-20 5:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 4:58 Kees Cook
2016-09-20 5:48 ` kbuild test robot [this message]
2016-09-20 23:17 ` Kees Cook
2016-09-21 2:31 ` Fengguang Wu
2016-09-21 2:41 ` Kees Cook
2016-09-20 14:19 ` Josh Poimboeuf
2016-09-21 0:31 ` Kees Cook
2016-09-21 1:00 ` Linus Torvalds
2016-09-21 5:36 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201609201341.9OzrwRFU%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=jpoimboe@redhat.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®