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]
Date:   Tue, 24 Mar 2020 16:10:06 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     tglx@...utronix.de, linux-kernel@...r.kernel.org, x86@...nel.org,
        mhiramat@...nel.org, mbenes@...e.cz, brgerst@...il.com
Subject: Re: [PATCH v3 17/26] objtool: Re-arrange validate_functions()

On Tue, Mar 24, 2020 at 04:31:30PM +0100, Peter Zijlstra wrote:
> In preparation to adding a vmlinux.o specific pass, rearrange some
> code. No functional changes intended.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  tools/objtool/check.c |   60 ++++++++++++++++++++++++++++----------------------
>  1 file changed, 34 insertions(+), 26 deletions(-)
> 
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -2413,9 +2413,8 @@ static bool ignore_unreachable_insn(stru
>  	return false;
>  }
>  
> -static int validate_functions(struct objtool_file *file)
> +static int validate_section(struct objtool_file *file, struct section *sec)
>  {
> -	struct section *sec;
>  	struct symbol *func;
>  	struct instruction *insn;
>  	struct insn_state state;
> @@ -2428,35 +2427,44 @@ static int validate_functions(struct obj
>  	       CFI_NUM_REGS * sizeof(struct cfi_reg));
>  	state.stack_size = initial_func_cfi.cfa.offset;
>  
> -	for_each_sec(file, sec) {
> -		list_for_each_entry(func, &sec->symbol_list, list) {
> -			if (func->type != STT_FUNC)
> -				continue;
> -
> -			if (!func->len) {
> -				WARN("%s() is missing an ELF size annotation",
> -				     func->name);
> -				warnings++;
> -			}
> -
> -			if (func->pfunc != func || func->alias != func)
> -				continue;
> -
> -			insn = find_insn(file, sec, func->offset);
> -			if (!insn || insn->ignore || insn->visited)
> -				continue;
> -
> -			state.uaccess = func->uaccess_safe;
> -
> -			ret = validate_branch(file, func, insn, state);
> -			if (ret && backtrace)
> -				BT_FUNC("<=== (func)", insn);
> -			warnings += ret;
> +	list_for_each_entry(func, &sec->symbol_list, list) {
> +		if (func->type != STT_FUNC)
> +			continue;
> +
> +		if (!func->len) {
> +			WARN("%s() is missing an ELF size annotation",
> +					func->name);

wonky indentation

Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ