[SRU][focal-gcp][PATCH v2 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 18:26:52 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/mem_encrypt.c | 2 +-
arch/x86/mm/pageattr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index aa912f6e525b..2bab25cdd026 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -391,7 +391,7 @@ static int __init early_set_memory_enc_dec(unsigned long vaddr,
ret = 0;
- notify_range_enc_status_changed(start, PAGE_ALIGN(size) >> PAGE_SHIFT, enc);
+ notify_range_enc_status_changed(start, size, enc);
out:
__flush_tlb_all();
return ret;
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 2468ef8c983e..5631fe734d8a 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1984,7 +1984,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