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: <20200313143429.GB12521@hirez.programming.kicks-ass.net>
Date:   Fri, 13 Mar 2020 15:34:29 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     tglx@...utronix.de, jpoimboe@...hat.com
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [RFC][PATCH 04/16] objtool: Annotate identity_mapped()

On Thu, Mar 12, 2020 at 02:41:11PM +0100, Peter Zijlstra wrote:

> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -416,7 +416,7 @@ static void add_ignores(struct objtool_f
>  
>  		case STT_SECTION:
>  			func = find_symbol_by_offset(rela->sym->sec, rela->addend);
> -			if (!func || func->type != STT_FUNC)
> +			if (!func || (func->type != STT_FUNC && func->type != STT_NOTYPE))
>  				continue;
>  			break;
>  
> @@ -425,7 +425,7 @@ static void add_ignores(struct objtool_f
>  			continue;
>  		}
>  
> -		func_for_each_insn(file, func, insn)
> +		sym_for_each_insn(file, func, insn)
>  			insn->ignore = true;
>  	}
>  }


This conflicts with:

  7acfe5315312 ("objtool: Improve call destination function detection")

which wasn't in the tree we were working against :/

I've resolved it something like so.

---
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -406,7 +406,7 @@ static void add_ignores(struct objtool_f
 {
 	struct instruction *insn;
 	struct section *sec;
-	struct symbol *func;
+	struct symbol *sym;
 	struct rela *rela;
 
 	sec = find_section_by_name(file->elf, ".rela.discard.func_stack_frame_non_standard");
@@ -416,12 +416,12 @@ static void add_ignores(struct objtool_f
 	list_for_each_entry(rela, &sec->rela_list, list) {
 		switch (rela->sym->type) {
 		case STT_FUNC:
-			func = rela->sym;
+			sym = rela->sym;
 			break;
 
 		case STT_SECTION:
-			func = find_func_by_offset(rela->sym->sec, rela->addend);
-			if (!func)
+			sym = find_symbol_by_offset(rela->sym->sec, rela->addend);
+			if (!sym || (sym->type != STT_FUNC || sym->type != STT_NOTYPE))
 				continue;
 			break;
 
@@ -430,7 +430,7 @@ static void add_ignores(struct objtool_f
 			continue;
 		}
 
-		sym_for_each_insn(file, func, insn)
+		sym_for_each_insn(file, sym, insn)
 			insn->ignore = true;
 	}
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ