All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string
Date: Tue, 07 Oct 2014 19:19:19 +0000	[thread overview]
Message-ID: <54343CB7.9000504@oracle.com> (raw)
In-Reply-To: <5432BE03.10405@oracle.com>

On 10/07/2014 02:03 PM, David Miller wrote:
> From: Dave Kleikamp <dave.kleikamp@oracle.com>
> Date: Tue, 07 Oct 2014 13:49:37 -0500
> 
>> I never realized that, but that's really not a problem since the
>> destination will have the space. The original patch shouldn't be
>> problematic, although it may make the string longer than it practically
>> needs to be. I'll let davem make the call which version he likes better.
>> Maybe the comment in the second patch can be improved.
> 
> If you make the boot string 2048 bytes, and the firmware provides
> a string longer than 1024 bytes to SILO, it will read past the end
> of barg_buf.

Isn't it already too late by the time SILO looks at the length in
kernel_params? silo_set_bootargs() has already been called, so if
barg_buf is too small, SILO has already written past the end of it
(unless I'm missing some other bounds checking).

> So I think we still need to limit it to 1024.

I hope we never have a need for anything longer.

> In the long term, we can 'fix' SILO in some backwards compatible way.
> I think the thing to do is keep putting 1024 into bootstr_len and then
> bump the HdrS version (currently 0x0301) and make that new version
> mean "ignore bootstr_len, command line buffer is 2048 bytes".

  parent reply	other threads:[~2014-10-07 19:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 16:06 [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string Dave Kleikamp
2014-10-07  4:23 ` David Miller
2014-10-07 12:44 ` Dave Kleikamp
2014-10-07 13:23 ` Dave Kleikamp
2014-10-07 18:38 ` Kjetil Oftedal
2014-10-07 18:49 ` Dave Kleikamp
2014-10-07 18:54 ` David Miller
2014-10-07 19:03 ` David Miller
2014-10-07 19:19 ` Dave Kleikamp [this message]
2014-10-07 19:23 ` David Miller

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=54343CB7.9000504@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=sparclinux@vger.kernel.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 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.