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 486F4C433EF for ; Thu, 20 Jan 2022 16:21:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C5DC838C3; Thu, 20 Jan 2022 17:21:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1642695709; bh=fgUVxcqSoRrL0XR6RSaBAKSHzyHCpEnNUs0t1bqDkKM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KUR53AsMA+3eYh+yCAuFp4Jh5JUQz3fVxr0B3Bwa2wtvFiwgPbUyM4XovqA5Mr14u VBA/Y70XYsAmOVWTHDEZhu7ykpqvTvvFNgvnsgNpmKQIE/LbV2QtO0zTDWZumecpxo SzoLvFan7ybUP3aKFCMI9w1f6+cIKdO604/Ue5/3RdAMIxgY4fL8yKjdml7q3TZljv yldG8IsWXGzT+nQNUuxp4Bfpwca+scTk03ySpXsdG4dSpGc1v9BC6MQXWQKU6fAlqr UrX/lzB6dknISlf/nvLv+Q0FAp8twIIIEZXngH5vsbTvGAAnv7pd/xMx5H8hz4HWcL LvkZ8Rqb5cieg== Received: by phobos.denx.de (Postfix, from userid 109) id E8059838BD; Thu, 20 Jan 2022 17:21:46 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 30F74838C3 for ; Thu, 20 Jan 2022 17:21:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp102.mailbox.org (unknown [91.198.250.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4Jfnnz5Pk5z9sgL; Thu, 20 Jan 2022 17:21:43 +0100 (CET) Message-ID: <31eb37a0-9575-ae31-55df-e51d393261e1@denx.de> Date: Thu, 20 Jan 2022 17:21:39 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell v4 0/9] More verifications for kwbimage in SPL Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: u-boot@lists.denx.de, =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20220114133145.32329-1-pali@kernel.org> From: Stefan Roese In-Reply-To: <20220114133145.32329-1-pali@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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.2 at phobos.denx.de X-Virus-Status: Clean On 1/14/22 14:31, Pali Rohár wrote: > Hello Stefan, > > this is v4 of series that adds more checks for kwbimage validity and > consistency to SPL, mainly checking image data checksum. > > Patches now passed Github CI testing: > https://github.com/u-boot/u-boot/pull/106 > > Changes since v3: > - fix compile erros detected by CI (patch 2) > - print addresses in hex format instead of dec format (patch 1,3,6) > - rebase on master branch as v3 does not apply (patch 8) > > Changes since v2: > - changed the error message in patch 6 according to Pali's suggestion > - added R-B tags > > Changes since v1: > - updated error messages as requested by Stefan > - fixed checkpatch warnings for uintN_t types (converted to preferred > uN) > - added more checkpatch fixes Applied to u-boot-marvell/master Thanks, Stefan > Marek Behún (4): > arm: mvebu: spl: Print srcaddr in error message > arm: mvebu: spl: Use preferred types u8/u16/u32 instead of uintN_t > arm: mvebu: spl: Use IS_ENABLED() instead of #ifdef where possible > arm: mvebu: spl: Fix 100 column exceeds > > Pali Rohár (5): > arm: mvebu: Check that kwbimage offset and blocksize are valid > SPL: Add struct spl_boot_device parameter into > spl_parse_board_header() > arm: mvebu: Check that kwbimage blockid matches boot mode > SPL: Add support for checking board / BootROM specific image types > arm: mvebu: Check for kwbimage data checksum > > arch/arm/mach-mvebu/spl.c | 133 +++++++++++++++++++--------- > arch/arm/mach-sunxi/spl_spi_sunxi.c | 2 +- > common/spl/spl.c | 13 ++- > common/spl/spl_ext.c | 9 +- > common/spl/spl_fat.c | 11 ++- > common/spl/spl_legacy.c | 3 +- > common/spl/spl_mmc.c | 43 +++++---- > common/spl/spl_nand.c | 13 +-- > common/spl/spl_net.c | 2 +- > common/spl/spl_nor.c | 4 +- > common/spl/spl_onenand.c | 2 +- > common/spl/spl_ram.c | 2 +- > common/spl/spl_sata.c | 9 +- > common/spl/spl_sdp.c | 2 +- > common/spl/spl_spi.c | 9 +- > common/spl/spl_ubi.c | 4 +- > common/spl/spl_usb.c | 4 +- > common/spl/spl_xip.c | 4 +- > common/spl/spl_ymodem.c | 4 +- > drivers/usb/gadget/f_sdp.c | 13 +-- > include/sdp.h | 3 +- > include/spl.h | 7 ++ > 22 files changed, 196 insertions(+), 100 deletions(-) > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de