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, 13 Sep 2018 15:52:21 +0200
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     kevin@...rana.org, Andrew Lutomirski <luto@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Netdev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Samuel Neves <sneves@....uc.pt>, linux-arch@...r.kernel.org
Subject: Re: [PATCH net-next v3 01/17] asm: simd context helper API

On Thu, Sep 13, 2018 at 7:03 AM Kevin Easton <kevin@...rana.org> wrote:
> Yes.  It's also how most get/put APIs already work in the kernel, eg
> kref_get/put (mostly because they tend to be 'getting/putting' an
> already-initialized object, though).

Right; in this case the object wouldn't be initialized yet, which
might defeat the purpose, since one advantage of the & way you
mentioned is _put modifies the context.

Andy - any opinions on this? The tl;dr is:

1) what we have now:

simd_context_t simd_context = simd_get();
for (item in items) {
    do_something(item);
    simd_context = simd_relax(simd_context);
}
simd_put();

2) what kevin is proposing:

simd_context_t simd_context;

simd_get(&simd_context);
for (item in items) {
    do_something(item);
    simd_relax(&simd_context);
}
simd_put(&simd_context);

I can see pros and cons of each approach.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ