Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1338669pxv; Fri, 2 Jul 2021 01:01:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeuvKnrxPHA342Xu+ehQdtFr/BWl8QmjuosqtxbFum/WlH1BiTwElBKJMyRQ6NqDupoT1A X-Received: by 2002:a05:6e02:1041:: with SMTP id p1mr2597962ilj.238.1625212904445; Fri, 02 Jul 2021 01:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625212904; cv=none; d=google.com; s=arc-20160816; b=QHq//uiF28C5xepattTwrzh8ekYq9YlF9P5YWBcBdl6e9wtFKoV4K1Hv99HgZfzVS4 Ou2KJTf5Pmv973uqy7HXP7P2N4r8XPjqTZQQhiorA0UOdPcd3Gmk4Ix9hak9tdDmP+zy EcUf/xAQHA77jDtcjcsA8+y+Wwc17+58utOXZ7aPmu7kCGlwRfH4d5z9LJwTNAaWvhqG pLxU2uPWnPOsKphkKIGywqBZO6omhERf5Awc23wpgVGfs2VTzt3SbzZXdZPUz29PotoG troFhPpFiAjhpV1tgCFVrjnB9A8ayk0vIdbmWSw1LzNvgK1SDavd+qujEptsg4weMEjy HHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=pVM93aEte8XaCjuLtwh7nHZN+ZmRGgrPMz5QvkUoMMg=; b=yuk22LEtWYyv/8SRimSIUiTl19/L1LzadAXNeXE7bRwxX+Ja54VBaxv7pPSvjBef3/ dWuOseVsH8to89v4xQd685CU2H5NI9IZpxdufNr4G0BPMqQhT5/9nqTkwFRJu59d0/1v vj9Q89sG2jekE1GjbnkhfRSOSWP+hNVj8UBe0rkXGjIkYGzCdkUzNxFARiNhCIfyruF9 SPIotmskDJ0CNGwr7gPImU1GfmX1R1/yf3rNcdESCdSQNGyjLCC9C7QEba+EJdPJK6IM VKTGf3K1PywOXilXvUOPSlBnbvnmipfKyNpN1bo9tdSvqq07jSEl314J5lt3mR/Fwv+S tCYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si2350222ilm.134.2021.07.02.01.01.23; Fri, 02 Jul 2021 01:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230236AbhGBIC5 (ORCPT + 99 others); Fri, 2 Jul 2021 04:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbhGBICy (ORCPT ); Fri, 2 Jul 2021 04:02:54 -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 35907C061765 for ; Fri, 2 Jul 2021 01:00:22 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lzE5x-0007GU-04; Fri, 02 Jul 2021 10:00:17 +0200 Subject: Re: [PATCH v2 6/6] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys To: Richard Weinberger Cc: Jonathan Corbet , David Howells , Jarkko Sakkinen , James Bottomley , Mimi Zohar , kernel , James Morris , "Serge E. Hallyn" , horia geanta , aymen sghaier , Herbert Xu , davem , Udit Agarwal , Eric Biggers , Jan Luebbe , david , Franck Lenormand , Sumit Garg , "open list, ASYMMETRIC KEYS" , Linux Crypto Mailing List , Linux Doc Mailing List , linux-integrity , linux-kernel , LSM References: <39e6d65ca5d2a0a35fb71d6c1f85add8ee489a19.1624364386.git-series.a.fatoum@pengutronix.de> <1850833581.13438.1625172175436.JavaMail.zimbra@nod.at> From: Ahmad Fatoum Message-ID: <2f608e5a-5a12-6db1-b9bd-a2cd9e3e3671@pengutronix.de> Date: Fri, 2 Jul 2021 10:00:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1850833581.13438.1625172175436.JavaMail.zimbra@nod.at> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb 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-crypto@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello Richard, On 01.07.21 22:42, Richard Weinberger wrote: > Ahmad, > > ----- Ursprüngliche Mail ----- >> Von: "Ahmad Fatoum" >> +static struct caam_blob_priv *blobifier; >> + >> +#define KEYMOD "kernel:trusted" > > I'm still think that hard coding the key modifier is not wise. > As I said[0], there are folks out there that want to provide their own modifier, > so it is not only about being binary compatible with other CAAM blob patches in the wild. I don't think the characterization as a salt is accurate. AFAIU it's more of a namespace, so blobs being loaded are "type-checked" against the modifier. > I'll happily implement that feature after your patches got merged but IMHO we should first agree on an interface. > How about allowing another optional parameter to Opt_new and Opt_load Sound good to me. pcrlock for TPM trusted keys has the same interface. I'd prefer the new option to accept strings, not hex though. > and having a key modifier per struct trusted_key_payload instance? Ye, possibly a void *backend_data, which other trust sources could leverage as well. But that should be separate discussion. Cheers, Ahmad > > Thanks, > //richard > > [0] > https://patchwork.kernel.org/project/linux-crypto/patch/319e558e1bd19b80ad6447c167a2c3942bdafea2.1615914058.git-series.a.fatoum@pengutronix.de/#24085397 > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |