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: <20231013054716.GG3359458@pengutronix.de>
Date:   Fri, 13 Oct 2023 07:47:16 +0200
From:   Sascha Hauer <sha@...gutronix.de>
To:     Jens Axboe <axboe@...nel.dk>
Cc:     Boris Pismenny <borisp@...dia.com>, netdev@...r.kernel.org,
        John Fastabend <john.fastabend@...il.com>,
        linux-kernel@...r.kernel.org, io-uring@...r.kernel.org,
        kernel@...gutronix.de, Jakub Kicinski <kuba@...nel.org>,
        Pavel Begunkov <asml.silence@...il.com>
Subject: Re: Problem with io_uring splice and KTLS

On Thu, Oct 12, 2023 at 07:45:07PM -0600, Jens Axboe wrote:
> On 10/12/23 7:34 AM, Sascha Hauer wrote:
> > In case you don't have encryption hardware you can create an
> > asynchronous encryption module using cryptd. Compile a kernel with
> > CONFIG_CRYPTO_USER_API_AEAD and CONFIG_CRYPTO_CRYPTD and start the
> > webserver with the '-c' option. /proc/crypto should then contain an
> > entry with:
> > 
> >  name         : gcm(aes)
> >  driver       : cryptd(gcm_base(ctr(aes-generic),ghash-generic))
> >  module       : kernel
> >  priority     : 150
> 
> I did a bit of prep work to ensure I had everything working for when
> there's time to dive into it, but starting it with -c doesn't register
> this entry. Turns out the bind() in there returns -1/ENOENT.

Yes, that happens here as well, that's why I don't check for the error
in the bind call. Nevertheless it has the desired effect that the new
algorithm is registered and used from there on. BTW you only need to
start the webserver once with -c. If you start it repeatedly with -c a
new gcm(aes) instance is registered each time.

I think what I am doing here is not the intended use case of cryptd and
only works by accident.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ