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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220723095305.214720457@linuxfoundation.org>
Date:   Sat, 23 Jul 2022 11:55:58 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Vasily Gorbik <gor@...ux.ibm.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH 5.10 146/148] objtool: Fix elf_create_undef_symbol() endianness

From: Vasily Gorbik <gor@...ux.ibm.com>

commit 46c7405df7de8deb97229eacebcee96d61415f3f upstream.

Currently x86 cross-compilation fails on big endian system with:

  x86_64-cross-ld: init/main.o: invalid string offset 488112128 >= 6229 for section `.strtab'

Mark new ELF data in elf_create_undef_symbol() as symbol, so that libelf
does endianness handling correctly.

Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
Signed-off-by: Vasily Gorbik <gor@...ux.ibm.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: https://lore.kernel.org/r/patch-1.thread-6c9df9.git-d39264656387.your-ad-here.call-01620841104-ext-2554@work.hours
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 tools/objtool/elf.c |    1 +
 1 file changed, 1 insertion(+)

--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -961,6 +961,7 @@ static int elf_add_string(struct elf *el
 	data->d_buf = str;
 	data->d_size = strlen(str) + 1;
 	data->d_align = 1;
+	data->d_type = ELF_T_SYM;
 
 	len = strtab->len;
 	strtab->len += data->d_size;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ