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 59FA5C49EAF for ; Fri, 25 Jun 2021 12:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AC94616ED for ; Fri, 25 Jun 2021 12:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhFYMXv (ORCPT ); Fri, 25 Jun 2021 08:23:51 -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-crypto@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 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=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 6C08EC2B9F4 for ; Fri, 25 Jun 2021 12:23:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F032616E8 for ; Fri, 25 Jun 2021 12:23:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F032616E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1KxHyQDT1Pkj5y/kbLIrJSFxTe+EfhxKVU5valh3i5s=; b=roxXZ5ZL6X6fbL rqsyrC7PCLGdVq0bZ8Lr64HjSce356dyCzZl0ZX5HvhrT18T1cD/4MD1fO3jbe2qdAY2ZFCmWh/uD uEvcgXdKqcSBJjjwoXkBgfIyyc9+0CvfnSYr9TcSQVGYktgyjfzwmCeeH+n45NZzCHpg1ZtHeckZ+ NiHg07lAF9QL5D8HUm+RyZHsrOwAs+TkkhoiVWDk39bR5Ezbts0vtrkQnBJs+jxOYqR1AHlAe5ROK KCOmHsXEjQJpDwv3BY7cYQ2Tx1XWBhMPZew/Az0BvfRljJBOcgJSJFevqPqzG6lfX+8T//fIPTtSc CUhEJqGmo8Sf8fhuySGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwkpx-001QIt-5C; Fri, 25 Jun 2021 12:21:33 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwkpt-001QI0-Bd for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 12:21:30 +0000 Received: by mail-qk1-x735.google.com with SMTP id w21so18741065qkb.9 for ; 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=RpQV/DUAy/5GBgXwrre3KY9VRdF6qoQR3Y5js8cUvCuYDh2TP+rvqjsa0VKadWrsS9 DU4ENaoI4yjxPF3cuHwVxxXQL9iEAZTxQg0+y/Y7IfKipjroyH6HbNvXnrZ65cT/IVmi YMbbjEtTebfQwrZXaWCEyGkFtmzU0OuBL558Hr5GAK9y7VeGzMkyC9TdLzoh+0k+Iwa4 +xwZ4Nnd0sU7bm7MYDiSCeDrKH764IudsOHh3MaRq3WiweDUtZZy3IxnC8TzJYBWpI69 D5d2JBmFH6fUSx/6sOF13veRxQqNnXUzYcLLZJRl7ISo8dnvGt1q/3EtQ7relzz0yuiu qlfQ== X-Gm-Message-State: AOAM532Y6Hu7QZgmRnVGK9ng0V47zkUavr4nJyD3hYCYJW+rpMQUTazg vL1cvPxV4KarSM3Ei+5f95ZtRXKnDwXQKHA6QMU= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210625_052129_476842_D4194D29 X-CRM114-Status: GOOD ( 22.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel