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
..
2018-07-17 09:40:17 -07:00
2018-07-17 09:40:17 -07:00
2018-07-17 09:40:17 -07:00
2019-06-11 12:20:53 +02:00
2019-11-20 18:45:35 +01:00
2020-01-27 14:50:10 +01:00
2018-06-24 09:27:27 -07: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
2019-11-06 13:06:04 +01:00
2018-08-06 09:50:33 -07:00
2020-10-01 16:49:05 +02:00
2019-02-27 10:08:53 +01:00
2019-07-28 08:29:28 +02:00
2020-09-09 19:48:58 +02:00
2020-09-24 12:48:04 +02:00
2019-08-06 19:06:48 +02:00
2018-08-24 08:22:08 +09:00
2018-10-05 09:41:39 -07:00
2018-07-30 18:59:01 -07:00
2020-02-24 08:34:37 +01:00
2019-01-09 17:38:47 +01:00
2020-09-09 19:04:24 +02:00
2018-06-24 09:27:27 -07:00
2020-01-12 12:17:12 +01:00
2018-07-17 09:40:17 -07:00
2018-07-17 09:40:17 -07:00
2019-02-15 08:10:11 +01:00
2018-07-17 09:40:17 -07:00
2019-06-11 12:20:53 +02:00
2019-02-12 19:47:17 +01:00
2018-07-17 09:40:17 -07:00
2018-06-24 09:27:27 -07:00
2019-01-26 09:32:35 +01:00
2020-09-23 12:11:00 +02:00
2019-11-20 18:46:04 +01:00
2020-09-03 13:19:20 +02:00
2018-06-28 14:18:54 -07:00
2020-09-24 12:48:04 +02:00
2018-08-02 08:06:48 +09:00
2020-10-24 14:43:39 +02:00
2020-02-11 04:33:58 -08:00