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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3249FC433FE for ; Mon, 9 May 2022 13:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235108AbiEINJI (ORCPT ); Mon, 9 May 2022 09:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235146AbiEINJA (ORCPT ); Mon, 9 May 2022 09:09:00 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE77F1611E7 for ; Mon, 9 May 2022 06:05:06 -0700 (PDT) Received: from birne.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::51]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1no33x-0005Ao-B0; Mon, 09 May 2022 15:04:33 +0200 Message-ID: <5e7c0b3c9bc285f1cf9f7b20f055aa376e1688cc.camel@pengutronix.de> Subject: Re: [EXT] [PATCH v9 3/7] crypto: caam - determine whether CAAM supports blob encap/decap From: Ahmad Fatoum To: Pankaj Gupta , Horia Geanta , Herbert Xu , "David S. Miller" Cc: "kernel@pengutronix.de" , Michael Walle , James Bottomley , Jarkko Sakkinen , Mimi Zohar , David Howells , James Morris , Eric Biggers , "Serge E. Hallyn" , Jan Luebbe , David Gstir , Richard Weinberger , Franck Lenormand , Matthias Schiffer , Sumit Garg , "linux-integrity@vger.kernel.org" , "keyrings@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-security-module@vger.kernel.org" Date: Mon, 09 May 2022 15:04:20 +0200 In-Reply-To: References: <20220506062553.1068296-1-a.fatoum@pengutronix.de> <20220506062553.1068296-4-a.fatoum@pengutronix.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::51 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-security-module@vger.kernel.org Precedence: bulk List-ID: Hello Pankaj, On Mon, 2022-05-09 at 12:39 +0000, Pankaj Gupta wrote: > > -       if (ctrlpriv->era < 10) > > +       comp_params = rd_reg32(&ctrl->perfmon.comp_parms_ls); > > +       ctrlpriv->blob_present = !!(comp_params & CTPR_LS_BLOB); > > + > > +       if (ctrlpriv->era < 10) { > >                 rng_vid = (rd_reg32(&ctrl->perfmon.cha_id_ls) & > >                            CHA_ID_LS_RNG_MASK) >> > > CHA_ID_LS_RNG_SHIFT; > > Check for AES CHAs for Era < 10, should be added. Do I need this? I only do this check for Era >= 10, because apparently there are Layerscape non-E processors that indicate BLOB support via CTPR_LS_BLOB, but fail at runtime. Are there any Era < 10 SoCs that are similarly broken? Cheers, Ahmad