<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/virt/coco, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-05-13T18:28:25Z</updated>
<entry>
<title>Merge branch 'for-6.16/tsm-mr' into tsm-next</title>
<updated>2025-05-13T18:28:25Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2025-05-13T18:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d948b8804096d940022b1a3c483a5beb8b46574'/>
<id>urn:sha1:9d948b8804096d940022b1a3c483a5beb8b46574</id>
<content type='text'>
Pick up a couple fixes for issues noticed in linux-next (constification
of bin_attrs and missing 'static').
</content>
</entry>
<entry>
<title>tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase</title>
<updated>2025-05-13T18:02:33Z</updated>
<author>
<name>Cedric Xing</name>
<email>cedric.xing@intel.com</email>
</author>
<published>2025-05-13T16:41:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0ca403a9e381140cf626ca94519fb468370fc3e'/>
<id>urn:sha1:b0ca403a9e381140cf626ca94519fb468370fc3e</id>
<content type='text'>
Commit 9bec944506fa ("sysfs: constify attribute_group::bin_attrs") enforced
the ro-after-init principle by making elements of bin_attrs_new pointing to
const.

To align with this change, introduce a temporary variable `bap` within the
initialization loop. This improves code clarity by explicitly marking the
initialization scope and eliminates the need for type casts when assigning
to bin_attrs_new.

Signed-off-by: Cedric Xing &lt;cedric.xing@intel.com&gt;
Link: https://patch.msgid.link/20250513164154.10109-1-cedric.xing@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-6.16/tsm-mr' into tsm-next</title>
<updated>2025-05-13T05:12:44Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2025-05-13T05:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15ff5d0e90bb044b94d9a4ac57276829861a954d'/>
<id>urn:sha1:15ff5d0e90bb044b94d9a4ac57276829861a954d</id>
<content type='text'>
Merge measurement-register infrastructure for v6.16. Resolve conflicts
with the establishment of drivers/virt/coco/guest/ for cross-vendor
common TSM functionality.

Address a mis-merge with a fixup from Lukas:

Link: http://lore.kernel.org/20250509134031.70559-1-lukas.bulwahn@redhat.com
</content>
</entry>
<entry>
<title>virt: tdx-guest: Transition to scoped_cond_guard for mutex operations</title>
<updated>2025-05-09T02:17:43Z</updated>
<author>
<name>Cedric Xing</name>
<email>cedric.xing@intel.com</email>
</author>
<published>2025-05-06T22:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c3f259dfe03f5dcd898126602818a8fbe94d3c5'/>
<id>urn:sha1:7c3f259dfe03f5dcd898126602818a8fbe94d3c5</id>
<content type='text'>
Replace mutex_lock_interruptible()/mutex_unlock() with scoped_cond_guard to
enhance code readability and maintainability.

Signed-off-by: Cedric Xing &lt;cedric.xing@intel.com&gt;
Acked-by: Dionna Amalie Glaze &lt;dionnaglaze@google.com&gt;
Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-7-ac6ff5e9d58a@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>virt: tdx-guest: Refactor and streamline TDREPORT generation</title>
<updated>2025-05-09T02:17:43Z</updated>
<author>
<name>Cedric Xing</name>
<email>cedric.xing@intel.com</email>
</author>
<published>2025-05-06T22:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=850972bc61eba68552763c937892abb66a114da1'/>
<id>urn:sha1:850972bc61eba68552763c937892abb66a114da1</id>
<content type='text'>
Consolidate instances (code segments) of TDREPORT generation to improve
readability and maintainability, by refactoring each instance into invoking
a unified subroutine throughout the TDX guest driver. Implement proper
locking around TDG.MR.REPORT and TDG.MR.RTMR.EXTEND to avoid race inside
the TDX module. Preallocate TDREPORT buffer to reduce overhead in
subsequent TDREPORT generation.

Signed-off-by: Cedric Xing &lt;cedric.xing@intel.com&gt;
Acked-by: Dionna Amalie Glaze &lt;dionnaglaze@google.com&gt;
Link: https://patch.msgid.link/20250506-tdx-rtmr-v6-6-ac6ff5e9d58a@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>virt: tdx-guest: Expose TDX MRs as sysfs attributes</title>
<updated>2025-05-09T02:17:43Z</updated>
<author>
<name>Cedric Xing</name>
<email>cedric.xing@intel.com</email>
</author>
<published>2025-05-08T01:06:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d2a7bfad5b79b3a362fc7cfed8d7ddbd263a838'/>
<id>urn:sha1:4d2a7bfad5b79b3a362fc7cfed8d7ddbd263a838</id>
<content type='text'>
Expose the most commonly used TDX MRs (Measurement Registers) as sysfs
attributes. Use the ioctl() interface of /dev/tdx_guest to request a full
TDREPORT for access to other TD measurements.

Directory structure of TDX MRs inside a TDVM is as follows:

/sys/class/misc/tdx_guest
└── measurements
    ├── mrconfigid
    ├── mrowner
    ├── mrownerconfig
    ├── mrtd:sha384
    ├── rtmr0:sha384
    ├── rtmr1:sha384
    ├── rtmr2:sha384
    └── rtmr3:sha384

Read the file/attribute to retrieve the current value of an MR. Write to
the file/attribute (if writable) to extend the corresponding RTMR. Refer to
Documentation/ABI/testing/sysfs-devices-virtual-misc-tdx_guest for more
information.

Signed-off-by: Cedric Xing &lt;cedric.xing@intel.com&gt;
Acked-by: Dionna Amalie Glaze &lt;dionnaglaze@google.com&gt;
[djbw: fixup exit order]
Link: https://patch.msgid.link/20250508010606.4129953-1-dan.j.williams@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>tsm-mr: Add TVM Measurement Register support</title>
<updated>2025-05-09T02:17:33Z</updated>
<author>
<name>Cedric Xing</name>
<email>cedric.xing@intel.com</email>
</author>
<published>2025-05-09T02:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9e22b35d4598aefed642928ed2856a9900e5b37'/>
<id>urn:sha1:b9e22b35d4598aefed642928ed2856a9900e5b37</id>
<content type='text'>
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 &lt;cedric.xing@intel.com&gt;
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Dionna Amalie Glaze &lt;dionnaglaze@google.com&gt;
[djbw: fixup bin_attr const conflict]
Link: https://patch.msgid.link/20250509020739.882913-1-dan.j.williams@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-6.16/tsm' into tsm-next</title>
<updated>2025-05-09T01:12:06Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2025-05-09T01:12:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0372b3831785e15de605cd13d2ed78a79a9b435'/>
<id>urn:sha1:a0372b3831785e15de605cd13d2ed78a79a9b435</id>
<content type='text'>
Pick up the drivers/virt/coco/guest/ split in preparation for TSM host
drivers.
</content>
</entry>
<entry>
<title>configfs-tsm-report: Fix NULL dereference of tsm_ops</title>
<updated>2025-05-07T23:48:37Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2025-04-30T20:33:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fba4ceaa242d2bdf4c04b77bda41d32d02d3925d'/>
<id>urn:sha1:fba4ceaa242d2bdf4c04b77bda41d32d02d3925d</id>
<content type='text'>
Unlike sysfs, the lifetime of configfs objects is controlled by
userspace. There is no mechanism for the kernel to find and delete all
created config-items. Instead, the configfs-tsm-report mechanism has an
expectation that tsm_unregister() can happen at any time and cause
established config-item access to start failing.

That expectation is not fully satisfied. While tsm_report_read(),
tsm_report_{is,is_bin}_visible(), and tsm_report_make_item() safely fail
if tsm_ops have been unregistered, tsm_report_privlevel_store()
tsm_report_provider_show() fail to check for ops registration. Add the
missing checks for tsm_ops having been removed.

Now, in supporting the ability for tsm_unregister() to always succeed,
it leaves the problem of what to do with lingering config-items. The
expectation is that the admin that arranges for the -&gt;remove() (unbind)
of the ${tsm_arch}-guest driver is also responsible for deletion of all
open config-items. Until that deletion happens, -&gt;probe() (reload /
bind) of the ${tsm_arch}-guest driver fails.

This allows for emergency shutdown / revocation of attestation
interfaces, and requires coordinated restart.

Fixes: 70e6f7e2b985 ("configfs-tsm: Introduce a shared ABI for attestation reports")
Cc: stable@vger.kernel.org
Cc: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Cc: Steven Price &lt;steven.price@arm.com&gt;
Cc: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Cc: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Reported-by: Cedric Xing &lt;cedric.xing@intel.com&gt;
Reviewed-by: Kai Huang &lt;kai.huang@intel.com&gt;
Link: https://patch.msgid.link/20250430203331.1177062-1-dan.j.williams@intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>coco/guest: Move shared guest CC infrastructure to drivers/virt/coco/guest/</title>
<updated>2025-05-02T19:52:16Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2025-03-04T07:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7515f45c165269b72ee739e6fc26cc2ef928fc1b'/>
<id>urn:sha1:7515f45c165269b72ee739e6fc26cc2ef928fc1b</id>
<content type='text'>
In preparation for creating a new drivers/virt/coco/host/ directory to
house shared host driver infrastructure for confidential computing, move
configfs-tsm to a guest/ sub-directory. The tsm.ko module is renamed to
tsm_reports.ko. The old tsm.ko module was only ever demand loaded by
kernel internal dependencies, so it should not affect existing userspace
module install scripts.

The new drivers/virt/coco/guest/ is also a preparatory landing spot for
new / optional TSM Report mechanics like a TCB stability enumeration /
watchdog mechanism. To be added later.

Cc: Wu Hao &lt;hao.wu@intel.com&gt;
Cc: Yilun Xu &lt;yilun.xu@intel.com&gt;
Cc: Samuel Ortiz &lt;sameo@rivosinc.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Reviewed-by: Alexey Kardashevskiy &lt;aik@amd.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Link: https://patch.msgid.link/174107246641.1288555.208426916259466774.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
