Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: Punit Salian <psalian@google.com>
To: miklos@szeredi.hu
Cc: pankaj.gupta@amd.com, michael.roth@amd.com,
	thomas.lendacky@amd.com,  stefanha@redhat.com, vgoyal@redhat.com,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-coco@lists.linux.dev, x86@kernel.org,
	 Punit Salian <psalian@google.com>
Subject: [PATCH v2] fuse: mark DAX VMA page protections as decrypted
Date: Tue, 25 Aug 2026 17:54:33 +0000	[thread overview]
Message-ID: <20260825175433.2588528-1-psalian@google.com> (raw)
In-Reply-To: <20260727210718.125872-1-psalian@google.com>

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>
Acked-by: Pankaj Gupta <pankaj.gupta@amd.com>
---
v1 -> v2:
- Added Acked-by tag from Pankaj Gupta.
---
 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;
 }
-- 

  parent reply	other threads:[~2026-08-25 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260727210718.125872-1-psalian@google.com>
2026-08-18 11:38 ` [PATCH] fuse: mark DAX VMA page protections as decrypted 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
2026-08-24 17:58             ` Punit Salian
2026-08-25 19:25               ` Gupta, Pankaj
2026-08-25 21:14                 ` Punit Salian
2026-08-25 17:54 ` Punit Salian [this message]
2026-08-26 10:51   ` [PATCH v2] " Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260825175433.2588528-1-psalian@google.com \
    --to=psalian@google.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=miklos@szeredi.hu \
    --cc=pankaj.gupta@amd.com \
    --cc=stefanha@redhat.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox