Re: [dm-devel] [PATCH v5.10] dm: fix mempool NULL pointer race when completing IO

2022-04-25 Thread Greg Kroah-Hartman
On Thu, Apr 21, 2022 at 02:08:30PM -0400, Mikulas Patocka wrote: > Hi Not really needed in a changelog text :) > This is backport of patches d208b89401e0 ("dm: fix mempool NULL pointer > race when completing IO") and 9f6dc6337610 ("dm: interlock pending dm_io > and dm_wait_for_bios_completion") f

Re: [dm-devel] fix and cleanup discard_alignment handling

2022-04-25 Thread Martin K. Petersen
Christoph, > the somewhat confusing name of the discard_alignment queue limit, that > really is an offset for the discard granularity mislead a lot of > driver authors to set it to an incorrect value. This series tries to > fix up all these cases. Not sure how I ended up with "discard_alignmen

Re: [dm-devel] [PATCH v2] hex2bin: make the function hex_to_bin constant-time

2022-04-25 Thread Linus Torvalds
On Mon, Apr 25, 2022 at 5:07 AM Mikulas Patocka wrote: > > We are subtracting values that are in the 0 ... 255 range. Well, except that's not what the original patch did. It was subtracting values that were in the -128 ... 255 range (where the exact range depended on the sign of 'char'). But ye

Re: [dm-devel] [PATCH] hex2bin: make the function hex_to_bin constant-time

2022-04-25 Thread Mikulas Patocka
On Mon, 25 Apr 2022, David Laight wrote: > From: Mikulas Patocka > > Sent: 25 April 2022 12:04 > > > > On Mon, 25 Apr 2022, David Laight wrote: > > > > > From: Linus Torvalds > > > > Sent: 24 April 2022 22:42 > > > > > > > > On Sun, Apr 24, 2022 at 2:37 PM Linus Torvalds > > > > wrote: > > >

[dm-devel] [PATCH v2] dm-crypt: make printing of the key constant-time

2022-04-25 Thread Mikulas Patocka
This is the second version of this patch. It casts the value to unsigned before doing the shift, because right shift of a negative number is not defined. Mikulas From: Mikulas Patocka The device mapper dm-crypt target is using scnprintf("%02x", cc->key[i]) to report the current key to users

Re: [dm-devel] [PATCH] dm integrity: fix error code in dm_integrity_ctr()

2022-04-25 Thread Mikulas Patocka
Thanks for finding it. On Mon, 25 Apr 2022, Dan Carpenter wrote: > The "r" variable shadows an earlier "r" that has function scope. It > means that we accidentally return success instead of an error code. > Smatch has a warning for this: > > drivers/md/dm-integrity.c:4503 dm_integrity_ct

[dm-devel] [PATCH v2] hex2bin: make the function hex_to_bin constant-time

2022-04-25 Thread Mikulas Patocka
On Sun, 24 Apr 2022, Linus Torvalds wrote: > On Sun, Apr 24, 2022 at 1:54 PM Mikulas Patocka wrote: > > > > + * > > + * Explanation of the logic: > > + * (ch - '9' - 1) is negative if ch <= '9' > > + * ('0' - 1 - ch) is negative if ch >= '0' > > True, but... > > Please, just to make me happi

[dm-devel] [PATCH] dm integrity: fix error code in dm_integrity_ctr()

2022-04-25 Thread Dan Carpenter
The "r" variable shadows an earlier "r" that has function scope. It means that we accidentally return success instead of an error code. Smatch has a warning for this: drivers/md/dm-integrity.c:4503 dm_integrity_ctr() warn: missing error code 'r' Fixes: 7eada909bfd7 ("dm: add inte

Re: [dm-devel] [PATCH] hex2bin: make the function hex_to_bin constant-time

2022-04-25 Thread Mikulas Patocka
On Mon, 25 Apr 2022, David Laight wrote: > From: Linus Torvalds > > Sent: 24 April 2022 22:42 > > > > On Sun, Apr 24, 2022 at 2:37 PM Linus Torvalds > > wrote: > > > > > > Finally, for the same reason - please don't use ">> 8". Because I do > > > not believe that bit 8 is well-defined in you

Re: [dm-devel] [PATCH] dm: fix mempool NULL pointer race when completing IO

2022-04-25 Thread Greg KH
On Mon, Apr 25, 2022 at 08:28:12AM +, Akilesh Kailash wrote: > From: Jiazi Li > > commit d208b89401e073de986dc891037c5a668f5d5d95 upstream. > > This is a backport of the upstream patch to 5.10.y stable branch. Now queued up, thanks. greg k-h -- dm-devel mailing list dm-devel@redhat.com ht