GCM: move look-up table to .data section and unshare between processes
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 31 May 2019 14:27:25 +0000 (17:27 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Wed, 5 Jun 2019 19:09:00 +0000 (22:09 +0300)
commita4c561aab1014c3630bc88faf6f5246fee16b020
tree31e22e51a988fa694effd50144814259aa976eac
parentdaedbbb5541cd8ecda1459d3b843ea4d92788762
GCM: move look-up table to .data section and unshare between processes

* cipher/cipher-gcm.c (ATTR_ALIGNED_64): New.
(gcmR): Move to 'gcm_table' structure.
(gcm_table): New structure for look-up table with counters before and
after.
(gcmR): New macro.
(prefetch_table): Handle input with length not multiple of 256.
(do_prefetch_tables): Modify pre- and post-table counters to unshare
look-up table pages between processes.
--

GnuPG-bug-id: 4541
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/cipher-gcm.c