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 B738CC19F29 for ; Fri, 29 Jul 2022 10:45:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F34A833B3; Fri, 29 Jul 2022 12:45:33 +0200 (CEST) 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=1659091533; bh=PEnqO5Q4i+m+kF4YR8XlbIlWf408xmqeAxko1Wp9erY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j2a/T2lCIFBWRBC58UdjBbb7l8hq82euyjvDpp918HM7ZL0W8FtjILTHHjvyaXswu +KIbfE77Tupg1VzbbzMhHq+4aUXQtDJBKuZ6xrD5v8IhHAxlLxD5xeP/Rqd+faF6Rm rek+8sAJRrevhemmCOouDewU/Lv/xWzG1YCbU6ussVDNNif2BXhC59iV6h9fT1/w66 K57peyZGrjcfqNW1vTWp9D/0dMdT02rexBlHl0z2OtYhXD4jBJl8J42KAM4Va16AqA fRczweyyPo+BYVfowk16aLsG/EsQ6DAZhdbIxxGqJSPvxRPQ/OH186pPK0b7x3C0iR hOmTUydEhdnBQ== Received: from [IPV6:2001:a61:619c:6d01:90ff:e963:f376:8825] (unknown [IPv6:2001:a61:619c:6d01:90ff:e963:f376:8825]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbabic@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 622D681DE8; Fri, 29 Jul 2022 12:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1659091531; bh=PEnqO5Q4i+m+kF4YR8XlbIlWf408xmqeAxko1Wp9erY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BRgLRUTcX74dnZKOdj0a2bLcCkhwkOtEHZN6THCGjGIl2Mwm1GV9EClkb44kRZvLE /Cyo4U1Y0zZG9vZDSHxr9yldFERqCiq8TfcxDbqFTS1RPVwQ8dPFxdijUPCHPyXBC/ 5PT9QkJHXXfHqv0C9uPuIyE0wgtqET6Z6o1W8Uz7Z0T9yJgXy/6L9CLjcf0IQbl6C/ +Cn7qC2TOBaxBpWzK2PECBAGMdNCe2h22Ifp2y18fPXLyTSOhqtLxCXnayu574vaN7 bLM+ir0WHmOFs2Mo2+xg/zYzggjCkherbQerkPoMaKKNmUJZqNRwfTyi3X9yAX2Q0f bGvf9gObfYNXA== Message-ID: <9664d289-572e-53ca-495c-2f41d5d9e816@denx.de> Date: Fri, 29 Jul 2022 12:45:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [EXT] Re: [PATCH v3] crypto/fsl: fsl_rsa: Fix dcache issue in the driver Content-Language: de-DE To: Gaurav Jain , Stefano Babic , Fabio Estevam Cc: U-Boot-Denx , Peng Fan , dl-uboot-imx , Horia Geanta , Varun Sethi , Ye Li References: <20220615123447.4087910-1-gaurav.jain@nxp.com> <1cd6876b-769e-6e35-56ed-dcef8fe7e863@denx.de> <4d596ff8-ab44-60ea-a066-9184e1876f75@denx.de> From: Stefano Babic In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 29.07.22 12:11, Gaurav Jain wrote: > Hello Stefano > >> -----Original Message----- >> From: Stefano Babic >> Sent: Tuesday, July 26, 2022 2:55 PM >> To: Gaurav Jain ; Stefano Babic ; >> Fabio Estevam >> Cc: U-Boot-Denx ; Peng Fan ; dl- >> uboot-imx ; Horia Geanta ; >> Varun Sethi ; Ye Li >> Subject: Re: [EXT] Re: [PATCH v3] crypto/fsl: fsl_rsa: Fix dcache issue in the >> driver >> >> Caution: EXT Email >> >> Hi Gaurav, >> >> On 29.06.22 10:35, Gaurav Jain wrote: >>> Hi Stefano >>> >>> this patch is fixing dcache issue in fsl_rsa.c >>> >> >> The thread changed name, I mean "crypto/fsl: fsl_hash: Fix crash in flush >> dcache" >> >>> Error reported is in drivers/crypto/fsl/fsl_hash.c addr = (addr << 32) >>> | sec_in32(&ctx->sg_tbl[i].addr_lo); >>> >>> reported error is fixed in [v3] crypto/fsl: fsl_hash: Fix crash in >>> flush dcache >>> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch >>> work.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20220616101009.809953- >> 1-ga >>> >> urav.jain%40nxp.com%2F&data=05%7C01%7Cgaurav.jain%40nxp.com%7C >> b605 >>> >> e737d37a4237e8ba08da6ee8bf00%7C686ea1d3bc2b4c6fa92cd99c5c301635%7 >> C0%7C >>> >> 0%7C637944243170612332%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA >> wMDAiLCJ >>> >> QIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s >> data= >>> >> KUAaTlucw6GRG7W2QvlE0JMO%2FAJt0tmi7%2FM3ZcpZ6C0%3D&reserved >> =0 >>> >> >> Give an another attempt, it fails and it is quite clear why: >> >> +#ifdef CONFIG_CAAM_64BIT >> + addr = sec_in32(&ctx->sg_tbl[i].addr_hi); >> + addr = (addr << 32) | sec_in32(&ctx->sg_tbl[i].addr_lo); >> +#else >> >> Fine with ARM and ARM64. In Kconfig: >> >> config CAAM_64BIT >> bool >> default y if PHYS_64BIT && !ARCH_IMX8M && !ARCH_IMX8 >> help >> Select Crypto driver for 64 bits CAAM version >> >> That is ok until powerpc are built that sets PHYS_64BIT. Then build fails with: >> >> powerpc: + T4240RDB_SDCARD >> +drivers/crypto/fsl/fsl_hash.c: In function 'caam_hash_finish': >> +drivers/crypto/fsl/fsl_hash.c:151:30: error: left shift count >= width >> of type [-Werror=shift-count-overflow] >> + 151 | addr = (addr << 32) | >> sec_in32(&ctx->sg_tbl[i].addr_lo); >> + | ^~ >> +cc1: all warnings being treated as errors >> >> And well, compiler is right... > I have sent a V4 which fixes the error for powerpc platforms. > Thanks - I merge and I start a new CI. Stefano > Thanks > Gaurav Jain >> >> Best regards, >> Stefano Babic >> >> >>> Regards >>> Gaurav Jain >>> >>>> -----Original Message----- >>>> From: Stefano Babic >>>> Sent: Wednesday, June 29, 2022 12:51 PM >>>> To: Gaurav Jain ; Stefano Babic >>>> ; Fabio Estevam >>>> Cc: U-Boot-Denx ; Peng Fan ; >>>> dl- uboot-imx ; Horia Geanta >>>> ; Varun Sethi ; Ye Li >>>> >>>> Subject: Re: [EXT] Re: [PATCH v3] crypto/fsl: fsl_rsa: Fix dcache >>>> issue in the driver >>>> >>>> Caution: EXT Email >>>> >>>> Hi Gaurav, >>>> >>>> On 29.06.22 09:06, Gaurav Jain wrote: >>>>> Hi Stefano >>>>> >>>>> This patch is put into state "changes requested". >>>>> But it is a different patch in fsl_rsa. >>>>> There is no change requested with this patch. >>>>> >>>> >>>> Something went wrong - I have applied this patch to push to 2022.07, >>>> but in CI I get the same errors I found before, that is PowerPC build >>>> was >>>> broken: >>>> >>>> >>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsou >>>> >> rce.d%2F&data=05%7C01%7Cgaurav.jain%40nxp.com%7Cb605e737d37a4 >> 237e >>>> >> 8ba08da6ee8bf00%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637 >> 94424 >>>> >> 3170612332%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoi >> V2luMz >>>> >> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uDXXo >> PFq2y >>>> L0RyoaEyrMCUFYCQ5M5CfwN6XQG6eM4DE%3D&reserved=0 >>>> enx.de%2Fu-boot%2Fcustodians%2Fu-boot-imx%2F- >>>> %2Fjobs%2F457090&data=05%7C01%7Cgaurav.jain%40nxp.com%7C98 >> 808 >>>> >> 23b97ef4669f51108da599feffc%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 >>>> %7C0%7C637920840703403368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM >> C4 >>>> >> wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C >>>> %7C%7C&sdata=FGDL9eBnjyUDc423myN4jVoK7QD9VZiitvZao6mz04s% >> 3D >>>> &reserved=0 >>>> >>>> I hadn't time to check this, and I suppose that issue is not yet >>>> fixed and I drop the patch from MR (Layerscape is broken, too), that is V3 has >> not fixed CI as in V2. >>>> Or is there anothe rpatch I had to pick up ? >>>> >>>> Best regards, >>>> Stefano >>>> >>>> >>>> >>>>> Regards >>>>> Gaurav Jain >>>>> >>>>>> -----Original Message----- >>>>>> From: Stefano Babic >>>>>> Sent: Wednesday, June 15, 2022 6:20 PM >>>>>> To: Gaurav Jain ; Fabio Estevam >>>>>> >>>>>> Cc: U-Boot-Denx ; Peng Fan >>>>>> ; >>>>>> dl- uboot-imx ; Horia Geanta >>>>>> ; Varun Sethi ; Ye Li >>>>>> >>>>>> Subject: Re: [EXT] Re: [PATCH v3] crypto/fsl: fsl_rsa: Fix dcache >>>>>> issue in the driver >>>>>> >>>>>> Caution: EXT Email >>>>>> >>>>>> On 15.06.22 14:45, Gaurav Jain wrote: >>>>>>> Hi Fabio >>>>>>> >>>>>>>> -----Original Message----- >>>>>>>> From: Fabio Estevam >>>>>>>> Sent: Wednesday, June 15, 2022 6:11 PM >>>>>>>> To: Gaurav Jain >>>>>>>> Cc: U-Boot-Denx ; Stefano Babic >>>>>>>> ; Peng Fan ; dl-uboot-imx >>>>>>>> ; Horia Geanta ; Varun >>>>>>>> Sethi ; Ye Li >>>>>>>> Subject: [EXT] Re: [PATCH v3] crypto/fsl: fsl_rsa: Fix dcache >>>>>>>> issue in the driver >>>>>>>> >>>>>>>> Caution: EXT Email >>>>>>>> >>>>>>>> Hi Gaurav, >>>>>>>> >>>>>>>> On Wed, Jun 15, 2022 at 9:35 AM Gaurav Jain >>>> wrote: >>>>>>>>> >>>>>>>>> From: Ye Li >>>>>>>>> >>>>>>>>> issue: >>>>>>>>> CAAM fails with key error when perform Modular Exponentiation >>>>>>>>> using PKHA Block in CAAM >>>>>>>>> >>>>>>>>> Fix: >>>>>>>>> add flush and invalidate dcache for keys, signature and output >>>>>>>>> decrypted data processed by CAAM. >>>>>>>>> >>>>>>>>> Fixes: 34276478f7 (DM: crypto/fsl - Add Freescale rsa DM driver) >>>>>>>>> Signed-off-by: Ye Li >>>>>>>>> Reviewed-by: Gaurav Jain >>>>>>>>> Acked-by: Peng Fan >>>>>>>>> --- >>>>>>>> >>>>>>>> Please always explain what changed in the current version of the patch. >>>>>>>> >>>>>>>> I assume you fixed the build error found in CI, correct? >>>>>>> >>>>>>> This is a different patch in fsl_rsa.c I will send a different >>>>>>> patch for the error reported by you. >>>>>> >>>>>> Ouch...I have misunderstood. Well, then I willwait for your patch.. >>>>>> >>>>>> Regards, >>>>>> Stefano >>>>>> >>>>>>> >>>>>>> Regards >>>>>>> Gaurav Jain >>>> >>>> >>>> -- >>>> >> ================================================================= >>>> ==== >>>> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >>>> HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany >>>> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de >>>> >> ================================================================= >>>> ==== >> >> >> -- >> ================================================================= >> ==== >> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >> HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany >> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de >> ================================================================= >> ==== -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =====================================================================