Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411562

[PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem

From Tomas Winkler <tomas.winkler@intel.com>
Newsgroups linux.kernel
Subject [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem
Date 2016-06-01 23:50 +0200
Message-ID <rFmbv-5DL-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Few storage technology 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.

A storage device registers its RPMB hardware (emmc) partition or
RPMB W-LUN (ufs) with the RPMB layer providing an implementation for
send_rpmb_req() handler.
There is as well simulation platform device. This is handy as an RPMB
key can be programmed only once at storage device lifetime.

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 rpmb interface, for example,
via  class_interface_register ().

A parallel user space API is provided via /dev/rpmbX character
device with a single IOCTL command similar to the one provided by
mmc/ioctl. h
This API may help applications such as 
https://android.googlesource.com/trusty/app/storage/
To be obliviose to the underlaying HW storage technology.

There is a sample tool under tools/rpmb/ directory that exercises
this interface.

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 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

 Documentation/ABI/testing/sysfs-class-rpmb |  44 ++
 Documentation/ioctl/ioctl-number.txt       |   1 +
 MAINTAINERS                                |  10 +
 drivers/char/Kconfig                       |   2 +
 drivers/char/Makefile                      |   1 +
 drivers/char/rpmb/Kconfig                  |  25 +
 drivers/char/rpmb/Makefile                 |   6 +
 drivers/char/rpmb/cdev.c                   | 207 +++++++
 drivers/char/rpmb/core.c                   | 408 ++++++++++++++
 drivers/char/rpmb/rpmb-cdev.h              |  31 ++
 drivers/char/rpmb/rpmb_sim.c               | 589 ++++++++++++++++++++
 drivers/mmc/card/Kconfig                   |   1 +
 drivers/mmc/card/block.c                   | 292 ++++++++++
 drivers/scsi/ufs/Kconfig                   |   1 +
 drivers/scsi/ufs/ufshcd.c                  | 219 ++++++++
 drivers/scsi/ufs/ufshcd.h                  |   2 +
 include/linux/rpmb.h                       | 138 +++++
 include/uapi/linux/rpmb.h                  | 120 ++++
 tools/Makefile                             |  14 +-
 tools/rpmb/.gitignore                      |   2 +
 tools/rpmb/Makefile                        |  32 ++
 tools/rpmb/rpmb.c                          | 862 +++++++++++++++++++++++++++++
 22 files changed, 3002 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-rpmb
 create mode 100644 drivers/char/rpmb/Kconfig
 create mode 100644 drivers/char/rpmb/Makefile
 create mode 100644 drivers/char/rpmb/cdev.c
 create mode 100644 drivers/char/rpmb/core.c
 create mode 100644 drivers/char/rpmb/rpmb-cdev.h
 create mode 100644 drivers/char/rpmb/rpmb_sim.c
 create mode 100644 include/linux/rpmb.h
 create mode 100644 include/uapi/linux/rpmb.h
 create mode 100644 tools/rpmb/.gitignore
 create mode 100644 tools/rpmb/Makefile
 create mode 100644 tools/rpmb/rpmb.c

-- 
2.5.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  [PATCH v4 8/8] scsi: ufs: connect to RPMB subsystem Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  [PATCH v4 7/8] mmc: block: register RPMB partition with the RPMB subsystem Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  [PATCH v4 1/8] rpmb: add Replay Protected Memory Block (RPMB) subsystem Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  [PATCH v4 4/8] char: rpmb: provide user space interface Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
    Re: [v4,4/8] char: rpmb: provide user space interface Jérôme Forissier <jerome.forissier@linaro.org> - 2016-06-02 15:50 +0200
  [PATCH v4 3/8] char: rpmb: add device attributes Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  [PATCH v4 6/8] tools rpmb: add RPBM access tool Tomas Winkler <tomas.winkler@intel.com> - 2016-06-01 23:50 +0200
  Re: [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem Arve Hjønnevåg <arve@android.com> - 2016-06-02 01:30 +0200
    RE: [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-06-02 15:20 +0200
      Re: [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem Arve Hjønnevåg <arve@android.com> - 2016-06-03 00:40 +0200

csiph-web