Tue, Nov 17, 2026 at 04:54:31PM +0100, [email protected] 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 <[email protected]> >Signed-off-by: Ying Xiao <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
