mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fuse: mark DAX VMA page protections as decrypted
@ 2026-07-27 21:07 Punit Salian
  2026-08-18 11:38 ` Miklos Szeredi
  0 siblings, 1 reply; 8+ messages in thread
From: Punit Salian @ 2026-07-27 21:07 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: linux-fsdevel, linux-kernel, Stefan Hajnoczi, Vivek Goyal, Punit Salian

In confidential computing guest environments (such as AMD SEV-SNP or
Intel TDX), direct memory access (DAX) mappings between the guest kernel
and host-backed FUSE/virtiofs shared memory regions must be accessed
using shared (decrypted) page protections.

Modify fuse_dax_mmap() to apply pgprot_decrypted() to vma->vm_page_prot
when establishing FUSE DAX memory mappings. This ensures guest page
table entries for shared DAX buffers are explicitly marked as decrypted,
preventing memory encryption faults when accessing host-shared DAX memory.

Signed-off-by: Punit Salian <psalian@google.com>
---
 fs/fuse/dax.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index a15c464c8d19..00e316a7f805 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -826,6 +826,7 @@ int fuse_dax_mmap(struct file *file, struct vm_area_struct *vma)
 	file_accessed(file);
 	vma->vm_ops = &fuse_dax_vm_ops;
 	vm_flags_set(vma, VM_MIXEDMAP | VM_HUGEPAGE);
+	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
 
 	return 0;
 }
-- 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-08-20  8:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-27 21:07 [PATCH] fuse: mark DAX VMA page protections as decrypted Punit Salian
2026-08-18 11:38 ` Miklos Szeredi
2026-08-18 13:42   ` Tom Lendacky
2026-08-18 16:00     ` Gupta, Pankaj
2026-08-19 15:03       ` Gupta, Pankaj
2026-08-19 16:48         ` Punit Salian
2026-08-19 18:16         ` Michael Roth
2026-08-20  8:21           ` Gupta, Pankaj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®