1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00
Dan Moulding f75f66683d crypto: comp - Use same definition of context alloc and free ops
In commit 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation
code into acomp"), the crypto_acomp_streams struct was made to rely on
having the alloc_ctx and free_ctx operations defined in the same order
as the scomp_alg struct. But in that same commit, the alloc_ctx and
free_ctx members of scomp_alg may be randomized by structure layout
randomization, since they are contained in a pure ops structure
(containing only function pointers). If the pointers within scomp_alg
are randomized, but those in crypto_acomp_streams are not, then
the order may no longer match. This fixes the problem by removing the
union from scomp_alg so that both crypto_acomp_streams and scomp_alg
will share the same definition of alloc_ctx and free_ctx, ensuring
they will always have the same layout.

Signed-off-by: Dan Moulding <dan@danm.net>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Fixes: 42d9f6c77479 ("crypto: acomp - Move scomp stream allocation code into acomp")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-09-20 20:21:03 +08:00
..
2025-07-30 19:26:49 -07:00
2025-08-09 08:40:28 +03:00
2025-08-09 08:47:28 +03:00
2025-07-29 11:13:27 -07:00
2025-08-03 13:49:10 -07:00
2025-07-29 11:42:31 -07:00
2025-08-01 12:35:12 -07:00
2025-07-30 19:26:49 -07:00
2025-07-29 16:30:38 -07:00
2025-08-09 18:10:01 +03:00
2025-07-29 12:15:39 -07:00
2025-08-09 08:15:43 +03:00
2025-07-30 17:14:01 -07:00
2025-08-01 13:59:07 -07:00
2025-08-09 08:47:28 +03:00
2025-07-29 12:05:38 -07:00
2025-07-31 13:43:02 -07:00
2025-07-28 17:16:12 -07:00
2025-08-09 08:15:43 +03:00
2025-07-29 12:15:39 -07:00
2025-07-30 17:14:01 -07:00
2025-08-09 08:39:05 +03:00
2025-08-01 12:31:50 -07:00
2025-07-28 23:21:28 -07:00
2025-07-30 08:58:55 -07:00
2025-08-09 08:41:53 +03:00
2025-08-01 15:02:25 -07:00
2025-08-01 15:02:25 -07:00
2025-08-03 20:17:34 -07:00
2025-08-06 15:44:25 +03:00
2025-08-01 11:09:27 -07:00
2025-08-09 08:43:24 +03:00
2025-08-06 15:44:25 +03:00
2025-07-29 12:15:39 -07:00
2025-08-06 15:44:25 +03:00
2025-08-07 07:32:50 +03:00
2025-08-09 08:15:43 +03:00
2025-08-01 14:17:48 -07:00
2025-07-30 19:26:49 -07:00