]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'x86_tdx_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2026 21:42:55 +0000 (14:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2026 21:42:55 +0000 (14:42 -0700)
Pull x86 TDX updates from Dave Hansen:
 "The only real thing of note here is printing the TDX module version.

  This is a little silly on its own, but the upcoming TDX module update
  code needs the same TDX module call. This shrinks that set a wee bit.

  There's also few minor macro cleanups and a tweak to the GetQuote ABI
  to make it easier for userspace to detect zero-length (failed) quotes"

* tag 'x86_tdx_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  virt: tdx-guest: Return error for GetQuote failures
  KVM/TDX: Rename KVM_SUPPORTED_TD_ATTRS to KVM_SUPPORTED_TDX_TD_ATTRS
  x86/tdx: Rename TDX_ATTR_* to TDX_TD_ATTR_*
  KVM/TDX: Remove redundant definitions of TDX_TD_ATTR_*
  x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
  x86/virt/tdx: Print TDX module version during init
  x86/virt/tdx: Retrieve TDX module version

1  2 
drivers/virt/coco/tdx-guest/tdx-guest.c

index 7cee97559ba292134536fed508a752d406442ad8,23ef3991c4d5ae546122b46074697ae1abef7f05..a9ecc46df187da8db2451c8acc681352eb4ad29d
@@@ -309,12 -306,12 +309,17 @@@ static int tdx_report_new_locked(struc
                return ret;
        }
  
 -      buf = kvmemdup(quote_buf->data, quote_buf->out_len, GFP_KERNEL);
+       if (quote_buf->status != GET_QUOTE_SUCCESS) {
+               pr_debug("GetQuote request failed, status:%llx\n", quote_buf->status);
+               return -EIO;
+       }
 +      out_len = READ_ONCE(quote_buf->out_len);
 +
 +      if (out_len > TDX_QUOTE_MAX_LEN)
 +              return -EFBIG;
 +
 +      buf = kvmemdup(quote_buf->data, out_len, GFP_KERNEL);
        if (!buf)
                return -ENOMEM;