Cc Michael Roth, Alexey, Pankaj Gupta

On 16/11/2026 09:11, Aneesh Kumar K.V (Arm) wrote:

This series tightens the alignment requirements for buffers that are shared
between confidential-computing guests and the host, and adds a common
allocator for host-shared memory.

When a guest runs with private memory, buffers shared with the hypervisor
are not only accessed by the guest. They are also accessed by the host
kernel, and the host may manage the corresponding shared/private state at a
granularity larger than the guest page size.

Architectures such as Arm can detect incorrect accesses to Realm physical
address space PFNs through GPC faults. However, relying on that as the only
line of defence is fragile and can still lead to kernel crashes. The risk
is especially visible for shared buffers that are later mmapped into
userspace, such as guest_memfd or dma-buf backed allocations. Once
userspace can access the mapping, the kernel cannot guarantee that
applications will only touch the intended 4K region rather than the whole
host page mapped into their address space. Those userspace addresses may
also be passed back into the kernel and accessed through the linear map,
resulting in a GPC fault.

IIUC, AMD SEV-SNP also has a similar requirement for other reasons, to
align the "shared" allocations within a guest (2MB ?, as mentioned by
David Kaplan at the LPC).

Michael, Alexey,

Please could you share your thoughts on this series ?

Suzuki

Reply via email to