linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: LABBE Corentin <clabbe@baylibre.com>
To: Eugeniy Paltsev <eugeniy.paltsev@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org,
	Vineet Gupta <vineet.gupta1@synopsys.com>,
	linux-kernel@vger.kernel.org,
	Alexey Brodkin <alexey.brodkin@synopsys.com>,
	khilman@baylibre.com
Subject: Re: [PATCH 1/2] ARC: U-boot: check arguments paranoidly
Date: Tue, 12 Feb 2019 17:39:04 +0100	[thread overview]
Message-ID: <20190212163904.GA14668@Red> (raw)
In-Reply-To: <20190212153932.28371-2-Eugeniy.Paltsev@synopsys.com>

On Tue, Feb 12, 2019 at 06:39:31PM +0300, Eugeniy Paltsev wrote:
> Handle U-boot arguments paranoidly:
>  * don't allow to pass unknown tag.
>  * try to use external device tree blob only if corresponding tag
>    (TAG_DTB) is set.
>  * check that magic number is correct.
>  * don't check uboot_tag if kernel build with no ARC_UBOOT_SUPPORT.
> 
> NOTE:
> If U-boot args are invalid we skip them and try to use embedded device
> tree blob. We can't panic on invalid U-boot args as we really pass
> invalid args due to bug in U-boot code.
> This happens if we don't provide external DTB to U-boot and
> don't set 'bootargs' U-boot environment variable (which is default
> case at least for HSDK board) In that case we will pass
> {r0 = 1 (bootargs in r2); r1 = 0; r2 = 0;} to linux which is invalid.
> 
> NOTE:
> We can safely check U-boot magic value (0x0) in linux passed via
> r1 register as U-boot pass it from the beginning.
> 
> While I'm at it refactor U-boot arguments handling code.
> 

Hello

I have tried to test this serie, but this patch does not apply anymore on current next tree.
It conflicts with "ARC: boot: robustify u-boot arg referencing".

Regards

  reply	other threads:[~2019-02-12 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 15:39 [PATCH 0/2] RC: rework U-boot arguments handling Eugeniy Paltsev
2019-02-12 15:39 ` [PATCH 1/2] ARC: U-boot: check arguments paranoidly Eugeniy Paltsev
2019-02-12 16:39   ` LABBE Corentin [this message]
2019-02-12 16:41     ` Vineet Gupta
2019-02-12 16:45   ` Vineet Gupta
2019-02-12 17:25     ` Eugeniy Paltsev
2019-02-12 17:34       ` Vineet Gupta
2019-02-12 15:39 ` [PATCH 2/2] ARC: enable uboot support unconditionally Eugeniy Paltsev

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=20190212163904.GA14668@Red \
    --to=clabbe@baylibre.com \
    --cc=alexey.brodkin@synopsys.com \
    --cc=eugeniy.paltsev@synopsys.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=vineet.gupta1@synopsys.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).