From: Guenter Roeck <linux@roeck-us.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] gcc4: Disable __compiletime_object_size for GCC 4.6+
Date: Wed, 13 Nov 2013 17:19:29 -0800 [thread overview]
Message-ID: <20131114011929.GA13835@roeck-us.net> (raw)
In-Reply-To: <5283E7A9.6090706@zytor.com>
On Wed, Nov 13, 2013 at 12:57:13PM -0800, H. Peter Anvin wrote:
> On 11/13/2013 10:39 AM, Kees Cook wrote:
> > Hi Guenter,
> >
> > On Fri, Apr 12, 2013 at 07:49:08PM -0700, Guenter Roeck wrote:
> >> __builtin_object_size is known to be broken on gcc 4.6+.
> >> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48880 for details.
> >>
> >> This causes unnecssary build warnings and errors such as
> >>
> >> In function 'copy_from_user', inlined from 'sb16_copy_from_user'
> >> at sound/oss/sb_audio.c:878:22:
> >> arch/x86/include/asm/uaccess_32.h:211:26: error: call to 'copy_from_user_overflow'
> >> declared with attribute error: copy_from_user() buffer size is not provably correct
> >> make[3]: [sound/oss/sb_audio.o] Error 1 (ignored)
> >>
> >> Disable it where broken.
> >
> > Is there an alternative? This means that things like
> > DEBUG_STRICT_USER_COPY_CHECKS are being rendered useless. I don't think
> > this is _always_ broken, just under certain situations, right?
> >
>
> It would be one thing to block it for, say, gcc 4.6 and 4.7 only, but
> without an upper cap I don't think this is at all okay.
>
Also please have a look into https://lkml.org/lkml/2013/10/21/52.
That patch has been accepted (3df7b41aa5e); maybe above commit
(2fb0815c9) is now unnecessary and can be reverted.
I don't know about parisc (Jan was concerned about that), but at least
on x86 I don't see above warning anymore after reverting my patch.
Guenter
prev parent reply other threads:[~2013-11-14 1:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 2:49 [PATCH] gcc4: Disable __compiletime_object_size for GCC 4.6+ Guenter Roeck
2013-11-13 18:39 ` Kees Cook
2013-11-13 20:24 ` Guenter Roeck
2013-11-13 20:57 ` H. Peter Anvin
2013-11-14 1:19 ` Guenter Roeck [this message]
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=20131114011929.GA13835@roeck-us.net \
--to=linux@roeck-us.net \
--cc=JBeulich@suse.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.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.