linux/Documentation/driver-api/index.rst
Cedric Xing b9e22b35d4 tsm-mr: Add TVM Measurement Register support
Introduce new TSM Measurement helper library (tsm-mr) for TVM guest drivers
to expose MRs (Measurement Registers) as sysfs attributes, with Crypto
Agility support.

Add the following new APIs (see include/linux/tsm-mr.h for details):

- tsm_mr_create_attribute_group(): Take on input a `struct
  tsm_measurements` instance, which includes one `struct
  tsm_measurement_register` per MR with properties like `TSM_MR_F_READABLE`
  and `TSM_MR_F_WRITABLE`, to determine the supported operations and create
  the sysfs attributes accordingly. On success, return a `struct
  attribute_group` instance that will typically be included by the guest
  driver into `miscdevice.groups` before calling misc_register().

- tsm_mr_free_attribute_group(): Free the memory allocated to the attrubute
  group returned by tsm_mr_create_attribute_group().

tsm_mr_create_attribute_group() creates one attribute for each MR, with
names following this pattern:

        MRNAME[:HASH]

- MRNAME - Placeholder for the MR name, as specified by
  `tsm_measurement_register.mr_name`.
- :HASH - Optional suffix indicating the hash algorithm associated with
  this MR, as specified by `tsm_measurement_register.mr_hash`.

Support Crypto Agility by allowing multiple definitions of the same MR
(i.e., with the same `mr_name`) with distinct HASH algorithms.

NOTE: Crypto Agility, introduced in TPM 2.0, allows new hash algorithms to
be introduced without breaking compatibility with applications using older
algorithms. CC architectures may face the same challenge in the future,
needing new hashes for security while retaining compatibility with older
hashes, hence the need for Crypto Agility.

Signed-off-by: Cedric Xing <cedric.xing@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Dionna Amalie Glaze <dionnaglaze@google.com>
[djbw: fixup bin_attr const conflict]
Link: https://patch.msgid.link/20250509020739.882913-1-dan.j.williams@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2025-05-08 19:17:33 -07:00

156 lines
2.4 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0
==============================
Driver implementer's API guide
==============================
The kernel offers a wide variety of interfaces to support the development
of device drivers. This document is an only somewhat organized collection
of some of those interfaces — it will hopefully get better over time! The
available subsections can be seen below.
General information for driver authors
======================================
This section contains documentation that should, at some point or other, be
of interest to most developers working on device drivers.
.. toctree::
:maxdepth: 1
basics
driver-model/index
device_link
infrastructure
ioctl
pm/index
Useful support libraries
========================
This section contains documentation that should, at some point or other, be
of interest to most developers working on device drivers.
.. toctree::
:maxdepth: 1
early-userspace/index
connector
device-io
devfreq
dma-buf
component
io-mapping
io_ordering
uio-howto
vfio-mediated-device
vfio
vfio-pci-device-specific-driver-acceptance
Bus-level documentation
=======================
.. toctree::
:maxdepth: 1
auxiliary_bus
cxl/index
eisa
firewire
i3c/index
isa
men-chameleon-bus
pci/index
rapidio/index
slimbus
usb/index
virtio/index
vme
w1
xillybus
Subsystem-specific APIs
=======================
.. toctree::
:maxdepth: 1
80211/index
acpi/index
backlight/lp855x-driver.rst
clk
coco/index
console
crypto/index
dmaengine/index
dpll
edac
extcon
firmware/index
fpga/index
frame-buffer
aperture
generic-counter
gpio/index
hsi
hte/index
i2c
iio/index
infiniband
input
interconnect
ipmb
ipmi
libata
mailbox
md/index
media/index
mei/index
memory-devices/index
message-based
misc_devices
miscellaneous
mmc/index
mtd/index
mtdnand
nfc/index
ntb
nvdimm/index
nvmem
parport-lowlevel
phy/index
pin-control
pldmfw/index
pps
ptp
pwm
pwrseq
regulator
reset
rfkill
s390-drivers
scsi
serial/index
sm501
soundwire/index
spi
surface_aggregator/index
switchtec
sync_file
target
tee
thermal/index
tty/index
wbrf
wmi
xilinx/index
zorro
.. only:: subproject and html
Indices
=======
* :ref:`genindex`