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, 4 Oct 2018 20:05:55 +0000
From:   Nadav Amit <namit@...are.com>
To:     "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>
CC:     Ingo Molnar <mingo@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jan Beulich <JBeulich@...e.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v9 04/10] x86: refcount: prevent gcc distortions

at 12:33 PM, H. Peter Anvin <hpa@...or.com> wrote:

> On 10/04/18 02:16, Ingo Molnar wrote:
>> * hpa@...or.com <hpa@...or.com> wrote:
>> 
>>> Ingo: I wasn't talking necessarily about the specifics of each bit, but rather the general 
>>> concept about being able to use macros in inlines...
>> 
>> Ok, agreed about that part - and some of the patches did improve readability.
>> 
>> Also, the 275 lines macros.s is a lot nicer than the 4,200 lines macros.S.
>> 
>> Also, I'm not against using workarounds when the benefits are larger than the costs, but I am 
>> against *hiding* the fact that these are workarounds and that for some of them there are costs.
> 
> Agreed, of course.
> 
>>> I can send you something I have been working on in the background, but have been holding off 
>>> on because of this, in the morning my time.
>> 
>> BTW., I have applied most of the series to tip:x86/kbuild already, and will push them out later 
>> today after some testing. I didn't apply the final 3 patches as they have dependencies, but 
>> applied the basics and fixed up the changelogs.
>> 
>> So you can rely on this.
> 
> Wonderful.
> 
> Here is the horrible code I mentioned yesterday.  This is about
> implementing the immediate-patching framework that Linus and others have
> discussed (it helps both performance and kernel hardening):
> 
> Warning: this stuff can cause serious damage to your eyes, and this is a
> just a small chunk of the whole mess; and relying on gas macros, as
> brain damaged as they are, really is much, much cleaner than not:
> 
> 	https://na01.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.zytor.com%2F~hpa%2Ffoo.S&amp;data=02%7C01%7Cnamit%40vmware.com%7C326f1a3beb4649df319508d62a3042fa%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636742784111671122&amp;sdata=anYIOXzlSTXPQKttTBHjSQgapBmaO9gfibBF34ZlHeQ%3D&amp;reserved=0

Funny. Immediate-patching is what I was playing with when I encountered the
gcc issue. Performance got worse instead of improving (or at least staying
the same), because inlining got crazy.

Anyhow, wait for my soon-to-be-sent RFC in which I define a macro called
“call” (to reduce the retpoline overhead) before you talk about damage to
the eyes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ