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 X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 989D1C2B9F4 for ; Fri, 25 Jun 2021 12:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81B33616E9 for ; Fri, 25 Jun 2021 12:21:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230299AbhFYMXx (ORCPT ); Fri, 25 Jun 2021 08:23:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhFYMXu (ORCPT ); Fri, 25 Jun 2021 08:23:50 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE956C061574; Fri, 25 Jun 2021 05:21:28 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id bj15so18777906qkb.11; Fri, 25 Jun 2021 05:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L4Q8/3z6OXZZ/9ZPmsJ32/nlpjgIm8YhI1f+Jp/7/2Y=; b=WL+io1HK1tNOQKxbIBVMbIy/T9/bxFpeWFQvqPXHqNMk5T4+AzsEpeX0jFWiv9/8JZ jZtyRkg67eHuVI9mrtSDtLdoKttYBAd0QtM+kiimuZXFrImzRoEIj4tiiCiZuZWVK3at /2AQyUybsp5Wvx+iUGQt65JBdrZ4UBQ+4YsR+UmhadndSpBw46mHRT+rxy1HlaLvPWmD lk6c6KCfWGhg9b0ALrbaPrmS5kl3oyUk15k5Q/4T2sPvGaUwZXqkpGQrqPVjsMUrl/VF Aw166696i0P9ahVNEqPGnX1zw3YB7HbKbk5AxMmT1p/qUnAHnZvv8Rqr9wjh4N2KBZsq nGvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L4Q8/3z6OXZZ/9ZPmsJ32/nlpjgIm8YhI1f+Jp/7/2Y=; b=WjZGKOXbtkk5rE2Y2IKfbJsfDPIN/ldzTISdruO8cG3RyD17bJAyWfW9edo8AEraH0 kaw0QpwNmWix8L27DV361ejsLmQIfFpIYpN+oEpXdZfcMJZCjSqITf2MEyzQsRPAIXm9 fExhZCzFG5UXWbE0NjgA+2JYP0HBJDaQgmAU2T6DooLqea14spAiNjkX13liEiiHwE81 zG30yGzrsuod9TptlCZxurR8ymXE5HFrl+w/D2nxIA+H4kc/jqi6Xe0LMVw3zgtpVLt5 p3nj5ARdAZBvoi3nr+kIZZ2Gs4JHYhG5IKGyq3j5wBdcNvP8WqAephuzQcmmWQSWQFCR tulA== X-Gm-Message-State: AOAM531/3NqTRrJ4mGhGn+HTaPbkbMT3tVE28fBRbtm6RIhuxduDrK7V mXdBU/59lTOjjeMhMFQlm8I2Rpslmwb6KEVJ74Y= X-Google-Smtp-Source: ABdhPJx/f94SRCZdAiHGi/ly1dG35ye7G0aXHvgj8OgWk+mDDpVCnednOPUsuVtmlcQHWovAMDoeKz0kkOsoi5QKHGA= X-Received: by 2002:a37:9005:: with SMTP id s5mr10980983qkd.108.1624623687811; Fri, 25 Jun 2021 05:21:27 -0700 (PDT) MIME-Version: 1.0 References: <20210614201620.30451-1-richard@nod.at> <20210614201620.30451-2-richard@nod.at> In-Reply-To: <20210614201620.30451-2-richard@nod.at> From: Richard Weinberger Date: Fri, 25 Jun 2021 14:21:16 +0200 Message-ID: Subject: Re: [PATCH 1/3] crypto: mxs-dcp: Add support for hardware provided keys To: Herbert Xu Cc: keyrings@vger.kernel.org, Richard Weinberger , Ahmad Fatoum , David Gstir , David Howells , "David S. Miller" , Fabio Estevam , James Bottomley , James Morris , Jarkko Sakkinen , Jonathan Corbet , linux-arm-kernel@lists.infradead.org, Linux Crypto Mailing List , linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, LKML , LSM , Mimi Zohar , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , "Serge E. Hallyn" , Shawn Guo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Herbert, On Mon, Jun 14, 2021 at 10:18 PM Richard Weinberger wrote: > > DCP is capable to performing AES with hardware-bound keys. > These keys are not stored in main memory and are therefore not directly > accessible by the operating system. > > So instead of feeding the key into DCP, we need to place a > reference to such a key before initiating the crypto operation. > Keys are referenced by a one byte identifiers. > > DCP supports 6 different keys: 4 slots in the secure memory area, > a one time programmable key which can be burnt via on-chip fuses > and an unique device key. > > Using these keys is restricted to in-kernel users that use them as building > block for other crypto tools such as trusted keys. Allowing userspace > (e.g. via AF_ALG) to use these keys to crypt or decrypt data is a security > risk, because there is no access control mechanism. > > Cc: Ahmad Fatoum > Cc: David Gstir > Cc: David Howells > Cc: "David S. Miller" > Cc: Fabio Estevam > Cc: Herbert Xu > Cc: James Bottomley > Cc: James Morris > Cc: Jarkko Sakkinen > Cc: Jonathan Corbet > Cc: keyrings@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-crypto@vger.kernel.org > Cc: linux-doc@vger.kernel.org > Cc: linux-integrity@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-security-module@vger.kernel.org > Cc: Mimi Zohar > Cc: NXP Linux Team > Cc: Pengutronix Kernel Team > Cc: Richard Weinberger > Cc: Sascha Hauer > Cc: "Serge E. Hallyn" > Cc: Shawn Guo > Co-developed-by: David Gstir > Signed-off-by: David Gstir > Signed-off-by: Richard Weinberger > --- > drivers/crypto/mxs-dcp.c | 110 ++++++++++++++++++++++++++++++++++----- > include/linux/mxs-dcp.h | 19 +++++++ > 2 files changed, 117 insertions(+), 12 deletions(-) > create mode 100644 include/linux/mxs-dcp.h This patch was judged as not applicable in your patchwork. Is something missing? How can we proceed? -- Thanks, //richard