* linux-next: sparc tree build warning
@ 2009-12-14 5:33 Stephen Rothwell
2009-12-14 7:01 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Stephen Rothwell @ 2009-12-14 5:33 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]
Hi Dave,
Today's linux-next build (sparc defconfig) produced this warning:
In file included from arch/sparc/include/asm/uaccess.h:7,
from include/net/checksum.h:26,
from include/linux/skbuff.h:29,
from net/core/pktgen.c:141:
In function 'copy_from_user',
inlined from 'pktgen_if_write' at net/core/pktgen.c:867:
arch/sparc/include/asm/uaccess_32.h:276: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
and many more.
The sparc64 defconfig build produced many similar warnings:
In file included from arch/sparc/include/asm/uaccess.h:5,
from include/linux/uaccess.h:6,
from include/linux/highmem.h:7,
from include/linux/pagemap.h:11,
from include/linux/mempolicy.h:63,
from mm/mempolicy.c:69:
arch/sparc/include/asm/uaccess_64.h: In function 'compat_sys_get_mempolicy':
arch/sparc/include/asm/uaccess_64.h:232: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2009-12-14 5:33 linux-next: sparc tree build warning Stephen Rothwell
@ 2009-12-14 7:01 ` David Miller
2009-12-14 8:55 ` Stephen Rothwell
2009-12-14 7:40 ` David Miller
2010-01-28 7:44 ` Stephen Rothwell
2 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-12-14 7:01 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 14 Dec 2009 16:33:38 +1100
> Today's linux-next build (sparc defconfig) produced this warning:
>
> In file included from arch/sparc/include/asm/uaccess.h:7,
> from include/net/checksum.h:26,
> from include/linux/skbuff.h:29,
> from net/core/pktgen.c:141:
> In function 'copy_from_user',
> inlined from 'pktgen_if_write' at net/core/pktgen.c:867:
> arch/sparc/include/asm/uaccess_32.h:276: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
Rats, compiler version?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2009-12-14 5:33 linux-next: sparc tree build warning Stephen Rothwell
2009-12-14 7:01 ` David Miller
@ 2009-12-14 7:40 ` David Miller
2009-12-14 9:00 ` Stephen Rothwell
2010-01-28 7:44 ` Stephen Rothwell
2 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2009-12-14 7:40 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 14 Dec 2009 16:33:38 +1100
> inlined from 'pktgen_if_write' at net/core/pktgen.c:867:
> arch/sparc/include/asm/uaccess_32.h:276: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
BTW, you should be getting the same exact warnings on x86
32-bit with gcc-4.4 or later.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2009-12-14 7:01 ` David Miller
@ 2009-12-14 8:55 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2009-12-14 8:55 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
Hi Dave,
On Sun, 13 Dec 2009 23:01:56 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> Rats, compiler version?
I am using a v4.4.0 cross compiler.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2009-12-14 7:40 ` David Miller
@ 2009-12-14 9:00 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2009-12-14 9:00 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
Hi Dave,
On Sun, 13 Dec 2009 23:40:36 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 14 Dec 2009 16:33:38 +1100
>
> > inlined from 'pktgen_if_write' at net/core/pktgen.c:867:
> > arch/sparc/include/asm/uaccess_32.h:276: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
>
> BTW, you should be getting the same exact warnings on x86
> 32-bit with gcc-4.4 or later.
Yeah, similar ones indeed.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2009-12-14 5:33 linux-next: sparc tree build warning Stephen Rothwell
2009-12-14 7:01 ` David Miller
2009-12-14 7:40 ` David Miller
@ 2010-01-28 7:44 ` Stephen Rothwell
2010-01-28 13:24 ` David Miller
2 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2010-01-28 7:44 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
Hi Dave,
On Mon, 14 Dec 2009 16:33:38 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next build (sparc defconfig) produced this warning:
>
> In file included from arch/sparc/include/asm/uaccess.h:7,
> from include/net/checksum.h:26,
> from include/linux/skbuff.h:29,
> from net/core/pktgen.c:141:
> In function 'copy_from_user',
> inlined from 'pktgen_if_write' at net/core/pktgen.c:867:
> arch/sparc/include/asm/uaccess_32.h:276: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
>
> and many more.
>
> The sparc64 defconfig build produced many similar warnings:
>
> In file included from arch/sparc/include/asm/uaccess.h:5,
> from include/linux/uaccess.h:6,
> from include/linux/highmem.h:7,
> from include/linux/pagemap.h:11,
> from include/linux/mempolicy.h:63,
> from mm/mempolicy.c:69:
> arch/sparc/include/asm/uaccess_64.h: In function 'compat_sys_get_mempolicy':
> arch/sparc/include/asm/uaccess_64.h:232: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
I am still seeing these. Is it my compiler version (gcc4.4.0)?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2010-01-28 7:44 ` Stephen Rothwell
@ 2010-01-28 13:24 ` David Miller
2010-01-28 23:25 ` Stephen Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2010-01-28 13:24 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 Jan 2010 18:44:23 +1100
> I am still seeing these. Is it my compiler version (gcc4.4.0)?
You can't turn on DEBUG_STRICT_USER_COPY_CHECKS and
expect a successful build. It's for developers to
look at the errors that are generated and audit those
cases in detail.
You'll get the same exact errors as on i386.
Please just elide the option from your test builds.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2010-01-28 13:24 ` David Miller
@ 2010-01-28 23:25 ` Stephen Rothwell
2010-01-29 4:12 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2010-01-28 23:25 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
Hi Dave,
On Thu, 28 Jan 2010 05:24:32 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 28 Jan 2010 18:44:23 +1100
>
> > I am still seeing these. Is it my compiler version (gcc4.4.0)?
>
> You can't turn on DEBUG_STRICT_USER_COPY_CHECKS and
> expect a successful build. It's for developers to
> look at the errors that are generated and audit those
> cases in detail.
These are defconfig builds and CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is
not set in either case.
> You'll get the same exact errors as on i386.
I only do an i386 defconfig build and I don't get these warnings.
> Please just elide the option from your test builds.
I would if I could :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2010-01-28 23:25 ` Stephen Rothwell
@ 2010-01-29 4:12 ` David Miller
2010-01-29 6:32 ` Stephen Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2010-01-29 4:12 UTC (permalink / raw)
To: sfr; +Cc: linux-next, linux-kernel
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 29 Jan 2010 10:25:43 +1100
> Hi Dave,
>
> On Thu, 28 Jan 2010 05:24:32 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Thu, 28 Jan 2010 18:44:23 +1100
>>
>> > I am still seeing these. Is it my compiler version (gcc4.4.0)?
>>
>> You can't turn on DEBUG_STRICT_USER_COPY_CHECKS and
>> expect a successful build. It's for developers to
>> look at the errors that are generated and audit those
>> cases in detail.
>
> These are defconfig builds and CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is
> not set in either case.
Simply ignore the warning then, I thought you were reporting
a build failure.
> I only do an i386 defconfig build and I don't get these warnings.
Looking at the specific case of net/core/pktgen.c:867
"len" is variable in the net/core/pktgen.c line that emits the
warning
Even though it is limited to "sizeof(name) - 1" via strn_len()'s
third argument, that's a lot to expect the compiler to dig into
and be able to conclude invariants from.
Please just ignore the warnings.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: sparc tree build warning
2010-01-29 4:12 ` David Miller
@ 2010-01-29 6:32 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2010-01-29 6:32 UTC (permalink / raw)
To: David Miller; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
Hi Dave,
On Thu, 28 Jan 2010 20:12:06 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> Simply ignore the warning then, I thought you were reporting
> a build failure.
No worries, I just report warnings in case noone else notices them. And
in case they are important.
> Looking at the specific case of net/core/pktgen.c:867
>
> "len" is variable in the net/core/pktgen.c line that emits the
> warning
>
> Even though it is limited to "sizeof(name) - 1" via strn_len()'s
> third argument, that's a lot to expect the compiler to dig into
> and be able to conclude invariants from.
Yeah, indeed. We need an intuitive compiler :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-01-29 6:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 5:33 linux-next: sparc tree build warning Stephen Rothwell
2009-12-14 7:01 ` David Miller
2009-12-14 8:55 ` Stephen Rothwell
2009-12-14 7:40 ` David Miller
2009-12-14 9:00 ` Stephen Rothwell
2010-01-28 7:44 ` Stephen Rothwell
2010-01-28 13:24 ` David Miller
2010-01-28 23:25 ` Stephen Rothwell
2010-01-29 4:12 ` David Miller
2010-01-29 6:32 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox