lkml.org 
[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] floppy: Add an extra bound check on ioctl arguments
On Wed, 30 Sep 2009 16:13:16 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Wed, 30 Sep 2009 13:17:09 +0200
> Arjan van de Ven <arjan@infradead.org> wrote:
>
> > gcc is not convinced that the floppy.c ioctl has sufficient bound
> > checks,
>
> gad. You said "floppy" and "ioctl" in the same sentence. Where
> angels fear to tread.

I have to admit I was very much not looking forward to working on this
warning, and made sure to wear protective clothing and that my
immunizations were up to date.
>
> It would be useful if you were to quote the gcc output in the
> changelog please.


In function ‘copy_from_user’,
inlined from ‘fd_copyin’ at drivers/block/floppy.c:3080,
inlined from ‘fd_ioctl’ at drivers/block/floppy.c:3503:
/home/arjan/linux/arch/x86/include/asm/uaccess_32.h:211:
warning: call to ‘copy_from_user_overflow’ declared with attribute
warning: copy_from_user buffer size is not provably correct

> I assume that you're using some magical new gcc
> option or something?

Not so much a new option, as using an option that has been there for a
while, and has been used extensively in userspace, just not yet in the
kernel. The patches are in the -tip tree, but if you want to take a
peek I can send them to you as well... they find some "interesting"
stuff.


--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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: 2009-10-01 23:53    [W:0.060 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site