From owner-svn-src-stable-12@freebsd.org Wed Apr 15 08:11:19 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FE932AEECC; Wed, 15 Apr 2020 08:11:19 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 492FRq3CSmz4Rx7; Wed, 15 Apr 2020 08:11:19 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6975E1BD71; Wed, 15 Apr 2020 08:11:19 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03F8BJlv034171; Wed, 15 Apr 2020 08:11:19 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03F8BJLt034170; Wed, 15 Apr 2020 08:11:19 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004150811.03F8BJLt034170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 15 Apr 2020 08:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r359960 - stable/12/lib/geom/eli X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/lib/geom/eli X-SVN-Commit-Revision: 359960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 08:11:19 -0000 Author: 0mp (doc,ports committer) Date: Wed Apr 15 08:11:19 2020 New Revision: 359960 URL: https://svnweb.freebsd.org/changeset/base/359960 Log: MFC 359125: Document geli(8) loader variables conventions The geli(8) manual page has an example for preloading keyfiles during boot. There is no detail though on how the lookup of these variables actually works. Let's document that the name of a device does not have to be a part of the variable. PR: 243261 Submitted by: johannes@jo-t.de Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24114 Modified: stable/12/lib/geom/eli/geli.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/geom/eli/geli.8 ============================================================================== --- stable/12/lib/geom/eli/geli.8 Wed Apr 15 05:55:14 2020 (r359959) +++ stable/12/lib/geom/eli/geli.8 Wed Apr 15 08:11:19 2020 (r359960) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2019 +.Dd March 19, 2020 .Dt GELI 8 .Os .Sh NAME @@ -988,6 +988,35 @@ geli_da1s3a_keyfile_load="YES" geli_da1s3a_keyfile_type="da1s3a:geli_keyfile" geli_da1s3a_keyfile_name="/boot/keys/da1s3a.key" .Ed +.Pp +By convention, these loader variables are called +.Sm off +.Va geli_ No < Ar device No > Va _load . +.Sm on +However, the actual name prefix before +.Va _load , _type , +or +.Va _name +does not matter. +At boot time, the +.Nm +module searches through all +.Sm off +.No < Va prefix No > Va _type No -like +.Sm on +variables that have a value of +.Sm off +.Dq < Ar device No > :geli_keyfile . +.Sm on +The paths to keyfiles are then extracted from +.Sm off +.No < Ar prefix No > Va _name +.Sm on +variables. +In the example above, +.Ar prefix +is +.Dq Li geli_da1s3a_keyfile . .Pp Not only configure encryption, but also data integrity verification using .Nm HMAC/SHA256 .