From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751329AbcGWHoz (ORCPT ); Sat, 23 Jul 2016 03:44:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:56327 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbcGWHox convert rfc822-to-8bit (ORCPT ); Sat, 23 Jul 2016 03:44:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,407,1464678000"; d="scan'208";a="1027580510" From: "Winkler, Tomas" To: Greg Kroah-Hartman , Ulf Hansson , "Hunter, Adrian" , "James Bottomley" , "Martin K. Petersen" , Vinayak Holikatti , Andy Lutomirski , =?iso-8859-1?Q?Arve_Hj=F8nnev=E5g?= , Michael Ryleev , Joao Pinto , Christoph Hellwig , Yaniv Gardi CC: "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Avri Altman , "Dattatraya Kulkarni, Anisha" , "jerome.forissier@linaro.org" Subject: RE: [PATCH v5 0/8] Replay Protected Memory Block (RPMB) subsystem Thread-Topic: [PATCH v5 0/8] Replay Protected Memory Block (RPMB) subsystem Thread-Index: AQHR4TMYXrSGGGJ3YUqlWyUUjugCkKAlp2AQ Date: Sat, 23 Jul 2016 07:44:48 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B542A1CC6@hasmsx108.ger.corp.intel.com> References: <1468873673-21776-1-git-send-email-tomas.winkler@intel.com> In-Reply-To: <1468873673-21776-1-git-send-email-tomas.winkler@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTJlOGI4MzYtOWE2OC00OGQyLTkyYjUtZTUzMWJmNWU5NGMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im1jamRSR3JBcGlvaVRiR2kxZktFd3hvZlRsbk5tUzhpTnlSbEFkOTJnUzg9In0= x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Few storage technologies such is EMMC, UFS, and NVMe support RPMB > hardware partition with common protocol and frame layout. > The RPMB partition cannot be accessed via standard block layer, but by a set > of specific commands: WRITE, READ, GET_WRITE_COUNTER, and > PROGRAM_KEY. > Such a partition provides authenticated and replay protected access, hence > suitable as a secure storage. > > The RPMB layer aims to provide in-kernel API for Trusted Execution > Environment (TEE) devices that are capable to securely compute block frame > signature. In case a TEE device wish to store a replay protected data, it > creates an RPMB frame with requested data and computes HMAC of the > frame, then it requests the storage device via RPMB layer to store the data. > A TEE driver can claim the RPMB interface, for example, via > class_interface_register (). > The layer provides two APIs, for rpmb_req_cmd() for issuing one of RPMB > specific commands and rpmb_seq_cmd() for issuing of raw RPMB protocol > frames, which is close to emmc multi ioctl interface. > > A storage device registers its RPMB hardware (eMMC) partition or RPMB W- > LUN (UFS) with the RPMB layer providing an implementation for > rpmb_seq_cmd() handler. The interface enables sending sequence of RPMB > standard frames. > > A parallel user space API is provided via /dev/rpmbX character device with > two IOCTL commands. > Simplified one, RPMB_IOC_REQ_CMD, were read result cycles is performed > by the framework on behalf the user and second, RPMB_IOC_SEQ_CMD > where the whole RPMB sequence, including RESULT_READ is supplied by the > caller. > The latter is intended for easier adjusting of the applications that use > MMC_IOC_MULTI_CMD ioctl, such as > https://android.googlesource.com/trusty/app/storage/ > > There is a also sample tool under tools/rpmb/ directory that exercises these > interfaces and a simulation device that implements the device part. > > Tomas Winkler (8): > rpmb: add Replay Protected Memory Block (RPMB) subsystem > char: rpmb: add sysfs-class ABI documentation > char: rpmb: add device attributes > char: rpmb: provide a user space interface > char: rpmb: add RPMB simulation device > tools rpmb: add RPBM access tool > mmc: block: register RPMB partition with the RPMB subsystem > scsi: ufs: connect to RPMB subsystem > I've got few off line request for git access of this code, so here si the repo https://github.com/tomasbw/linux-mei.git branch rpmb. The branch is rebasing one over linux master branch Thanks and will appreciate any public review. Tomas