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:   Mon, 15 Jan 2018 19:12:30 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     David Woodhouse <dwmw2@...radead.org>,
        linux-kernel@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Arjan Van De Ven <arjan.van.de.ven@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Jun Nakajima <jun.nakajima@...el.com>,
        Asit Mallick <asit.k.mallick@...el.com>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 2/4] objtool: Implement jump_assert for _static_cpu_has()

On Mon, Jan 15, 2018 at 12:04:05PM -0600, Josh Poimboeuf wrote:
> On Mon, Jan 15, 2018 at 05:44:30PM +0100, Peter Zijlstra wrote:
> > Unlike the jump_label bits, static_cpu_has is implemented with
> > alternatives. Sadly it doesn't readily distinguish itself from any
> > other alternatives.
> > 
> > Use a heuristic to guess at it :/
> > 
> > But like jump_labels, make static_cpu_has set br_static on the
> > instructions after the static branch such that we can assert on it.
> 
> This seems a bit heavy handed and fragile, though maybe it is the best
> way.  Still I wonder if there's a better way to do it.
> 
> Some quick ideas:
> 
> a) Somehow use __jump_table in the _static_cpu_has() macro?

Can do, but adds permanent overhead for the fake table entries, also the
alternative in _static_cpu_has is slightly more complex, but it would
work I think.

> b) Add another special annotation to tell objtool where
> _static_cpu_has() locations are?

Almost did that, but I figured I'd give this a try first. But yes I
agree it is somewhat ugly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ