Jason A. Donenfeld
b9e5a18504
UPSTREAM: crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit
This appears to be some kind of copy and paste error, and is actually
dead code.
Pre: f = 0 ⇒ (f >> 32) = 0
f = (f >> 32) + le32_to_cpu(digest[0]);
Post: 0 ≤ f < 2³²
put_unaligned_le32(f, dst);
Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
f = (f >> 32) + le32_to_cpu(digest[1]);
Post: 0 ≤ f < 2³²
put_unaligned_le32(f, dst + 4);
Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
f = (f >> 32) + le32_to_cpu(digest[2]);
Post: 0 ≤ f < 2³²
put_unaligned_le32(f, dst + 8);
Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
f = (f >> 32) + le32_to_cpu(digest[3]);
Post: 0 ≤ f < 2³²
put_unaligned_le32(f, dst + 12);
Therefore this sequence is redundant. And Andy's code appears to handle
misalignment acceptably.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 31899908a0d248b030b4464425b86c717e0007d4)
Bug: 152722841
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I98725ba77775c01c9acba1b893f1fd8dbe5b89a7
2020-10-25 11:47:56 +01:00
..
2020-01-27 14:50:10 +01:00
2020-06-22 09:05:15 +02:00
2020-08-19 08:14:58 +02:00
2020-07-22 13:03:12 +02:00
2020-10-25 11:47:56 +01:00
2020-10-01 16:49:05 +02:00
2020-09-09 19:48:58 +02:00
2020-09-24 12:48:04 +02:00
2020-02-24 08:34:37 +01:00
2020-09-09 19:04:24 +02:00
2020-01-12 12:17:12 +01:00
2020-09-23 12:11:00 +02:00
2020-09-03 13:19:20 +02:00
2020-09-24 12:48:04 +02:00
2020-10-24 14:43:39 +02:00
2020-02-11 04:33:58 -08:00