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:   Thu, 30 Sep 2021 10:41:37 -0700
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org, sfr@...b.auug.org.au,
        mbenes@...e.cz
Subject: Re: [PATCH] objtool: Teach get_alt_entry() about more relocation
 types

On Thu, Sep 30, 2021 at 12:43:10PM +0200, Peter Zijlstra wrote:
> 
> Occasionally objtool encounters symbol (as opposed to section)
> relocations in .altinstructions. Typically they are the alternatives
> written by elf_add_alternative() as encountered on a noinstr
> validation run on vmlinux after having already ran objtool on the
> individual .o files.
> 
> Basically this is the counterpart of commit 44f6a7c0755d ("objtool:
> Fix seg fault with Clang non-section symbols"), because when these new
> assemblers (binutils now also does this) strip the section symbols,
> elf_add_reloc_to_insn() is forced to emit symbol based relocations.
> 
> As such, teach get_alt_entry() about different relocation types.
> 
> Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls")
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Reported-by: Borislav Petkov <bp@...en8.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  tools/objtool/special.c |   32 +++++++++++++++++++++++++-------
>  1 file changed, 25 insertions(+), 7 deletions(-)
> 
> --- a/tools/objtool/special.c
> +++ b/tools/objtool/special.c
> @@ -58,6 +58,24 @@ void __weak arch_handle_alternative(unsi
>  {
>  }
>  
> +static bool reloc2sec_off(struct reloc *reloc, struct section **sec, unsigned long *off)

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

Though I'd prefer U change it 2 a function name which doesn't look like
a Prince song title.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ