lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [RFC PATCH 0/2] init: make sure syscall arguments are marked __user where needed
On Friday, April 20, 2012 5:43 PM, Andrew Morton wrote:
> On Fri, 20 Apr 2012 19:05:46 -0500 H Hartley Sweeten wrote:
>
>>> Can we just make "make C=1" skip that file or something?
>>
>> What about putting something like this at the top of the files:
>>
>>
>> /*
>> * Many of the syscalls used in this file expect some of the arguments
>> * to be __user pointers not __kernel pointers. To limit the sparse
>> * noise, turn off sparse checking for this file.
>> */
>> #ifdef __CHECKER__
>> #undef __CHECKER__
>> #warning "Sparse checking disabled for this file"
>> #endif
>>
>>
>> Maybe without the warning if it doesn't seem necessary.
>>
>> This keeps <linux/compiler.h> from defining the __attribute__* checks.
>
> That looks nice and explicit.

Another option would be to just undef the __user and __kernel checks. That
way the other sparse checks should still work.

I'll post an updated patch with the #undef __CHECKER__ method shortly.

Regards,
Hartley


\
 
 \ /
  Last update: 2012-04-21 02:49    [W:1.192 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site