[SRU][jammy/focal -gcp][PATCH 1/1] UBUNTU: SAUCE: (no-up) x86/mm: Fixing notify_range_enc_status_changed incorrect argument

John Cabaj john.cabaj at canonical.com
Wed Oct 25 02:17:22 UTC 2023


BugLink: https://bugs.launchpad.net/bugs/2040337

ac3f9c9f1b37 introduced change to notify_range_enc_status_changed()
to accept page size instead of number of pages, but function was not updated.

Signed-off-by: John Cabaj <john.cabaj at canonical.com>
---
 arch/x86/mm/pat/set_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index d72661f7c8ff..a749fde9a772 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -2040,7 +2040,7 @@ static int __set_memory_enc_dec(unsigned long addr, int numpages, bool enc)
 	 * Notify hypervisor that a given memory range is mapped encrypted
 	 * or decrypted.
 	 */
-	notify_range_enc_status_changed(addr, numpages, enc);
+	notify_range_enc_status_changed(addr, numpages << PAGE_SHIFT, enc);
 
 	return ret;
 }
-- 
2.34.1




More information about the kernel-team mailing list