Re: [PATCH 0/6] mips: diverse Makefile updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 31, 2010 at 12:19:54AM +0100, Ralf Baechle wrote:

> > > Note: I tried to test a little with bigsur_defconfig
> > > but get_user() is buggy. Or at least my gcc thinks that
> > > first argument may be used uninitialized.
> > > I think mips needs to fix the 64 bit variant of get_user().
> > > I took a quick look but ran away.
> > 
> > My gcc:
> > mips-linux-gcc (GCC) 4.1.2
> > Copyright (C) 2006 Free Software Foundation, Inc.

I played with it for a bit.  The warning is present in all gcc 4.1.0 to
4.1.2 and it is bogus.  When I first looked into this years ago I just
gave up on gcc 4.1 as a newer version was already available.

The variable returned by get_user is undefined in case of an error, so
what get_user() is doing is entirely legitimate.  This is different from
copy_from_user() which in case of an error will clear the remainder of
the destination area which couldn't not be copied from userspace.

A test compile of a bigsur_defconfig without and with your patch shows
a size increase of only 80 bytes with gcc 4.5.0.  So I'm considering
your patch for inclusion but I want to play with alternatives for a bit.
Outlining may the right thing with modern compilers.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux