Hi all
On Wed, Apr 6, 2022 at 5:46 PM Fabio Aiuto
wrote:
>
> From: Michael Trimarchi
>
> The device driver can be deferrable and can be a race during
> the dm-init early. We need to wait all the probe are really finished
> in a loop as is done in do_mounts. This is was tested on kernel 5.4
>
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 your arithmetic. The *sign*
> bit will be, but I'm not convinced bit 8 is.
Hmm.. I think it's ok. It can indeed overflow in
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 happier, make the sign of 'ch' be something
very explicit. Right now
On Sun, 2022-04-24 at 16:54 -0400, Mikulas Patocka wrote:
> This patch changes the function hex_to_bin so that it contains no branches
> and no memory accesses.
[]
> +++ linux-2.6/lib/hexdump.c 2022-04-24 18:51:20.0 +0200
[]
> + * the next line is similar to the previous one, but we need
The device mapper dm-crypt target is using scnprintf("%02x", cc->key[i]) to
report the current key to userspace. However, this is not constant-time
operation and it may leak information about the key via timing, via cache
access patterns or via the branch predictor.
This patch changes it to use
The function hex2bin is used to load cryptographic keys into device mapper
targets dm-crypt and dm-integrity. It should take constant time
independent on the processed data, so that concurrently running
unprivileged code can't infer any information about the keys via
microarchitectural convert
If we pass too short string to "hex2bin" (and the string size without the
terminating NUL character is even), "hex2bin" reads one byte after the
terminating NUL character. This patch fixes it.
Signed-off-by: Mikulas Patocka
Cc: sta...@vger.kernel.org
---
lib/hexdump.c |9 ++---
1 file
dm-stats can be used with very large number of entries (it is only limited
by 1/4 of total system memory), so we should add rescheduling points to
the loops that iterate over the entries.
Signed-off-by: Mikulas Patocka
Cc: sta...@vger.kernel.org
---
drivers/md/dm-stats.c |8
1