Re: [dm-devel] [PATCH] tls: Pass rec instead of aead_req into tls_encrypt_done

2023-02-07 Thread Jakub Kicinski
On Tue, 7 Feb 2023 16:18:36 +0800 Herbert Xu wrote: > > > aead_request_set_callback(aead_req, CRYPTO_TFM_REQ_MAY_BACKLOG, > > > - tls_encrypt_done, sk); > > > + tls_encrypt_done, aead_req); > > > > ... let's just pass rec instead of aead_req

Re: [dm-devel] [PATCH] dm-table: Check that a dm device doesn't reference itself

2023-02-07 Thread Demi Marie Obenour
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Tue, Feb 07, 2023 at 10:21:40PM -0600, Benjamin Marzinski wrote: > If a dm device table references itself, it will crash the kernel with an > infinite recursion. Check for a self-reference in dm_get_device(). This > is a quick check, but it

Re: [dm-devel] [PATCH 0/17] crypto: api - Change completion callback argument to void star

2023-02-07 Thread Jakub Kicinski
On Tue, 7 Feb 2023 16:03:52 +0800 Herbert Xu wrote: > > Buggy means bug could be hit in real light or buggy == did not use > > the API right? > > Yes this bug is real. If you hit a driver/algorithm that returns > a different request object (of which there are many in the API) then > you will

Re: [dm-devel] [PATCH 2/2] dm-thin: Allow specifying an offset

2023-02-07 Thread Demi Marie Obenour
On Tue, Feb 07, 2023 at 03:03:57PM +, Joe Thornber wrote: > Nack. I'm not building a linear target into every other target. Layering > targets is simple. It also introduces a performance penalty, which is measurable on some workloads. Even dm-linear is not free. The crypt target also has

Re: [dm-devel] [PATCH 1/2] Fail I/O to thin pool devices

2023-02-07 Thread Demi Marie Obenour
On Tue, Feb 07, 2023 at 03:02:51PM +, Joe Thornber wrote: > Nack. > > I don't see the security issue; how is this any different from running the > thin tools on any incorrect device? Or even the data device that the pool > is mirroring. I special-cased the pool device for two reasons: 1. I

Re: [dm-devel] [PATCH] multipath.rules: fix "smart" bug with failed valid path check

2023-02-07 Thread Martin Wilck
Hello Ben, On Tue, 2023-02-07 at 18:32 -0600, Benjamin Marzinski wrote: > If "multipath -u" fails, udev doesn't import any values from the > program. This means that multipath.rules will continue to use the > values > for DM_MULTIPATH_DEVICE_PATH and FIND_MULTIPATHS_WAIT_UNTIL that it > has >

[dm-devel] [v2 PATCH 10/17] crypto: api - Use data directly in completion function

2023-02-07 Thread Herbert Xu
v2 adds the actual algapi conversion which went missing. ---8<--- This patch does the final flag day conversion of all completion functions which are now all contained in the Crypto API. Signed-off-by: Herbert Xu --- crypto/adiantum.c |5 +--- crypto/af_alg.c|6

[dm-devel] [PATCH] dm-table: Check that a dm device doesn't reference itself

2023-02-07 Thread Benjamin Marzinski
If a dm device table references itself, it will crash the kernel with an infinite recursion. Check for a self-reference in dm_get_device(). This is a quick check, but it won't catch more complicated circular references. Signed-off-by: Benjamin Marzinski --- drivers/md/dm-table.c | 2 ++ 1 file

Re: [dm-devel] [PATCH 0/17] crypto: api - Change completion callback argument to void star

2023-02-07 Thread Herbert Xu
On Tue, Feb 07, 2023 at 10:51:46AM -0800, Jakub Kicinski wrote: . > Any aes-gcm or chacha-poly implementations which would do that come > to mind? I'm asking 'cause we probably want to do stable if we know > of a combination which would be broken, or the chances of one existing > are high. Good

[dm-devel] [PATCH] multipath.rules: fix "smart" bug with failed valid path check

2023-02-07 Thread Benjamin Marzinski
If "multipath -u" fails, udev doesn't import any values from the program. This means that multipath.rules will continue to use the values for DM_MULTIPATH_DEVICE_PATH and FIND_MULTIPATHS_WAIT_UNTIL that it has already imported from the database. This is the correct thing to do for every case

Re: [dm-devel] [RFC PATCH v9 00/16] Integrity Policy Enforcement LSM (IPE)

2023-02-07 Thread Fan Wu
On Thu, Feb 02, 2023 at 11:48:18AM +0100, Roberto Sassu wrote: > On Tue, 2023-01-31 at 16:48 -0800, Fan Wu wrote: > > On Tue, Jan 31, 2023 at 03:22:05PM +0100, Roberto Sassu wrote: > > > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > > > IPE has two known gaps: > > > > > > > > 1. IPE cannot

Re: [dm-devel] [RFC PATCH v9 13/16] ipe: enable support for fs-verity as a trust provider

2023-02-07 Thread Fan Wu
On Thu, Feb 02, 2023 at 10:51:56AM +0100, Roberto Sassu wrote: > On Wed, 2023-02-01 at 15:50 -0800, Fan Wu wrote: > > On Tue, Jan 31, 2023 at 03:00:08PM +0100, Roberto Sassu wrote: > > > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > > > +/** > > > > + * evaluate_fsv_sig_false - Analyze @ctx

Re: [dm-devel] [RFC PATCH v9 10/16] dm-verity: consume root hash digest and signature data via LSM hook

2023-02-07 Thread Fan Wu
On Thu, Feb 02, 2023 at 09:21:24AM +0100, Roberto Sassu wrote: > On Wed, 2023-02-01 at 15:26 -0800, Fan Wu wrote: > > On Tue, Jan 31, 2023 at 02:22:01PM +0100, Roberto Sassu wrote: > > > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > > > From: Deven Bowers > > > > > > > > dm-verity

Re: [dm-devel] [PATCH] dm-verity: Remove WQ_UNBOUND.

2023-02-07 Thread Nathan Huckleberry
On Tue, Feb 7, 2023 at 12:16 AM Mikulas Patocka wrote: > > > > On Wed, 1 Feb 2023, Nathan Huckleberry wrote: > > > Setting WQ_UNBOUND increases scheduler latency on ARM64. This is likely > > due to the asymmetric architecture of ARM64 processors. > > > > I've been unable to reproduce the results

Re: [dm-devel] [PATCH 1/2] Fail I/O to thin pool devices

2023-02-07 Thread Zdenek Kabelac
Dne 07. 02. 23 v 17:19 Demi Marie Obenour napsal(a): On Tue, Feb 07, 2023 at 03:02:51PM +, Joe Thornber wrote: Nack. I don't see the security issue; how is this any different from running the thin tools on any incorrect device? Or even the data device that the pool is mirroring. I

Re: [dm-devel] [PATCH 2/2] dm-thin: Allow specifying an offset

2023-02-07 Thread Joe Thornber
Nack. I'm not building a linear target into every other target. Layering targets is simple. On Tue, Feb 7, 2023 at 7:56 AM Demi Marie Obenour < d...@invisiblethingslab.com> wrote: > This allows exposing only part of a thin volume without having to layer > dm-linear. One use-case is a

Re: [dm-devel] [PATCH 1/2] Fail I/O to thin pool devices

2023-02-07 Thread Joe Thornber
Nack. I don't see the security issue; how is this any different from running the thin tools on any incorrect device? Or even the data device that the pool is mirroring. In general the thin tools don't modify the metadata they're running on. If you know of a security issue with the thin tools

[dm-devel] [PATCH] dm: don't send uevents while the device is suspended

2023-02-07 Thread Mikulas Patocka
Device mapper sends an uevent when the device is suspended, using the function set_capacity_and_notify. However, this causes a race condition with udev. Udev skips scanning dm devices that are suspended. If we send an uevent while we are suspended, udev will be racing with device mapper resume

[dm-devel] [PATCH] tls: Pass rec instead of aead_req into tls_encrypt_done

2023-02-07 Thread Herbert Xu
On Mon, Feb 06, 2023 at 11:15:21PM -0800, Jakub Kicinski wrote: > > > aead_request_set_callback(aead_req, CRYPTO_TFM_REQ_MAY_BACKLOG, > > - tls_encrypt_done, sk); > > + tls_encrypt_done, aead_req); > > ... let's just pass rec instead of

Re: [dm-devel] [PATCH] dm-verity: Remove WQ_UNBOUND.

2023-02-07 Thread Mikulas Patocka
On Wed, 1 Feb 2023, Nathan Huckleberry wrote: > Setting WQ_UNBOUND increases scheduler latency on ARM64. This is likely > due to the asymmetric architecture of ARM64 processors. > > I've been unable to reproduce the results that claim WQ_UNBOUND gives a > performance boost on x86-64. > >

Re: [dm-devel] [PATCH 0/2] dm era: avoid deadlock when swapping table with dm-era target

2023-02-07 Thread Nikos Tsironis
On 1/31/23 22:20, Mike Snitzer wrote: On Tue, Jan 31 2023 at 6:01P -0500, Nikos Tsironis wrote: On 1/26/23 02:06, Mike Snitzer wrote: On Wed, Jan 25 2023 at 7:37P -0500, Nikos Tsironis wrote: On 1/23/23 19:34, Mike Snitzer wrote: On Thu, Jan 19 2023 at 4:36P -0500, Nikos Tsironis

Re: [dm-devel] [PATCH 0/17] crypto: api - Change completion callback argument to void star

2023-02-07 Thread Herbert Xu
On Mon, Feb 06, 2023 at 11:10:08PM -0800, Jakub Kicinski wrote: > On Mon, 6 Feb 2023 18:21:06 +0800 Herbert Xu wrote: > > The crypto completion function currently takes a pointer to a > > struct crypto_async_request object. However, in reality the API > > does not allow the use of any part of the