Files
kernel_arpi/include/linux
Lakshmi Ramasubramanian c365d333e9 ima: Free IMA measurement buffer after kexec syscall
[ Upstream commit f31e3386a4 ]

IMA allocates kernel virtual memory to carry forward the measurement
list, from the current kernel to the next kernel on kexec system call,
in ima_add_kexec_buffer() function.  This buffer is not freed before
completing the kexec system call resulting in memory leak.

Add ima_buffer field in "struct kimage" to store the virtual address
of the buffer allocated for the IMA measurement list.
Free the memory allocated for the IMA measurement list in
kimage_file_post_load_cleanup() function.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Fixes: 7b8589cc29 ("ima: on soft reboot, save the measurement list")
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:37:50 +01:00
..
2020-10-28 13:18:56 +01:00
2020-10-16 17:21:51 +02:00
2020-12-11 14:02:14 -08:00
2020-12-26 16:02:43 +01:00
2020-11-19 22:38:29 -05:00
2020-10-13 18:38:32 -07:00
2021-02-07 15:37:17 +01:00
2020-10-07 14:28:39 -04:00
2020-10-28 11:41:15 -06:00
2020-10-18 09:27:10 -07:00
2020-12-30 11:53:55 +01:00
2020-11-06 10:05:18 -08:00
2020-10-05 13:21:49 +02:00