From: Avri Altman <Avri.Altman@wdc.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Jens Wiklander <jens.wiklander@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"op-tee@lists.trustedfirmware.org"
<op-tee@lists.trustedfirmware.org>,
"Shyam Saini" <shyamsaini@linux.microsoft.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Jerome Forissier" <jerome.forissier@linaro.org>,
"Sumit Garg" <sumit.garg@linaro.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Bart Van Assche" <bvanassche@acm.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Tomas Winkler" <tomas.winkler@intel.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: RE: [PATCH v3 1/3] rpmb: add Replay Protected Memory Block (RPMB) subsystem
Date: Tue, 5 Mar 2024 16:33:48 +0000 [thread overview]
Message-ID: <DM6PR04MB65759DF9CAF6ECB5BA78E138FC222@DM6PR04MB6575.namprd04.prod.outlook.com> (raw)
In-Reply-To: <CACRpkdZBWBio8kvKuVzj2CknCb4eS=VB2EqUsAK-vf4e328icg@mail.gmail.com>
> Hi Jens,
>
> thanks for your patch!
>
> On Tue, Feb 27, 2024 at 4:31 PM Jens Wiklander <jens.wiklander@linaro.org>
> wrote:
>
> > A number of storage technologies support a specialised hardware
> > partition designed to be resistant to replay attacks. The underlying
> > HW protocols differ but the operations are common. The RPMB partition
> > cannot be accessed via standard block layer, but by a set of specific
> > RPMB 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 initial aim of this patch is to provide a simple RPMB driver
> > interface which can be accessed by the optee driver to facilitate
> > early RPMB access to OP-TEE OS (secure OS) during the boot time.
> >
> > A TEE device driver can claim the RPMB interface, for example, via
> > rpmb_interface_register() or rpmb_dev_find_device(). The RPMB driver
> > provides a callback to route RPMB frames to the RPMB device accessible
> > via rpmb_route_frames().
> >
> > The detailed operation of implementing the access is left to the TEE
> > device driver itself.
> >
> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > Signed-off-by: Shyam Saini <shyamsaini@linux.microsoft.com>
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
>
> I would mention in the commit that the subsystem is currently only used with
> eMMC but is designed to be used also by UFS and NVME. Nevertheless, no big
> deal so:
Moreover, as the years went by, the differences between mmc and ufs grew:
In mmc there are 7 rpmb operations, in ufs 9.
In mmc the rpmb frame is 512Bytes, also in legacy ufs (up to including ufs3.1), but in ufs4.0 onward it can be 4k with extended header.
See e.g. https://patchwork.kernel.org/project/linux-scsi/patch/20221107131038.201724-3-beanhuo@iokpp.de/
In mmc the rpmb sequence is atomic, in ufs not.
In ufs rpmb is a wlun in mmc a partition.
Both protocols support in multi-region rpmb, but there are some differences there.
Etc.
Thanks,
Avri
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> > +config RPMB
> > + tristate "RPMB partition interface"
> > + depends on MMC
>
> depends on MMC || SCSI_UFSHCD || NVME_CORE ?
>
> Or do we want to hold it off until we implement the backends?
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2024-03-05 16:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 15:31 [PATCH v3 0/3] " Jens Wiklander
2024-02-27 15:31 ` [PATCH v3 1/3] rpmb: add " Jens Wiklander
2024-03-05 12:24 ` Linus Walleij
2024-03-05 12:55 ` Winkler, Tomas
2024-03-05 15:30 ` Jens Wiklander
2024-03-05 16:33 ` Avri Altman [this message]
2024-03-05 16:37 ` Arnd Bergmann
2024-03-05 16:42 ` Avri Altman
2024-04-03 8:54 ` Jens Wiklander
2024-03-05 12:29 ` Linus Walleij
2024-03-05 12:54 ` Winkler, Tomas
2024-03-05 14:16 ` Linus Walleij
2024-03-22 16:25 ` Ulf Hansson
2024-03-25 8:07 ` Avri Altman
2024-03-25 8:22 ` Winkler, Tomas
2024-03-25 13:33 ` Ulf Hansson
2024-03-25 13:44 ` Jens Wiklander
2024-03-28 6:58 ` Jens Wiklander
2024-02-27 15:31 ` [PATCH v3 2/3] mmc: block: register RPMB partition with the RPMB subsystem Jens Wiklander
2024-02-27 15:31 ` [PATCH v3 3/3] optee: probe RPMB device using " Jens Wiklander
2024-03-01 10:28 ` Sumit Garg
2024-03-28 16:09 ` Jens Wiklander
2024-04-03 12:58 ` Sumit Garg
2024-04-03 14:41 ` Jens Wiklander
2024-04-05 7:15 ` Sumit Garg
2024-04-05 11:39 ` Jens Wiklander
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=DM6PR04MB65759DF9CAF6ECB5BA78E138FC222@DM6PR04MB6575.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=alex.bennee@linaro.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bvanassche@acm.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jens.wiklander@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=rdunlap@infradead.org \
--cc=shyamsaini@linux.microsoft.com \
--cc=sumit.garg@linaro.org \
--cc=tomas.winkler@intel.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®