From nobody Wed Jul 31 14:54:27 2024 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WYw9N6Qbbz5S2C8 for ; Wed, 31 Jul 2024 14:54:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYw9N4gx1z4pyq; Wed, 31 Jul 2024 14:54:32 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6b5d3113168so33915066d6.2; Wed, 31 Jul 2024 07:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722437670; x=1723042470; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=bxaL3Ew9ncS++ie2m42RnHPVAS2+vzjwQDyrTX3smOA=; b=ADtMx4+JpzYfYY6uRXAlNfe+SS6VKV7bUifW0RW+rnk6QWqOzbBJ2IHNqxdB2O/5x+ nW236WR1NgN+Vx5KRR7G7Nxx2zyW3E9t/2Fo5+uegq2OYUU2Cr1m63XsMhTAARATaT21 vhm20Hzrjeopvdk/qkDFWfDlaifWKQ4MJga3IIelLiVLkrzek5wRefDSykdMVLNc2XKv Zgi4OXfcjy5yKNxcB2loelv9GA42lMAg95gu8Cc9gIL2cO66DUV9MzNfDBWID7nT7pOC OuCDHvcroCE+kiP71/Ymt8HePx4nqKuE0k0/g2WQ41lIEwKJG5ICFEi+DaRLBvnW1HoS OjLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722437670; x=1723042470; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bxaL3Ew9ncS++ie2m42RnHPVAS2+vzjwQDyrTX3smOA=; b=orVi0Ox2+Y2SIVllqgJlzlZwpmFWnoDJpV4PIXBtvb2Wz6w8XXqEzIcZUcHK7cD4Vk s0Cali4uPkF/YfHfZ8niwf6WHkSv2sicEBJBY5xQggRH4P9s3U6Y12JChWOKAEfc+DY/ baxFl/ePMS1ySQnn7lclh3aC+EnRohLfIdT3VQY8uRbye9h+V7fn7MmVX6jaL1uzAMCX nsCFzR2ERrcJG1U0dsuvvjMUBcft5Yblxl8hM9QOG6gXCkvtiYcwVOo03A4oY+5UBXDa 8P5zsGY+qAnvKkBRj2JE4+Tto9bxvL4pfPXIKdFsA5APc6pn357n1W6PI+Tv7diSl6gO O67w== X-Forwarded-Encrypted: i=1; AJvYcCWOWA8HwPksBiIYIRwgK280CdRPESxdRjMu32xRkdg+tc52rOt+cl64Z61wt8ut1OFNlF2FvQGIsX8D5IF/pstORKlcOnA= X-Gm-Message-State: AOJu0Yw08mGRtzh4nOw3uHnVf6w/mjvCYyYmDaUlBwoijgqVbJ5k504P lbayKAPHYZEbuDfQXBXClwkS5qlr8iDKzJq/VW7lpb8P2p+h8Wo5qGPrUbxb X-Google-Smtp-Source: AGHT+IG23nI70OLnVEtvRdC31JCdipmvPFmyhpEXgHtQbLMS2k78vbfhKASdCxLbOQS+cE82qrTuxw== X-Received: by 2002:a05:6214:f6a:b0:6b4:f644:9d87 with SMTP id 6a1803df08f44-6bb55a12189mr143957056d6.21.1722437669989; Wed, 31 Jul 2024 07:54:29 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3fab9ba9sm73436996d6.104.2024.07.31.07.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 07:54:29 -0700 (PDT) Date: Wed, 31 Jul 2024 10:54:27 -0400 From: Mark Johnston To: John Baldwin Cc: freebsd-current@freebsd.org, Allan Jude Subject: Re: aesni_load present in /boot/loader.conf on arm64 Message-ID: References: <281e4030-565c-41be-9fcd-401db30e7ff8@FreeBSD.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <281e4030-565c-41be-9fcd-401db30e7ff8@FreeBSD.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WYw9N4gx1z4pyq On Wed, Jul 31, 2024 at 10:48:15AM -0400, John Baldwin wrote: > On 7/31/24 08:15, void wrote: > > Hi, > > > > Looking at man 4 aesni it appears this pertains to intel and AMD only? > > is its prescence on arm64 a bug? > > > > It seems to be added to /boot/loader.conf by default. > > > > The method I used to install is to boot to the latest snapshot at > > the time, then plug in a usb3 disk, ran bsdinstall to that disk, > > rebooted (this booted initially to the installer image), mounted the > > msdos partition on /mnt. moved the /boot/efi/efi from the installed-to > > disk out of the way, copied everything in /mnt to /boot/efi, > > moved the /boot/efi/efi back to where it originally was, halted the machine and > > removed the installer image. This was to achieve zfs-on-root. > > > > Maybe something about the way I installed meant aesni was added? > > Looks like bsdinstall hardcodes aesni without doing an architecture > check for both ZFS and geli. > > Probably the bits of the zfsboot script referencing aesni need to > switch on the architecture. The trick is that depending on the > architecture you may want to load more than one module. For 14 > I think you could get by with something like: > > crypto_kld() > { > case `uname -m` in > amd64|i386) > echo "aesni" > ;; > arm64) > echo "armv8crypto" > ;; > *) > echo "" > } > > Then in the other parts of zfsboot call this function and treat it as > a list of modules. On main I think you would want 32-bit arm and > powerpc64 to list ossl, and you might want to include ossl for > x86 and arm64 as well (eventually ossl should replace aesni and > armv8crypto IMO). Note that aesni has been compiled into amd64 kernels for a while, so it's not really necessary to load aesni.ko explicitly unless one is using a custom kernel. But yes, your proposal is better than loading nothing at all. > Side topic: the ossl(4) manpage in main is stale and needs to be updated > to reflect armv7 and powerpc64 support. I'm not sure yet if it supports > AES-GCM for armv8 as well. No, I don't believe AES-GCM is supported on arm64. I'll work on getting the man page updated this week.