linux-next: build failure after merge of the akpm tree

From: Stephen Rothwell
Date: Fri Sep 30 2011 - 01:33:05 EST


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.

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.

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgp00000.pgp
Description: PGP signature