git: ffbaa453c191 - main - bsdinstall: Stop loading cryptodev for ZFS installations

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 08 May 2024 16:11:17 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=ffbaa453c1914846ede99d9b8499eb9b52b77e9a

commit ffbaa453c1914846ede99d9b8499eb9b52b77e9a
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-05-08 16:01:52 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-05-08 16:01:52 +0000

    bsdinstall: Stop loading cryptodev for ZFS installations
    
    - zfs depends on the crypto module, not cryptodev, and most arm64 kernel
      configs include std.dev, which includes "device crypto" anyway.
    - This config works around a problem with kldxref lacking cross-target
      support, but that has since been fixed.
    - Loading cryptodev creates /dev/crypto, which gives unprivileged users
      access to the kernel's opencrypto framework.  Very few applications
      need it, so we're needlessly increasing the kernel's surface area.
    
    Thus, stop auto-loading cryptodev.
    
    Reviewed by:    kevans, allanjude, des
    Differential Revision:  https://reviews.freebsd.org/D45127
---
 usr.sbin/bsdinstall/scripts/config | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/config b/usr.sbin/bsdinstall/scripts/config
index 093d38ee0a59..ba39b8bdf305 100755
--- a/usr.sbin/bsdinstall/scripts/config
+++ b/usr.sbin/bsdinstall/scripts/config
@@ -43,9 +43,6 @@ cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc
 
 cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf
 rm $BSDINSTALL_TMPBOOT/loader.conf.*
-# The 'cryptodev_load' line is a workaround for arm64, which does not
-# automatically load cryptodev.ko with zfs.ko.
-df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "cryptodev_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf
 df -t zfs $BSDINSTALL_CHROOT > /dev/null && echo "zfs_load=\"YES\"" >> $BSDINSTALL_TMPBOOT/loader.conf
 
 cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot