x86/mm: Free sme_early_buffer after init
authorDavid Rientjes <rientjes@google.com>
Wed, 10 Jul 2019 20:19:35 +0000 (13:19 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 16 Jul 2019 21:13:48 +0000 (23:13 +0200)
commitffdb07f31252625b7bcbf1f424d7beccff02ba97
treeca21912b745930c66e86cb14826cd5e3476e9597
parente74bd96989dd42a51a73eddb4a5510a6f5e42ac3
x86/mm: Free sme_early_buffer after init

The contents of sme_early_buffer should be cleared after
__sme_early_enc_dec() because it is used to move encrypted and decrypted
data, but since __sme_early_enc_dec() is __init this buffer simply can be
freed after init.

This saves a page that is otherwise unreferenced after init.

Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907101318170.197432@chino.kir.corp.google.com
arch/x86/mm/mem_encrypt.c