From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xh03f-0004lu-R6 for mharc-grub-devel@gnu.org; Wed, 22 Oct 2014 13:50:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh03Z-0004dA-M5 for grub-devel@gnu.org; Wed, 22 Oct 2014 13:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh03U-0003En-Vu for grub-devel@gnu.org; Wed, 22 Oct 2014 13:50:45 -0400 Received: from mail.ixsystems.com ([12.229.62.4]:20848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh03U-0003Ei-9p for grub-devel@gnu.org; Wed, 22 Oct 2014 13:50:40 -0400 Received: from localhost (mail.ixsystems.com [10.2.55.1]) by mail.iXsystems.com (Postfix) with ESMTP id 6C400887FD for ; Wed, 22 Oct 2014 10:50:39 -0700 (PDT) Received: from mail.iXsystems.com ([10.2.55.1]) by localhost (mail.ixsystems.com [10.2.55.1]) (maiad, port 10024) with ESMTP id 15225-04-4 for ; Wed, 22 Oct 2014 10:50:39 -0700 (PDT) Received: from [192.168.0.51] (75-130-56-30.static.kgpt.tn.charter.com [75.130.56.30]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 55AF98878C for ; Wed, 22 Oct 2014 10:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ixsystems.com; s=newknight0; t=1414000208; bh=stEpWGVmNPI941wkfUSf7fjm21nfsgDXGqhZgMl9hhI=; h=Date:From:To:Subject:References:In-Reply-To; b=PcyEf/aUhdIFNI3w2+pwRt8KrDKr6emPwWMBJyXgb43VMThW+E15bVjmPkY00LDfE GFH882pCp03sVgQ7giSu+pkI1yH2Lx+YrRfllp9RiSHHq64RH5rbS8vT7d737B9qgI gDBTsafMCwLuYkwjYGJnQb4URoVjekg0D2Xzl0n0= Message-ID: <5447EE4F.5010002@pcbsd.org> Date: Wed, 22 Oct 2014 13:50:07 -0400 From: Kris Moore User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Patch to support GELI passphrase passthrough References: <5447E580.1010409@pcbsd.org> <20141022214724.19df0c1f@opensuse.site> In-Reply-To: <20141022214724.19df0c1f@opensuse.site> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 12.229.62.4 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 17:50:50 -0000 On 10/22/2014 13:47, Andrei Borzenkov wrote: > =D0=92 Wed, 22 Oct 2014 13:12:32 -0400 > Kris Moore =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> >> Hey, just a small patch to submit today. If you rather I send this to >> the bug tracker then I can do that also. >> >> This patch allows exporting the FreeBSD GELI passphrase to the kernel >> environment, which we will be doing in PC-BSD to avoid prompting for t= he >> passphrase a second time at bootup. >> >> if (!grub_password_get (passphrase, MAX_PASSPHRASE)) >> return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplie= d"); >> =20 >> + /* Set the GELI passphrase to GRUB env, for passing to FreeBSD kern= el */ >> + grub_env_set ("gelipassphrase", passphrase); >> + > If I read BSD loader correctly, this should be kFreeBSD.gelipassphrase. > Is geli freebsd-specific? > >> /* Calculate the PBKDF2 of the user supplied passphrase. */ >> if (grub_le_to_cpu32 (header.niter) !=3D 0) >> { > It sounds more logical to export it after it has been verified? > > I tried to find out about this "gelipassphrase" kernel variable but did > not find anything. Is it already used anywhere? > >> Let me know if you have any suggestions or need any changes. I'm >> currently hacking on support for EFI framebuffer settings to be passed >> to FreeBSD kernel as well, will send patches once I get things working >> there. >> > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel Well, this patch just makes the variable available to grub.cfg file, then we do some stuff there like this: set kFreeBSD.kern.geom.eli.passphrase=3D The patch for support in FreeBSD should be in HEAD soon, but here it is if you want to take a look: https://github.com/pcbsd/freebsd/commit/79f4efcf6a7d4268781adc227d76ed9f7= f0b685d --=20 Kris Moore PC-BSD Software iXsystems