From: Arjan van de Ven <arjan@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] floppy: Add an extra bound check on ioctl arguments
Date: Thu, 1 Oct 2009 09:17:51 +0200 [thread overview]
Message-ID: <20091001091751.5e7c1782@infradead.org> (raw)
In-Reply-To: <20090930161316.96b5889e.akpm@linux-foundation.org>
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
next prev parent reply other threads:[~2009-10-01 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 11:17 [PATCH] floppy: Add an extra bound check on ioctl arguments Arjan van de Ven
2009-09-30 23:13 ` Andrew Morton
2009-10-01 7:17 ` Arjan van de Ven [this message]
2009-09-30 23:16 ` Andrew Morton
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=20091001091751.5e7c1782@infradead.org \
--to=arjan@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.