From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAF2CECAAD2 for ; Sat, 27 Aug 2022 12:06:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 542C584220; Sat, 27 Aug 2022 14:06:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="gaOBWnup"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DFC4484030; Sat, 27 Aug 2022 14:06:09 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA45C84047 for ; Sat, 27 Aug 2022 14:06:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72e.google.com with SMTP id a15so3021775qko.4 for ; Sat, 27 Aug 2022 05:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=Kg8vIwdk75VbJ6Bdr3qfs+Tu58APslXx41Jcl5WO7QM=; b=gaOBWnupTa5yoW52iAnILtzlSR+bfOnMU3W8MDq+5VKipne8omZAdvN0lGnMMOSKVT /U/oCIGIhUFC2sTuOLBXq50E6YcaMaoV+j5L5KLfDjBKHMgbemAw+OmrnzUGY//0azg3 VK6YhuKt9XbS6cmoFGX+D3iRHCqpq8H2dFMU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=Kg8vIwdk75VbJ6Bdr3qfs+Tu58APslXx41Jcl5WO7QM=; b=maLyG8w/dtRn05ssvE3I1X2eRXsDuysYA5ESwZJhSm4LPNl4AU49GxZu3c8sNIole4 NXBNu9GgklllNsteo15jGrAbilQDEvOIetF4f4OR1AWMAbgtdL6mOmKj6lr+YJ9BuXvP oornzg8nTPhe0SC/tduL2teHVLrTDk9hgtgEgGgXA9EoxjydNAfBfhLruzpATtlM3Bp9 oKRsVUiM3sbUIbupZl8VGskXqK99NhTzbUWqHuYa3EHW7rvpR2gT1s4mLyVFDLmXciOZ lGOqQtEwvt0hp4mhbdy6x1xtLHjrTg7f4J5Igf4zi52e/3S+Fk6XCpXAZClcnBb9Exwj bwPw== X-Gm-Message-State: ACgBeo3j/W9zXj1W5vBgwNZT6emxFfSR45LPjcNfiv9QnUu0rVKMM+zr oqrWsptD4gVXlV7D2UwBjAURGQ== X-Google-Smtp-Source: AA6agR4mQGG02HXqWSfnhy+pqrus0bCLVXcfnCouhR6Zn+xhbu92sxXd4wf9F3r2qdCHEY6X08uz9Q== X-Received: by 2002:a05:620a:d8c:b0:6a7:91a4:2669 with SMTP id q12-20020a05620a0d8c00b006a791a42669mr2755364qkl.269.1661601964211; Sat, 27 Aug 2022 05:06:04 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id y26-20020a37f61a000000b006b633dc839esm1691287qkj.66.2022.08.27.05.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Aug 2022 05:06:03 -0700 (PDT) Date: Sat, 27 Aug 2022 08:06:01 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Stefan Roese , Bin Meng , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH] pci: Add checks to prevent config space overflow Message-ID: <20220827120601.GE7942@bill-the-cat> References: <20220703104806.27192-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KVy3XSgRgEDVTe6j" Content-Disposition: inline In-Reply-To: <20220703104806.27192-1-pali@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --KVy3XSgRgEDVTe6j Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 03, 2022 at 12:48:06PM +0200, Pali Roh=E1r wrote: > PCIe config space has address range 0-4095. So do not allow reading from > addresses outside of this range. Lot of U-Boot drivers do not expect that > passed value is not in this range. PCI DM read function is extended to > fill read value to all ones or zeros when it fails as U-Boot callers > ignores return value. >=20 > Calling U-Boot command 'pci display.b 0.0.0 0 0x2000' now stops printing > config space at the end (before 0x1000 address). >=20 > Signed-off-by: Pali Roh=E1r > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! --=20 Tom --KVy3XSgRgEDVTe6j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMKCKIACgkQFHw5/5Y0 tyyGjwv+J2yVp5RnFq64emXxi/aWzFi7waYLcPtsi54x0I/1Lu9lnRC6RXCXKdDp CdvTZ5xkU9N8EFJEXPUWe42SsR/PuIUfjpy7XMADqIHk/wcSr1fsfCOqXJnoI26l L+LFFGTqbCf+8jDFCOL5ZjOclUJqfnAepQN5rZEVhJqDPvOoNuKK1aILdieNSwES nrpFi3O82eCk4BtLf+6s2SOquj0vAz0p5nAwvMyxqlWEeHMZMXJYEZlcE6BMF7XQ XoMX009caHmmehwoQuZI4lPBSIF1rJ79huu+8NCN2IcMOZ2tu3fyDjltWAWWZKxb u91wFzdNNx5kE522reekERXj40fpcjgeXVUASelE5o8r8fA7vIZ3s5w1doxTsJZD rmvPtqpRk0W8Ne13wfWKVfkw/sCnMFsfLyrg1ww/IfGqvAKB2SDanLnL4KDhLSSY +2h4NcGZ1WT3gd7PJXIJS/BX6hzMFVtZHp78R10xVP3yx7wsOoWma1gQU7/9Z6sr ghU2elh/ =owVc -----END PGP SIGNATURE----- --KVy3XSgRgEDVTe6j--