lkml.org 
[lkml]   [2016]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [INFO] ratio of const vs dynamic usercopy
Hi Kees,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc7 next-20160920]
[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: x86_64-randconfig-s2-09211158 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

cc1: warnings being treated as errors
In file included from arch/x86/include/asm/preempt.h:6,
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/linux/stat.h:18,
from include/linux/compat.h:12,
from drivers/gpu/drm/i915/i915_ioc32.c:32:
In function 'copy_from_user',
inlined from 'compat_i915_getparam' at drivers/gpu/drm/i915/i915_ioc32.c:54:
>> include/linux/thread_info.h:131: error: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
--
cc1: warnings being treated as errors
In file included from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from include/linux/fs.h:5,
from include/linux/seq_file.h:10,
from drivers/gpu/drm/i915/i915_debugfs.c:29:
include/linux/thread_info.h: In function 'wm_latency_write':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
In function 'copy_to_user',
inlined from 'i915_pipe_crc_read' at drivers/gpu/drm/i915/i915_debugfs.c:3641:
>> include/linux/thread_info.h:131: error: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
include/linux/thread_info.h: In function 'display_crc_ctl_write':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'i915_displayport_test_active_write':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
--
cc1: warnings being treated as errors
In file included from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/rcupdate.h:38,
from include/linux/idr.h:18,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/cdev.h:4,
from include/drm/drmP.h:36,
from drivers/gpu/drm/i915/i915_gem_execbuffer.c:29:
include/linux/thread_info.h: In function 'i915_gem_execbuffer_relocate_vma':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
In function 'copy_from_user',
inlined from 'i915_gem_execbuffer_relocate_slow' at drivers/gpu/drm/i915/i915_gem_execbuffer.c:872:
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'i915_gem_execbuffer_relocate_slow':
>> include/linux/thread_info.h:131: error: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
In function 'copy_from_user',
inlined from 'i915_gem_execbuffer2' at drivers/gpu/drm/i915/i915_gem_execbuffer.c:1776:
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'i915_gem_execbuffer2':
>> include/linux/thread_info.h:131: error: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
In function 'copy_from_user',
inlined from 'i915_gem_execbuffer' at drivers/gpu/drm/i915/i915_gem_execbuffer.c:1688:
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'i915_gem_execbuffer':
>> include/linux/thread_info.h:131: error: call to '__skip_check_object_size' declared with attribute warning: builtin-const usercopy
--
cc1: warnings being treated as errors
In file included from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/rcupdate.h:38,
from include/linux/idr.h:18,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/cdev.h:4,
from include/drm/drmP.h:36,
from drivers/gpu/drm/i915/i915_gem.c:28:
include/linux/thread_info.h: In function 'shmem_pread_fast':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'shmem_pwrite_slow':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'shmem_pread_slow':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'shmem_pwrite_fast':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy
include/linux/thread_info.h: In function 'i915_gem_phys_pwrite':
>> include/linux/thread_info.h:129: error: call to '__check_object_size' declared with attribute warning: dynamic usercopy

vim +/__skip_check_object_size +131 include/linux/thread_info.h

123 __skip_check_object_size(void);
124
125 static __always_inline void check_object_size(const void *ptr, unsigned long n,
126 bool to_user)
127 {
128 if (!__builtin_constant_p(n))
> 129 __check_object_size(ptr, n, to_user);
130 else
> 131 __skip_check_object_size();
132 }
133 #else
134 static inline void check_object_size(const void *ptr, unsigned long n,

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2016-09-22 23:58    [W:0.089 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site