Re: [PATCH 3/4] x86: Implement strict user copy checks for x86_64

From: Andrew Morton
Date: Thu Jul 07 2011 - 17:54:31 EST


On Tue, 31 May 2011 11:14:32 -0700
Stephen Boyd <sboyd@xxxxxxxxxxxxxx> wrote:

> Strict user copy checks are only really supported on x86_32 even
> though the config option is selectable on x86_64. Add the
> necessary support to the 64 bit code to trigger copy_from_user()
> warnings at compile time.

I'm still reluctant to go and throw a pile of warnings into many
people's faces without having made an attempt to fix them.


We get a screen full of these:

inlined from 'pktgen_if_write' at net/core/pktgen.c:877:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:1145:
/usr/src/devel/arch/x86/include/asm/uaccess_64.h:64: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
...

and I don't immediately see a way of suppressing them without adding
additional code.

Ideas?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/