[libgcrypt] NetBSD support explicit_memset
AbandonedPublic

Authored by jukivili on Apr 7 2019, 10:55 AM.

Details

Reviewers
jku
jku2
devnexen
Summary

Somewhat similar as explicit_bzero as non optimisable in compiler point of view.

Test Plan

N/A

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
devnexen created this revision.Apr 7 2019, 10:55 AM

_gcry_fast_wipememory2 should be changed to always just use explicit_memset when available:

#ifdef HAVE_EXPLICIT_MEMSET
explicit_memset (ptr, set, len);
#else
#ifdef HAVE_EXPLICIT_BZERO
if (set == 0)
    {
      explicit_bzero (ptr, len);
      return;
    }
#endif 

memset_ptr (ptr, set, len);
#endif
devnexen updated this revision to Diff 1360.Apr 8 2019, 8:36 PM

I'm not actually sure how workflow should be on the 'patches' interface at dev.gnupg.org.

Could you post this patch and your DCO to libgcrypt mailing-list?

src/misc.c
531

Passing zero here instead of 'set'.

devnexen added inline comments.Apr 17 2019, 7:29 PM
src/misc.c
531

Good catch ... lazy c/p.

Done ! Thanks.

jukivili commandeered this revision.Apr 28 2019, 8:38 AM
jukivili edited reviewers, added: devnexen; removed: jukivili.

Email did not get through (should use plain old text email), so I prepared patch myself. See D477, https://dev.gnupg.org/D477

jukivili abandoned this revision.May 1 2019, 3:24 PM

This change has been pushed to repository.