From patchwork Mon Jun 14 20:16:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 12319809 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 F23DBC49EC7 for ; Mon, 14 Jun 2021 20:24:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2B0861356 for ; Mon, 14 Jun 2021 20:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235280AbhFNU0Z (ORCPT ); Mon, 14 Jun 2021 16:26:25 -0400 Received: from lilium.sigma-star.at ([109.75.188.150]:59394 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235071AbhFNU0W (ORCPT ); Mon, 14 Jun 2021 16:26:22 -0400 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id CD8851817A0D5; Mon, 14 Jun 2021 22:16:36 +0200 (CEST) Received: from lilium.sigma-star.at ([127.0.0.1]) by localhost (lilium.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LQOMc3Q2a1Ft; Mon, 14 Jun 2021 22:16:35 +0200 (CEST) Received: from lilium.sigma-star.at ([127.0.0.1]) by localhost (lilium.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3Byo3RcpDR1u; Mon, 14 Jun 2021 22:16:34 +0200 (CEST) From: Richard Weinberger To: keyrings@vger.kernel.org Cc: Richard Weinberger , Ahmad Fatoum , David Gstir , David Howells , "David S. Miller" , Fabio Estevam , Herbert Xu , James Bottomley , James Morris , Jarkko Sakkinen , Jonathan Corbet , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Mimi Zohar , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , "Serge E. Hallyn" , Shawn Guo Subject: [PATCH 0/3] DCP as trusted keys backend Date: Mon, 14 Jun 2021 22:16:17 +0200 Message-Id: <20210614201620.30451-1-richard@nod.at> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org DCP is an IP core found on NXP SoCs such as i.mx6ull. While its bigger brother, CAAM, can directly wrap and unwrap blobs in hardware[0], DCP offers only the bare minimum and the blob mechanism needs aid from software. This series adds support for a new trusted keys backend that makes use of DCP's feature to use hardware keys which can never be read out. [0] https://lore.kernel.org/lkml/cover.56fff82362af6228372ea82e6bd7e586e23f0966.1615914058.git-series.a.fatoum@pengutronix.de/ --- 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 David Gstir (1): doc: trusted-encrypted: add DCP as new trust source Richard Weinberger (2): crypto: mxs-dcp: Add support for hardware provided keys KEYS: trusted: Introduce support for NXP DCP-based trusted keys .../admin-guide/kernel-parameters.txt | 1 + .../security/keys/trusted-encrypted.rst | 84 ++++- MAINTAINERS | 9 + drivers/crypto/mxs-dcp.c | 110 +++++- include/keys/trusted_dcp.h | 13 + include/linux/mxs-dcp.h | 19 + security/keys/trusted-keys/Makefile | 1 + security/keys/trusted-keys/trusted_core.c | 6 +- security/keys/trusted-keys/trusted_dcp.c | 325 ++++++++++++++++++ 9 files changed, 554 insertions(+), 14 deletions(-) create mode 100644 include/keys/trusted_dcp.h create mode 100644 include/linux/mxs-dcp.h create mode 100644 security/keys/trusted-keys/trusted_dcp.c