Skip to contentSkip to conversation

2.6.33-rc1 build failure: copy_from_user() buffer size is not provably correct

DISCUSSION Ritesh Raj Sarraf 5 participants 9 messages Dec 21, 2009 – Dec 22, 2009

lore
Share & tools
lore
#0 lore raw

This is triggered if using the 'allyesconfig' target.

A similar issue was this: 2886a8bdfa007053b414ab01741a98c18c376a85

debian-build:/tmp/all-yes-config/2.6.33-rc1# make deb-pkg
make KBUILD_SRC=                                         
  CHK     include/linux/version.h                        
  CHK     include/generated/utsrelease.h                 
  CALL    scripts/checksyscalls.sh                       
  CHK     include/generated/compile.h                    
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  CC      mm/migrate.o
In file included from /tmp/all-yes-config/2.6.33-
rc1/arch/x86/include/asm/uaccess.h:571,
                 from include/linux/uaccess.h:5,
                 from include/linux/highmem.h:6,
                 from include/linux/pagemap.h:10,
                 from include/linux/mempolicy.h:62,
                 from include/linux/migrate.h:5,
                 from mm/migrate.c:15:
In function ‘copy_from_user’,
    inlined from ‘do_pages_stat’ at mm/migrate.c:1009:
/tmp/all-yes-config/2.6.33-rc1/arch/x86/include/asm/uaccess_32.h:213: error: 
call to ‘copy_from_user_overflow’ declared with attribute error: 
copy_from_user() buffer size is not provably correct
make[3]: *** [mm/migrate.o] Error 1
make[2]: *** [mm] Error 2
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2

Regards,
Ritesh

Signature · 2 lines
Given the large number of mailing lists I follow, I request you to CC me
in replies for quicker response
#1 lore raw
Quoted 22 lines

This is triggered if using the 'allyesconfig' target.

A similar issue was this: 2886a8bdfa007053b414ab01741a98c18c376a85

debian-build:/tmp/all-yes-config/2.6.33-rc1# make deb-pkg
make KBUILD_SRC=                                         
  CHK     include/linux/version.h                        
  CHK     include/generated/utsrelease.h                 
  CALL    scripts/checksyscalls.sh                       
  CHK     include/generated/compile.h                    
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  CC      mm/migrate.o
In file included from /tmp/all-yes-config/2.6.33-
rc1/arch/x86/include/asm/uaccess.h:571,
                 from include/linux/uaccess.h:5,
                 from include/linux/highmem.h:6,
                 from include/linux/pagemap.h:10,
Quoted 8 lines
                 from include/linux/mempolicy.h:62,
                 from include/linux/migrate.h:5,
                 from mm/migrate.c:15:
In function ‘copy_from_user’,
    inlined from ‘do_pages_stat’ at mm/migrate.c:1009:
/tmp/all-yes-config/2.6.33-rc1/arch/x86/include/asm/uaccess_32.h:213: error: 
call to ‘copy_from_user_overflow’ declared with attribute error: 
copy_from_user() buffer size is not provably correct

afaik, ingo already queued this fix.
please wait (very) few days.

thanks.

Quoted 17 lines

make[3]: *** [mm/migrate.o] Error 1
make[2]: *** [mm] Error 2
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2

Regards,
Ritesh

Signature · 8 lines
Given the large number of mailing lists I follow, I request you to CC me
in replies for quicker response

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
#2 lore raw
Quoted 31 lines · KOSAKI Motohiro
Quoted 22 lines

This is triggered if using the 'allyesconfig' target.

A similar issue was this: 2886a8bdfa007053b414ab01741a98c18c376a85

debian-build:/tmp/all-yes-config/2.6.33-rc1# make deb-pkg
make KBUILD_SRC=                                         
  CHK     include/linux/version.h                        
  CHK     include/generated/utsrelease.h                 
  CALL    scripts/checksyscalls.sh                       
  CHK     include/generated/compile.h                    
  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
  VDSOSYM arch/x86/vdso/vdso32-syms.lds
  LD      arch/x86/vdso/built-in.o
  LD      arch/x86/built-in.o
  CC      mm/migrate.o
In file included from /tmp/all-yes-config/2.6.33-
rc1/arch/x86/include/asm/uaccess.h:571,
                 from include/linux/uaccess.h:5,
                 from include/linux/highmem.h:6,
                 from include/linux/pagemap.h:10,
Quoted 8 lines
                 from include/linux/mempolicy.h:62,
                 from include/linux/migrate.h:5,
                 from mm/migrate.c:15:
In function ???copy_from_user???,
    inlined from ???do_pages_stat??? at mm/migrate.c:1009:
/tmp/all-yes-config/2.6.33-rc1/arch/x86/include/asm/uaccess_32.h:213: error: 
call to ???copy_from_user_overflow??? declared with attribute error: 
copy_from_user() buffer size is not provably correct
Quoted 4 lines

afaik, ingo already queued this fix.
please wait (very) few days.

thanks.

hm, the one mm/migrate.c fix we had is already in -rc1:

b9255850: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe

I've Cc:-ed more folks.

Ingo

#3 lore raw

Hi Ingo,

Quoted 7 lines · On Monday 21 Dec 2009 14:43:30 Ingo Molnar wrote:

hm, the one mm/migrate.c fix we had is already in -rc1:

b9255850: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe

I've Cc:-ed more folks.

I have verified the build tree and am building from -rc1 only. The fix you've mentioned above is also part of it.

debian-build:/tmp/all-yes-config/2.6.33-rc1# cat Makefile |grep EXTRAVERSION
EXTRAVERSION = -rc1

Must be a newer bug then.

Regards,
Ritesh

Signature · 3 lines
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
#4 lore raw
Quoted 9 lines · Ritesh Raj Sarraf

I have verified the build tree and am building from -rc1 only. The fix you've mentioned above is also part of it.

debian-build:/tmp/all-yes-config/2.6.33-rc1# cat Makefile |grep EXTRAVERSION
EXTRAVERSION = -rc1

Must be a newer bug then.

No, it's the same one, but different gcc. Sigh.

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#5 lore raw
Quoted 5 lines · On Mon, 21 Dec 2009 09:18:26 -0800 "H. Peter Anvin" <[email protected]> wrote:
Quoted 4 lines · Ritesh Raj Sarraf

I have verified the build tree and am building from -rc1 only. The fix you've mentioned above is also part of it.

Quoted 7 lines
Quoted 5 lines
debian-build:/tmp/all-yes-config/2.6.33-rc1# cat Makefile |grep
EXTRAVERSION EXTRAVERSION = -rc1

Must be a newer bug then.

No, it's the same one, but different gcc. Sigh.

worth trying the variant I had ;-)

#6 lore raw
In reply to Ingo Molnar
Quoted 13 lines · Ingo Molnar
Quoted 10 lines · KOSAKI Motohiro
Quoted 6 lines
                 from mm/migrate.c:15:
In function ???copy_from_user???,
    inlined from ???do_pages_stat??? at mm/migrate.c:1009:

/tmp/all-yes-config/2.6.33-rc1/arch/x86/include/asm/uaccess_32.h:213: error:
call to ???copy_from_user_overflow??? declared with attribute error:
copy_from_user() buffer size is not provably correct

afaik, ingo already queued this fix.
please wait (very) few days.

Quoted 8 lines
Quoted 1 line

thanks.

hm, the one mm/migrate.c fix we had is already in -rc1:

b9255850: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe

I've Cc:-ed more folks.

That *is* the error report that he is describing. What version of gcc is he using? It might be dumber than the one I have.

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#7 lore raw
Quoted 6 lines · On Monday 21 Dec 2009 22:47:57 H. Peter Anvin wrote:
Quoted 2 lines

I've Cc:-ed more folks.

That is the error report that he is describing. What version of gcc is he using? It might be dumber than the one I have.

debian-build:~# gcc --version
gcc (Debian 4.4.2-5) 4.4.2

Regards,
Ritesh

Signature · 3 lines
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
#8 lore raw
In reply to H. Peter Anvin
Quoted 18 lines · Ingo Molnar
Quoted 17 lines · KOSAKI Motohiro
Quoted 8 lines
Quoted 7 lines
                 from mm/migrate.c:15:
In function ???copy_from_user???,
    inlined from ???do_pages_stat??? at mm/migrate.c:1009:

/tmp/all-yes-config/2.6.33-rc1/arch/x86/include/asm/uaccess_32.h:213: error:
call to ???copy_from_user_overflow??? declared with attribute error:
copy_from_user() buffer size is not provably correct

Quoted 4 lines

afaik, ingo already queued this fix.
please wait (very) few days.

thanks.

hm, the one mm/migrate.c fix we had is already in -rc1:

Quoted 7 lines
Quoted 4 lines

b9255850: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe

I've Cc:-ed more folks.

That *is* the error report that he is describing. What version of gcc is he using? It might be dumber than the one I have.

I was also successed build.

my environment is here:

	2.6.33-rc1
	CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
	gcc version 4.4.2 20091027 (Red Hat 4.4.2-7) (GCC)

I'm amazing (?_?)