From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1l1eZ5-0006i1-Mm for mharc-grub-devel@gnu.org; Mon, 18 Jan 2021 19:08:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1eZ5-0006hu-1r for grub-devel@gnu.org; Mon, 18 Jan 2021 19:08:07 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:33416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1eZ1-0003bH-I9 for grub-devel@gnu.org; Mon, 18 Jan 2021 19:08:06 -0500 Received: by mail-ed1-x532.google.com with SMTP id c6so12363061ede.0 for ; Mon, 18 Jan 2021 16:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=B7u3oAHad5PJNPwUL9lQfaMAyouhm/4mo6SRDUGeM1E=; b=Mzbiu64Sn4hxG0Q4qs0RcuFoP7rnScOKehDj+rAYoBc59+qsJD7sU9jFLCuqUySOBH H1k5+sgXDoGYSRD8CWMRR7I/2DLttkoVXIpKJw868jT81EiEaKW8vu6iJNvyhcOIPjKO 8Zgb4gJaIvm8XaPXgfhNCmsVen6hFPGixgHIc0P2OAgJdZbsRe0/EhQYVf8ejhBz5bbR A720bsLDQqyycnEIZvSXASI/18kKrm3kyP7VUqU0D33JlPhuh+G5AKqTEGE6tlUAaWJM iHJeaJ/7ERpTIx92LBMwe8cD88h6IOEBZLA1ASKo+DA8uKCZ/JG5MFoHwq8Pww6OofsI R+ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=B7u3oAHad5PJNPwUL9lQfaMAyouhm/4mo6SRDUGeM1E=; b=m2JwnZXnDMbMNuZwpksWn8MngJ8SQBa1jxduH8LYPnMF81i/UqFH55oESnuxJLsOSR BuQXdTVYlQy2kPNuUZ4LnsvnNjNiZXkk3njBrNHURcATz1L+1zyVh1H2gdC9+5M2F0lu P7hrfUdUSa9F/S2qFu4UOyBr/XwOnUEVqsEMT6uXqmBFy28Cl12jmCc0pZ7zW2g4OvNO 3EdKhdDNjifGE9prEXxvXnPC3by3dXUWfzUfGB4k/0VnVqt8xqSn4/q1V7367zn1GGGp fCG4hDLV1RSDNMHrL2jtU+Eg+dDaHHMUXJTNzONzj0gMZ19nyUBFsipdl6jsCjiEcNVv EFcQ== X-Gm-Message-State: AOAM532qzpXNSJN3MblTgNet4//vZEJC8Xtp1c2QjkE7RUn4m7csiSVq ho3PINWxHBQAjUDJhcfRhGg= X-Google-Smtp-Source: ABdhPJyDGNely+Eo76nq1OGzjiFOjQUvWF/tikZe/Konu2iTUWnM9zL+3YpJiocUrsBdyTgcXADfxA== X-Received: by 2002:a05:6402:556:: with SMTP id i22mr1377151edx.56.1611014881280; Mon, 18 Jan 2021 16:08:01 -0800 (PST) Received: from pevik ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id c16sm10031422ejk.91.2021.01.18.16.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 16:08:00 -0800 (PST) Date: Tue, 19 Jan 2021 01:07:58 +0100 From: Petr Vorel To: Patrick Steinhardt Cc: grub-devel@gnu.org Subject: Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup Message-ID: <20210119000758.GA178434@pevik> Reply-To: Petr Vorel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=petr.vorel@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 00:08:07 -0000 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 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