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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2708430.1767871770@warthog.procyon.org.uk>
Date: Thu, 08 Jan 2026 11:29:30 +0000
From: David Howells <dhowells@...hat.com>
To: Ignat Korchagin <ignat@...udflare.com>
Cc: dhowells@...hat.com, Lukas Wunner <lukas@...ner.de>,
    Jarkko Sakkinen <jarkko@...nel.org>,
    Herbert Xu <herbert@...dor.apana.org.au>,
    Eric Biggers <ebiggers@...nel.org>,
    Luis Chamberlain <mcgrof@...nel.org>,
    Petr Pavlu <petr.pavlu@...e.com>, Daniel Gomez <da.gomez@...nel.org>,
    Sami Tolvanen <samitolvanen@...gle.com>,
    "Jason A . Donenfeld" <Jason@...c4.com>,
    Ard Biesheuvel <ardb@...nel.org>,
    Stephan Mueller <smueller@...onox.de>, linux-crypto@...r.kernel.org,
    keyrings@...r.kernel.org, linux-modules@...r.kernel.org,
    linux-kernel@...r.kernel.org,
    Tadeusz Struk <tadeusz.struk@...el.com>,
    "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH v11 6/8] crypto: Add RSASSA-PSS support

Ignat Korchagin <ignat@...udflare.com> wrote:

> A lot of pointers and arithmetic here. Wouldn't it be easier to do
> something like in [1]?

Fair point.

> > +DEFINE_FREE(crypto_free_shash, struct crypto_shash*,
> > +           if (!IS_ERR_OR_NULL(_T)) { crypto_free_shash(_T); });
> 
> Is this useful enough to go into some commonly used header for shash?

Maybe - I guess there's no actual cost to doing so as it generates an inline
function.

> > +       struct crypto_shash *hash_tfm __free(crypto_free_shash) = NULL;
> > +       struct shash_desc *Hash __free(kfree) = NULL;
> 
> So even though x509/pkcs7 code now has a counterexample (partially due
> to my fault) seems the consensus [2] is to declare and initialise the
> variable with the __free attribute at the same time meaning it is OK
> to declare the variables later and not follow the "declaration at the
> top" rule.

Ok, I'll move the decls.

David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ