From: Jiri Pirko <jiri@resnulli.us>
To: Ying Xiao <eagleshaw@google.com>
Cc: "Sumit Semwal" <sumit.semwal@linaro.org>,
"T . J . Mercier" <tjmercier@google.com>,
"Jiri Pirko" <jiri@nvidia.com>,
"Jason Gunthorpe" <jgg@nvidia.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
"Brian Starkey" <Brian.Starkey@arm.com>,
"John Stultz" <jstultz@google.com>,
"Christian König" <christian.koenig@amd.com>,
"Philipp Stanner" <phasta@kernel.org>,
"Jacob Moroni" <jmoroni@google.com>,
"Xuehao Hu" <xuehaohu@google.com>,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-buf: heaps: system: zero pages after set_memory_decrypted()
Date: Wed, 18 Nov 2026 14:15:21 +0100 [thread overview]
Message-ID: <av2jgIDyawKNS1BA@FV6GYCPJ69> (raw)
In-Reply-To: <20261117155431.1654298-1-eagleshaw@google.com>
Tue, Nov 17, 2026 at 04:54:31PM +0100, eagleshaw@google.com wrote:
>system_heap_allocate() allocates pages via order_flags[] with __GFP_ZERO
>while the direct map still has the memory encryption bit set. For the
>system_cc_shared heap, set_memory_decrypted() subsequently clears the
>encryption bit without re-zeroing, leaving ciphertext in DRAM on
>confidential computing (CoCo) guests instead of plaintext zeros.
>
>Skip __GFP_ZERO during alloc_pages() for cc_shared allocations, and zero
>the pages once in system_heap_set_page_decrypted() after
>set_memory_decrypted() succeeds.
>
>Fixes: 78b30c50a7ac ("dma-buf: heaps: system: add system_cc_shared heap for explicitly shared memory")
>Reviewed-by: Jacob Moroni <jmoroni@google.com>
>Signed-off-by: Ying Xiao <eagleshaw@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
next prev parent reply other threads:[~2026-11-18 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261117155436eucas1p2fa7d030f5557d1c88d943226d65f69ca@eucas1p2.samsung.com>
2026-11-17 15:54 ` [PATCH] dma-buf: heaps: system: zero pages after set_memory_decrypted() Ying Xiao
2026-11-17 16:27 ` sashiko-bot
2026-11-18 8:05 ` Marek Szyprowski
2026-11-18 13:15 ` Jiri Pirko [this message]
2026-11-18 13:44 ` Jason Gunthorpe
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=av2jgIDyawKNS1BA@FV6GYCPJ69 \
--to=jiri@resnulli.us \
--cc=Brian.Starkey@arm.com \
--cc=benjamin.gaignard@collabora.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eagleshaw@google.com \
--cc=jgg@nvidia.com \
--cc=jiri@nvidia.com \
--cc=jmoroni@google.com \
--cc=jstultz@google.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=phasta@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tjmercier@google.com \
--cc=xuehaohu@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.