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: <0556953a-3e9f-ff22-3514-b40ca7b5de1b@oracle.com>
Date:   Wed, 27 Jun 2018 10:35:03 +0100
From:   Allan Xavier <allan.x.xavier@...cle.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] objtool: Fix GCC 8 cold function processing without
 -freorder-functions

Looks good overall, just one comment.

On 26/06/18 19:44, Josh Poimboeuf wrote:
> +			/*
> +			 * Unfortunately, -fnoreorder-functions puts the child
> +			 * inside the parent.  Remove the overlap so we can
> +			 * have sane assumptions.
> +			 */
> +			if (sym->sec == pfunc->sec &&
> +			    sym->offset >= pfunc->offset &&
> +			    sym->offset < pfunc->offset + pfunc->len &&
> +			    sym->offset + sym->len == pfunc->offset + pfunc->len) {
> +				pfunc->len -= sym->len;

It's a bit of a nit but I'd say you could drop the third condition of the if
since sym->offset would have to be less than pfunc->offset + pfunc->len for the
fourth condition to ever be true. The only situation it would have caught is
where sym->len == 0, which I think (hope?) is reasonable to assume wont happen
and wouldn't have had an effect on pfunc->len anyway.

if (sym->sec == pfunc->sec &&
    sym->offset >= pfunc->offset &&
    sym->offset + sym->len == pfunc->offset + pfunc->len)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ