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: <20230413080822.GH4253@hirez.programming.kicks-ass.net>
Date:   Thu, 13 Apr 2023 10:08:22 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...nel.org>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Miroslav Benes <mbenes@...e.cz>
Subject: Re: [PATCH v2 5/9] objtool: Add verbose option for disassembling
 affected functions

On Wed, Apr 12, 2023 at 12:03:20PM -0700, Josh Poimboeuf wrote:
> +	objdump_str = "%sobjdump -wdr %s | gawk -M -v _funcs='%s' '"
> +			"BEGIN { split(_funcs, funcs); }"
> +			"/^$/ { func_match = 0; }"
> +			"/<.*>:/ { "
> +				"f = gensub(/.*<(.*)>:/, \"\\\\1\", 1);"
> +				"for (i in funcs) {"
> +					"if (funcs[i] == f) {"
> +						"func_match = 1;"
> +						"base = strtonum(\"0x\" $1);"
> +						"break;"
> +					"}"
> +				"}"
> +			"}"
> +			"{"
> +				"if (func_match) {"
> +					"addr = strtonum(\"0x\" $1);"
> +					"printf(\"%%04x \", addr - base);"
> +					"print;"
> +				"}"
> +			"}' 1>&2";

Do we want to have scripts/objdump-func.awk and use that to avoid the
duplication and eventual divergence of these awk thingies?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ