Re: [PATCH v2 2/2] x86/mm: Create an SME workarea in the kernel for early encryption

From: Borislav Petkov
Date: Tue Jun 18 2019 - 06:17:02 EST

On Tue, Jun 18, 2019 at 01:49:13AM +0000, Lendacky, Thomas wrote:
> Whoever uses it in the future could rename it if desired. But I can do
> that now. Is there a preferred name? I can leave it as .early_scratch
> or .early_workarea.

So looking at readelf output of vmlinux, we already have .init.*
sections for stuff which gets freed after booting but I'm guessing we
can't have the SME scratch area in the middle because you need to be
able to say which range gets encrypted without encrypting the scratch
area itself...

But you could call it .init.scratch or so, so that it fits with the
already existing naming nomenclature for ranges which get freed after

> I think it's easier to show the alignment requirements that SME has for
> this section by having it be its own section.

Not only that, from

" The special output section name '/DISCARD/' may be used to discard
input sections. Any input sections which are assigned to an output
section named '/DISCARD/' are not included in the output file."

but you want that section present in the output file.



Good mailing practices for 400: avoid top-posting and trim the reply.