HomeFreeBSD

zfskeys: Support autoloading of keys stored on ZFS

Description

zfskeys: Support autoloading of keys stored on ZFS

The zfskeys service script starts before the zfs service script, so that
dataset decryption keys are available when zfs mount -a is run. One of
the potential edge cases of this design is that if a key is stored on
ZFS it won't be loaded until zfs mount -a is issued.

In order to address that let's try to load the additional keys and mount
related ZFS datasets after the zfs script finishes its standard mounting
procedure.

PR: 262468
Reported by: Graham Perrin <grahamperrin@gmail.com>
Reviewed by: allanjude
Approved by: re (delphij)
Approved by: allanjude (src)
Fixes: 33ff39796ffe Add zfskeys rc.d script for auto-loading encryption keys
Sponsored by: Modirum
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34601

(cherry picked from commit 97aeda2243568b386d792514996a06daec55eece)
(cherry picked from commit 2411090f69401998569f24144b08ffc050e3cebc)

Details

Provenance
0mpAuthored on Mar 18 2022, 12:35 PM
gjbCommitted on Mar 23 2022, 8:27 PM
Reviewer
rG33ff39796ffe: Add zfskeys rc.d script for auto-loading encryption keys
Differential Revision
D34601: zfskeys: Support autoloading of keys stored on ZFS
Parents
rGf5f567c2264b: Make the arm64 get_pcpu a function again
Branches
Unknown
Tags
Unknown