<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/tpm.h, branch v7.3-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-25T15:13:37+00:00</updated>
<entry>
<title>tpm-buf: Add TPM buffer support header for standalone reuse</title>
<updated>2026-08-25T15:13:37+00:00</updated>
<author>
<name>Ross Philipson</name>
<email>ross.philipson@gmail.com</email>
</author>
<published>2026-07-11T16:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55ba91d4c54ab31ee8387bae40e799de467f8269'/>
<id>urn:sha1:55ba91d4c54ab31ee8387bae40e799de467f8269</id>
<content type='text'>
Extract all the functions and definitions for TPM buffer handling
and separate them into their own header.

Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>tpm-buf: Memory-safe allocations</title>
<updated>2026-08-25T15:13:36+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@opinsys.com</email>
</author>
<published>2026-07-11T16:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d9e043dab0a038a53a43570f60bbf4b1e27d63f'/>
<id>urn:sha1:3d9e043dab0a038a53a43570f60bbf4b1e27d63f</id>
<content type='text'>
Decouple kzalloc from buffer creation, so that a managed allocation can be
used:

	struct tpm_buf *buf __free(kfree) buf = kzalloc(TPM_BUFSIZE,
						GFP_KERNEL);
	if (!buf)
		return -ENOMEM;

	tpm_buf_init(buf, TPM_BUFSIZE);

Alternatively, other allocations are also possible (static data, stack,
etc) for example:

	u8 buf_data[512];
	struct tpm_buf *buf = (struct tpm_buf *)buf_data;
	tpm_buf_init(buf, sizeof(buf_data));

This is achieved by embedding buffer's header inside the allocated blob,
instead of having an outer wrapper.

Reviewed-by: Stefan Berger &lt;stefanb@linux.ibm.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@opinsys.com&gt;
Tested-by: Srish Srinivasan &lt;ssrish@linux.ibm.com&gt;
Message-ID: &lt;20260522013555.1063716-1-jarkko@kernel.org&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@oracle.com&gt;
</content>
</entry>
<entry>
<title>tpm-buf: Remove chip parameter from tpm_buf_append_handle()</title>
<updated>2026-08-25T15:13:36+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@opinsys.com</email>
</author>
<published>2026-07-11T16:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=065cfba1f4545e5948a2ddc5888a27c7641d5bfc'/>
<id>urn:sha1:065cfba1f4545e5948a2ddc5888a27c7641d5bfc</id>
<content type='text'>
Remove the TPM driver chip parameter from the function
tpm_buf_append_handle(). The chip parameter is only for error logging
which can be done with other facilities like WARN().

Message-ID: &lt;20260125192526.782202-11-jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@opinsys.com&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
</content>
</entry>
<entry>
<title>tpm-buf: Merge TPM_BUF_BOUNDARY_ERROR and TPM_BUF_OVERFLOW</title>
<updated>2026-08-25T15:13:36+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@opinsys.com</email>
</author>
<published>2026-07-11T16:01:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b9551c189518544b65000a234277298e931c8f3'/>
<id>urn:sha1:0b9551c189518544b65000a234277298e931c8f3</id>
<content type='text'>
Merge TPM_BUF_BOUNDARY_ERROR and TPM_BUF_OVERFLOW flags into
the TPM_BUF_INVALID flag, as their behavior is identical (the only
difference being the associated log messages).

Message-ID: &lt;20260125192526.782202-11-jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@opinsys.com&gt;
Reviewed-by: Jonathan McDowell &lt;noodles@meta.com&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
</content>
</entry>
<entry>
<title>tpm: Move TPM common base definitions to the command header</title>
<updated>2026-08-25T15:13:35+00:00</updated>
<author>
<name>Ross Philipson</name>
<email>ross.philipson@gmail.com</email>
</author>
<published>2026-07-11T16:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88c5a62c3af7ca6f36dc6ffc52bcfb29cd2990cb'/>
<id>urn:sha1:88c5a62c3af7ca6f36dc6ffc52bcfb29cd2990cb</id>
<content type='text'>
These are top level definitions shared by both TPM 1 and 2
family chips. This includes core definitions like TPM localities,
common crypto algorithm IDs, and the base TPM command header.

Co-developed-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Signed-off-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Co-developed-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>tpm: Move TPM2 specific definitions to the command header</title>
<updated>2026-08-25T15:13:35+00:00</updated>
<author>
<name>Ross Philipson</name>
<email>ross.philipson@gmail.com</email>
</author>
<published>2026-07-11T16:01:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a5ec92813bc794ab3674aab993fe8f8b5cee9f0'/>
<id>urn:sha1:7a5ec92813bc794ab3674aab993fe8f8b5cee9f0</id>
<content type='text'>
Gather all the TPM2 definitions and structures in the internal header
file drivers/char/tpm/tpm.h into the command header, including:
 - Command codes, return codes and definitions from the public and
internal tpm.h files.
 - Structures defined in numerous TPM driver C modules.

The definitions moved to these files correspond to the TCG specification
for TPM 2 family:

TPM 2.0 Library
 - https://trustedcomputinggroup.org/resource/tpm-library-specification/

Co-developed-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Signed-off-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Co-developed-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>tpm: Initial step to reorganize TPM public headers</title>
<updated>2026-08-25T15:13:35+00:00</updated>
<author>
<name>Ross Philipson</name>
<email>ross.philipson@gmail.com</email>
</author>
<published>2026-07-11T16:01:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e06f28d32f31206c0be32a08b0273e26cfc1fc92'/>
<id>urn:sha1:e06f28d32f31206c0be32a08b0273e26cfc1fc92</id>
<content type='text'>
Consolidate TPM1 constants in tpm_command.h and remove duplicate
constants from tpm1-cmd.c.

Co-developed-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Signed-off-by: Daniel P. Smith &lt;dpsmith@apertussolutions.com&gt;
Co-developed-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Alec Brown &lt;alec.r.brown@oracle.com&gt;
Signed-off-by: Ross Philipson &lt;ross.philipson@gmail.com&gt;
Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
<entry>
<title>tpm2-sessions: Open code tpm_buf_append_hmac_session()</title>
<updated>2025-12-05T04:42:51+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@opinsys.com</email>
</author>
<published>2025-09-30T20:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7960b90486139022d2d39caad90db252c469bab'/>
<id>urn:sha1:b7960b90486139022d2d39caad90db252c469bab</id>
<content type='text'>
Open code 'tpm_buf_append_hmac_session_opt' to the call site, as it only
masks a call sequence and does otherwise nothing particularly useful.

Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@opinsys.com&gt;
Reviewed-by: Jonathan McDowell &lt;noodles@meta.com&gt;
</content>
</entry>
<entry>
<title>tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth</title>
<updated>2025-12-05T04:42:51+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@opinsys.com</email>
</author>
<published>2025-09-30T13:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc677a9216e1396322e42692e9c01cce04a7afc0'/>
<id>urn:sha1:bc677a9216e1396322e42692e9c01cce04a7afc0</id>
<content type='text'>
Remove 'attributes' parameter from 'tpm_buf_append_auth', as it is not used
by the function.

Fixes: 27184f8905ba ("tpm: Opt-in in disable PCR integrity protection")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@opinsys.com&gt;
Reviewed-by: Jonathan McDowell &lt;noodles@meta.com&gt;
</content>
</entry>
<entry>
<title>tpm2-sessions: Fix out of range indexing in name_size</title>
<updated>2025-12-05T04:31:07+00:00</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko@kernel.org</email>
</author>
<published>2025-11-30T19:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e9722e9a7bfe1bbad649937c811076acf86e1fd'/>
<id>urn:sha1:6e9722e9a7bfe1bbad649937c811076acf86e1fd</id>
<content type='text'>
'name_size' does not have any range checks, and it just directly indexes
with TPM_ALG_ID, which could lead into memory corruption at worst.

Address the issue by only processing known values and returning -EINVAL for
unrecognized values.

Make also 'tpm_buf_append_name' and 'tpm_buf_fill_hmac_session' fallible so
that errors are detected before causing any spurious TPM traffic.

End also the authorization session on failure in both of the functions, as
the session state would be then by definition corrupted.

Cc: stable@vger.kernel.org # v6.10+
Fixes: 1085b8276bb4 ("tpm: Add the rest of the session HMAC API")
Reviewed-by: Jonathan McDowell &lt;noodles@meta.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
</content>
</entry>
</feed>
