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: <20211209083305.GN16608@worktop.programming.kicks-ass.net>
Date:   Thu, 9 Dec 2021 09:33:05 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     will@...nel.org, boqun.feng@...il.com
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org, mark.rutland@....com,
        elver@...gle.com, keescook@...omium.org, hch@...radead.org,
        torvalds@...ux-foundation.org, axboe@...nel.dk
Subject: Re: [RFC][PATCH 3/5] refcount: Improve out-of-line code-gen

On Wed, Dec 08, 2021 at 07:36:58PM +0100, Peter Zijlstra wrote:
> Allow a number of ops to tail-call refcount_warn_saturate() in order
> to generate smaller out-of-line code.
> 
>    text    data     bss     dec     hex filename
>   97341    4985    1116  103442   19412 defconfig-build/kernel/events/core.o
>   97299    4985    1116  103400   193e8 defconfig-build/kernel/events/core.o
> 

This patch also makes GCC do worse code-gen on the fast path, so I'll
drop it.

For some obscure raisin it causes this:

ring_buffer_put:
    a950:       f0 ff 0f                lock decl (%rdi)
    a953:       7c 20                   jl     a975 <ring_buffer_put+0x25>
    a955:       74 01                   je     a958 <ring_buffer_put+0x8>
    a957:       c3                      ret


ring_buffer_put:
    a940:       53                      push   %rbx
    a941:       48 89 fb                mov    %rdi,%rbx
    a944:       f0 ff 0f                lock decl (%rdi)
    a947:       7c 04                   jl     a94d <ring_buffer_put+0xd>
    a949:       74 10                   je     a95b <ring_buffer_put+0x1b>
    a94b:       5b                      pop    %rbx
    a94c:       c3                      ret

Which is just unacceptible...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ