Re: [PATCH] x86/sev: Fix kmemleak false positive for the RMP segment descriptors

From: Breno Leitao

Date: Tue Nov 03 2026 - 04:35:09 EST


On Mon, Nov 02, 2026 at 02:54:06PM -0800, Dave Hansen wrote:
> >> Why don't we just kmalloc() the thing?
> >
> > That would do the work as well, if this is an option.
>
> I don't see a reason it needs to be allocated directly by the page
> allocator. My friendly LLM agrees with me. kmalloc(PAGE_SIZE) aligns to
> page boundaries and has for years.
>
> BTW, there's almost no reason to use the page allocator directly these days.

Ack. Let me respin and use kmalloc, and use kmalloc(), simplifying the
fix.

Thanks for the review and suggestion,
--breno