diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-11-24 18:01:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-01-03 13:49:02 +0100 |
commit | 4e1f0037b85d1b3c272e13862f44eb35844a18b1 (patch) | |
tree | 4dc975d7a968241a756335a29af76efce12a358f /man/systemd-tpm2-generator.xml | |
parent | test-64: only look at plugged devices, not all of them (diff) | |
download | systemd-4e1f0037b85d1b3c272e13862f44eb35844a18b1.tar.xz systemd-4e1f0037b85d1b3c272e13862f44eb35844a18b1.zip |
units: add a tpm2.target synchronization point and small generator that pulls in
Distributions apparently only compile a subset of TPM2 drivers into the
kernel. For those not compiled it but provided as kmod we need a
synchronization point: we must wait before the first TPM2 interaction
until the driver is available and accessible.
This adds a tpm2.target unit as such a synchronization point. It's
ordered after /dev/tpmrm0, and is pulled in by a generator whenever we
detect that the kernel reported a TPM2 to exist but we have no device
for it yet.
This should solve the issue, but might create problems: if there are TPM
devices supported by firmware that we don't have Linux drivers for we'll
hang for a bit. Hence let's add a kernel cmdline switch to disable (or
alternatively force) this logic.
Fixes: #30164
Diffstat (limited to 'man/systemd-tpm2-generator.xml')
-rw-r--r-- | man/systemd-tpm2-generator.xml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/man/systemd-tpm2-generator.xml b/man/systemd-tpm2-generator.xml new file mode 100644 index 0000000000..51950eece9 --- /dev/null +++ b/man/systemd-tpm2-generator.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<!--*-nxml-*--> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % entities SYSTEM "custom-entities.ent" > +%entities; +]> +<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> +<refentry id="systemd-tpm2-generator"> + + <refentryinfo> + <title>systemd-tpm2-generator</title> + <productname>systemd</productname> + </refentryinfo> + + <refmeta> + <refentrytitle>systemd-tpm2-generator</refentrytitle> + <manvolnum>8</manvolnum> + </refmeta> + + <refnamediv> + <refname>systemd-tpm2-generator</refname> + <refpurpose>Generator for inserting TPM2 synchronization point in the boot process</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <para><filename>/usr/lib/systemd/system-generators/systemd-tpm2-generator</filename></para> + </refsynopsisdiv> + + <refsect1> + <title>Description</title> + + <para><filename>systemd-tpm2-generator</filename> is a generator that adds a <varname>Wants=</varname> + dependency from <filename>sysinit.target</filename> to <filename>tpm2.target</filename> when it detects + that the firmware discovered a TPM2 device but the OS kernel so far did + not. <filename>tpm2.target</filename> is supposed to act as synchronization point for all services that + require TPM2 device access. See + <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry> for + details.</para> + + <para>The <option>systemd.tpm2_wait=</option> kernel command line option may be used to override + behaviour of the generator. It accepts a boolean value: if true then <filename>tpm2.target</filename> + will be added as synchronization point even if the firmware has not detected a TPM2 device. If false, the + target will not be inserted even if firmware reported a device but the OS kernel doesn't expose a device + for it yet. The latter might be useful in environments where a suitable TPM2 driver for the available + hardware is not available.</para> + + <para><filename>systemd-tpm2-generator</filename> implements + <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> + </refsect1> + + <refsect1> + <title>See Also</title> + <para><simplelist type="inline"> + <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> + <member><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> + </simplelist></para> + </refsect1> +</refentry> |