Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Eric Biggers via Linux-f2fs-devel
On Wed, Jun 25, 2025 at 06:29:17PM +0200, Maxime MERE wrote: > Regarding robustness and maintenance, ST ensures regular updates of its > drivers and can fix any reported bugs. We have conducted internal tests with > dm-crypt that demonstrate the proper functioning of these drivers for this > type o

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Eric Biggers via Linux-f2fs-devel
On Wed, Jun 25, 2025 at 06:29:26PM +0200, Maxime MERE wrote: > Hi, > > On 6/25/25 08:32, Eric Biggers wrote: > > That was the synchronous throughput. However, submitting multiple requests > > asynchronously (which again, fscrypt doesn't actually do) barely helps. > > Apparently the STM32 crypto e

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Eric Biggers via Linux-f2fs-devel
On Wed, Jun 25, 2025 at 06:29:17PM +0200, Maxime MERE wrote: > > > On 6/13/25 16:42, Eric Biggers wrote: > > Honestly, the responses to this thread so far have made it even more clear > > that > > this patch is the right decision. > > The chaining system I previously presented is just an exampl

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Eric Biggers via Linux-f2fs-devel
On Wed, Jun 25, 2025 at 08:44:45AM -0400, Theodore Ts'o wrote: > On Tue, Jun 24, 2025 at 11:32:52PM -0700, Eric Biggers wrote: > > > > That was the synchronous throughput. However, submitting multiple requests > > asynchronously (which again, fscrypt doesn't actually do) barely helps. > > Apparen

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Maxime MERE
Hi, On 6/25/25 08:32, Eric Biggers wrote: That was the synchronous throughput. However, submitting multiple requests asynchronously (which again, fscrypt doesn't actually do) barely helps. Apparently the STM32 crypto engine has only one hardware queue. I already strongly suspected that these n

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Maxime MERE
On 6/13/25 16:42, Eric Biggers wrote: Honestly, the responses to this thread so far have made it even more clear that this patch is the right decision. The chaining system I previously presented is just an example intended to demonstrate the value of hardware drivers in the context of ST pla

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-25 Thread Theodore Ts'o
On Tue, Jun 24, 2025 at 11:32:52PM -0700, Eric Biggers wrote: > > That was the synchronous throughput. However, submitting multiple requests > asynchronously (which again, fscrypt doesn't actually do) barely helps. > Apparently the STM32 crypto engine has only one hardware queue. > > I already s

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-24 Thread Eric Biggers via Linux-f2fs-devel
On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote: > On Thu, Jun 12, 2025 at 12:59:14AM +, Eric Biggers wrote: > > On Thu, Jun 12, 2025 at 09:21:26AM +0900, Simon Richter wrote: > > > Hi, > > > > > > On 6/12/25 05:58, Eric Biggers wrote: > > > > > > > But > > > > otherwise this sty

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-13 Thread Eric Biggers via Linux-f2fs-devel
On Fri, Jun 13, 2025 at 11:01:03AM +0200, Maxime MERE wrote: > Hello, > > On 6/11/25 22:58, Eric Biggers wrote: > > To protect users from these buggy and seemingly unhelpful drivers that I > > have no way of testing, let's make fscrypt not use them. Unfortunately > > there is no direct support fo

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-13 Thread Giovanni Cabiddu
On Fri, Jun 13, 2025 at 01:23:57AM +, Eric Biggers wrote: > On Thu, Jun 12, 2025 at 03:57:43PM +, Eric Biggers wrote: > > On Thu, Jun 12, 2025 at 09:50:26AM +0100, Giovanni Cabiddu wrote: > > > On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote: > > > > > > ... > > > > > > > FWI

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-13 Thread Maxime MERE
Hello, On 6/11/25 22:58, Eric Biggers wrote: To protect users from these buggy and seemingly unhelpful drivers that I have no way of testing, let's make fscrypt not use them. Unfortunately there is no direct support for doing so in the Crypto API, but we can achieve something very close to it b

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-12 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 03:57:43PM +, Eric Biggers wrote: > On Thu, Jun 12, 2025 at 09:50:26AM +0100, Giovanni Cabiddu wrote: > > On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote: > > > > ... > > > > > FWIW, here's what happens if you try to use the Intel QAT driver with > > > dm

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-12 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 09:50:26AM +0100, Giovanni Cabiddu wrote: > On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote: > > ... > > > FWIW, here's what happens if you try to use the Intel QAT driver with > > dm-crypt: > > https://lore.kernel.org/r/cacsavz+mt3cfdxv0_yjh7d50trcgcrz12j3n6

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-12 Thread Giovanni Cabiddu
On Wed, Jun 11, 2025 at 11:25:21PM -0700, Eric Biggers wrote: ... > FWIW, here's what happens if you try to use the Intel QAT driver with > dm-crypt: > https://lore.kernel.org/r/cacsavz+mt3cfdxv0_yjh7d50trcgcrz12j3n6-hox2cz3+n...@mail.gmail.com/ /s/happens/happened/ ... and it got fixed https:

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 12:59:14AM +, Eric Biggers wrote: > On Thu, Jun 12, 2025 at 09:21:26AM +0900, Simon Richter wrote: > > Hi, > > > > On 6/12/25 05:58, Eric Biggers wrote: > > > > > But > > > otherwise this style of hardware offload is basically obsolete and has > > > been superseded by

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
On Thu, Jun 12, 2025 at 09:21:26AM +0900, Simon Richter wrote: > Hi, > > On 6/12/25 05:58, Eric Biggers wrote: > > > But > > otherwise this style of hardware offload is basically obsolete and has > > been superseded by hardware-accelerated crypto instructions directly on > > the CPU as well as in

Re: [f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Simon Richter
Hi, On 6/12/25 05:58, Eric Biggers wrote: But otherwise this style of hardware offload is basically obsolete and has been superseded by hardware-accelerated crypto instructions directly on the CPU as well as inline storage encryption (UFS/eMMC). For desktop, yes, but embedded still has quite

[f2fs-dev] [PATCH] fscrypt: don't use hardware offload Crypto API drivers

2025-06-11 Thread Eric Biggers via Linux-f2fs-devel
From: Eric Biggers fscrypt has never properly supported the old-school Crypto API hardware offload drivers, as it processes each request synchronously. There was one report of someone successfully using such a driver 8 years ago. But otherwise this style of hardware offload is basically obsolet