Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79078?usp=email )
(
8 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: libpayload: Move ttb_buffer to a standalone section ......................................................................
libpayload: Move ttb_buffer to a standalone section
When cleaning the sensitive data in the memory, we will want to prevent zero out the content of tbb_buffer. Move the ttb_buffer to a standalone section will simplify the problem.
BUG=b:248610274 TEST=emerge-cherry libpayload BRANCH=none
Change-Id: I610276cbe30552263d791860c15e5ad9a201c744 Signed-off-by: Yi Chou yich@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/79078 Reviewed-by: Julius Werner jwerner@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M payloads/libpayload/arch/arm64/libpayload.ldscript M payloads/libpayload/arch/arm64/mmu.c 2 files changed, 4 insertions(+), 1 deletion(-)
Approvals: Julius Werner: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/payloads/libpayload/arch/arm64/libpayload.ldscript b/payloads/libpayload/arch/arm64/libpayload.ldscript index f9fb771..e225aa8 100644 --- a/payloads/libpayload/arch/arm64/libpayload.ldscript +++ b/payloads/libpayload/arch/arm64/libpayload.ldscript @@ -58,6 +58,8 @@ _edata = .;
.bss : { + *(.ttb_buffer) + *(.sbss) *(.sbss.*) *(.bss) diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c index 4c8f8c1..bb79544 100644 --- a/payloads/libpayload/arch/arm64/mmu.c +++ b/payloads/libpayload/arch/arm64/mmu.c @@ -41,7 +41,8 @@ static uint64_t *xlat_addr;
static int free_idx; -static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __attribute__((aligned(GRANULE_SIZE))); +static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __aligned(GRANULE_SIZE) + __attribute__((__section__(".ttb_buffer")));
static const char * const tag_to_string[] = { [TYPE_NORMAL_MEM] = "normal",