Loading
x86/sev: Don't emit BSS_DECRYPTED section unless it is in use
The BSS_DECRYPTED section that gets emitted into .bss will be empty if CONFIG_AMD_MEM_ENCRYPT is not defined. However, due to the fact that it is injected into .bss rather than emitted as a separate section, the 2 MiB alignment that it specifies is still taken into account unconditionally, pushing .bss out to the next 2 MiB boundary, leaving a gap that is never freed. So only emit a non-empty BSS_DECRYPTED section if it is going to be used. In that case, it would still be nice to free the padding, but that is left for later. Signed-off-by:Ard Biesheuvel <ardb@kernel.org> Signed-off-by:
Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260108092526.28586-23-ardb@kernel.org