Re: [PATCH v6 3/5] x86/mm: add .data..decrypted section to hold shared variables

From: Brijesh Singh
Date: Mon Sep 10 2018 - 08:33:22 EST




On 9/10/18 6:54 AM, Borislav Petkov wrote:
...

>> @@ -487,28 +510,69 @@ static void __init teardown_workarea_map(struct sme_workarea_data *wa,
>> native_write_cr3(__native_read_cr3());
>> }
>>
>> +static void __init decrypt_shared_data(struct sme_workarea_data *wa,
>> + struct sme_populate_pgd_data *ppd)
>> +{
>> + unsigned long decrypted_start, decrypted_end, decrypted_len;
>> +
>> + /* Physical addresses of decrypted data section */
>> + decrypted_start = __pa_symbol(__start_data_decrypted);
>> + decrypted_end = ALIGN(__pa_symbol(__end_data_decrypted), PMD_PAGE_SIZE);
> Why?
>
> You have:
>
> + . = ALIGN(PMD_SIZE); \
> + __end_data_decrypted = .; \
>
> It is already aligned by definition?!?
>

Right, there is no need to use ALIGN. I will remove it.

-Brijesh