grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup


From: Petr Vorel
Subject: Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup
Date: Tue, 19 Jan 2021 01:07:58 +0100

Hi Patrick,

I know that this patchset needs some changes and is not planned to be included
in 2.06. But anyway, testing it I found:

...
> +++ b/grub-core/lib/argon2/core.c
> +/* for explicit_bzero() on glibc */
> +#define _DEFAULT_SOURCE
...
> +#if defined(__OpenBSD__)
> +#define HAVE_EXPLICIT_BZERO 1
> +#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
> +#if __GLIBC_PREREQ(2,25)
> +#define HAVE_EXPLICIT_BZERO 1
> +#endif
Does this work? I get:

    grub-core/lib/argon2/core.c: In function ‘secure_wipe_memory’:
    grub-core/lib/argon2/core.c:135:5: error: implicit declaration of function 
‘explicit_bzero’ [-Werror=implicit-function-declaration]
      135 |     explicit_bzero(v, n);

Including <string.h> isn't obviously a good idea.
What's wrong? I have to miss something obvious.

> +#endif

If I remove HAVE_EXPLICIT_BZERO definition, I get errors when generating
moddep.lst:

make[3]: Entering directory '/home/pevik/install/src/grub.git/grub-core'
cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm -f 
moddep.lst; exit 1)
__moddi3 in argon2 is not defined
__umoddi3 in argon2 is not defined

My config-util.h does not have HAVE___MODDI3 and HAVE___UMODDI3.
What's wrong?

I'm compiling on recent distro.
Thanks for any hint.

Kind regards,
Petr



reply via email to

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