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:   Fri, 18 May 2018 09:24:12 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Peter Anvin <h.peter.anvin@...el.com>,
        kernel test robot <xiaolong.ye@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peter Anvin <hpa@...or.com>, tipbuild@...or.com,
        LKP <lkp@...org>
Subject: Re: [PATCH] objtool: Detect assembly code falling through to INT3
 padding


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Thu, May 17, 2018 at 08:49:34AM -0500, Josh Poimboeuf wrote:
> > With the following commit:
> > 
> >   51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions")
> > 
> > ... asm function alignments are padded with INT3, so it's no longer safe
> > to fall through to an aligned function.  Make sure we catch any such
> > cases with objtool.
> > 
> > Note this only adds checking for 64-bit, since objtool doesn't support
> > x86-32.
> > 
> > Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> > Suggested-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
> > ---
> >  arch/x86/kernel/head_64.S       |  2 --
> >  tools/objtool/arch.h            |  3 ++-
> >  tools/objtool/arch/x86/decode.c |  2 +-
> >  tools/objtool/check.c           | 11 ++++++++++-
> >  4 files changed, 13 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
> > index 8344dd2f310a..3ed8cec6e765 100644
> > --- a/arch/x86/kernel/head_64.S
> > +++ b/arch/x86/kernel/head_64.S
> > @@ -285,11 +285,9 @@ ENTRY(early_idt_handler_array)
> >  	.endif
> >  	pushq $i		# 72(%rsp) Vector number
> >  	jmp early_idt_handler_common
> > -	UNWIND_HINT_IRET_REGS
> >  	i = i + 1
> >  	.fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
> >  	.endr
> > -	UNWIND_HINT_IRET_REGS offset=16
> >  END(early_idt_handler_array)
> >  
> >  early_idt_handler_common:
> 
> As noted on IRC; I got slightly confused what this was about.
> 
> Other than that:
> 
> Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

And after talking to you on IRC I added this paragraph to the changelog:

  Also remove incorrect and unnecessary unwinder hints from head_64.S
  which caused false positives in the new detection code.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ