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
In Friday, April 20, 2012 4:01 PM, Andrew Morton wrote:
> On Mon, 16 Apr 2012 17:33:23 -0700 H Hartley Sweeten wrote:
>
>> When using syscall routines in the kernel, some of the arguments
>> should be user pointers but are missing the __user markup. This
>> produces a number of sparse warnings of the format:
>>
>> warning: incorrect type in argument 1 (different address spaces)
>> expected char [noderef] <asn:1>*dev_name
>> got char *name
>>
>> Wrap the syscall routines in the private do_mounts.h header so that
>> the appropriate __user markups are added for the init mount code.
>
> This makes rather a mess of do_mounts.c for pretty marginal benefit.

Well... That's why it was a RFC... ;-)

> 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.

Regards,
Hartley

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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