bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: explicit_bzero and -std=c99


From: Bruno Haible
Subject: Re: explicit_bzero and -std=c99
Date: Tue, 29 Nov 2022 15:49:55 +0100

Simon Josefsson wrote:
> > Perhaps Gnulib's other uses of asm should also be changed?
> 
> Yes I think we should '__asm__' instead of 'asm' for the reason
> explained by the gcc manual that Bruno linked to.

The remaining uses of 'asm' (as opposed to '__asm__') are in
  lib/simple-atomic.c
  lib/asyncsafe-spin.c
and are for GCC versions < 4.7 (hardly in use nowadays) and for
non-GCC compilers (for which I don't want to spend time to see whether
they support '__asm__').

> If so, I would prefer a read_sensitive_file() API instead of read_file()
> with a flag to enable the security-sensitive functionality.  I'll leave
> it for the future, as this the immediate problem is resolved.

Minimizing module dependencies is a goal when that dependency is large
or otherwise cumbersome. However, the dependency to 'memset_explicit'
is small (produces a tiny .o file, even no .o file at all in the long
term) and does not require any link options. Therefore the dependency
'read-file' -> 'memset_explicit' doesn't bother me a lot.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]