Re: [PATCH] crypto: algapi - fix be32_to_cpu macro call in crypto_inc()

From: Eric Biggers
Date: Wed Nov 16 2022 - 12:39:49 EST


On Wed, Nov 16, 2022 at 04:52:51PM +0300, Alexey Khoroshilov wrote:
> be32_to_cpu() macro in some cases may be expanded to an expression
> that evaluates its arguments multiple times.

When is that, exactly?

If that's true, then lots of other places in the kernel would need to be fixed
too. Try running:

git grep -E '[bl]e(16|32|64)_to_cpu\([^)]+\+\+\)'

If true, then it would be much better to fix the macros.

But more likely is that there isn't actually any problem.

- Eric