Skip to contentSkip to conversation

s390/ipl: fix virtual vs physical address confusion

PATCH Superseded Alexander Gordeev 1 participant 1 message Aug 9, 2023

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Alexander Gordeev

author maintainer
#0 lore raw

PATCH 1/1 s390/ipl: fix virtual vs physical address confusion

Fix virtual vs physical address confusion (which currently are the same).

---
 arch/s390/kernel/machine_kexec_file.c             | 4 ++--
 arch/s390/kernel/setup.c                          | 2 +-
 security/integrity/platform_certs/load_ipl_s390.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/s390/kernel/machine_kexec_file.c +2 -2
index 2df94d32140c..8d207b82d9fe 100644
@@ -188,7 +188,7 @@ static int kexec_file_add_ipl_report(struct kimage *image,
 	data->memsz = ALIGN(data->memsz, PAGE_SIZE);
 	buf.mem = data->memsz;
 
-	ptr = (void *)ipl_cert_list_addr;
+	ptr = __va(ipl_cert_list_addr);
 	end = ptr + ipl_cert_list_size;
 	ncerts = 0;
 	while (ptr < end) {
@@ -200,7 +200,7 @@ static int kexec_file_add_ipl_report(struct kimage *image,
 
 	addr = data->memsz + data->report->size;
 	addr += ncerts * sizeof(struct ipl_rb_certificate_entry);
-	ptr = (void *)ipl_cert_list_addr;
+	ptr = __va(ipl_cert_list_addr);
 	while (ptr < end) {
 		len = *(unsigned int *)ptr;
 		ptr += sizeof(len);
arch/s390/kernel/setup.c +1 -1
index 393dd8385506..c744104e4a9c 100644
@@ -875,7 +875,7 @@ static void __init log_component_list(void)
 		pr_info("Linux is running with Secure-IPL enabled\n");
 	else
 		pr_info("Linux is running with Secure-IPL disabled\n");
-	ptr = (void *) early_ipl_comp_list_addr;
+	ptr = __va(early_ipl_comp_list_addr);
 	end = (void *) ptr + early_ipl_comp_list_size;
 	pr_info("The IPL report contains the following components:\n");
 	while (ptr < end) {
security/integrity/platform_certs/load_ipl_s390.c +1 -1
index e769dcb7ea94..6723ba9f9ca4 100644
@@ -23,7 +23,7 @@ static int __init load_ipl_certs(void)
 	if (!ipl_cert_list_addr)
 		return 0;
 	/* Copy the certificates to the system keyring */
-	ptr = (void *) ipl_cert_list_addr;
+	ptr = __va(ipl_cert_list_addr);
 	end = ptr + ipl_cert_list_size;
 	while ((void *) ptr < end) {
 		len = *(unsigned int *) ptr;
Signature · 1 line
2.39.2