> Decrypted per-CPU data is gated by AMD_MEM_ENCRYPT. With > INTEL_TDX_GUEST=y and AMD_MEM_ENCRYPT=n it falls back to ordinary > per-CPU storage, so converting a variable to shared memory can expose > unrelated data on the same page. > > Gate the declarations and linker section on X86_MEM_ENCRYPT, which both > AMD_MEM_ENCRYPT and INTEL_TDX_GUEST select. Existing AMD configurations > are unchanged. > > Keep the decrypted subsection page-aligned at both ends. The per-CPU > template and each allocated per-CPU unit are also page-aligned, so page > conversion cannot expose ordinary per-CPU data. TDX-only configurations > may need additional space for this alignment and isolation. > > Signed-off-by: Zack Rusin <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
