From: Bernd Petrovitsch <bernd@firmix.at>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jochen Friedrich <jochen@scram.de>,
"Christian T. Steigies" <cts@debian.org>,
Linux/m68k <linux-m68k@lists.linux-m68k.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: sprintf -> strcpy (was: Re: gcc-3.4)
Date: Mon, 27 Sep 2004 13:27:17 +0200 [thread overview]
Message-ID: <1096284437.25427.25.camel@tara.firmix.at> (raw)
In-Reply-To: <Pine.GSO.4.61.0409271315230.15815@waterleaf.sonytel.be>
On Mon, 2004-09-27 at 13:17 +0200, Geert Uytterhoeven wrote:
> (CC'ing lkml)
>
> On Sun, 26 Sep 2004, Jochen Friedrich wrote:
> > > Or maybe it is the binutils? After downgrading to 2.14 from a previous
> > > toolchain source, I could build linux-2.6.8 with gcc-3.4.
> >
> > I'm using binutils 2.15 and gcc 3.4.2 on Alpha to cross compile 2.6. All i
> > noticed is that the compiler optimizes sprintf(x,"%s",y) to strcpy(x,y)
> > which then fails to link or causes unresolved externals because strcpy is
> > an inline function on m68k. The fix is to do the replacement in the
> > source, like here:
>
> I remember seeing a similar discussion on lkml about some other automatic
> replacements a while ago, but I cannot remember the details...
Do you mean the strncpy() -> strlcpy() conversion which leads to
information leaks from kernel to user-space im several cases (and Alan
cox fixed the wrong replacements in the netword drivers IIRC).
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services
next prev parent reply other threads:[~2004-09-27 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040925145454.GA16191@skeeve>
[not found] ` <20040925221427.GA30105@skeeve>
[not found] ` <Pine.LNX.4.58.0409262049380.1809@localhost>
2004-09-27 11:17 ` Geert Uytterhoeven
2004-09-27 11:27 ` Bernd Petrovitsch [this message]
2004-09-27 11:35 ` Geert Uytterhoeven
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=1096284437.25427.25.camel@tara.firmix.at \
--to=bernd@firmix.at \
--cc=cts@debian.org \
--cc=geert@linux-m68k.org \
--cc=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®