Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5744324rwi; Tue, 18 Oct 2022 03:39:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6pxCx/1j8hNLRpPSM+wI21U+WDF1WuSNoGcVEASeOYBT5V2M7wTOXv6OV5Ol6ljC+Cjl/m X-Received: by 2002:a05:6402:1555:b0:458:ed89:24e9 with SMTP id p21-20020a056402155500b00458ed8924e9mr2009738edx.55.1666089541961; Tue, 18 Oct 2022 03:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666089541; cv=none; d=google.com; s=arc-20160816; b=Fihp5iQmNBKWh9YLs7Fy8aIRdE73UBOSt/s3mvlEgsUZxr0K8eYyTBf6LxHOBaXvo+ kCy8TGjLYzqmT51uZDthoS483WlY1CF3bwVb9PTPalM82Qw+PuoPY5YgqDeeXWNpCV3Z Xe/wUI3KwOJLLnBo2vJ0hwK9kHxBVuw1y3YL2myF9EGAxsV1lkgeiZIdFRmrG/Cls3ji qFWQBq/pcsap2Kwu+r+1mm7au3IHCZ9fIl5Sp3/b7FQRI6pv1TN0IiFI2KwFI1R/YZ82 H9fWUSChkdYlNcYT0HafRFPhRAwG1ngCpTm90I2IkREwNjZb83QZYNkNM8c4i8ctrbr0 8ZlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TqTNk4Udvyk0G+AyniJxtR7dhvhux31SZ+YhglEYHqE=; b=cXG+/FwUDb5ppR3mGxyhm1jmNpGN3u9ODAMk8C655b/bPny+uHQPGYb/5aPteIJDdT EVQPy7PQpYbySPNzT4yz/5IB8eggt/I6nQ5ArpuMzXdkw3hNuTSyBZZOlict2r7zB0m4 RM2zy3FqCemuH9Iqt5cTK1bAnWu+c7NsHrW770G++ZESMfTCqFkP/RzR8kr2CvirQ2kG Q8wKwhfy1mYVmt28BT3llFGWImCejb6Timqj95itMCq/y5IIeIiNJy9UBU4zuUUxOjep MRsHd6Nw1K8/nRzUKpVzGwpxXHXQQ5K8oXNf+V2OJVa5/gfZ8hAbj8B11+/c6ojJOrA0 QT4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js10-20020a17090797ca00b0078e20d9c473si7455640ejc.764.2022.10.18.03.38.35; Tue, 18 Oct 2022 03:39:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230074AbiJRJha (ORCPT + 99 others); Tue, 18 Oct 2022 05:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbiJRJh2 (ORCPT ); Tue, 18 Oct 2022 05:37:28 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF682A73D; Tue, 18 Oct 2022 02:37:28 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id CECD51C09D9; Tue, 18 Oct 2022 11:37:26 +0200 (CEST) Date: Tue, 18 Oct 2022 11:37:25 +0200 From: Pavel Machek To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Marek Bykowski , Rob Herring , 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 Message-ID: <20221018093725.GC1264@duo.ucw.cz> References: <20221018001202.2732458-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eHhjakXzOLJAF9wJ" Content-Disposition: inline In-Reply-To: <20221018001202.2732458-1-sashal@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --eHhjakXzOLJAF9wJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(uns= igned long node) > if (!prop) > return; > end =3D of_read_number(prop, len/4); > + if (start > end) > + return; > =20 > __early_init_dt_declare_initrd(start, end); > =20 > --=20 > 2.35.1 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --eHhjakXzOLJAF9wJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCY05z1QAKCRAw5/Bqldv6 8ql/AKCg9oS8C4ZuU/xkeG7iWO3HpQPUhgCeLcwc3IO2azfdvu9oZF93Vs3Fklk= =SD+H -----END PGP SIGNATURE----- --eHhjakXzOLJAF9wJ--