lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 13 Feb 2021 08:10:40 -0800
From:   Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To:     zohar@...ux.ibm.com, bauerman@...ux.ibm.com, robh@...nel.org,
        takahiro.akashi@...aro.org, gregkh@...uxfoundation.org,
        will@...nel.org, joe@...ches.com, catalin.marinas@....com,
        mpe@...erman.id.au
Cc:     james.morse@....com, sashal@...nel.org, benh@...nel.crashing.org,
        paulus@...ba.org, frowand.list@...il.com,
        vincenzo.frascino@....com, mark.rutland@....com,
        dmitry.kasatkin@...il.com, jmorris@...ei.org, serge@...lyn.com,
        pasha.tatashin@...een.com, allison@...utok.net,
        masahiroy@...nel.org, mbrugger@...e.com, hsinyi@...omium.org,
        tao.li@...o.com, christophe.leroy@....fr,
        prsriva@...ux.microsoft.com, balajib@...ux.microsoft.com,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH v18 02/11] arm64: Rename kexec elf_headers_mem to elf_load_addr

The architecture specific field, elf_headers_mem in struct kimage_arch,
that holds the address of the buffer in memory for ELF core header for
arm64 has a different name than the one used for powerpc.  This makes
it hard to have a common code for setting up the device tree for
kexec system call.

Rename elf_headers_mem to elf_load_addr to align with powerpc name so
common code can use it.

Signed-off-by: Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
Suggested-by: Thiago Jung Bauermann <bauerman@...ux.ibm.com>
---
 arch/arm64/include/asm/kexec.h         | 2 +-
 arch/arm64/kernel/machine_kexec_file.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h
index d24b527e8c00..e6a99dfdffb8 100644
--- a/arch/arm64/include/asm/kexec.h
+++ b/arch/arm64/include/asm/kexec.h
@@ -98,7 +98,7 @@ struct kimage_arch {
 	unsigned long dtb_mem;
 	/* Core ELF header buffer */
 	void *elf_headers;
-	unsigned long elf_headers_mem;
+	unsigned long elf_load_addr;
 	unsigned long elf_headers_sz;
 };
 
diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c
index 03210f644790..d98bacec9426 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -73,7 +73,7 @@ static int setup_dtb(struct kimage *image,
 		/* add linux,elfcorehdr */
 		ret = fdt_appendprop_addrrange(dtb, 0, off,
 				FDT_PROP_KEXEC_ELFHDR,
-				image->arch.elf_headers_mem,
+				image->arch.elf_load_addr,
 				image->arch.elf_headers_sz);
 		if (ret)
 			return (ret == -FDT_ERR_NOSPACE ? -ENOMEM : -EINVAL);
@@ -283,11 +283,11 @@ int load_other_segments(struct kimage *image,
 			goto out_err;
 		}
 		image->arch.elf_headers = headers;
-		image->arch.elf_headers_mem = kbuf.mem;
+		image->arch.elf_load_addr = kbuf.mem;
 		image->arch.elf_headers_sz = headers_sz;
 
 		pr_debug("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
-			 image->arch.elf_headers_mem, kbuf.bufsz, kbuf.memsz);
+			 image->arch.elf_load_addr, kbuf.bufsz, kbuf.memsz);
 	}
 
 	/* load initrd */
-- 
2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ