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: <ZKXZUl4VgZkMbOL0@gcabiddu-mobl1.ger.corp.intel.com>
Date:   Wed, 5 Jul 2023 21:57:54 +0100
From:   Giovanni Cabiddu <giovanni.cabiddu@...el.com>
To:     Eric Biggers <ebiggers@...nel.org>
CC:     <herbert@...dor.apana.org.au>, <agk@...hat.com>,
        <snitzer@...nel.org>, <linux-crypto@...r.kernel.org>,
        <dm-devel@...hat.com>, <linux-kernel@...r.kernel.org>,
        <qat-linux@...el.com>, <heinzm@...hat.com>,
        <meenakshi.aggarwal@....com>, <horia.geanta@....com>,
        <V.Sethi@....com>, <pankaj.gupta@....com>, <gaurav.jain@....com>,
        <davem@...emloft.net>, <iuliana.prodan@....com>,
        Fiona Trahe <fiona.trahe@...el.com>
Subject: Re: [PATCH 1/3] dm integrity: do not filter algos with
 CRYPTO_ALG_ALLOCATES_MEMORY

Thanks Eric.

On Wed, Jul 05, 2023 at 01:12:05PM -0700, Eric Biggers wrote:
> On Wed, Jul 05, 2023 at 05:40:07PM +0100, Giovanni Cabiddu wrote:
> > The flag CRYPTO_ALG_ALLOCATES_MEMORY indicates that an algorithm might
> > allocate memory in the datapath and therefore sleep.
> > Dm-integrity is filtering out implementations of skcipher algorithms
> > that have this flag set. However, in the same function it does
> > allocations with GFP_KERNEL.
> 
> Which function is the above referring to?  The actual encryption/decryption
> happens in crypt_journal(), and I don't see any memory allocations there.
You are right. I was referring to create_journal() which is allocating
memory right before calling do_crypt().
However, I didn't consider crypt_journal() which might not be allocating
memory before calling do_crypt().

Then we are then back to square one. We need to check how many entries
are present in the scatterlists encrypted by crypt_journal() before
adjusting the meaning of !CRYPTO_ALG_ALLOCATES_MEMORY.

Regards,

-- 
Giovanni

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ