mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Olaf Hering <olh@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CONFIG_CMDLINE broken on ppc
Date: Wed, 8 Sep 2004 07:18:57 -0700	[thread overview]
Message-ID: <20040908141857.GB26381@smtp.west.cox.net> (raw)
In-Reply-To: <20040908140323.GA15309@suse.de>

On Wed, Sep 08, 2004 at 04:03:23PM +0200, Olaf Hering wrote:
>  On Wed, Sep 08, Tom Rini wrote:
> 
> > On Wed, Sep 08, 2004 at 03:40:28PM +0200, Olaf Hering wrote:
> > 
> > > CONFIG_CMDLINE can not work on ppc.
> > > machine_init() copies the string to cmd_line, then platform_init() is
> > > called. It truncates the string to length zero.
> > 
> > This has come up before, actually.  What happens if CMDLINE isn't set,
> > and we don't terminate cmd_line here?  It's part of the BSS and is
> > zero'd out anyways?
> 
> strlcpy generates a null-terminated string, if size != 0. Looks like
> that line can go.

... but strlcpy might not be called if no one passes a commandline.
Hence, is this part of the bss and already zeroed ?  If yes, then just
remove the line.

> Or move it at the start of machine_init().

Or always define CMDLINE, ala the ADVANCED_OPTIONS || defaults, no #if's
that way :)

-- 
Tom Rini
http://gate.crashing.org/~trini/

  reply	other threads:[~2004-09-08 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08 13:40 Olaf Hering
2004-09-08 13:52 ` Tom Rini
2004-09-08 14:03   ` Olaf Hering
2004-09-08 14:18     ` Tom Rini [this message]
2004-09-08 15:18   ` Andreas Schwab

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=20040908141857.GB26381@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olh@suse.de \
    /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®