Re: [PATCH v3 1/8] x86/virt/tdx: Add interface to generate a Quote

From: Edgecombe, Rick P

Date: Fri Dec 04 2026 - 17:03:02 EST


On Fri, 2026-12-04 at 11:15 -0800, Dave Hansen wrote:
> On 12/4/26 10:18, Peter Fang wrote:
> > + /* Populate the linked list. Allocate new nodes as needed. */
> > + for (int i = 0, pages = 0; pages < num_quote_pages;
> > +      i = (i + 1) % HPAS_PER_NODE) {
> > + if (i == HPAS_PER_NODE - 1) {
> > + u64 *new_node = kmalloc(PAGE_SIZE, GFP_KERNEL);
>
> Did a human write this code?
>
> Do the humans on cc like this code?

Oh this is horrible. Was the intention to address this from Nikolay?
https://lore.kernel.org/lkml/d13c4073-b248-40ac-aa28-1c0dfc6b9043@xxxxxxxx/#t

I don't think this is what he meant, but actually I'm not sure what he did.