From patchwork Mon Dec 13 19:58:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brazdil X-Patchwork-Id: 1567473 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=cCkegL7x; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JCXPr0lBpz9sR4 for ; Tue, 14 Dec 2021 06:58:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242647AbhLMT6j (ORCPT ); Mon, 13 Dec 2021 14:58:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242659AbhLMT6j (ORCPT ); Mon, 13 Dec 2021 14:58:39 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BED03C06173F for ; Mon, 13 Dec 2021 11:58:38 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id bx28-20020a0564020b5c00b003e7c42443dbso14842837edb.15 for ; Mon, 13 Dec 2021 11:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=udaKVaiMgUS12kFr9msWra26CoDr7HydSsff/jVCEA8=; b=cCkegL7xdBlYOrXrpsJvD3x/wwOLT8/KCoEFGlV5YjOoOcJXDP+pyahia4y5Zr93Bs nEp9DD4NQ6pzZhGn/uXATEi14JGqh4wO1KJyU0NRusimI1G077wvD01qiTeX/C76R3JT 4zFJvs2/ty+l4bvrJXy4L4GzqC0qxh5U4KfojQy1xrEgYn8YMS/LOIR4D5VfatVJgDOu BQAksxnRKVddshJ+BLgppBZegu4YifOMxerTkY2ddlOrJQFdL2osQEqDJ2BgO6YQupND poI5R3WNRWo/8xC/Xl4SgL6LdyuGL7mkVgd2rOwlo8VSk8wL3Uo/8FKaKpnp6Fr8HJGJ OX5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=udaKVaiMgUS12kFr9msWra26CoDr7HydSsff/jVCEA8=; b=x9Es7Iy7e7ssQEq6Ooc+szKTb4Mzo3nF0cerRcfGtvQuYvxnsswMYL/Yb9v8bQ0zJZ TAMyqkIEK1DwmFOY4v4TsE22HOMj6pLWBg50ymXqiXwbbeWzfuhren7MWou3ZxNeMS8q NLyfWujERCgXsLrtHrTe+w547SRN0/1jeUVkrccwl27ZppA5Hdt2Jcgxc01mWcksmRci hSVCSf0zfne/ExDt4seQ0BznLGNhp6RHE3sLNbKxB78SAGtQj7J6TOOW3yUmmfayG6x2 foZokPyWnNLhC5htU5rhF/+CH0ivB0rPkwGtnZ2dhEHhh355EPFL/3lShy4VmapHMWwj jzHA== X-Gm-Message-State: AOAM531MyLxn0UunfnpAhJJwGaREZGwwXYil97TjuYnlNn2R14+UwJe6 gcxjSc8ZsvvpFeEVP0wC5/gFoie5OqsfKw== X-Google-Smtp-Source: ABdhPJx2xxRPbwTb61GuOX1MaGlWRA74KF441oqpKfnTeSymc3P+1m4i/8e/XKZ/eCS3994S+IEGe4orQCJO9g== X-Received: from dbrazdil.lon.corp.google.com ([2a00:79e0:d:209:3e63:6f60:9fab:4549]) (user=dbrazdil job=sendgmr) by 2002:a17:907:3e22:: with SMTP id hp34mr465308ejc.491.1639425517186; Mon, 13 Dec 2021 11:58:37 -0800 (PST) Date: Mon, 13 Dec 2021 19:58:31 +0000 Message-Id: <20211213195833.772892-1-dbrazdil@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog Subject: [PATCH v3 0/2] Driver for Open Profile for DICE From: David Brazdil To: Greg Kroah-Hartman Cc: Rob Herring , Arnd Bergmann , David Brazdil , Will Deacon , Andrew Scull , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Open Profile for DICE is an open protocol for measured boot compatible with the Trusted Computing Group's Device Identifier Composition Engine (DICE) specification. The generated Compound Device Identifier (CDI) certificates represent the measured hardware/software combination and can be used by userspace for remote attestation and sealing. This patchset adds DeviceTree bindings for the DICE device referencing a reserved memory region containing the CDIs, and a driver that exposes the memory region to userspace via a misc device. See https://pigweed.googlesource.com/open-dice for more details. The patches are based on top of v5.16-rc5 and can also be found here: https://android-kvm.googlesource.com/linux topic/dice_v3 Changes since v2: * renamed from 'dice' to 'open-dice' * replaced ioctls with read/write * replaced memzero_explicit with memset * allowed multiple instances * expanded Kconfig description Changes since v1: * converted to miscdevice * all mappings now write-combine to simplify semantics * removed atomic state, any attempt at exclusive access * simplified wipe, applied on ioctl, not on release * fixed ioctl return value David Brazdil (2): dt-bindings: firmware: Add Open Profile for DICE misc: open-dice: Add driver to expose DICE data to userspace .../bindings/firmware/google,open-dice.yaml | 51 +++++ drivers/misc/Kconfig | 12 ++ drivers/misc/Makefile | 1 + drivers/misc/open-dice.c | 197 ++++++++++++++++++ 4 files changed, 261 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/google,open-dice.yaml create mode 100644 drivers/misc/open-dice.c --- 2.34.1.173.g76aa8bc2d0-goog