Home GnuPG

Prevent link-time optimization from inlining __gcry_burn_stack

Description

Prevent link-time optimization from inlining __gcry_burn_stack

* src/g10lib.h (NOINLINE_FUNC): New attribute macro.
* src/misc.c (__gcry_burn_stack): Add NOINLINE_FUNC attribute.

LTO can cause inline of gcry_burn_stack and result tail-call
to _gcry_fast_wipememory and defeat tail-call prevention in
_gcry_burn_stack macro. Mark
gcry_burn_stack with 'noinline'
attribute to prevent unwanted inlining of this function in
LTO builds.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 7 2020, 9:30 AM
Parents
rC2065720b5b06: tests/basic: check 32-bit and 64-bit overflow for CTR and ChaCha20
Branches
Unknown
Tags
Unknown