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: <20200903153545.zy24o7pqfohgoxge@treble>
Date:   Thu, 3 Sep 2020 10:35:45 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Kristen Carlson Accardi <kristen@...ux.intel.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org, Miroslav Benes <mbenes@...e.cz>
Subject: Re: [PATCH] objtool: support symtab_shndx during dump

On Wed, Aug 12, 2020 at 10:57:11AM -0700, Kristen Carlson Accardi wrote:
> When getting the symbol index number, make sure to use the
> extended symbol table information in order to support symbol
> index's greater than 64K.

"indexes"

>  			if (GELF_ST_TYPE(sym.st_info) == STT_SECTION) {
> -				scn = elf_getscn(elf, sym.st_shndx);
> +				if ((sym.st_shndx > SHN_UNDEF &&
> +				     sym.st_shndx < SHN_LORESERVE) ||
> +				    (xsymtab && sym.st_shndx == SHN_XINDEX)) {
> +					if (sym.st_shndx != SHN_XINDEX)
> +						shndx = sym.st_shndx;

The sym.st_shndx checks are redundant, if 'sym.st_shndx == SHN_XINDEX'
then 'sym.st_shndx != SHN_XINDEX' can't be true.

Actually I think this can be even further simplified to something like

				if (!shndx)
					shndx = sym.st_shndx;

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ