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: <20190308192945.345bw2ut7bsd5ckl@treble>
Date:   Fri, 8 Mar 2019 13:29:45 -0600
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     torvalds@...ux-foundation.org, tglx@...utronix.de, hpa@...or.com,
        julien.thierry@....com, will.deacon@....com, luto@...capital.net,
        mingo@...nel.org, catalin.marinas@....com, james.morse@....com,
        valentin.schneider@....com, brgerst@...il.com, luto@...nel.org,
        bp@...en8.de, dvlasenk@...hat.com, linux-kernel@...r.kernel.org,
        dvyukov@...gle.com, rostedt@...dmis.org
Subject: Re: [PATCH 14/20] objtool: Rewrite add_ignores()

On Thu, Mar 07, 2019 at 12:45:25PM +0100, Peter Zijlstra wrote:
> @@ -436,18 +413,31 @@ static void add_ignores(struct objtool_f
>  	struct instruction *insn;
>  	struct section *sec;
>  	struct symbol *func;
> +	struct rela *rela;
>  
> -	for_each_sec(file, sec) {
> -		list_for_each_entry(func, &sec->symbol_list, list) {
> -			if (func->type != STT_FUNC)
> -				continue;
> +	sec = find_section_by_name(file->elf, ".rela.discard.func_stack_frame_non_standard");
> +	if (!sec)
> +		return;
>  
> -			if (!ignore_func(file, func))
> +	list_for_each_entry(rela, &sec->rela_list, list) {
> +		switch (rela->sym->type) {
> +		case STT_FUNC:
> +			func = rela->sym;
> +			break;
> +
> +		case STT_SECTION:
> +			func = find_symbol_by_offset(rela->sym->sec, rela->addend);
> +			if (!func || func->type != STT_FUNC)
>  				continue;
> +			break;
>  
> -			func_for_each_insn_all(file, func, insn)
> -				insn->ignore = true;
> +		default:
> +			WARN("unexpected relation symbol type in %s: %d", sec->name, rela->sym->type);
> +			continue;

s/relation/relocation

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ