netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm00@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephen Boyd <sboyd@codeaurora.org>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the akpm tree
Date: Thu, 29 Sep 2011 23:02:26 -0700	[thread overview]
Message-ID: <20110929230226.5fed4095.akpm00@gmail.com> (raw)
In-Reply-To: <20110930153255.6e3a0d6dc7758b7fb5561fc6@canb.auug.org.au>

On Fri, 30 Sep 2011 15:32:55 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> In file included from arch/x86/include/asm/uaccess.h:575:0,
>                  from include/net/checksum.h:25,
>                  from include/linux/skbuff.h:28,
>                  from include/linux/icmpv6.h:82,
>                  from net/compat.c:19:
> In function 'copy_from_user',
>     inlined from 'compat_sys_socketcall' at net/compat.c:793:20:
> arch/x86/include/asm/uaccess_64.h:64:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct
> 
> Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
> for x86_64") when built with gcc 4.6.0.  This does not fail when built
> with 4.5.2.

This:

extern void copy_from_user_overflow(void)
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
	__compiletime_error("copy_from_user() buffer size is not provably correct")
#else
	__compiletime_warning("copy_from_user() buffer size is not provably correct")
#endif

presumably CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y, so it's doing what
we asked it to do.

> The problem here is that the length parameter to copy_from_user() is
> obtained by indexing into an array of sizes.  Making the array const
> does not help (obviously, since the index is not known at compile time
> anyway).
> 
> Maybe I need a newer compiler.  For today I have gone back to my 4.5.2
> compiler.

That patch is a PITA.  I've been waiting for some saviour to come along
and fix all the warnings it emits before proceeding with it.  As I am
apparently saviourless I shall hide that patch from the mm->linux-next
drop, so only I get to suffer its effects.

  reply	other threads:[~2011-09-30  6:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30  5:32 linux-next: build failure after merge of the akpm tree Stephen Rothwell
2011-09-30  6:02 ` Andrew Morton [this message]
2011-10-04  7:44   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2013-02-11  7:13 Stephen Rothwell
2013-02-11 12:04 ` Amir Vadai
2013-02-20  6:28 Stephen Rothwell
2017-06-30  6:32 Stephen Rothwell
2017-07-03  8:14 ` Stephen Rothwell
2017-07-03  8:57 ` David Miller

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=20110929230226.5fed4095.akpm00@gmail.com \
    --to=akpm00@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sfr@canb.auug.org.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).