* RPMB user space ABI
@ 2021-02-11 14:07 Alex Bennée
0 siblings, 0 replies; only message in thread
From: Alex Bennée @ 2021-02-11 14:07 UTC (permalink / raw)
To: linux-kernel, linux-mmc, linux-scsi, linux-nvme
Cc: Tomas Winkler, Alexander Usyskin, Ulf Hansson, Linus Walleij,
Arnd Bergmann, Ilias Apalodimas, Huang Yang, Ruchika Gupta
Hi,
Last year while I was implementing a virtio-rpmb backend for QEMU I
ended up using patches from the ACRN tree which was based on Thomas'
patches last posted in 2016:
https://lore.kernel.org/lkml/1478548394-8184-1-git-send-email-tomas.winkler@intel.com/
which I bastardised into a testing tree on a more recent kernel:
https://git.linaro.org/people/alex.bennee/linux.git/log/?h=testing/virtio-rpmb
The main reason I hacked them around was because the VirtIO spec had
since been finalised and had a very different framing structure. The
original proposed ABI provided for an ioctl which sent JDEC frames to
the underlying device. This was later expanded to support NVME style
frames. Neither of these frame sequences matched the final VirtIO
specification.
It seems to me having the ioctl ABI at this level exposes too many
underlying HW details to user space. With the number of HW devices that
providing RPMB features likely to grow from the current 3 (eMMC/JDEC,
NVME, VirtIO) it seems this ABI should operate at a higher level, e.g.:
PROGRAM_KEY
GET_WRITE_COUNTER
WRITE_DATA
READ_DATA
and I guess some sort of asynchronous result check?
It would then be for the kernel to take the higher level concepts and
translate them to the final frames required to talk to the actual HW (if
indeed there is some).
Does this seem reasonable? Is this orthogonal to any access to RPMB
partitions that file-systems might want to do?
--
Alex Bennée
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-15 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 14:07 RPMB user space ABI Alex Bennée
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).