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: <CAHk-=wguWBY_W8-M0vSCae538mAY2vQtkrdNbZX4T8rvAYxPxg@mail.gmail.com>
Date:   Mon, 18 Mar 2019 11:10:22 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>, Peter Anvin <hpa@...or.com>,
        Julien Thierry <julien.thierry@....com>,
        Will Deacon <will.deacon@....com>,
        Andy Lutomirski <luto@...capital.net>,
        Ingo Molnar <mingo@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        James Morse <james.morse@....com>, valentin.schneider@....com,
        Brian Gerst <brgerst@...il.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Andrew Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 01/25] x86: Make SMAP 64-bit only

On Mon, Mar 18, 2019 at 10:51 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> How about I do a patch that schedules EFLAGS for both 32bit and 64bit,
> mark this for backporting to infinity.
>
> And then at the end, after the objtool-ac bits land, I do a patch
> removing the EFLAGS scheduling for x86_64.

Sounds sane to me.

And we can make it AC-conditional if it's actually shown to be visible
from a performance standpoint.

But iirc pushf/popf isn't really that expensive - in fact I think it's
pretty cheap when system flags don't change. Which would be the common
case unless you'd also make the popf do the irq restore part and
simply make finish_lock_switch() re-enable irq's by doing an
irqrestore?

I think popf is like 20 cycles or something (and pushf is just single
cycles). Probably not worth worrying about in the task switch context.

                 Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ