From patchwork Tue Dec 7 12:36:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brazdil X-Patchwork-Id: 1564678 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=lrBu1OR3; 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 4J7ftc3B6Rz9s3q for ; Tue, 7 Dec 2021 23:36:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236489AbhLGMkH (ORCPT ); Tue, 7 Dec 2021 07:40:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232088AbhLGMkH (ORCPT ); Tue, 7 Dec 2021 07:40:07 -0500 Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1ECC061746 for ; Tue, 7 Dec 2021 04:36:36 -0800 (PST) Received: by mail-wr1-x449.google.com with SMTP id v17-20020adfedd1000000b0017c5e737b02so2891532wro.18 for ; Tue, 07 Dec 2021 04:36:36 -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=x46zOR8LTnf2zn3iy3IJEpl7ojPoSuxdNAclWSV2WCE=; b=lrBu1OR3FHdb1i5ChRqi9NtsxN8V/oMMVdxf3dJzsEj2fmyhuCFLyqDx90X0F6LALq zRRNQ0+2cKRDOUXdAizVhOpx87dIYKp5yZikcWHj4u8UQVK7yfbmVmIlcL9B81Ez2YUZ TzyN7DZOP++GjoBlhczpGzVBUHrVTC1qn9udmbfKgB8pxpn7nKQ1Uqkt9tMl/R+l43qd sf/Ja0R52ExvkHg0Wa1CO7wmWTeXzbOzxbonaZBBnAuohQvymUjY0p8rmYkXvyuTYvQc VSq/tLSMENXD+x6/zNjtAsZutfN2iIVCCCBuBLqYJN0ePtk9IxUARyc35jcgYhd3IV1X Iq6A== 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=x46zOR8LTnf2zn3iy3IJEpl7ojPoSuxdNAclWSV2WCE=; b=v7c1/pBf+cvzeRijwsgf969h7dKgyWjkoQbAxP7Nw9otpohLaGEfCBv7XxxjJOrW8o Q958i66Tt0hHH03WB8Wn+df1qg884UO/kqX24ebvLOiodE5finRaFyOGC3Oz3YsbNwjK 9Z5OABRa+HCuPBbdQ8mRFeGwsaDRvJ5yvesENJMBs45ioldORX3YzwkuSHzSsvQ9vbd3 Mcs57MlpMsPwGzyao7d4bGHfDsUnk70DsqqL16AZcL9av0qs5b1gy9R5PgcN9F1Zs+Xv XxJKKWGFZVQOlocBPQRxW1UgwNdgatbCQ5rtg/V/UEBbC6cdTowt5b0qUxrursv4siN/ mlug== X-Gm-Message-State: AOAM533zn9zmdLzFVNrUbHqD4HZLWjmRAka+RPHq9rYqBpej9CB1d4E/ nPBdX9FcnQPKpeLWm93HvE/tcsrQnLp0tg== X-Google-Smtp-Source: ABdhPJzsolbRhyKp+pryLDXdETwIA8wD1ZgFomo2XVyem7NhpLO9j3TKznoUscTKM4bpTiRSDYdKWWGujtwDKA== X-Received: from dbrazdil.lon.corp.google.com ([2a00:79e0:d:209:cb8b:b013:316d:b2f1]) (user=dbrazdil job=sendgmr) by 2002:a05:600c:1d1b:: with SMTP id l27mr896548wms.1.1638880594902; Tue, 07 Dec 2021 04:36:34 -0800 (PST) Date: Tue, 7 Dec 2021 12:36:15 +0000 Message-Id: <20211207123617.3040177-1-dbrazdil@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.34.1.400.ga245620fadb-goog Subject: [PATCH 0/2] Driver for Open Profile for DICE From: David Brazdil To: Greg Kroah-Hartman Cc: Rob Herring , Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , David Brazdil , Hans de Goede , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Andrew Scull , Will Deacon Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Open Profile for DICE is a secret derivation protocol used by some Android devices. The firmware/bootloader generates the secrets and hands them over to Linux in a reserved memory region. This patchset adds the corresponding DeviceTree bindings and a driver that takes ownership of the memory region and exposes it to userspace via a character device. It is currently under drivers/misc but perhaps a better location would be drivers/firmware. Let me know what you think. The patches are based on top of v5.16-rc4 and can also be found here: https://android-kvm.googlesource.com/linux topic/dice_v1 David Brazdil (2): dt-bindings: firmware: Add Open Profile for DICE misc: dice: Add driver to forward secrets to userspace .../devicetree/bindings/firmware/dice.yaml | 51 ++++ .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/misc/Kconfig | 8 + drivers/misc/Makefile | 1 + drivers/misc/dice.c | 254 ++++++++++++++++++ include/uapi/linux/dice.h | 14 + 6 files changed, 329 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/dice.yaml create mode 100644 drivers/misc/dice.c create mode 100644 include/uapi/linux/dice.h