Re: [PATCH v6 1/5] x86/mm: Restructure sme_encrypt_kernel()

From: Borislav Petkov
Date: Mon Sep 10 2018 - 07:32:54 EST


On Fri, Sep 07, 2018 at 12:57:26PM -0500, Brijesh Singh wrote:
> Re-arrange the sme_encrypt_kernel() by moving the workarea map/unmap
> logic in a separate static function. There are no logical changes in this
> patch. The restructuring will allow us to expand the sme_encrypt_kernel
> in future.

...

> - /* Perform the encryption */
> - sme_encrypt_execute(kernel_start, kernel_start + decrypted_base,
> - kernel_len, workarea_start, (unsigned long)ppd.pgd);
> + wa->kernel_start = kernel_start;
> + wa->kernel_end = kernel_end;
> + wa->kernel_len = kernel_len;
>
> - if (initrd_len)
> - sme_encrypt_execute(initrd_start, initrd_start + decrypted_base,
> - initrd_len, workarea_start,
> - (unsigned long)ppd.pgd);
> + wa->initrd_start = initrd_start;
> + wa->initrd_end = initrd_end;
> + wa->initrd_len = initrd_len;
> +
> + wa->workarea_start = workarea_start;
> + wa->workarea_end = workarea_end;
> + wa->workarea_len = workarea_len;
> +
> + wa->decrypted_base = decrypted_base;
> +}
>
> +static void __init teardown_workarea_map(struct sme_workarea_data *wa,
> + struct sme_populate_pgd_data *ppd)

ERROR: code indent should use tabs where possible
#214: FILE: arch/x86/mm/mem_encrypt_identity.c:469:
+^I^I^I^I struct sme_populate_pgd_data *ppd)$

I think I've already said that to you but here it is again:

Please integrate scripts/checkpatch.pl into your patch creation
workflow. Some of the warnings/errors *actually* make sense.

Otherwise:

Reviewed-by: Borislav Petkov <bp@xxxxxxx>

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--