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:   Wed, 10 Jan 2018 20:19:02 +0000
From:   David Woodhouse <dwmw2@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Borislav Petkov <bp@...en8.de>,
        Andi Kleen <andi@...stfloor.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Paul Turner <pjt@...gle.com>,
        Andrew Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Tom Lendacky <thomas.lendacky@....com>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...ux-foundation.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Jiri Kosina <jikos@...nel.org>, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] x86/alternatives: Fix optimize_nops() checking

On Wed, 2018-01-10 at 14:15 -0600, Josh Poimboeuf wrote:
> On Wed, Jan 10, 2018 at 08:55:40PM +0100, Thomas Gleixner wrote:
> > On Wed, 10 Jan 2018, Linus Torvalds wrote:
> > 
> > > On Wed, Jan 10, 2018 at 3:28 AM, Borislav Petkov <bp@...en8.de> wrote:
> > > >
> > > > Make sure we scan all bytes before we decide to optimize the NOPs in
> > > > there.
> > > 
> > > Can we also add compile-time checking (presumably in objtool, but who
> > > knows) that there are no relocations in the alternative section?
> > 
> > Cc'ing the overlor^Haded objtool wizard
> > 
> > > Because that was the other "oops, this really doesn't work with
> > > altinstructions" issue, wasn't it?
> 
> I think .altinstruction relocations *do* work if they're for the first
> instruction, and it's a jump or a call.  There's some alternatives code
> which adjusts the jump/call offset in that case, and there are some
> users of alternatives who rely on that.
> 
> I think Boris had a patch floating around to add an instruction decoder
> to alternatives, so you can do a call/jmp anywhere.

Strictly speaking, it's not about the ELF relocs. Those get processed
in advance, and the altinstructions already have them applied.

What Borislav had was a patch to process the actual branch
instructions, then frob their targets by {&altinstr - &oldinstr} to
make them work again... except it only worked by chance for targets
*within* the altinstr.

On the whole I think we're better off not touching that right now for
fear that it will introduce new bugs. But yes, it *should* be fixed....
just not this week please ;)
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5213 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ