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: <7oixcq3uauympfawfkbilfgb65jwgsm3ud4luibx4rawl7kwcg@plf6oq62fmpm>
Date: Tue, 23 Sep 2025 15:25:28 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Alexandre Chartre <alexandre.chartre@...cle.com>
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org, peterz@...radead.org
Subject: Re: [RFC PATCH v2 11/17] objtool: Add option to trace function
 validation

On Thu, Jun 19, 2025 at 04:56:53PM +0200, Alexandre Chartre wrote:
> @@ -3796,6 +3843,8 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
>  			if (file->ignore_unreachables)
>  				return 0;
>  
> +			TRACE_INSN(insn, "falls through to next function");
> +
>  			WARN("%s() falls through to next function %s()",
>  			     func->name, insn_func(insn)->name);

Why duplicate the warning?

>  			func->warned = 1;
> @@ -3805,10 +3854,15 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
>  
>  		ret = validate_insn(file, func, insn, &state, prev_insn, next_insn,
>  				    &dead_end);
> -		if (dead_end)
> -			break;
>  
> -		if (!next_insn) {
> +		if (!insn->trace) {
> +			if (ret)
> +				TRACE_INSN(insn, "warning (%d)", ret);
> +			else
> +				TRACE_INSN(insn, NULL);
> +		}

What does "TRACE_INSN(insn, NULL)" do?

> @@ -4237,9 +4304,19 @@ static int validate_symbol(struct objtool_file *file, struct section *sec,
>  	if (opts.uaccess)
>  		state->uaccess = sym->uaccess_safe;
>  
> +	if (opts.trace && !fnmatch(opts.trace, sym->name, 0)) {
> +		trace_enable();
> +		TRACE("%s: validation begin\n", sym->name);
> +	}
> +
>  	ret = validate_branch(file, insn_func(insn), insn, *state);
>  	if (ret)
>  		BT_INSN(insn, "<=== (sym)");
> +
> +	TRACE("%s: validation %s\n\n", sym->name, ret ? "failed" : "end");
> +	trace_disable();
> +
> +
>  	return ret;

extra newline

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ