[PATCH 5/5] x86_64: allow ELFCLASS32 for x32 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
 kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
index db85b44..0d22f3b 100644
--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
@@ -8,7 +8,8 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr)
 	if (ehdr->ei_data != ELFDATA2LSB) {
 		return 0;
 	}
-	if (ehdr->ei_class != ELFCLASS64) {
+	if (ehdr->ei_class != ELFCLASS64 &&
+	    ehdr->ei_class != ELFCLASS32) {  /* x32 */
 		return 0;
 	}
 	if (ehdr->e_machine != EM_X86_64) {
-- 
2.28.0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux