public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Marek Bykowski <marek.bykowski@gmail.com>,
	Rob Herring <robh@kernel.org>,
	robh+dt@kernel.org, frowand.list@gmail.com,
	devicetree@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 4.9 1/8] of/fdt: Don't calculate initrd size from DT if start > end
Date: Tue, 18 Oct 2022 11:37:25 +0200	[thread overview]
Message-ID: <20221018093725.GC1264@duo.ucw.cz> (raw)
In-Reply-To: <20221018001202.2732458-1-sashal@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Hi!

> It should be stressed, it is generally a fault of the bootloader's with
> the kernel relying on it, however we should not allow the bootloader's
> misconfiguration to lead to the kernel oops. Not only the kernel
> should be

I believe we should at least printk() if we detect bootloader bug of
this severity.

Best regards,
								Pavel


> +++ b/drivers/of/fdt.c
> @@ -917,6 +917,8 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
>  	if (!prop)
>  		return;
>  	end = of_read_number(prop, len/4);
> +	if (start > end)
> +		return;
>  
>  	__early_init_dt_declare_initrd(start, end);
>  
> -- 
> 2.35.1

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      parent reply	other threads:[~2022-10-18  9:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  0:11 [PATCH AUTOSEL 4.9 1/8] of/fdt: Don't calculate initrd size from DT if start > end Sasha Levin
2022-10-18  0:11 ` [PATCH AUTOSEL 4.9 2/8] objtool,x86: Teach decode about LOOP* instructions Sasha Levin
2022-10-18  0:11 ` [PATCH AUTOSEL 4.9 3/8] gfs2: Check sb_bsize_shift after reading superblock Sasha Levin
2022-10-18  0:11 ` [PATCH AUTOSEL 4.9 4/8] m68knommu: fix non-specific 68328 choice interrupt build failure Sasha Levin
2022-10-18  0:11 ` [PATCH AUTOSEL 4.9 5/8] m68knommu: fix non-mmu classic 68000 legacy timer tick selection Sasha Levin
2022-10-18  0:12 ` [PATCH AUTOSEL 4.9 6/8] 9p: trans_fd/p9_conn_cancel: drop client lock earlier Sasha Levin
2022-10-18  0:12 ` [PATCH AUTOSEL 4.9 7/8] 9p/trans_fd: always use O_NONBLOCK read/write Sasha Levin
2022-10-18  0:12 ` [PATCH AUTOSEL 4.9 8/8] virtio_pci: don't try to use intxif pin is zero Sasha Levin
2022-10-19  0:27   ` Angus Chen
2022-10-19  5:58     ` Michael S. Tsirkin
2022-10-18  9:37 ` Pavel Machek [this message]

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=20221018093725.GC1264@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.bykowski@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox