linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arve Hjønnevåg" <arve@android.com>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	Andy Lutomirski <luto@kernel.org>,
	Michael Ryleev <gmar@google.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Christoph Hellwig <hch@lst.de>,
	Yaniv Gardi <ygardi@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem
Date: Wed, 1 Jun 2016 16:21:01 -0700	[thread overview]
Message-ID: <CAMP5Xgfo-4h3DYki0VWhQFjBtAE9=f9dqCZQV8VDvfJ3Rc_2UQ@mail.gmail.com> (raw)
In-Reply-To: <1464817292-5407-1-git-send-email-tomas.winkler@intel.com>

On Wed, Jun 1, 2016 at 2:41 PM, Tomas Winkler <tomas.winkler@intel.com> wrote:
> 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.
>...

If the same protocol is used by all these standards, why not export it
directly (including the RESULT_READ command or not even knowing the
command types)? While I would prefer an rpmb specific interface over
the existing raw mmc command interface, all I need is an rpmb
operation that lets me send and receive buffers without interruption.
You can find our exiting user-space code here at
https://android.googlesource.com/platform/system/core/+/master/trusty/storage/proxy/rpmb.c.
If you use an interface more similar to this, I think your emmc and
ufs specific code would be simpler. Also, if you don't need the
in-kernel interface, the kernel would not need to know the details of
the rpmb protocol at all.

I have not tested your code, but it looks like we would have to modify
the storage proxy to interpret the data it currently passes through
and remove all RESULT_READ packets.

-- 
Arve Hjønnevåg

  parent reply	other threads:[~2016-06-01 23:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 21:41 [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 1/8] rpmb: add " Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 2/8] char: rpmb: add sysfs-class ABI documentation Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 3/8] char: rpmb: add device attributes Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 4/8] char: rpmb: provide user space interface Tomas Winkler
2016-06-02 13:44   ` [v4,4/8] " Jérôme Forissier
2016-06-01 21:41 ` [PATCH v4 5/8] char: rpmb: add RPMB simulation device Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 6/8] tools rpmb: add RPBM access tool Tomas Winkler
2016-06-01 21:41 ` [PATCH v4 7/8] mmc: block: register RPMB partition with the RPMB subsystem Tomas Winkler
2016-06-23  6:17   ` Adrian Hunter
2016-06-27 10:17     ` Winkler, Tomas
2016-06-01 21:41 ` [PATCH v4 8/8] scsi: ufs: connect to " Tomas Winkler
2016-06-01 23:21 ` Arve Hjønnevåg [this message]
2016-06-02 13:17   ` [PATCH v4 0/8] Replay Protected Memory Block (RPMB) subsystem Winkler, Tomas
2016-06-02 22:35     ` Arve Hjønnevåg
2016-06-14 21:05 Winkler, Tomas
2016-06-15  2:39 ` Arve Hjønnevåg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP5Xgfo-4h3DYki0VWhQFjBtAE9=f9dqCZQV8VDvfJ3Rc_2UQ@mail.gmail.com' \
    --to=arve@android.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=adrian.hunter@intel.com \
    --cc=gmar@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=tomas.winkler@intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vinholikatti@gmail.com \
    --cc=ygardi@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).