From: Ralf Baechle <ralf@linux-mips.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-mips <linux-mips@linux-mips.org>,
Wu Zhangjin <wuzhangjin@gmail.com>
Subject: Re: [PATCH 0/6] mips: diverse Makefile updates
Date: Mon, 31 May 2010 11:29:54 +0100 [thread overview]
Message-ID: <20100531102954.GA12669@linux-mips.org> (raw)
In-Reply-To: <20100530231954.GA318@linux-mips.org>
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
next prev parent reply other threads:[~2010-05-31 10:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 14:19 [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 14:26 ` [PATCH 1/6] mips: introduce arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:26 ` [PATCH 2/6] mips: add -Werror to arch/mips/Kbuild Sam Ravnborg
2010-05-30 14:27 ` [PATCH 3/6] mips: introduce support for Platform definitions Sam Ravnborg
2010-05-30 14:27 ` [PATCH 4/6] mips: refactor arch/mips/boot/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 5/6] mips: refactor arch/mips/boot/compressed/Makefile Sam Ravnborg
2010-05-30 14:28 ` [PATCH 6/6] mips: clean up arch/mips/Makefile Sam Ravnborg
2010-05-30 15:39 ` [PATCH 0/6] mips: diverse Makefile updates Sam Ravnborg
2010-05-30 23:19 ` Ralf Baechle
2010-05-31 10:29 ` Ralf Baechle [this message]
2010-05-31 10:55 ` Sam Ravnborg
2010-06-01 10:28 ` Ralf Baechle
2010-05-30 18:03 ` [ Sam Ravnborg
2010-05-30 18:06 ` [PATCH] mips: fix uninitialized warning when using get_user() Sam Ravnborg
2010-05-31 8:45 ` [PATCH 0/6] mips: diverse Makefile updates Wu Zhangjin
2010-05-31 9:10 ` Sam Ravnborg
2010-05-31 14:56 ` Ralf Baechle
2010-05-31 15:33 ` Manuel Lauss
2010-05-31 18:03 ` [PATCH] mips: fix build with O= Sam Ravnborg
2010-05-31 18:03 ` Sam Ravnborg
2010-05-31 18:19 ` Manuel Lauss
2010-05-31 19:00 ` Sam Ravnborg
2010-05-31 22:36 ` Ralf Baechle
2010-05-31 22:46 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100531102954.GA12669@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=sam@ravnborg.org \
--cc=wuzhangjin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.