secmem: fix potential memory visibility issue

Authored by jukivili on Nov 5 2018, 7:42 PM.

Description

secmem: fix potential memory visibility issue

* configure.ac (gcry_cv_have_sync_synchronize): New check.
* src/secmem.c (pooldesc_s): Make next pointer volatile.
(memory_barrier): New.
(_gcry_secmem_malloc_internal): Insert memory barrier between
pool->next and mainpool.next assigments.
(_gcry_private_is_secure): Update comments.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Committed
jukiviliNov 5 2018, 7:42 PM
Parents
rC4faeaa1cbd23: wipememory: use memset for non-constant length or large buffer wipes
Branches
Unknown
Tags
Unknown