aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc135
-rw-r--r--Makefile.libcompat6
-rw-r--r--ObsoleteFiles.inc1
-rw-r--r--RELNOTES14
-rw-r--r--UPDATING22
-rw-r--r--cddl/lib/libicp/Makefile2
-rw-r--r--cddl/lib/libicp_rescue/Makefile2
-rw-r--r--contrib/one-true-awk/FIXES8
-rw-r--r--contrib/one-true-awk/main.c2
-rw-r--r--contrib/one-true-awk/run.c4
-rw-r--r--contrib/tcpdump/print-pfsync.c12
-rw-r--r--crypto/krb5/src/lib/gssapi/krb5/util_crypt.c10
-rw-r--r--crypto/krb5/src/lib/gssapi/krb5/verify_mic.c11
-rw-r--r--crypto/openssl/BSDmakefile99
-rwxr-xr-xcrypto/openssl/apps/CA.pl2
-rw-r--r--crypto/openssl/apps/progs.c11
-rw-r--r--crypto/openssl/apps/progs.h4
-rwxr-xr-xcrypto/openssl/configdata.pm2295
-rw-r--r--crypto/openssl/exporters/libcrypto.pc13
-rw-r--r--crypto/openssl/exporters/libssl.pc11
-rw-r--r--crypto/openssl/exporters/openssl.pc9
-rw-r--r--crypto/openssl/freebsd/dump_version_from_configdata.pl21
-rw-r--r--crypto/openssl/freebsd/include/crypto/bn_conf.h27
-rw-r--r--crypto/openssl/freebsd/include/openssl/configuration.h38
-rw-r--r--crypto/openssl/include/crypto/bn_conf.h27
-rw-r--r--crypto/openssl/include/openssl/configuration.h53
-rw-r--r--crypto/openssl/include/openssl/fipskey.h2
-rw-r--r--crypto/openssl/include/openssl/opensslv.h2
-rw-r--r--crypto/openssl/libcrypto.pc13
-rw-r--r--crypto/openssl/libssl.pc11
-rw-r--r--crypto/openssl/openssl.pc9
-rwxr-xr-xcrypto/openssl/tools/c_rehash6
-rwxr-xr-xcrypto/openssl/util/shlib_wrap.sh4
-rwxr-xr-xcrypto/openssl/util/wrap.pl8
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--etc/mtree/BSD.usr.dist2
-rw-r--r--include/Makefile2
-rw-r--r--kerberos5/Makefile.inc2
-rw-r--r--kerberos5/lib/Makefile2
-rw-r--r--kerberos5/libexec/Makefile2
-rw-r--r--krb5/Makefile2
-rw-r--r--krb5/Makefile.et2
-rw-r--r--krb5/Makefile.inc4
-rw-r--r--krb5/Makefile.pc (renamed from krb5/libdata/Makefile)30
-rw-r--r--krb5/include/Makefile2
-rw-r--r--krb5/include/Makefile.inc2
-rw-r--r--krb5/include/autoconf.h4
-rw-r--r--krb5/include/gssapi/Makefile2
-rw-r--r--krb5/include/gssrpc/Makefile2
-rw-r--r--krb5/include/krb5/Makefile2
-rw-r--r--krb5/lib/Makefile2
-rw-r--r--krb5/lib/Makefile.inc2
-rw-r--r--krb5/lib/apputils/Makefile2
-rw-r--r--krb5/lib/crypto/Makefile2
-rw-r--r--krb5/lib/crypto/builtin/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/aes/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/camellia/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/des/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/enc_provider/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/hash_provider/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/md4/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/md5/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/sha1/Makefile.inc2
-rw-r--r--krb5/lib/crypto/builtin/sha2/Makefile.inc2
-rw-r--r--krb5/lib/crypto/krb/Makefile.inc2
-rw-r--r--krb5/lib/crypto/openssl/Makefile.inc2
-rw-r--r--krb5/lib/crypto/openssl/des/Makefile.inc2
-rw-r--r--krb5/lib/crypto/openssl/enc_provider/Makefile.inc2
-rw-r--r--krb5/lib/crypto/openssl/hash_provider/Makefile.inc2
-rw-r--r--krb5/lib/gssapi/Makefile15
-rw-r--r--krb5/lib/gssapi/generic/Makefile.et2
-rw-r--r--krb5/lib/gssapi/generic/Makefile.inc2
-rw-r--r--krb5/lib/gssapi/krb5/Makefile.et2
-rw-r--r--krb5/lib/gssapi/krb5/Makefile.inc2
-rw-r--r--krb5/lib/gssapi/mechglue/Makefile.inc2
-rw-r--r--krb5/lib/gssapi/spnego/Makefile.inc2
-rw-r--r--krb5/lib/kadm5clnt/Makefile15
-rw-r--r--krb5/lib/kadm5clnt/clnt/Makefile.inc2
-rw-r--r--krb5/lib/kadm5srv/Makefile15
-rw-r--r--krb5/lib/kadm5srv/srv/Makefile.inc2
-rw-r--r--krb5/lib/kadmin_common/Makefile2
-rw-r--r--krb5/lib/kdb/Makefile15
-rw-r--r--krb5/lib/kprop_util/Makefile2
-rw-r--r--krb5/lib/krad/Makefile2
-rw-r--r--krb5/lib/krb5/Makefile16
-rw-r--r--krb5/lib/krb5/asn.1/Makefile.inc2
-rw-r--r--krb5/lib/krb5/ccache/Makefile.inc2
-rw-r--r--krb5/lib/krb5/docs/Makefile.inc2
-rw-r--r--krb5/lib/krb5/error_tables/Makefile.inc2
-rw-r--r--krb5/lib/krb5/keytab/Makefile.inc2
-rw-r--r--krb5/lib/krb5/krb/Makefile.inc2
-rw-r--r--krb5/lib/krb5/os/Makefile.inc2
-rw-r--r--krb5/lib/krb5/rcache/Makefile.inc2
-rw-r--r--krb5/lib/krb5/unicode/Makefile.inc2
-rw-r--r--krb5/lib/rpc/Makefile15
-rw-r--r--krb5/libexec/Makefile4
-rw-r--r--krb5/libexec/Makefile.inc2
-rw-r--r--krb5/libexec/kadmind/Makefile2
-rw-r--r--krb5/libexec/kdc/Makefile2
-rw-r--r--krb5/libexec/kprop/Makefile2
-rw-r--r--krb5/libexec/kpropd/Makefile2
-rw-r--r--krb5/libexec/kproplog/Makefile2
-rw-r--r--krb5/plugins/Makefile2
-rw-r--r--krb5/plugins/Makefile.inc2
-rw-r--r--krb5/plugins/audit/Makefile2
-rw-r--r--krb5/plugins/k5tls/Makefile2
-rw-r--r--krb5/plugins/kdb/Makefile2
-rw-r--r--krb5/plugins/kdb/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/Makefile2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/db/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/include/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc2
-rw-r--r--krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc2
-rw-r--r--krb5/plugins/preauth/Makefile2
-rw-r--r--krb5/plugins/preauth/Makefile.inc2
-rw-r--r--krb5/plugins/preauth/otp/Makefile2
-rw-r--r--krb5/plugins/preauth/pkinit/Makefile2
-rw-r--r--krb5/plugins/preauth/spake/Makefile2
-rw-r--r--krb5/plugins/preauth/test/Makefile2
-rw-r--r--krb5/usr.bin/Makefile2
-rw-r--r--krb5/usr.bin/Makefile.inc2
-rw-r--r--krb5/usr.bin/gss-client/Makefile2
-rw-r--r--krb5/usr.bin/kadmin/Makefile2
-rw-r--r--krb5/usr.bin/kdestroy/Makefile2
-rw-r--r--krb5/usr.bin/kinit/Makefile2
-rw-r--r--krb5/usr.bin/klist/Makefile2
-rw-r--r--krb5/usr.bin/kpasswd/Makefile2
-rw-r--r--krb5/usr.bin/ksu/Makefile2
-rw-r--r--krb5/usr.bin/kswitch/Makefile2
-rw-r--r--krb5/usr.bin/ktutil/Makefile2
-rw-r--r--krb5/usr.bin/kvno/Makefile2
-rw-r--r--krb5/usr.bin/sclient/Makefile2
-rw-r--r--krb5/usr.bin/sim_client/Makefile2
-rw-r--r--krb5/usr.sbin/Makefile4
-rw-r--r--krb5/usr.sbin/Makefile.inc2
-rw-r--r--krb5/usr.sbin/gss-server/Makefile2
-rw-r--r--krb5/usr.sbin/kadmin.local/Makefile2
-rw-r--r--krb5/usr.sbin/kdb5_util/Makefile2
-rw-r--r--krb5/usr.sbin/sim_server/Makefile2
-rw-r--r--krb5/usr.sbin/sserver/Makefile2
-rw-r--r--krb5/util/Makefile2
-rw-r--r--krb5/util/Makefile.inc2
-rw-r--r--krb5/util/build-tools/Makefile2
-rwxr-xr-xkrb5/util/build-tools/krb5-config.sh2
-rw-r--r--krb5/util/compile_et/Makefile2
-rw-r--r--krb5/util/et/Makefile11
-rw-r--r--krb5/util/profile/Makefile2
-rw-r--r--krb5/util/ss/Makefile2
-rw-r--r--krb5/util/support/Makefile2
-rw-r--r--krb5/util/verto/Makefile2
-rw-r--r--lib/Makefile6
-rw-r--r--lib/libc/i386/gen/makecontext.c2
-rw-r--r--lib/libc/net/gai_strerror.c44
-rw-r--r--lib/libc/stdlib/malloc/jemalloc/Makefile.inc2
-rw-r--r--lib/libifconfig/Symbol.map2
-rw-r--r--lib/libifconfig/libifconfig.h1
-rw-r--r--lib/libpfctl/libpfctl.c22
-rw-r--r--lib/libprocstat/libprocstat.c3
-rw-r--r--lib/libsys/stat.25
-rw-r--r--lib/libutil/mntopts.c1
-rw-r--r--libexec/rc/rc.d/Makefile2
-rw-r--r--sbin/pfctl/pfctl.824
-rw-r--r--sbin/pfctl/pfctl_radix.c3
-rw-r--r--secure/lib/libcrypto/Makefile5
-rw-r--r--secure/lib/libcrypto/Makefile.common2
-rw-r--r--secure/lib/libcrypto/Makefile.inc3
-rw-r--r--secure/lib/libcrypto/Makefile.version2
-rw-r--r--secure/lib/libssl/Makefile2
-rw-r--r--secure/libexec/sshd-session/Makefile2
-rw-r--r--secure/ssh.mk3
-rw-r--r--secure/usr.bin/ssh/Makefile2
-rw-r--r--secure/usr.sbin/sshd/Makefile2
-rw-r--r--share/man/man4/Makefile1
-rw-r--r--share/man/man4/iflib.414
-rw-r--r--share/man/man4/ioat.42
-rw-r--r--share/man/man4/iwlwifi.44
-rw-r--r--share/man/man4/iwx.42
-rw-r--r--share/man/man4/man4.aarch64/armv8crypto.42
-rw-r--r--share/man/man4/man4.aarch64/enetc.42
-rw-r--r--share/man/man4/man4.aarch64/felix.42
-rw-r--r--share/man/man4/man4.aarch64/rk_gpio.42
-rw-r--r--share/man/man4/man4.aarch64/rk_grf.42
-rw-r--r--share/man/man4/man4.aarch64/rk_grf_gpio.42
-rw-r--r--share/man/man4/man4.aarch64/rk_i2c.42
-rw-r--r--share/man/man4/man4.aarch64/rk_pinctrl.42
-rw-r--r--share/man/man4/man4.arm/am335x_dmtpps.42
-rw-r--r--share/man/man4/man4.arm/aw_gpio.42
-rw-r--r--share/man/man4/man4.arm/aw_mmc.42
-rw-r--r--share/man/man4/man4.arm/aw_rtc.42
-rw-r--r--share/man/man4/man4.arm/aw_sid.42
-rw-r--r--share/man/man4/man4.arm/aw_spi.42
-rw-r--r--share/man/man4/man4.arm/aw_syscon.42
-rw-r--r--share/man/man4/man4.arm/bcm283x_pwm.42
-rw-r--r--share/man/man4/man4.arm/devcfg.42
-rw-r--r--share/man/man4/man4.arm/imx6_ahci.42
-rw-r--r--share/man/man4/man4.arm/imx6_snvs.42
-rw-r--r--share/man/man4/man4.arm/imx_spi.42
-rw-r--r--share/man/man4/man4.arm/imx_wdog.42
-rw-r--r--share/man/man4/man4.arm/mge.42
-rw-r--r--share/man/man4/man4.arm/ti_adc.42
-rw-r--r--share/man/man4/man4.powerpc/abtn.42
-rw-r--r--share/man/man4/man4.powerpc/adb.42
-rw-r--r--share/man/man4/man4.powerpc/akbd.42
-rw-r--r--share/man/man4/man4.powerpc/ams.42
-rw-r--r--share/man/man4/man4.powerpc/cuda.42
-rw-r--r--share/man/man4/man4.powerpc/dtsec.42
-rw-r--r--share/man/man4/man4.powerpc/llan.42
-rw-r--r--share/man/man4/man4.powerpc/pmu.42
-rw-r--r--share/man/man4/man4.powerpc/smu.42
-rw-r--r--share/man/man4/man4.powerpc/snd_ai2s.42
-rw-r--r--share/man/man4/man4.powerpc/snd_davbus.42
-rw-r--r--share/man/man4/man4.powerpc/tsec.42
-rw-r--r--share/man/man4/nvdimm.42
-rw-r--r--share/man/man4/qlnxe.42
-rw-r--r--share/man/man4/qlxgb.42
-rw-r--r--share/man/man4/qlxgbe.42
-rw-r--r--share/man/man4/qlxge.42
-rw-r--r--share/man/man4/sfxge.42
-rw-r--r--share/man/man4/smartpqi.42
-rw-r--r--share/man/man4/sume.42
-rw-r--r--share/man/man4/tap.415
-rw-r--r--share/man/man4/tun.415
-rw-r--r--share/man/man4/u2f.496
-rw-r--r--share/man/man4/umb.428
-rw-r--r--share/man/man5/src.conf.529
-rw-r--r--share/man/man7/hier.717
-rw-r--r--share/mk/Makefile1
-rw-r--r--share/mk/bsd.README1
-rw-r--r--share/mk/bsd.debug.mk68
-rw-r--r--share/mk/bsd.endian.mk13
-rw-r--r--share/mk/bsd.lib.mk52
-rw-r--r--share/mk/bsd.opts.mk1
-rw-r--r--share/mk/bsd.own.mk7
-rw-r--r--share/mk/bsd.prog.mk55
-rw-r--r--share/mk/local.dirdeps.mk2
-rw-r--r--share/mk/src.opts.mk4
-rw-r--r--share/mk/src.sys.mk2
-rw-r--r--stand/common/dev_net.c41
-rw-r--r--stand/common/misc.c13
-rw-r--r--stand/defs.mk2
-rw-r--r--stand/efi/include/amd64/pe.h2
-rw-r--r--stand/efi/include/i386/pe.h2
-rw-r--r--stand/kboot/kboot/main.c49
-rw-r--r--stand/libsa/bzipfs.c1
-rw-r--r--stand/libsa/cd9660.c1
-rw-r--r--stand/libsa/dosfs.c1
-rw-r--r--stand/libsa/ext2fs.c1
-rw-r--r--stand/libsa/globals.c1
-rw-r--r--stand/libsa/gzipfs.c1
-rw-r--r--stand/libsa/libsa.34
-rw-r--r--stand/libsa/mount.c5
-rw-r--r--stand/libsa/net.h1
-rw-r--r--stand/libsa/nfs.c1
-rw-r--r--stand/libsa/open.c41
-rw-r--r--stand/libsa/pkgfs.c1
-rw-r--r--stand/libsa/splitfs.c1
-rw-r--r--stand/libsa/stand.h6
-rw-r--r--stand/libsa/tftp.c154
-rw-r--r--stand/libsa/ufs.c1
-rw-r--r--stand/libsa/zfs/zfsimpl.c227
-rw-r--r--stand/loader.mk2
-rw-r--r--sys/amd64/conf/GENERIC1
-rw-r--r--sys/arm/arm/pmu_fdt.c4
-rw-r--r--sys/arm/conf/GENERIC1
-rw-r--r--sys/arm64/arm64/elf32_machdep.c2
-rw-r--r--sys/arm64/conf/std.dev1
-rw-r--r--sys/cddl/boot/zfs/zfsimpl.h4
-rw-r--r--sys/compat/linuxkpi/common/include/linux/ieee80211.h16
-rw-r--r--sys/compat/linuxkpi/common/include/net/cfg80211.h15
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h6
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c4
-rw-r--r--sys/conf/NOTES4
-rw-r--r--sys/conf/files4
-rw-r--r--sys/conf/files.amd643
-rw-r--r--sys/conf/kern.post.mk19
-rw-r--r--sys/conf/kern.pre.mk3
-rw-r--r--sys/conf/kmod.mk23
-rw-r--r--sys/conf/newvers.sh8
-rw-r--r--sys/conf/options1
-rwxr-xr-xsys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh2
-rwxr-xr-xsys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh23
-rw-r--r--sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml13
-rw-r--r--sys/contrib/openzfs/.mailmap4
-rw-r--r--sys/contrib/openzfs/AUTHORS13
-rw-r--r--sys/contrib/openzfs/META2
-rw-r--r--sys/contrib/openzfs/cmd/zdb/zdb.c61
-rw-r--r--sys/contrib/openzfs/config/kernel-mkdir.m42
-rw-r--r--sys/contrib/openzfs/config/toolchain-simd.m444
-rw-r--r--sys/contrib/openzfs/contrib/debian/control8
-rw-r--r--sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE253
-rw-r--r--sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README11
-rw-r--r--sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S1328
-rw-r--r--sys/contrib/openzfs/contrib/initramfs/scripts/zfs3
-rw-r--r--sys/contrib/openzfs/include/os/linux/kernel/linux/simd_x86.h26
-rw-r--r--sys/contrib/openzfs/include/os/linux/zfs/sys/trace_zil.h6
-rw-r--r--sys/contrib/openzfs/include/sys/spa.h2
-rw-r--r--sys/contrib/openzfs/include/sys/zil_impl.h18
-rw-r--r--sys/contrib/openzfs/include/sys/zio.h29
-rw-r--r--sys/contrib/openzfs/include/sys/zvol_impl.h5
-rw-r--r--sys/contrib/openzfs/lib/libicp/Makefile.am1
-rw-r--r--sys/contrib/openzfs/lib/libspl/include/sys/simd.h28
-rw-r--r--sys/contrib/openzfs/lib/libzpool/kernel.c75
-rw-r--r--sys/contrib/openzfs/lib/libzutil/zutil_import.c39
-rw-r--r--sys/contrib/openzfs/man/man4/zfs.44
-rw-r--r--sys/contrib/openzfs/man/man8/zdb.814
-rw-r--r--sys/contrib/openzfs/man/man8/zfs-send.824
-rw-r--r--sys/contrib/openzfs/module/Kbuild.in1
-rw-r--r--sys/contrib/openzfs/module/icp/algs/modes/gcm.c371
-rw-r--r--sys/contrib/openzfs/module/icp/algs/modes/modes.c2
-rw-r--r--sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl253
-rw-r--r--sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip1
-rw-r--r--sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S1323
-rw-r--r--sys/contrib/openzfs/module/icp/include/modes/modes.h13
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c7
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c44
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c8
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c210
-rw-r--r--sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c153
-rw-r--r--sys/contrib/openzfs/module/zcommon/simd_stat.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/dbuf.c7
-rw-r--r--sys/contrib/openzfs/module/zfs/multilist.c4
-rw-r--r--sys/contrib/openzfs/module/zfs/spa_config.c115
-rw-r--r--sys/contrib/openzfs/module/zfs/spa_misc.c8
-rw-r--r--sys/contrib/openzfs/module/zfs/zil.c349
-rw-r--r--sys/contrib/openzfs/module/zfs/zio.c51
-rw-r--r--sys/contrib/openzfs/module/zfs/zvol.c281
-rw-r--r--sys/contrib/openzfs/module/zstd/zfs_zstd.c8
-rwxr-xr-xsys/contrib/openzfs/scripts/spdxcheck.pl1
-rw-r--r--sys/contrib/openzfs/tests/runfiles/common.run2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/cmd/crypto_test.c2
-rw-r--r--sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am1
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh66
-rw-r--r--sys/crypto/ccp/ccp.c2
-rw-r--r--sys/dev/acpica/acpi_powerres.c274
-rw-r--r--sys/dev/acpica/acpivar.h1
-rw-r--r--sys/dev/bnxt/bnxt_re/qplib_res.c4
-rw-r--r--sys/dev/e1000/e1000_phy.c5
-rw-r--r--sys/dev/e1000/if_em.c44
-rw-r--r--sys/dev/fdt/fdt_common.c2
-rw-r--r--sys/dev/fdt/fdt_common.h7
-rw-r--r--sys/dev/gpio/acpi_gpiobus.c165
-rw-r--r--sys/dev/gpio/acpi_gpiobusvar.h6
-rw-r--r--sys/dev/gpio/gpioaei.c204
-rw-r--r--sys/dev/gpio/gpiobus.c19
-rw-r--r--sys/dev/gpio/gpiobus_internal.h2
-rw-r--r--sys/dev/gpio/ofw_gpiobus.c14
-rw-r--r--sys/dev/hid/hidbus.c41
-rw-r--r--sys/dev/hid/hidquirk.h1
-rw-r--r--sys/dev/hid/hidraw.c12
-rw-r--r--sys/dev/hid/ietp.c31
-rw-r--r--sys/dev/hid/u2f.c590
-rw-r--r--sys/dev/ice/ice_bitops.h4
-rw-r--r--sys/dev/ice/ice_lan_tx_rx.h2
-rw-r--r--sys/dev/ice/ice_lib.h2
-rw-r--r--sys/dev/ice/ice_protocol_type.h2
-rw-r--r--sys/dev/iicbus/iichid.c3
-rw-r--r--sys/dev/isci/scil/intel_sata.h2
-rw-r--r--sys/dev/ixgbe/if_ix.c231
-rw-r--r--sys/dev/ixgbe/if_ixv.c6
-rw-r--r--sys/dev/ixgbe/ixgbe.h11
-rw-r--r--sys/dev/ixgbe/ixgbe_api.c16
-rw-r--r--sys/dev/ixgbe/ixgbe_api.h1
-rw-r--r--sys/dev/ixgbe/ixgbe_common.c25
-rw-r--r--sys/dev/ixgbe/ixgbe_e610.c5567
-rw-r--r--sys/dev/ixgbe/ixgbe_e610.h224
-rw-r--r--sys/dev/ixgbe/ixgbe_osdep.c26
-rw-r--r--sys/dev/ixgbe/ixgbe_osdep.h31
-rw-r--r--sys/dev/ixgbe/ixgbe_type.h69
-rw-r--r--sys/dev/ixgbe/ixgbe_type_e610.h2278
-rw-r--r--sys/dev/ixgbe/ixgbe_vf.c3
-rw-r--r--sys/dev/ixl/if_ixl.c25
-rw-r--r--sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c2
-rw-r--r--sys/dev/psci/smccc_trng.c2
-rw-r--r--sys/dev/qcom_rnd/qcom_rnd.c2
-rw-r--r--sys/dev/random/armv8rng.c2
-rw-r--r--sys/dev/random/darn.c2
-rw-r--r--sys/dev/random/ivy.c2
-rw-r--r--sys/dev/random/nehemiah.c2
-rw-r--r--sys/dev/random/random_harvestq.c12
-rw-r--r--sys/dev/random/randomdev.h4
-rw-r--r--sys/dev/usb/input/uhid.c6
-rw-r--r--sys/dev/usb/input/usbhid.c8
-rw-r--r--sys/dev/usb/usb_device.c48
-rw-r--r--sys/dev/usb/usb_generic.c37
-rw-r--r--sys/dev/usb/usbdi.h3
-rw-r--r--sys/dev/virtio/mmio/virtio_mmio.c48
-rw-r--r--sys/dev/virtio/mmio/virtio_mmio.h1
-rw-r--r--sys/dev/virtio/mmio/virtio_mmio_fdt.c47
-rw-r--r--sys/dev/virtio/mmio/virtio_mmio_if.m99
-rw-r--r--sys/dev/virtio/random/virtio_random.c2
-rw-r--r--sys/dev/virtio/virtio_bus_if.m4
-rw-r--r--sys/dev/virtio/virtqueue.c2
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c12
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c16
-rw-r--r--sys/fs/fuse/fuse_vnops.c2
-rw-r--r--sys/fs/nfs/nfsport.h12
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c2
-rw-r--r--sys/fs/p9fs/p9fs_vnops.c2
-rw-r--r--sys/fs/tarfs/tarfs_vnops.c5
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c2
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c17
-rw-r--r--sys/geom/part/g_part.c6
-rw-r--r--sys/i386/conf/GENERIC1
-rw-r--r--sys/isa/isareg.h2
-rw-r--r--sys/kern/vfs_bio.c2
-rw-r--r--sys/kern/vfs_syscalls.c2
-rw-r--r--sys/modules/hid/Makefile1
-rw-r--r--sys/modules/hid/u2f/Makefile8
-rw-r--r--sys/modules/ix/Makefile2
-rw-r--r--sys/modules/ixv/Makefile2
-rw-r--r--sys/modules/rtw88/Makefile1
-rw-r--r--sys/modules/rtw89/Makefile1
-rw-r--r--sys/modules/zfs/Makefile7
-rw-r--r--sys/modules/zfs/zfs_config.h16
-rw-r--r--sys/modules/zfs/zfs_gitrev.h2
-rw-r--r--sys/net/if_clone.h2
-rw-r--r--sys/net/if_pfsync.h4
-rw-r--r--sys/net/if_tap.h2
-rw-r--r--sys/net/if_tun.h2
-rw-r--r--sys/net/if_tuntap.c88
-rw-r--r--sys/net/iflib.c92
-rw-r--r--sys/net/pfvar.h69
-rw-r--r--sys/netinet/ip_icmp.c3
-rw-r--r--sys/netinet/udp_usrreq.c2
-rw-r--r--sys/netinet6/udp6_usrreq.c2
-rw-r--r--sys/netlink/route/iface_drivers.c12
-rw-r--r--sys/netpfil/pf/if_pfsync.c12
-rw-r--r--sys/netpfil/pf/pf.c38
-rw-r--r--sys/netpfil/pf/pf_nl.c2
-rw-r--r--sys/powerpc/conf/GENERIC641
-rw-r--r--sys/powerpc/conf/GENERIC64LE1
-rw-r--r--sys/riscv/conf/GENERIC1
-rw-r--r--sys/riscv/starfive/jh7110_pcie.c12
-rw-r--r--sys/security/mac_do/mac_do.c48
-rw-r--r--sys/sys/conf.h1
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/vnode.h9
-rw-r--r--sys/ufs/ffs/ffs_vnops.c12
-rw-r--r--sys/ufs/ufs/ufs_vnops.c26
-rw-r--r--sys/vm/vnode_pager.c3
-rw-r--r--tests/sys/fs/fusefs/mockfs.cc2
-rw-r--r--tests/sys/net/Makefile1
-rwxr-xr-xtests/sys/net/if_tun_test.sh22
-rw-r--r--tests/sys/net/transient_tuntap.c54
-rw-r--r--tests/sys/netpfil/pf/table.sh24
-rw-r--r--tools/build/Makefile1
-rwxr-xr-xtools/build/depend-cleanup.sh64
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc3509
-rw-r--r--tools/build/options/WITHOUT_GSSAPI1
-rw-r--r--tools/build/options/WITHOUT_KERBEROS2
-rw-r--r--tools/build/options/WITH_CLEAN4
-rwxr-xr-xtools/test/netfibs/reflector.sh2
-rw-r--r--tools/tools/usbtest/usb_msc_test.c4
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.bin/localedef/localedef.12
-rw-r--r--usr.bin/tcopy/tcopy.cc2
-rw-r--r--usr.sbin/Makefile4
-rw-r--r--usr.sbin/certctl/Makefile11
-rw-r--r--usr.sbin/certctl/certctl.896
-rw-r--r--usr.sbin/certctl/certctl.c1114
-rwxr-xr-xusr.sbin/certctl/certctl.sh366
-rw-r--r--usr.sbin/certctl/tests/Makefile5
-rw-r--r--usr.sbin/certctl/tests/certctl.subr44
-rw-r--r--usr.sbin/certctl/tests/certctl_test.sh332
-rw-r--r--usr.sbin/pw/pw.89
-rw-r--r--usr.sbin/pw/pw.c1
-rw-r--r--usr.sbin/pw/pw_user.c18
-rw-r--r--usr.sbin/pw/pwupd.h1
-rw-r--r--usr.sbin/services_mkdb/services2
-rw-r--r--usr.sbin/syslogd/syslogd.c5
-rwxr-xr-xusr.sbin/unbound/setup/local-unbound-setup.sh2
474 files changed, 18489 insertions, 7885 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index d8853fef321b..d899f994a40d 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1051,7 +1051,7 @@ DESTDIR_MTREE= ${DISTR_MTREECMD} ${DESTDIR_MTREEFLAGS}
METALOG_SORT_CMD= env -i LC_COLLATE=C sort
# kernel stage
-KMAKEENV= ${WMAKEENV:NSYSROOT=*}
+KMAKEENV= ${WMAKEENV}
KMAKE= ${TIME_ENV} ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
#
@@ -1417,7 +1417,7 @@ _sysctl=sysctl
.endif
ITOOLS= [ awk cap_mkdb cat chflags chmod chown cmp cp \
- date echo egrep find grep id install ${_install-info} \
+ date echo egrep find grep id install \
ln make mkdir mtree mv pwd_mkdb \
rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc
@@ -1542,14 +1542,10 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
.endif # make(distributeworld)
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
${IMAKEENV} rm -rf ${INSTALLTMP}
-.if !make(packageworld) && ${MK_CAROOT} != "no"
- @if which openssl>/dev/null; then \
- PATH=${TMPPATH:Q}:${PATH:Q} \
- LOCALBASE=${LOCALBASE:Q} \
- sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash; \
- else \
- echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \
- fi
+.if !make(packageworld) && ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no"
+ PATH=${TMPPATH:Q}:${PATH:Q} \
+ LOCALBASE=${LOCALBASE:Q} \
+ certctl ${CERTCTLFLAGS} rehash
.endif
.if make(distributeworld)
.for dist in ${EXTRA_DISTRIBUTIONS}
@@ -2713,6 +2709,17 @@ _basic_bootstrap_tools+=sbin/md5
_basic_bootstrap_tools+=usr.sbin/tzsetup
.endif
+# certctl is needed as an install tool. libcrypto is rather heavy, so we'll
+# build that alongside it only for platforms that don't expose headers for
+# OpenSSL, like macOS.
+.if ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no"
+.if ${.MAKE.OS} == "Darwin"
+_bootstrap_libcrypto=secure/lib/libcrypto
+${_bt}-usr.sbin/certctl: ${_bt}-secure/lib/libcrypto
+.endif
+_certctl=usr.sbin/certctl
+.endif
+
.if defined(BOOTSTRAP_ALL_TOOLS)
_other_bootstrap_tools+=${_basic_bootstrap_tools}
.for _subdir _links in ${_basic_bootstrap_tools_multilink}
@@ -2776,6 +2783,8 @@ bootstrap-tools: ${_bt}-links .PHONY
${_strfile} \
usr.bin/dtc \
${_cat} \
+ ${_bootstrap_libcrypto} \
+ ${_certctl} \
${_kbdcontrol} \
${_elftoolchain_libs} \
${_libkldelf} \
@@ -3378,7 +3387,7 @@ secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
secure/lib/libssh__L: lib/libldns__L
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} != "no"
secure/lib/libssh__L: krb5/lib/gssapi__L krb5/lib/krb5__L \
krb5/lib/crypto__L krb5/util/et__L lib/libmd__L krb5/util/support__L
@@ -3437,11 +3446,9 @@ kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbas
lib/libsqlite3__L: lib/libthr__L
-.if ${MK_GSSAPI} != "no"
-.if ${MK_MITKRB5} == "no"
+.if ${MK_KERBEROS} != "no" && ${MK_MITKRB5} == "no"
_lib_libgssapi= lib/libgssapi
.endif
-.endif
.if ${MK_KERBEROS} != "no"
.if ${MK_MITKRB5} != "no"
diff --git a/Makefile.libcompat b/Makefile.libcompat
index 2fdc1439b916..d165bba341c8 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -93,7 +93,11 @@ _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib
_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib
.if ${MK_MITKRB5} != "no"
_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/lib
-_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util
+# Only include the parts of krb5/util that build libraries, not executables.
+_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/et
+_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/profile
+_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/support
+_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/verto
.else
_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib
.endif
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index aaec7ace84fc..95d4c06fe07e 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -76,7 +76,6 @@ OLD_FILES+=usr/lib/libopencsd.so
# 20250801: Move compile_et to /usr/sbin
OLD_FILES+=usr/share/et/compile_et
-OLD_DIRS+=usr/share/et
# 20250728: zfsboot (MBR) removed
OLD_FILES+=boot/zfsboot
diff --git a/RELNOTES b/RELNOTES
index 6e962d2df910..3aec631bc15e 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -10,6 +10,10 @@ newline. Entries should be separated by a newline.
Changes to this file should not be MFCed.
+dc5ba6b8b4f0:
+ The WITHOUT_GSSAPI src.conf(5) option has been removed. The GSSAPI
+ libraries are now always built unless WITHOUT_KERBEROS is set.
+
c43cad871720:
jemalloc 5.3.0 has landed. See contrib/jemalloc/ChangeLog
for the long list of changes.
@@ -85,6 +89,16 @@ f1f230439fa4:
and obj NFSv4 mounted, the total RPC count dropped from
5461286 to 945643, with a 20% drop in elapsed time.
+c3fc0db3bc50
+ The default value of the sysctl variable
+ net.inet.tcp.nolocaltimewait has changed from 1 to 0. This means
+ that FreeBSD does not skip the TIME_WAIT state anymore for
+ endpoints for which the remote address is local. The new sysctl
+ variable net.inet.tcp.msl_local can be used to control the time
+ these endpoints stay in the TIME_WAIT state. The sysctl variable
+ net.inet.tcp.nolocaltimewait is deprecated and intended to be
+ removed in FreeBSD 16.
+
cd240957d7ba
Making a connection to INADDR_ANY (i.e., using INADDR_ANY as an alias
for localhost) is now disabled by default. This functionality can be
diff --git a/UPDATING b/UPDATING
index f90036c1a3ad..575669b8bc64 100644
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,28 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20250820:
+ The WITHOUT_GSSAPI src.conf knob has been removed. This was already
+ a no-op for MIT Kerberos, so this only affects builds which set
+ WITHOUT_MITKRB5=1, in which case you now always get libgssapi.
+
+ Also, Heimdal's compile_et and libcom_err are now controlled by
+ WITHOUT_KERBEROS, not WITHOUT_KERBEROS_SUPPORT. This matches
+ the behaviour of the MIT Kerberos versions.
+
+20250820:
+ Commits 08c7dd2fbe4f and a4197ea47777 have changed the ABI between
+ libvmmapi and the vmm device. If using a custom kernel configuration,
+ please ensure that the COMPAT_FREEBSD14 option is included so older
+ versions of libvmmapi continue working as expected.
+
+20250819:
+ The CLEAN option has been switched back from default-on to default-off.
+ This reverts the 20250808 change below, which had reverted the 20240729
+ change before it. Note that some src.conf(5) options are known to break
+ ABI or compatibility in ways that may require a clean build initially
+ when switched.
+
20250816:
Sendmail's libmilter has been moved to its own package. If you want
to compile applications that use libmilter, you should install the
diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index f097e7e6ff58..8e801246215f 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
asm-x86_64/aes/aes_aesni.S \
asm-x86_64/modes/gcm_pclmulqdq.S \
asm-x86_64/modes/aesni-gcm-x86_64.S \
+ asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
asm-x86_64/modes/ghash-x86_64.S \
asm-x86_64/sha2/sha256-x86_64.S \
asm-x86_64/sha2/sha512-x86_64.S \
@@ -112,6 +113,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
CFLAGS.aes_aesni.S+= -DLOCORE
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
+CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
CFLAGS.ghash-x86_64.S+= -DLOCORE
CFLAGS.sha256-x86_64.S+= -DLOCORE
CFLAGS.sha512-x86_64.S+= -DLOCORE
diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile
index 3a8b6746fe61..0a5a81f4ab7f 100644
--- a/cddl/lib/libicp_rescue/Makefile
+++ b/cddl/lib/libicp_rescue/Makefile
@@ -11,6 +11,7 @@ ASM_SOURCES_AS = \
asm-x86_64/aes/aes_aesni.S \
asm-x86_64/modes/gcm_pclmulqdq.S \
asm-x86_64/modes/aesni-gcm-x86_64.S \
+ asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
asm-x86_64/sha2/sha256-x86_64.S \
asm-x86_64/sha2/sha512-x86_64.S \
asm-x86_64/blake3/blake3_avx2.S \
@@ -109,6 +110,7 @@ CFLAGS.aes_amd64.S+= -DLOCORE
CFLAGS.aes_aesni.S+= -DLOCORE
CFLAGS.gcm_pclmulqdq.S+= -DLOCORE
CFLAGS.aesni-gcm-x86_64.S+= -DLOCORE
+CFLAGS.aesni-gcm-avx2-vaes.S+= -DLOCORE
CFLAGS.ghash-x86_64.S+= -DLOCORE
CFLAGS.sha256-x86_64.S+= -DLOCORE
CFLAGS.sha512-x86_64.S+= -DLOCORE
diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES
index b3bf38f0aa1c..b876b9ec5ec9 100644
--- a/contrib/one-true-awk/FIXES
+++ b/contrib/one-true-awk/FIXES
@@ -25,6 +25,14 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the
second edition of the AWK book was published in September 2023.
+Aug 04, 2025
+ Fix incorrect divisor in rand() - it was returning
+ even random numbers only. Thanks to Ozan Yigit.
+
+ Fix a syntax issue with /= that caused constants to
+ turn into variables [eg. 42 /= 7]. Thanks to Arnold
+ Robbins.
+
Jan 14, 2025
Fix incorrect error line number issues. unput has
no business managing lineno. Thanks to Ozan Yigit.
diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c
index 361c23e70861..b8053af34b05 100644
--- a/contrib/one-true-awk/main.c
+++ b/contrib/one-true-awk/main.c
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20250116";
+const char *version = "version 20250804";
#define DEBUG
#include <stdio.h>
diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c
index eaddfdecbdd3..9bc07a517372 100644
--- a/contrib/one-true-awk/run.c
+++ b/contrib/one-true-awk/run.c
@@ -1567,6 +1567,8 @@ Cell *assign(Node **a, int n) /* a[0] = a[1], a[0] += a[1], etc. */
xf *= yf;
break;
case DIVEQ:
+ if ((x->tval & CON) != 0)
+ FATAL("non-constant required for left side of /=");
if (yf == 0)
FATAL("division by zero in /=");
xf /= yf;
@@ -2188,7 +2190,7 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis
/* random() returns numbers in [0..2^31-1]
* in order to get a number in [0, 1), divide it by 2^31
*/
- u = (Awkfloat) random() / (0x7fffffffL + 0x1UL);
+ u = (Awkfloat) random() / RAND_MAX;
break;
case FSRAND:
if (isrec(x)) /* no argument provided */
diff --git a/contrib/tcpdump/print-pfsync.c b/contrib/tcpdump/print-pfsync.c
index 6bf9abaf3903..e4f11930816c 100644
--- a/contrib/tcpdump/print-pfsync.c
+++ b/contrib/tcpdump/print-pfsync.c
@@ -53,8 +53,8 @@
static void pfsync_print(netdissect_options *, struct pfsync_header *,
const u_char *, u_int);
static void print_src_dst(netdissect_options *,
- const struct pfsync_state_peer *,
- const struct pfsync_state_peer *, uint8_t);
+ const struct pf_state_peer_export *,
+ const struct pf_state_peer_export *, uint8_t);
static void print_state(netdissect_options *, union pfsync_state_union *, int);
void
@@ -330,7 +330,7 @@ print_host(netdissect_options *ndo, struct pf_addr *addr, uint16_t port,
}
static void
-print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p)
+print_seq(netdissect_options *ndo, const struct pf_state_peer_export *p)
{
if (p->seqdiff)
ND_PRINT("[%u + %u](+%u)", ntohl(p->seqlo),
@@ -341,8 +341,8 @@ print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p)
}
static void
-print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src,
- const struct pfsync_state_peer *dst, uint8_t proto)
+print_src_dst(netdissect_options *ndo, const struct pf_state_peer_export *src,
+ const struct pf_state_peer_export *dst, uint8_t proto)
{
if (proto == IPPROTO_TCP) {
@@ -390,7 +390,7 @@ print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src,
static void
print_state(netdissect_options *ndo, union pfsync_state_union *s, int version)
{
- struct pfsync_state_peer *src, *dst;
+ struct pf_state_peer_export *src, *dst;
struct pfsync_state_key *sk, *nk;
int min, sec;
diff --git a/crypto/krb5/src/lib/gssapi/krb5/util_crypt.c b/crypto/krb5/src/lib/gssapi/krb5/util_crypt.c
index 28411429bf6e..386842e8a6e3 100644
--- a/crypto/krb5/src/lib/gssapi/krb5/util_crypt.c
+++ b/crypto/krb5/src/lib/gssapi/krb5/util_crypt.c
@@ -322,12 +322,16 @@ kg_verify_checksum_v3(krb5_context context, krb5_key key, krb5_keyusage usage,
uint8_t ckhdr[16];
krb5_boolean valid;
- /* Compose an RFC 4121 token header with EC and RRC set to 0. */
+ /*
+ * Compose an RFC 4121 token header for the checksum. For a wrap token,
+ * the EC and RRC fields have the value 0 for the checksum operation,
+ * regardless of their values in the actual token (RFC 4121 section 4.2.4).
+ * For a MIC token, the corresponding four bytes have the value 0xFF.
+ */
store_16_be(toktype, ckhdr);
ckhdr[2] = flags;
ckhdr[3] = 0xFF;
- store_16_be(0, ckhdr + 4);
- store_16_be(0, ckhdr + 6);
+ store_32_be((toktype == KG2_TOK_MIC_MSG) ? 0xFFFFFFFF : 0, ckhdr + 4);
store_64_be(seqnum, ckhdr + 8);
/* Verify the checksum over the data and composed header. */
diff --git a/crypto/krb5/src/lib/gssapi/krb5/verify_mic.c b/crypto/krb5/src/lib/gssapi/krb5/verify_mic.c
index 9852f49912a9..1c11d2016fca 100644
--- a/crypto/krb5/src/lib/gssapi/krb5/verify_mic.c
+++ b/crypto/krb5/src/lib/gssapi/krb5/verify_mic.c
@@ -90,7 +90,6 @@ verify_mic_v3(krb5_context context, OM_uint32 *minor_status,
krb5_gss_ctx_id_rec *ctx, struct k5input *in,
gss_buffer_t message)
{
- OM_uint32 status;
krb5_keyusage usage;
krb5_key key;
krb5_cksumtype cksumtype;
@@ -124,12 +123,10 @@ verify_mic_v3(krb5_context context, OM_uint32 *minor_status,
}
assert(key != NULL);
- status = kg_verify_checksum_v3(context, key, usage, cksumtype,
- KG2_TOK_MIC_MSG, flags, seqnum,
- message->value, message->length,
- in->ptr, in->len);
- if (status != GSS_S_COMPLETE)
- return status;
+ if (!kg_verify_checksum_v3(context, key, usage, cksumtype, KG2_TOK_MIC_MSG,
+ flags, seqnum, message->value, message->length,
+ in->ptr, in->len))
+ return GSS_S_BAD_SIG;
return g_seqstate_check(ctx->seqstate, seqnum);
}
diff --git a/crypto/openssl/BSDmakefile b/crypto/openssl/BSDmakefile
new file mode 100644
index 000000000000..bd2bfe0ea033
--- /dev/null
+++ b/crypto/openssl/BSDmakefile
@@ -0,0 +1,99 @@
+# This BSD makefile helps provide a deterministic means of doing a "clean"
+# vendor import of OpenSSL.
+#
+# Recommended use:
+#
+# % make clean
+# % make all
+
+NO_OBJ=
+
+LCRYPTO_SRC= ${SRCTOP}/crypto/openssl
+LCRYPTO_DOC= ${LCRYPTO_SRC}/doc
+
+CAT?= /bin/cat
+MV?= /bin/mv
+PERL?= perl
+
+BN_CONF_H= include/crypto/bn_conf.h
+BN_CONF_H_ORIG= ${BN_CONF_H}.orig
+CONFIGURATION_H= include/openssl/configuration.h
+CONFIGURATION_H_ORIG= ${CONFIGURATION_H}.orig
+
+.PHONY: configure patch all
+.ORDER: configure patch all
+
+configure:
+ @cd ${.CURDIR} && \
+ ${PERL} ./Configure \
+ disable-aria \
+ disable-egd \
+ disable-idea \
+ disable-mdc2 \
+ disable-sm2 \
+ disable-sm3 \
+ disable-sm4 \
+ enable-ec_nistp_64_gcc_128 \
+ enable-ktls \
+ enable-sctp \
+ --openssldir=etc \
+ --prefix=/usr
+ @cd ${.CURDIR} && gmake configdata.pm
+ @cd ${LCRYPTO_SRC} && ${PERL} \
+ ${LCRYPTO_SRC}/freebsd/dump_version_from_configdata.pl > \
+ ${SRCTOP}/secure/lib/libcrypto/Makefile.version
+
+all: patch
+ # Passing `-j ${.MAKE.JOBS}` doesn't work here for some reason.
+ @cd ${.CURDIR} && gmake build_all_generated
+
+ # Clean the pkgconfig files:
+ # 1. Fix --prefix (not sure why configure --prefix isn't honored properly).
+ # 2. Remove duplicate path in CFLAGS.
+ # 3. Remove duplicate path in includedir(s).
+ @find . -name \*.pc -print -exec sed -i '' -E \
+ -e 's,^prefix=.+,prefix=/usr,' \
+ -e 's,[[:space:]]+(\-I)?\$\{prefix\}/\./include[[:space:]]*,,g' \
+ {} +
+
+ @cd ${SRCTOP}/secure/lib/libcrypto && \
+ ${MAKE} cleanasm && \
+ ${MAKE} buildasm
+
+ @rsync -a --delete \
+ --exclude 'Makefile*' --exclude '*.1' \
+ ${LCRYPTO_DOC}/man/ \
+ ${SRCTOP}/secure/lib/libcrypto/man
+
+ @rsync -a --delete \
+ --exclude 'Makefile*' --exclude '*.[357]' \
+ ${LCRYPTO_DOC}/man/man1/ \
+ ${SRCTOP}/secure/usr.bin/openssl/man
+
+
+# This doesn't use standard patching since the generated files can vary
+# depending on the host architecture.
+patch: configure
+ # Spam arch-specific overrides to config files.
+
+ @cd ${.CURDIR} && gmake ${BN_CONF_H} && \
+ ${MV} ${BN_CONF_H} ${BN_CONF_H_ORIG} && \
+ ${CAT} ${BN_CONF_H}.orig \
+ ${LCRYPTO_SRC}/freebsd/${BN_CONF_H} >> \
+ ${BN_CONF_H}
+
+ @cd ${.CURDIR} && \
+ ${MV} ${CONFIGURATION_H} ${CONFIGURATION_H_ORIG} && \
+ ${CAT} ${CONFIGURATION_H_ORIG} \
+ ${LCRYPTO_SRC}/freebsd/${CONFIGURATION_H} >> \
+ ${CONFIGURATION_H}
+
+
+clean: .PHONY
+ @cd ${.CURDIR} && rm -f ${BN_CONF_H_ORIG} ${CONFIGURATION_H_ORIG}
+
+ @cd ${SRCTOP}/secure/lib/libcrypto && ${MAKE} cleanasm
+
+ -@cd ${.CURDIR} && gmake ${.TARGET}
+
+.include <sys.mk>
diff --git a/crypto/openssl/apps/CA.pl b/crypto/openssl/apps/CA.pl
index 70ad231fff04..0861fd7a4da7 100755
--- a/crypto/openssl/apps/CA.pl
+++ b/crypto/openssl/apps/CA.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/env perl
# Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
diff --git a/crypto/openssl/apps/progs.c b/crypto/openssl/apps/progs.c
index 2646a1a35bf3..acc204a3e6e7 100644
--- a/crypto/openssl/apps/progs.c
+++ b/crypto/openssl/apps/progs.c
@@ -2,7 +2,7 @@
* WARNING: do not edit!
* Generated by apps/progs.pl
*
- * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -89,6 +89,7 @@ FUNCTION functions[] = {
{FT_general, "s_time", s_time_main, s_time_options, NULL, NULL},
#endif
{FT_general, "sess_id", sess_id_main, sess_id_options, NULL, NULL},
+ {FT_general, "skeyutl", skeyutl_main, skeyutl_options, NULL, NULL},
{FT_general, "smime", smime_main, smime_options, NULL, NULL},
{FT_general, "speed", speed_main, speed_options, NULL, NULL},
{FT_general, "spkac", spkac_main, spkac_options, NULL, NULL},
@@ -225,9 +226,15 @@ FUNCTION functions[] = {
{FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL},
#endif
{FT_cipher, "base64", enc_main, enc_options, NULL},
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
{FT_cipher, "zlib", enc_main, enc_options, NULL},
#endif
+#ifndef OPENSSL_NO_BROTLI
+ {FT_cipher, "brotli", enc_main, enc_options, NULL},
+#endif
+#ifndef OPENSSL_NO_ZSTD
+ {FT_cipher, "zstd", enc_main, enc_options, NULL},
+#endif
#ifndef OPENSSL_NO_DES
{FT_cipher, "des", enc_main, enc_options, NULL},
#endif
diff --git a/crypto/openssl/apps/progs.h b/crypto/openssl/apps/progs.h
index 83c829a721bf..1b62ec37dec1 100644
--- a/crypto/openssl/apps/progs.h
+++ b/crypto/openssl/apps/progs.h
@@ -2,7 +2,7 @@
* WARNING: do not edit!
* Generated by apps/progs.pl
*
- * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -56,6 +56,7 @@ extern int s_client_main(int argc, char *argv[]);
extern int s_server_main(int argc, char *argv[]);
extern int s_time_main(int argc, char *argv[]);
extern int sess_id_main(int argc, char *argv[]);
+extern int skeyutl_main(int argc, char *argv[]);
extern int smime_main(int argc, char *argv[]);
extern int speed_main(int argc, char *argv[]);
extern int spkac_main(int argc, char *argv[]);
@@ -110,6 +111,7 @@ extern const OPTIONS s_client_options[];
extern const OPTIONS s_server_options[];
extern const OPTIONS s_time_options[];
extern const OPTIONS sess_id_options[];
+extern const OPTIONS skeyutl_options[];
extern const OPTIONS smime_options[];
extern const OPTIONS speed_options[];
extern const OPTIONS spkac_options[];
diff --git a/crypto/openssl/configdata.pm b/crypto/openssl/configdata.pm
index b2ea8dcd87ca..ec70eaba9f07 100755
--- a/crypto/openssl/configdata.pm
+++ b/crypto/openssl/configdata.pm
@@ -1,4 +1,4 @@
-#! /usr/local/bin/perl
+#! /usr/bin/env perl
# -*- mode: perl -*-
package configdata;
@@ -21,24 +21,16 @@ our %config = (
"ASFLAGS" => [],
"CC" => "cc",
"CFLAGS" => [
- "-O2 -pipe -fstack-protector-strong -fno-strict-aliasing "
+ "-Wall -O3"
],
- "CPP" => "cpp",
"CPPDEFINES" => [],
- "CPPFLAGS" => [
- ""
- ],
+ "CPPFLAGS" => [],
"CPPINCLUDES" => [],
- "CXX" => "c++",
- "CXXFLAGS" => [
- "-O2 -pipe -fstack-protector-strong -fno-strict-aliasing "
- ],
+ "CXXFLAGS" => [],
"FIPSKEY" => "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813",
- "FIPS_VENDOR" => "OpenSSL FIPS Provider",
- "HASHBANGPERL" => "/usr/local/bin/perl",
- "LDFLAGS" => [
- " "
- ],
+ "FIPS_VENDOR" => "OpenSSL non-compliant FIPS Provider",
+ "HASHBANGPERL" => "/usr/bin/env perl",
+ "LDFLAGS" => [],
"LDLIBS" => [],
"OBJCOPY" => "objcopy",
"PERL" => "/usr/local/bin/perl",
@@ -139,7 +131,6 @@ our %config = (
"apps/lib/build.info",
"providers/common/build.info",
"providers/implementations/build.info",
- "providers/fips/build.info",
"doc/man1/build.info",
"ssl/record/methods/build.info",
"providers/common/der/build.info",
@@ -178,6 +169,7 @@ our %config = (
"ex_libs" => [],
"full_version" => "3.5.1",
"includes" => [],
+ "ktls" => "",
"lflags" => [],
"lib_defines" => [
"OPENSSL_PIC"
@@ -192,6 +184,7 @@ our %config = (
"openssl_feature_defines" => [
"OPENSSL_RAND_SEED_OS",
"OPENSSL_THREADS",
+ "OPENSSL_NO_ACVP_TESTS",
"OPENSSL_NO_AFALGENG",
"OPENSSL_NO_ARIA",
"OPENSSL_NO_ASAN",
@@ -203,13 +196,14 @@ our %config = (
"OPENSSL_NO_EGD",
"OPENSSL_NO_EXTERNAL_TESTS",
"OPENSSL_NO_FIPS_JITTER",
+ "OPENSSL_NO_FIPS_POST",
+ "OPENSSL_NO_FIPS_SECURITYCHECKS",
"OPENSSL_NO_FUZZ_AFL",
"OPENSSL_NO_FUZZ_LIBFUZZER",
"OPENSSL_NO_H3DEMO",
"OPENSSL_NO_HQINTEROP",
"OPENSSL_NO_IDEA",
"OPENSSL_NO_JITTER",
- "OPENSSL_NO_KTLS",
"OPENSSL_NO_MD2",
"OPENSSL_NO_MDC2",
"OPENSSL_NO_MSAN",
@@ -222,7 +216,6 @@ our %config = (
"OPENSSL_NO_SSL3_METHOD",
"OPENSSL_NO_SSLKEYLOG",
"OPENSSL_NO_TFO",
- "OPENSSL_NO_TLS_DEPRECATED_EC",
"OPENSSL_NO_TRACE",
"OPENSSL_NO_UBSAN",
"OPENSSL_NO_UNIT_TEST",
@@ -235,30 +228,26 @@ our %config = (
"OPENSSL_NO_ZSTD_DYNAMIC",
"OPENSSL_NO_STATIC_ENGINE"
],
- "openssl_other_defines" => [
- "OPENSSL_NO_KTLS"
- ],
"openssl_sys_defines" => [],
- "openssldir" => "/usr/local/openssl",
- "options" => "--openssldir=/usr/local/openssl --prefix=/usr/local enable-ec_nistp_64_gcc_128 enable-fips enable-sctp no-afalgeng no-aria no-asan no-brotli no-brotli-dynamic no-buildtest-c++ no-crypto-mdebug no-crypto-mdebug-backtrace no-demos no-egd no-external-tests no-fips-jitter no-fuzz-afl no-fuzz-libfuzzer no-h3demo no-hqinterop no-idea no-jitter no-ktls no-legacy no-md2 no-mdc2 no-msan no-pie no-rc5 no-sm2 no-sm3 no-sm4 no-ssl3 no-ssl3-method no-sslkeylog no-tfo no-tls-deprecated-ec no-trace no-ubsan no-unit-test no-uplink no-weak-ssl-ciphers no-winstore no-zlib no-zlib-dynamic no-zstd no-zstd-dynamic",
+ "openssldir" => "etc",
+ "options" => "enable-ec_nistp_64_gcc_128 enable-ktls enable-sctp --openssldir=etc --prefix=/usr no-acvp-tests no-afalgeng no-aria no-asan no-brotli no-brotli-dynamic no-buildtest-c++ no-crypto-mdebug no-crypto-mdebug-backtrace no-demos no-egd no-external-tests no-fips no-fips-jitter no-fips-post no-fips-securitychecks no-fuzz-afl no-fuzz-libfuzzer no-h3demo no-hqinterop no-idea no-jitter no-md2 no-mdc2 no-msan no-pie no-rc5 no-sm2 no-sm3 no-sm4 no-ssl3 no-ssl3-method no-sslkeylog no-tfo no-trace no-ubsan no-unit-test no-uplink no-weak-ssl-ciphers no-winstore no-zlib no-zlib-dynamic no-zstd no-zstd-dynamic",
"patch" => "1",
"perl_archname" => "amd64-freebsd-thread-multi",
"perl_cmd" => "/usr/local/bin/perl",
"perl_version" => "5.40.2",
"perlargv" => [
- "--openssldir=/usr/local/openssl",
- "--prefix=/usr/local",
- "no-aria",
+ "disable-aria",
+ "disable-egd",
+ "disable-idea",
+ "disable-mdc2",
+ "disable-sm2",
+ "disable-sm3",
+ "disable-sm4",
"enable-ec_nistp_64_gcc_128",
- "enable-fips",
- "no-idea",
- "no-legacy",
- "no-mdc2",
+ "enable-ktls",
"enable-sctp",
- "no-sm2",
- "no-sm3",
- "no-sm4",
- "no-tls-deprecated-ec"
+ "--openssldir=etc",
+ "--prefix=/usr"
],
"perlenv" => {
"AR" => undef,
@@ -266,24 +255,24 @@ our %config = (
"AS" => undef,
"ASFLAGS" => undef,
"BUILDFILE" => undef,
- "CC" => "cc",
- "CFLAGS" => "-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ",
- "CPP" => "cpp",
+ "CC" => undef,
+ "CFLAGS" => undef,
+ "CPP" => undef,
"CPPDEFINES" => undef,
- "CPPFLAGS" => "",
+ "CPPFLAGS" => undef,
"CPPINCLUDES" => undef,
"CROSS_COMPILE" => undef,
- "CXX" => "c++",
- "CXXFLAGS" => "-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ",
+ "CXX" => undef,
+ "CXXFLAGS" => undef,
"HASHBANGPERL" => undef,
"LD" => undef,
- "LDFLAGS" => " ",
+ "LDFLAGS" => undef,
"LDLIBS" => undef,
"MT" => undef,
"MTFLAGS" => undef,
"OBJCOPY" => undef,
"OPENSSL_LOCAL_CONFIG_DIR" => undef,
- "PERL" => "/usr/local/bin/perl",
+ "PERL" => undef,
"RANLIB" => undef,
"RC" => undef,
"RCFLAGS" => undef,
@@ -297,12 +286,12 @@ our %config = (
"__CNF_LDFLAGS" => undef,
"__CNF_LDLIBS" => undef
},
- "prefix" => "/usr/local",
+ "prefix" => "/usr",
"prerelease" => "",
"processor" => "",
"rc4_int" => "unsigned int",
"release_date" => "1 Jul 2025",
- "shlib_version" => "17",
+ "shlib_version" => "3",
"sourcedir" => ".",
"target" => "BSD-x86_64",
"version" => "3.5.1"
@@ -521,6 +510,7 @@ our @disablables_int = (
"crmf"
);
our %disabled = (
+ "acvp-tests" => "cascade",
"afalgeng" => "not-linux",
"aria" => "option",
"asan" => "default",
@@ -530,17 +520,18 @@ our %disabled = (
"crypto-mdebug" => "default",
"crypto-mdebug-backtrace" => "default",
"demos" => "default",
- "egd" => "default",
+ "egd" => "option",
"external-tests" => "default",
+ "fips" => "default",
"fips-jitter" => "default",
+ "fips-post" => "cascade",
+ "fips-securitychecks" => "cascade",
"fuzz-afl" => "default",
"fuzz-libfuzzer" => "default",
"h3demo" => "default",
"hqinterop" => "default",
"idea" => "option",
"jitter" => "default",
- "ktls" => "default",
- "legacy" => "option",
"md2" => "default",
"mdc2" => "option",
"msan" => "default",
@@ -553,7 +544,6 @@ our %disabled = (
"ssl3-method" => "default",
"sslkeylog" => "default",
"tfo" => "default",
- "tls-deprecated-ec" => "option",
"trace" => "default",
"ubsan" => "default",
"unit-test" => "default",
@@ -880,7 +870,7 @@ our %unified_info = (
"providers/libdefault.a" => {
"noinst" => "1"
},
- "providers/libfips.a" => {
+ "providers/liblegacy.a" => {
"noinst" => "1"
},
"providers/libtemplate.a" => {
@@ -912,9 +902,6 @@ our %unified_info = (
"engines/padlock" => {
"engine" => "1"
},
- "providers/fips" => {
- "fips" => "1"
- },
"test/p_minimal" => {
"noinst" => "1"
},
@@ -1016,9 +1003,6 @@ our %unified_info = (
"test/aborttest" => {
"noinst" => "1"
},
- "test/acvp_test" => {
- "noinst" => "1"
- },
"test/aesgcmtest" => {
"noinst" => "1"
},
@@ -1142,6 +1126,9 @@ our %unified_info = (
"test/buildtest_c_conf_api" => {
"noinst" => "1"
},
+ "test/buildtest_c_configuration" => {
+ "noinst" => "1"
+ },
"test/buildtest_c_conftypes" => {
"noinst" => "1"
},
@@ -1996,9 +1983,6 @@ our %unified_info = (
"libssl" => [
"AES_ASM"
],
- "providers/fips" => [
- "FIPS_MODULE"
- ],
"providers/legacy" => [
"OPENSSL_CPUID_OBJ"
],
@@ -2053,8 +2037,11 @@ our %unified_info = (
"VPAES_ASM",
"X25519_ASM"
],
- "test/evp_test" => [
- "NO_LEGACY_MODULE"
+ "test/endecode_test" => [
+ "STATIC_LEGACY"
+ ],
+ "test/evp_extra_test" => [
+ "STATIC_LEGACY"
],
"test/provider_internal_test" => [
"PROVIDER_INIT_FUNCTION_NAME=p_test_init"
@@ -2296,9 +2283,6 @@ our %unified_info = (
"apps/progs.h" => [
"apps/progs.c"
],
- "build_modules_nodep" => [
- "providers/fipsmodule.cnf"
- ],
"crypto/aes/aes-586.S" => [
"crypto/perlasm/x86asm.pl"
],
@@ -8214,10 +8198,6 @@ our %unified_info = (
"providers/common/include/prov/der_digests.h",
"providers/common/include/prov/der_rsa.h"
],
- "providers/common/der/libfips-lib-der_rsa_sig.o" => [
- "providers/common/include/prov/der_digests.h",
- "providers/common/include/prov/der_rsa.h"
- ],
"providers/common/include/prov/der_digests.h" => [
"providers/common/der/DIGESTS.asn1",
"providers/common/der/NIST.asn1",
@@ -8252,21 +8232,12 @@ our %unified_info = (
"providers/common/der/oids_to_c.pm",
"providers/common/der/wrap.asn1"
],
- "providers/fips" => [
- "providers/libfips.a"
- ],
- "providers/fipsmodule.cnf" => [
- "providers/fips"
- ],
"providers/implementations/encode_decode/libdefault-lib-encode_key2any.o" => [
"providers/common/include/prov/der_rsa.h"
],
"providers/implementations/kdfs/libdefault-lib-x942kdf.o" => [
"providers/common/include/prov/der_wrap.h"
],
- "providers/implementations/kdfs/libfips-lib-x942kdf.o" => [
- "providers/common/include/prov/der_wrap.h"
- ],
"providers/implementations/signature/libdefault-lib-dsa_sig.o" => [
"providers/common/include/prov/der_dsa.h"
],
@@ -8285,27 +8256,13 @@ our %unified_info = (
"providers/implementations/signature/libdefault-lib-slh_dsa_sig.o" => [
"providers/common/include/prov/der_slh_dsa.h"
],
- "providers/implementations/signature/libfips-lib-dsa_sig.o" => [
- "providers/common/include/prov/der_dsa.h"
- ],
- "providers/implementations/signature/libfips-lib-ecdsa_sig.o" => [
- "providers/common/include/prov/der_ec.h"
- ],
- "providers/implementations/signature/libfips-lib-eddsa_sig.o" => [
- "providers/common/include/prov/der_ecx.h"
- ],
- "providers/implementations/signature/libfips-lib-ml_dsa_sig.o" => [
- "providers/common/include/prov/der_ml_dsa.h"
- ],
- "providers/implementations/signature/libfips-lib-rsa_sig.o" => [
- "providers/common/include/prov/der_rsa.h"
- ],
- "providers/implementations/signature/libfips-lib-slh_dsa_sig.o" => [
- "providers/common/include/prov/der_slh_dsa.h"
- ],
"providers/implementations/signature/sm2_sig.o" => [
"providers/common/include/prov/der_sm2.h"
],
+ "providers/legacy" => [
+ "libcrypto",
+ "providers/liblegacy.a"
+ ],
"providers/libcommon.a" => [
"libcrypto"
],
@@ -8318,10 +8275,6 @@ our %unified_info = (
"test/aborttest" => [
"libcrypto"
],
- "test/acvp_test" => [
- "libcrypto.a",
- "test/libtestutil.a"
- ],
"test/aesgcmtest" => [
"libcrypto",
"test/libtestutil.a"
@@ -8487,6 +8440,10 @@ our %unified_info = (
"libcrypto",
"libssl"
],
+ "test/buildtest_c_configuration" => [
+ "libcrypto",
+ "libssl"
+ ],
"test/buildtest_c_conftypes" => [
"libcrypto",
"libssl"
@@ -8917,6 +8874,8 @@ our %unified_info = (
],
"test/endecode_test" => [
"libcrypto.a",
+ "providers/libcommon.a",
+ "providers/liblegacy.a",
"test/libtestutil.a"
],
"test/endecoder_legacy_test" => [
@@ -8937,6 +8896,8 @@ our %unified_info = (
],
"test/evp_extra_test" => [
"libcrypto.a",
+ "providers/libcommon.a",
+ "providers/liblegacy.a",
"test/libtestutil.a"
],
"test/evp_extra_test2" => [
@@ -9676,6 +9637,9 @@ our %unified_info = (
"crypto/packettest-bin-quic_vlint.o",
"crypto/tls13secretstest-bin-packet.o",
"crypto/tls13secretstest-bin-quic_vlint.o",
+ "crypto/legacy-dso-cpuid.o",
+ "crypto/legacy-dso-ctype.o",
+ "crypto/legacy-dso-x86_64cpuid.o",
"crypto/libcrypto-lib-asn1_dsa.o",
"crypto/libcrypto-lib-bsearch.o",
"crypto/libcrypto-lib-comp_methods.o",
@@ -9792,37 +9756,7 @@ our %unified_info = (
"crypto/libssl-shlib-getenv.o",
"crypto/libssl-shlib-packet.o",
"crypto/libssl-shlib-quic_vlint.o",
- "crypto/libssl-shlib-time.o",
- "crypto/libfips-lib-asn1_dsa.o",
- "crypto/libfips-lib-bsearch.o",
- "crypto/libfips-lib-context.o",
- "crypto/libfips-lib-core_algorithm.o",
- "crypto/libfips-lib-core_fetch.o",
- "crypto/libfips-lib-core_namemap.o",
- "crypto/libfips-lib-cpuid.o",
- "crypto/libfips-lib-cryptlib.o",
- "crypto/libfips-lib-ctype.o",
- "crypto/libfips-lib-der_writer.o",
- "crypto/libfips-lib-ex_data.o",
- "crypto/libfips-lib-initthread.o",
- "crypto/libfips-lib-o_str.o",
- "crypto/libfips-lib-packet.o",
- "crypto/libfips-lib-param_build.o",
- "crypto/libfips-lib-param_build_set.o",
- "crypto/libfips-lib-params.o",
- "crypto/libfips-lib-params_dup.o",
- "crypto/libfips-lib-params_from_text.o",
- "crypto/libfips-lib-params_idx.o",
- "crypto/libfips-lib-provider_core.o",
- "crypto/libfips-lib-provider_predefined.o",
- "crypto/libfips-lib-self_test_core.o",
- "crypto/libfips-lib-sparse_array.o",
- "crypto/libfips-lib-threads_lib.o",
- "crypto/libfips-lib-threads_none.o",
- "crypto/libfips-lib-threads_pthread.o",
- "crypto/libfips-lib-threads_win.o",
- "crypto/libfips-lib-time.o",
- "crypto/libfips-lib-x86_64cpuid.o"
+ "crypto/libssl-shlib-time.o"
],
"products" => {
"bin" => [
@@ -9831,10 +9765,12 @@ our %unified_info = (
"test/packettest",
"test/tls13secretstest"
],
+ "dso" => [
+ "providers/legacy"
+ ],
"lib" => [
"libcrypto",
- "libssl",
- "providers/libfips.a"
+ "libssl"
]
}
},
@@ -9867,22 +9803,11 @@ our %unified_info = (
"crypto/aes/libcrypto-shlib-aesni-x86_64.o",
"crypto/aes/libcrypto-shlib-aesni-xts-avx512.o",
"crypto/aes/libcrypto-shlib-bsaes-x86_64.o",
- "crypto/aes/libcrypto-shlib-vpaes-x86_64.o",
- "crypto/aes/libfips-lib-aes-x86_64.o",
- "crypto/aes/libfips-lib-aes_ecb.o",
- "crypto/aes/libfips-lib-aes_misc.o",
- "crypto/aes/libfips-lib-aesni-mb-x86_64.o",
- "crypto/aes/libfips-lib-aesni-sha1-x86_64.o",
- "crypto/aes/libfips-lib-aesni-sha256-x86_64.o",
- "crypto/aes/libfips-lib-aesni-x86_64.o",
- "crypto/aes/libfips-lib-aesni-xts-avx512.o",
- "crypto/aes/libfips-lib-bsaes-x86_64.o",
- "crypto/aes/libfips-lib-vpaes-x86_64.o"
+ "crypto/aes/libcrypto-shlib-vpaes-x86_64.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10234,65 +10159,22 @@ our %unified_info = (
"crypto/bn/libcrypto-shlib-rsaz_exp_x2.o",
"crypto/bn/libcrypto-shlib-x86_64-gf2m.o",
"crypto/bn/libcrypto-shlib-x86_64-mont.o",
- "crypto/bn/libcrypto-shlib-x86_64-mont5.o",
- "crypto/bn/libfips-lib-bn_add.o",
- "crypto/bn/libfips-lib-bn_blind.o",
- "crypto/bn/libfips-lib-bn_const.o",
- "crypto/bn/libfips-lib-bn_conv.o",
- "crypto/bn/libfips-lib-bn_ctx.o",
- "crypto/bn/libfips-lib-bn_dh.o",
- "crypto/bn/libfips-lib-bn_div.o",
- "crypto/bn/libfips-lib-bn_exp.o",
- "crypto/bn/libfips-lib-bn_exp2.o",
- "crypto/bn/libfips-lib-bn_gcd.o",
- "crypto/bn/libfips-lib-bn_gf2m.o",
- "crypto/bn/libfips-lib-bn_intern.o",
- "crypto/bn/libfips-lib-bn_kron.o",
- "crypto/bn/libfips-lib-bn_lib.o",
- "crypto/bn/libfips-lib-bn_mod.o",
- "crypto/bn/libfips-lib-bn_mont.o",
- "crypto/bn/libfips-lib-bn_mpi.o",
- "crypto/bn/libfips-lib-bn_mul.o",
- "crypto/bn/libfips-lib-bn_nist.o",
- "crypto/bn/libfips-lib-bn_prime.o",
- "crypto/bn/libfips-lib-bn_rand.o",
- "crypto/bn/libfips-lib-bn_recp.o",
- "crypto/bn/libfips-lib-bn_rsa_fips186_4.o",
- "crypto/bn/libfips-lib-bn_shift.o",
- "crypto/bn/libfips-lib-bn_sqr.o",
- "crypto/bn/libfips-lib-bn_sqrt.o",
- "crypto/bn/libfips-lib-bn_word.o",
- "crypto/bn/libfips-lib-rsaz-2k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-2k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-3k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-3k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-4k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-4k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-avx2.o",
- "crypto/bn/libfips-lib-rsaz-x86_64.o",
- "crypto/bn/libfips-lib-rsaz_exp.o",
- "crypto/bn/libfips-lib-rsaz_exp_x2.o",
- "crypto/bn/libfips-lib-x86_64-gf2m.o",
- "crypto/bn/libfips-lib-x86_64-mont.o",
- "crypto/bn/libfips-lib-x86_64-mont5.o"
+ "crypto/bn/libcrypto-shlib-x86_64-mont5.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
"crypto/bn/asm" => {
"deps" => [
"crypto/bn/asm/libcrypto-lib-x86_64-gcc.o",
- "crypto/bn/asm/libcrypto-shlib-x86_64-gcc.o",
- "crypto/bn/asm/libfips-lib-x86_64-gcc.o"
+ "crypto/bn/asm/libcrypto-shlib-x86_64-gcc.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10301,13 +10183,11 @@ our %unified_info = (
"crypto/buffer/libcrypto-lib-buf_err.o",
"crypto/buffer/libcrypto-lib-buffer.o",
"crypto/buffer/libcrypto-shlib-buf_err.o",
- "crypto/buffer/libcrypto-shlib-buffer.o",
- "crypto/buffer/libfips-lib-buffer.o"
+ "crypto/buffer/libcrypto-shlib-buffer.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10365,13 +10245,11 @@ our %unified_info = (
"crypto/cmac" => {
"deps" => [
"crypto/cmac/libcrypto-lib-cmac.o",
- "crypto/cmac/libcrypto-shlib-cmac.o",
- "crypto/cmac/libfips-lib-cmac.o"
+ "crypto/cmac/libcrypto-shlib-cmac.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10583,15 +10461,13 @@ our %unified_info = (
"crypto/des/libcrypto-shlib-set_key.o",
"crypto/des/libcrypto-shlib-str2key.o",
"crypto/des/libcrypto-shlib-xcbc_enc.o",
- "crypto/des/libfips-lib-des_enc.o",
- "crypto/des/libfips-lib-ecb3_enc.o",
- "crypto/des/libfips-lib-fcrypt_b.o",
- "crypto/des/libfips-lib-set_key.o"
+ "crypto/des/liblegacy-lib-des_enc.o",
+ "crypto/des/liblegacy-lib-fcrypt_b.o"
],
"products" => {
"lib" => [
"libcrypto",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -10626,19 +10502,11 @@ our %unified_info = (
"crypto/dh/libcrypto-shlib-dh_meth.o",
"crypto/dh/libcrypto-shlib-dh_pmeth.o",
"crypto/dh/libcrypto-shlib-dh_prn.o",
- "crypto/dh/libcrypto-shlib-dh_rfc5114.o",
- "crypto/dh/libfips-lib-dh_backend.o",
- "crypto/dh/libfips-lib-dh_check.o",
- "crypto/dh/libfips-lib-dh_gen.o",
- "crypto/dh/libfips-lib-dh_group_params.o",
- "crypto/dh/libfips-lib-dh_kdf.o",
- "crypto/dh/libfips-lib-dh_key.o",
- "crypto/dh/libfips-lib-dh_lib.o"
+ "crypto/dh/libcrypto-shlib-dh_rfc5114.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10673,20 +10541,11 @@ our %unified_info = (
"crypto/dsa/libcrypto-shlib-dsa_pmeth.o",
"crypto/dsa/libcrypto-shlib-dsa_prn.o",
"crypto/dsa/libcrypto-shlib-dsa_sign.o",
- "crypto/dsa/libcrypto-shlib-dsa_vrf.o",
- "crypto/dsa/libfips-lib-dsa_backend.o",
- "crypto/dsa/libfips-lib-dsa_check.o",
- "crypto/dsa/libfips-lib-dsa_gen.o",
- "crypto/dsa/libfips-lib-dsa_key.o",
- "crypto/dsa/libfips-lib-dsa_lib.o",
- "crypto/dsa/libfips-lib-dsa_ossl.o",
- "crypto/dsa/libfips-lib-dsa_sign.o",
- "crypto/dsa/libfips-lib-dsa_vrf.o"
+ "crypto/dsa/libcrypto-shlib-dsa_vrf.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10792,44 +10651,11 @@ our %unified_info = (
"crypto/ec/libcrypto-shlib-ecx_backend.o",
"crypto/ec/libcrypto-shlib-ecx_key.o",
"crypto/ec/libcrypto-shlib-ecx_meth.o",
- "crypto/ec/libcrypto-shlib-x25519-x86_64.o",
- "crypto/ec/libfips-lib-curve25519.o",
- "crypto/ec/libfips-lib-ec2_oct.o",
- "crypto/ec/libfips-lib-ec2_smpl.o",
- "crypto/ec/libfips-lib-ec_asn1.o",
- "crypto/ec/libfips-lib-ec_backend.o",
- "crypto/ec/libfips-lib-ec_check.o",
- "crypto/ec/libfips-lib-ec_curve.o",
- "crypto/ec/libfips-lib-ec_cvt.o",
- "crypto/ec/libfips-lib-ec_key.o",
- "crypto/ec/libfips-lib-ec_kmeth.o",
- "crypto/ec/libfips-lib-ec_lib.o",
- "crypto/ec/libfips-lib-ec_mult.o",
- "crypto/ec/libfips-lib-ec_oct.o",
- "crypto/ec/libfips-lib-ecdh_kdf.o",
- "crypto/ec/libfips-lib-ecdh_ossl.o",
- "crypto/ec/libfips-lib-ecdsa_ossl.o",
- "crypto/ec/libfips-lib-ecdsa_sign.o",
- "crypto/ec/libfips-lib-ecdsa_vrf.o",
- "crypto/ec/libfips-lib-ecp_mont.o",
- "crypto/ec/libfips-lib-ecp_nist.o",
- "crypto/ec/libfips-lib-ecp_nistp224.o",
- "crypto/ec/libfips-lib-ecp_nistp256.o",
- "crypto/ec/libfips-lib-ecp_nistp384.o",
- "crypto/ec/libfips-lib-ecp_nistp521.o",
- "crypto/ec/libfips-lib-ecp_nistputil.o",
- "crypto/ec/libfips-lib-ecp_nistz256-x86_64.o",
- "crypto/ec/libfips-lib-ecp_nistz256.o",
- "crypto/ec/libfips-lib-ecp_oct.o",
- "crypto/ec/libfips-lib-ecp_smpl.o",
- "crypto/ec/libfips-lib-ecx_backend.o",
- "crypto/ec/libfips-lib-ecx_key.o",
- "crypto/ec/libfips-lib-x25519-x86_64.o"
+ "crypto/ec/libcrypto-shlib-x25519-x86_64.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -10844,43 +10670,33 @@ our %unified_info = (
"crypto/ec/curve448/libcrypto-shlib-curve448_tables.o",
"crypto/ec/curve448/libcrypto-shlib-eddsa.o",
"crypto/ec/curve448/libcrypto-shlib-f_generic.o",
- "crypto/ec/curve448/libcrypto-shlib-scalar.o",
- "crypto/ec/curve448/libfips-lib-curve448.o",
- "crypto/ec/curve448/libfips-lib-curve448_tables.o",
- "crypto/ec/curve448/libfips-lib-eddsa.o",
- "crypto/ec/curve448/libfips-lib-f_generic.o",
- "crypto/ec/curve448/libfips-lib-scalar.o"
+ "crypto/ec/curve448/libcrypto-shlib-scalar.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
"crypto/ec/curve448/arch_32" => {
"deps" => [
"crypto/ec/curve448/arch_32/libcrypto-lib-f_impl32.o",
- "crypto/ec/curve448/arch_32/libcrypto-shlib-f_impl32.o",
- "crypto/ec/curve448/arch_32/libfips-lib-f_impl32.o"
+ "crypto/ec/curve448/arch_32/libcrypto-shlib-f_impl32.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
"crypto/ec/curve448/arch_64" => {
"deps" => [
"crypto/ec/curve448/arch_64/libcrypto-lib-f_impl64.o",
- "crypto/ec/curve448/arch_64/libcrypto-shlib-f_impl64.o",
- "crypto/ec/curve448/arch_64/libfips-lib-f_impl64.o"
+ "crypto/ec/curve448/arch_64/libcrypto-shlib-f_impl64.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11163,36 +10979,11 @@ our %unified_info = (
"crypto/evp/libcrypto-shlib-pmeth_lib.o",
"crypto/evp/libcrypto-shlib-s_lib.o",
"crypto/evp/libcrypto-shlib-signature.o",
- "crypto/evp/libcrypto-shlib-skeymgmt_meth.o",
- "crypto/evp/libfips-lib-asymcipher.o",
- "crypto/evp/libfips-lib-dh_support.o",
- "crypto/evp/libfips-lib-digest.o",
- "crypto/evp/libfips-lib-ec_support.o",
- "crypto/evp/libfips-lib-evp_enc.o",
- "crypto/evp/libfips-lib-evp_fetch.o",
- "crypto/evp/libfips-lib-evp_lib.o",
- "crypto/evp/libfips-lib-evp_rand.o",
- "crypto/evp/libfips-lib-evp_utils.o",
- "crypto/evp/libfips-lib-exchange.o",
- "crypto/evp/libfips-lib-kdf_lib.o",
- "crypto/evp/libfips-lib-kdf_meth.o",
- "crypto/evp/libfips-lib-kem.o",
- "crypto/evp/libfips-lib-keymgmt_lib.o",
- "crypto/evp/libfips-lib-keymgmt_meth.o",
- "crypto/evp/libfips-lib-mac_lib.o",
- "crypto/evp/libfips-lib-mac_meth.o",
- "crypto/evp/libfips-lib-p_lib.o",
- "crypto/evp/libfips-lib-pmeth_check.o",
- "crypto/evp/libfips-lib-pmeth_gn.o",
- "crypto/evp/libfips-lib-pmeth_lib.o",
- "crypto/evp/libfips-lib-s_lib.o",
- "crypto/evp/libfips-lib-signature.o",
- "crypto/evp/libfips-lib-skeymgmt_meth.o"
+ "crypto/evp/libcrypto-shlib-skeymgmt_meth.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11211,19 +11002,11 @@ our %unified_info = (
"crypto/ffc/libcrypto-shlib-ffc_key_validate.o",
"crypto/ffc/libcrypto-shlib-ffc_params.o",
"crypto/ffc/libcrypto-shlib-ffc_params_generate.o",
- "crypto/ffc/libcrypto-shlib-ffc_params_validate.o",
- "crypto/ffc/libfips-lib-ffc_backend.o",
- "crypto/ffc/libfips-lib-ffc_dh.o",
- "crypto/ffc/libfips-lib-ffc_key_generate.o",
- "crypto/ffc/libfips-lib-ffc_key_validate.o",
- "crypto/ffc/libfips-lib-ffc_params.o",
- "crypto/ffc/libfips-lib-ffc_params_generate.o",
- "crypto/ffc/libfips-lib-ffc_params_validate.o"
+ "crypto/ffc/libcrypto-shlib-ffc_params_validate.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11233,28 +11016,23 @@ our %unified_info = (
"crypto/hashtable/libcrypto-lib-hashtable.o",
"crypto/hashtable/libcrypto-shlib-hashfunc.o",
"crypto/hashtable/libcrypto-shlib-hashtable.o",
- "crypto/hashtable/libssl-shlib-hashfunc.o",
- "crypto/hashtable/libfips-lib-hashfunc.o",
- "crypto/hashtable/libfips-lib-hashtable.o"
+ "crypto/hashtable/libssl-shlib-hashfunc.o"
],
"products" => {
"lib" => [
"libcrypto",
- "libssl",
- "providers/libfips.a"
+ "libssl"
]
}
},
"crypto/hmac" => {
"deps" => [
"crypto/hmac/libcrypto-lib-hmac.o",
- "crypto/hmac/libcrypto-shlib-hmac.o",
- "crypto/hmac/libfips-lib-hmac.o"
+ "crypto/hmac/libcrypto-shlib-hmac.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11302,13 +11080,11 @@ our %unified_info = (
"crypto/lhash/libcrypto-lib-lh_stats.o",
"crypto/lhash/libcrypto-lib-lhash.o",
"crypto/lhash/libcrypto-shlib-lh_stats.o",
- "crypto/lhash/libcrypto-shlib-lhash.o",
- "crypto/lhash/libfips-lib-lhash.o"
+ "crypto/lhash/libcrypto-shlib-lhash.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11334,11 +11110,16 @@ our %unified_info = (
"crypto/md5/libcrypto-shlib-md5-x86_64.o",
"crypto/md5/libcrypto-shlib-md5_dgst.o",
"crypto/md5/libcrypto-shlib-md5_one.o",
- "crypto/md5/libcrypto-shlib-md5_sha1.o"
+ "crypto/md5/libcrypto-shlib-md5_sha1.o",
+ "crypto/md5/liblegacy-lib-md5-x86_64.o",
+ "crypto/md5/liblegacy-lib-md5_dgst.o",
+ "crypto/md5/liblegacy-lib-md5_one.o",
+ "crypto/md5/liblegacy-lib-md5_sha1.o"
],
"products" => {
"lib" => [
- "libcrypto"
+ "libcrypto",
+ "providers/liblegacy.a"
]
}
},
@@ -11359,33 +11140,22 @@ our %unified_info = (
"crypto/ml_dsa/libcrypto-shlib-ml_dsa_ntt.o",
"crypto/ml_dsa/libcrypto-shlib-ml_dsa_params.o",
"crypto/ml_dsa/libcrypto-shlib-ml_dsa_sample.o",
- "crypto/ml_dsa/libcrypto-shlib-ml_dsa_sign.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_encoders.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_key.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_key_compress.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_matrix.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_ntt.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_params.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_sample.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_sign.o"
+ "crypto/ml_dsa/libcrypto-shlib-ml_dsa_sign.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
"crypto/ml_kem" => {
"deps" => [
"crypto/ml_kem/libcrypto-lib-ml_kem.o",
- "crypto/ml_kem/libcrypto-shlib-ml_kem.o",
- "crypto/ml_kem/libfips-lib-ml_kem.o"
+ "crypto/ml_kem/libcrypto-shlib-ml_kem.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11420,24 +11190,11 @@ our %unified_info = (
"crypto/modes/libcrypto-shlib-siv128.o",
"crypto/modes/libcrypto-shlib-wrap128.o",
"crypto/modes/libcrypto-shlib-xts128.o",
- "crypto/modes/libcrypto-shlib-xts128gb.o",
- "crypto/modes/libfips-lib-aes-gcm-avx512.o",
- "crypto/modes/libfips-lib-aesni-gcm-x86_64.o",
- "crypto/modes/libfips-lib-cbc128.o",
- "crypto/modes/libfips-lib-ccm128.o",
- "crypto/modes/libfips-lib-cfb128.o",
- "crypto/modes/libfips-lib-ctr128.o",
- "crypto/modes/libfips-lib-gcm128.o",
- "crypto/modes/libfips-lib-ghash-x86_64.o",
- "crypto/modes/libfips-lib-ofb128.o",
- "crypto/modes/libfips-lib-wrap128.o",
- "crypto/modes/libfips-lib-xts128.o",
- "crypto/modes/libfips-lib-xts128gb.o"
+ "crypto/modes/libcrypto-shlib-xts128gb.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11616,17 +11373,11 @@ our %unified_info = (
"crypto/property/libcrypto-shlib-property_err.o",
"crypto/property/libcrypto-shlib-property_parse.o",
"crypto/property/libcrypto-shlib-property_query.o",
- "crypto/property/libcrypto-shlib-property_string.o",
- "crypto/property/libfips-lib-defn_cache.o",
- "crypto/property/libfips-lib-property.o",
- "crypto/property/libfips-lib-property_parse.o",
- "crypto/property/libfips-lib-property_query.o",
- "crypto/property/libfips-lib-property_string.o"
+ "crypto/property/libcrypto-shlib-property_string.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11647,13 +11398,11 @@ our %unified_info = (
"crypto/rand/libcrypto-shlib-rand_meth.o",
"crypto/rand/libcrypto-shlib-rand_pool.o",
"crypto/rand/libcrypto-shlib-rand_uniform.o",
- "crypto/rand/libcrypto-shlib-randfile.o",
- "crypto/rand/libfips-lib-rand_lib.o"
+ "crypto/rand/libcrypto-shlib-randfile.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11681,11 +11430,14 @@ our %unified_info = (
"crypto/rc4/libcrypto-lib-rc4-md5-x86_64.o",
"crypto/rc4/libcrypto-lib-rc4-x86_64.o",
"crypto/rc4/libcrypto-shlib-rc4-md5-x86_64.o",
- "crypto/rc4/libcrypto-shlib-rc4-x86_64.o"
+ "crypto/rc4/libcrypto-shlib-rc4-x86_64.o",
+ "crypto/rc4/liblegacy-lib-rc4-md5-x86_64.o",
+ "crypto/rc4/liblegacy-lib-rc4-x86_64.o"
],
"products" => {
"lib" => [
- "libcrypto"
+ "libcrypto",
+ "providers/liblegacy.a"
]
}
},
@@ -11755,29 +11507,11 @@ our %unified_info = (
"crypto/rsa/libcrypto-shlib-rsa_sp800_56b_check.o",
"crypto/rsa/libcrypto-shlib-rsa_sp800_56b_gen.o",
"crypto/rsa/libcrypto-shlib-rsa_x931.o",
- "crypto/rsa/libcrypto-shlib-rsa_x931g.o",
- "crypto/rsa/libfips-lib-rsa_acvp_test_params.o",
- "crypto/rsa/libfips-lib-rsa_backend.o",
- "crypto/rsa/libfips-lib-rsa_chk.o",
- "crypto/rsa/libfips-lib-rsa_crpt.o",
- "crypto/rsa/libfips-lib-rsa_gen.o",
- "crypto/rsa/libfips-lib-rsa_lib.o",
- "crypto/rsa/libfips-lib-rsa_mp_names.o",
- "crypto/rsa/libfips-lib-rsa_none.o",
- "crypto/rsa/libfips-lib-rsa_oaep.o",
- "crypto/rsa/libfips-lib-rsa_ossl.o",
- "crypto/rsa/libfips-lib-rsa_pk1.o",
- "crypto/rsa/libfips-lib-rsa_pss.o",
- "crypto/rsa/libfips-lib-rsa_schemes.o",
- "crypto/rsa/libfips-lib-rsa_sign.o",
- "crypto/rsa/libfips-lib-rsa_sp800_56b_check.o",
- "crypto/rsa/libfips-lib-rsa_sp800_56b_gen.o",
- "crypto/rsa/libfips-lib-rsa_x931.o"
+ "crypto/rsa/libcrypto-shlib-rsa_x931g.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11823,22 +11557,11 @@ our %unified_info = (
"crypto/sha/libcrypto-shlib-sha256.o",
"crypto/sha/libcrypto-shlib-sha3.o",
"crypto/sha/libcrypto-shlib-sha512-x86_64.o",
- "crypto/sha/libcrypto-shlib-sha512.o",
- "crypto/sha/libfips-lib-keccak1600-x86_64.o",
- "crypto/sha/libfips-lib-sha1-mb-x86_64.o",
- "crypto/sha/libfips-lib-sha1-x86_64.o",
- "crypto/sha/libfips-lib-sha1dgst.o",
- "crypto/sha/libfips-lib-sha256-mb-x86_64.o",
- "crypto/sha/libfips-lib-sha256-x86_64.o",
- "crypto/sha/libfips-lib-sha256.o",
- "crypto/sha/libfips-lib-sha3.o",
- "crypto/sha/libfips-lib-sha512-x86_64.o",
- "crypto/sha/libfips-lib-sha512.o"
+ "crypto/sha/libcrypto-shlib-sha512.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11876,22 +11599,11 @@ our %unified_info = (
"crypto/slh_dsa/libcrypto-shlib-slh_hypertree.o",
"crypto/slh_dsa/libcrypto-shlib-slh_params.o",
"crypto/slh_dsa/libcrypto-shlib-slh_wots.o",
- "crypto/slh_dsa/libcrypto-shlib-slh_xmss.o",
- "crypto/slh_dsa/libfips-lib-slh_adrs.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa_hash_ctx.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa_key.o",
- "crypto/slh_dsa/libfips-lib-slh_fors.o",
- "crypto/slh_dsa/libfips-lib-slh_hash.o",
- "crypto/slh_dsa/libfips-lib-slh_hypertree.o",
- "crypto/slh_dsa/libfips-lib-slh_params.o",
- "crypto/slh_dsa/libfips-lib-slh_wots.o",
- "crypto/slh_dsa/libfips-lib-slh_xmss.o"
+ "crypto/slh_dsa/libcrypto-shlib-slh_xmss.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11911,13 +11623,11 @@ our %unified_info = (
"crypto/stack" => {
"deps" => [
"crypto/stack/libcrypto-lib-stack.o",
- "crypto/stack/libcrypto-shlib-stack.o",
- "crypto/stack/libfips-lib-stack.o"
+ "crypto/stack/libcrypto-shlib-stack.o"
],
"products" => {
"lib" => [
- "libcrypto",
- "providers/libfips.a"
+ "libcrypto"
]
}
},
@@ -11952,16 +11662,12 @@ our %unified_info = (
"crypto/thread/libcrypto-shlib-api.o",
"crypto/thread/libcrypto-shlib-arch.o",
"crypto/thread/libcrypto-shlib-internal.o",
- "crypto/thread/libssl-shlib-arch.o",
- "crypto/thread/libfips-lib-api.o",
- "crypto/thread/libfips-lib-arch.o",
- "crypto/thread/libfips-lib-internal.o"
+ "crypto/thread/libssl-shlib-arch.o"
],
"products" => {
"lib" => [
"libcrypto",
- "libssl",
- "providers/libfips.a"
+ "libssl"
]
}
},
@@ -11975,16 +11681,12 @@ our %unified_info = (
"crypto/thread/arch/libcrypto-shlib-thread_win.o",
"crypto/thread/arch/libssl-shlib-thread_none.o",
"crypto/thread/arch/libssl-shlib-thread_posix.o",
- "crypto/thread/arch/libssl-shlib-thread_win.o",
- "crypto/thread/arch/libfips-lib-thread_none.o",
- "crypto/thread/arch/libfips-lib-thread_posix.o",
- "crypto/thread/arch/libfips-lib-thread_win.o"
+ "crypto/thread/arch/libssl-shlib-thread_win.o"
],
"products" => {
"lib" => [
"libcrypto",
- "libssl",
- "providers/libfips.a"
+ "libssl"
]
}
},
@@ -12317,6 +12019,8 @@ our %unified_info = (
},
"providers" => {
"deps" => [
+ "providers/endecode_test-bin-legacyprov.o",
+ "providers/evp_extra_test-bin-legacyprov.o",
"providers/libcrypto-lib-baseprov.o",
"providers/libcrypto-lib-defltprov.o",
"providers/libcrypto-lib-nullprov.o",
@@ -12329,12 +12033,16 @@ our %unified_info = (
"providers/libdefault.a"
],
"products" => {
+ "bin" => [
+ "test/endecode_test",
+ "test/evp_extra_test"
+ ],
"dso" => [
- "providers/fips"
+ "providers/legacy"
],
"lib" => [
"libcrypto",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -12349,19 +12057,13 @@ our %unified_info = (
"providers/common/libdefault-lib-provider_util.o",
"providers/common/libdefault-lib-securitycheck.o",
"providers/common/libdefault-lib-securitycheck_default.o",
- "providers/common/libfips-lib-bio_prov.o",
- "providers/common/libfips-lib-capabilities.o",
- "providers/common/libfips-lib-digest_to_nid.o",
- "providers/common/libfips-lib-provider_seeding.o",
- "providers/common/libfips-lib-provider_util.o",
- "providers/common/libfips-lib-securitycheck.o",
- "providers/common/libfips-lib-securitycheck_fips.o"
+ "providers/common/liblegacy-lib-provider_util.o"
],
"products" => {
"lib" => [
"providers/libcommon.a",
"providers/libdefault.a",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -12383,43 +12085,22 @@ our %unified_info = (
"providers/common/der/libcommon-lib-der_slh_dsa_gen.o",
"providers/common/der/libcommon-lib-der_slh_dsa_key.o",
"providers/common/der/libcommon-lib-der_wrap_gen.o",
- "providers/common/der/libdefault-lib-der_rsa_sig.o",
- "providers/common/der/libfips-lib-der_rsa_sig.o"
+ "providers/common/der/libdefault-lib-der_rsa_sig.o"
],
"products" => {
"lib" => [
"providers/libcommon.a",
- "providers/libdefault.a",
- "providers/libfips.a"
- ]
- }
- },
- "providers/fips" => {
- "deps" => [
- "providers/fips/fips-dso-fips_entry.o",
- "providers/fips/libfips-lib-fipsindicator.o",
- "providers/fips/libfips-lib-fipsprov.o",
- "providers/fips/libfips-lib-self_test.o",
- "providers/fips/libfips-lib-self_test_kats.o"
- ],
- "products" => {
- "dso" => [
- "providers/fips"
- ],
- "lib" => [
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
"providers/implementations/asymciphers" => {
"deps" => [
- "providers/implementations/asymciphers/libdefault-lib-rsa_enc.o",
- "providers/implementations/asymciphers/libfips-lib-rsa_enc.o"
+ "providers/implementations/asymciphers/libdefault-lib-rsa_enc.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -12467,31 +12148,29 @@ our %unified_info = (
"providers/implementations/ciphers/libdefault-lib-cipher_tdes_hw.o",
"providers/implementations/ciphers/libdefault-lib-cipher_tdes_wrap.o",
"providers/implementations/ciphers/libdefault-lib-cipher_tdes_wrap_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha1_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha256_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_wrp.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_fips.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_cts.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_common.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_hw.o"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_tdes_common.o"
],
"products" => {
"lib" => [
"providers/libcommon.a",
"providers/libdefault.a",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -12507,14 +12186,15 @@ our %unified_info = (
"providers/implementations/digests/libdefault-lib-ripemd_prov.o",
"providers/implementations/digests/libdefault-lib-sha2_prov.o",
"providers/implementations/digests/libdefault-lib-sha3_prov.o",
- "providers/implementations/digests/libfips-lib-sha2_prov.o",
- "providers/implementations/digests/libfips-lib-sha3_prov.o"
+ "providers/implementations/digests/liblegacy-lib-md4_prov.o",
+ "providers/implementations/digests/liblegacy-lib-ripemd_prov.o",
+ "providers/implementations/digests/liblegacy-lib-wp_prov.o"
],
"products" => {
"lib" => [
"providers/libcommon.a",
"providers/libdefault.a",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -12546,16 +12226,11 @@ our %unified_info = (
"providers/implementations/exchange/libdefault-lib-dh_exch.o",
"providers/implementations/exchange/libdefault-lib-ecdh_exch.o",
"providers/implementations/exchange/libdefault-lib-ecx_exch.o",
- "providers/implementations/exchange/libdefault-lib-kdf_exch.o",
- "providers/implementations/exchange/libfips-lib-dh_exch.o",
- "providers/implementations/exchange/libfips-lib-ecdh_exch.o",
- "providers/implementations/exchange/libfips-lib-ecx_exch.o",
- "providers/implementations/exchange/libfips-lib-kdf_exch.o"
+ "providers/implementations/exchange/libdefault-lib-kdf_exch.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -12574,19 +12249,13 @@ our %unified_info = (
"providers/implementations/kdfs/libdefault-lib-sskdf.o",
"providers/implementations/kdfs/libdefault-lib-tls1_prf.o",
"providers/implementations/kdfs/libdefault-lib-x942kdf.o",
- "providers/implementations/kdfs/libfips-lib-hkdf.o",
- "providers/implementations/kdfs/libfips-lib-kbkdf.o",
- "providers/implementations/kdfs/libfips-lib-pbkdf2.o",
- "providers/implementations/kdfs/libfips-lib-pbkdf2_fips.o",
- "providers/implementations/kdfs/libfips-lib-sshkdf.o",
- "providers/implementations/kdfs/libfips-lib-sskdf.o",
- "providers/implementations/kdfs/libfips-lib-tls1_prf.o",
- "providers/implementations/kdfs/libfips-lib-x942kdf.o"
+ "providers/implementations/kdfs/liblegacy-lib-pbkdf1.o",
+ "providers/implementations/kdfs/liblegacy-lib-pvkkdf.o"
],
"products" => {
"lib" => [
"providers/libdefault.a",
- "providers/libfips.a"
+ "providers/liblegacy.a"
]
}
},
@@ -12598,15 +12267,11 @@ our %unified_info = (
"providers/implementations/kem/libdefault-lib-ml_kem_kem.o",
"providers/implementations/kem/libdefault-lib-mlx_kem.o",
"providers/implementations/kem/libdefault-lib-rsa_kem.o",
- "providers/implementations/kem/libfips-lib-ml_kem_kem.o",
- "providers/implementations/kem/libfips-lib-mlx_kem.o",
- "providers/implementations/kem/libfips-lib-rsa_kem.o",
"providers/implementations/kem/libtemplate-lib-template_kem.o"
],
"products" => {
"lib" => [
"providers/libdefault.a",
- "providers/libfips.a",
"providers/libtemplate.a"
]
}
@@ -12624,23 +12289,11 @@ our %unified_info = (
"providers/implementations/keymgmt/libdefault-lib-mlx_kmgmt.o",
"providers/implementations/keymgmt/libdefault-lib-rsa_kmgmt.o",
"providers/implementations/keymgmt/libdefault-lib-slh_dsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-dh_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-dsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ec_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ecx_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-kdf_legacy_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-mac_legacy_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ml_dsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ml_kem_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-mlx_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-rsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-slh_dsa_kmgmt.o",
"providers/implementations/keymgmt/libtemplate-lib-template_kmgmt.o"
],
"products" => {
"lib" => [
"providers/libdefault.a",
- "providers/libfips.a",
"providers/libtemplate.a"
]
}
@@ -12654,16 +12307,11 @@ our %unified_info = (
"providers/implementations/macs/libdefault-lib-hmac_prov.o",
"providers/implementations/macs/libdefault-lib-kmac_prov.o",
"providers/implementations/macs/libdefault-lib-poly1305_prov.o",
- "providers/implementations/macs/libdefault-lib-siphash_prov.o",
- "providers/implementations/macs/libfips-lib-cmac_prov.o",
- "providers/implementations/macs/libfips-lib-gmac_prov.o",
- "providers/implementations/macs/libfips-lib-hmac_prov.o",
- "providers/implementations/macs/libfips-lib-kmac_prov.o"
+ "providers/implementations/macs/libdefault-lib-siphash_prov.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -12675,18 +12323,11 @@ our %unified_info = (
"providers/implementations/rands/libdefault-lib-drbg_hmac.o",
"providers/implementations/rands/libdefault-lib-seed_src.o",
"providers/implementations/rands/libdefault-lib-seed_src_jitter.o",
- "providers/implementations/rands/libdefault-lib-test_rng.o",
- "providers/implementations/rands/libfips-lib-drbg.o",
- "providers/implementations/rands/libfips-lib-drbg_ctr.o",
- "providers/implementations/rands/libfips-lib-drbg_hash.o",
- "providers/implementations/rands/libfips-lib-drbg_hmac.o",
- "providers/implementations/rands/libfips-lib-fips_crng_test.o",
- "providers/implementations/rands/libfips-lib-test_rng.o"
+ "providers/implementations/rands/libdefault-lib-test_rng.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -12711,33 +12352,22 @@ our %unified_info = (
"providers/implementations/signature/libdefault-lib-mac_legacy_sig.o",
"providers/implementations/signature/libdefault-lib-ml_dsa_sig.o",
"providers/implementations/signature/libdefault-lib-rsa_sig.o",
- "providers/implementations/signature/libdefault-lib-slh_dsa_sig.o",
- "providers/implementations/signature/libfips-lib-dsa_sig.o",
- "providers/implementations/signature/libfips-lib-ecdsa_sig.o",
- "providers/implementations/signature/libfips-lib-eddsa_sig.o",
- "providers/implementations/signature/libfips-lib-mac_legacy_sig.o",
- "providers/implementations/signature/libfips-lib-ml_dsa_sig.o",
- "providers/implementations/signature/libfips-lib-rsa_sig.o",
- "providers/implementations/signature/libfips-lib-slh_dsa_sig.o"
+ "providers/implementations/signature/libdefault-lib-slh_dsa_sig.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
"providers/implementations/skeymgmt" => {
"deps" => [
"providers/implementations/skeymgmt/libdefault-lib-aes_skmgmt.o",
- "providers/implementations/skeymgmt/libdefault-lib-generic.o",
- "providers/implementations/skeymgmt/libfips-lib-aes_skmgmt.o",
- "providers/implementations/skeymgmt/libfips-lib-generic.o"
+ "providers/implementations/skeymgmt/libdefault-lib-generic.o"
],
"products" => {
"lib" => [
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -12936,6 +12566,7 @@ our %unified_info = (
"ssl/record/methods" => {
"deps" => [
"ssl/record/methods/libssl-lib-dtls_meth.o",
+ "ssl/record/methods/libssl-lib-ktls_meth.o",
"ssl/record/methods/libssl-lib-ssl3_meth.o",
"ssl/record/methods/libssl-lib-tls13_meth.o",
"ssl/record/methods/libssl-lib-tls1_meth.o",
@@ -12943,6 +12574,7 @@ our %unified_info = (
"ssl/record/methods/libssl-lib-tls_multib.o",
"ssl/record/methods/libssl-lib-tlsany_meth.o",
"ssl/record/methods/libssl-shlib-dtls_meth.o",
+ "ssl/record/methods/libssl-shlib-ktls_meth.o",
"ssl/record/methods/libssl-shlib-ssl3_cbc.o",
"ssl/record/methods/libssl-shlib-ssl3_meth.o",
"ssl/record/methods/libssl-shlib-tls13_meth.o",
@@ -12952,15 +12584,13 @@ our %unified_info = (
"ssl/record/methods/libssl-shlib-tls_pad.o",
"ssl/record/methods/libssl-shlib-tlsany_meth.o",
"ssl/record/methods/libcommon-lib-tls_pad.o",
- "ssl/record/methods/libdefault-lib-ssl3_cbc.o",
- "ssl/record/methods/libfips-lib-ssl3_cbc.o"
+ "ssl/record/methods/libdefault-lib-ssl3_cbc.o"
],
"products" => {
"lib" => [
"libssl",
"providers/libcommon.a",
- "providers/libdefault.a",
- "providers/libfips.a"
+ "providers/libdefault.a"
]
}
},
@@ -19584,18 +19214,9 @@ our %unified_info = (
"providers/common/include/prov/der_wrap.h" => [
"providers/common/include/prov/der_wrap.h.in"
],
- "providers/fips.ld" => [
+ "providers/legacy.ld" => [
"util/providers.num"
],
- "providers/fipsmodule.cnf" => [
- "util/mk-fipsmodule-cnf.pl",
- "-module",
- "\$(FIPSMODULE)",
- "-section_name",
- "fips_sect",
- "-key",
- "\$(FIPSKEY)"
- ],
"test/buildtest_aes.c" => [
"test/generate_buildtest.pl",
"aes"
@@ -19640,6 +19261,10 @@ our %unified_info = (
"test/generate_buildtest.pl",
"conf_api"
],
+ "test/buildtest_configuration.c" => [
+ "test/generate_buildtest.pl",
+ "configuration"
+ ],
"test/buildtest_conftypes.c" => [
"test/generate_buildtest.pl",
"conftypes"
@@ -21222,9 +20847,6 @@ our %unified_info = (
"crypto/bn/libcrypto-shlib-bn_exp.o" => [
"crypto"
],
- "crypto/bn/libfips-lib-bn_exp.o" => [
- "crypto"
- ],
"crypto/bn/mips-mont.o" => [
"crypto"
],
@@ -21321,15 +20943,6 @@ our %unified_info = (
"crypto/ec/libcrypto-shlib-ecx_meth.o" => [
"crypto"
],
- "crypto/ec/libfips-lib-ecp_nistp384.o" => [
- "crypto"
- ],
- "crypto/ec/libfips-lib-ecp_nistp521.o" => [
- "crypto"
- ],
- "crypto/ec/libfips-lib-ecx_key.o" => [
- "crypto"
- ],
"crypto/evp/e_aes.o" => [
"crypto",
"crypto/modes"
@@ -21417,6 +21030,9 @@ our %unified_info = (
"crypto/info.o" => [
"crypto"
],
+ "crypto/legacy-dso-cpuid.o" => [
+ "."
+ ],
"crypto/libcrypto-lib-cpuid.o" => [
"."
],
@@ -21435,9 +21051,6 @@ our %unified_info = (
"crypto/libcrypto-shlib-info.o" => [
"crypto"
],
- "crypto/libfips-lib-cpuid.o" => [
- "."
- ],
"crypto/md5/md5-aarch64.o" => [
"crypto"
],
@@ -21474,9 +21087,6 @@ our %unified_info = (
"crypto/modes/libcrypto-shlib-gcm128.o" => [
"crypto"
],
- "crypto/modes/libfips-lib-gcm128.o" => [
- "crypto"
- ],
"crypto/params_idx.c" => [
"util/perl"
],
@@ -21993,9 +21603,6 @@ our %unified_info = (
"providers/common/der/libdefault-lib-der_rsa_sig.o" => [
"providers/common/include/prov"
],
- "providers/common/der/libfips-lib-der_rsa_sig.o" => [
- "providers/common/include/prov"
- ],
"providers/common/include/prov/der_digests.h" => [
"providers/common/der"
],
@@ -22020,9 +21627,6 @@ our %unified_info = (
"providers/common/include/prov/der_wrap.h" => [
"providers/common/der"
],
- "providers/fips" => [
- "include"
- ],
"providers/implementations/encode_decode/encode_key2any.o" => [
"providers/common/include/prov"
],
@@ -22032,9 +21636,6 @@ our %unified_info = (
"providers/implementations/kdfs/libdefault-lib-x942kdf.o" => [
"providers/common/include/prov"
],
- "providers/implementations/kdfs/libfips-lib-x942kdf.o" => [
- "providers/common/include/prov"
- ],
"providers/implementations/kdfs/x942kdf.o" => [
"providers/common/include/prov"
],
@@ -22065,24 +21666,6 @@ our %unified_info = (
"providers/implementations/signature/libdefault-lib-slh_dsa_sig.o" => [
"providers/common/include/prov"
],
- "providers/implementations/signature/libfips-lib-dsa_sig.o" => [
- "providers/common/include/prov"
- ],
- "providers/implementations/signature/libfips-lib-ecdsa_sig.o" => [
- "providers/common/include/prov"
- ],
- "providers/implementations/signature/libfips-lib-eddsa_sig.o" => [
- "providers/common/include/prov"
- ],
- "providers/implementations/signature/libfips-lib-ml_dsa_sig.o" => [
- "providers/common/include/prov"
- ],
- "providers/implementations/signature/libfips-lib-rsa_sig.o" => [
- "providers/common/include/prov"
- ],
- "providers/implementations/signature/libfips-lib-slh_dsa_sig.o" => [
- "providers/common/include/prov"
- ],
"providers/implementations/signature/ml_dsa_sig.o" => [
"providers/common/include/prov"
],
@@ -22095,6 +21678,11 @@ our %unified_info = (
"providers/implementations/signature/sm2_sig.o" => [
"providers/common/include/prov"
],
+ "providers/legacy" => [
+ "include",
+ "providers/implementations/include",
+ "providers/common/include"
+ ],
"providers/libcommon.a" => [
"crypto",
"include",
@@ -22137,10 +21725,6 @@ our %unified_info = (
"include",
"apps/include"
],
- "test/acvp_test" => [
- "include",
- "apps/include"
- ],
"test/aesgcmtest" => [
"include",
"apps/include",
@@ -22301,6 +21885,9 @@ our %unified_info = (
"test/buildtest_c_conf_api" => [
"include"
],
+ "test/buildtest_c_configuration" => [
+ "include"
+ ],
"test/buildtest_c_conftypes" => [
"include"
],
@@ -22686,7 +22273,9 @@ our %unified_info = (
"test/endecode_test" => [
".",
"include",
- "apps/include"
+ "apps/include",
+ "providers/common/include",
+ "providers/implementations/include"
],
"test/endecoder_legacy_test" => [
".",
@@ -23564,7 +23153,7 @@ our %unified_info = (
"libssl",
"providers/libcommon.a",
"providers/libdefault.a",
- "providers/libfips.a",
+ "providers/liblegacy.a",
"providers/libtemplate.a",
"test/libtestutil.a"
],
@@ -24478,7 +24067,7 @@ our %unified_info = (
"engines/loader_attic",
"engines/ossltest",
"engines/padlock",
- "providers/fips",
+ "providers/legacy",
"test/p_minimal",
"test/p_test"
],
@@ -24515,7 +24104,6 @@ our %unified_info = (
"fuzz/v3name-test",
"fuzz/x509-test",
"test/aborttest",
- "test/acvp_test",
"test/aesgcmtest",
"test/afalgtest",
"test/algorithmid_test",
@@ -24557,6 +24145,7 @@ our %unified_info = (
"test/buildtest_c_cmac",
"test/buildtest_c_cmp_util",
"test/buildtest_c_conf_api",
+ "test/buildtest_c_configuration",
"test/buildtest_c_conftypes",
"test/buildtest_c_core",
"test/buildtest_c_core_dispatch",
@@ -25750,6 +25339,7 @@ our %unified_info = (
"ssl/record/libssl-shlib-rec_layer_d1.o",
"ssl/record/libssl-shlib-rec_layer_s3.o",
"ssl/record/methods/libssl-shlib-dtls_meth.o",
+ "ssl/record/methods/libssl-shlib-ktls_meth.o",
"ssl/record/methods/libssl-shlib-ssl3_cbc.o",
"ssl/record/methods/libssl-shlib-ssl3_meth.o",
"ssl/record/methods/libssl-shlib-tls13_meth.o",
@@ -26203,36 +25793,6 @@ our %unified_info = (
"crypto/aes/libcrypto-shlib-vpaes-x86_64.o" => [
"crypto/aes/vpaes-x86_64.s"
],
- "crypto/aes/libfips-lib-aes-x86_64.o" => [
- "crypto/aes/aes-x86_64.s"
- ],
- "crypto/aes/libfips-lib-aes_ecb.o" => [
- "crypto/aes/aes_ecb.c"
- ],
- "crypto/aes/libfips-lib-aes_misc.o" => [
- "crypto/aes/aes_misc.c"
- ],
- "crypto/aes/libfips-lib-aesni-mb-x86_64.o" => [
- "crypto/aes/aesni-mb-x86_64.s"
- ],
- "crypto/aes/libfips-lib-aesni-sha1-x86_64.o" => [
- "crypto/aes/aesni-sha1-x86_64.s"
- ],
- "crypto/aes/libfips-lib-aesni-sha256-x86_64.o" => [
- "crypto/aes/aesni-sha256-x86_64.s"
- ],
- "crypto/aes/libfips-lib-aesni-x86_64.o" => [
- "crypto/aes/aesni-x86_64.s"
- ],
- "crypto/aes/libfips-lib-aesni-xts-avx512.o" => [
- "crypto/aes/aesni-xts-avx512.s"
- ],
- "crypto/aes/libfips-lib-bsaes-x86_64.o" => [
- "crypto/aes/bsaes-x86_64.s"
- ],
- "crypto/aes/libfips-lib-vpaes-x86_64.o" => [
- "crypto/aes/vpaes-x86_64.s"
- ],
"crypto/asn1/asn1_time_test-bin-a_time.o" => [
"crypto/asn1/a_time.c"
],
@@ -26866,9 +26426,6 @@ our %unified_info = (
"crypto/bn/asm/libcrypto-shlib-x86_64-gcc.o" => [
"crypto/bn/asm/x86_64-gcc.c"
],
- "crypto/bn/asm/libfips-lib-x86_64-gcc.o" => [
- "crypto/bn/asm/x86_64-gcc.c"
- ],
"crypto/bn/libcrypto-lib-bn_add.o" => [
"crypto/bn/bn_add.c"
],
@@ -27139,126 +26696,6 @@ our %unified_info = (
"crypto/bn/libcrypto-shlib-x86_64-mont5.o" => [
"crypto/bn/x86_64-mont5.s"
],
- "crypto/bn/libfips-lib-bn_add.o" => [
- "crypto/bn/bn_add.c"
- ],
- "crypto/bn/libfips-lib-bn_blind.o" => [
- "crypto/bn/bn_blind.c"
- ],
- "crypto/bn/libfips-lib-bn_const.o" => [
- "crypto/bn/bn_const.c"
- ],
- "crypto/bn/libfips-lib-bn_conv.o" => [
- "crypto/bn/bn_conv.c"
- ],
- "crypto/bn/libfips-lib-bn_ctx.o" => [
- "crypto/bn/bn_ctx.c"
- ],
- "crypto/bn/libfips-lib-bn_dh.o" => [
- "crypto/bn/bn_dh.c"
- ],
- "crypto/bn/libfips-lib-bn_div.o" => [
- "crypto/bn/bn_div.c"
- ],
- "crypto/bn/libfips-lib-bn_exp.o" => [
- "crypto/bn/bn_exp.c"
- ],
- "crypto/bn/libfips-lib-bn_exp2.o" => [
- "crypto/bn/bn_exp2.c"
- ],
- "crypto/bn/libfips-lib-bn_gcd.o" => [
- "crypto/bn/bn_gcd.c"
- ],
- "crypto/bn/libfips-lib-bn_gf2m.o" => [
- "crypto/bn/bn_gf2m.c"
- ],
- "crypto/bn/libfips-lib-bn_intern.o" => [
- "crypto/bn/bn_intern.c"
- ],
- "crypto/bn/libfips-lib-bn_kron.o" => [
- "crypto/bn/bn_kron.c"
- ],
- "crypto/bn/libfips-lib-bn_lib.o" => [
- "crypto/bn/bn_lib.c"
- ],
- "crypto/bn/libfips-lib-bn_mod.o" => [
- "crypto/bn/bn_mod.c"
- ],
- "crypto/bn/libfips-lib-bn_mont.o" => [
- "crypto/bn/bn_mont.c"
- ],
- "crypto/bn/libfips-lib-bn_mpi.o" => [
- "crypto/bn/bn_mpi.c"
- ],
- "crypto/bn/libfips-lib-bn_mul.o" => [
- "crypto/bn/bn_mul.c"
- ],
- "crypto/bn/libfips-lib-bn_nist.o" => [
- "crypto/bn/bn_nist.c"
- ],
- "crypto/bn/libfips-lib-bn_prime.o" => [
- "crypto/bn/bn_prime.c"
- ],
- "crypto/bn/libfips-lib-bn_rand.o" => [
- "crypto/bn/bn_rand.c"
- ],
- "crypto/bn/libfips-lib-bn_recp.o" => [
- "crypto/bn/bn_recp.c"
- ],
- "crypto/bn/libfips-lib-bn_rsa_fips186_4.o" => [
- "crypto/bn/bn_rsa_fips186_4.c"
- ],
- "crypto/bn/libfips-lib-bn_shift.o" => [
- "crypto/bn/bn_shift.c"
- ],
- "crypto/bn/libfips-lib-bn_sqr.o" => [
- "crypto/bn/bn_sqr.c"
- ],
- "crypto/bn/libfips-lib-bn_sqrt.o" => [
- "crypto/bn/bn_sqrt.c"
- ],
- "crypto/bn/libfips-lib-bn_word.o" => [
- "crypto/bn/bn_word.c"
- ],
- "crypto/bn/libfips-lib-rsaz-2k-avx512.o" => [
- "crypto/bn/rsaz-2k-avx512.s"
- ],
- "crypto/bn/libfips-lib-rsaz-2k-avxifma.o" => [
- "crypto/bn/rsaz-2k-avxifma.s"
- ],
- "crypto/bn/libfips-lib-rsaz-3k-avx512.o" => [
- "crypto/bn/rsaz-3k-avx512.s"
- ],
- "crypto/bn/libfips-lib-rsaz-3k-avxifma.o" => [
- "crypto/bn/rsaz-3k-avxifma.s"
- ],
- "crypto/bn/libfips-lib-rsaz-4k-avx512.o" => [
- "crypto/bn/rsaz-4k-avx512.s"
- ],
- "crypto/bn/libfips-lib-rsaz-4k-avxifma.o" => [
- "crypto/bn/rsaz-4k-avxifma.s"
- ],
- "crypto/bn/libfips-lib-rsaz-avx2.o" => [
- "crypto/bn/rsaz-avx2.s"
- ],
- "crypto/bn/libfips-lib-rsaz-x86_64.o" => [
- "crypto/bn/rsaz-x86_64.s"
- ],
- "crypto/bn/libfips-lib-rsaz_exp.o" => [
- "crypto/bn/rsaz_exp.c"
- ],
- "crypto/bn/libfips-lib-rsaz_exp_x2.o" => [
- "crypto/bn/rsaz_exp_x2.c"
- ],
- "crypto/bn/libfips-lib-x86_64-gf2m.o" => [
- "crypto/bn/x86_64-gf2m.s"
- ],
- "crypto/bn/libfips-lib-x86_64-mont.o" => [
- "crypto/bn/x86_64-mont.s"
- ],
- "crypto/bn/libfips-lib-x86_64-mont5.o" => [
- "crypto/bn/x86_64-mont5.s"
- ],
"crypto/buffer/libcrypto-lib-buf_err.o" => [
"crypto/buffer/buf_err.c"
],
@@ -27271,9 +26708,6 @@ our %unified_info = (
"crypto/buffer/libcrypto-shlib-buffer.o" => [
"crypto/buffer/buffer.c"
],
- "crypto/buffer/libfips-lib-buffer.o" => [
- "crypto/buffer/buffer.c"
- ],
"crypto/ca_internals_test-bin-ctype.o" => [
"crypto/ctype.c"
],
@@ -27355,9 +26789,6 @@ our %unified_info = (
"crypto/cmac/libcrypto-shlib-cmac.o" => [
"crypto/cmac/cmac.c"
],
- "crypto/cmac/libfips-lib-cmac.o" => [
- "crypto/cmac/cmac.c"
- ],
"crypto/cmp/libcrypto-lib-cmp_asn.o" => [
"crypto/cmp/cmp_asn.c"
],
@@ -27814,18 +27245,12 @@ our %unified_info = (
"crypto/des/libcrypto-shlib-xcbc_enc.o" => [
"crypto/des/xcbc_enc.c"
],
- "crypto/des/libfips-lib-des_enc.o" => [
+ "crypto/des/liblegacy-lib-des_enc.o" => [
"crypto/des/des_enc.c"
],
- "crypto/des/libfips-lib-ecb3_enc.o" => [
- "crypto/des/ecb3_enc.c"
- ],
- "crypto/des/libfips-lib-fcrypt_b.o" => [
+ "crypto/des/liblegacy-lib-fcrypt_b.o" => [
"crypto/des/fcrypt_b.c"
],
- "crypto/des/libfips-lib-set_key.o" => [
- "crypto/des/set_key.c"
- ],
"crypto/dh/libcrypto-lib-dh_ameth.o" => [
"crypto/dh/dh_ameth.c"
],
@@ -27916,27 +27341,6 @@ our %unified_info = (
"crypto/dh/libcrypto-shlib-dh_rfc5114.o" => [
"crypto/dh/dh_rfc5114.c"
],
- "crypto/dh/libfips-lib-dh_backend.o" => [
- "crypto/dh/dh_backend.c"
- ],
- "crypto/dh/libfips-lib-dh_check.o" => [
- "crypto/dh/dh_check.c"
- ],
- "crypto/dh/libfips-lib-dh_gen.o" => [
- "crypto/dh/dh_gen.c"
- ],
- "crypto/dh/libfips-lib-dh_group_params.o" => [
- "crypto/dh/dh_group_params.c"
- ],
- "crypto/dh/libfips-lib-dh_kdf.o" => [
- "crypto/dh/dh_kdf.c"
- ],
- "crypto/dh/libfips-lib-dh_key.o" => [
- "crypto/dh/dh_key.c"
- ],
- "crypto/dh/libfips-lib-dh_lib.o" => [
- "crypto/dh/dh_lib.c"
- ],
"crypto/dsa/libcrypto-lib-dsa_ameth.o" => [
"crypto/dsa/dsa_ameth.c"
],
@@ -28027,30 +27431,6 @@ our %unified_info = (
"crypto/dsa/libcrypto-shlib-dsa_vrf.o" => [
"crypto/dsa/dsa_vrf.c"
],
- "crypto/dsa/libfips-lib-dsa_backend.o" => [
- "crypto/dsa/dsa_backend.c"
- ],
- "crypto/dsa/libfips-lib-dsa_check.o" => [
- "crypto/dsa/dsa_check.c"
- ],
- "crypto/dsa/libfips-lib-dsa_gen.o" => [
- "crypto/dsa/dsa_gen.c"
- ],
- "crypto/dsa/libfips-lib-dsa_key.o" => [
- "crypto/dsa/dsa_key.c"
- ],
- "crypto/dsa/libfips-lib-dsa_lib.o" => [
- "crypto/dsa/dsa_lib.c"
- ],
- "crypto/dsa/libfips-lib-dsa_ossl.o" => [
- "crypto/dsa/dsa_ossl.c"
- ],
- "crypto/dsa/libfips-lib-dsa_sign.o" => [
- "crypto/dsa/dsa_sign.c"
- ],
- "crypto/dsa/libfips-lib-dsa_vrf.o" => [
- "crypto/dsa/dsa_vrf.c"
- ],
"crypto/dso/libcrypto-lib-dso_dl.o" => [
"crypto/dso/dso_dl.c"
],
@@ -28099,18 +27479,12 @@ our %unified_info = (
"crypto/ec/curve448/arch_32/libcrypto-shlib-f_impl32.o" => [
"crypto/ec/curve448/arch_32/f_impl32.c"
],
- "crypto/ec/curve448/arch_32/libfips-lib-f_impl32.o" => [
- "crypto/ec/curve448/arch_32/f_impl32.c"
- ],
"crypto/ec/curve448/arch_64/libcrypto-lib-f_impl64.o" => [
"crypto/ec/curve448/arch_64/f_impl64.c"
],
"crypto/ec/curve448/arch_64/libcrypto-shlib-f_impl64.o" => [
"crypto/ec/curve448/arch_64/f_impl64.c"
],
- "crypto/ec/curve448/arch_64/libfips-lib-f_impl64.o" => [
- "crypto/ec/curve448/arch_64/f_impl64.c"
- ],
"crypto/ec/curve448/libcrypto-lib-curve448.o" => [
"crypto/ec/curve448/curve448.c"
],
@@ -28141,21 +27515,6 @@ our %unified_info = (
"crypto/ec/curve448/libcrypto-shlib-scalar.o" => [
"crypto/ec/curve448/scalar.c"
],
- "crypto/ec/curve448/libfips-lib-curve448.o" => [
- "crypto/ec/curve448/curve448.c"
- ],
- "crypto/ec/curve448/libfips-lib-curve448_tables.o" => [
- "crypto/ec/curve448/curve448_tables.c"
- ],
- "crypto/ec/curve448/libfips-lib-eddsa.o" => [
- "crypto/ec/curve448/eddsa.c"
- ],
- "crypto/ec/curve448/libfips-lib-f_generic.o" => [
- "crypto/ec/curve448/f_generic.c"
- ],
- "crypto/ec/curve448/libfips-lib-scalar.o" => [
- "crypto/ec/curve448/scalar.c"
- ],
"crypto/ec/libcrypto-lib-curve25519.o" => [
"crypto/ec/curve25519.c"
],
@@ -28390,102 +27749,6 @@ our %unified_info = (
"crypto/ec/libcrypto-shlib-x25519-x86_64.o" => [
"crypto/ec/x25519-x86_64.s"
],
- "crypto/ec/libfips-lib-curve25519.o" => [
- "crypto/ec/curve25519.c"
- ],
- "crypto/ec/libfips-lib-ec2_oct.o" => [
- "crypto/ec/ec2_oct.c"
- ],
- "crypto/ec/libfips-lib-ec2_smpl.o" => [
- "crypto/ec/ec2_smpl.c"
- ],
- "crypto/ec/libfips-lib-ec_asn1.o" => [
- "crypto/ec/ec_asn1.c"
- ],
- "crypto/ec/libfips-lib-ec_backend.o" => [
- "crypto/ec/ec_backend.c"
- ],
- "crypto/ec/libfips-lib-ec_check.o" => [
- "crypto/ec/ec_check.c"
- ],
- "crypto/ec/libfips-lib-ec_curve.o" => [
- "crypto/ec/ec_curve.c"
- ],
- "crypto/ec/libfips-lib-ec_cvt.o" => [
- "crypto/ec/ec_cvt.c"
- ],
- "crypto/ec/libfips-lib-ec_key.o" => [
- "crypto/ec/ec_key.c"
- ],
- "crypto/ec/libfips-lib-ec_kmeth.o" => [
- "crypto/ec/ec_kmeth.c"
- ],
- "crypto/ec/libfips-lib-ec_lib.o" => [
- "crypto/ec/ec_lib.c"
- ],
- "crypto/ec/libfips-lib-ec_mult.o" => [
- "crypto/ec/ec_mult.c"
- ],
- "crypto/ec/libfips-lib-ec_oct.o" => [
- "crypto/ec/ec_oct.c"
- ],
- "crypto/ec/libfips-lib-ecdh_kdf.o" => [
- "crypto/ec/ecdh_kdf.c"
- ],
- "crypto/ec/libfips-lib-ecdh_ossl.o" => [
- "crypto/ec/ecdh_ossl.c"
- ],
- "crypto/ec/libfips-lib-ecdsa_ossl.o" => [
- "crypto/ec/ecdsa_ossl.c"
- ],
- "crypto/ec/libfips-lib-ecdsa_sign.o" => [
- "crypto/ec/ecdsa_sign.c"
- ],
- "crypto/ec/libfips-lib-ecdsa_vrf.o" => [
- "crypto/ec/ecdsa_vrf.c"
- ],
- "crypto/ec/libfips-lib-ecp_mont.o" => [
- "crypto/ec/ecp_mont.c"
- ],
- "crypto/ec/libfips-lib-ecp_nist.o" => [
- "crypto/ec/ecp_nist.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistp224.o" => [
- "crypto/ec/ecp_nistp224.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistp256.o" => [
- "crypto/ec/ecp_nistp256.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistp384.o" => [
- "crypto/ec/ecp_nistp384.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistp521.o" => [
- "crypto/ec/ecp_nistp521.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistputil.o" => [
- "crypto/ec/ecp_nistputil.c"
- ],
- "crypto/ec/libfips-lib-ecp_nistz256-x86_64.o" => [
- "crypto/ec/ecp_nistz256-x86_64.s"
- ],
- "crypto/ec/libfips-lib-ecp_nistz256.o" => [
- "crypto/ec/ecp_nistz256.c"
- ],
- "crypto/ec/libfips-lib-ecp_oct.o" => [
- "crypto/ec/ecp_oct.c"
- ],
- "crypto/ec/libfips-lib-ecp_smpl.o" => [
- "crypto/ec/ecp_smpl.c"
- ],
- "crypto/ec/libfips-lib-ecx_backend.o" => [
- "crypto/ec/ecx_backend.c"
- ],
- "crypto/ec/libfips-lib-ecx_key.o" => [
- "crypto/ec/ecx_key.c"
- ],
- "crypto/ec/libfips-lib-x25519-x86_64.o" => [
- "crypto/ec/x25519-x86_64.s"
- ],
"crypto/encode_decode/libcrypto-lib-decoder_err.o" => [
"crypto/encode_decode/decoder_err.c"
],
@@ -29212,78 +28475,6 @@ our %unified_info = (
"crypto/evp/libcrypto-shlib-skeymgmt_meth.o" => [
"crypto/evp/skeymgmt_meth.c"
],
- "crypto/evp/libfips-lib-asymcipher.o" => [
- "crypto/evp/asymcipher.c"
- ],
- "crypto/evp/libfips-lib-dh_support.o" => [
- "crypto/evp/dh_support.c"
- ],
- "crypto/evp/libfips-lib-digest.o" => [
- "crypto/evp/digest.c"
- ],
- "crypto/evp/libfips-lib-ec_support.o" => [
- "crypto/evp/ec_support.c"
- ],
- "crypto/evp/libfips-lib-evp_enc.o" => [
- "crypto/evp/evp_enc.c"
- ],
- "crypto/evp/libfips-lib-evp_fetch.o" => [
- "crypto/evp/evp_fetch.c"
- ],
- "crypto/evp/libfips-lib-evp_lib.o" => [
- "crypto/evp/evp_lib.c"
- ],
- "crypto/evp/libfips-lib-evp_rand.o" => [
- "crypto/evp/evp_rand.c"
- ],
- "crypto/evp/libfips-lib-evp_utils.o" => [
- "crypto/evp/evp_utils.c"
- ],
- "crypto/evp/libfips-lib-exchange.o" => [
- "crypto/evp/exchange.c"
- ],
- "crypto/evp/libfips-lib-kdf_lib.o" => [
- "crypto/evp/kdf_lib.c"
- ],
- "crypto/evp/libfips-lib-kdf_meth.o" => [
- "crypto/evp/kdf_meth.c"
- ],
- "crypto/evp/libfips-lib-kem.o" => [
- "crypto/evp/kem.c"
- ],
- "crypto/evp/libfips-lib-keymgmt_lib.o" => [
- "crypto/evp/keymgmt_lib.c"
- ],
- "crypto/evp/libfips-lib-keymgmt_meth.o" => [
- "crypto/evp/keymgmt_meth.c"
- ],
- "crypto/evp/libfips-lib-mac_lib.o" => [
- "crypto/evp/mac_lib.c"
- ],
- "crypto/evp/libfips-lib-mac_meth.o" => [
- "crypto/evp/mac_meth.c"
- ],
- "crypto/evp/libfips-lib-p_lib.o" => [
- "crypto/evp/p_lib.c"
- ],
- "crypto/evp/libfips-lib-pmeth_check.o" => [
- "crypto/evp/pmeth_check.c"
- ],
- "crypto/evp/libfips-lib-pmeth_gn.o" => [
- "crypto/evp/pmeth_gn.c"
- ],
- "crypto/evp/libfips-lib-pmeth_lib.o" => [
- "crypto/evp/pmeth_lib.c"
- ],
- "crypto/evp/libfips-lib-s_lib.o" => [
- "crypto/evp/s_lib.c"
- ],
- "crypto/evp/libfips-lib-signature.o" => [
- "crypto/evp/signature.c"
- ],
- "crypto/evp/libfips-lib-skeymgmt_meth.o" => [
- "crypto/evp/skeymgmt_meth.c"
- ],
"crypto/ffc/libcrypto-lib-ffc_backend.o" => [
"crypto/ffc/ffc_backend.c"
],
@@ -29326,27 +28517,6 @@ our %unified_info = (
"crypto/ffc/libcrypto-shlib-ffc_params_validate.o" => [
"crypto/ffc/ffc_params_validate.c"
],
- "crypto/ffc/libfips-lib-ffc_backend.o" => [
- "crypto/ffc/ffc_backend.c"
- ],
- "crypto/ffc/libfips-lib-ffc_dh.o" => [
- "crypto/ffc/ffc_dh.c"
- ],
- "crypto/ffc/libfips-lib-ffc_key_generate.o" => [
- "crypto/ffc/ffc_key_generate.c"
- ],
- "crypto/ffc/libfips-lib-ffc_key_validate.o" => [
- "crypto/ffc/ffc_key_validate.c"
- ],
- "crypto/ffc/libfips-lib-ffc_params.o" => [
- "crypto/ffc/ffc_params.c"
- ],
- "crypto/ffc/libfips-lib-ffc_params_generate.o" => [
- "crypto/ffc/ffc_params_generate.c"
- ],
- "crypto/ffc/libfips-lib-ffc_params_validate.o" => [
- "crypto/ffc/ffc_params_validate.c"
- ],
"crypto/hashtable/libcrypto-lib-hashfunc.o" => [
"crypto/hashtable/hashfunc.c"
],
@@ -29359,12 +28529,6 @@ our %unified_info = (
"crypto/hashtable/libcrypto-shlib-hashtable.o" => [
"crypto/hashtable/hashtable.c"
],
- "crypto/hashtable/libfips-lib-hashfunc.o" => [
- "crypto/hashtable/hashfunc.c"
- ],
- "crypto/hashtable/libfips-lib-hashtable.o" => [
- "crypto/hashtable/hashtable.c"
- ],
"crypto/hashtable/libssl-shlib-hashfunc.o" => [
"crypto/hashtable/hashfunc.c"
],
@@ -29374,9 +28538,6 @@ our %unified_info = (
"crypto/hmac/libcrypto-shlib-hmac.o" => [
"crypto/hmac/hmac.c"
],
- "crypto/hmac/libfips-lib-hmac.o" => [
- "crypto/hmac/hmac.c"
- ],
"crypto/hpke/libcrypto-lib-hpke.o" => [
"crypto/hpke/hpke.c"
],
@@ -29413,6 +28574,15 @@ our %unified_info = (
"crypto/kdf/libcrypto-shlib-kdf_err.o" => [
"crypto/kdf/kdf_err.c"
],
+ "crypto/legacy-dso-cpuid.o" => [
+ "crypto/cpuid.c"
+ ],
+ "crypto/legacy-dso-ctype.o" => [
+ "crypto/ctype.c"
+ ],
+ "crypto/legacy-dso-x86_64cpuid.o" => [
+ "crypto/x86_64cpuid.s"
+ ],
"crypto/lhash/libcrypto-lib-lh_stats.o" => [
"crypto/lhash/lh_stats.c"
],
@@ -29425,9 +28595,6 @@ our %unified_info = (
"crypto/lhash/libcrypto-shlib-lhash.o" => [
"crypto/lhash/lhash.c"
],
- "crypto/lhash/libfips-lib-lhash.o" => [
- "crypto/lhash/lhash.c"
- ],
"crypto/libcrypto-lib-asn1_dsa.o" => [
"crypto/asn1_dsa.c"
],
@@ -29764,96 +28931,6 @@ our %unified_info = (
"crypto/libcrypto-shlib-x86_64cpuid.o" => [
"crypto/x86_64cpuid.s"
],
- "crypto/libfips-lib-asn1_dsa.o" => [
- "crypto/asn1_dsa.c"
- ],
- "crypto/libfips-lib-bsearch.o" => [
- "crypto/bsearch.c"
- ],
- "crypto/libfips-lib-context.o" => [
- "crypto/context.c"
- ],
- "crypto/libfips-lib-core_algorithm.o" => [
- "crypto/core_algorithm.c"
- ],
- "crypto/libfips-lib-core_fetch.o" => [
- "crypto/core_fetch.c"
- ],
- "crypto/libfips-lib-core_namemap.o" => [
- "crypto/core_namemap.c"
- ],
- "crypto/libfips-lib-cpuid.o" => [
- "crypto/cpuid.c"
- ],
- "crypto/libfips-lib-cryptlib.o" => [
- "crypto/cryptlib.c"
- ],
- "crypto/libfips-lib-ctype.o" => [
- "crypto/ctype.c"
- ],
- "crypto/libfips-lib-der_writer.o" => [
- "crypto/der_writer.c"
- ],
- "crypto/libfips-lib-ex_data.o" => [
- "crypto/ex_data.c"
- ],
- "crypto/libfips-lib-initthread.o" => [
- "crypto/initthread.c"
- ],
- "crypto/libfips-lib-o_str.o" => [
- "crypto/o_str.c"
- ],
- "crypto/libfips-lib-packet.o" => [
- "crypto/packet.c"
- ],
- "crypto/libfips-lib-param_build.o" => [
- "crypto/param_build.c"
- ],
- "crypto/libfips-lib-param_build_set.o" => [
- "crypto/param_build_set.c"
- ],
- "crypto/libfips-lib-params.o" => [
- "crypto/params.c"
- ],
- "crypto/libfips-lib-params_dup.o" => [
- "crypto/params_dup.c"
- ],
- "crypto/libfips-lib-params_from_text.o" => [
- "crypto/params_from_text.c"
- ],
- "crypto/libfips-lib-params_idx.o" => [
- "crypto/params_idx.c"
- ],
- "crypto/libfips-lib-provider_core.o" => [
- "crypto/provider_core.c"
- ],
- "crypto/libfips-lib-provider_predefined.o" => [
- "crypto/provider_predefined.c"
- ],
- "crypto/libfips-lib-self_test_core.o" => [
- "crypto/self_test_core.c"
- ],
- "crypto/libfips-lib-sparse_array.o" => [
- "crypto/sparse_array.c"
- ],
- "crypto/libfips-lib-threads_lib.o" => [
- "crypto/threads_lib.c"
- ],
- "crypto/libfips-lib-threads_none.o" => [
- "crypto/threads_none.c"
- ],
- "crypto/libfips-lib-threads_pthread.o" => [
- "crypto/threads_pthread.c"
- ],
- "crypto/libfips-lib-threads_win.o" => [
- "crypto/threads_win.c"
- ],
- "crypto/libfips-lib-time.o" => [
- "crypto/time.c"
- ],
- "crypto/libfips-lib-x86_64cpuid.o" => [
- "crypto/x86_64cpuid.s"
- ],
"crypto/libssl-shlib-ctype.o" => [
"crypto/ctype.c"
],
@@ -29905,6 +28982,18 @@ our %unified_info = (
"crypto/md5/libcrypto-shlib-md5_sha1.o" => [
"crypto/md5/md5_sha1.c"
],
+ "crypto/md5/liblegacy-lib-md5-x86_64.o" => [
+ "crypto/md5/md5-x86_64.s"
+ ],
+ "crypto/md5/liblegacy-lib-md5_dgst.o" => [
+ "crypto/md5/md5_dgst.c"
+ ],
+ "crypto/md5/liblegacy-lib-md5_one.o" => [
+ "crypto/md5/md5_one.c"
+ ],
+ "crypto/md5/liblegacy-lib-md5_sha1.o" => [
+ "crypto/md5/md5_sha1.c"
+ ],
"crypto/ml_dsa/libcrypto-lib-ml_dsa_encoders.o" => [
"crypto/ml_dsa/ml_dsa_encoders.c"
],
@@ -29953,39 +29042,12 @@ our %unified_info = (
"crypto/ml_dsa/libcrypto-shlib-ml_dsa_sign.o" => [
"crypto/ml_dsa/ml_dsa_sign.c"
],
- "crypto/ml_dsa/libfips-lib-ml_dsa_encoders.o" => [
- "crypto/ml_dsa/ml_dsa_encoders.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_key.o" => [
- "crypto/ml_dsa/ml_dsa_key.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_key_compress.o" => [
- "crypto/ml_dsa/ml_dsa_key_compress.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_matrix.o" => [
- "crypto/ml_dsa/ml_dsa_matrix.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_ntt.o" => [
- "crypto/ml_dsa/ml_dsa_ntt.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_params.o" => [
- "crypto/ml_dsa/ml_dsa_params.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_sample.o" => [
- "crypto/ml_dsa/ml_dsa_sample.c"
- ],
- "crypto/ml_dsa/libfips-lib-ml_dsa_sign.o" => [
- "crypto/ml_dsa/ml_dsa_sign.c"
- ],
"crypto/ml_kem/libcrypto-lib-ml_kem.o" => [
"crypto/ml_kem/ml_kem.c"
],
"crypto/ml_kem/libcrypto-shlib-ml_kem.o" => [
"crypto/ml_kem/ml_kem.c"
],
- "crypto/ml_kem/libfips-lib-ml_kem.o" => [
- "crypto/ml_kem/ml_kem.c"
- ],
"crypto/modes/libcrypto-lib-aes-gcm-avx512.o" => [
"crypto/modes/aes-gcm-avx512.s"
],
@@ -30076,42 +29138,6 @@ our %unified_info = (
"crypto/modes/libcrypto-shlib-xts128gb.o" => [
"crypto/modes/xts128gb.c"
],
- "crypto/modes/libfips-lib-aes-gcm-avx512.o" => [
- "crypto/modes/aes-gcm-avx512.s"
- ],
- "crypto/modes/libfips-lib-aesni-gcm-x86_64.o" => [
- "crypto/modes/aesni-gcm-x86_64.s"
- ],
- "crypto/modes/libfips-lib-cbc128.o" => [
- "crypto/modes/cbc128.c"
- ],
- "crypto/modes/libfips-lib-ccm128.o" => [
- "crypto/modes/ccm128.c"
- ],
- "crypto/modes/libfips-lib-cfb128.o" => [
- "crypto/modes/cfb128.c"
- ],
- "crypto/modes/libfips-lib-ctr128.o" => [
- "crypto/modes/ctr128.c"
- ],
- "crypto/modes/libfips-lib-gcm128.o" => [
- "crypto/modes/gcm128.c"
- ],
- "crypto/modes/libfips-lib-ghash-x86_64.o" => [
- "crypto/modes/ghash-x86_64.s"
- ],
- "crypto/modes/libfips-lib-ofb128.o" => [
- "crypto/modes/ofb128.c"
- ],
- "crypto/modes/libfips-lib-wrap128.o" => [
- "crypto/modes/wrap128.c"
- ],
- "crypto/modes/libfips-lib-xts128.o" => [
- "crypto/modes/xts128.c"
- ],
- "crypto/modes/libfips-lib-xts128gb.o" => [
- "crypto/modes/xts128gb.c"
- ],
"crypto/objects/libcrypto-lib-o_names.o" => [
"crypto/objects/o_names.c"
],
@@ -30466,21 +29492,6 @@ our %unified_info = (
"crypto/property/libcrypto-shlib-property_string.o" => [
"crypto/property/property_string.c"
],
- "crypto/property/libfips-lib-defn_cache.o" => [
- "crypto/property/defn_cache.c"
- ],
- "crypto/property/libfips-lib-property.o" => [
- "crypto/property/property.c"
- ],
- "crypto/property/libfips-lib-property_parse.o" => [
- "crypto/property/property_parse.c"
- ],
- "crypto/property/libfips-lib-property_query.o" => [
- "crypto/property/property_query.c"
- ],
- "crypto/property/libfips-lib-property_string.o" => [
- "crypto/property/property_string.c"
- ],
"crypto/rand/libcrypto-lib-prov_seed.o" => [
"crypto/rand/prov_seed.c"
],
@@ -30529,9 +29540,6 @@ our %unified_info = (
"crypto/rand/libcrypto-shlib-randfile.o" => [
"crypto/rand/randfile.c"
],
- "crypto/rand/libfips-lib-rand_lib.o" => [
- "crypto/rand/rand_lib.c"
- ],
"crypto/rc2/libcrypto-lib-rc2_cbc.o" => [
"crypto/rc2/rc2_cbc.c"
],
@@ -30574,6 +29582,12 @@ our %unified_info = (
"crypto/rc4/libcrypto-shlib-rc4-x86_64.o" => [
"crypto/rc4/rc4-x86_64.s"
],
+ "crypto/rc4/liblegacy-lib-rc4-md5-x86_64.o" => [
+ "crypto/rc4/rc4-md5-x86_64.s"
+ ],
+ "crypto/rc4/liblegacy-lib-rc4-x86_64.o" => [
+ "crypto/rc4/rc4-x86_64.s"
+ ],
"crypto/ripemd/libcrypto-lib-rmd_dgst.o" => [
"crypto/ripemd/rmd_dgst.c"
],
@@ -30742,57 +29756,6 @@ our %unified_info = (
"crypto/rsa/libcrypto-shlib-rsa_x931g.o" => [
"crypto/rsa/rsa_x931g.c"
],
- "crypto/rsa/libfips-lib-rsa_acvp_test_params.o" => [
- "crypto/rsa/rsa_acvp_test_params.c"
- ],
- "crypto/rsa/libfips-lib-rsa_backend.o" => [
- "crypto/rsa/rsa_backend.c"
- ],
- "crypto/rsa/libfips-lib-rsa_chk.o" => [
- "crypto/rsa/rsa_chk.c"
- ],
- "crypto/rsa/libfips-lib-rsa_crpt.o" => [
- "crypto/rsa/rsa_crpt.c"
- ],
- "crypto/rsa/libfips-lib-rsa_gen.o" => [
- "crypto/rsa/rsa_gen.c"
- ],
- "crypto/rsa/libfips-lib-rsa_lib.o" => [
- "crypto/rsa/rsa_lib.c"
- ],
- "crypto/rsa/libfips-lib-rsa_mp_names.o" => [
- "crypto/rsa/rsa_mp_names.c"
- ],
- "crypto/rsa/libfips-lib-rsa_none.o" => [
- "crypto/rsa/rsa_none.c"
- ],
- "crypto/rsa/libfips-lib-rsa_oaep.o" => [
- "crypto/rsa/rsa_oaep.c"
- ],
- "crypto/rsa/libfips-lib-rsa_ossl.o" => [
- "crypto/rsa/rsa_ossl.c"
- ],
- "crypto/rsa/libfips-lib-rsa_pk1.o" => [
- "crypto/rsa/rsa_pk1.c"
- ],
- "crypto/rsa/libfips-lib-rsa_pss.o" => [
- "crypto/rsa/rsa_pss.c"
- ],
- "crypto/rsa/libfips-lib-rsa_schemes.o" => [
- "crypto/rsa/rsa_schemes.c"
- ],
- "crypto/rsa/libfips-lib-rsa_sign.o" => [
- "crypto/rsa/rsa_sign.c"
- ],
- "crypto/rsa/libfips-lib-rsa_sp800_56b_check.o" => [
- "crypto/rsa/rsa_sp800_56b_check.c"
- ],
- "crypto/rsa/libfips-lib-rsa_sp800_56b_gen.o" => [
- "crypto/rsa/rsa_sp800_56b_gen.c"
- ],
- "crypto/rsa/libfips-lib-rsa_x931.o" => [
- "crypto/rsa/rsa_x931.c"
- ],
"crypto/seed/libcrypto-lib-seed.o" => [
"crypto/seed/seed.c"
],
@@ -30889,36 +29852,6 @@ our %unified_info = (
"crypto/sha/libcrypto-shlib-sha512.o" => [
"crypto/sha/sha512.c"
],
- "crypto/sha/libfips-lib-keccak1600-x86_64.o" => [
- "crypto/sha/keccak1600-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha1-mb-x86_64.o" => [
- "crypto/sha/sha1-mb-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha1-x86_64.o" => [
- "crypto/sha/sha1-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha1dgst.o" => [
- "crypto/sha/sha1dgst.c"
- ],
- "crypto/sha/libfips-lib-sha256-mb-x86_64.o" => [
- "crypto/sha/sha256-mb-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha256-x86_64.o" => [
- "crypto/sha/sha256-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha256.o" => [
- "crypto/sha/sha256.c"
- ],
- "crypto/sha/libfips-lib-sha3.o" => [
- "crypto/sha/sha3.c"
- ],
- "crypto/sha/libfips-lib-sha512-x86_64.o" => [
- "crypto/sha/sha512-x86_64.s"
- ],
- "crypto/sha/libfips-lib-sha512.o" => [
- "crypto/sha/sha512.c"
- ],
"crypto/siphash/libcrypto-lib-siphash.o" => [
"crypto/siphash/siphash.c"
],
@@ -30988,36 +29921,6 @@ our %unified_info = (
"crypto/slh_dsa/libcrypto-shlib-slh_xmss.o" => [
"crypto/slh_dsa/slh_xmss.c"
],
- "crypto/slh_dsa/libfips-lib-slh_adrs.o" => [
- "crypto/slh_dsa/slh_adrs.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_dsa.o" => [
- "crypto/slh_dsa/slh_dsa.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_dsa_hash_ctx.o" => [
- "crypto/slh_dsa/slh_dsa_hash_ctx.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_dsa_key.o" => [
- "crypto/slh_dsa/slh_dsa_key.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_fors.o" => [
- "crypto/slh_dsa/slh_fors.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_hash.o" => [
- "crypto/slh_dsa/slh_hash.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_hypertree.o" => [
- "crypto/slh_dsa/slh_hypertree.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_params.o" => [
- "crypto/slh_dsa/slh_params.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_wots.o" => [
- "crypto/slh_dsa/slh_wots.c"
- ],
- "crypto/slh_dsa/libfips-lib-slh_xmss.o" => [
- "crypto/slh_dsa/slh_xmss.c"
- ],
"crypto/srp/libcrypto-lib-srp_lib.o" => [
"crypto/srp/srp_lib.c"
],
@@ -31036,9 +29939,6 @@ our %unified_info = (
"crypto/stack/libcrypto-shlib-stack.o" => [
"crypto/stack/stack.c"
],
- "crypto/stack/libfips-lib-stack.o" => [
- "crypto/stack/stack.c"
- ],
"crypto/store/libcrypto-lib-store_err.o" => [
"crypto/store/store_err.c"
],
@@ -31099,15 +29999,6 @@ our %unified_info = (
"crypto/thread/arch/libcrypto-shlib-thread_win.o" => [
"crypto/thread/arch/thread_win.c"
],
- "crypto/thread/arch/libfips-lib-thread_none.o" => [
- "crypto/thread/arch/thread_none.c"
- ],
- "crypto/thread/arch/libfips-lib-thread_posix.o" => [
- "crypto/thread/arch/thread_posix.c"
- ],
- "crypto/thread/arch/libfips-lib-thread_win.o" => [
- "crypto/thread/arch/thread_win.c"
- ],
"crypto/thread/arch/libssl-shlib-thread_none.o" => [
"crypto/thread/arch/thread_none.c"
],
@@ -31135,15 +30026,6 @@ our %unified_info = (
"crypto/thread/libcrypto-shlib-internal.o" => [
"crypto/thread/internal.c"
],
- "crypto/thread/libfips-lib-api.o" => [
- "crypto/thread/api.c"
- ],
- "crypto/thread/libfips-lib-arch.o" => [
- "crypto/thread/arch.c"
- ],
- "crypto/thread/libfips-lib-internal.o" => [
- "crypto/thread/internal.c"
- ],
"crypto/thread/libssl-shlib-arch.o" => [
"crypto/thread/arch.c"
],
@@ -33177,6 +32059,7 @@ our %unified_info = (
"ssl/record/libssl-lib-rec_layer_d1.o",
"ssl/record/libssl-lib-rec_layer_s3.o",
"ssl/record/methods/libssl-lib-dtls_meth.o",
+ "ssl/record/methods/libssl-lib-ktls_meth.o",
"ssl/record/methods/libssl-lib-ssl3_meth.o",
"ssl/record/methods/libssl-lib-tls13_meth.o",
"ssl/record/methods/libssl-lib-tls1_meth.o",
@@ -33247,9 +32130,6 @@ our %unified_info = (
"providers/common/der/libdefault-lib-der_rsa_sig.o" => [
"providers/common/der/der_rsa_sig.c"
],
- "providers/common/der/libfips-lib-der_rsa_sig.o" => [
- "providers/common/der/der_rsa_sig.c"
- ],
"providers/common/libcommon-lib-provider_ctx.o" => [
"providers/common/provider_ctx.c"
],
@@ -33277,52 +32157,18 @@ our %unified_info = (
"providers/common/libdefault-lib-securitycheck_default.o" => [
"providers/common/securitycheck_default.c"
],
- "providers/common/libfips-lib-bio_prov.o" => [
- "providers/common/bio_prov.c"
- ],
- "providers/common/libfips-lib-capabilities.o" => [
- "providers/common/capabilities.c"
- ],
- "providers/common/libfips-lib-digest_to_nid.o" => [
- "providers/common/digest_to_nid.c"
- ],
- "providers/common/libfips-lib-provider_seeding.o" => [
- "providers/common/provider_seeding.c"
- ],
- "providers/common/libfips-lib-provider_util.o" => [
+ "providers/common/liblegacy-lib-provider_util.o" => [
"providers/common/provider_util.c"
],
- "providers/common/libfips-lib-securitycheck.o" => [
- "providers/common/securitycheck.c"
- ],
- "providers/common/libfips-lib-securitycheck_fips.o" => [
- "providers/common/securitycheck_fips.c"
- ],
- "providers/fips" => [
- "providers/fips.ld",
- "providers/fips/fips-dso-fips_entry.o"
- ],
- "providers/fips/fips-dso-fips_entry.o" => [
- "providers/fips/fips_entry.c"
+ "providers/endecode_test-bin-legacyprov.o" => [
+ "providers/legacyprov.c"
],
- "providers/fips/libfips-lib-fipsindicator.o" => [
- "providers/fips/fipsindicator.c"
- ],
- "providers/fips/libfips-lib-fipsprov.o" => [
- "providers/fips/fipsprov.c"
- ],
- "providers/fips/libfips-lib-self_test.o" => [
- "providers/fips/self_test.c"
- ],
- "providers/fips/libfips-lib-self_test_kats.o" => [
- "providers/fips/self_test_kats.c"
+ "providers/evp_extra_test-bin-legacyprov.o" => [
+ "providers/legacyprov.c"
],
"providers/implementations/asymciphers/libdefault-lib-rsa_enc.o" => [
"providers/implementations/asymciphers/rsa_enc.c"
],
- "providers/implementations/asymciphers/libfips-lib-rsa_enc.o" => [
- "providers/implementations/asymciphers/rsa_enc.c"
- ],
"providers/implementations/ciphers/libcommon-lib-ciphercommon.o" => [
"providers/implementations/ciphers/ciphercommon.c"
],
@@ -33449,63 +32295,57 @@ our %unified_info = (
"providers/implementations/ciphers/libdefault-lib-cipher_tdes_wrap_hw.o" => [
"providers/implementations/ciphers/cipher_tdes_wrap_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes.o" => [
- "providers/implementations/ciphers/cipher_aes.c"
- ],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha.o" => [
- "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish.o" => [
+ "providers/implementations/ciphers/cipher_blowfish.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha1_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish_hw.o" => [
+ "providers/implementations/ciphers/cipher_blowfish_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha256_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5.o" => [
+ "providers/implementations/ciphers/cipher_cast5.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm.o" => [
- "providers/implementations/ciphers/cipher_aes_ccm.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5_hw.o" => [
+ "providers/implementations/ciphers/cipher_cast5_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_ccm_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des.o" => [
+ "providers/implementations/ciphers/cipher_des.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm.o" => [
- "providers/implementations/ciphers/cipher_aes_gcm.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des_hw.o" => [
+ "providers/implementations/ciphers/cipher_des_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_gcm_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx.o" => [
+ "providers/implementations/ciphers/cipher_desx.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx_hw.o" => [
+ "providers/implementations/ciphers/cipher_desx_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb.o" => [
- "providers/implementations/ciphers/cipher_aes_ocb.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2.o" => [
+ "providers/implementations/ciphers/cipher_rc2.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_ocb_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2_hw.o" => [
+ "providers/implementations/ciphers/cipher_rc2_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_wrp.o" => [
- "providers/implementations/ciphers/cipher_aes_wrp.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4.o" => [
+ "providers/implementations/ciphers/cipher_rc4.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts.o" => [
- "providers/implementations/ciphers/cipher_aes_xts.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5.o" => [
+ "providers/implementations/ciphers/cipher_rc4_hmac_md5.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_fips.o" => [
- "providers/implementations/ciphers/cipher_aes_xts_fips.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5_hw.o" => [
+ "providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_hw.o" => [
- "providers/implementations/ciphers/cipher_aes_xts_hw.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hw.o" => [
+ "providers/implementations/ciphers/cipher_rc4_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_cts.o" => [
- "providers/implementations/ciphers/cipher_cts.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed.o" => [
+ "providers/implementations/ciphers/cipher_seed.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_tdes.o" => [
- "providers/implementations/ciphers/cipher_tdes.c"
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed_hw.o" => [
+ "providers/implementations/ciphers/cipher_seed_hw.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_common.o" => [
+ "providers/implementations/ciphers/liblegacy-lib-cipher_tdes_common.o" => [
"providers/implementations/ciphers/cipher_tdes_common.c"
],
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_hw.o" => [
- "providers/implementations/ciphers/cipher_tdes_hw.c"
- ],
"providers/implementations/digests/libcommon-lib-digestcommon.o" => [
"providers/implementations/digests/digestcommon.c"
],
@@ -33536,11 +32376,14 @@ our %unified_info = (
"providers/implementations/digests/libdefault-lib-sha3_prov.o" => [
"providers/implementations/digests/sha3_prov.c"
],
- "providers/implementations/digests/libfips-lib-sha2_prov.o" => [
- "providers/implementations/digests/sha2_prov.c"
+ "providers/implementations/digests/liblegacy-lib-md4_prov.o" => [
+ "providers/implementations/digests/md4_prov.c"
],
- "providers/implementations/digests/libfips-lib-sha3_prov.o" => [
- "providers/implementations/digests/sha3_prov.c"
+ "providers/implementations/digests/liblegacy-lib-ripemd_prov.o" => [
+ "providers/implementations/digests/ripemd_prov.c"
+ ],
+ "providers/implementations/digests/liblegacy-lib-wp_prov.o" => [
+ "providers/implementations/digests/wp_prov.c"
],
"providers/implementations/encode_decode/libdefault-lib-decode_der2key.o" => [
"providers/implementations/encode_decode/decode_der2key.c"
@@ -33596,18 +32439,6 @@ our %unified_info = (
"providers/implementations/exchange/libdefault-lib-kdf_exch.o" => [
"providers/implementations/exchange/kdf_exch.c"
],
- "providers/implementations/exchange/libfips-lib-dh_exch.o" => [
- "providers/implementations/exchange/dh_exch.c"
- ],
- "providers/implementations/exchange/libfips-lib-ecdh_exch.o" => [
- "providers/implementations/exchange/ecdh_exch.c"
- ],
- "providers/implementations/exchange/libfips-lib-ecx_exch.o" => [
- "providers/implementations/exchange/ecx_exch.c"
- ],
- "providers/implementations/exchange/libfips-lib-kdf_exch.o" => [
- "providers/implementations/exchange/kdf_exch.c"
- ],
"providers/implementations/kdfs/libdefault-lib-argon2.o" => [
"providers/implementations/kdfs/argon2.c"
],
@@ -33647,29 +32478,11 @@ our %unified_info = (
"providers/implementations/kdfs/libdefault-lib-x942kdf.o" => [
"providers/implementations/kdfs/x942kdf.c"
],
- "providers/implementations/kdfs/libfips-lib-hkdf.o" => [
- "providers/implementations/kdfs/hkdf.c"
- ],
- "providers/implementations/kdfs/libfips-lib-kbkdf.o" => [
- "providers/implementations/kdfs/kbkdf.c"
- ],
- "providers/implementations/kdfs/libfips-lib-pbkdf2.o" => [
- "providers/implementations/kdfs/pbkdf2.c"
+ "providers/implementations/kdfs/liblegacy-lib-pbkdf1.o" => [
+ "providers/implementations/kdfs/pbkdf1.c"
],
- "providers/implementations/kdfs/libfips-lib-pbkdf2_fips.o" => [
- "providers/implementations/kdfs/pbkdf2_fips.c"
- ],
- "providers/implementations/kdfs/libfips-lib-sshkdf.o" => [
- "providers/implementations/kdfs/sshkdf.c"
- ],
- "providers/implementations/kdfs/libfips-lib-sskdf.o" => [
- "providers/implementations/kdfs/sskdf.c"
- ],
- "providers/implementations/kdfs/libfips-lib-tls1_prf.o" => [
- "providers/implementations/kdfs/tls1_prf.c"
- ],
- "providers/implementations/kdfs/libfips-lib-x942kdf.o" => [
- "providers/implementations/kdfs/x942kdf.c"
+ "providers/implementations/kdfs/liblegacy-lib-pvkkdf.o" => [
+ "providers/implementations/kdfs/pvkkdf.c"
],
"providers/implementations/kem/libdefault-lib-ec_kem.o" => [
"providers/implementations/kem/ec_kem.c"
@@ -33689,15 +32502,6 @@ our %unified_info = (
"providers/implementations/kem/libdefault-lib-rsa_kem.o" => [
"providers/implementations/kem/rsa_kem.c"
],
- "providers/implementations/kem/libfips-lib-ml_kem_kem.o" => [
- "providers/implementations/kem/ml_kem_kem.c"
- ],
- "providers/implementations/kem/libfips-lib-mlx_kem.o" => [
- "providers/implementations/kem/mlx_kem.c"
- ],
- "providers/implementations/kem/libfips-lib-rsa_kem.o" => [
- "providers/implementations/kem/rsa_kem.c"
- ],
"providers/implementations/kem/libtemplate-lib-template_kem.o" => [
"providers/implementations/kem/template_kem.c"
],
@@ -33734,39 +32538,6 @@ our %unified_info = (
"providers/implementations/keymgmt/libdefault-lib-slh_dsa_kmgmt.o" => [
"providers/implementations/keymgmt/slh_dsa_kmgmt.c"
],
- "providers/implementations/keymgmt/libfips-lib-dh_kmgmt.o" => [
- "providers/implementations/keymgmt/dh_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-dsa_kmgmt.o" => [
- "providers/implementations/keymgmt/dsa_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-ec_kmgmt.o" => [
- "providers/implementations/keymgmt/ec_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-ecx_kmgmt.o" => [
- "providers/implementations/keymgmt/ecx_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-kdf_legacy_kmgmt.o" => [
- "providers/implementations/keymgmt/kdf_legacy_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-mac_legacy_kmgmt.o" => [
- "providers/implementations/keymgmt/mac_legacy_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-ml_dsa_kmgmt.o" => [
- "providers/implementations/keymgmt/ml_dsa_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-ml_kem_kmgmt.o" => [
- "providers/implementations/keymgmt/ml_kem_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-mlx_kmgmt.o" => [
- "providers/implementations/keymgmt/mlx_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-rsa_kmgmt.o" => [
- "providers/implementations/keymgmt/rsa_kmgmt.c"
- ],
- "providers/implementations/keymgmt/libfips-lib-slh_dsa_kmgmt.o" => [
- "providers/implementations/keymgmt/slh_dsa_kmgmt.c"
- ],
"providers/implementations/keymgmt/libtemplate-lib-template_kmgmt.o" => [
"providers/implementations/keymgmt/template_kmgmt.c"
],
@@ -33794,18 +32565,6 @@ our %unified_info = (
"providers/implementations/macs/libdefault-lib-siphash_prov.o" => [
"providers/implementations/macs/siphash_prov.c"
],
- "providers/implementations/macs/libfips-lib-cmac_prov.o" => [
- "providers/implementations/macs/cmac_prov.c"
- ],
- "providers/implementations/macs/libfips-lib-gmac_prov.o" => [
- "providers/implementations/macs/gmac_prov.c"
- ],
- "providers/implementations/macs/libfips-lib-hmac_prov.o" => [
- "providers/implementations/macs/hmac_prov.c"
- ],
- "providers/implementations/macs/libfips-lib-kmac_prov.o" => [
- "providers/implementations/macs/kmac_prov.c"
- ],
"providers/implementations/rands/libdefault-lib-drbg.o" => [
"providers/implementations/rands/drbg.c"
],
@@ -33827,24 +32586,6 @@ our %unified_info = (
"providers/implementations/rands/libdefault-lib-test_rng.o" => [
"providers/implementations/rands/test_rng.c"
],
- "providers/implementations/rands/libfips-lib-drbg.o" => [
- "providers/implementations/rands/drbg.c"
- ],
- "providers/implementations/rands/libfips-lib-drbg_ctr.o" => [
- "providers/implementations/rands/drbg_ctr.c"
- ],
- "providers/implementations/rands/libfips-lib-drbg_hash.o" => [
- "providers/implementations/rands/drbg_hash.c"
- ],
- "providers/implementations/rands/libfips-lib-drbg_hmac.o" => [
- "providers/implementations/rands/drbg_hmac.c"
- ],
- "providers/implementations/rands/libfips-lib-fips_crng_test.o" => [
- "providers/implementations/rands/fips_crng_test.c"
- ],
- "providers/implementations/rands/libfips-lib-test_rng.o" => [
- "providers/implementations/rands/test_rng.c"
- ],
"providers/implementations/rands/seeding/libdefault-lib-rand_cpu_x86.o" => [
"providers/implementations/rands/seeding/rand_cpu_x86.c"
],
@@ -33878,45 +32619,28 @@ our %unified_info = (
"providers/implementations/signature/libdefault-lib-slh_dsa_sig.o" => [
"providers/implementations/signature/slh_dsa_sig.c"
],
- "providers/implementations/signature/libfips-lib-dsa_sig.o" => [
- "providers/implementations/signature/dsa_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-ecdsa_sig.o" => [
- "providers/implementations/signature/ecdsa_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-eddsa_sig.o" => [
- "providers/implementations/signature/eddsa_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-mac_legacy_sig.o" => [
- "providers/implementations/signature/mac_legacy_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-ml_dsa_sig.o" => [
- "providers/implementations/signature/ml_dsa_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-rsa_sig.o" => [
- "providers/implementations/signature/rsa_sig.c"
- ],
- "providers/implementations/signature/libfips-lib-slh_dsa_sig.o" => [
- "providers/implementations/signature/slh_dsa_sig.c"
- ],
"providers/implementations/skeymgmt/libdefault-lib-aes_skmgmt.o" => [
"providers/implementations/skeymgmt/aes_skmgmt.c"
],
"providers/implementations/skeymgmt/libdefault-lib-generic.o" => [
"providers/implementations/skeymgmt/generic.c"
],
- "providers/implementations/skeymgmt/libfips-lib-aes_skmgmt.o" => [
- "providers/implementations/skeymgmt/aes_skmgmt.c"
- ],
- "providers/implementations/skeymgmt/libfips-lib-generic.o" => [
- "providers/implementations/skeymgmt/generic.c"
- ],
"providers/implementations/storemgmt/libdefault-lib-file_store.o" => [
"providers/implementations/storemgmt/file_store.c"
],
"providers/implementations/storemgmt/libdefault-lib-file_store_any2obj.o" => [
"providers/implementations/storemgmt/file_store_any2obj.c"
],
+ "providers/legacy" => [
+ "crypto/legacy-dso-cpuid.o",
+ "crypto/legacy-dso-ctype.o",
+ "crypto/legacy-dso-x86_64cpuid.o",
+ "providers/legacy-dso-legacyprov.o",
+ "providers/legacy.ld"
+ ],
+ "providers/legacy-dso-legacyprov.o" => [
+ "providers/legacyprov.c"
+ ],
"providers/libcommon.a" => [
"providers/common/der/libcommon-lib-der_digests_gen.o",
"providers/common/der/libcommon-lib-der_dsa_gen.o",
@@ -34104,335 +32828,42 @@ our %unified_info = (
"providers/implementations/storemgmt/libdefault-lib-file_store_any2obj.o",
"ssl/record/methods/libdefault-lib-ssl3_cbc.o"
],
- "providers/libfips.a" => [
- "crypto/aes/libfips-lib-aes-x86_64.o",
- "crypto/aes/libfips-lib-aes_ecb.o",
- "crypto/aes/libfips-lib-aes_misc.o",
- "crypto/aes/libfips-lib-aesni-mb-x86_64.o",
- "crypto/aes/libfips-lib-aesni-sha1-x86_64.o",
- "crypto/aes/libfips-lib-aesni-sha256-x86_64.o",
- "crypto/aes/libfips-lib-aesni-x86_64.o",
- "crypto/aes/libfips-lib-aesni-xts-avx512.o",
- "crypto/aes/libfips-lib-bsaes-x86_64.o",
- "crypto/aes/libfips-lib-vpaes-x86_64.o",
- "crypto/bn/asm/libfips-lib-x86_64-gcc.o",
- "crypto/bn/libfips-lib-bn_add.o",
- "crypto/bn/libfips-lib-bn_blind.o",
- "crypto/bn/libfips-lib-bn_const.o",
- "crypto/bn/libfips-lib-bn_conv.o",
- "crypto/bn/libfips-lib-bn_ctx.o",
- "crypto/bn/libfips-lib-bn_dh.o",
- "crypto/bn/libfips-lib-bn_div.o",
- "crypto/bn/libfips-lib-bn_exp.o",
- "crypto/bn/libfips-lib-bn_exp2.o",
- "crypto/bn/libfips-lib-bn_gcd.o",
- "crypto/bn/libfips-lib-bn_gf2m.o",
- "crypto/bn/libfips-lib-bn_intern.o",
- "crypto/bn/libfips-lib-bn_kron.o",
- "crypto/bn/libfips-lib-bn_lib.o",
- "crypto/bn/libfips-lib-bn_mod.o",
- "crypto/bn/libfips-lib-bn_mont.o",
- "crypto/bn/libfips-lib-bn_mpi.o",
- "crypto/bn/libfips-lib-bn_mul.o",
- "crypto/bn/libfips-lib-bn_nist.o",
- "crypto/bn/libfips-lib-bn_prime.o",
- "crypto/bn/libfips-lib-bn_rand.o",
- "crypto/bn/libfips-lib-bn_recp.o",
- "crypto/bn/libfips-lib-bn_rsa_fips186_4.o",
- "crypto/bn/libfips-lib-bn_shift.o",
- "crypto/bn/libfips-lib-bn_sqr.o",
- "crypto/bn/libfips-lib-bn_sqrt.o",
- "crypto/bn/libfips-lib-bn_word.o",
- "crypto/bn/libfips-lib-rsaz-2k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-2k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-3k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-3k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-4k-avx512.o",
- "crypto/bn/libfips-lib-rsaz-4k-avxifma.o",
- "crypto/bn/libfips-lib-rsaz-avx2.o",
- "crypto/bn/libfips-lib-rsaz-x86_64.o",
- "crypto/bn/libfips-lib-rsaz_exp.o",
- "crypto/bn/libfips-lib-rsaz_exp_x2.o",
- "crypto/bn/libfips-lib-x86_64-gf2m.o",
- "crypto/bn/libfips-lib-x86_64-mont.o",
- "crypto/bn/libfips-lib-x86_64-mont5.o",
- "crypto/buffer/libfips-lib-buffer.o",
- "crypto/cmac/libfips-lib-cmac.o",
- "crypto/des/libfips-lib-des_enc.o",
- "crypto/des/libfips-lib-ecb3_enc.o",
- "crypto/des/libfips-lib-fcrypt_b.o",
- "crypto/des/libfips-lib-set_key.o",
- "crypto/dh/libfips-lib-dh_backend.o",
- "crypto/dh/libfips-lib-dh_check.o",
- "crypto/dh/libfips-lib-dh_gen.o",
- "crypto/dh/libfips-lib-dh_group_params.o",
- "crypto/dh/libfips-lib-dh_kdf.o",
- "crypto/dh/libfips-lib-dh_key.o",
- "crypto/dh/libfips-lib-dh_lib.o",
- "crypto/dsa/libfips-lib-dsa_backend.o",
- "crypto/dsa/libfips-lib-dsa_check.o",
- "crypto/dsa/libfips-lib-dsa_gen.o",
- "crypto/dsa/libfips-lib-dsa_key.o",
- "crypto/dsa/libfips-lib-dsa_lib.o",
- "crypto/dsa/libfips-lib-dsa_ossl.o",
- "crypto/dsa/libfips-lib-dsa_sign.o",
- "crypto/dsa/libfips-lib-dsa_vrf.o",
- "crypto/ec/curve448/arch_32/libfips-lib-f_impl32.o",
- "crypto/ec/curve448/arch_64/libfips-lib-f_impl64.o",
- "crypto/ec/curve448/libfips-lib-curve448.o",
- "crypto/ec/curve448/libfips-lib-curve448_tables.o",
- "crypto/ec/curve448/libfips-lib-eddsa.o",
- "crypto/ec/curve448/libfips-lib-f_generic.o",
- "crypto/ec/curve448/libfips-lib-scalar.o",
- "crypto/ec/libfips-lib-curve25519.o",
- "crypto/ec/libfips-lib-ec2_oct.o",
- "crypto/ec/libfips-lib-ec2_smpl.o",
- "crypto/ec/libfips-lib-ec_asn1.o",
- "crypto/ec/libfips-lib-ec_backend.o",
- "crypto/ec/libfips-lib-ec_check.o",
- "crypto/ec/libfips-lib-ec_curve.o",
- "crypto/ec/libfips-lib-ec_cvt.o",
- "crypto/ec/libfips-lib-ec_key.o",
- "crypto/ec/libfips-lib-ec_kmeth.o",
- "crypto/ec/libfips-lib-ec_lib.o",
- "crypto/ec/libfips-lib-ec_mult.o",
- "crypto/ec/libfips-lib-ec_oct.o",
- "crypto/ec/libfips-lib-ecdh_kdf.o",
- "crypto/ec/libfips-lib-ecdh_ossl.o",
- "crypto/ec/libfips-lib-ecdsa_ossl.o",
- "crypto/ec/libfips-lib-ecdsa_sign.o",
- "crypto/ec/libfips-lib-ecdsa_vrf.o",
- "crypto/ec/libfips-lib-ecp_mont.o",
- "crypto/ec/libfips-lib-ecp_nist.o",
- "crypto/ec/libfips-lib-ecp_nistp224.o",
- "crypto/ec/libfips-lib-ecp_nistp256.o",
- "crypto/ec/libfips-lib-ecp_nistp384.o",
- "crypto/ec/libfips-lib-ecp_nistp521.o",
- "crypto/ec/libfips-lib-ecp_nistputil.o",
- "crypto/ec/libfips-lib-ecp_nistz256-x86_64.o",
- "crypto/ec/libfips-lib-ecp_nistz256.o",
- "crypto/ec/libfips-lib-ecp_oct.o",
- "crypto/ec/libfips-lib-ecp_smpl.o",
- "crypto/ec/libfips-lib-ecx_backend.o",
- "crypto/ec/libfips-lib-ecx_key.o",
- "crypto/ec/libfips-lib-x25519-x86_64.o",
- "crypto/evp/libfips-lib-asymcipher.o",
- "crypto/evp/libfips-lib-dh_support.o",
- "crypto/evp/libfips-lib-digest.o",
- "crypto/evp/libfips-lib-ec_support.o",
- "crypto/evp/libfips-lib-evp_enc.o",
- "crypto/evp/libfips-lib-evp_fetch.o",
- "crypto/evp/libfips-lib-evp_lib.o",
- "crypto/evp/libfips-lib-evp_rand.o",
- "crypto/evp/libfips-lib-evp_utils.o",
- "crypto/evp/libfips-lib-exchange.o",
- "crypto/evp/libfips-lib-kdf_lib.o",
- "crypto/evp/libfips-lib-kdf_meth.o",
- "crypto/evp/libfips-lib-kem.o",
- "crypto/evp/libfips-lib-keymgmt_lib.o",
- "crypto/evp/libfips-lib-keymgmt_meth.o",
- "crypto/evp/libfips-lib-mac_lib.o",
- "crypto/evp/libfips-lib-mac_meth.o",
- "crypto/evp/libfips-lib-p_lib.o",
- "crypto/evp/libfips-lib-pmeth_check.o",
- "crypto/evp/libfips-lib-pmeth_gn.o",
- "crypto/evp/libfips-lib-pmeth_lib.o",
- "crypto/evp/libfips-lib-s_lib.o",
- "crypto/evp/libfips-lib-signature.o",
- "crypto/evp/libfips-lib-skeymgmt_meth.o",
- "crypto/ffc/libfips-lib-ffc_backend.o",
- "crypto/ffc/libfips-lib-ffc_dh.o",
- "crypto/ffc/libfips-lib-ffc_key_generate.o",
- "crypto/ffc/libfips-lib-ffc_key_validate.o",
- "crypto/ffc/libfips-lib-ffc_params.o",
- "crypto/ffc/libfips-lib-ffc_params_generate.o",
- "crypto/ffc/libfips-lib-ffc_params_validate.o",
- "crypto/hashtable/libfips-lib-hashfunc.o",
- "crypto/hashtable/libfips-lib-hashtable.o",
- "crypto/hmac/libfips-lib-hmac.o",
- "crypto/lhash/libfips-lib-lhash.o",
- "crypto/libfips-lib-asn1_dsa.o",
- "crypto/libfips-lib-bsearch.o",
- "crypto/libfips-lib-context.o",
- "crypto/libfips-lib-core_algorithm.o",
- "crypto/libfips-lib-core_fetch.o",
- "crypto/libfips-lib-core_namemap.o",
- "crypto/libfips-lib-cpuid.o",
- "crypto/libfips-lib-cryptlib.o",
- "crypto/libfips-lib-ctype.o",
- "crypto/libfips-lib-der_writer.o",
- "crypto/libfips-lib-ex_data.o",
- "crypto/libfips-lib-initthread.o",
- "crypto/libfips-lib-o_str.o",
- "crypto/libfips-lib-packet.o",
- "crypto/libfips-lib-param_build.o",
- "crypto/libfips-lib-param_build_set.o",
- "crypto/libfips-lib-params.o",
- "crypto/libfips-lib-params_dup.o",
- "crypto/libfips-lib-params_from_text.o",
- "crypto/libfips-lib-params_idx.o",
- "crypto/libfips-lib-provider_core.o",
- "crypto/libfips-lib-provider_predefined.o",
- "crypto/libfips-lib-self_test_core.o",
- "crypto/libfips-lib-sparse_array.o",
- "crypto/libfips-lib-threads_lib.o",
- "crypto/libfips-lib-threads_none.o",
- "crypto/libfips-lib-threads_pthread.o",
- "crypto/libfips-lib-threads_win.o",
- "crypto/libfips-lib-time.o",
- "crypto/libfips-lib-x86_64cpuid.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_encoders.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_key.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_key_compress.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_matrix.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_ntt.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_params.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_sample.o",
- "crypto/ml_dsa/libfips-lib-ml_dsa_sign.o",
- "crypto/ml_kem/libfips-lib-ml_kem.o",
- "crypto/modes/libfips-lib-aes-gcm-avx512.o",
- "crypto/modes/libfips-lib-aesni-gcm-x86_64.o",
- "crypto/modes/libfips-lib-cbc128.o",
- "crypto/modes/libfips-lib-ccm128.o",
- "crypto/modes/libfips-lib-cfb128.o",
- "crypto/modes/libfips-lib-ctr128.o",
- "crypto/modes/libfips-lib-gcm128.o",
- "crypto/modes/libfips-lib-ghash-x86_64.o",
- "crypto/modes/libfips-lib-ofb128.o",
- "crypto/modes/libfips-lib-wrap128.o",
- "crypto/modes/libfips-lib-xts128.o",
- "crypto/modes/libfips-lib-xts128gb.o",
- "crypto/property/libfips-lib-defn_cache.o",
- "crypto/property/libfips-lib-property.o",
- "crypto/property/libfips-lib-property_parse.o",
- "crypto/property/libfips-lib-property_query.o",
- "crypto/property/libfips-lib-property_string.o",
- "crypto/rand/libfips-lib-rand_lib.o",
- "crypto/rsa/libfips-lib-rsa_acvp_test_params.o",
- "crypto/rsa/libfips-lib-rsa_backend.o",
- "crypto/rsa/libfips-lib-rsa_chk.o",
- "crypto/rsa/libfips-lib-rsa_crpt.o",
- "crypto/rsa/libfips-lib-rsa_gen.o",
- "crypto/rsa/libfips-lib-rsa_lib.o",
- "crypto/rsa/libfips-lib-rsa_mp_names.o",
- "crypto/rsa/libfips-lib-rsa_none.o",
- "crypto/rsa/libfips-lib-rsa_oaep.o",
- "crypto/rsa/libfips-lib-rsa_ossl.o",
- "crypto/rsa/libfips-lib-rsa_pk1.o",
- "crypto/rsa/libfips-lib-rsa_pss.o",
- "crypto/rsa/libfips-lib-rsa_schemes.o",
- "crypto/rsa/libfips-lib-rsa_sign.o",
- "crypto/rsa/libfips-lib-rsa_sp800_56b_check.o",
- "crypto/rsa/libfips-lib-rsa_sp800_56b_gen.o",
- "crypto/rsa/libfips-lib-rsa_x931.o",
- "crypto/sha/libfips-lib-keccak1600-x86_64.o",
- "crypto/sha/libfips-lib-sha1-mb-x86_64.o",
- "crypto/sha/libfips-lib-sha1-x86_64.o",
- "crypto/sha/libfips-lib-sha1dgst.o",
- "crypto/sha/libfips-lib-sha256-mb-x86_64.o",
- "crypto/sha/libfips-lib-sha256-x86_64.o",
- "crypto/sha/libfips-lib-sha256.o",
- "crypto/sha/libfips-lib-sha3.o",
- "crypto/sha/libfips-lib-sha512-x86_64.o",
- "crypto/sha/libfips-lib-sha512.o",
- "crypto/slh_dsa/libfips-lib-slh_adrs.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa_hash_ctx.o",
- "crypto/slh_dsa/libfips-lib-slh_dsa_key.o",
- "crypto/slh_dsa/libfips-lib-slh_fors.o",
- "crypto/slh_dsa/libfips-lib-slh_hash.o",
- "crypto/slh_dsa/libfips-lib-slh_hypertree.o",
- "crypto/slh_dsa/libfips-lib-slh_params.o",
- "crypto/slh_dsa/libfips-lib-slh_wots.o",
- "crypto/slh_dsa/libfips-lib-slh_xmss.o",
- "crypto/stack/libfips-lib-stack.o",
- "crypto/thread/arch/libfips-lib-thread_none.o",
- "crypto/thread/arch/libfips-lib-thread_posix.o",
- "crypto/thread/arch/libfips-lib-thread_win.o",
- "crypto/thread/libfips-lib-api.o",
- "crypto/thread/libfips-lib-arch.o",
- "crypto/thread/libfips-lib-internal.o",
- "providers/common/der/libfips-lib-der_rsa_sig.o",
- "providers/common/libfips-lib-bio_prov.o",
- "providers/common/libfips-lib-capabilities.o",
- "providers/common/libfips-lib-digest_to_nid.o",
- "providers/common/libfips-lib-provider_seeding.o",
- "providers/common/libfips-lib-provider_util.o",
- "providers/common/libfips-lib-securitycheck.o",
- "providers/common/libfips-lib-securitycheck_fips.o",
- "providers/fips/libfips-lib-fipsindicator.o",
- "providers/fips/libfips-lib-fipsprov.o",
- "providers/fips/libfips-lib-self_test.o",
- "providers/fips/libfips-lib-self_test_kats.o",
- "providers/implementations/asymciphers/libfips-lib-rsa_enc.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha1_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_cbc_hmac_sha256_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ccm_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_gcm_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_ocb_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_wrp.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_fips.o",
- "providers/implementations/ciphers/libfips-lib-cipher_aes_xts_hw.o",
- "providers/implementations/ciphers/libfips-lib-cipher_cts.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_common.o",
- "providers/implementations/ciphers/libfips-lib-cipher_tdes_hw.o",
- "providers/implementations/digests/libfips-lib-sha2_prov.o",
- "providers/implementations/digests/libfips-lib-sha3_prov.o",
- "providers/implementations/exchange/libfips-lib-dh_exch.o",
- "providers/implementations/exchange/libfips-lib-ecdh_exch.o",
- "providers/implementations/exchange/libfips-lib-ecx_exch.o",
- "providers/implementations/exchange/libfips-lib-kdf_exch.o",
- "providers/implementations/kdfs/libfips-lib-hkdf.o",
- "providers/implementations/kdfs/libfips-lib-kbkdf.o",
- "providers/implementations/kdfs/libfips-lib-pbkdf2.o",
- "providers/implementations/kdfs/libfips-lib-pbkdf2_fips.o",
- "providers/implementations/kdfs/libfips-lib-sshkdf.o",
- "providers/implementations/kdfs/libfips-lib-sskdf.o",
- "providers/implementations/kdfs/libfips-lib-tls1_prf.o",
- "providers/implementations/kdfs/libfips-lib-x942kdf.o",
- "providers/implementations/kem/libfips-lib-ml_kem_kem.o",
- "providers/implementations/kem/libfips-lib-mlx_kem.o",
- "providers/implementations/kem/libfips-lib-rsa_kem.o",
- "providers/implementations/keymgmt/libfips-lib-dh_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-dsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ec_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ecx_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-kdf_legacy_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-mac_legacy_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ml_dsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-ml_kem_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-mlx_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-rsa_kmgmt.o",
- "providers/implementations/keymgmt/libfips-lib-slh_dsa_kmgmt.o",
- "providers/implementations/macs/libfips-lib-cmac_prov.o",
- "providers/implementations/macs/libfips-lib-gmac_prov.o",
- "providers/implementations/macs/libfips-lib-hmac_prov.o",
- "providers/implementations/macs/libfips-lib-kmac_prov.o",
- "providers/implementations/rands/libfips-lib-drbg.o",
- "providers/implementations/rands/libfips-lib-drbg_ctr.o",
- "providers/implementations/rands/libfips-lib-drbg_hash.o",
- "providers/implementations/rands/libfips-lib-drbg_hmac.o",
- "providers/implementations/rands/libfips-lib-fips_crng_test.o",
- "providers/implementations/rands/libfips-lib-test_rng.o",
- "providers/implementations/signature/libfips-lib-dsa_sig.o",
- "providers/implementations/signature/libfips-lib-ecdsa_sig.o",
- "providers/implementations/signature/libfips-lib-eddsa_sig.o",
- "providers/implementations/signature/libfips-lib-mac_legacy_sig.o",
- "providers/implementations/signature/libfips-lib-ml_dsa_sig.o",
- "providers/implementations/signature/libfips-lib-rsa_sig.o",
- "providers/implementations/signature/libfips-lib-slh_dsa_sig.o",
- "providers/implementations/skeymgmt/libfips-lib-aes_skmgmt.o",
- "providers/implementations/skeymgmt/libfips-lib-generic.o",
- "providers/libcommon.a",
- "ssl/record/methods/libfips-lib-ssl3_cbc.o"
+ "providers/liblegacy-lib-prov_running.o" => [
+ "providers/prov_running.c"
+ ],
+ "providers/liblegacy.a" => [
+ "crypto/des/liblegacy-lib-des_enc.o",
+ "crypto/des/liblegacy-lib-fcrypt_b.o",
+ "crypto/md5/liblegacy-lib-md5-x86_64.o",
+ "crypto/md5/liblegacy-lib-md5_dgst.o",
+ "crypto/md5/liblegacy-lib-md5_one.o",
+ "crypto/md5/liblegacy-lib-md5_sha1.o",
+ "crypto/rc4/liblegacy-lib-rc4-md5-x86_64.o",
+ "crypto/rc4/liblegacy-lib-rc4-x86_64.o",
+ "providers/common/liblegacy-lib-provider_util.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_blowfish_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_cast5_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_des_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_desx_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc2_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hmac_md5_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_rc4_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_seed_hw.o",
+ "providers/implementations/ciphers/liblegacy-lib-cipher_tdes_common.o",
+ "providers/implementations/digests/liblegacy-lib-md4_prov.o",
+ "providers/implementations/digests/liblegacy-lib-ripemd_prov.o",
+ "providers/implementations/digests/liblegacy-lib-wp_prov.o",
+ "providers/implementations/kdfs/liblegacy-lib-pbkdf1.o",
+ "providers/implementations/kdfs/liblegacy-lib-pvkkdf.o",
+ "providers/liblegacy-lib-prov_running.o"
],
"providers/libtemplate.a" => [
"providers/implementations/kem/libtemplate-lib-template_kem.o",
@@ -34894,12 +33325,12 @@ our %unified_info = (
"ssl/record/methods/libdefault-lib-ssl3_cbc.o" => [
"ssl/record/methods/ssl3_cbc.c"
],
- "ssl/record/methods/libfips-lib-ssl3_cbc.o" => [
- "ssl/record/methods/ssl3_cbc.c"
- ],
"ssl/record/methods/libssl-lib-dtls_meth.o" => [
"ssl/record/methods/dtls_meth.c"
],
+ "ssl/record/methods/libssl-lib-ktls_meth.o" => [
+ "ssl/record/methods/ktls_meth.c"
+ ],
"ssl/record/methods/libssl-lib-ssl3_meth.o" => [
"ssl/record/methods/ssl3_meth.c"
],
@@ -34921,6 +33352,9 @@ our %unified_info = (
"ssl/record/methods/libssl-shlib-dtls_meth.o" => [
"ssl/record/methods/dtls_meth.c"
],
+ "ssl/record/methods/libssl-shlib-ktls_meth.o" => [
+ "ssl/record/methods/ktls_meth.c"
+ ],
"ssl/record/methods/libssl-shlib-ssl3_cbc.o" => [
"ssl/record/methods/ssl3_cbc.c"
],
@@ -35026,12 +33460,6 @@ our %unified_info = (
"test/aborttest-bin-aborttest.o" => [
"test/aborttest.c"
],
- "test/acvp_test" => [
- "test/acvp_test-bin-acvp_test.o"
- ],
- "test/acvp_test-bin-acvp_test.o" => [
- "test/acvp_test.c"
- ],
"test/aesgcmtest" => [
"test/aesgcmtest-bin-aesgcmtest.o"
],
@@ -35281,6 +33709,12 @@ our %unified_info = (
"test/buildtest_c_conf_api-bin-buildtest_conf_api.o" => [
"test/buildtest_conf_api.c"
],
+ "test/buildtest_c_configuration" => [
+ "test/buildtest_c_configuration-bin-buildtest_configuration.o"
+ ],
+ "test/buildtest_c_configuration-bin-buildtest_configuration.o" => [
+ "test/buildtest_configuration.c"
+ ],
"test/buildtest_c_conftypes" => [
"test/buildtest_c_conftypes-bin-buildtest_conftypes.o"
],
@@ -35929,6 +34363,7 @@ our %unified_info = (
"test/ectest.c"
],
"test/endecode_test" => [
+ "providers/endecode_test-bin-legacyprov.o",
"test/endecode_test-bin-endecode_test.o",
"test/helpers/endecode_test-bin-predefined_dhparams.o"
],
@@ -35960,6 +34395,7 @@ our %unified_info = (
"test/evp_byname_test.c"
],
"test/evp_extra_test" => [
+ "providers/evp_extra_test-bin-legacyprov.o",
"test/evp_extra_test-bin-evp_extra_test.o",
"test/evp_extra_test-bin-fake_pipelineprov.o",
"test/evp_extra_test-bin-fake_rsaprov.o"
@@ -37268,9 +35704,7 @@ our %unified_info = (
"util/wrap.pl.in"
]
},
- "targets" => [
- "build_modules_nodep"
- ]
+ "targets" => []
);
# Unexported, only used by OpenSSL::Test::Utils::available_protocols()
@@ -37317,6 +35751,9 @@ my @makevars = (
"RM"
);
my %disabled_info = (
+ "acvp-tests" => {
+ "macro" => "OPENSSL_NO_ACVP_TESTS"
+ },
"afalgeng" => {
"macro" => "OPENSSL_NO_AFALGENG"
},
@@ -37353,6 +35790,12 @@ my %disabled_info = (
"fips-jitter" => {
"macro" => "OPENSSL_NO_FIPS_JITTER"
},
+ "fips-post" => {
+ "macro" => "OPENSSL_NO_FIPS_POST"
+ },
+ "fips-securitychecks" => {
+ "macro" => "OPENSSL_NO_FIPS_SECURITYCHECKS"
+ },
"fuzz-afl" => {
"macro" => "OPENSSL_NO_FUZZ_AFL"
},
@@ -37374,9 +35817,6 @@ my %disabled_info = (
"jitter" => {
"macro" => "OPENSSL_NO_JITTER"
},
- "ktls" => {
- "macro" => "OPENSSL_NO_KTLS"
- },
"md2" => {
"macro" => "OPENSSL_NO_MD2",
"skipped" => [
@@ -37431,9 +35871,6 @@ my %disabled_info = (
"tfo" => {
"macro" => "OPENSSL_NO_TFO"
},
- "tls-deprecated-ec" => {
- "macro" => "OPENSSL_NO_TLS_DEPRECATED_EC"
- },
"trace" => {
"macro" => "OPENSSL_NO_TRACE"
},
@@ -37476,8 +35913,8 @@ unless (caller) {
use File::Copy;
use Pod::Usage;
- use lib '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/util/perl';
- use OpenSSL::fallback '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/external/perl/MODULES.txt';
+ use lib '/usr/home/ngie/git/freebsd-src/crypto/openssl/util/perl';
+ use OpenSSL::fallback '/usr/home/ngie/git/freebsd-src/crypto/openssl/external/perl/MODULES.txt';
my $here = dirname($0);
@@ -37504,7 +35941,7 @@ unless (caller) {
);
use lib '.';
- use lib '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/Configurations';
+ use lib '/usr/home/ngie/git/freebsd-src/crypto/openssl/Configurations';
use gentemplate;
open my $buildfile_template_fh, ">$buildfile_template"
@@ -37521,8 +35958,8 @@ unless (caller) {
my $prepend = <<'_____';
use File::Spec::Functions;
-use lib '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/util/perl';
-use lib '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/Configurations';
+use lib '/usr/home/ngie/git/freebsd-src/crypto/openssl/util/perl';
+use lib '/usr/home/ngie/git/freebsd-src/crypto/openssl/Configurations';
use lib '.';
use platform;
_____
diff --git a/crypto/openssl/exporters/libcrypto.pc b/crypto/openssl/exporters/libcrypto.pc
new file mode 100644
index 000000000000..e7f3953b7eae
--- /dev/null
+++ b/crypto/openssl/exporters/libcrypto.pc
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+enginesdir=${libdir}/engines-3
+modulesdir=${libdir}/ossl-modules
+
+Name: OpenSSL-libcrypto
+Description: OpenSSL cryptography library
+Version: 3.5.1
+Libs: -L${libdir} -lcrypto
+Libs.private: -pthread
+Cflags: -I${includedir}
diff --git a/crypto/openssl/exporters/libssl.pc b/crypto/openssl/exporters/libssl.pc
new file mode 100644
index 000000000000..ed6fd275ca26
--- /dev/null
+++ b/crypto/openssl/exporters/libssl.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: OpenSSL-libssl
+Description: Secure Sockets Layer and cryptography libraries
+Version: 3.5.1
+Requires.private: libcrypto
+Libs: -L${libdir} -lssl
+Cflags: -I${includedir}
diff --git a/crypto/openssl/exporters/openssl.pc b/crypto/openssl/exporters/openssl.pc
new file mode 100644
index 000000000000..892ef113ca0f
--- /dev/null
+++ b/crypto/openssl/exporters/openssl.pc
@@ -0,0 +1,9 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: OpenSSL
+Description: Secure Sockets Layer and cryptography libraries and tools
+Version: 3.5.1
+Requires: libssl libcrypto
diff --git a/crypto/openssl/freebsd/dump_version_from_configdata.pl b/crypto/openssl/freebsd/dump_version_from_configdata.pl
new file mode 100644
index 000000000000..b6137718ba54
--- /dev/null
+++ b/crypto/openssl/freebsd/dump_version_from_configdata.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+#
+# This dumps out the values needed to generate manpages and other artifacts
+# which include the release version/date.
+#
+# See also: `secure/lib/libcrypto/Makefile.version`.
+
+use Cwd qw(realpath);
+use File::Basename qw(dirname);
+use Time::Piece;
+
+use lib dirname(dirname(realpath($0)));
+
+use configdata qw(%config);
+
+$OPENSSL_DATE = Time::Piece->strptime($config{"release_date"}, "%d %b %Y")->strftime("%Y-%m-%d");
+
+$OPENSSL_VER = "$config{'major'}.$config{'minor'}.$config{'patch'}";
+
+print("OPENSSL_VER=\t${OPENSSL_VER}\n");
+print("OPENSSL_DATE=\t${OPENSSL_DATE}\n");
diff --git a/crypto/openssl/freebsd/include/crypto/bn_conf.h b/crypto/openssl/freebsd/include/crypto/bn_conf.h
new file mode 100644
index 000000000000..442931b63339
--- /dev/null
+++ b/crypto/openssl/freebsd/include/crypto/bn_conf.h
@@ -0,0 +1,27 @@
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_BN_CONF_H__
+#define __FREEBSD_BN_CONF_H__
+
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+
+# if __SIZEOF_LONG__ == 8
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+
+#endif /* __FREEBSD_BN_CONF_H__ */
diff --git a/crypto/openssl/freebsd/include/openssl/configuration.h b/crypto/openssl/freebsd/include/openssl/configuration.h
new file mode 100644
index 000000000000..faea78cb32c8
--- /dev/null
+++ b/crypto/openssl/freebsd/include/openssl/configuration.h
@@ -0,0 +1,38 @@
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_CONFIGURATION_H__
+#define __FREEBSD_CONFIGURATION_H__
+
+# undef OPENSSL_NO_EC_NISTP_64_GCC_128
+# if __SIZEOF_LONG__ == 4 || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
+# define OPENSSL_NO_EC_NISTP_64_GCC_128
+# endif
+# endif
+
+# undef BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# if !defined(OPENSSL_SYS_UEFI)
+# if __SIZEOF_LONG__ == 8
+# undef BN_LLONG
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# define BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+# endif
+
+#endif /* __FREEBSD_CONFIGURATION_H__ */
diff --git a/crypto/openssl/include/crypto/bn_conf.h b/crypto/openssl/include/crypto/bn_conf.h
index 0347a6ddc067..408242f0f8d0 100644
--- a/crypto/openssl/include/crypto/bn_conf.h
+++ b/crypto/openssl/include/crypto/bn_conf.h
@@ -27,3 +27,30 @@
#undef THIRTY_TWO_BIT
#endif
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_BN_CONF_H__
+#define __FREEBSD_BN_CONF_H__
+
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+
+# if __SIZEOF_LONG__ == 8
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+
+#endif /* __FREEBSD_BN_CONF_H__ */
diff --git a/crypto/openssl/include/openssl/configuration.h b/crypto/openssl/include/openssl/configuration.h
index 9fd68f770a1a..b4d8283a8b98 100644
--- a/crypto/openssl/include/openssl/configuration.h
+++ b/crypto/openssl/include/openssl/configuration.h
@@ -34,6 +34,9 @@ extern "C" {
# ifndef OPENSSL_THREADS
# define OPENSSL_THREADS
# endif
+# ifndef OPENSSL_NO_ACVP_TESTS
+# define OPENSSL_NO_ACVP_TESTS
+# endif
# ifndef OPENSSL_NO_AFALGENG
# define OPENSSL_NO_AFALGENG
# endif
@@ -67,6 +70,12 @@ extern "C" {
# ifndef OPENSSL_NO_FIPS_JITTER
# define OPENSSL_NO_FIPS_JITTER
# endif
+# ifndef OPENSSL_NO_FIPS_POST
+# define OPENSSL_NO_FIPS_POST
+# endif
+# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
+# define OPENSSL_NO_FIPS_SECURITYCHECKS
+# endif
# ifndef OPENSSL_NO_FUZZ_AFL
# define OPENSSL_NO_FUZZ_AFL
# endif
@@ -85,9 +94,6 @@ extern "C" {
# ifndef OPENSSL_NO_JITTER
# define OPENSSL_NO_JITTER
# endif
-# ifndef OPENSSL_NO_KTLS
-# define OPENSSL_NO_KTLS
-# endif
# ifndef OPENSSL_NO_MD2
# define OPENSSL_NO_MD2
# endif
@@ -124,9 +130,6 @@ extern "C" {
# ifndef OPENSSL_NO_TFO
# define OPENSSL_NO_TFO
# endif
-# ifndef OPENSSL_NO_TLS_DEPRECATED_EC
-# define OPENSSL_NO_TLS_DEPRECATED_EC
-# endif
# ifndef OPENSSL_NO_TRACE
# define OPENSSL_NO_TRACE
# endif
@@ -189,3 +192,41 @@ extern "C" {
# endif
#endif /* OPENSSL_CONFIGURATION_H */
+
+/**
+ * OpenSSL's Configure script generates these values automatically for the host
+ * architecture, but FreeBSD provides values which are universal for all
+ * supported target architectures.
+ */
+
+#ifndef __FREEBSD_CONFIGURATION_H__
+#define __FREEBSD_CONFIGURATION_H__
+
+# undef OPENSSL_NO_EC_NISTP_64_GCC_128
+# if __SIZEOF_LONG__ == 4 || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
+# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
+# define OPENSSL_NO_EC_NISTP_64_GCC_128
+# endif
+# endif
+
+# undef BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# if !defined(OPENSSL_SYS_UEFI)
+# if __SIZEOF_LONG__ == 8
+# undef BN_LLONG
+# define SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# undef THIRTY_TWO_BIT
+# elif __SIZEOF_LONG__ == 4
+# define BN_LLONG
+# undef SIXTY_FOUR_BIT_LONG
+# undef SIXTY_FOUR_BIT
+# define THIRTY_TWO_BIT
+# else
+# error Unsupported size of long
+# endif
+# endif
+
+#endif /* __FREEBSD_CONFIGURATION_H__ */
diff --git a/crypto/openssl/include/openssl/fipskey.h b/crypto/openssl/include/openssl/fipskey.h
index 929db18c6783..620812bf0a5f 100644
--- a/crypto/openssl/include/openssl/fipskey.h
+++ b/crypto/openssl/include/openssl/fipskey.h
@@ -32,7 +32,7 @@ extern "C" {
/*
* The FIPS provider vendor name, as a string.
*/
-#define FIPS_VENDOR "OpenSSL FIPS Provider"
+#define FIPS_VENDOR "OpenSSL non-compliant FIPS Provider"
# ifdef __cplusplus
}
diff --git a/crypto/openssl/include/openssl/opensslv.h b/crypto/openssl/include/openssl/opensslv.h
index 4660b937298f..dd50d89cb998 100644
--- a/crypto/openssl/include/openssl/opensslv.h
+++ b/crypto/openssl/include/openssl/opensslv.h
@@ -57,7 +57,7 @@ extern "C" {
* be related to the API version expressed with the macros above.
* This is defined in free form.
*/
-# define OPENSSL_SHLIB_VERSION 17
+# define OPENSSL_SHLIB_VERSION 3
/*
* SECTION 2: USEFUL MACROS
diff --git a/crypto/openssl/libcrypto.pc b/crypto/openssl/libcrypto.pc
new file mode 100644
index 000000000000..97725059adfb
--- /dev/null
+++ b/crypto/openssl/libcrypto.pc
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}
+includedir=${prefix}/include ${prefix}/./include
+enginesdir=${libdir}/engines
+modulesdir=${libdir}/providers
+
+Name: OpenSSL-libcrypto
+Description: OpenSSL cryptography library
+Version: 3.5.1
+Libs: -L${libdir} -lcrypto
+Libs.private: -pthread
+Cflags: -I${prefix}/include -I${prefix}/./include
diff --git a/crypto/openssl/libssl.pc b/crypto/openssl/libssl.pc
new file mode 100644
index 000000000000..e2662ee9e5fa
--- /dev/null
+++ b/crypto/openssl/libssl.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}
+includedir=${prefix}/include ${prefix}/./include
+
+Name: OpenSSL-libssl
+Description: Secure Sockets Layer and cryptography libraries
+Version: 3.5.1
+Requires.private: libcrypto
+Libs: -L${libdir} -lssl
+Cflags: -I${prefix}/include -I${prefix}/./include
diff --git a/crypto/openssl/openssl.pc b/crypto/openssl/openssl.pc
new file mode 100644
index 000000000000..ff0a0c2f4e09
--- /dev/null
+++ b/crypto/openssl/openssl.pc
@@ -0,0 +1,9 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}
+includedir=${prefix}/include ${prefix}/./include
+
+Name: OpenSSL
+Description: Secure Sockets Layer and cryptography libraries and tools
+Version: 3.5.1
+Requires: libssl libcrypto
diff --git a/crypto/openssl/tools/c_rehash b/crypto/openssl/tools/c_rehash
index 2377b88ceda9..f3fbdae831d9 100755
--- a/crypto/openssl/tools/c_rehash
+++ b/crypto/openssl/tools/c_rehash
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/env perl
# WARNING: do not edit!
# Generated by Makefile from tools/c_rehash.in
@@ -12,8 +12,8 @@
# Perl c_rehash script, scan all files in a directory
# and add symbolic links to their hash values.
-my $dir = "/usr/local/openssl";
-my $prefix = "/usr/local";
+my $dir = "etc";
+my $prefix = "/usr";
my $errorcount = 0;
my $openssl = $ENV{OPENSSL} || "openssl";
diff --git a/crypto/openssl/util/shlib_wrap.sh b/crypto/openssl/util/shlib_wrap.sh
index 8b70f5048835..6754c25b9808 100755
--- a/crypto/openssl/util/shlib_wrap.sh
+++ b/crypto/openssl/util/shlib_wrap.sh
@@ -25,8 +25,8 @@ fi
THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.."
[ -d "${THERE}" ] || exec "$@" # should never happen...
-LIBCRYPTOSO="${THERE}/libcrypto.so.17"
-LIBSSLSO="${THERE}/libssl.so.17"
+LIBCRYPTOSO="${THERE}/libcrypto.so.3"
+LIBSSLSO="${THERE}/libssl.so.3"
SYSNAME=`(uname -s) 2>/dev/null`;
case "$SYSNAME" in
diff --git a/crypto/openssl/util/wrap.pl b/crypto/openssl/util/wrap.pl
index 5d6af0a688a8..a2ebf25f3d93 100755
--- a/crypto/openssl/util/wrap.pl
+++ b/crypto/openssl/util/wrap.pl
@@ -1,4 +1,4 @@
-#! /usr/local/bin/perl
+#! /usr/bin/env perl
use strict;
use warnings;
@@ -9,7 +9,7 @@ use File::Spec::Functions;
BEGIN {
# This method corresponds exactly to 'use OpenSSL::Util',
# but allows us to use a platform specific file spec.
- require '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/util/perl/OpenSSL/Util.pm';
+ require '/usr/home/ngie/git/freebsd-src/crypto/openssl/util/perl/OpenSSL/Util.pm';
OpenSSL::Util->import();
}
@@ -53,14 +53,14 @@ my $unix_shlib_wrap = catfile($there, 'util/shlib_wrap.sh');
my $std_openssl_conf_include;
if ($ARGV[0] eq '-fips') {
- $std_openssl_conf = '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/test/fips-and-base.cnf';
+ $std_openssl_conf = '/usr/home/ngie/git/freebsd-src/crypto/openssl/test/fips-and-base.cnf';
shift;
$std_openssl_conf_include = catdir($there, 'providers');
}
if ($ARGV[0] eq '-jitter') {
- $std_openssl_conf = '/home/khorben/Projects/FreeBSD/ports/security/openssl35/work/openssl-3.5.1/test/default-and-jitter.cnf';
+ $std_openssl_conf = '/usr/home/ngie/git/freebsd-src/crypto/openssl/test/default-and-jitter.cnf';
shift;
$std_openssl_conf_include = catdir($there, 'providers');
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index 2c25d9386032..e6a013f010de 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -1255,6 +1255,8 @@
..
..
usr.sbin
+ certctl
+ ..
chown
..
ctladm
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index 68977a6b8282..ffdd82ae9911 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -267,6 +267,8 @@
..
dtrace
..
+ et
+ ..
examples
BSD_daemon
..
diff --git a/include/Makefile b/include/Makefile
index 2792d594a888..07890362d7a6 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -293,7 +293,7 @@ LSUBSUBDIRS+= netgraph/bluetooth/include
LSUBDIRS+= fs/cuse
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_MITKRB5} == "no"
+.if ${MK_KERBEROS} != "no" && ${MK_MITKRB5} == "no"
SUBDIR+= gssapi
INCS+= gssapi.h
.endif
diff --git a/kerberos5/Makefile.inc b/kerberos5/Makefile.inc
index 2525f3888806..e02e110b5786 100644
--- a/kerberos5/Makefile.inc
+++ b/kerberos5/Makefile.inc
@@ -29,9 +29,7 @@ ETSRCS= \
${KRB5DIR}/lib/wind/wind_err.et \
${KRB5DIR}/lib/ntlm/ntlm_err.et
-.if ${MK_GSSAPI} != "no"
ETSRCS+= ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et
-.endif
.for ET in ${ETSRCS}
.for _ET in ${ET:T:R}
diff --git a/kerberos5/lib/Makefile b/kerberos5/lib/Makefile
index 7b63da16e360..1f631b48ce83 100644
--- a/kerberos5/lib/Makefile
+++ b/kerberos5/lib/Makefile
@@ -7,10 +7,8 @@ SUBDIR= libasn1 libhdb \
SUBDIR+= libkafs5 # requires krb_err.h from libkrb5
SUBDIR_DEPEND_libkafs5= libkrb5
-.if ${MK_GSSAPI} != "no"
SUBDIR+= libgssapi_krb5
SUBDIR+= libgssapi_ntlm
SUBDIR+= libgssapi_spnego
-.endif
.include <bsd.subdir.mk>
diff --git a/kerberos5/libexec/Makefile b/kerberos5/libexec/Makefile
index 543331d5029b..2ac9c2d45f28 100644
--- a/kerberos5/libexec/Makefile
+++ b/kerberos5/libexec/Makefile
@@ -4,8 +4,6 @@ SUBDIR= digest-service ipropd-master ipropd-slave hprop hpropd kdc \
kdigest kfd kimpersonate kpasswdd kcm
SUBDIR_PARALLEL=
-.if ${MK_GSSAPI} != "no"
SUBDIR+= kadmind
-.endif
.include <bsd.subdir.mk>
diff --git a/krb5/Makefile b/krb5/Makefile
index e9bbcae106c1..c49601990c4a 100644
--- a/krb5/Makefile
+++ b/krb5/Makefile
@@ -1,7 +1,7 @@
SUBDIR= util .WAIT \
include .WAIT \
lib .WAIT\
- plugins libdata libexec usr.bin usr.sbin
+ plugins libexec usr.bin usr.sbin
# SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/krb5/Makefile.et b/krb5/Makefile.et
index b89e17857675..e80712c6ee2a 100644
--- a/krb5/Makefile.et
+++ b/krb5/Makefile.et
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc
index 5d302962208c..6db4e8d964aa 100644
--- a/krb5/Makefile.inc
+++ b/krb5/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -14,7 +14,7 @@ KRB5_VERSION= 1.22-final
# MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR.
KRB5_SRCTOP= ${SRCTOP}/krb5
KRB5_DIR= ${SRCTOP}/crypto/krb5/src
-KRB5_ETDIR?= ${DESTDIR}/usr/share/et
+KRB5_ETDIR?= /usr/share/et
KRB5_SRCLIBDIR= ${KRB5_DIR}/lib
KRB5_OBJTOP= ${OBJTOP}/krb5
diff --git a/krb5/libdata/Makefile b/krb5/Makefile.pc
index c9a2e8e9259f..693a4636d749 100644
--- a/krb5/libdata/Makefile
+++ b/krb5/Makefile.pc
@@ -2,26 +2,15 @@
#
# SPDX-License-Identifier: BSD-2-Clause OR ISC
-.include "../Makefile.inc"
-
-.PATH: ${KRB5_DIR}/build-tools
-
-PACKAGE=kerberos-lib
-
-PCFILES=gssrpc.pc \
- kadm-client.pc \
- kadm-server.pc \
- kdb.pc \
- krb5.pc \
- krb5-gssapi.pc \
- mit-krb5.pc \
- mit-krb5-gssapi.pc
-
-CLEANFILES+= ${PCFILES}
.SUFFIXES: .pc .pc.in
.pc.in.pc:
+ @if ! grep -q "^PACKAGE_VERSION='${KRB5_VERSION}'$$" ${KRB5_DIR}/configure; then \
+ echo "KRB5_VERSION ${KRB5_VERSION} does not match the source:"; \
+ grep "^PACKAGE_VERSION=" ${KRB5_DIR}/configure; \
+ exit 1; \
+ fi >&2
sed -e 's,@prefix@,/usr,g ; \
s,@exec_prefix@,$${prefix},g ; \
s,@libdir@,${LIBDIR},g ; \
@@ -33,12 +22,3 @@ CLEANFILES+= ${PCFILES}
s,@DEFCKTNAME@,FILE:/var/krb5/user/%{euid}/client.keytab,g ; \
s,@COM_ERR_LIB@,-lcom_err,g ;' \
${.IMPSRC} > ${.TARGET}
-
-all: ${PCFILES}
- @if ! grep -q "^PACKAGE_VERSION='${KRB5_VERSION}'$$" ${KRB5_DIR}/configure; then \
- echo "KRB5_VERSION ${KRB5_VERSION} does not match the source:"; \
- grep "^PACKAGE_VERSION=" ${KRB5_DIR}/configure; \
- exit 1; \
- fi >&2
-
-.include <bsd.lib.mk>
diff --git a/krb5/include/Makefile b/krb5/include/Makefile
index 64c5d39b867b..759c81685da9 100644
--- a/krb5/include/Makefile
+++ b/krb5/include/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/include/Makefile.inc b/krb5/include/Makefile.inc
index 1f0dddcf31e1..5c21860b6157 100644
--- a/krb5/include/Makefile.inc
+++ b/krb5/include/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/include/autoconf.h b/krb5/include/autoconf.h
index fe281d136954..19979b060f10 100644
--- a/krb5/include/autoconf.h
+++ b/krb5/include/autoconf.h
@@ -641,7 +641,7 @@
#define PACKAGE_NAME "Kerberos 5"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kerberos 5 1.21.1"
+#define PACKAGE_STRING "Kerberos 5 1.22.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "krb5"
@@ -650,7 +650,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.21.1"
+#define PACKAGE_VERSION "1.22.0"
/* Default PKCS11 module name */
#define PKCS11_MODNAME "opensc-pkcs11.so"
diff --git a/krb5/include/gssapi/Makefile b/krb5/include/gssapi/Makefile
index 997cbc06c389..0eabcd130200 100644
--- a/krb5/include/gssapi/Makefile
+++ b/krb5/include/gssapi/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/include/gssrpc/Makefile b/krb5/include/gssrpc/Makefile
index 929c9eaacdc9..1eacd5c91c77 100644
--- a/krb5/include/gssrpc/Makefile
+++ b/krb5/include/gssrpc/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/include/krb5/Makefile b/krb5/include/krb5/Makefile
index 2bbc558394c0..8df5c96559a6 100644
--- a/krb5/include/krb5/Makefile
+++ b/krb5/include/krb5/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/Makefile b/krb5/lib/Makefile
index 9df98e2cc056..3b89effaa29c 100644
--- a/krb5/lib/Makefile
+++ b/krb5/lib/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/Makefile.inc b/krb5/lib/Makefile.inc
index b6e5f6275039..50cacb9492ac 100644
--- a/krb5/lib/Makefile.inc
+++ b/krb5/lib/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/apputils/Makefile b/krb5/lib/apputils/Makefile
index cf430eb3cd27..1a79b3800863 100644
--- a/krb5/lib/apputils/Makefile
+++ b/krb5/lib/apputils/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile
index 4dda0d85da54..9521b48f020c 100644
--- a/krb5/lib/crypto/Makefile
+++ b/krb5/lib/crypto/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/Makefile.inc b/krb5/lib/crypto/builtin/Makefile.inc
index afb1afa27083..59b2e6674b6a 100644
--- a/krb5/lib/crypto/builtin/Makefile.inc
+++ b/krb5/lib/crypto/builtin/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/aes/Makefile.inc b/krb5/lib/crypto/builtin/aes/Makefile.inc
index f74b486b5ba5..f46a55921f51 100644
--- a/krb5/lib/crypto/builtin/aes/Makefile.inc
+++ b/krb5/lib/crypto/builtin/aes/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/camellia/Makefile.inc b/krb5/lib/crypto/builtin/camellia/Makefile.inc
index eef5973f3a7d..5effb8d132be 100644
--- a/krb5/lib/crypto/builtin/camellia/Makefile.inc
+++ b/krb5/lib/crypto/builtin/camellia/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/des/Makefile.inc b/krb5/lib/crypto/builtin/des/Makefile.inc
index 8fd5b615e913..02f8d4a1b53d 100644
--- a/krb5/lib/crypto/builtin/des/Makefile.inc
+++ b/krb5/lib/crypto/builtin/des/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/enc_provider/Makefile.inc b/krb5/lib/crypto/builtin/enc_provider/Makefile.inc
index 09df8cbc6300..ef2f6603e60c 100644
--- a/krb5/lib/crypto/builtin/enc_provider/Makefile.inc
+++ b/krb5/lib/crypto/builtin/enc_provider/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/hash_provider/Makefile.inc b/krb5/lib/crypto/builtin/hash_provider/Makefile.inc
index 216d7f2d4e9d..4f89791b9f79 100644
--- a/krb5/lib/crypto/builtin/hash_provider/Makefile.inc
+++ b/krb5/lib/crypto/builtin/hash_provider/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/md4/Makefile.inc b/krb5/lib/crypto/builtin/md4/Makefile.inc
index baf45bb094d2..e47dea4115aa 100644
--- a/krb5/lib/crypto/builtin/md4/Makefile.inc
+++ b/krb5/lib/crypto/builtin/md4/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/md5/Makefile.inc b/krb5/lib/crypto/builtin/md5/Makefile.inc
index ffdccd41fe3f..a01188fa6979 100644
--- a/krb5/lib/crypto/builtin/md5/Makefile.inc
+++ b/krb5/lib/crypto/builtin/md5/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/sha1/Makefile.inc b/krb5/lib/crypto/builtin/sha1/Makefile.inc
index 9e5f8a5b9d2c..f8ca967b45fd 100644
--- a/krb5/lib/crypto/builtin/sha1/Makefile.inc
+++ b/krb5/lib/crypto/builtin/sha1/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/builtin/sha2/Makefile.inc b/krb5/lib/crypto/builtin/sha2/Makefile.inc
index f6ce222f730f..a9463f691c53 100644
--- a/krb5/lib/crypto/builtin/sha2/Makefile.inc
+++ b/krb5/lib/crypto/builtin/sha2/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/krb/Makefile.inc b/krb5/lib/crypto/krb/Makefile.inc
index a38178fd3a2e..3745ad66e6b9 100644
--- a/krb5/lib/crypto/krb/Makefile.inc
+++ b/krb5/lib/crypto/krb/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/openssl/Makefile.inc b/krb5/lib/crypto/openssl/Makefile.inc
index 0b81260a059e..6b7bd89338f7 100644
--- a/krb5/lib/crypto/openssl/Makefile.inc
+++ b/krb5/lib/crypto/openssl/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/openssl/des/Makefile.inc b/krb5/lib/crypto/openssl/des/Makefile.inc
index ef05fe0b0785..9cc99846c6b3 100644
--- a/krb5/lib/crypto/openssl/des/Makefile.inc
+++ b/krb5/lib/crypto/openssl/des/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/openssl/enc_provider/Makefile.inc b/krb5/lib/crypto/openssl/enc_provider/Makefile.inc
index 8cf42dcc6e31..d1c21f334b10 100644
--- a/krb5/lib/crypto/openssl/enc_provider/Makefile.inc
+++ b/krb5/lib/crypto/openssl/enc_provider/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/crypto/openssl/hash_provider/Makefile.inc b/krb5/lib/crypto/openssl/hash_provider/Makefile.inc
index 83f2f1ba9129..f8d25ff8a8cc 100644
--- a/krb5/lib/crypto/openssl/hash_provider/Makefile.inc
+++ b/krb5/lib/crypto/openssl/hash_provider/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/Makefile b/krb5/lib/gssapi/Makefile
index 63e4d7df4bed..a434b29a2dfb 100644
--- a/krb5/lib/gssapi/Makefile
+++ b/krb5/lib/gssapi/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,15 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= gssapi_krb5
-# SHLIB_MAJOR= 2
-LDFLAGS=-Wl,--no-undefined
-LIBADD= krb5 k5crypto com_err krb5profile krb5support
+LDFLAGS= -Wl,--no-undefined
+LIBADD= krb5 k5crypto com_err krb5profile krb5support
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= krb5-gssapi.pc \
+ mit-krb5-gssapi.pc
+CLEANFILES+= ${PCFILES}
# This is a contcatonation of:
# crypto/krb5/src/lib/gssapi/libgssapi_krb5.exports
@@ -44,4 +47,8 @@ CFLAGS+=${DEFINES} \
.include <bsd.lib.mk>
+all: ${PCFILES}
+
.SUFFIXES: .h .c .et
+
+.PATH: ${KRB5_DIR}/build-tools
diff --git a/krb5/lib/gssapi/generic/Makefile.et b/krb5/lib/gssapi/generic/Makefile.et
index 787a1c8aa1e3..c245967e3d40 100644
--- a/krb5/lib/gssapi/generic/Makefile.et
+++ b/krb5/lib/gssapi/generic/Makefile.et
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/generic/Makefile.inc b/krb5/lib/gssapi/generic/Makefile.inc
index 9dcc3476775e..f449ab15c379 100644
--- a/krb5/lib/gssapi/generic/Makefile.inc
+++ b/krb5/lib/gssapi/generic/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/krb5/Makefile.et b/krb5/lib/gssapi/krb5/Makefile.et
index 347f6a72f3b6..393635d5a8da 100644
--- a/krb5/lib/gssapi/krb5/Makefile.et
+++ b/krb5/lib/gssapi/krb5/Makefile.et
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/krb5/Makefile.inc b/krb5/lib/gssapi/krb5/Makefile.inc
index 7e001aa0af27..61010408cd5a 100644
--- a/krb5/lib/gssapi/krb5/Makefile.inc
+++ b/krb5/lib/gssapi/krb5/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/mechglue/Makefile.inc b/krb5/lib/gssapi/mechglue/Makefile.inc
index c54cdf37b55b..13855ae4ebad 100644
--- a/krb5/lib/gssapi/mechglue/Makefile.inc
+++ b/krb5/lib/gssapi/mechglue/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/gssapi/spnego/Makefile.inc b/krb5/lib/gssapi/spnego/Makefile.inc
index 4ebac318ef5a..1184ecc3e6a2 100644
--- a/krb5/lib/gssapi/spnego/Makefile.inc
+++ b/krb5/lib/gssapi/spnego/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile
index 898276e77d04..52a7187cf9bb 100644
--- a/krb5/lib/kadm5clnt/Makefile
+++ b/krb5/lib/kadm5clnt/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,14 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= kadm5clnt_mit
-# SHLIB_MAJOR= 12
-LDFLAGS=-Wl,--no-undefined
-LIBADD= krb5profile gssrpc gssapi_krb5 krb5 k5crypto krb5support com_err
+LDFLAGS= -Wl,--no-undefined
+LIBADD= krb5profile gssrpc gssapi_krb5 krb5 k5crypto krb5support com_err
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= kadm-client.pc
+CLEANFILES+= ${PCFILES}
SRCS= alt_prof.c \
chpass_util.c \
@@ -88,6 +90,9 @@ afterinstall:
.include <bsd.lib.mk>
+all: ${PCFILES}
+
.SUFFIXES: .h .c
-.PATH: ${KRB5_DIR}/lib/kadm5
+.PATH: ${KRB5_DIR}/build-tools \
+ ${KRB5_DIR}/lib/kadm5
diff --git a/krb5/lib/kadm5clnt/clnt/Makefile.inc b/krb5/lib/kadm5clnt/clnt/Makefile.inc
index 2c66879d0eec..c42c87918793 100644
--- a/krb5/lib/kadm5clnt/clnt/Makefile.inc
+++ b/krb5/lib/kadm5clnt/clnt/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile
index aa4fad49ea02..9eecd20ca822 100644
--- a/krb5/lib/kadm5srv/Makefile
+++ b/krb5/lib/kadm5srv/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,14 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= kadm5srv_mit
-# SHLIB_MAJOR= 12
-LDFLAGS=-Wl,--no-undefined
-LIBADD= krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support com_err
+LDFLAGS= -Wl,--no-undefined
+LIBADD= krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support com_err
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= kadm-server.pc
+CLEANFILES+= ${PCFILES}
SRCS= alt_prof.c \
chpass_util.c \
@@ -88,6 +90,9 @@ ${GEN_CHPASS_UTIL_STRINGS_C}: ${GEN_CHPASS_UTIL_STRINGS}
.include <bsd.lib.mk>
+all: ${PCFILES}
+
.SUFFIXES: .h .c .et
-.PATH: ${KRB5_DIR}/lib/kadm5
+.PATH: ${KRB5_DIR}/build-tools \
+ ${KRB5_DIR}/lib/kadm5
diff --git a/krb5/lib/kadm5srv/srv/Makefile.inc b/krb5/lib/kadm5srv/srv/Makefile.inc
index cd46e1af7333..2ea4d22932fc 100644
--- a/krb5/lib/kadm5srv/srv/Makefile.inc
+++ b/krb5/lib/kadm5srv/srv/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/kadmin_common/Makefile b/krb5/lib/kadmin_common/Makefile
index d324acbbe31c..9eed31bc94f3 100644
--- a/krb5/lib/kadmin_common/Makefile
+++ b/krb5/lib/kadmin_common/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/kdb/Makefile b/krb5/lib/kdb/Makefile
index ff17900fb7ec..80039ad83502 100644
--- a/krb5/lib/kdb/Makefile
+++ b/krb5/lib/kdb/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,14 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= kdb5
-# SHLIB_MAJOR= 10
-LDFLAGS=-Wl,--no-undefined
-LIBADD= krb5profile gssrpc krb5 k5crypto com_err krb5support gssapi_krb5
+LDFLAGS= -Wl,--no-undefined
+LIBADD= krb5profile gssrpc krb5 k5crypto com_err krb5support gssapi_krb5
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= kdb.pc
+CLEANFILES+= ${PCFILES}
SRCS= decrypt_key.c \
encrypt_key.c \
@@ -60,6 +62,9 @@ ${ADB_ERR_C}: ${ADB_ERR}
.include <bsd.lib.mk>
+all: ${PCFILES}
+
.SUFFIXES: .h .c
-.PATH: ${KRB5_DIR}/lib/kdb
+.PATH: ${KRB5_DIR}/build-tools \
+ ${KRB5_DIR}/lib/kdb
diff --git a/krb5/lib/kprop_util/Makefile b/krb5/lib/kprop_util/Makefile
index 31c35601d1a8..aaaeb969058d 100644
--- a/krb5/lib/kprop_util/Makefile
+++ b/krb5/lib/kprop_util/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile
index a990354c1877..36074dff1296 100644
--- a/krb5/lib/krad/Makefile
+++ b/krb5/lib/krad/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile
index dc6c53ec6ce2..b3587cf58c2b 100644
--- a/krb5/lib/krb5/Makefile
+++ b/krb5/lib/krb5/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,15 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= krb5
-LDFLAGS=-Wl,--no-undefined
-LIBADD= krb5profile k5crypto com_err krb5support
-# SHLIB_MAJOR= 3
+LDFLAGS= -Wl,--no-undefined
+LIBADD= krb5profile k5crypto com_err krb5support
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= krb5.pc \
+ mit-krb5.pc
+CLEANFILES+= ${PCFILES}
SRCS= krb5_libinit.c
@@ -67,6 +70,8 @@ KDCPACKAGE= kerberos-kdc
.include <bsd.lib.mk>
+all: ${PCFILES}
+
.SUFFIXES: .et .man
.man.5:
@@ -75,5 +80,6 @@ KDCPACKAGE= kerberos-kdc
.man.7:
@cp ${.ALLSRC} ${.TARGET}
-.PATH: ${KRB5_DIR}/lib/krb5 \
+.PATH: ${KRB5_DIR}/build-tools \
+ ${KRB5_DIR}/lib/krb5 \
${KRB5_DIR}/man
diff --git a/krb5/lib/krb5/asn.1/Makefile.inc b/krb5/lib/krb5/asn.1/Makefile.inc
index 1c00b4a9389a..a878986e8a24 100644
--- a/krb5/lib/krb5/asn.1/Makefile.inc
+++ b/krb5/lib/krb5/asn.1/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/ccache/Makefile.inc b/krb5/lib/krb5/ccache/Makefile.inc
index 08514b2819d9..746a24f11e8b 100644
--- a/krb5/lib/krb5/ccache/Makefile.inc
+++ b/krb5/lib/krb5/ccache/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/docs/Makefile.inc b/krb5/lib/krb5/docs/Makefile.inc
index efc4dc2f6b4b..7c1e55325b4c 100644
--- a/krb5/lib/krb5/docs/Makefile.inc
+++ b/krb5/lib/krb5/docs/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/error_tables/Makefile.inc b/krb5/lib/krb5/error_tables/Makefile.inc
index 5d2ec3b9e920..e024238219da 100644
--- a/krb5/lib/krb5/error_tables/Makefile.inc
+++ b/krb5/lib/krb5/error_tables/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/keytab/Makefile.inc b/krb5/lib/krb5/keytab/Makefile.inc
index 8fca2e640f30..800bddb0d952 100644
--- a/krb5/lib/krb5/keytab/Makefile.inc
+++ b/krb5/lib/krb5/keytab/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/krb/Makefile.inc b/krb5/lib/krb5/krb/Makefile.inc
index aedc0438a596..4d8438246dac 100644
--- a/krb5/lib/krb5/krb/Makefile.inc
+++ b/krb5/lib/krb5/krb/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/os/Makefile.inc b/krb5/lib/krb5/os/Makefile.inc
index a59f6fc56c59..f81ab7866ecb 100644
--- a/krb5/lib/krb5/os/Makefile.inc
+++ b/krb5/lib/krb5/os/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/rcache/Makefile.inc b/krb5/lib/krb5/rcache/Makefile.inc
index 4f68dc702dd8..6b5d61e8b75c 100644
--- a/krb5/lib/krb5/rcache/Makefile.inc
+++ b/krb5/lib/krb5/rcache/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/krb5/unicode/Makefile.inc b/krb5/lib/krb5/unicode/Makefile.inc
index 19cea34f2193..ff146961ccea 100644
--- a/krb5/lib/krb5/unicode/Makefile.inc
+++ b/krb5/lib/krb5/unicode/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/lib/rpc/Makefile b/krb5/lib/rpc/Makefile
index a539803cc57c..7e37a5479132 100644
--- a/krb5/lib/rpc/Makefile
+++ b/krb5/lib/rpc/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -10,12 +10,14 @@
.include <src.opts.mk>
.include "../Makefile.inc"
+.include "${KRB5_SRCTOP}/Makefile.pc"
LIB= gssrpc
-# SHLIB_MAJOR= 4
-LDFLAGS=-Wl,--no-undefined
-LIBADD= gssapi_krb5 krb5 k5crypto com_err krb5support
+LDFLAGS= -Wl,--no-undefined
+LIBADD= gssapi_krb5 krb5 k5crypto com_err krb5support
VERSION_MAP= ${.CURDIR}/version.map
+PCFILES= gssrpc.pc
+CLEANFILES+= ${PCFILES}
SRCS= auth_gss.c \
auth_gssapi.c \
@@ -75,4 +77,7 @@ CFLAGS+=-I${KRB5_DIR}/lib/rpc \
.include <bsd.lib.mk>
-.PATH: ${KRB5_DIR}/lib/rpc
+all: ${PCFILES}
+
+.PATH: ${KRB5_DIR}/build-tools \
+ ${KRB5_DIR}/lib/rpc
diff --git a/krb5/libexec/Makefile b/krb5/libexec/Makefile
index 1f8ce8728d19..38199ed09aa9 100644
--- a/krb5/libexec/Makefile
+++ b/krb5/libexec/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-#DIR $FreeBSD$
-
SUBDIR= kdc kadmind kpropd kprop kproplog
SUBDIR_PARALLEL=
diff --git a/krb5/libexec/Makefile.inc b/krb5/libexec/Makefile.inc
index 6ce709d08304..9bec75eba9cb 100644
--- a/krb5/libexec/Makefile.inc
+++ b/krb5/libexec/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/libexec/kadmind/Makefile b/krb5/libexec/kadmind/Makefile
index 62046214af7b..434e4adce211 100644
--- a/krb5/libexec/kadmind/Makefile
+++ b/krb5/libexec/kadmind/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/libexec/kdc/Makefile b/krb5/libexec/kdc/Makefile
index 1a0d5b9c208b..9317ebbbc9a8 100644
--- a/krb5/libexec/kdc/Makefile
+++ b/krb5/libexec/kdc/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/libexec/kprop/Makefile b/krb5/libexec/kprop/Makefile
index 1294d9014ee4..0889562cfa43 100644
--- a/krb5/libexec/kprop/Makefile
+++ b/krb5/libexec/kprop/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/libexec/kpropd/Makefile b/krb5/libexec/kpropd/Makefile
index e7ffe5a26016..667947dcc84c 100644
--- a/krb5/libexec/kpropd/Makefile
+++ b/krb5/libexec/kpropd/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/libexec/kproplog/Makefile b/krb5/libexec/kproplog/Makefile
index 81405260a06e..3a69164ddabf 100644
--- a/krb5/libexec/kproplog/Makefile
+++ b/krb5/libexec/kproplog/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/Makefile b/krb5/plugins/Makefile
index a72dd4a521bc..d8ba01585f2a 100644
--- a/krb5/plugins/Makefile
+++ b/krb5/plugins/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/Makefile.inc b/krb5/plugins/Makefile.inc
index d98ed1d3887b..f1ae34663769 100644
--- a/krb5/plugins/Makefile.inc
+++ b/krb5/plugins/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/audit/Makefile b/krb5/plugins/audit/Makefile
index f85e5d1a81a5..124c6e2b7a5a 100644
--- a/krb5/plugins/audit/Makefile
+++ b/krb5/plugins/audit/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/k5tls/Makefile b/krb5/plugins/k5tls/Makefile
index 30738a70e71d..928d64d28ab5 100644
--- a/krb5/plugins/k5tls/Makefile
+++ b/krb5/plugins/k5tls/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/Makefile b/krb5/plugins/kdb/Makefile
index f9e2a4d1afb1..1d5533bf8d22 100644
--- a/krb5/plugins/kdb/Makefile
+++ b/krb5/plugins/kdb/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/Makefile.inc b/krb5/plugins/kdb/Makefile.inc
index 56c36b7539f7..8005a7b99e37 100644
--- a/krb5/plugins/kdb/Makefile.inc
+++ b/krb5/plugins/kdb/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/Makefile b/krb5/plugins/kdb/db2/Makefile
index 3230a77171f4..737ae7e15e27 100644
--- a/krb5/plugins/kdb/db2/Makefile
+++ b/krb5/plugins/kdb/db2/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/Makefile.inc
index d31beb5dd5f5..ae035ad49f00 100644
--- a/krb5/plugins/kdb/db2/libdb2/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc
index 1c1b2b6ea26c..27fc2627c0ef 100644
--- a/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc
index cdcdac287b5d..66613c4dd69d 100644
--- a/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc
index 7943281b7797..d6f1fae0414a 100644
--- a/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc
index 63be42f21082..a73998cdc8d0 100644
--- a/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc
index 801f36a085c7..5b05e9b866e4 100644
--- a/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc
index 01557c312a53..10af0f174b56 100644
--- a/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc
+++ b/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/Makefile b/krb5/plugins/preauth/Makefile
index 23861859bd2c..b037aa2058ab 100644
--- a/krb5/plugins/preauth/Makefile
+++ b/krb5/plugins/preauth/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/Makefile.inc b/krb5/plugins/preauth/Makefile.inc
index 8a713e4d0856..49065f8a3147 100644
--- a/krb5/plugins/preauth/Makefile.inc
+++ b/krb5/plugins/preauth/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/otp/Makefile b/krb5/plugins/preauth/otp/Makefile
index 48fc35db0727..fa047b44e176 100644
--- a/krb5/plugins/preauth/otp/Makefile
+++ b/krb5/plugins/preauth/otp/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/pkinit/Makefile b/krb5/plugins/preauth/pkinit/Makefile
index 7d227aca5420..47e02b315cd6 100644
--- a/krb5/plugins/preauth/pkinit/Makefile
+++ b/krb5/plugins/preauth/pkinit/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/spake/Makefile b/krb5/plugins/preauth/spake/Makefile
index 3aa375cb5100..602d563d291f 100644
--- a/krb5/plugins/preauth/spake/Makefile
+++ b/krb5/plugins/preauth/spake/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/plugins/preauth/test/Makefile b/krb5/plugins/preauth/test/Makefile
index 99f632c0cb17..70292dec9a14 100644
--- a/krb5/plugins/preauth/test/Makefile
+++ b/krb5/plugins/preauth/test/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/Makefile b/krb5/usr.bin/Makefile
index b8f8d471cb9b..625aa2245334 100644
--- a/krb5/usr.bin/Makefile
+++ b/krb5/usr.bin/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/Makefile.inc b/krb5/usr.bin/Makefile.inc
index f27bd78cd54c..edd734628950 100644
--- a/krb5/usr.bin/Makefile.inc
+++ b/krb5/usr.bin/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/gss-client/Makefile b/krb5/usr.bin/gss-client/Makefile
index acd67f9c17c6..e989e9bf58a8 100644
--- a/krb5/usr.bin/gss-client/Makefile
+++ b/krb5/usr.bin/gss-client/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kadmin/Makefile b/krb5/usr.bin/kadmin/Makefile
index 182cabb8f9f6..854640e2f002 100644
--- a/krb5/usr.bin/kadmin/Makefile
+++ b/krb5/usr.bin/kadmin/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kdestroy/Makefile b/krb5/usr.bin/kdestroy/Makefile
index e3f493ffdc60..d99b2c07d140 100644
--- a/krb5/usr.bin/kdestroy/Makefile
+++ b/krb5/usr.bin/kdestroy/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kinit/Makefile b/krb5/usr.bin/kinit/Makefile
index 3d1285137f85..43e5525ffe30 100644
--- a/krb5/usr.bin/kinit/Makefile
+++ b/krb5/usr.bin/kinit/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/klist/Makefile b/krb5/usr.bin/klist/Makefile
index 3094a3b69d4b..539337bdd10b 100644
--- a/krb5/usr.bin/klist/Makefile
+++ b/krb5/usr.bin/klist/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kpasswd/Makefile b/krb5/usr.bin/kpasswd/Makefile
index e4d7d1e8ab84..262fdf3fe2e0 100644
--- a/krb5/usr.bin/kpasswd/Makefile
+++ b/krb5/usr.bin/kpasswd/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/ksu/Makefile b/krb5/usr.bin/ksu/Makefile
index 7296ea61b73d..aaec461ce0b0 100644
--- a/krb5/usr.bin/ksu/Makefile
+++ b/krb5/usr.bin/ksu/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kswitch/Makefile b/krb5/usr.bin/kswitch/Makefile
index 10298f34a9d4..bae947ab6e8c 100644
--- a/krb5/usr.bin/kswitch/Makefile
+++ b/krb5/usr.bin/kswitch/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/ktutil/Makefile b/krb5/usr.bin/ktutil/Makefile
index 15991cb49bce..597de6568eaf 100644
--- a/krb5/usr.bin/ktutil/Makefile
+++ b/krb5/usr.bin/ktutil/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/kvno/Makefile b/krb5/usr.bin/kvno/Makefile
index 0a43765e53f4..166f3d4b7086 100644
--- a/krb5/usr.bin/kvno/Makefile
+++ b/krb5/usr.bin/kvno/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/sclient/Makefile b/krb5/usr.bin/sclient/Makefile
index 8a3cc38fe3b6..e98352e98d67 100644
--- a/krb5/usr.bin/sclient/Makefile
+++ b/krb5/usr.bin/sclient/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.bin/sim_client/Makefile b/krb5/usr.bin/sim_client/Makefile
index 3e5ea72407bc..8ab198e42c44 100644
--- a/krb5/usr.bin/sim_client/Makefile
+++ b/krb5/usr.bin/sim_client/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/Makefile b/krb5/usr.sbin/Makefile
index 083132e2de05..84e4a4dac99a 100644
--- a/krb5/usr.sbin/Makefile
+++ b/krb5/usr.sbin/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-# $FreeBSD$
-
SUBDIR= kadmin.local kdb5_util sim_server gss-server
SUBDIR_PARALLEL=
diff --git a/krb5/usr.sbin/Makefile.inc b/krb5/usr.sbin/Makefile.inc
index fb0b2dda8c97..689ee64515ae 100644
--- a/krb5/usr.sbin/Makefile.inc
+++ b/krb5/usr.sbin/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/gss-server/Makefile b/krb5/usr.sbin/gss-server/Makefile
index c42740045ac4..67a51edb45b3 100644
--- a/krb5/usr.sbin/gss-server/Makefile
+++ b/krb5/usr.sbin/gss-server/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/kadmin.local/Makefile b/krb5/usr.sbin/kadmin.local/Makefile
index 3930c0fc4694..a24d7ecf9046 100644
--- a/krb5/usr.sbin/kadmin.local/Makefile
+++ b/krb5/usr.sbin/kadmin.local/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/kdb5_util/Makefile b/krb5/usr.sbin/kdb5_util/Makefile
index 0c1ad4d56bad..df45a0248289 100644
--- a/krb5/usr.sbin/kdb5_util/Makefile
+++ b/krb5/usr.sbin/kdb5_util/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/sim_server/Makefile b/krb5/usr.sbin/sim_server/Makefile
index adaf8d1f087f..d46942e0cb91 100644
--- a/krb5/usr.sbin/sim_server/Makefile
+++ b/krb5/usr.sbin/sim_server/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/usr.sbin/sserver/Makefile b/krb5/usr.sbin/sserver/Makefile
index e4e85b28157e..67cdf9777742 100644
--- a/krb5/usr.sbin/sserver/Makefile
+++ b/krb5/usr.sbin/sserver/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/Makefile b/krb5/util/Makefile
index 17733db5b2a5..8d376e034708 100644
--- a/krb5/util/Makefile
+++ b/krb5/util/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/Makefile.inc b/krb5/util/Makefile.inc
index 95b93a793d77..e9357fa4cc66 100644
--- a/krb5/util/Makefile.inc
+++ b/krb5/util/Makefile.inc
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/build-tools/Makefile b/krb5/util/build-tools/Makefile
index 1a6a373f0e7f..53de0be92fd2 100644
--- a/krb5/util/build-tools/Makefile
+++ b/krb5/util/build-tools/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/build-tools/krb5-config.sh b/krb5/util/build-tools/krb5-config.sh
index c0481f3417e1..b23fe0141345 100755
--- a/krb5/util/build-tools/krb5-config.sh
+++ b/krb5/util/build-tools/krb5-config.sh
@@ -26,7 +26,7 @@
# Configurable parameters set by autoconf
# Disreagard the above. Edit this by hand in the bespoke FreeBSD build.
-version_string="Kerberos 5 release 1.21.3"
+version_string="Kerberos 5 release 1.22.0"
prefix=/usr
exec_prefix=${prefix}
diff --git a/krb5/util/compile_et/Makefile b/krb5/util/compile_et/Makefile
index 3d48b39cab27..015ef088d90f 100644
--- a/krb5/util/compile_et/Makefile
+++ b/krb5/util/compile_et/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/et/Makefile b/krb5/util/et/Makefile
index 5d0c2a3e3ca5..0d474efa1e8e 100644
--- a/krb5/util/et/Makefile
+++ b/krb5/util/et/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
@@ -20,7 +20,6 @@ INCSDIR=${INCLUDEDIR}
LIBADD= krb5support
VERSION_MAP= ${.CURDIR}/version.map
-
SRCS= com_err.c \
error_message.c \
et_name.c \
@@ -38,6 +37,14 @@ CFLAGS+=-I${KRB5_DIR}/util/et \
-I${.CURDIR:H:H}/include \
-I${.OBJDIR}
+FILESGROUPS= ETSCRIPTS
+
+ETSCRIPTS= et_c.awk \
+ et_h.awk
+
+ETSCRIPTSDIR= ${KRB5_ETDIR}
+ETSCRIPTSMODE= 0444
+
.include <bsd.lib.mk>
.SUFFIXES: .h .c .et .ct .man .3
diff --git a/krb5/util/profile/Makefile b/krb5/util/profile/Makefile
index 7d1b806bfb5d..751d648fa58e 100644
--- a/krb5/util/profile/Makefile
+++ b/krb5/util/profile/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/ss/Makefile b/krb5/util/ss/Makefile
index 2c43f2b5934f..ac01f683ff67 100644
--- a/krb5/util/ss/Makefile
+++ b/krb5/util/ss/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/support/Makefile b/krb5/util/support/Makefile
index bba65bcd89c1..f73f5d31990a 100644
--- a/krb5/util/support/Makefile
+++ b/krb5/util/support/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/krb5/util/verto/Makefile b/krb5/util/verto/Makefile
index 8f02d5f897f4..66d9d8ef4e0b 100644
--- a/krb5/util/verto/Makefile
+++ b/krb5/util/verto/Makefile
@@ -1,5 +1,5 @@
#
-# SPDX-License-Idendifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2025 FreeBSD Foundation
#
diff --git a/lib/Makefile b/lib/Makefile
index 9447cc4551c0..2b7cf2fdcb7d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -179,12 +179,12 @@ SUBDIR.${MK_FDT}+= libfdt
SUBDIR.${MK_FILE}+= libmagic
SUBDIR.${MK_GPIO}+= libgpio
.if ${MK_MITKRB5} == "no"
-SUBDIR.${MK_GSSAPI}+= libgssapi
+SUBDIR.${MK_KERBEROS}+= libgssapi
.endif
-SUBDIR.${MK_GSSAPI}+= librpcsec_gss
+SUBDIR.${MK_KERBEROS}+= librpcsec_gss
SUBDIR.${MK_ICONV}+= libiconv_modules
.if ${MK_MITKRB5} == "no"
-SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err
+SUBDIR.${MK_KERBEROS}+= libcom_err
.endif
SUBDIR.${MK_LDNS}+= libldns
SUBDIR.${MK_STATS}+= libstats
diff --git a/lib/libc/i386/gen/makecontext.c b/lib/libc/i386/gen/makecontext.c
index 7b4845ac6bee..9fedd8b99c47 100644
--- a/lib/libc/i386/gen/makecontext.c
+++ b/lib/libc/i386/gen/makecontext.c
@@ -124,7 +124,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
/*
* Setup the top of the stack with the user start routine
- * followed by all of its aguments and the pointer to the
+ * followed by all of its arguments and the pointer to the
* ucontext. We need to leave a spare spot at the top of
* the stack because setcontext will move eip to the top
* of the stack before returning.
diff --git a/lib/libc/net/gai_strerror.c b/lib/libc/net/gai_strerror.c
index 0d4303e76a73..23f58b763573 100644
--- a/lib/libc/net/gai_strerror.c
+++ b/lib/libc/net/gai_strerror.c
@@ -45,22 +45,22 @@
* Entries EAI_ADDRFAMILY (1) and EAI_NODATA (7) were omitted from RFC 3493,
* but are or may be used as extensions or in old code.
*/
-static const char *ai_errlist[] = {
- "Success", /* 0 */
- "Address family for hostname not supported", /* EAI_ADDRFAMILY */
- "Name could not be resolved at this time", /* EAI_AGAIN */
- "Flags parameter had an invalid value", /* EAI_BADFLAGS */
- "Non-recoverable failure in name resolution", /* EAI_FAIL */
- "Address family not recognized", /* EAI_FAMILY */
- "Memory allocation failure", /* EAI_MEMORY */
- "No address associated with hostname", /* EAI_NODATA*/
- "Name does not resolve", /* EAI_NONAME */
- "Service was not recognized for socket type", /* EAI_SERVICE */
- "Intended socket type was not recognized", /* EAI_SOCKTYPE */
- "System error returned in errno", /* EAI_SYSTEM */
- "Invalid value for hints", /* EAI_BADHINTS */
- "Resolved protocol is unknown", /* EAI_PROTOCOL */
- "Argument buffer overflow" /* EAI_OVERFLOW */
+static const char *const ai_errlist[] = {
+ [0] = "Success",
+ [EAI_ADDRFAMILY] = "Address family for hostname not supported",
+ [EAI_AGAIN] = "Name could not be resolved at this time",
+ [EAI_BADFLAGS] = "Flags parameter had an invalid value",
+ [EAI_FAIL] = "Non-recoverable failure in name resolution",
+ [EAI_FAMILY] = "Address family not recognized",
+ [EAI_MEMORY] = "Memory allocation failure",
+ [EAI_NODATA] = "No address associated with hostname",
+ [EAI_NONAME] = "Name does not resolve",
+ [EAI_SERVICE] = "Service was not recognized for socket type",
+ [EAI_SOCKTYPE] = "Intended socket type was not recognized",
+ [EAI_SYSTEM] = "System error returned in errno",
+ [EAI_BADHINTS] = "Invalid value for hints",
+ [EAI_PROTOCOL] = "Resolved protocol is unknown",
+ [EAI_OVERFLOW] = "Argument buffer overflow",
};
#if defined(NLS)
@@ -72,7 +72,7 @@ static int gai_keycreated = 0;
static void
gai_keycreate(void)
{
- gai_keycreated = (thr_keycreate(&gai_key, free) == 0);
+ gai_keycreated = thr_keycreate(&gai_key, free) == 0;
}
#endif
@@ -82,7 +82,9 @@ gai_strerror(int ecode)
#if defined(NLS)
nl_catd catd;
char *buf;
+ int saved_errno;
+ saved_errno = errno;
if (thr_main() != 0)
buf = gai_buf;
else {
@@ -110,11 +112,13 @@ gai_strerror(int ecode)
strlcpy(buf, catgets(catd, 3, NL_MSGMAX, "Unknown error"),
sizeof(gai_buf));
catclose(catd);
- return buf;
+ errno = saved_errno;
+ return (buf);
thr_err:
+ errno = saved_errno;
#endif
if (ecode >= 0 && ecode < EAI_MAX)
- return ai_errlist[ecode];
- return "Unknown error";
+ return (ai_errlist[ecode]);
+ return ("Unknown error");
}
diff --git a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
index b9e34edfdea5..7722a7b755f3 100644
--- a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
+++ b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc
@@ -14,6 +14,8 @@ CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include -I${LIBC_SRCTOP}/stdlib/malloc/jema
.if ${MK_JEMALLOC_LG_VADDR_WIDE} != no
CFLAGS+=-D_USE_LG_VADDR_WIDE
.endif
+CFLAGS.gcc+=-Wno-error=missing-braces
+
.for src in ${JEMALLOCSRCS}
MISRCS+=jemalloc_${src}
diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map
index 2d80fb31652a..2e11ff963909 100644
--- a/lib/libifconfig/Symbol.map
+++ b/lib/libifconfig/Symbol.map
@@ -40,7 +40,6 @@ FBSD_1.6 {
ifconfig_open;
ifconfig_set_capability;
ifconfig_set_description;
- ifconfig_set_fib;
ifconfig_set_metric;
ifconfig_set_mtu;
ifconfig_set_name;
@@ -81,7 +80,6 @@ FBSD_1.6 {
ifconfig_sfp_fc_speed_symbol;
ifconfig_sfp_id_description;
ifconfig_sfp_id_display;
- ifconfig_sfp_id_is_qsfp;
ifconfig_sfp_id_symbol;
ifconfig_sfp_rev_description;
ifconfig_sfp_rev_symbol;
diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h
index b2f0cf9744ea..a5ce7b375830 100644
--- a/lib/libifconfig/libifconfig.h
+++ b/lib/libifconfig/libifconfig.h
@@ -171,7 +171,6 @@ int ifconfig_set_name(ifconfig_handle_t *h, const char *name,
const char *newname);
int ifconfig_get_orig_name(ifconfig_handle_t *h, const char *ifname,
char **orig_name);
-int ifconfig_set_fib(ifconfig_handle_t *h, const char *name, int fib);
int ifconfig_get_fib(ifconfig_handle_t *h, const char *name, int *fib);
int ifconfig_set_mtu(ifconfig_handle_t *h, const char *name, const int mtu);
int ifconfig_get_mtu(ifconfig_handle_t *h, const char *name, int *mtu);
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index cbd9d4677146..0037f31df04b 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -2453,7 +2453,7 @@ _pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct p
snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl);
snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags);
- for (int i = 0; i < size && i < 256; i++)
+ for (int i = 0; i < size; i++)
snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]);
if ((hdr = snl_finalize_msg(&nw)) == NULL)
@@ -2481,19 +2481,18 @@ pfctl_table_add_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pf
int ret;
int off = 0;
int partial_added;
+ int chunk_size;
do {
- ret = _pfctl_table_add_addrs_h(h, tbl, &addr[off], size - off, &partial_added, flags);
+ chunk_size = MIN(size - off, 256);
+ ret = _pfctl_table_add_addrs_h(h, tbl, &addr[off], chunk_size, &partial_added, flags);
if (ret != 0)
break;
if (nadd)
*nadd += partial_added;
- off += partial_added;
+ off += chunk_size;
} while (off < size);
- if (nadd)
- *nadd = off;
-
return (ret);
}
@@ -2521,7 +2520,7 @@ _pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct p
snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl);
snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags);
- for (int i = 0; i < size && i < 256; i++)
+ for (int i = 0; i < size; i++)
snl_add_msg_attr_pfr_addr(&nw, PF_TA_ADDR, &addrs[i]);
if ((hdr = snl_finalize_msg(&nw)) == NULL)
@@ -2572,20 +2571,19 @@ pfctl_table_del_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pf
int ret;
int off = 0;
int partial_deleted;
+ int chunk_size;
do {
- ret = _pfctl_table_del_addrs_h(h, tbl, &addr[off], size - off,
+ chunk_size = MIN(size - off, 256);
+ ret = _pfctl_table_del_addrs_h(h, tbl, &addr[off], chunk_size,
&partial_deleted, flags);
if (ret != 0)
break;
if (ndel)
*ndel += partial_deleted;
- off += partial_deleted;
+ off += chunk_size;
} while (off < size);
- if (ndel)
- *ndel = off;
-
return (ret);
}
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index eb8137f6c76f..1651cbc6820f 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -1330,8 +1330,7 @@ procstat_get_vnode_info_kvm(kvm_t *kd, struct filestat *fst,
return (1);
}
vn->vn_mntdir = getmnton(kd, vnode.v_mount);
- if ((vnode.v_type == VBLK || vnode.v_type == VCHR) &&
- vnode.v_rdev != NULL){
+ if (VTYPE_ISDEV(vnode.v_type) && vnode.v_rdev != NULL) {
vn->vn_dev = dev2udev(kd, vnode.v_rdev);
(void)kdevtoname(kd, vnode.v_rdev, vn->vn_devname);
} else {
diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2
index bd9005710147..8107740bd901 100644
--- a/lib/libsys/stat.2
+++ b/lib/libsys/stat.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 30, 2021
+.Dd August 17, 2025
.Dt STAT 2
.Os
.Sh NAME
@@ -169,6 +169,9 @@ Flags enabled for the file.
See
.Xr chflags 2
for the list of flags and their description.
+.It Va st_rdev
+Numeric ID of the device referenced by the file, if the file is a
+character or block special; otherwise unspecified.
.El
.Pp
The
diff --git a/lib/libutil/mntopts.c b/lib/libutil/mntopts.c
index 1d9347e3108a..07d3dd6d98a3 100644
--- a/lib/libutil/mntopts.c
+++ b/lib/libutil/mntopts.c
@@ -185,6 +185,7 @@ getmntpoint(const char *name)
strncpy(statfsp->f_mntfromname, device, len);
}
if (stat(ddevname, &mntdevstat) == 0 &&
+ S_ISCHR(mntdevstat.st_mode) &&
mntdevstat.st_rdev == devstat.st_rdev)
return (statfsp);
}
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index d0c6fc1dee46..7c1f50b027a9 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -215,7 +215,7 @@ FTPD= ftpd
FTPDPACKAGE= ftpd
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
CONFGROUPS+= GSSD
GSSD= gssd
GSSDPACKAGE= gssd
diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8
index f582c6301124..5a74a8fd3444 100644
--- a/sbin/pfctl/pfctl.8
+++ b/sbin/pfctl/pfctl.8
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 7, 2025
+.Dd August 5, 2025
.Dt PFCTL 8
.Os
.Sh NAME
@@ -410,6 +410,7 @@ This is the default behaviour.
.It Fl o Cm profile
Enable basic ruleset optimizations with profiling.
.El
+.Pp
For further information on the ruleset optimizer, see
.Xr pf.conf 5 .
.It Fl P
@@ -431,7 +432,7 @@ Perform reverse DNS lookups on states and tables when displaying them.
and
.Fl r
are mutually exclusive.
-.It Fl s Ar modifier
+.It Fl s Ar modifier Op Fl R Ar id
Show the filter parameters specified by
.Ar modifier
(may be abbreviated):
@@ -563,19 +564,16 @@ no free ports in translation port range
.It Fl S
Do not perform domain name resolution.
If a name cannot be resolved without DNS, an error will be reported.
-.It Fl T Ar command Op Ar address ...
+.It Fl t Ar table Fl T Ar command Op Ar address ...
Specify the
.Ar command
-(may be abbreviated) to apply to the table.
+(may be abbreviated) to apply to
+.Ar table .
Commands include:
.Pp
-.Bl -tag -width xxxxxxxxxxxx -compact
-.It Fl T Cm kill
-Kill a table.
-.It Fl T Cm flush
-Flush all addresses of a table.
+.Bl -tag -width "-T expire number" -compact
.It Fl T Cm add
-Add one or more addresses in a table.
+Add one or more addresses to a table.
Automatically create a persistent table if it does not exist.
.It Fl T Cm delete
Delete one or more addresses from a table.
@@ -586,6 +584,10 @@ seconds ago.
For entries which have never had their statistics cleared,
.Ar number
refers to the time they were added to the table.
+.It Fl T Cm flush
+Flush all addresses in a table.
+.It Fl T Cm kill
+Kill a table.
.It Fl T Cm replace
Replace the addresses of the table.
Automatically create a persistent table if it does not exist.
@@ -765,8 +767,6 @@ tables of the same name from anchors attached below it.
.It C
This flag is set when per-address counters are enabled on the table.
.El
-.It Fl t Ar table
-Specify the name of the table.
.It Fl v
Produce more verbose output.
A second use of
diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c
index 0fe9ca8813bb..398c5e998330 100644
--- a/sbin/pfctl/pfctl_radix.c
+++ b/sbin/pfctl/pfctl_radix.c
@@ -122,6 +122,9 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
{
int ret;
+ if (*nadd)
+ *nadd = 0;
+
ret = pfctl_table_add_addrs_h(pfh, tbl, addr, size, nadd, flags);
if (ret) {
errno = ret;
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index e7e491124241..7e2350fb33ea 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -1,7 +1,10 @@
SHLIBDIR?= /lib
-.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS)
+.if !defined(LIBCRYPTO_WITHOUT_SUBDIRS) && !defined(BOOTSTRAPPING)
SUBDIR= engines modules
.endif
+.ifdef BOOTSTRAPPING
+CFLAGS+= -DOPENSSL_NO_SCTP
+.endif
.include <bsd.own.mk>
.include <src.opts.mk>
diff --git a/secure/lib/libcrypto/Makefile.common b/secure/lib/libcrypto/Makefile.common
index afcc2a48660c..ad48e2b434cf 100644
--- a/secure/lib/libcrypto/Makefile.common
+++ b/secure/lib/libcrypto/Makefile.common
@@ -6,7 +6,7 @@ CFLAGS+= -DL_ENDIAN
CFLAGS+= -DB_ENDIAN
.endif
-.ifndef WITHOUT_AUTO_ASM
+.if !defined(WITHOUT_AUTO_ASM) && !defined(BOOTSTRAPPING)
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386"
ASM_${MACHINE_CPUARCH}=
diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc
index 55e1687b58cf..f0ed4a5f3651 100644
--- a/secure/lib/libcrypto/Makefile.inc
+++ b/secure/lib/libcrypto/Makefile.inc
@@ -1,8 +1,7 @@
.include <bsd.own.mk>
# OpenSSL version used for manual page generation
-OPENSSL_VER= 3.5.0
-OPENSSL_DATE= 2025-07-01
+.include "Makefile.version"
LCRYPTO_SRC= ${SRCTOP}/crypto/openssl
LCRYPTO_DOC= ${LCRYPTO_SRC}/doc
diff --git a/secure/lib/libcrypto/Makefile.version b/secure/lib/libcrypto/Makefile.version
new file mode 100644
index 000000000000..e802a1f11618
--- /dev/null
+++ b/secure/lib/libcrypto/Makefile.version
@@ -0,0 +1,2 @@
+OPENSSL_VER= 3.5.1
+OPENSSL_DATE= 2025-07-01
diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile
index 45f23c9e9ca2..682c7bbc2693 100644
--- a/secure/lib/libssl/Makefile
+++ b/secure/lib/libssl/Makefile
@@ -73,6 +73,8 @@ SRCS+= rio_notifier.c poll_builder.c
.if ${MK_OPENSSL_KTLS} == "no"
CFLAGS+=-DOPENSSL_NO_KTLS
+.else
+SRCS+= ktls_meth.c
.endif
LIBADD= crypto
diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile
index 37e099794bd5..5ed459fe492a 100644
--- a/secure/libexec/sshd-session/Makefile
+++ b/secure/libexec/sshd-session/Makefile
@@ -38,7 +38,7 @@ LIBADD+= blacklist
LDFLAGS+=-L${LIBBLACKLISTDIR}
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} != "no"
LIBADD+= gssapi_krb5 krb5
.include "../../krb5/Makefile.inc"
diff --git a/secure/ssh.mk b/secure/ssh.mk
index bb6dd9b748e4..97dd089d98e8 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -9,12 +9,11 @@ SKSRCS= ssh-sk-client.c
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
.if ${MK_MITKRB5} == "no"
CFLAGS+= -DHEIMDAL=1
.endif
-
.endif
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index a4f36d0fe2df..2b11b783c007 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -17,7 +17,7 @@ SRCS+= gss-genr.c
LIBADD= ssh
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} == "no"
LIBADD+= gssapi
.else
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index f37dfe1c1b3a..433a87984e42 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -18,7 +18,7 @@ moduli: .MADE
LIBADD= ssh util
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+.if ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} == "no"
LIBADD+= gssapi_krb5 gssapi krb5
.else
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index f93610631bb3..519b113b0a2e 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -594,6 +594,7 @@ MAN= aac.4 \
tty.4 \
tun.4 \
tws.4 \
+ u2f.4 \
udp.4 \
udplite.4 \
${_ufshci.4} \
diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4
index 0114263e6ca2..2040698f0087 100644
--- a/share/man/man4/iflib.4
+++ b/share/man/man4/iflib.4
@@ -1,4 +1,4 @@
-.Dd September 27, 2018
+.Dd August 20, 2025
.Dt IFLIB 4
.Os
.Sh NAME
@@ -64,6 +64,18 @@ If this is zero or not set, an RX and TX queue pair will be assigned to each
core.
When set to a non-zero value, TX queues are assigned to cores following the
last RX queue.
+.It Va simple_tx
+When set to one, iflib uses a simple transmit routine with no queuing at all.
+By default, iflib uses a highly optimized, lockless, transmit queue called
+mp_ring.
+This performs well when there are more CPU cores than NIC
+queues and prevents lock contention for transmit resources.
+Unfortunately, mp_ring incurs unneeded overheads on workloads where
+resource contention is not a problem (well behaved applications on
+systems where there are as many NIC queues as CPU cores).
+Note that when this is enabled, the tx_abdicate sysctl is no longer
+applicable and is ignored.
+Defaults to zero.
.El
.Pp
These
diff --git a/share/man/man4/ioat.4 b/share/man/man4/ioat.4
index deef466c0ae0..1c0e1dd49fd1 100644
--- a/share/man/man4/ioat.4
+++ b/share/man/man4/ioat.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd May 3, 2016
-.Dt IOAT 4
+.Dt IOAT 4 amd64
.Os
.Sh NAME
.Nm I/OAT
diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4
index 4a251f239a55..660f6a9bf57c 100644
--- a/share/man/man4/iwlwifi.4
+++ b/share/man/man4/iwlwifi.4
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 13, 2025
+.Dd August 19, 2025
.Dt IWLWIFI 4
.Os
.Sh NAME
@@ -331,7 +331,7 @@ driver first appeared in
802.11n and 802.11ac support for the 22000 and later chipsets first appeared in
.Fx 14.3 .
.Sh BUGS
-Certainly.
+.Lk https://bugs.freebsd.org/bugzilla/showdependencytree.cgi?id=iwlwifi "iwlwifi known bugs"
.Pp
While
.Nm
diff --git a/share/man/man4/iwx.4 b/share/man/man4/iwx.4
index 7cd54d61b920..295a5f318afa 100644
--- a/share/man/man4/iwx.4
+++ b/share/man/man4/iwx.4
@@ -18,7 +18,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 2, 2025
-.Dt IWX 4
+.Dt IWX 4 amd64
.Os
.Sh NAME
.Nm iwx
diff --git a/share/man/man4/man4.aarch64/armv8crypto.4 b/share/man/man4/man4.aarch64/armv8crypto.4
index 7b8704395daf..0f763adc5766 100644
--- a/share/man/man4/man4.aarch64/armv8crypto.4
+++ b/share/man/man4/man4.aarch64/armv8crypto.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd July 29, 2020
-.Dt ARMV8CRYPTO 4
+.Dt ARMV8CRYPTO 4 aarch64
.Os
.Sh NAME
.Nm armv8crypto
diff --git a/share/man/man4/man4.aarch64/enetc.4 b/share/man/man4/man4.aarch64/enetc.4
index 33f796347f96..e7cfcb7ebe0e 100644
--- a/share/man/man4/man4.aarch64/enetc.4
+++ b/share/man/man4/man4.aarch64/enetc.4
@@ -25,7 +25,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd June 11, 2021
-.Dt ENETC 4
+.Dt ENETC 4 aarch64
.Os
.Sh NAME
.Nm enetc
diff --git a/share/man/man4/man4.aarch64/felix.4 b/share/man/man4/man4.aarch64/felix.4
index 15caef6d274f..b97f3c2168e8 100644
--- a/share/man/man4/man4.aarch64/felix.4
+++ b/share/man/man4/man4.aarch64/felix.4
@@ -26,7 +26,7 @@
.\" SUCH DAMAGE.
.\"
.Dd June 21, 2021
-.Dt FELIX 4
+.Dt FELIX 4 aarch64
.Os
.Sh NAME
.Nm felix
diff --git a/share/man/man4/man4.aarch64/rk_gpio.4 b/share/man/man4/man4.aarch64/rk_gpio.4
index b5648662cf5e..b2767dd66dce 100644
--- a/share/man/man4/man4.aarch64/rk_gpio.4
+++ b/share/man/man4/man4.aarch64/rk_gpio.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd Apr 26, 2018
-.Dt RK_GPIO 4
+.Dt RK_GPIO 4 aarch64
.Os
.Sh NAME
.Nm rk_gpio
diff --git a/share/man/man4/man4.aarch64/rk_grf.4 b/share/man/man4/man4.aarch64/rk_grf.4
index 64ed468c1983..b01a93091ecb 100644
--- a/share/man/man4/man4.aarch64/rk_grf.4
+++ b/share/man/man4/man4.aarch64/rk_grf.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd Apr 26, 2018
-.Dt RK_GRF 4
+.Dt RK_GRF 4 aarch64
.Os
.Sh NAME
.Nm rk_grf
diff --git a/share/man/man4/man4.aarch64/rk_grf_gpio.4 b/share/man/man4/man4.aarch64/rk_grf_gpio.4
index 6a5ebbe19e3b..2bfbebce1b76 100644
--- a/share/man/man4/man4.aarch64/rk_grf_gpio.4
+++ b/share/man/man4/man4.aarch64/rk_grf_gpio.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.Dd March 18, 2025
-.Dt RK_GRF_GPIO 4
+.Dt RK_GRF_GPIO 4 aarch64
.Os
.Sh NAME
.Nm rk_grf_gpio
diff --git a/share/man/man4/man4.aarch64/rk_i2c.4 b/share/man/man4/man4.aarch64/rk_i2c.4
index be1a0fab943e..363cdeac7f72 100644
--- a/share/man/man4/man4.aarch64/rk_i2c.4
+++ b/share/man/man4/man4.aarch64/rk_i2c.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd June 14, 2018
-.Dt RK_I2C 4
+.Dt RK_I2C 4 aarch64
.Os
.Sh NAME
.Nm rk_i2c
diff --git a/share/man/man4/man4.aarch64/rk_pinctrl.4 b/share/man/man4/man4.aarch64/rk_pinctrl.4
index 519b3e793cd1..2be5f363498d 100644
--- a/share/man/man4/man4.aarch64/rk_pinctrl.4
+++ b/share/man/man4/man4.aarch64/rk_pinctrl.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd Apr 26, 2018
-.Dt RK_PINCTRL 4
+.Dt RK_PINCTRL 4 aarch64
.Os
.Sh NAME
.Nm rk_pinctrl
diff --git a/share/man/man4/man4.arm/am335x_dmtpps.4 b/share/man/man4/man4.arm/am335x_dmtpps.4
index d565c65e2cf1..bec5ff7726a0 100644
--- a/share/man/man4/man4.arm/am335x_dmtpps.4
+++ b/share/man/man4/man4.arm/am335x_dmtpps.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 12, 2015
-.Dt AM335X_DMTPPS 4
+.Dt AM335X_DMTPPS 4 arm
.Os
.Sh NAME
.Nm am335x_dmtpps
diff --git a/share/man/man4/man4.arm/aw_gpio.4 b/share/man/man4/man4.arm/aw_gpio.4
index 5cbc7562d9bd..ef9fc1fe2733 100644
--- a/share/man/man4/man4.arm/aw_gpio.4
+++ b/share/man/man4/man4.arm/aw_gpio.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd October 8, 2024
-.Dt AW_GPIO 4
+.Dt AW_GPIO 4 arm
.Os
.Sh NAME
.Nm aw_gpio
diff --git a/share/man/man4/man4.arm/aw_mmc.4 b/share/man/man4/man4.arm/aw_mmc.4
index eb7fc9ce020a..e3f961fa5067 100644
--- a/share/man/man4/man4.arm/aw_mmc.4
+++ b/share/man/man4/man4.arm/aw_mmc.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd Dec 25, 2017
-.Dt AW_MMC 4
+.Dt AW_MMC 4 arm
.Os
.Sh NAME
.Nm aw_mmc
diff --git a/share/man/man4/man4.arm/aw_rtc.4 b/share/man/man4/man4.arm/aw_rtc.4
index 1296cd41da68..87212d85116c 100644
--- a/share/man/man4/man4.arm/aw_rtc.4
+++ b/share/man/man4/man4.arm/aw_rtc.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd December 10, 2024
-.Dt AW_RTC 4
+.Dt AW_RTC 4 arm
.Os
.Sh NAME
.Nm aw_rtc
diff --git a/share/man/man4/man4.arm/aw_sid.4 b/share/man/man4/man4.arm/aw_sid.4
index 5cd2f3d5e072..8b3691259f22 100644
--- a/share/man/man4/man4.arm/aw_sid.4
+++ b/share/man/man4/man4.arm/aw_sid.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd October 8, 2024
-.Dt AW_SID 4
+.Dt AW_SID 4 arm
.Os
.Sh NAME
.Nm aw_sid
diff --git a/share/man/man4/man4.arm/aw_spi.4 b/share/man/man4/man4.arm/aw_spi.4
index f8985e1c16bb..d0566a45b54b 100644
--- a/share/man/man4/man4.arm/aw_spi.4
+++ b/share/man/man4/man4.arm/aw_spi.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd May 17, 2018
-.Dt AW_SPI 4
+.Dt AW_SPI 4 arm
.Os
.Sh NAME
.Nm aw_spi
diff --git a/share/man/man4/man4.arm/aw_syscon.4 b/share/man/man4/man4.arm/aw_syscon.4
index e32f329e489a..97f01196a8a6 100644
--- a/share/man/man4/man4.arm/aw_syscon.4
+++ b/share/man/man4/man4.arm/aw_syscon.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd November 11, 2024
-.Dt AW_SYSCON 4
+.Dt AW_SYSCON 4 arm
.Os
.Sh NAME
.Nm aw_syscon
diff --git a/share/man/man4/man4.arm/bcm283x_pwm.4 b/share/man/man4/man4.arm/bcm283x_pwm.4
index 1fb5a830ace7..71d7f0cc3cca 100644
--- a/share/man/man4/man4.arm/bcm283x_pwm.4
+++ b/share/man/man4/man4.arm/bcm283x_pwm.4
@@ -25,7 +25,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 10, 2018
-.Dt BCM283X_PWM 4
+.Dt BCM283X_PWM 4 arm
.Os
.Sh NAME
.Nm bcm283x_pwm
diff --git a/share/man/man4/man4.arm/devcfg.4 b/share/man/man4/man4.arm/devcfg.4
index ddf368a85f24..cbc205814c69 100644
--- a/share/man/man4/man4.arm/devcfg.4
+++ b/share/man/man4/man4.arm/devcfg.4
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.Dd February 28, 2013
-.Dt DEVCFG 4
+.Dt DEVCFG 4 arm
.Os
.Sh NAME
.Nm devcfg
diff --git a/share/man/man4/man4.arm/imx6_ahci.4 b/share/man/man4/man4.arm/imx6_ahci.4
index 9979cef50d79..50689e323db8 100644
--- a/share/man/man4/man4.arm/imx6_ahci.4
+++ b/share/man/man4/man4.arm/imx6_ahci.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 7, 2018
-.Dt IMX6_AHCI 4
+.Dt IMX6_AHCI 4 arm
.Os
.Sh NAME
.Nm imx6_ahci
diff --git a/share/man/man4/man4.arm/imx6_snvs.4 b/share/man/man4/man4.arm/imx6_snvs.4
index b36c3ddd91c1..2c1db97b231c 100644
--- a/share/man/man4/man4.arm/imx6_snvs.4
+++ b/share/man/man4/man4.arm/imx6_snvs.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 8, 2018
-.Dt IMX6_SNVS 4
+.Dt IMX6_SNVS 4 arm
.Os
.Sh NAME
.Nm imx6_snvs
diff --git a/share/man/man4/man4.arm/imx_spi.4 b/share/man/man4/man4.arm/imx_spi.4
index e7555ed20d94..54a5339e3276 100644
--- a/share/man/man4/man4.arm/imx_spi.4
+++ b/share/man/man4/man4.arm/imx_spi.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 9, 2018
-.Dt IMX_SPI 4
+.Dt IMX_SPI 4 arm
.Os
.Sh NAME
.Nm imx_spi
diff --git a/share/man/man4/man4.arm/imx_wdog.4 b/share/man/man4/man4.arm/imx_wdog.4
index 4b993e1d066b..cb4d0e13865b 100644
--- a/share/man/man4/man4.arm/imx_wdog.4
+++ b/share/man/man4/man4.arm/imx_wdog.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 7, 2018
-.Dt IMX_WDOG 4
+.Dt IMX_WDOG 4 arm
.Os
.Sh NAME
.Nm imx_wdog
diff --git a/share/man/man4/man4.arm/mge.4 b/share/man/man4/man4.arm/mge.4
index e949b36f4307..cba9327eadcf 100644
--- a/share/man/man4/man4.arm/mge.4
+++ b/share/man/man4/man4.arm/mge.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 27, 2008
-.Dt MGE 4
+.Dt MGE 4 arm
.Os
.Sh NAME
.Nm mge
diff --git a/share/man/man4/man4.arm/ti_adc.4 b/share/man/man4/man4.arm/ti_adc.4
index d71547231e4c..fb59e1d3e57c 100644
--- a/share/man/man4/man4.arm/ti_adc.4
+++ b/share/man/man4/man4.arm/ti_adc.4
@@ -23,7 +23,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd June 1, 2014
-.Dt TI_ADC 4
+.Dt TI_ADC 4 arm
.Os
.Sh NAME
.Nm ti_adc
diff --git a/share/man/man4/man4.powerpc/abtn.4 b/share/man/man4/man4.powerpc/abtn.4
index 92d643d5cf32..7421d0a0b5a6 100644
--- a/share/man/man4/man4.powerpc/abtn.4
+++ b/share/man/man4/man4.powerpc/abtn.4
@@ -25,7 +25,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 16, 2011
-.Dt ABTN 4
+.Dt ABTN 4 powerpc
.Os
.Sh NAME
.Nm abtn
diff --git a/share/man/man4/man4.powerpc/adb.4 b/share/man/man4/man4.powerpc/adb.4
index a781787995ab..6041484b5e33 100644
--- a/share/man/man4/man4.powerpc/adb.4
+++ b/share/man/man4/man4.powerpc/adb.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 3, 2009
-.Dt ADB 4
+.Dt ADB 4 powerpc
.Os
.Sh NAME
.Nm adb
diff --git a/share/man/man4/man4.powerpc/akbd.4 b/share/man/man4/man4.powerpc/akbd.4
index 44af08961122..3406f5a1aa76 100644
--- a/share/man/man4/man4.powerpc/akbd.4
+++ b/share/man/man4/man4.powerpc/akbd.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 3, 2009
-.Dt AKBD 4
+.Dt AKBD 4 powerpc
.Os
.Sh NAME
.Nm akbd
diff --git a/share/man/man4/man4.powerpc/ams.4 b/share/man/man4/man4.powerpc/ams.4
index 21be3c098920..d7fa922e7307 100644
--- a/share/man/man4/man4.powerpc/ams.4
+++ b/share/man/man4/man4.powerpc/ams.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 3, 2009
-.Dt AMS 4
+.Dt AMS 4 powerpc
.Os
.Sh NAME
.Nm ams
diff --git a/share/man/man4/man4.powerpc/cuda.4 b/share/man/man4/man4.powerpc/cuda.4
index 7171ebb42373..a52b9a447c9d 100644
--- a/share/man/man4/man4.powerpc/cuda.4
+++ b/share/man/man4/man4.powerpc/cuda.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 3, 2009
-.Dt CUDA 4
+.Dt CUDA 4 powerpc
.Os
.Sh NAME
.Nm cuda
diff --git a/share/man/man4/man4.powerpc/dtsec.4 b/share/man/man4/man4.powerpc/dtsec.4
index 4a60dd0b8824..f18de90c4757 100644
--- a/share/man/man4/man4.powerpc/dtsec.4
+++ b/share/man/man4/man4.powerpc/dtsec.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 31, 2017
-.Dt DTSEC 4
+.Dt DTSEC 4 powerpc
.Os
.Sh NAME
.Nm dtsec
diff --git a/share/man/man4/man4.powerpc/llan.4 b/share/man/man4/man4.powerpc/llan.4
index c32ddbca6a00..b78109cac626 100644
--- a/share/man/man4/man4.powerpc/llan.4
+++ b/share/man/man4/man4.powerpc/llan.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 19, 2015
-.Dt LLAN 4
+.Dt LLAN 4 powerpc
.Os
.Sh NAME
.Nm llan
diff --git a/share/man/man4/man4.powerpc/pmu.4 b/share/man/man4/man4.powerpc/pmu.4
index 6eac20cfa6b7..4dfb31f175bd 100644
--- a/share/man/man4/man4.powerpc/pmu.4
+++ b/share/man/man4/man4.powerpc/pmu.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 6, 2008
-.Dt PMU 4
+.Dt PMU 4 powerpc
.Os
.Sh NAME
.Nm pmu
diff --git a/share/man/man4/man4.powerpc/smu.4 b/share/man/man4/man4.powerpc/smu.4
index ef2654746e62..852a08abaa9e 100644
--- a/share/man/man4/man4.powerpc/smu.4
+++ b/share/man/man4/man4.powerpc/smu.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 22, 2010
-.Dt SMU 4
+.Dt SMU 4 powerpc
.Os
.Sh NAME
.Nm smu
diff --git a/share/man/man4/man4.powerpc/snd_ai2s.4 b/share/man/man4/man4.powerpc/snd_ai2s.4
index 3880751e65c9..7a3cd9cb94af 100644
--- a/share/man/man4/man4.powerpc/snd_ai2s.4
+++ b/share/man/man4/man4.powerpc/snd_ai2s.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 20, 2009
-.Dt SND_AI2S 4
+.Dt SND_AI2S 4 powerpc
.Os
.Sh NAME
.Nm snd_ai2s
diff --git a/share/man/man4/man4.powerpc/snd_davbus.4 b/share/man/man4/man4.powerpc/snd_davbus.4
index 6958ebd4b4b5..028225accf52 100644
--- a/share/man/man4/man4.powerpc/snd_davbus.4
+++ b/share/man/man4/man4.powerpc/snd_davbus.4
@@ -24,7 +24,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 20, 2009
-.Dt SND_DAVBUS 4
+.Dt SND_DAVBUS 4 powerpc
.Os
.Sh NAME
.Nm snd_davbus
diff --git a/share/man/man4/man4.powerpc/tsec.4 b/share/man/man4/man4.powerpc/tsec.4
index b3ccae648ab8..09510e329ff0 100644
--- a/share/man/man4/man4.powerpc/tsec.4
+++ b/share/man/man4/man4.powerpc/tsec.4
@@ -24,7 +24,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 20, 2015
-.Dt TSEC 4
+.Dt TSEC 4 powerpc
.Os
.Sh NAME
.Nm tsec
diff --git a/share/man/man4/nvdimm.4 b/share/man/man4/nvdimm.4
index 5b7dbe435c46..2bec51b42d72 100644
--- a/share/man/man4/nvdimm.4
+++ b/share/man/man4/nvdimm.4
@@ -26,7 +26,7 @@
.\" SUCH DAMAGE.
.\"
.Dd September 5, 2019
-.Dt NVDIMM 4
+.Dt NVDIMM 4 amd64
.Os
.Sh NAME
.Nm nvdimm
diff --git a/share/man/man4/qlnxe.4 b/share/man/man4/qlnxe.4
index f545235ec1ff..70bad789add1 100644
--- a/share/man/man4/qlnxe.4
+++ b/share/man/man4/qlnxe.4
@@ -24,7 +24,7 @@
.\" SUCH DAMAGE.
.\"
.Dd May 9, 2017
-.Dt QLNXE 4
+.Dt QLNXE 4 amd64
.Os
.Sh NAME
.Nm qlnxe
diff --git a/share/man/man4/qlxgb.4 b/share/man/man4/qlxgb.4
index 4bf8000d15da..cc97cd060a3f 100644
--- a/share/man/man4/qlxgb.4
+++ b/share/man/man4/qlxgb.4
@@ -24,7 +24,7 @@
.\" SUCH DAMAGE.
.\"
.Dd November 3, 2011
-.Dt QLXGB 4
+.Dt QLXGB 4 amd64
.Os
.Sh NAME
.Nm qlxgb
diff --git a/share/man/man4/qlxgbe.4 b/share/man/man4/qlxgbe.4
index 486a5ec0f682..465e4fc018ad 100644
--- a/share/man/man4/qlxgbe.4
+++ b/share/man/man4/qlxgbe.4
@@ -24,7 +24,7 @@
.\" SUCH DAMAGE.
.\"
.Dd April 1, 2013
-.Dt QLXGBE 4
+.Dt QLXGBE 4 amd64
.Os
.Sh NAME
.Nm qlxgbe
diff --git a/share/man/man4/qlxge.4 b/share/man/man4/qlxge.4
index 4723c56ff68b..14a1e1284fab 100644
--- a/share/man/man4/qlxge.4
+++ b/share/man/man4/qlxge.4
@@ -24,7 +24,7 @@
.\" SUCH DAMAGE.
.\"
.Dd June 21, 2013
-.Dt QLXGE 4
+.Dt QLXGE 4 amd64
.Os
.Sh NAME
.Nm qlxge
diff --git a/share/man/man4/sfxge.4 b/share/man/man4/sfxge.4
index a9724074581e..ea35cf3e573c 100644
--- a/share/man/man4/sfxge.4
+++ b/share/man/man4/sfxge.4
@@ -27,7 +27,7 @@
.\" policies, either expressed or implied, of the FreeBSD Project.
.\"
.Dd February 22, 2015
-.Dt SFXGE 4
+.Dt SFXGE 4 amd64
.Os
.Sh NAME
.Nm sfxge
diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4
index 5b7ea923e13e..f5fab85d13bd 100644
--- a/share/man/man4/smartpqi.4
+++ b/share/man/man4/smartpqi.4
@@ -25,7 +25,7 @@
.\" SUCH DAMAGE.
.\"
.Dd August 24, 2023
-.Dt SMARTPQI 4
+.Dt SMARTPQI 4 amd64
.Os
.Sh NAME
.Nm smartpqi
diff --git a/share/man/man4/sume.4 b/share/man/man4/sume.4
index 219328a4f4c4..b36f924875e6 100644
--- a/share/man/man4/sume.4
+++ b/share/man/man4/sume.4
@@ -25,7 +25,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 30, 2020
-.Dt SUME 4
+.Dt SUME 4 amd64
.Os
.Sh NAME
.Nm sume
diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4
index 95a681a923d2..a4fe98cdfecf 100644
--- a/share/man/man4/tap.4
+++ b/share/man/man4/tap.4
@@ -203,6 +203,21 @@ The argument should be a pointer to a
The interface name will be returned in the
.Va ifr_name
field.
+.It Dv TAPSTRANSIENT
+The argument should be a pointer to an
+.Va int ;
+this sets the transient flag on
+the
+.Nm
+device.
+A transient
+.Nm
+will be destroyed upon last close.
+.It Dv TAPGTRANSIENT
+The argument should be a pointer to an
+.Va int ;
+this stores the current state (enabled or disabled) of the transient flag into
+it.
.It Dv FIONBIO
Turn non-blocking I/O for reads off or on, according as the argument
.Va int Ns 's
diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4
index 58f67cb20acb..1c5bd35f0ab8 100644
--- a/share/man/man4/tun.4
+++ b/share/man/man4/tun.4
@@ -282,6 +282,21 @@ The argument should be a pointer to an
the ioctl sets the value to one if the device is in
.Dq multi-af
mode, and zero otherwise.
+.It Dv TUNSTRANSIENT
+The argument should be a pointer to an
+.Va int ;
+this sets the transient flag on
+the
+.Nm
+device.
+A transient
+.Nm
+will be destroyed upon last close.
+.It Dv TUNGTRANSIENT
+The argument should be a pointer to an
+.Va int ;
+this stores the current state (enabled or disabled) of the transient flag into
+it.
.It Dv FIONBIO
Turn non-blocking I/O for reads off or on, according as the argument
.Vt int Ns 's
diff --git a/share/man/man4/u2f.4 b/share/man/man4/u2f.4
new file mode 100644
index 000000000000..4c51e140242e
--- /dev/null
+++ b/share/man/man4/u2f.4
@@ -0,0 +1,96 @@
+.\"
+.\" SPDX-License-Identifier: ISC
+.\"
+.\" $OpenBSD: fido.4,v 1.4 2020/08/21 19:02:46 mglocker Exp $
+.\"
+.\" Copyright (c) 2019 Reyk Floeter <reyk@openbsd.org>
+.\" Copyright (c) 2023 Vladimir Kondratyev <wulf@FreeBSD.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd August 21, 2023
+.Dt U2F 4
+.Os
+.Sh NAME
+.Nm u2f
+.Nd FIDO/U2F USB security keys
+.Sh SYNOPSIS
+.Cd "device u2f"
+.Pp
+In
+.Xr loader.conf 5 :
+.Cd u2f_load="YES"
+.Pp
+In
+.Xr sysctl.conf 5 :
+.Cd hw.hid.u2f.debug
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for FIDO/U2F-compatible USB security keys.
+They are Human Interface Devices (HID) which can be accessed via the
+.Pa /dev/u2f/N
+interface.
+.Pp
+The driver is compatible with the
+.Xr read 2 ,
+.Xr write 2 ,
+and
+.Xr ioctl 2
+operations of the generic
+.Xr uhid 4
+device but only accepts the optional HID
+.Xr ioctl 2
+calls from u2f group users.
+.Sh HARDWARE
+The
+.Nm
+driver supports FIDO/U2F-compatible USB security keys.
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va hw.hid.u2f.debug
+Debug output level, where 0 is debugging disabled and larger values increase
+debug message verbosity.
+Default is 0.
+.El
+.Sh FILES
+.Bl -tag -width /dev/u2f/* -compact
+.It Pa /dev/u2f/*
+.El
+.Sh SEE ALSO
+.Xr uhid 4 ,
+.Xr usbhid 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 15.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org
+based on the
+.Ox
+.Xr fido 4
+manual page.
diff --git a/share/man/man4/umb.4 b/share/man/man4/umb.4
index 7ecc9a39c1ca..311a50faf8e7 100644
--- a/share/man/man4/umb.4
+++ b/share/man/man4/umb.4
@@ -17,34 +17,34 @@
.\"
.\" $NetBSD: umb.4,v 1.4 2019/08/30 09:22:17 wiz Exp $
.\"
-.Dd May 11, 2025
+.Dd August 4, 2025
.Dt UMB 4
.Os
.Sh NAME
.Nm umb
.Nd USB Mobile Broadband Interface Model (MBIM) cellular modem driver
.Sh SYNOPSIS
-To compile this driver into the kernel,
-place the following lines in your
-kernel configuration file:
-.Bd -ragged -offset indent
+.Cd "device netmap"
.Cd "device usb"
.Cd "device umb"
-.Ed
.Pp
-Alternatively, to load the driver as a
-module at boot time, place the following line in
+In
.Xr loader.conf 5 :
-.Bd -literal -offset indent
-umb_load="YES"
-.Ed
-.Pp
-If neither of the above is done, the driver will automatically be loaded
-by devd(8) when the device is connected.
+.Cd umb_load="YES"
.Sh DESCRIPTION
The
.Nm
driver provides support for USB MBIM devices.
+If the appropriate hardware is detected,
+the driver will be loaded automatically by
+.Xr devmatch 8 .
+To load the driver manually,
+.Cm load
+it in
+.Xr loader.conf 5
+or at the
+.Xr loader 8
+prompt.
.Pp
MBIM devices establish connections via cellular networks such as
GPRS, UMTS, and LTE.
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
index 2e694bfe3293..2895c0cf4746 100644
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
-.Dd August 8, 2025
+.Dd August 20, 2025
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -411,8 +411,11 @@ Build clang-format.
.It Va WITHOUT_CLANG_FULL
Avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of
the Clang C/C++ compiler.
-.It Va WITHOUT_CLEAN
-Do not clean before building world and/or kernel.
+.It Va WITH_CLEAN
+Clean before building world and/or kernel.
+Note that recording a new epoch in
+.Pa .clean_build_epoch
+in the root of the source tree will also force a clean world build.
.It Va WITHOUT_CPP
Do not build
.Xr cpp 1 .
@@ -449,8 +452,6 @@ When set, it enforces these options:
.It
.Va WITHOUT_KERBEROS
.It
-.Va WITHOUT_KERBEROS_SUPPORT
-.It
.Va WITHOUT_LDNS
.It
.Va WITHOUT_LDNS_UTILS
@@ -477,9 +478,9 @@ When set, it enforces these options:
When set, these options are also in effect:
.Pp
.Bl -inset -compact
-.It Va WITHOUT_GSSAPI
+.It Va WITHOUT_KERBEROS_SUPPORT
(unless
-.Va WITH_GSSAPI
+.Va WITH_KERBEROS_SUPPORT
is set explicitly)
.El
.It Va WITH_CTF
@@ -736,8 +737,6 @@ and dependent tests.
Do not build
.Xr gpioctl 8
as part of the base system.
-.It Va WITHOUT_GSSAPI
-Do not build libgssapi.
.It Va WITHOUT_HAST
Do not build
.Xr hastd 8
@@ -837,14 +836,10 @@ Do not build
and
.Xr truss 1 .
.It Va WITHOUT_KERBEROS
-Set this to not build Kerberos 5 (KTH Heimdal).
+Set this to not build Kerberos.
When set, these options are also in effect:
.Pp
.Bl -inset -compact
-.It Va WITHOUT_GSSAPI
-(unless
-.Va WITH_GSSAPI
-is set explicitly)
.It Va WITHOUT_KERBEROS_SUPPORT
(unless
.Va WITH_KERBEROS_SUPPORT
@@ -1430,8 +1425,6 @@ When set, it enforces these options:
.It
.Va WITHOUT_KERBEROS
.It
-.Va WITHOUT_KERBEROS_SUPPORT
-.It
.Va WITHOUT_LDNS
.It
.Va WITHOUT_LDNS_UTILS
@@ -1456,9 +1449,9 @@ When set, it enforces these options:
When set, these options are also in effect:
.Pp
.Bl -inset -compact
-.It Va WITHOUT_GSSAPI
+.It Va WITHOUT_KERBEROS_SUPPORT
(unless
-.Va WITH_GSSAPI
+.Va WITH_KERBEROS_SUPPORT
is set explicitly)
.El
.It Va WITHOUT_OPENSSL_KTLS
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index 1c69b911f53b..814f5b769be8 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 10, 2024
+.Dd August 18, 2025
.Dt HIER 7
.Os
.Sh NAME
@@ -308,6 +308,21 @@ OpenSSH configuration files; see
.Xr ssh 1
.It Pa ssl/
OpenSSL configuration files
+.Pp
+.Bl -tag -width "untrusted/" -compact
+.It Pa cert.pem
+System trust store in bundle form; see
+.Xr certctl 8 .
+.It Pa certs/
+System trust store in OpenSSL hashed-directory form; see
+.Xr certctl 8 .
+.It Pa openssl.cnf
+OpenSSL configuration file; see
+.Xr openssl.cnf 5 .
+.It Pa untrusted/
+Explicitly distrusted certificates; see
+.Xr certctl 8 .
+.El
.It Pa sysctl.conf
kernel state defaults; see
.Xr sysctl.conf 5
diff --git a/share/mk/Makefile b/share/mk/Makefile
index 4ab5c8cc314b..0e786b381fe2 100644
--- a/share/mk/Makefile
+++ b/share/mk/Makefile
@@ -22,6 +22,7 @@ FILES= \
bsd.confs.mk \
bsd.cpu.mk \
bsd.crunchgen.mk \
+ bsd.debug.mk \
bsd.dep.mk \
bsd.dirs.mk \
bsd.doc.mk \
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index 4820bf12c72d..89ee8527895e 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -20,6 +20,7 @@ bsd.compiler.mk - defined based on current compiler
bsd.confs.mk - install of configuration files
bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk)
bsd.crunchgen.mk - building crunched binaries using crunchgen(1)
+bsd.debug.mk - handling debug options for bsd.{prog,lib}.mk
bsd.dep.mk - handle Makefile dependencies
bsd.dirs.mk - handle directory creation
bsd.doc.mk - building troff system documents
diff --git a/share/mk/bsd.debug.mk b/share/mk/bsd.debug.mk
new file mode 100644
index 000000000000..cf2fb4356aef
--- /dev/null
+++ b/share/mk/bsd.debug.mk
@@ -0,0 +1,68 @@
+#
+# This file configures debug options for compiled targets. It is meant
+# to consolidate common logic in bsd.prog.mk and bsd.lib.mk. It should
+# not be included directly by Makefiles.
+#
+
+.include <bsd.opts.mk>
+
+.if ${MK_ASSERT_DEBUG} == "no"
+CFLAGS+= -DNDEBUG
+# XXX: shouldn't we ensure that !asserts marks potentially unused variables as
+# __unused instead of disabling -Werror globally?
+MK_WERROR= no
+.endif
+
+# If reproducible build mode is enabled, map the root of the source
+# directory to /usr/src and the root of the object directory to
+# /usr/obj.
+.if ${MK_REPRODUCIBLE_BUILD} != "no" && !defined(DEBUG_PREFIX)
+.if defined(SRCTOP)
+DEBUG_PREFIX+= ${SRCTOP:S,/$,,}=/usr/src
+.endif
+.if defined(OBJROOT)
+# Strip off compat subdirectories, e.g., /usr/obj/usr/src/amd64.amd64/obj-lib32
+# becomes /usr/obj/usr/src/amd64.amd64, since object files compiled there might
+# refer to something outside the root.
+DEBUG_PREFIX+= ${OBJROOT:S,/$,,:C,/obj-[^/]*$,,}=/usr/obj
+.endif
+.endif
+
+.if defined(DEBUG_PREFIX)
+.for map in ${DEBUG_PREFIX}
+CFLAGS+= -ffile-prefix-map=${map}
+CXXFLAGS+= -ffile-prefix-map=${map}
+.endfor
+.endif
+
+.if defined(DEBUG_FLAGS)
+CFLAGS+=${DEBUG_FLAGS}
+CXXFLAGS+=${DEBUG_FLAGS}
+
+.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
+CTFFLAGS+= -g
+.endif
+.else
+STRIP?= -s
+.endif
+
+.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
+ empty(DEBUG_FLAGS:M-gdwarf*)
+.if !${COMPILER_FEATURES:Mcompressed-debug}
+CFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*}
+CXXFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*}
+.else
+CFLAGS+= ${DEBUG_FILES_CFLAGS}
+CXXFLAGS+= ${DEBUG_FILES_CFLAGS}
+.endif
+CTFFLAGS+= -g
+.endif
+
+_debuginstall:
+.if ${MK_DEBUG_FILES} != "no" && defined(DEBUGFILE)
+.if defined(DEBUGMKDIR)
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/
+.endif
+ ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \
+ ${DEBUGFILE} ${DESTDIR}${DEBUGFILEDIR}/${DEBUGFILE}
+.endif
diff --git a/share/mk/bsd.endian.mk b/share/mk/bsd.endian.mk
index ba662ffc7439..24da57954b5a 100644
--- a/share/mk/bsd.endian.mk
+++ b/share/mk/bsd.endian.mk
@@ -20,10 +20,17 @@ LOCALEDEF_ENDIAN= -b
#
# During bootstrapping on !FreeBSD OSes, we need to define some value. Short of
# having an exhaustive list for all variants of Linux and MacOS we simply do not
-# set TARGET_ENDIANNESS and poison the other variables. They should be unused
-# during the bootstrap phases (apart from one place that's adequately protected
-# in bsd.compiler.mk) where we're building the bootstrap tools.
+# set TARGET_ENDIANNESS (on Linux) and poison the other variables. They should
+# be unused during the bootstrap phases (apart from one place that's adequately
+# protected in bsd.compiler.mk) where we're building the bootstrap tools.
#
+.if ${.MAKE.OS} == "Darwin"
+# We do assume the endianness on macOS because Apple's modern hardware is all
+# little-endian. This might need revisited in the far future, but for the time
+# being Apple Silicon's reign of terror continues. We only set this one up
+# because libcrypto is now built in bootstrap.
+TARGET_ENDIANNESS= 1234
+.endif
CAP_MKDB_ENDIAN= -B # Poisoned value, invalid flags for both cap_mkdb
LOCALEDEF_ENDIAN= -B # and localedef.
.endif
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 3013f32c2b36..fa851984df91 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,3 @@
-
.include <bsd.init.mk>
.include <bsd.compiler.mk>
.include <bsd.linker.mk>
@@ -45,23 +44,6 @@ SONAME?= ${SHLIB_NAME}
CFLAGS+= ${CRUNCH_CFLAGS}
.endif
-.if ${MK_ASSERT_DEBUG} == "no"
-CFLAGS+= -DNDEBUG
-# XXX: shouldn't we ensure that !asserts marks potentially unused variables as
-# __unused instead of disabling -Werror globally?
-MK_WERROR= no
-.endif
-
-.if defined(DEBUG_FLAGS)
-CFLAGS+= ${DEBUG_FLAGS}
-
-.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
-CTFFLAGS+= -g
-.endif
-.else
-STRIP?= -s
-.endif
-
.for _libcompat in ${_ALL_libcompats}
.if ${SHLIBDIR:M*/lib${_libcompat}} || ${SHLIBDIR:M*/lib${_libcompat}/*}
TAGS+= lib${_libcompat}
@@ -130,18 +112,6 @@ CXXFLAGS+= -fzero-call-used-regs=${ZEROREG_TYPE}
# bsd.sanitizer.mk is not installed, so don't require it (e.g. for ports).
.sinclude "bsd.sanitizer.mk"
-.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
- empty(DEBUG_FLAGS:M-gdwarf*)
-.if !${COMPILER_FEATURES:Mcompressed-debug}
-CFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*}
-CXXFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*}
-.else
-CFLAGS+= ${DEBUG_FILES_CFLAGS}
-CXXFLAGS+= ${DEBUG_FILES_CFLAGS}
-.endif
-CTFFLAGS+= -g
-.endif
-
.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == ""
CFLAGS += -mno-relax
.endif
@@ -156,6 +126,7 @@ _SHLIBDIR:=${SHLIBDIR}
.if defined(SHLIB_NAME)
.if ${MK_DEBUG_FILES} != "no"
SHLIB_NAME_FULL=${SHLIB_NAME}.full
+DEBUGFILE= ${SHLIB_NAME}.debug
# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
.if ${_SHLIBDIR} == "/boot" ||\
${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
@@ -272,16 +243,16 @@ ${SHLIB_NAME_FULL}: ${SOBJS}
.endif
.if ${MK_DEBUG_FILES} != "no"
-CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
-${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
- ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \
+CLEANFILES+= ${SHLIB_NAME_FULL} ${DEBUGFILE}
+${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${DEBUGFILE}
+ ${OBJCOPY} --strip-debug --add-gnu-debuglink=${DEBUGFILE} \
${SHLIB_NAME_FULL} ${.TARGET}
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
# Note: This uses ln instead of ${INSTALL_LIBSYMLINK} since we are in OBJDIR
@${LN:Uln} -fs ${SHLIB_NAME} ${SHLIB_LINK}
.endif
-${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL}
+${DEBUGFILE}: ${SHLIB_NAME_FULL}
${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET}
.endif
.endif #defined(SHLIB_NAME)
@@ -392,8 +363,8 @@ installpcfiles-${pcfile}: ${pcfile}
installpcfiles: .PHONY
.if !defined(INTERNALLIB)
-realinstall: _libinstall installpcfiles
-.ORDER: beforeinstall _libinstall
+realinstall: _libinstall installpcfiles _debuginstall
+.ORDER: beforeinstall _libinstall _debuginstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
@@ -403,14 +374,6 @@ _libinstall:
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
-.if ${MK_DEBUG_FILES} != "no"
-.if defined(DEBUGMKDIR)
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/
-.endif
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
- ${_INSTALLFLAGS} \
- ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/
-.endif
.if defined(SHLIB_LINK)
.if commands(${SHLIB_LINK:R}.ld)
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
@@ -501,6 +464,7 @@ SUBDIR_TARGETS+= check
TESTS_LD_LIBRARY_PATH+= ${.OBJDIR}
.endif
+.include <bsd.debug.mk>
.include <bsd.dep.mk>
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk
index 85247d733a14..439924d0d596 100644
--- a/share/mk/bsd.opts.mk
+++ b/share/mk/bsd.opts.mk
@@ -78,6 +78,7 @@ __DEFAULT_NO_OPTIONS = \
CCACHE_BUILD \
CTF \
INSTALL_AS_USER \
+ REPRODUCIBLE_BUILD \
RETPOLINE \
RUN_TESTS \
STALE_STAGED \
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 00a048fedc1d..4dffe9723a9e 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -44,6 +44,10 @@
#
# DEBUGMODE Mode for debug files. [${NOBINMODE}]
#
+# DEBUGOWN Owner for debug info files. [root]
+#
+# DEBUGGRP Group for debug info files. [wheel]
+#
#
# KMODDIR Base path for loadable kernel modules
# (see kld(4)). [/boot/modules]
@@ -197,7 +201,8 @@ LIBMODE?= ${NOBINMODE}
DEBUGDIR?= /usr/lib/debug
DEBUGMODE?= ${NOBINMODE}
-
+DEBUGOWN?= ${BINOWN}
+DEBUGGRP?= ${BINGRP}
# Share files
SHAREDIR?= /usr/share
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 9350d4786cec..10e1c177e2b2 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -12,22 +12,6 @@
CFLAGS+=${COPTS}
.endif
-.if ${MK_ASSERT_DEBUG} == "no"
-CFLAGS+= -DNDEBUG
-# XXX: shouldn't we ensure that !asserts marks potentially unused variables as
-# __unused instead of disabling -Werror globally?
-MK_WERROR= no
-.endif
-
-.if defined(DEBUG_FLAGS)
-CFLAGS+=${DEBUG_FLAGS}
-CXXFLAGS+=${DEBUG_FLAGS}
-
-.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
-CTFFLAGS+= -g
-.endif
-.endif
-
.if defined(PROG_CXX)
PROG= ${PROG_CXX}
.endif
@@ -109,20 +93,6 @@ CFLAGS += -mno-relax
.if defined(CRUNCH_CFLAGS)
CFLAGS+=${CRUNCH_CFLAGS}
-.else
-.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
- empty(DEBUG_FLAGS:M-gdwarf-*)
-.if !${COMPILER_FEATURES:Mcompressed-debug}
-CFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*}
-.else
-CFLAGS+= ${DEBUG_FILES_CFLAGS}
-.endif
-CTFFLAGS+= -g
-.endif
-.endif
-
-.if !defined(DEBUG_FLAGS)
-STRIP?= -s
.endif
.if defined(NO_ROOT)
@@ -159,6 +129,9 @@ PROG_FULL= ${PROG}
.if defined(PROG)
PROGNAME?= ${PROG}
+.if ${MK_DEBUG_FILES} != "no"
+DEBUGFILE= ${PROGNAME}.debug
+.endif
.if defined(SRCS)
@@ -223,11 +196,12 @@ ${PROG_FULL}: ${OBJS}
.endif # !defined(SRCS)
.if ${MK_DEBUG_FILES} != "no"
-${PROG}: ${PROG_FULL} ${PROGNAME}.debug
- ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROGNAME}.debug \
+CLEANFILES+= ${PROG_FULL} ${DEBUGFILE}
+${PROG}: ${PROG_FULL} ${DEBUGFILE}
+ ${OBJCOPY} --strip-debug --add-gnu-debuglink=${DEBUGFILE} \
${PROG_FULL} ${.TARGET}
-${PROGNAME}.debug: ${PROG_FULL}
+${DEBUGFILE}: ${PROG_FULL}
${OBJCOPY} --only-keep-debug ${PROG_FULL} ${.TARGET}
.endif
@@ -266,9 +240,6 @@ all: all-man
.if defined(PROG)
CLEANFILES+= ${PROG} ${PROG}.bc ${PROG}.ll
-.if ${MK_DEBUG_FILES} != "no"
-CLEANFILES+= ${PROG_FULL} ${PROGNAME}.debug
-.endif
.endif
.if defined(OBJS)
@@ -308,19 +279,12 @@ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
.endfor
.if !target(realinstall) && !defined(INTERNALPROG)
-realinstall: _proginstall
-.ORDER: beforeinstall _proginstall
+realinstall: _proginstall _debuginstall
+.ORDER: beforeinstall _proginstall _debuginstall
_proginstall:
.if defined(PROG)
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
-.if ${MK_DEBUG_FILES} != "no"
-.if defined(DEBUGMKDIR)
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/
-.endif
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
- ${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug
-.endif
.endif
.endif # !target(realinstall)
@@ -391,6 +355,7 @@ TESTS_PATH+= ${.OBJDIR}
OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
.endif
+.include <bsd.debug.mk>
.include <bsd.dep.mk>
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk
index a92539689a31..bdc7242d4bfd 100644
--- a/share/mk/local.dirdeps.mk
+++ b/share/mk/local.dirdeps.mk
@@ -185,7 +185,7 @@ C_DIRDEPS= \
# libgcc is needed as well but is added later.
-.if ${MK_GSSAPI} != "no"
+.if ${MK_KERBEROS} != "no" && ${MK_MITKRB5} == "no"
C_DIRDEPS+= include/gssapi
.endif
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index f146a4b24424..85a003eb4eaf 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -80,7 +80,6 @@ __DEFAULT_YES_OPTIONS = \
CDDL \
CLANG \
CLANG_BOOTSTRAP \
- CLEAN \
CPP \
CROSS_COMPILER \
CRYPT \
@@ -201,6 +200,7 @@ __DEFAULT_NO_OPTIONS = \
BHYVE_SNAPSHOT \
CLANG_EXTRAS \
CLANG_FORMAT \
+ CLEAN \
DIALOG \
DETECT_TZ_CHANGES \
DISK_IMAGE_TOOLS_BOOTSTRAP \
@@ -508,7 +508,7 @@ MK_LOADER_VERIEXEC_PASS_MANIFEST := no
# MK_* options whose default value depends on another option.
#
.for vv in \
- GSSAPI/KERBEROS \
+ KERBEROS_SUPPORT/KERBEROS \
MAN_UTILS/MAN
.if defined(WITH_${vv:H})
MK_${vv:H}:= yes
diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk
index d5c2af0c559d..2b9fc255a26d 100644
--- a/share/mk/src.sys.mk
+++ b/share/mk/src.sys.mk
@@ -42,7 +42,7 @@ CFLAGS+= ${CFCOMMONFLAG}
CFLAGS+= -fmacro-prefix-map=${SRCTOP}=/usr/src -fdebug-prefix-map=${SRCTOP}=/usr/src
.endif
-DEFAULTWARNS= 6
+DEFAULTWARNS?= 6
# tempting, but bsd.compiler.mk causes problems this early
# probably need to remove dependence on bsd.own.mk
diff --git a/stand/common/dev_net.c b/stand/common/dev_net.c
index 964fa514cac5..d1c48d40691a 100644
--- a/stand/common/dev_net.c
+++ b/stand/common/dev_net.c
@@ -66,6 +66,10 @@
#include "dev_net.h"
#include "bootstrap.h"
+#ifndef NETPROTO_DEFAULT
+# define NETPROTO_DEFAULT NET_NFS
+#endif
+
static char *netdev_name;
static int netdev_sock = -1;
static int netdev_opens;
@@ -182,6 +186,7 @@ net_open(struct open_file *f, ...)
setenv("boot.netif.mtu", mtu, 1);
}
+ DEBUG_PRINTF(1,("%s: netproto=%d\n", __func__, netproto));
}
netdev_opens++;
dev->d_opendata = &netdev_sock;
@@ -193,7 +198,7 @@ net_close(struct open_file *f)
{
struct devdesc *dev;
- DEBUG_PRINTF(1,("%s: opens=%d\n", __func__, netdev_opens));
+ DEBUG_PRINTF(2,("%s: opens=%d\n", __func__, netdev_opens));
dev = f->f_devdata;
dev->d_opendata = NULL;
@@ -303,7 +308,7 @@ net_getparams(int sock)
return (EIO);
}
exit:
- if ((rootaddr = net_parse_rootpath()) != INADDR_NONE)
+ if ((rootaddr = net_parse_rootpath()) != htonl(INADDR_NONE))
rootip.s_addr = rootaddr;
DEBUG_PRINTF(1,("%s: proto: %d\n", __func__, netproto));
@@ -344,11 +349,17 @@ net_print(int verbose)
return (ret);
}
+bool
+is_tftp(void)
+{
+ return (netproto == NET_TFTP);
+}
+
/*
* Parses the rootpath if present
*
* The rootpath format can be in the form
- * <scheme>://ip/path
+ * <scheme>://ip[:port]/path
* <scheme>:/path
*
* For compatibility with previous behaviour it also accepts as an NFS scheme
@@ -363,10 +374,10 @@ net_print(int verbose)
uint32_t
net_parse_rootpath(void)
{
- n_long addr = htonl(INADDR_NONE);
+ n_long addr = 0;
size_t i;
char ip[FNAME_SIZE];
- char *ptr, *val;
+ char *ptr, *portp, *val;
netproto = NET_NONE;
@@ -381,7 +392,7 @@ net_parse_rootpath(void)
ptr = rootpath;
/* Fallback for compatibility mode */
if (netproto == NET_NONE) {
- netproto = NET_NFS;
+ netproto = NETPROTO_DEFAULT;
(void)strsep(&ptr, ":");
if (ptr != NULL) {
addr = inet_addr(rootpath);
@@ -394,16 +405,21 @@ net_parse_rootpath(void)
if (*ptr == '/') {
/* we are in the form <scheme>://, we do expect an ip */
ptr++;
- /*
- * XXX when http will be there we will need to check for
- * a port, but right now we do not need it yet
- */
+ portp = val = strchr(ptr, ':');
+ if (val != NULL) {
+ val++;
+ rootport = strtol(val, NULL, 10);
+ }
val = strchr(ptr, '/');
if (val != NULL) {
+ if (portp == NULL)
+ portp = val;
snprintf(ip, sizeof(ip), "%.*s",
- (int)((uintptr_t)val - (uintptr_t)ptr),
+ (int)(portp - ptr),
ptr);
addr = inet_addr(ip);
+ DEBUG_PRINTF(1,("ip=%s addr=%#x\n",
+ ip, addr));
bcopy(val, rootpath, strlen(val) + 1);
}
} else {
@@ -411,6 +427,7 @@ net_parse_rootpath(void)
bcopy(ptr, rootpath, strlen(ptr) + 1);
}
}
-
+ if (addr == 0)
+ addr = htonl(INADDR_NONE);
return (addr);
}
diff --git a/stand/common/misc.c b/stand/common/misc.c
index 402213100951..a7c46ad2e74c 100644
--- a/stand/common/misc.c
+++ b/stand/common/misc.c
@@ -220,3 +220,16 @@ set_currdev(const char *devname)
env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset,
env_nounset);
}
+
+#ifndef LOADER_NET_SUPPORT
+/*
+ * This api is normally provided by dev_net.c
+ * This stub keeps libsa happy when LOADER_NET_SUPPORT
+ * is not enabled.
+ */
+bool
+is_tftp(void)
+{
+ return false;
+}
+#endif
diff --git a/stand/defs.mk b/stand/defs.mk
index 8ef84267b198..eb4133b604eb 100644
--- a/stand/defs.mk
+++ b/stand/defs.mk
@@ -207,6 +207,8 @@ LOADER_INTERP?=${LOADER_DEFAULT_INTERP}
# Make sure we use the machine link we're about to create
CFLAGS+=-I.
+.include "${BOOTSRC}/veriexec.mk"
+
all: ${PROG}
CLEANFILES+= teken_state.h
diff --git a/stand/efi/include/amd64/pe.h b/stand/efi/include/amd64/pe.h
index b858ba916c7d..faf8eafde1e9 100644
--- a/stand/efi/include/amd64/pe.h
+++ b/stand/efi/include/amd64/pe.h
@@ -83,7 +83,7 @@ typedef struct _IMAGE_FILE_HEADER {
#define IMAGE_SIZEOF_FILE_HEADER 20
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
+#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved external references).
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
diff --git a/stand/efi/include/i386/pe.h b/stand/efi/include/i386/pe.h
index c756080fe2d7..226c6c7564a7 100644
--- a/stand/efi/include/i386/pe.h
+++ b/stand/efi/include/i386/pe.h
@@ -83,7 +83,7 @@ typedef struct _IMAGE_FILE_HEADER {
#define IMAGE_SIZEOF_FILE_HEADER 20
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
+#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved external references).
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c
index a8c725a514be..4a136b42a4a1 100644
--- a/stand/kboot/kboot/main.c
+++ b/stand/kboot/kboot/main.c
@@ -229,6 +229,7 @@ static struct mapping
uintptr_t pa;
caddr_t va;
} map[MAX_MAP];
+static bool smbios_mmap_file;
static int smbios_fd;
static int nmap;
@@ -238,12 +239,17 @@ caddr_t ptov(uintptr_t pa)
uintptr_t pa2;
struct mapping *m = map;
- pa2 = rounddown(pa, PAGE);
+ if (smbios_mmap_file)
+ pa2 = rounddown(pa, PAGE);
+ else
+ pa2 = pa;
for (int i = 0; i < nmap; i++, m++) {
if (m->pa == pa2) {
return (m->va + pa - m->pa);
}
}
+ if (!smbios_mmap_file)
+ panic("Out of bounds smbios access");
if (nmap == MAX_MAP)
panic("Too many maps for smbios");
@@ -298,6 +304,7 @@ static void
find_smbios(void)
{
char buf[40];
+ void *dmi_data;
uintptr_t pa;
caddr_t va;
@@ -306,17 +313,47 @@ find_smbios(void)
if (pa == 0)
return;
+ dmi_data = NULL;
+ smbios_fd = host_open("/sys/firmware/dmi/tables/DMI", O_RDONLY, 0);
+ if (smbios_fd >= 0) {
+ struct host_kstat sb;
+ struct mapping *m;
+
+ if (host_fstat(smbios_fd, &sb) < 0) {
+ host_close(smbios_fd);
+ goto try_dev_mem;
+ }
+
+ dmi_data = malloc(sb.st_size);
+ if (dmi_data == NULL) {
+ host_close(smbios_fd);
+ goto try_dev_mem;
+ }
+
+ host_read(smbios_fd, dmi_data, sb.st_size);
+
+ m = &map[nmap++];
+ m->pa = pa;
+ m->va = dmi_data;
+ smbios_mmap_file = false;
+ } else {
+try_dev_mem:
+ smbios_fd = host_open("/dev/mem", O_RDONLY, 0);
+ if (smbios_fd < 0) {
+ printf("Can't open /sys/firmware/dmi/tables/DMI or "
+ "/dev/mem to read smbios\n");
+ return;
+ }
+ smbios_mmap_file = true;
+ }
snprintf(buf, sizeof(buf), "%#jx", (uintmax_t)pa);
setenv("hint.smbios.0.mem", buf, 1);
- smbios_fd = host_open("/dev/mem", O_RDONLY, 0);
- if (smbios_fd < 0) {
- printf("Can't open /dev/mem to read smbios\n");
- return;
- }
+
va = ptov(pa);
printf("Start of smbios at pa %p va %p\n", (void *)pa, va);
smbios_detect(va);
smbios_cleanup();
+ free(dmi_data);
host_close(smbios_fd);
}
diff --git a/stand/libsa/bzipfs.c b/stand/libsa/bzipfs.c
index f4002796f0ae..ff7ec16e7dc6 100644
--- a/stand/libsa/bzipfs.c
+++ b/stand/libsa/bzipfs.c
@@ -68,6 +68,7 @@ static int bzf_stat(struct open_file *f, struct stat *sb);
#ifndef REGRESSION
struct fs_ops bzipfs_fsops = {
.fs_name = "bzip",
+ .fs_flags = 0,
.fo_open = bzf_open,
.fo_close = bzf_close,
.fo_read = bzf_read,
diff --git a/stand/libsa/cd9660.c b/stand/libsa/cd9660.c
index 973a7dddcda9..d1da39aa479a 100644
--- a/stand/libsa/cd9660.c
+++ b/stand/libsa/cd9660.c
@@ -81,6 +81,7 @@ static ISO_SUSP_HEADER *susp_lookup_record(struct open_file *f,
struct fs_ops cd9660_fsops = {
.fs_name = "cd9660",
+ .fs_flags = 0,
.fo_open = cd9660_open,
.fo_close = cd9660_close,
.fo_read = cd9660_read,
diff --git a/stand/libsa/dosfs.c b/stand/libsa/dosfs.c
index aca198cdf6fa..38610d917007 100644
--- a/stand/libsa/dosfs.c
+++ b/stand/libsa/dosfs.c
@@ -61,6 +61,7 @@ static int dos_unmount(const char *dev, void *data);
struct fs_ops dosfs_fsops = {
.fs_name = "dosfs",
+ .fs_flags = 0,
.fo_open = dos_open,
.fo_close = dos_close,
.fo_read = dos_read,
diff --git a/stand/libsa/ext2fs.c b/stand/libsa/ext2fs.c
index 47812f4543a1..f7096282f156 100644
--- a/stand/libsa/ext2fs.c
+++ b/stand/libsa/ext2fs.c
@@ -106,6 +106,7 @@ static int dtmap[] = { DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR,
struct fs_ops ext2fs_fsops = {
.fs_name = "ext2fs",
+ .fs_flags = 0,
.fo_open = ext2fs_open,
.fo_close = ext2fs_close,
.fo_read = ext2fs_read,
diff --git a/stand/libsa/globals.c b/stand/libsa/globals.c
index 2797045d4faf..6bd3a4243d73 100644
--- a/stand/libsa/globals.c
+++ b/stand/libsa/globals.c
@@ -17,6 +17,7 @@
u_char bcea[6] = BA; /* broadcast ethernet address */
char rootpath[FNAME_SIZE] = "/"; /* root mount path */
+int rootport; /* port for rootpath server */
char bootfile[FNAME_SIZE]; /* bootp says to boot this */
char hostname[FNAME_SIZE]; /* our hostname */
int hostnamelen;
diff --git a/stand/libsa/gzipfs.c b/stand/libsa/gzipfs.c
index 6c2b8cac9e34..6b22f750f3ef 100644
--- a/stand/libsa/gzipfs.c
+++ b/stand/libsa/gzipfs.c
@@ -50,6 +50,7 @@ static int zf_stat(struct open_file *f, struct stat *sb);
struct fs_ops gzipfs_fsops = {
.fs_name = "zip",
+ .fs_flags = 0,
.fo_open = zf_open,
.fo_close = zf_close,
.fo_read = zf_read,
diff --git a/stand/libsa/libsa.3 b/stand/libsa/libsa.3
index 3e3f70610516..0947f97a0a1f 100644
--- a/stand/libsa/libsa.3
+++ b/stand/libsa/libsa.3
@@ -781,6 +781,10 @@ The same as
but for
.Xr bzip2 1 Ns -compressed
files.
+.It Va pkgfs_fsops
+File access from a tar file typically streamed via TFTP.
+The order of files in the tar file must match the order they are
+to be consumed as rewind is not practical.
.El
.Pp
The array of
diff --git a/stand/libsa/mount.c b/stand/libsa/mount.c
index 73bf6ab8118c..c866dc9c7055 100644
--- a/stand/libsa/mount.c
+++ b/stand/libsa/mount.c
@@ -107,7 +107,10 @@ mount(const char *dev, const char *path, int flags __unused, void *data)
fs = file_system[i];
if (fs->fo_mount == NULL)
continue;
-
+ DEBUG_PRINTF(1,("%s: fs=%s path=%s\n",
+ __func__, fs->fs_name, path));
+ if (is_tftp())
+ break;
if (fs->fo_mount(dev, path, &data) != 0)
continue;
diff --git a/stand/libsa/net.h b/stand/libsa/net.h
index d4823d88f58b..945b6b9ea45f 100644
--- a/stand/libsa/net.h
+++ b/stand/libsa/net.h
@@ -75,6 +75,7 @@ enum net_proto {
extern u_char bcea[6];
extern char rootpath[FNAME_SIZE];
+extern int rootport;
extern char bootfile[FNAME_SIZE];
extern char hostname[FNAME_SIZE];
extern int hostnamelen;
diff --git a/stand/libsa/nfs.c b/stand/libsa/nfs.c
index ee6af8a726c7..f3e9060c9881 100644
--- a/stand/libsa/nfs.c
+++ b/stand/libsa/nfs.c
@@ -131,6 +131,7 @@ struct nfs_iodesc nfs_root_node;
struct fs_ops nfs_fsops = {
.fs_name = "nfs",
+ .fs_flags = 0,
.fo_open = nfs_open,
.fo_close = nfs_close,
.fo_read = nfs_read,
diff --git a/stand/libsa/open.c b/stand/libsa/open.c
index ccee4aa5c07b..91848aca7dbe 100644
--- a/stand/libsa/open.c
+++ b/stand/libsa/open.c
@@ -138,6 +138,8 @@ open(const char *fname, int mode)
struct fs_ops *fs;
struct open_file *f;
int fd, i, error, besterror;
+ bool is_dir;
+ size_t n;
const char *file;
TSENTER();
@@ -154,31 +156,42 @@ open(const char *fname, int mode)
f->f_devdata = NULL;
file = NULL;
+ if (exclusive_file_system == NULL ||
+ (exclusive_file_system->fs_flags & FS_OPS_NO_DEVOPEN) == 0) {
+ error = devopen(f, fname, &file);
+ if (error ||
+ (((f->f_flags & F_NODEV) == 0) && f->f_dev == NULL))
+ goto err;
+
+ /* see if we opened a raw device; otherwise, 'file' is the file name. */
+ if (file == NULL || *file == '\0') {
+ f->f_flags |= F_RAW;
+ f->f_rabuf = NULL;
+ TSEXIT();
+ return (fd);
+ }
+ } else
+ file = fname;
+
if (exclusive_file_system != NULL) {
+ /* loader is forcing the filesystem to be used */
fs = exclusive_file_system;
- error = (fs->fo_open)(fname, f);
+ error = (fs->fo_open)(file, f);
if (error == 0)
goto ok;
goto err;
}
- error = devopen(f, fname, &file);
- if (error ||
- (((f->f_flags & F_NODEV) == 0) && f->f_dev == NULL))
- goto err;
-
- /* see if we opened a raw device; otherwise, 'file' is the file name. */
- if (file == NULL || *file == '\0') {
- f->f_flags |= F_RAW;
- f->f_rabuf = NULL;
- TSEXIT();
- return (fd);
- }
-
/* pass file name to the different filesystem open routines */
besterror = ENOENT;
+ n = strlen(file);
+ is_dir = (n > 0 && file[n - 1] == '/');
for (i = 0; file_system[i] != NULL; i++) {
fs = file_system[i];
+ if (is_dir && is_tftp()) {
+ error = EOPNOTSUPP;
+ goto err;
+ }
error = (fs->fo_open)(file, f);
if (error == 0)
goto ok;
diff --git a/stand/libsa/pkgfs.c b/stand/libsa/pkgfs.c
index 32d488de5cfb..6eb3badf7068 100644
--- a/stand/libsa/pkgfs.c
+++ b/stand/libsa/pkgfs.c
@@ -41,6 +41,7 @@ static off_t pkg_atol(const char *, unsigned);
struct fs_ops pkgfs_fsops = {
.fs_name = "pkg",
+ .fs_flags = FS_OPS_NO_DEVOPEN,
.fo_open = pkg_open,
.fo_close = pkg_close,
.fo_read = pkg_read,
diff --git a/stand/libsa/splitfs.c b/stand/libsa/splitfs.c
index 69912522000e..eb4b3a1feb11 100644
--- a/stand/libsa/splitfs.c
+++ b/stand/libsa/splitfs.c
@@ -50,6 +50,7 @@ static int splitfs_stat(struct open_file *f, struct stat *sb);
struct fs_ops splitfs_fsops = {
.fs_name = "split",
+ .fs_flags = 0,
.fo_open = splitfs_open,
.fo_close = splitfs_close,
.fo_read = splitfs_read,
diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h
index 0e99d8778fa6..233d11ab3ecb 100644
--- a/stand/libsa/stand.h
+++ b/stand/libsa/stand.h
@@ -94,6 +94,8 @@ __BEGIN_DECLS
struct open_file;
+#define FS_OPS_NO_DEVOPEN 1
+
/*
* This structure is used to define file system operations in a file system
* independent way.
@@ -104,6 +106,7 @@ struct open_file;
*/
struct fs_ops {
const char *fs_name;
+ int fs_flags;
int (*fo_open)(const char *path, struct open_file *f);
int (*fo_close)(struct open_file *f);
int (*fo_read)(struct open_file *f, void *buf,
@@ -504,6 +507,9 @@ extern void *reallocf(void *, size_t);
*/
caddr_t ptov(uintptr_t);
+/* dev_net.c */
+bool is_tftp(void);
+
/* features.c */
typedef void (feature_iter_fn)(void *, const char *, const char *, bool);
diff --git a/stand/libsa/tftp.c b/stand/libsa/tftp.c
index c6cc8f11a765..656c402683bb 100644
--- a/stand/libsa/tftp.c
+++ b/stand/libsa/tftp.c
@@ -50,6 +50,10 @@
#include <netinet/in_systm.h>
#include <arpa/tftp.h>
+#ifdef LOADER_VERIEXEC
+#include <verify_file.h>
+#endif
+
#include <string.h>
#include "stand.h"
@@ -73,6 +77,7 @@ static int tftp_preload(struct open_file *);
struct fs_ops tftp_fsops = {
.fs_name = "tftp",
+ .fs_flags = 0,
.fo_open = tftp_open,
.fo_close = tftp_close,
.fo_read = tftp_read,
@@ -84,7 +89,6 @@ struct fs_ops tftp_fsops = {
};
static int tftpport = 2000;
-static int is_open = 0;
/*
* The legacy TFTP_BLKSIZE value was SEGSIZE(512).
@@ -98,10 +102,14 @@ static int is_open = 0;
* Jumbo frames in the future.
*/
#define TFTP_MAX_BLKSIZE 9008
-#define TFTP_TRIES 2
+#define TFTP_TRIES 3
struct tftp_handle {
struct iodesc *iodesc;
+ struct iodesc io;
+ int id;
+ ino_t ino;
+ int port;
int currblock; /* contents of lastdata */
unsigned int islastblock:1; /* flag */
unsigned int tries:4; /* number of read attempts */
@@ -177,6 +185,9 @@ tftp_sendack(struct tftp_handle *h, u_short block)
wbuf.t.th_block = htons(block);
wtail += 2;
+ DEBUG_PRINTF(5,("%s: myport=%hu xid=%lu, block=%hu\n",
+ __func__, h->iodesc->myport, h->iodesc->xid, block));
+
sendudp(h->iodesc, &wbuf.t, wtail - (char *)&wbuf.t);
}
@@ -190,6 +201,7 @@ recvtftp(struct iodesc *d, void **pkt, void **payload, time_t tleft,
void *ptr = NULL;
ssize_t len;
int tftp_error;
+ unsigned short block;
errno = 0;
extra = recv_extra;
@@ -203,19 +215,22 @@ recvtftp(struct iodesc *d, void **pkt, void **payload, time_t tleft,
}
extra->rtype = ntohs(t->th_opcode);
- switch (ntohs(t->th_opcode)) {
+ block = ntohs(t->th_block);
+ DEBUG_PRINTF(6,("%s: myport=%hu xid=%lu, block=%hu, opcode=%hu\n",
+ __func__, d->myport, d->xid, block, extra->rtype));
+ switch (extra->rtype) {
case DATA: {
int got;
- if (htons(t->th_block) < (u_short)d->xid) {
+ if (block < (u_short)d->xid) {
/*
* Apparently our ACK was missed, re-send.
*/
- tftp_sendack(h, htons(t->th_block));
+ tftp_sendack(h, block);
free(ptr);
return (-1);
}
- if (htons(t->th_block) != (u_short)d->xid) {
+ if (block != (u_short)d->xid) {
/*
* Packet from the future, drop this.
*/
@@ -241,9 +256,7 @@ recvtftp(struct iodesc *d, void **pkt, void **payload, time_t tleft,
printf("illegal tftp error %d\n", tftp_error);
errno = EIO;
} else {
-#ifdef TFTP_DEBUG
- printf("tftp-error %d\n", tftp_error);
-#endif
+ DEBUG_PRINTF(0, ("tftp-error %d\n", tftp_error));
errno = tftperrors[tftp_error];
}
free(ptr);
@@ -284,9 +297,7 @@ recvtftp(struct iodesc *d, void **pkt, void **payload, time_t tleft,
return (0);
}
default:
-#ifdef TFTP_DEBUG
- printf("tftp type %d not handled\n", ntohs(t->th_opcode));
-#endif
+ DEBUG_PRINTF(0, ("tftp type %hu not handled\n", extra->rtype));
free(ptr);
return (-1);
}
@@ -343,7 +354,7 @@ tftp_makereq(struct tftp_handle *h)
bcopy("0", wtail, 2);
wtail += 2;
- h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff));
+ h->iodesc->myport = htons(h->port + (getsecs() & 0x3ff));
h->iodesc->destport = htons(IPPORT_TFTP);
h->iodesc->xid = 1; /* expected block */
@@ -351,11 +362,15 @@ tftp_makereq(struct tftp_handle *h)
h->islastblock = 0;
h->validsize = 0;
+ DEBUG_PRINTF(5,("%s: %s: id=%d port=%d myport=%hu xid=1\n",
+ __func__, h->path, h->id, h->port, ntohs(h->iodesc->myport)));
pkt = NULL;
recv_extra.tftp_handle = h;
res = sendrecv(h->iodesc, &sendudp, &wbuf.t, wtail - (char *)&wbuf.t,
&recvtftp, &pkt, (void **)&t, &recv_extra);
if (res == -1) {
+ DEBUG_PRINTF(3,("%s: %s: id=%d errno=%d\n",
+ __func__, h->path, h->id, errno));
free(pkt);
return (errno);
}
@@ -410,12 +425,18 @@ tftp_getnextblock(struct tftp_handle *h)
h->iodesc->xid = h->currblock + 1; /* expected block */
+ DEBUG_PRINTF(5,("%s: %s: id=%d port=%d myport=%hu xid=%lu\n",
+ __func__, h->path, h->id, h->port,
+ ntohs(h->iodesc->myport), h->iodesc->xid));
+
pkt = NULL;
recv_extra.tftp_handle = h;
res = sendrecv(h->iodesc, &sendudp, &wbuf.t, wtail - (char *)&wbuf.t,
&recvtftp, &pkt, (void **)&t, &recv_extra);
if (res == -1) { /* 0 is OK! */
+ DEBUG_PRINTF(3,("%s: %s: id=%d errno=%d\n",
+ __func__, h->path, h->id, errno));
free(pkt);
return (errno);
}
@@ -428,21 +449,32 @@ tftp_getnextblock(struct tftp_handle *h)
if (res < h->tftp_blksize)
h->islastblock = 1; /* EOF */
- if (h->islastblock == 1) {
+ DEBUG_PRINTF(5,("%s: %s: id=%d res=%d blksz=%d last=%d\n",
+ __func__, h->path, h->id, res, h->tftp_blksize, h->islastblock));
+
+ if (h->islastblock) {
/* Send an ACK for the last block */
- wbuf.t.th_block = htons((u_short)h->currblock);
- sendudp(h->iodesc, &wbuf.t, wtail - (char *)&wbuf.t);
+ tftp_sendack(h, h->currblock);
}
return (0);
}
+/*
+ * If doing verification we need to handle multiple
+ * files at the same time.
+ */
+#define TOPEN_MAX 8
+static struct tftp_handle *handles[TOPEN_MAX];
+
static int
tftp_open(const char *path, struct open_file *f)
{
struct devdesc *dev;
struct tftp_handle *tftpfile;
struct iodesc *io;
+ static int lx = 0;
+ int i, x;
int res;
size_t pathsize;
const char *extraslash;
@@ -450,24 +482,39 @@ tftp_open(const char *path, struct open_file *f)
if (netproto != NET_TFTP)
return (EINVAL);
- if (f->f_dev->dv_type != DEVT_NET)
+ if (f->f_dev == NULL || f->f_dev->dv_type != DEVT_NET)
return (EINVAL);
- if (is_open)
+ tftpfile = NULL;
+ for (x = lx + 1, i = 0; i < TOPEN_MAX; i++, x++) {
+ x %= TOPEN_MAX;
+ if (handles[x] == NULL) {
+ handles[x] = tftpfile = calloc(1, sizeof(*tftpfile));
+ if (tftpfile == NULL)
+ return (ENOMEM);
+ /* id allows us to clear the slot on close */
+ tftpfile->id = lx = x;
+ /* port ensures a different session with server */
+ tftpfile->port = (tftpport + (x * tftpport)) & 0xffff;
+ DEBUG_PRINTF(1, ("%s(%s) id=%d port=%d\n",
+ __func__, path, tftpfile->id, tftpfile->port));
+ break;
+ }
+ }
+ if (tftpfile == NULL) {
+ DEBUG_PRINTF(1, ("%s: EBUSY\n", __func__));
return (EBUSY);
-
- tftpfile = calloc(1, sizeof(*tftpfile));
- if (!tftpfile)
- return (ENOMEM);
-
+ }
tftpfile->tftp_blksize = TFTP_REQUESTED_BLKSIZE;
dev = f->f_devdata;
- tftpfile->iodesc = io = socktodesc(*(int *)(dev->d_opendata));
+ io = socktodesc(*(int *)(dev->d_opendata));
if (io == NULL) {
free(tftpfile);
return (EINVAL);
}
+ memcpy(&tftpfile->io, io, sizeof(tftpfile->io));
+ io = tftpfile->iodesc = &tftpfile->io;
io->destip = rootip;
tftpfile->off = 0;
pathsize = (strlen(rootpath) + 1 + strlen(path) + 1) * sizeof(char);
@@ -480,8 +527,11 @@ tftp_open(const char *path, struct open_file *f)
extraslash = "";
else
extraslash = "/";
- res = snprintf(tftpfile->path, pathsize, "%s%s%s",
- rootpath, extraslash, path);
+ if (rootpath[0] == '/' && rootpath[1] == '\0' && path[0] == '/')
+ res = strlcpy(tftpfile->path, path, pathsize);
+ else
+ res = snprintf(tftpfile->path, pathsize, "%s%s%s",
+ rootpath, extraslash, path);
if (res < 0 || res > pathsize) {
free(tftpfile->path);
free(tftpfile);
@@ -491,13 +541,13 @@ tftp_open(const char *path, struct open_file *f)
res = tftp_makereq(tftpfile);
if (res) {
+ handles[tftpfile->id] = NULL;
free(tftpfile->path);
free(tftpfile->pkt);
free(tftpfile);
return (res);
}
f->f_fsdata = tftpfile;
- is_open = 1;
return (0);
}
@@ -547,9 +597,7 @@ tftp_read(struct open_file *f, void *addr, size_t size,
rc = tftp_getnextblock(tftpfile);
if (rc) { /* no answer */
-#ifdef TFTP_DEBUG
- printf("tftp: read error\n");
-#endif
+ DEBUG_PRINTF(0, ("tftp: read error\n"));
if (tftpfile->tries > TFTP_TRIES) {
return (rc);
} else {
@@ -568,10 +616,8 @@ tftp_read(struct open_file *f, void *addr, size_t size,
inbuffer = tftpfile->validsize - offinblock;
if (inbuffer < 0) {
-#ifdef TFTP_DEBUG
- printf("tftp: invalid offset %d\n",
- tftpfile->off);
-#endif
+ DEBUG_PRINTF(0, ("tftp: invalid offset %d\n",
+ tftpfile->off));
return (EINVAL);
}
count = (size < inbuffer ? size : inbuffer);
@@ -586,15 +632,15 @@ tftp_read(struct open_file *f, void *addr, size_t size,
if ((tftpfile->islastblock) && (count == inbuffer))
break; /* EOF */
} else {
-#ifdef TFTP_DEBUG
- printf("tftp: block %d not found\n", needblock);
-#endif
+ DEBUG_PRINTF(0, ("tftp: block %d not found\n", needblock));
return (EINVAL);
}
}
out:
+ DEBUG_PRINTF(4, ("%s(%s) res=%ld\n", __func__, tftpfile->path,
+ (tftpfile->tftp_tsize - tftpfile->off)));
if (resid != NULL)
*resid = res;
return (rc);
@@ -610,15 +656,18 @@ tftp_close(struct open_file *f)
tftp_senderr(tftpfile, 0, "No error: file closed");
if (tftpfile) {
+ DEBUG_PRINTF(1, ("%s(%d): %s\n", __func__,
+ tftpfile->id, tftpfile->path));
+ handles[tftpfile->id] = NULL;
free(tftpfile->path);
free(tftpfile->pkt);
free(tftpfile->tftp_cache);
free(tftpfile);
}
- is_open = 0;
return (0);
}
+
static int
tftp_stat(struct open_file *f, struct stat *sb)
{
@@ -630,6 +679,29 @@ tftp_stat(struct open_file *f, struct stat *sb)
sb->st_uid = 0;
sb->st_gid = 0;
sb->st_size = tftpfile->tftp_tsize;
+ sb->st_mtime = 0;
+#ifdef LOADER_VERIEXEC
+ /* libsecureboot needs st_dev and st_ino at minimum;
+ * we need to fake something that will be close enough to
+ * unique.
+ */
+ sb->st_dev = (dev_t)tftpfile->iodesc->destip.s_addr;
+ /* we don't want to compute this more than once */
+ if (tftpfile->ino == 0) {
+ union {
+ unsigned char digest[SHA_DIGEST_LENGTH];
+ ino_t ino;
+ } u;
+
+ hash_string(tftpfile->path, 0, u.digest, sizeof(u.digest));
+
+ tftpfile->ino = u.ino & 0x7fffffff;
+ DEBUG_PRINTF(2,("%s(%s) dev=%lu ino=%lu\n", __func__,
+ tftpfile->path, (unsigned long)sb->st_dev,
+ (unsigned long)tftpfile->ino));
+ }
+ sb->st_ino = tftpfile->ino;
+#endif
return (0);
}
@@ -827,9 +899,7 @@ tftp_parse_oack(struct tftp_handle *h, char *buf, size_t len)
return (-1);
}
-#ifdef TFTP_DEBUG
- printf("tftp_blksize: %u\n", h->tftp_blksize);
- printf("tftp_tsize: %lu\n", h->tftp_tsize);
-#endif
+ DEBUG_PRINTF(2, ("tftp_blksize: %u\n", h->tftp_blksize));
+ DEBUG_PRINTF(2, ("tftp_tsize: %lu\n", h->tftp_tsize));
return (0);
}
diff --git a/stand/libsa/ufs.c b/stand/libsa/ufs.c
index e1d540ed2321..86cd3be9a27a 100644
--- a/stand/libsa/ufs.c
+++ b/stand/libsa/ufs.c
@@ -93,6 +93,7 @@ static int ufs_unmount(const char *dev, void *data);
struct fs_ops ufs_fsops = {
.fs_name = "ufs",
+ .fs_flags = 0,
.fo_open = ufs_open,
.fo_close = ufs_close,
.fo_read = ufs_read,
diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c
index 971d71d098d3..f15d9b016068 100644
--- a/stand/libsa/zfs/zfsimpl.c
+++ b/stand/libsa/zfs/zfsimpl.c
@@ -107,11 +107,6 @@ typedef struct indirect_vsd {
} indirect_vsd_t;
/*
- * List of all vdevs, chained through v_alllink.
- */
-static vdev_list_t zfs_vdevs;
-
-/*
* List of supported read-incompatible ZFS features. Do not add here features
* marked as ZFEATURE_FLAG_READONLY_COMPAT, they are irrelevant for read-only!
*/
@@ -167,7 +162,6 @@ vdev_indirect_mapping_entry_phys_t *
static void
zfs_init(void)
{
- STAILQ_INIT(&zfs_vdevs);
STAILQ_INIT(&zfs_pools);
dnode_cache_buf = malloc(SPA_MAXBLOCKSIZE);
@@ -839,16 +833,27 @@ vdev_replacing_read(vdev_t *vdev, const blkptr_t *bp, void *buf,
return (kid->v_read(kid, bp, buf, offset, bytes));
}
+/*
+ * List of vdevs that were fully initialized from their own label, but later a
+ * newer label was found that obsoleted the stale label, freeing its
+ * configuration tree. We keep those vdevs around, since a new configuration
+ * may include them.
+ */
+static vdev_list_t orphans = STAILQ_HEAD_INITIALIZER(orphans);
+
static vdev_t *
-vdev_find(uint64_t guid)
+vdev_find(vdev_list_t *list, uint64_t guid)
{
- vdev_t *vdev;
+ vdev_t *vdev, *safe;
- STAILQ_FOREACH(vdev, &zfs_vdevs, v_alllink)
+ STAILQ_FOREACH_SAFE(vdev, list, v_childlink, safe) {
if (vdev->v_guid == guid)
return (vdev);
+ if ((vdev = vdev_find(&vdev->v_children, guid)) != NULL)
+ return (vdev);
+ }
- return (0);
+ return (NULL);
}
static vdev_t *
@@ -857,6 +862,11 @@ vdev_create(uint64_t guid, vdev_read_t *_read)
vdev_t *vdev;
vdev_indirect_config_t *vic;
+ if ((vdev = vdev_find(&orphans, guid))) {
+ STAILQ_REMOVE(&orphans, vdev, vdev, v_childlink);
+ return (vdev);
+ }
+
vdev = calloc(1, sizeof(vdev_t));
if (vdev != NULL) {
STAILQ_INIT(&vdev->v_children);
@@ -871,7 +881,6 @@ vdev_create(uint64_t guid, vdev_read_t *_read)
if (_read != NULL) {
vic = &vdev->vdev_indirect_config;
vic->vic_prev_indirect_vdev = UINT64_MAX;
- STAILQ_INSERT_TAIL(&zfs_vdevs, vdev, v_alllink);
}
}
@@ -1035,22 +1044,19 @@ vdev_init(uint64_t guid, const nvlist_t *nvlist, vdev_t **vdevp)
* STAILQ_INSERT_AFTER.
*/
static vdev_t *
-vdev_find_previous(vdev_t *top_vdev, vdev_t *vdev)
+vdev_find_previous(vdev_t *top_vdev, uint64_t id)
{
vdev_t *v, *previous;
- if (STAILQ_EMPTY(&top_vdev->v_children))
- return (NULL);
-
previous = NULL;
STAILQ_FOREACH(v, &top_vdev->v_children, v_childlink) {
- if (v->v_id > vdev->v_id)
+ if (v->v_id > id)
return (previous);
- if (v->v_id == vdev->v_id)
+ if (v->v_id == id)
return (v);
- if (v->v_id < vdev->v_id)
+ if (v->v_id < id)
previous = v;
}
return (previous);
@@ -1072,7 +1078,7 @@ vdev_child_count(vdev_t *vdev)
/*
* Insert vdev into top_vdev children list. List is ordered by v_id.
*/
-static void
+static vdev_t *
vdev_insert(vdev_t *top_vdev, vdev_t *vdev)
{
vdev_t *previous;
@@ -1085,7 +1091,7 @@ vdev_insert(vdev_t *top_vdev, vdev_t *vdev)
* so we can use either STAILQ_INSERT_HEAD or STAILQ_INSERT_AFTER
* as STAILQ does not have insert before.
*/
- previous = vdev_find_previous(top_vdev, vdev);
+ previous = vdev_find_previous(top_vdev, vdev->v_id);
if (previous == NULL) {
STAILQ_INSERT_HEAD(&top_vdev->v_children, vdev, v_childlink);
@@ -1094,7 +1100,8 @@ vdev_insert(vdev_t *top_vdev, vdev_t *vdev)
* This vdev was configured from label config,
* do not insert duplicate.
*/
- return;
+ free(vdev);
+ return (previous);
} else {
STAILQ_INSERT_AFTER(&top_vdev->v_children, previous, vdev,
v_childlink);
@@ -1103,26 +1110,28 @@ vdev_insert(vdev_t *top_vdev, vdev_t *vdev)
count = vdev_child_count(top_vdev);
if (top_vdev->v_nchildren < count)
top_vdev->v_nchildren = count;
+ return (vdev);
}
static int
-vdev_from_nvlist(spa_t *spa, uint64_t top_guid, uint64_t txg,
- const nvlist_t *nvlist)
+vdev_from_nvlist(spa_t *spa, uint64_t top_guid, uint64_t label_guid,
+ uint64_t txg, const nvlist_t *nvlist)
{
vdev_t *top_vdev, *vdev;
nvlist_t **kids = NULL;
int rc, nkids;
/* Get top vdev. */
- top_vdev = vdev_find(top_guid);
+ top_vdev = vdev_find(&spa->spa_root_vdev->v_children, top_guid);
if (top_vdev == NULL) {
rc = vdev_init(top_guid, nvlist, &top_vdev);
if (rc != 0)
return (rc);
top_vdev->v_spa = spa;
top_vdev->v_top = top_vdev;
+ top_vdev->v_label = label_guid;
top_vdev->v_txg = txg;
- vdev_insert(spa->spa_root_vdev, top_vdev);
+ (void )vdev_insert(spa->spa_root_vdev, top_vdev);
}
/* Add children if there are any. */
@@ -1143,7 +1152,7 @@ vdev_from_nvlist(spa_t *spa, uint64_t top_guid, uint64_t txg,
vdev->v_spa = spa;
vdev->v_top = top_vdev;
- vdev_insert(top_vdev, vdev);
+ vdev = vdev_insert(top_vdev, vdev);
}
} else {
/*
@@ -1162,30 +1171,6 @@ done:
return (rc);
}
-static int
-vdev_init_from_label(spa_t *spa, const nvlist_t *nvlist)
-{
- uint64_t pool_guid, top_guid, txg;
- nvlist_t *vdevs;
- int rc;
-
- if (nvlist_find(nvlist, ZPOOL_CONFIG_POOL_GUID, DATA_TYPE_UINT64,
- NULL, &pool_guid, NULL) ||
- nvlist_find(nvlist, ZPOOL_CONFIG_TOP_GUID, DATA_TYPE_UINT64,
- NULL, &top_guid, NULL) ||
- nvlist_find(nvlist, ZPOOL_CONFIG_POOL_TXG, DATA_TYPE_UINT64,
- NULL, &txg, NULL) != 0 ||
- nvlist_find(nvlist, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST,
- NULL, &vdevs, NULL)) {
- printf("ZFS: can't find vdev details\n");
- return (ENOENT);
- }
-
- rc = vdev_from_nvlist(spa, top_guid, txg, vdevs);
- nvlist_destroy(vdevs);
- return (rc);
-}
-
static void
vdev_set_state(vdev_t *vdev)
{
@@ -1232,14 +1217,14 @@ vdev_set_state(vdev_t *vdev)
}
static int
-vdev_update_from_nvlist(uint64_t top_guid, const nvlist_t *nvlist)
+vdev_update_from_nvlist(vdev_t *root, uint64_t top_guid, const nvlist_t *nvlist)
{
vdev_t *vdev;
nvlist_t **kids = NULL;
int rc, nkids;
/* Update top vdev. */
- vdev = vdev_find(top_guid);
+ vdev = vdev_find(&root->v_children, top_guid);
if (vdev != NULL)
vdev_set_initial_state(vdev, nvlist);
@@ -1255,7 +1240,7 @@ vdev_update_from_nvlist(uint64_t top_guid, const nvlist_t *nvlist)
if (rc != 0)
break;
- vdev = vdev_find(guid);
+ vdev = vdev_find(&root->v_children, guid);
if (vdev != NULL)
vdev_set_initial_state(vdev, kids[i]);
}
@@ -1271,10 +1256,6 @@ vdev_update_from_nvlist(uint64_t top_guid, const nvlist_t *nvlist)
return (rc);
}
-/*
- * Shall not be called on root vdev, that is not linked into zfs_vdevs.
- * See comment in vdev_create().
- */
static void
vdev_free(struct vdev *vdev)
{
@@ -1282,8 +1263,10 @@ vdev_free(struct vdev *vdev)
STAILQ_FOREACH_SAFE(kid, &vdev->v_children, v_childlink, safe)
vdev_free(kid);
- STAILQ_REMOVE(&zfs_vdevs, vdev, vdev, v_alllink);
- free(vdev);
+ if (vdev->v_phys_read != NULL)
+ STAILQ_INSERT_HEAD(&orphans, vdev, v_childlink);
+ else
+ free(vdev);
}
static int
@@ -1329,15 +1312,16 @@ vdev_init_from_nvlist(spa_t *spa, const nvlist_t *nvlist)
NULL, &guid, NULL);
if (rc != 0)
break;
- vdev = vdev_find(guid);
+ vdev = vdev_find(&spa->spa_root_vdev->v_children, guid);
/*
* Top level vdev is missing, create it.
* XXXGL: how can this happen?
*/
if (vdev == NULL)
- rc = vdev_from_nvlist(spa, guid, 0, kids[i]);
+ rc = vdev_from_nvlist(spa, guid, 0, 0, kids[i]);
else
- rc = vdev_update_from_nvlist(guid, kids[i]);
+ rc = vdev_update_from_nvlist(spa->spa_root_vdev, guid,
+ kids[i]);
if (rc != 0)
break;
}
@@ -1355,6 +1339,53 @@ vdev_init_from_nvlist(spa_t *spa, const nvlist_t *nvlist)
return (rc);
}
+static bool
+nvlist_find_child_guid(const nvlist_t *nvlist, uint64_t guid)
+{
+ nvlist_t **kids = NULL;
+ int nkids, i;
+ bool rv = false;
+
+ if (nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN, DATA_TYPE_NVLIST_ARRAY,
+ &nkids, &kids, NULL) != 0)
+ nkids = 0;
+
+ for (i = 0; i < nkids; i++) {
+ uint64_t kid_guid;
+
+ if (nvlist_find(kids[i], ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64,
+ NULL, &kid_guid, NULL) != 0)
+ break;
+ if (kid_guid == guid)
+ rv = true;
+ else
+ rv = nvlist_find_child_guid(kids[i], guid);
+ if (rv)
+ break;
+ }
+
+ for (i = 0; i < nkids; i++)
+ nvlist_destroy(kids[i]);
+ free(kids);
+
+ return (rv);
+}
+
+static bool
+nvlist_find_vdev_guid(const nvlist_t *nvlist, uint64_t guid)
+{
+ nvlist_t *vdevs;
+ bool rv;
+
+ if (nvlist_find(nvlist, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST, NULL,
+ &vdevs, NULL) != 0)
+ return (false);
+ rv = nvlist_find_child_guid(vdevs, guid);
+ nvlist_destroy(vdevs);
+
+ return (rv);
+}
+
static spa_t *
spa_find_by_guid(uint64_t guid)
{
@@ -2023,8 +2054,8 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
{
vdev_t vtmp;
spa_t *spa;
- vdev_t *vdev;
- nvlist_t *nvl;
+ vdev_t *vdev, *top;
+ nvlist_t *nvl, *vdevs;
uint64_t val;
uint64_t guid, pool_guid, top_guid, txg;
const char *pool_name;
@@ -2083,6 +2114,7 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
if (nvlist_find(nvl, ZPOOL_CONFIG_POOL_TXG, DATA_TYPE_UINT64,
NULL, &txg, NULL) != 0 ||
+ txg == 0 ||
nvlist_find(nvl, ZPOOL_CONFIG_TOP_GUID, DATA_TYPE_UINT64,
NULL, &top_guid, NULL) != 0 ||
nvlist_find(nvl, ZPOOL_CONFIG_POOL_GUID, DATA_TYPE_UINT64,
@@ -2092,7 +2124,7 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
nvlist_find(nvl, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64,
NULL, &guid, NULL) != 0) {
/*
- * Cache and spare devices end up here - just ignore
+ * Cache, spare and replaced devices end up here - just ignore
* them.
*/
nvlist_destroy(nvl);
@@ -2119,22 +2151,47 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
nvlist_destroy(nvl);
return (ENOMEM);
}
- } else {
- struct vdev *kid;
-
- STAILQ_FOREACH(kid, &spa->spa_root_vdev->v_children,
- v_childlink)
- if (kid->v_guid == top_guid && kid->v_txg < txg) {
- printf("ZFS: pool %s vdev %s ignoring stale "
- "label from txg 0x%jx, using 0x%jx@0x%jx\n",
- spa->spa_name, kid->v_name,
- kid->v_txg, guid, txg);
+ }
+
+ /*
+ * Check if configuration is already known. If configuration is known
+ * and txg numbers don't match, we got 2x2 scenarios here. First, is
+ * the label being read right now _newer_ than the one read before.
+ * Second, is the vdev that provided the stale label _present_ in the
+ * newer configuration. If neither is true, we completely ignore the
+ * label.
+ */
+ STAILQ_FOREACH(top, &spa->spa_root_vdev->v_children, v_childlink)
+ if (top->v_guid == top_guid) {
+ bool newer, present;
+
+ if (top->v_txg == txg)
+ break;
+ newer = (top->v_txg < txg);
+ present = newer ?
+ nvlist_find_vdev_guid(nvl, top->v_label) :
+ (vdev_find(&top->v_children, guid) != NULL);
+ printf("ZFS: pool %s vdev %s %s stale label from "
+ "0x%jx@0x%jx, %s 0x%jx@0x%jx\n",
+ spa->spa_name, top->v_name,
+ present ? "using" : "ignoring",
+ newer ? top->v_label : guid,
+ newer ? top->v_txg : txg,
+ present ? "referred by" : "using",
+ newer ? guid : top->v_label,
+ newer ? txg : top->v_txg);
+ if (newer) {
STAILQ_REMOVE(&spa->spa_root_vdev->v_children,
- kid, vdev, v_childlink);
- vdev_free(kid);
+ top, vdev, v_childlink);
+ vdev_free(top);
+ break;
+ } else if (present) {
break;
+ } else {
+ nvlist_destroy(nvl);
+ return (EIO);
}
- }
+ }
/*
* Get the vdev tree and create our in-core copy of it.
@@ -2142,14 +2199,22 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
* be some kind of alias (overlapping slices, dangerously dedicated
* disks etc).
*/
- vdev = vdev_find(guid);
+ vdev = vdev_find(&spa->spa_root_vdev->v_children, guid);
/* Has this vdev already been inited? */
if (vdev && vdev->v_phys_read) {
nvlist_destroy(nvl);
return (EIO);
}
- rc = vdev_init_from_label(spa, nvl);
+ if (nvlist_find(nvl, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST, NULL,
+ &vdevs, NULL)) {
+ printf("ZFS: can't find vdev details\n");
+ nvlist_destroy(nvl);
+ return (ENOENT);
+ }
+
+ rc = vdev_from_nvlist(spa, top_guid, guid, txg, vdevs);
+ nvlist_destroy(vdevs);
nvlist_destroy(nvl);
if (rc != 0)
return (rc);
@@ -2158,7 +2223,7 @@ vdev_probe(vdev_phys_read_t *_read, vdev_phys_write_t *_write, void *priv,
* We should already have created an incomplete vdev for this
* vdev. Find it and initialise it with our read proc.
*/
- vdev = vdev_find(guid);
+ vdev = vdev_find(&spa->spa_root_vdev->v_children, guid);
if (vdev != NULL) {
vdev->v_phys_read = _read;
vdev->v_phys_write = _write;
diff --git a/stand/loader.mk b/stand/loader.mk
index 0f2ff31a5343..4073e523e552 100644
--- a/stand/loader.mk
+++ b/stand/loader.mk
@@ -101,8 +101,6 @@ SRCS+= interp_simple.c
.error Unknown interpreter ${LOADER_INTERP}
.endif
-.include "${BOOTSRC}/veriexec.mk"
-
.if defined(BOOT_PROMPT_123)
CFLAGS+= -DBOOT_PROMPT_123
.endif
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index 33f1630d4baa..81427b5b18b6 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -386,6 +386,7 @@ options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
options IICHID_SAMPLING # Workaround missing GPIO INTR support
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
# EFI devices
device efidev # EFI pseudo-device
diff --git a/sys/arm/arm/pmu_fdt.c b/sys/arm/arm/pmu_fdt.c
index 3e733f3e1b18..dd6087652e38 100644
--- a/sys/arm/arm/pmu_fdt.c
+++ b/sys/arm/arm/pmu_fdt.c
@@ -152,7 +152,7 @@ pmu_parse_intr(device_t dev, struct pmu_softc *sc)
if (intr_is_per_cpu(sc->irq[0].res)) {
if (has_affinity) {
device_printf(dev,
- "Per CPU interupt have declared affinity\n");
+ "Per CPU interrupt have declared affinity\n");
err = ENXIO;
goto done;
}
@@ -179,7 +179,7 @@ pmu_parse_intr(device_t dev, struct pmu_softc *sc)
if (intr_is_per_cpu(sc->irq[i].res))
{
- device_printf(dev, "Unexpected per CPU interupt\n");
+ device_printf(dev, "Unexpected per CPU interrupt\n");
err = ENXIO;
goto done;
}
diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC
index 7394f3842d43..26b0c7bf0294 100644
--- a/sys/arm/conf/GENERIC
+++ b/sys/arm/conf/GENERIC
@@ -261,6 +261,7 @@ device aw_thermal # Allwinner Thermal Sensor Controller
# HID support
device hid # Generic HID support
device hidbus # Generic HID Bus
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
# Flattened Device Tree
options FDT # Configure using FDT/DTB data
diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c
index 7cd5327b9f1b..5c81c6cdce3d 100644
--- a/sys/arm64/arm64/elf32_machdep.c
+++ b/sys/arm64/arm64/elf32_machdep.c
@@ -195,7 +195,7 @@ freebsd32_fetch_syscall_args(struct thread *td)
register_t *ap;
struct syscall_args *sa;
int error, i, nap, narg;
- unsigned int args[4];
+ unsigned int args[6];
nap = 4;
p = td->td_proc;
diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev
index c5c364ffda04..719f272426dd 100644
--- a/sys/arm64/conf/std.dev
+++ b/sys/arm64/conf/std.dev
@@ -115,6 +115,7 @@ device mmcsd # mmc/sd flash cards
options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
# Firmware
device mmio_sram # Generic on-chip SRAM
diff --git a/sys/cddl/boot/zfs/zfsimpl.h b/sys/cddl/boot/zfs/zfsimpl.h
index 915aeeda3c9e..c9de1fe4c391 100644
--- a/sys/cddl/boot/zfs/zfsimpl.h
+++ b/sys/cddl/boot/zfs/zfsimpl.h
@@ -2021,11 +2021,11 @@ typedef struct vdev_indirect_config {
typedef struct vdev {
STAILQ_ENTRY(vdev) v_childlink; /* link in parent's child list */
- STAILQ_ENTRY(vdev) v_alllink; /* link in global vdev list */
vdev_list_t v_children; /* children of this vdev */
const char *v_name; /* vdev name */
uint64_t v_guid; /* vdev guid */
- uint64_t v_txg; /* most recent transaction */
+ uint64_t v_label; /* label instantiated from (top vdev) */
+ uint64_t v_txg; /* most recent transaction (top vdev) */
uint64_t v_id; /* index in parent */
uint64_t v_psize; /* physical device capacity */
int v_ashift; /* offset to block shift */
diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 3644ef80861b..5851ac08f083 100644
--- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
@@ -35,6 +35,7 @@
#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
+#include <linux/bitfield.h>
#include <linux/if_ether.h>
/* linux_80211.c */
@@ -121,7 +122,20 @@ enum ieee80211_rate_control_changed_flags {
/* 802.11-2016, 9.4.2.158.3 Supported VHT-MCS and NSS Set field. */
#define IEEE80211_VHT_EXT_NSS_BW_CAPABLE (1 << 13) /* part of tx_highest */
-#define IEEE80211_VHT_MAX_AMPDU_1024K 7 /* 9.4.2.56.3 A-MPDU Parameters field, Table 9-163 */
+/*
+ * 802.11-2020, 9.4.2.157.2 VHT Capabilities Information field,
+ * Table 9-271-Subfields of the VHT Capabilities Information field (continued).
+ */
+enum ieee80211_vht_max_ampdu_len_exp {
+ IEEE80211_VHT_MAX_AMPDU_8K = 0,
+ IEEE80211_VHT_MAX_AMPDU_16K = 1,
+ IEEE80211_VHT_MAX_AMPDU_32K = 2,
+ IEEE80211_VHT_MAX_AMPDU_64K = 3,
+ IEEE80211_VHT_MAX_AMPDU_128K = 4,
+ IEEE80211_VHT_MAX_AMPDU_256K = 5,
+ IEEE80211_VHT_MAX_AMPDU_512K = 6,
+ IEEE80211_VHT_MAX_AMPDU_1024K = 7,
+};
#define IEEE80211_WEP_IV_LEN 3 /* net80211: IEEE80211_WEP_IVLEN */
#define IEEE80211_WEP_ICV_LEN 4
diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index 18b34f0e90ec..044f348ef08b 100644
--- a/sys/compat/linuxkpi/common/include/net/cfg80211.h
+++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h
@@ -36,6 +36,7 @@
#include <linux/mutex.h>
#include <linux/if_ether.h>
#include <linux/ethtool.h>
+#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/netdevice.h>
#include <linux/random.h>
@@ -722,8 +723,10 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128TU 0x04
#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY 0x08
#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_32US 0x10
+#define IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_256US 0x10
#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY 0x20
#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US 0x40
+#define IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US 0x40
#define VENDOR_CMD_RAW_DATA (void *)(uintptr_t)(-ENOENT)
@@ -2065,6 +2068,18 @@ nl80211_chan_width_to_mhz(enum nl80211_chan_width width)
}
static __inline ssize_t
+wiphy_locked_debugfs_read(struct wiphy *wiphy, struct file *file,
+ char *buf, size_t bufsize, const char __user *userbuf, size_t count,
+ loff_t *ppos,
+ ssize_t (*handler)(struct wiphy *, struct file *, char *, size_t, void *),
+ void *data)
+{
+ TODO();
+ return (-ENXIO);
+}
+
+
+static __inline ssize_t
wiphy_locked_debugfs_write(struct wiphy *wiphy, struct file *file,
char *buf, size_t bufsize, const char __user *userbuf, size_t count,
ssize_t (*handler)(struct wiphy *, struct file *, char *, size_t, void *),
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index af3199c38939..2ed595095f9e 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1184,7 +1184,7 @@ struct wireless_dev *linuxkpi_ieee80211_vif_to_wdev(struct ieee80211_vif *);
void linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *);
void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *);
struct sk_buff *linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *,
- uint8_t *, uint8_t *, size_t, size_t);
+ const uint8_t *, const uint8_t *, size_t, size_t);
void linuxkpi_ieee80211_tx_status(struct ieee80211_hw *, struct sk_buff *);
void linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *,
struct ieee80211_tx_status *);
@@ -2161,8 +2161,8 @@ ieee80211_nullfunc_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
}
static __inline struct sk_buff *
-ieee80211_probereq_get(struct ieee80211_hw *hw, uint8_t *addr,
- uint8_t *ssid, size_t ssid_len, size_t tailroom)
+ieee80211_probereq_get(struct ieee80211_hw *hw, const uint8_t *addr,
+ const uint8_t *ssid, size_t ssid_len, size_t tailroom)
{
return (linuxkpi_ieee80211_probereq_get(hw, addr, ssid, ssid_len,
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 1d00e8da8f9a..a7d6003843ba 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -7668,8 +7668,8 @@ linuxkpi_ieee80211_queue_work(struct ieee80211_hw *hw,
}
struct sk_buff *
-linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *hw, uint8_t *addr,
- uint8_t *ssid, size_t ssid_len, size_t tailroom)
+linuxkpi_ieee80211_probereq_get(struct ieee80211_hw *hw, const uint8_t *addr,
+ const uint8_t *ssid, size_t ssid_len, size_t tailroom)
{
struct sk_buff *skb;
struct ieee80211_frame *wh;
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 2458756ae350..92e98aa57ebf 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2436,7 +2436,7 @@ options HID_DEBUG # enable debug msgs
device hidbus # HID bus
device hidmap # HID to evdev mapping
device hidraw # Raw access driver
-options HIDRAW_MAKE_UHID_ALIAS # install /dev/uhid alias
+options HIDRAW_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/hidraw
device hconf # Multitouch configuration TLC
device hcons # Consumer controls
device hgame # Generic game controllers
@@ -2446,6 +2446,8 @@ device hmt # HID multitouch (MS-compatible)
device hpen # Generic pen driver
device hsctrl # System controls
device ps4dshock # Sony PS4 DualShock 4 gamepad driver
+device u2f # FIDO/U2F authenticator
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
device xb360gp # XBox 360 gamepad driver
#####################################################################
diff --git a/sys/conf/files b/sys/conf/files
index be65ed20d6aa..d89813c70355 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1750,6 +1750,7 @@ dev/hid/hpen.c optional hpen
dev/hid/hsctrl.c optional hsctrl
dev/hid/ietp.c optional ietp
dev/hid/ps4dshock.c optional ps4dshock
+dev/hid/u2f.c optional u2f
dev/hid/xb360gp.c optional xb360gp
dev/hifn/hifn7751.c optional hifn
dev/hptiop/hptiop.c optional hptiop scbus
@@ -2280,6 +2281,8 @@ dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
+dev/ixgbe/ixgbe_e610.c optional ix inet | ixv inet \
+ compile-with "${NORMAL_C} -I$S/dev/ixgbe"
dev/ixgbe/ixgbe_dcb.c optional ix inet | ixv inet \
compile-with "${NORMAL_C} -I$S/dev/ixgbe"
dev/ixgbe/ixgbe_dcb_82598.c optional ix inet | ixv inet \
@@ -3448,7 +3451,6 @@ dev/virtio/mmio/virtio_mmio.c optional virtio_mmio
dev/virtio/mmio/virtio_mmio_acpi.c optional virtio_mmio acpi
dev/virtio/mmio/virtio_mmio_cmdline.c optional virtio_mmio
dev/virtio/mmio/virtio_mmio_fdt.c optional virtio_mmio fdt
-dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio
dev/virtio/network/if_vtnet.c optional vtnet
dev/virtio/balloon/virtio_balloon.c optional virtio_balloon
dev/virtio/block/virtio_blk.c optional virtio_blk
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 80548320c3fc..9b6ba03b78df 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -419,6 +419,9 @@ contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_avx512.S optional zfs com
contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse2.S optional zfs compile-with "${ZFS_S}"
contrib/openzfs/module/icp/asm-x86_64/blake3/blake3_sse41.S optional zfs compile-with "${ZFS_S}"
+# zfs AVX2 implementation of aes-gcm from BoringSSL
+contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S optional zfs compile-with "${ZFS_S}"
+
# zfs sha2 hash support
zfs-sha256-x86_64.o optional zfs \
dependency "$S/contrib/openzfs/module/icp/asm-x86_64/sha2/sha256-x86_64.S" \
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 0e4ffd92724e..bb3c7af82a4d 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -372,6 +372,19 @@ _ILINKS+= x86
_ILINKS+= i386
.endif
+.if ${MK_REPRODUCIBLE_BUILD} != "no"
+PREFIX_SYSDIR=/usr/src/sys
+PREFIX_OBJDIR=/usr/obj/usr/src/${MACHINE}.${MACHINE_CPUARCH}/sys/${KERN_IDENT}
+CFLAGS+= -ffile-prefix-map=${SYSDIR}=${PREFIX_SYSDIR}
+CFLAGS+= -ffile-prefix-map=${.OBJDIR}=${PREFIX_OBJDIR}
+.if defined(SYSROOT)
+CFLAGS+= -ffile-prefix-map=${SYSROOT}=/sysroot
+.endif
+.else
+PREFIX_SYSDIR=${SYSDIR}
+PREFIX_OBJDIR=${.OBJDIR}
+.endif
+
# Ensure that the link exists without depending on it when it exists.
# Ensure that debug info references the path in the source tree.
.for _link in ${_ILINKS}
@@ -379,9 +392,9 @@ _ILINKS+= i386
${SRCS} ${DEPENDOBJS}: ${_link}
.endif
.if ${_link} == "machine"
-CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include
+CFLAGS+= -fdebug-prefix-map=./machine=${PREFIX_SYSDIR}/${MACHINE}/include
.else
-CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include
+CFLAGS+= -fdebug-prefix-map=./${_link}=${PREFIX_SYSDIR}/${_link}/include
.endif
.endfor
@@ -454,7 +467,7 @@ config.o env.o hints.o vers.o vnode_if.o:
NEWVERS_ENV+= MAKE="${MAKE}"
.if ${MK_REPRODUCIBLE_BUILD} != "no"
-NEWVERS_ARGS+= -R
+NEWVERS_ARGS+= -R -d ${PREFIX_OBJDIR}
.endif
vers.c: .NOMETA_CMP $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP:Nvers.*}
${NEWVERS_ENV} sh $S/conf/newvers.sh ${NEWVERS_ARGS} ${KERN_IDENT}
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 78178065e15b..1fcfd6467e7f 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -214,7 +214,8 @@ ZFS_CFLAGS+= -I$S/contrib/openzfs/module/icp/include \
.if ${MACHINE_ARCH} == "amd64"
ZFS_CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
- -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW
+ -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \
+ -DHAVE_VAES -DHAVE_VPCLMULQDQ
.endif
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 645c04cdd135..0fd2d4050cf1 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -303,6 +303,25 @@ all: ${PROG}
beforedepend: ${_ILINKS}
beforebuild: ${_ILINKS}
+.if ${MK_REPRODUCIBLE_BUILD} != "no"
+PREFIX_SYSDIR=/usr/src/sys
+CFLAGS+= -ffile-prefix-map=${SYSDIR}=${PREFIX_SYSDIR}
+.if defined(KERNBUILDDIR)
+PREFIX_KERNBUILDDIR=/usr/obj/usr/src/${MACHINE}.${MACHINE_CPUARCH}/sys/${KERNBUILDDIR:T}
+PREFIX_OBJDIR=${PREFIX_KERNBUILDDIR}/modules/usr/src/sys/modules/${.OBJDIR:T}
+CFLAGS+= -ffile-prefix-map=${KERNBUILDDIR}=${PREFIX_KERNBUILDDIR}
+.else
+PREFIX_OBJDIR=/usr/obj/usr/src/${MACHINE}.${MACHINE_CPUARCH}/sys/modules/${.OBJDIR:T}
+.endif
+CFLAGS+= -ffile-prefix-map=${.OBJDIR}=${PREFIX_OBJDIR}
+.if defined(SYSROOT)
+CFLAGS+= -ffile-prefix-map=${SYSROOT}=/sysroot
+.endif
+.else
+PREFIX_SYSDIR=${SYSDIR}
+PREFIX_OBJDIR=${.OBJDIR}
+.endif
+
# Ensure that the links exist without depending on it when it exists which
# causes all the modules to be rebuilt when the directory pointed to changes.
# Ensure that debug info references the path in the source tree.
@@ -311,9 +330,9 @@ beforebuild: ${_ILINKS}
OBJS_DEPEND_GUESS+= ${_link}
.endif
.if ${_link} == "machine"
-CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include
+CFLAGS+= -fdebug-prefix-map=./machine=${PREFIX_SYSDIR}/${MACHINE}/include
.else
-CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include
+CFLAGS+= -fdebug-prefix-map=./${_link}=${PREFIX_SYSDIR}/${_link}/include
.endif
.endfor
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 66926805052c..8b60da95741e 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -110,14 +110,18 @@ COPYRIGHT="$COPYRIGHT
# We expand include_metadata later since we may set it to the
# future value of modified.
+builddir=$(pwd)
include_metadata=yes
modified=no
-while getopts crRvV: opt; do
+while getopts cd:rRvV: opt; do
case "$opt" in
c)
echo "$COPYRIGHT"
exit 0
;;
+ d)
+ builddir=$OPTARG
+ ;;
r)
include_metadata=no
;;
@@ -187,7 +191,7 @@ fi
touch version
v=$(cat version)
u=${USER:-root}
-d=$(pwd)
+d=$builddir
h=${HOSTNAME:-$(hostname)}
if [ -n "$SOURCE_DATE_EPOCH" ]; then
if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then
diff --git a/sys/conf/options b/sys/conf/options
index a637b0b74a77..bb3d08e88e21 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -1009,6 +1009,7 @@ IICHID_DEBUG opt_hid.h
IICHID_SAMPLING opt_hid.h
HKBD_DFLT_KEYMAP opt_hkbd.h
HIDRAW_MAKE_UHID_ALIAS opt_hid.h
+U2F_MAKE_UHID_ALIAS opt_hid.h
# kenv options
# The early kernel environment (loader environment, config(8)-provided static)
diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
index 885a64037f89..70a2364f1fc6 100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh
@@ -109,7 +109,7 @@ case "$OS" in
KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"
;;
freebsd15-0c)
- FreeBSD="15.0-CURRENT"
+ FreeBSD="15.0-PRERELEASE"
OSNAME="FreeBSD $FreeBSD"
OSv="freebsd14.0"
URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz"
diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh
index 17e976ebcc39..2807d9e77127 100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh
@@ -5,12 +5,13 @@
#
# Usage:
#
-# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--poweroff]
-# [--release][--repo][--tarball]
+# qemu-4-build-vm.sh OS [--enable-debug][--dkms][--patch-level NUM]
+# [--poweroff][--release][--repo][--tarball]
#
# OS: OS name like 'fedora41'
# --enable-debug: Build RPMs with '--enable-debug' (for testing)
# --dkms: Build DKMS RPMs as well
+# --patch-level NUM: Use a custom patch level number for packages.
# --poweroff: Power-off the VM after building
# --release Build zfs-release*.rpm as well
# --repo After building everything, copy RPMs into /tmp/repo
@@ -21,6 +22,7 @@
ENABLE_DEBUG=""
DKMS=""
+PATCH_LEVEL=""
POWEROFF=""
RELEASE=""
REPO=""
@@ -35,6 +37,11 @@ while [[ $# -gt 0 ]]; do
DKMS=1
shift
;;
+ --patch-level)
+ PATCH_LEVEL=$2
+ shift
+ shift
+ ;;
--poweroff)
POWEROFF=1
shift
@@ -215,6 +222,10 @@ function rpm_build_and_install() {
run ./autogen.sh
echo "##[endgroup]"
+ if [ -n "$PATCH_LEVEL" ] ; then
+ sed -i -E 's/(Release:\s+)1/\1'$PATCH_LEVEL'/g' META
+ fi
+
echo "##[group]Configure"
run ./configure --enable-debuginfo $extra
echo "##[endgroup]"
@@ -328,7 +339,13 @@ fi
# almalinux9.5
# fedora42
source /etc/os-release
-sudo hostname "$ID$VERSION_ID"
+ if which hostnamectl &> /dev/null ; then
+ # Fedora 42+ use hostnamectl
+ sudo hostnamectl set-hostname "$ID$VERSION_ID"
+ sudo hostnamectl set-hostname --pretty "$ID$VERSION_ID"
+else
+ sudo hostname "$ID$VERSION_ID"
+fi
# save some sysinfo
uname -a > /var/tmp/uname.txt
diff --git a/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml b/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml
index 5b5afe746859..d8a95954fe1a 100644
--- a/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml
+++ b/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml
@@ -32,6 +32,11 @@ on:
options:
- "Build RPMs"
- "Test repo"
+ patch_level:
+ type: string
+ required: false
+ default: ""
+ description: "(optional) patch level number"
repo_url:
type: string
required: false
@@ -78,7 +83,13 @@ jobs:
mkdir -p /tmp/repo
ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}
else
- .github/workflows/scripts/qemu-4-build.sh --repo --release --dkms --tarball ${{ matrix.os }}
+ EXTRA=""
+ if [ -n "${{ github.event.inputs.patch_level }}" ] ; then
+ EXTRA="--patch-level ${{ github.event.inputs.patch_level }}"
+ fi
+
+ .github/workflows/scripts/qemu-4-build.sh $EXTRA \
+ --repo --release --dkms --tarball ${{ matrix.os }}
fi
- name: Prepare artifacts
diff --git a/sys/contrib/openzfs/.mailmap b/sys/contrib/openzfs/.mailmap
index b6d942c000b8..e6f09c6c9d43 100644
--- a/sys/contrib/openzfs/.mailmap
+++ b/sys/contrib/openzfs/.mailmap
@@ -23,6 +23,7 @@
# These maps are making names consistent where they have varied but the email
# address has never changed. In most cases, the full name is in the
# Signed-off-by of a commit with a matching author.
+Achill Gilgenast <achill@achill.org>
Ahelenia Ziemiańska <nabijaczleweli@gmail.com>
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Alex John <alex@stty.io>
@@ -37,6 +38,7 @@ Crag Wang <crag0715@gmail.com>
Damian Szuberski <szuberskidamian@gmail.com>
Daniel Kolesa <daniel@octaforge.org>
Debabrata Banerjee <dbavatar@gmail.com>
+Diwakar Kristappagari <diwakar-k@hpe.com>
Finix Yan <yanchongwen@hotmail.com>
Gaurav Kumar <gauravk.18@gmail.com>
Gionatan Danti <g.danti@assyoma.it>
@@ -145,6 +147,7 @@ Gaurav Kumar <gauravk.18@gmail.com> <gaurkuma@users.noreply.github.com>
George Gaydarov <git@gg7.io> <gg7@users.noreply.github.com>
Georgy Yakovlev <gyakovlev@gentoo.org> <168902+gyakovlev@users.noreply.github.com>
Gerardwx <gerardw@alum.mit.edu> <Gerardwx@users.noreply.github.com>
+Germano Massullo <germano.massullo@gmail.com> <Germano0@users.noreply.github.com>
Gian-Carlo DeFazio <defazio1@llnl.gov> <defaziogiancarlo@users.noreply.github.com>
Giuseppe Di Natale <dinatale2@llnl.gov> <dinatale2@users.noreply.github.com>
Hajo Möller <dasjoe@gmail.com> <dasjoe@users.noreply.github.com>
@@ -164,6 +167,7 @@ John Ramsden <johnramsden@riseup.net> <johnramsden@users.noreply.github.com>
Jonathon Fernyhough <jonathon@m2x.dev> <559369+jonathonf@users.noreply.github.com>
Jose Luis Duran <jlduran@gmail.com> <jlduran@users.noreply.github.com>
Justin Hibbits <chmeeedalf@gmail.com> <chmeeedalf@users.noreply.github.com>
+Kaitlin Hoang <kthoang@amazon.com> <khoang98@users.noreply.github.com>
Kevin Greene <kevin.greene@delphix.com> <104801862+kxgreene@users.noreply.github.com>
Kevin Jin <lostking2008@hotmail.com> <33590050+jxdking@users.noreply.github.com>
Kevin P. Fleming <kevin@km6g.us> <kpfleming@users.noreply.github.com>
diff --git a/sys/contrib/openzfs/AUTHORS b/sys/contrib/openzfs/AUTHORS
index a9d249a66f1e..6c34c07f39ef 100644
--- a/sys/contrib/openzfs/AUTHORS
+++ b/sys/contrib/openzfs/AUTHORS
@@ -10,6 +10,7 @@ PAST MAINTAINERS:
CONTRIBUTORS:
Aaron Fineman <abyxcos@gmail.com>
+ Achill Gilgenast <achill@achill.org>
Adam D. Moss <c@yotes.com>
Adam Leventhal <ahl@delphix.com>
Adam Stevko <adam.stevko@gmail.com>
@@ -59,6 +60,7 @@ CONTRIBUTORS:
Andreas Buschmann <andreas.buschmann@tech.net.de>
Andreas Dilger <adilger@intel.com>
Andreas Vögele <andreas@andreasvoegele.com>
+ Andres <a-d-j-i@users.noreply.github.com>
Andrew Barnes <barnes333@gmail.com>
Andrew Hamilton <ahamilto@tjhsst.edu>
Andrew Innes <andrew.c12@gmail.com>
@@ -72,6 +74,7 @@ CONTRIBUTORS:
Andrey Prokopenko <job@terem.fr>
Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
Andriy Gapon <avg@freebsd.org>
+ Andriy Tkachuk <andriy.tkachuk@seagate.com>
Andy Bakun <github@thwartedefforts.org>
Andy Fiddaman <omnios@citrus-it.co.uk>
Aniruddha Shankar <k@191a.net>
@@ -120,6 +123,7 @@ CONTRIBUTORS:
Caleb James DeLisle <calebdelisle@lavabit.com>
Cameron Harr <harr1@llnl.gov>
Cao Xuewen <cao.xuewen@zte.com.cn>
+ Carl George <carlwgeorge@gmail.com>
Carlo Landmeter <clandmeter@gmail.com>
Carlos Alberto Lopez Perez <clopez@igalia.com>
Cedric Maunoury <cedric.maunoury@gmail.com>
@@ -200,6 +204,7 @@ CONTRIBUTORS:
Dimitri John Ledkov <xnox@ubuntu.com>
Dimitry Andric <dimitry@andric.com>
Dirkjan Bussink <d.bussink@gmail.com>
+ Diwakar Kristappagari <diwakar-k@hpe.com>
Dmitry Khasanov <pik4ez@gmail.com>
Dominic Pearson <dsp@technoanimal.net>
Dominik Hassler <hadfl@omniosce.org>
@@ -250,6 +255,7 @@ CONTRIBUTORS:
George Wilson <gwilson@delphix.com>
Georgy Yakovlev <ya@sysdump.net>
Gerardwx <gerardw@alum.mit.edu>
+ Germano Massullo <germano.massullo@gmail.com>
Gian-Carlo DeFazio <defazio1@llnl.gov>
Gionatan Danti <g.danti@assyoma.it>
Giuseppe Di Natale <guss80@gmail.com>
@@ -287,6 +293,7 @@ CONTRIBUTORS:
Igor K <igor@dilos.org>
Igor Kozhukhov <ikozhukhov@gmail.com>
Igor Lvovsky <ilvovsky@gmail.com>
+ Igor Ostapenko <pm@igoro.pro>
ilbsmart <wgqimut@gmail.com>
Ilkka Sovanto <github@ilkka.kapsi.fi>
illiliti <illiliti@protonmail.com>
@@ -326,6 +333,7 @@ CONTRIBUTORS:
Jinshan Xiong <jinshan.xiong@intel.com>
Jitendra Patidar <jitendra.patidar@nutanix.com>
JK Dingwall <james@dingwall.me.uk>
+ Joel Low <joel@joelsplace.sg>
Joe Stein <joe.stein@delphix.com>
John-Mark Gurney <jmg@funkthat.com>
John Albietz <inthecloud247@gmail.com>
@@ -374,6 +382,7 @@ CONTRIBUTORS:
Kevin Jin <lostking2008@hotmail.com>
Kevin P. Fleming <kevin@km6g.us>
Kevin Tanguy <kevin.tanguy@ovh.net>
+ khoang98 <khoang98@users.noreply.github.com>
KireinaHoro <i@jsteward.moe>
Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
Kleber Tarcísio <klebertarcisio@yahoo.com.br>
@@ -447,6 +456,7 @@ CONTRIBUTORS:
Max Zettlmeißl <max@zettlmeissl.de>
Md Islam <mdnahian@outlook.com>
megari <megari@iki.fi>
+ Meriel Luna Mittelbach <lunarlambda@gmail.com>
Michael D Labriola <michael.d.labriola@gmail.com>
Michael Franzl <michael@franzl.name>
Michael Gebetsroither <michael@mgeb.org>
@@ -494,6 +504,7 @@ CONTRIBUTORS:
Orivej Desh <orivej@gmx.fr>
Pablo Correa Gómez <ablocorrea@hotmail.com>
Palash Gandhi <pbg4930@rit.edu>
+ Patrick Fasano <patrick@patrickfasano.com>
Patrick Mooney <pmooney@pfmooney.com>
Patrik Greco <sikevux@sikevux.se>
Paul B. Henson <henson@acm.org>
@@ -535,6 +546,7 @@ CONTRIBUTORS:
Remy Blank <remy.blank@pobox.com>
renelson <bnelson@nelsonbe.com>
Reno Reckling <e-github@wthack.de>
+ René Wirnata <rene.wirnata@pandascience.net>
Ricardo M. Correia <ricardo.correia@oracle.com>
Riccardo Schirone <rschirone91@gmail.com>
Richard Allen <belperite@gmail.com>
@@ -640,6 +652,7 @@ CONTRIBUTORS:
tleydxdy <shironeko.github@tesaguri.club>
Tobin Harding <me@tobin.cc>
Todd Seidelmann <seidelma@users.noreply.github.com>
+ Todd Zullinger <tmz@pobox.com>
Tom Caputi <tcaputi@datto.com>
Tom Matthews <tom@axiom-partners.com>
Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
diff --git a/sys/contrib/openzfs/META b/sys/contrib/openzfs/META
index 47f0795bfa11..1a9c671feac6 100644
--- a/sys/contrib/openzfs/META
+++ b/sys/contrib/openzfs/META
@@ -6,5 +6,5 @@ Release: 1
Release-Tags: relext
License: CDDL
Author: OpenZFS
-Linux-Maximum: 6.15
+Linux-Maximum: 6.16
Linux-Minimum: 4.18
diff --git a/sys/contrib/openzfs/cmd/zdb/zdb.c b/sys/contrib/openzfs/cmd/zdb/zdb.c
index 66d5fbd6adbe..a5f23be2aaaf 100644
--- a/sys/contrib/openzfs/cmd/zdb/zdb.c
+++ b/sys/contrib/openzfs/cmd/zdb/zdb.c
@@ -127,6 +127,7 @@ static zfs_range_tree_t *mos_refd_objs;
static spa_t *spa;
static objset_t *os;
static boolean_t kernel_init_done;
+static boolean_t corruption_found = B_FALSE;
static void snprintf_blkptr_compact(char *, size_t, const blkptr_t *,
boolean_t);
@@ -250,6 +251,7 @@ sublivelist_verify_func(void *args, dsl_deadlist_entry_t *dle)
&e->svbr_blk, B_TRUE);
(void) printf("\tERROR: %d unmatched FREE(s): %s\n",
e->svbr_refcnt, blkbuf);
+ corruption_found = B_TRUE;
}
zfs_btree_destroy(&sv->sv_pair);
@@ -405,6 +407,7 @@ verify_livelist_allocs(metaslab_verify_t *mv, uint64_t txg,
(u_longlong_t)DVA_GET_ASIZE(&found->svb_dva),
(u_longlong_t)found->svb_allocated_txg,
(u_longlong_t)txg);
+ corruption_found = B_TRUE;
}
}
}
@@ -426,6 +429,7 @@ metaslab_spacemap_validation_cb(space_map_entry_t *sme, void *arg)
(u_longlong_t)txg, (u_longlong_t)offset,
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
(u_longlong_t)mv->mv_msid);
+ corruption_found = B_TRUE;
} else {
zfs_range_tree_add(mv->mv_allocated,
offset, size);
@@ -439,6 +443,7 @@ metaslab_spacemap_validation_cb(space_map_entry_t *sme, void *arg)
(u_longlong_t)txg, (u_longlong_t)offset,
(u_longlong_t)size, (u_longlong_t)mv->mv_vdid,
(u_longlong_t)mv->mv_msid);
+ corruption_found = B_TRUE;
} else {
zfs_range_tree_remove(mv->mv_allocated,
offset, size);
@@ -526,6 +531,7 @@ mv_populate_livelist_allocs(metaslab_verify_t *mv, sublivelist_verify_t *sv)
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
+ corruption_found = B_TRUE;
continue;
}
@@ -542,6 +548,7 @@ mv_populate_livelist_allocs(metaslab_verify_t *mv, sublivelist_verify_t *sv)
(u_longlong_t)DVA_GET_VDEV(&svb->svb_dva),
(u_longlong_t)DVA_GET_OFFSET(&svb->svb_dva),
(u_longlong_t)DVA_GET_ASIZE(&svb->svb_dva));
+ corruption_found = B_TRUE;
continue;
}
@@ -655,6 +662,7 @@ livelist_metaslab_validate(spa_t *spa)
}
(void) printf("ERROR: Found livelist blocks marked as allocated "
"for indirect vdevs:\n");
+ corruption_found = B_TRUE;
zfs_btree_index_t *where = NULL;
sublivelist_verify_block_t *svb;
@@ -827,7 +835,7 @@ usage(void)
(void) fprintf(stderr, "Specify an option more than once (e.g. -bb) "
"to make only that option verbose\n");
(void) fprintf(stderr, "Default is to dump everything non-verbosely\n");
- zdb_exit(1);
+ zdb_exit(2);
}
static void
@@ -2583,19 +2591,17 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
}
}
-static void
+static u_longlong_t
print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
const dnode_phys_t *dnp)
{
char blkbuf[BP_SPRINTF_LEN];
+ u_longlong_t offset;
int l;
- if (!BP_IS_EMBEDDED(bp)) {
- ASSERT3U(BP_GET_TYPE(bp), ==, dnp->dn_type);
- ASSERT3U(BP_GET_LEVEL(bp), ==, zb->zb_level);
- }
+ offset = (u_longlong_t)blkid2offset(dnp, bp, zb);
- (void) printf("%16llx ", (u_longlong_t)blkid2offset(dnp, bp, zb));
+ (void) printf("%16llx ", offset);
ASSERT(zb->zb_level >= 0);
@@ -2610,19 +2616,38 @@ print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, B_FALSE);
if (dump_opt['Z'] && BP_GET_COMPRESS(bp) == ZIO_COMPRESS_ZSTD)
snprintf_zstd_header(spa, blkbuf, sizeof (blkbuf), bp);
- (void) printf("%s\n", blkbuf);
+ (void) printf("%s", blkbuf);
+
+ if (!BP_IS_EMBEDDED(bp)) {
+ if (BP_GET_TYPE(bp) != dnp->dn_type) {
+ (void) printf(" (ERROR: Block pointer type "
+ "(%llu) does not match dnode type (%hhu))",
+ BP_GET_TYPE(bp), dnp->dn_type);
+ corruption_found = B_TRUE;
+ }
+ if (BP_GET_LEVEL(bp) != zb->zb_level) {
+ (void) printf(" (ERROR: Block pointer level "
+ "(%llu) does not match bookmark level (%lld))",
+ BP_GET_LEVEL(bp), (u_longlong_t)zb->zb_level);
+ corruption_found = B_TRUE;
+ }
+ }
+ (void) printf("\n");
+
+ return (offset);
}
static int
visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
blkptr_t *bp, const zbookmark_phys_t *zb)
{
+ u_longlong_t offset;
int err = 0;
if (BP_GET_BIRTH(bp) == 0)
return (0);
- print_indirect(spa, bp, zb, dnp);
+ offset = print_indirect(spa, bp, zb, dnp);
if (BP_GET_LEVEL(bp) > 0 && !BP_IS_HOLE(bp)) {
arc_flags_t flags = ARC_FLAG_WAIT;
@@ -2652,8 +2677,15 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
break;
fill += BP_GET_FILL(cbp);
}
- if (!err)
- ASSERT3U(fill, ==, BP_GET_FILL(bp));
+ if (!err) {
+ if (fill != BP_GET_FILL(bp)) {
+ (void) printf("%16llx: Block pointer "
+ "fill (%llu) does not match calculated "
+ "value (%llu)\n", offset, BP_GET_FILL(bp),
+ (u_longlong_t)fill);
+ corruption_found = B_TRUE;
+ }
+ }
arc_buf_destroy(buf, &buf);
}
@@ -2909,6 +2941,7 @@ dump_full_bpobj(bpobj_t *bpo, const char *name, int indent)
(void) printf("ERROR %u while trying to open "
"subobj id %llu\n",
error, (u_longlong_t)subobj);
+ corruption_found = B_TRUE;
continue;
}
dump_full_bpobj(&subbpo, "subobj", indent + 1);
@@ -3088,6 +3121,7 @@ bpobj_count_refd(bpobj_t *bpo)
(void) printf("ERROR %u while trying to open "
"subobj id %llu\n",
error, (u_longlong_t)subobj);
+ corruption_found = B_TRUE;
continue;
}
bpobj_count_refd(&subbpo);
@@ -9634,7 +9668,7 @@ main(int argc, char **argv)
} else if (objset_str && !zdb_numeric(objset_str + 1) &&
dump_opt['N']) {
printf("Supply a numeric objset ID with -N\n");
- error = 1;
+ error = 2;
goto fini;
}
} else {
@@ -9936,5 +9970,8 @@ fini:
if (kernel_init_done)
kernel_fini();
+ if (corruption_found && error == 0)
+ error = 3;
+
return (error);
}
diff --git a/sys/contrib/openzfs/config/kernel-mkdir.m4 b/sys/contrib/openzfs/config/kernel-mkdir.m4
index c1aebc387abe..78b32447c593 100644
--- a/sys/contrib/openzfs/config/kernel-mkdir.m4
+++ b/sys/contrib/openzfs/config/kernel-mkdir.m4
@@ -84,6 +84,8 @@ AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
AC_DEFINE(HAVE_IOPS_MKDIR_DENTRY, 1,
[iops->mkdir() returns struct dentry*])
],[
+ AC_MSG_RESULT(no)
+
dnl #
dnl # 6.3 API change
dnl # mkdir() takes struct mnt_idmap * as the first arg
diff --git a/sys/contrib/openzfs/config/toolchain-simd.m4 b/sys/contrib/openzfs/config/toolchain-simd.m4
index 344807fc830c..f18c91007cde 100644
--- a/sys/contrib/openzfs/config/toolchain-simd.m4
+++ b/sys/contrib/openzfs/config/toolchain-simd.m4
@@ -24,6 +24,8 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD], [
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_AES
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_PCLMULQDQ
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE
+ ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
+ ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVEOPT
ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVES
@@ -447,6 +449,48 @@ AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_MOVBE], [
])
dnl #
+dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES
+dnl #
+AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VAES], [
+ AC_MSG_CHECKING([whether host toolchain supports VAES])
+
+ AC_LINK_IFELSE([AC_LANG_SOURCE([
+ [
+ int main()
+ {
+ __asm__ __volatile__("vaesenc %ymm0, %ymm1, %ymm0");
+ return (0);
+ }
+ ]])], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_VAES], 1, [Define if host toolchain supports VAES])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])
+
+dnl #
+dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ
+dnl #
+AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_VPCLMULQDQ], [
+ AC_MSG_CHECKING([whether host toolchain supports VPCLMULQDQ])
+
+ AC_LINK_IFELSE([AC_LANG_SOURCE([
+ [
+ int main()
+ {
+ __asm__ __volatile__("vpclmulqdq %0, %%ymm4, %%ymm3, %%ymm5" :: "i"(0));
+ return (0);
+ }
+ ]])], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_VPCLMULQDQ], 1, [Define if host toolchain supports VPCLMULQDQ])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])
+
+dnl #
dnl # ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE
dnl #
AC_DEFUN([ZFS_AC_CONFIG_TOOLCHAIN_CAN_BUILD_XSAVE], [
diff --git a/sys/contrib/openzfs/contrib/debian/control b/sys/contrib/openzfs/contrib/debian/control
index 96a2bdd88665..c5358dedc0fd 100644
--- a/sys/contrib/openzfs/contrib/debian/control
+++ b/sys/contrib/openzfs/contrib/debian/control
@@ -100,8 +100,8 @@ Depends: ${misc:Depends}, ${shlibs:Depends}
# The libcurl4 is loaded through dlopen("libcurl.so.4").
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521
Recommends: libcurl4
-Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux
-Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux
+Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4
+Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4
Conflicts: libzfs6linux
Description: OpenZFS filesystem library for Linux - general support
OpenZFS is a storage platform that encompasses the functionality of
@@ -128,8 +128,8 @@ Package: openzfs-libzpool6
Section: contrib/libs
Architecture: linux-any
Depends: ${misc:Depends}, ${shlibs:Depends}
-Breaks: libzpool2, libzpool5, libzpool5linux, libzpool6linux
-Replaces: libzpool2, libzpool5, libzpool5linux, libzpool6linux
+Breaks: libzpool2, libzpool5, libzpool6linux
+Replaces: libzpool2, libzpool5, libzpool6linux
Conflicts: libzpool6linux
Description: OpenZFS pool library for Linux
OpenZFS is a storage platform that encompasses the functionality of
diff --git a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE
new file mode 100644
index 000000000000..04c03a37e0cb
--- /dev/null
+++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/LICENSE
@@ -0,0 +1,253 @@
+BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
+licensing. Files that are completely new have a Google copyright and an ISC
+license. This license is reproduced at the bottom of this file.
+
+Contributors to BoringSSL are required to follow the CLA rules for Chromium:
+https://cla.developers.google.com/clas
+
+Files in third_party/ have their own licenses, as described therein. The MIT
+license, for third_party/fiat, which, unlike other third_party directories, is
+compiled into non-test libraries, is included below.
+
+The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
+OpenSSL License and the original SSLeay license apply to the toolkit. See below
+for the actual license texts. Actually both licenses are BSD-style Open Source
+licenses. In case of any license issues related to OpenSSL please contact
+openssl-core@openssl.org.
+
+The following are Google-internal bug numbers where explicit permission from
+some authors is recorded for use of their work. (This is purely for our own
+record keeping.)
+ 27287199
+ 27287880
+ 27287883
+ 263291445
+
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+
+ISC license used for completely new code in BoringSSL:
+
+/* Copyright 2015 The BoringSSL Authors
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+
+The code in third_party/fiat carries the MIT license:
+
+Copyright (c) 2015-2016 the fiat-crypto authors (see
+https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+Licenses for support code
+-------------------------
+
+Parts of the TLS test suite are under the Go license. This code is not included
+in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so
+distributing code linked against BoringSSL does not trigger this license:
+
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+BoringSSL uses the Chromium test infrastructure to run a continuous build,
+trybots etc. The scripts which manage this, and the script for generating build
+metadata, are under the Chromium license. Distributing code linked against
+BoringSSL does not trigger this license.
+
+Copyright 2015 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README
new file mode 100644
index 000000000000..aa6fb6d477fa
--- /dev/null
+++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/README
@@ -0,0 +1,11 @@
+This directory contains the original BoringSSL [1] GCM x86-64 assembly
+files [2].
+
+The assembler files where then further modified to fit the ICP conventions.
+
+The main purpose to include these files (and the original ones) here, is to
+serve as a reference if upstream changes need to be applied to the files
+included and modified in the ICP.
+
+[1] https://github.com/google/boringssl
+[2] https://github.com/google/boringssl/blob/d5440dd2c2c500ac2d3bba4afec47a054b4d99ae/gen/bcm/aes-gcm-avx2-x86_64-linux.S
diff --git a/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S
new file mode 100644
index 000000000000..e7327c9de872
--- /dev/null
+++ b/sys/contrib/openzfs/contrib/icp/gcm-simd/boringssl/aes-gcm-avx2-x86_64-linux.S
@@ -0,0 +1,1328 @@
+// SPDX-License-Identifier: Apache-2.0
+// This file is generated from a similarly-named Perl script in the BoringSSL
+// source tree. Do not edit by hand.
+
+#include <openssl/asm_base.h>
+
+#if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__)
+.section .rodata
+.align 16
+
+
+.Lbswap_mask:
+.quad 0x08090a0b0c0d0e0f, 0x0001020304050607
+
+
+
+
+
+
+
+
+.Lgfpoly:
+.quad 1, 0xc200000000000000
+
+
+.Lgfpoly_and_internal_carrybit:
+.quad 1, 0xc200000000000001
+
+.align 32
+
+.Lctr_pattern:
+.quad 0, 0
+.quad 1, 0
+.Linc_2blocks:
+.quad 2, 0
+.quad 2, 0
+
+.text
+.globl gcm_init_vpclmulqdq_avx2
+.hidden gcm_init_vpclmulqdq_avx2
+.type gcm_init_vpclmulqdq_avx2,@function
+.align 32
+gcm_init_vpclmulqdq_avx2:
+.cfi_startproc
+
+_CET_ENDBR
+
+
+
+
+
+ vpshufd $0x4e,(%rsi),%xmm3
+
+
+
+
+
+ vpshufd $0xd3,%xmm3,%xmm0
+ vpsrad $31,%xmm0,%xmm0
+ vpaddq %xmm3,%xmm3,%xmm3
+ vpand .Lgfpoly_and_internal_carrybit(%rip),%xmm0,%xmm0
+ vpxor %xmm0,%xmm3,%xmm3
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm6
+
+
+ vpclmulqdq $0x00,%xmm3,%xmm3,%xmm0
+ vpclmulqdq $0x01,%xmm3,%xmm3,%xmm1
+ vpclmulqdq $0x10,%xmm3,%xmm3,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+ vpclmulqdq $0x01,%xmm0,%xmm6,%xmm2
+ vpshufd $0x4e,%xmm0,%xmm0
+ vpxor %xmm0,%xmm1,%xmm1
+ vpxor %xmm2,%xmm1,%xmm1
+ vpclmulqdq $0x11,%xmm3,%xmm3,%xmm5
+ vpclmulqdq $0x01,%xmm1,%xmm6,%xmm0
+ vpshufd $0x4e,%xmm1,%xmm1
+ vpxor %xmm1,%xmm5,%xmm5
+ vpxor %xmm0,%xmm5,%xmm5
+
+
+
+ vinserti128 $1,%xmm3,%ymm5,%ymm3
+ vinserti128 $1,%xmm5,%ymm5,%ymm5
+
+
+ vpclmulqdq $0x00,%ymm5,%ymm3,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm3,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm3,%ymm4
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+
+
+ vmovdqu %ymm3,96(%rdi)
+ vmovdqu %ymm4,64(%rdi)
+
+
+
+ vpunpcklqdq %ymm3,%ymm4,%ymm0
+ vpunpckhqdq %ymm3,%ymm4,%ymm1
+ vpxor %ymm1,%ymm0,%ymm0
+ vmovdqu %ymm0,128+32(%rdi)
+
+
+ vpclmulqdq $0x00,%ymm5,%ymm4,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm4,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm4,%ymm3
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm3,%ymm3
+ vpxor %ymm0,%ymm3,%ymm3
+
+ vpclmulqdq $0x00,%ymm5,%ymm3,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm3,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm3,%ymm4
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vmovdqu %ymm3,32(%rdi)
+ vmovdqu %ymm4,0(%rdi)
+
+
+
+ vpunpcklqdq %ymm3,%ymm4,%ymm0
+ vpunpckhqdq %ymm3,%ymm4,%ymm1
+ vpxor %ymm1,%ymm0,%ymm0
+ vmovdqu %ymm0,128(%rdi)
+
+ vzeroupper
+ ret
+
+.cfi_endproc
+.size gcm_init_vpclmulqdq_avx2, . - gcm_init_vpclmulqdq_avx2
+.globl gcm_gmult_vpclmulqdq_avx2
+.hidden gcm_gmult_vpclmulqdq_avx2
+.type gcm_gmult_vpclmulqdq_avx2,@function
+.align 32
+gcm_gmult_vpclmulqdq_avx2:
+.cfi_startproc
+
+_CET_ENDBR
+
+
+
+ vmovdqu (%rdi),%xmm0
+ vmovdqu .Lbswap_mask(%rip),%xmm1
+ vmovdqu 128-16(%rsi),%xmm2
+ vmovdqu .Lgfpoly(%rip),%xmm3
+ vpshufb %xmm1,%xmm0,%xmm0
+
+ vpclmulqdq $0x00,%xmm2,%xmm0,%xmm4
+ vpclmulqdq $0x01,%xmm2,%xmm0,%xmm5
+ vpclmulqdq $0x10,%xmm2,%xmm0,%xmm6
+ vpxor %xmm6,%xmm5,%xmm5
+ vpclmulqdq $0x01,%xmm4,%xmm3,%xmm6
+ vpshufd $0x4e,%xmm4,%xmm4
+ vpxor %xmm4,%xmm5,%xmm5
+ vpxor %xmm6,%xmm5,%xmm5
+ vpclmulqdq $0x11,%xmm2,%xmm0,%xmm0
+ vpclmulqdq $0x01,%xmm5,%xmm3,%xmm4
+ vpshufd $0x4e,%xmm5,%xmm5
+ vpxor %xmm5,%xmm0,%xmm0
+ vpxor %xmm4,%xmm0,%xmm0
+
+
+ vpshufb %xmm1,%xmm0,%xmm0
+ vmovdqu %xmm0,(%rdi)
+ ret
+
+.cfi_endproc
+.size gcm_gmult_vpclmulqdq_avx2, . - gcm_gmult_vpclmulqdq_avx2
+.globl gcm_ghash_vpclmulqdq_avx2
+.hidden gcm_ghash_vpclmulqdq_avx2
+.type gcm_ghash_vpclmulqdq_avx2,@function
+.align 32
+gcm_ghash_vpclmulqdq_avx2:
+.cfi_startproc
+
+_CET_ENDBR
+
+
+
+
+
+
+ vmovdqu .Lbswap_mask(%rip),%xmm6
+ vmovdqu .Lgfpoly(%rip),%xmm7
+
+
+ vmovdqu (%rdi),%xmm5
+ vpshufb %xmm6,%xmm5,%xmm5
+
+
+ cmpq $32,%rcx
+ jb .Lghash_lastblock
+
+
+
+ vinserti128 $1,%xmm6,%ymm6,%ymm6
+ vinserti128 $1,%xmm7,%ymm7,%ymm7
+
+ cmpq $127,%rcx
+ jbe .Lghash_loop_1x
+
+
+ vmovdqu 128(%rsi),%ymm8
+ vmovdqu 128+32(%rsi),%ymm9
+.Lghash_loop_4x:
+
+ vmovdqu 0(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 0(%rsi),%ymm2
+ vpxor %ymm5,%ymm1,%ymm1
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x00,%ymm8,%ymm0,%ymm4
+
+ vmovdqu 32(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 32(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x10,%ymm8,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vmovdqu 64(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 64(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x00,%ymm9,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+
+ vmovdqu 96(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 96(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x10,%ymm9,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vpxor %ymm3,%ymm4,%ymm4
+ vpxor %ymm5,%ymm4,%ymm4
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm3,%ymm2,%ymm0
+ vpshufd $0x4e,%ymm3,%ymm3
+ vpxor %ymm3,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vpclmulqdq $0x01,%ymm4,%ymm2,%ymm0
+ vpshufd $0x4e,%ymm4,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpxor %ymm0,%ymm5,%ymm5
+ vextracti128 $1,%ymm5,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+
+ subq $-128,%rdx
+ addq $-128,%rcx
+ cmpq $127,%rcx
+ ja .Lghash_loop_4x
+
+
+ cmpq $32,%rcx
+ jb .Lghash_loop_1x_done
+.Lghash_loop_1x:
+ vmovdqu (%rdx),%ymm0
+ vpshufb %ymm6,%ymm0,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vmovdqu 128-32(%rsi),%ymm0
+ vpclmulqdq $0x00,%ymm0,%ymm5,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm5,%ymm2
+ vpclmulqdq $0x10,%ymm0,%ymm5,%ymm3
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x01,%ymm1,%ymm7,%ymm3
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm2,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x11,%ymm0,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm7,%ymm1
+ vpshufd $0x4e,%ymm2,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpxor %ymm1,%ymm5,%ymm5
+
+ vextracti128 $1,%ymm5,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+ addq $32,%rdx
+ subq $32,%rcx
+ cmpq $32,%rcx
+ jae .Lghash_loop_1x
+.Lghash_loop_1x_done:
+
+
+.Lghash_lastblock:
+ testq %rcx,%rcx
+ jz .Lghash_done
+ vmovdqu (%rdx),%xmm0
+ vpshufb %xmm6,%xmm0,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+ vmovdqu 128-16(%rsi),%xmm0
+ vpclmulqdq $0x00,%xmm0,%xmm5,%xmm1
+ vpclmulqdq $0x01,%xmm0,%xmm5,%xmm2
+ vpclmulqdq $0x10,%xmm0,%xmm5,%xmm3
+ vpxor %xmm3,%xmm2,%xmm2
+ vpclmulqdq $0x01,%xmm1,%xmm7,%xmm3
+ vpshufd $0x4e,%xmm1,%xmm1
+ vpxor %xmm1,%xmm2,%xmm2
+ vpxor %xmm3,%xmm2,%xmm2
+ vpclmulqdq $0x11,%xmm0,%xmm5,%xmm5
+ vpclmulqdq $0x01,%xmm2,%xmm7,%xmm1
+ vpshufd $0x4e,%xmm2,%xmm2
+ vpxor %xmm2,%xmm5,%xmm5
+ vpxor %xmm1,%xmm5,%xmm5
+
+
+.Lghash_done:
+
+ vpshufb %xmm6,%xmm5,%xmm5
+ vmovdqu %xmm5,(%rdi)
+
+ vzeroupper
+ ret
+
+.cfi_endproc
+.size gcm_ghash_vpclmulqdq_avx2, . - gcm_ghash_vpclmulqdq_avx2
+.globl aes_gcm_enc_update_vaes_avx2
+.hidden aes_gcm_enc_update_vaes_avx2
+.type aes_gcm_enc_update_vaes_avx2,@function
+.align 32
+aes_gcm_enc_update_vaes_avx2:
+.cfi_startproc
+
+_CET_ENDBR
+ pushq %r12
+.cfi_adjust_cfa_offset 8
+.cfi_offset %r12,-16
+
+ movq 16(%rsp),%r12
+#ifdef BORINGSSL_DISPATCH_TEST
+.extern BORINGSSL_function_hit
+.hidden BORINGSSL_function_hit
+ movb $1,BORINGSSL_function_hit+8(%rip)
+#endif
+ vbroadcasti128 .Lbswap_mask(%rip),%ymm0
+
+
+
+ vmovdqu (%r12),%xmm1
+ vpshufb %xmm0,%xmm1,%xmm1
+ vbroadcasti128 (%r8),%ymm11
+ vpshufb %ymm0,%ymm11,%ymm11
+
+
+
+ movl 240(%rcx),%r10d
+ leal -20(,%r10,4),%r10d
+
+
+
+
+ leaq 96(%rcx,%r10,4),%r11
+ vbroadcasti128 (%rcx),%ymm9
+ vbroadcasti128 (%r11),%ymm10
+
+
+ vpaddd .Lctr_pattern(%rip),%ymm11,%ymm11
+
+
+
+ cmpq $127,%rdx
+ jbe .Lcrypt_loop_4x_done__func1
+
+ vmovdqu 128(%r9),%ymm7
+ vmovdqu 128+32(%r9),%ymm8
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_first_4_vecs__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_first_4_vecs__func1
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ jbe .Lghash_last_ciphertext_4x__func1
+.align 16
+.Lcrypt_loop_4x__func1:
+
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ cmpl $24,%r10d
+ jl .Laes128__func1
+ je .Laes192__func1
+
+ vbroadcasti128 -208(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -192(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes192__func1:
+ vbroadcasti128 -176(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -160(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes128__func1:
+ prefetcht0 512(%rdi)
+ prefetcht0 512+64(%rdi)
+
+ vmovdqu 0(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vbroadcasti128 -144(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vbroadcasti128 -128(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 32(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -112(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 64(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+
+ vbroadcasti128 -96(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -80(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+
+ vbroadcasti128 -64(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -48(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -32(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -16(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+
+ subq $-128,%rsi
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ ja .Lcrypt_loop_4x__func1
+.Lghash_last_ciphertext_4x__func1:
+
+ vmovdqu 0(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vmovdqu 32(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vmovdqu 64(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+ subq $-128,%rsi
+.Lcrypt_loop_4x_done__func1:
+
+ testq %rdx,%rdx
+ jz .Ldone__func1
+
+
+
+
+
+ leaq 128(%r9),%r8
+ subq %rdx,%r8
+
+
+ vpxor %xmm5,%xmm5,%xmm5
+ vpxor %xmm6,%xmm6,%xmm6
+ vpxor %xmm7,%xmm7,%xmm7
+
+ cmpq $64,%rdx
+ jb .Llessthan64bytes__func1
+
+
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_1__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_1__func1
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%ymm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %ymm3,%ymm13,%ymm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+
+
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpshufb %ymm0,%ymm13,%ymm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%ymm3
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm7
+ vpclmulqdq $0x00,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+ addq $64,%r8
+ addq $64,%rdi
+ addq $64,%rsi
+ subq $64,%rdx
+ jz .Lreduce__func1
+
+ vpxor %xmm1,%xmm1,%xmm1
+
+
+.Llessthan64bytes__func1:
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_2__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_2__func1
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+
+
+ cmpq $32,%rdx
+ jb .Lxor_one_block__func1
+ je .Lxor_two_blocks__func1
+
+.Lxor_three_blocks__func1:
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%xmm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %xmm3,%xmm13,%xmm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %xmm13,32(%rsi)
+
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpshufb %xmm0,%xmm13,%xmm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%xmm3
+ vpclmulqdq $0x00,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm7,%ymm7
+ jmp .Lghash_mul_one_vec_unreduced__func1
+
+.Lxor_two_blocks__func1:
+ vmovdqu (%rdi),%ymm2
+ vpxor %ymm2,%ymm12,%ymm12
+ vmovdqu %ymm12,(%rsi)
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ jmp .Lghash_mul_one_vec_unreduced__func1
+
+.Lxor_one_block__func1:
+ vmovdqu (%rdi),%xmm2
+ vpxor %xmm2,%xmm12,%xmm12
+ vmovdqu %xmm12,(%rsi)
+ vpshufb %xmm0,%xmm12,%xmm12
+ vpxor %xmm1,%xmm12,%xmm12
+ vmovdqu (%r8),%xmm2
+
+.Lghash_mul_one_vec_unreduced__func1:
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+.Lreduce__func1:
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm5,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm3,%ymm6,%ymm6
+ vpclmulqdq $0x01,%ymm6,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm7,%ymm7
+ vpxor %ymm3,%ymm7,%ymm7
+ vextracti128 $1,%ymm7,%xmm1
+ vpxor %xmm7,%xmm1,%xmm1
+
+.Ldone__func1:
+
+ vpshufb %xmm0,%xmm1,%xmm1
+ vmovdqu %xmm1,(%r12)
+
+ vzeroupper
+ popq %r12
+.cfi_adjust_cfa_offset -8
+.cfi_restore %r12
+ ret
+
+.cfi_endproc
+.size aes_gcm_enc_update_vaes_avx2, . - aes_gcm_enc_update_vaes_avx2
+.globl aes_gcm_dec_update_vaes_avx2
+.hidden aes_gcm_dec_update_vaes_avx2
+.type aes_gcm_dec_update_vaes_avx2,@function
+.align 32
+aes_gcm_dec_update_vaes_avx2:
+.cfi_startproc
+
+_CET_ENDBR
+ pushq %r12
+.cfi_adjust_cfa_offset 8
+.cfi_offset %r12,-16
+
+ movq 16(%rsp),%r12
+ vbroadcasti128 .Lbswap_mask(%rip),%ymm0
+
+
+
+ vmovdqu (%r12),%xmm1
+ vpshufb %xmm0,%xmm1,%xmm1
+ vbroadcasti128 (%r8),%ymm11
+ vpshufb %ymm0,%ymm11,%ymm11
+
+
+
+ movl 240(%rcx),%r10d
+ leal -20(,%r10,4),%r10d
+
+
+
+
+ leaq 96(%rcx,%r10,4),%r11
+ vbroadcasti128 (%rcx),%ymm9
+ vbroadcasti128 (%r11),%ymm10
+
+
+ vpaddd .Lctr_pattern(%rip),%ymm11,%ymm11
+
+
+
+ cmpq $127,%rdx
+ jbe .Lcrypt_loop_4x_done__func2
+
+ vmovdqu 128(%r9),%ymm7
+ vmovdqu 128+32(%r9),%ymm8
+.align 16
+.Lcrypt_loop_4x__func2:
+
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ cmpl $24,%r10d
+ jl .Laes128__func2
+ je .Laes192__func2
+
+ vbroadcasti128 -208(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -192(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes192__func2:
+ vbroadcasti128 -176(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -160(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes128__func2:
+ prefetcht0 512(%rdi)
+ prefetcht0 512+64(%rdi)
+
+ vmovdqu 0(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vbroadcasti128 -144(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vbroadcasti128 -128(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 32(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -112(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 64(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+
+ vbroadcasti128 -96(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -80(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+
+ vbroadcasti128 -64(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -48(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -32(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -16(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+
+
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+ subq $-128,%rsi
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ ja .Lcrypt_loop_4x__func2
+.Lcrypt_loop_4x_done__func2:
+
+ testq %rdx,%rdx
+ jz .Ldone__func2
+
+
+
+
+
+ leaq 128(%r9),%r8
+ subq %rdx,%r8
+
+
+ vpxor %xmm5,%xmm5,%xmm5
+ vpxor %xmm6,%xmm6,%xmm6
+ vpxor %xmm7,%xmm7,%xmm7
+
+ cmpq $64,%rdx
+ jb .Llessthan64bytes__func2
+
+
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_1__func2:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_1__func2
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%ymm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %ymm3,%ymm13,%ymm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+
+
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpshufb %ymm0,%ymm3,%ymm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%ymm3
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm7
+ vpclmulqdq $0x00,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+ addq $64,%r8
+ addq $64,%rdi
+ addq $64,%rsi
+ subq $64,%rdx
+ jz .Lreduce__func2
+
+ vpxor %xmm1,%xmm1,%xmm1
+
+
+.Llessthan64bytes__func2:
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_2__func2:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_2__func2
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+
+
+ cmpq $32,%rdx
+ jb .Lxor_one_block__func2
+ je .Lxor_two_blocks__func2
+
+.Lxor_three_blocks__func2:
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%xmm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %xmm3,%xmm13,%xmm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %xmm13,32(%rsi)
+
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpshufb %xmm0,%xmm3,%xmm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%xmm3
+ vpclmulqdq $0x00,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm7,%ymm7
+ jmp .Lghash_mul_one_vec_unreduced__func2
+
+.Lxor_two_blocks__func2:
+ vmovdqu (%rdi),%ymm2
+ vpxor %ymm2,%ymm12,%ymm12
+ vmovdqu %ymm12,(%rsi)
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ jmp .Lghash_mul_one_vec_unreduced__func2
+
+.Lxor_one_block__func2:
+ vmovdqu (%rdi),%xmm2
+ vpxor %xmm2,%xmm12,%xmm12
+ vmovdqu %xmm12,(%rsi)
+ vpshufb %xmm0,%xmm2,%xmm12
+ vpxor %xmm1,%xmm12,%xmm12
+ vmovdqu (%r8),%xmm2
+
+.Lghash_mul_one_vec_unreduced__func2:
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+.Lreduce__func2:
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm5,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm3,%ymm6,%ymm6
+ vpclmulqdq $0x01,%ymm6,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm7,%ymm7
+ vpxor %ymm3,%ymm7,%ymm7
+ vextracti128 $1,%ymm7,%xmm1
+ vpxor %xmm7,%xmm1,%xmm1
+
+.Ldone__func2:
+
+ vpshufb %xmm0,%xmm1,%xmm1
+ vmovdqu %xmm1,(%r12)
+
+ vzeroupper
+ popq %r12
+.cfi_adjust_cfa_offset -8
+.cfi_restore %r12
+ ret
+
+.cfi_endproc
+.size aes_gcm_dec_update_vaes_avx2, . - aes_gcm_dec_update_vaes_avx2
+#endif
diff --git a/sys/contrib/openzfs/contrib/initramfs/scripts/zfs b/sys/contrib/openzfs/contrib/initramfs/scripts/zfs
index c569b2528368..67707e9d80f4 100644
--- a/sys/contrib/openzfs/contrib/initramfs/scripts/zfs
+++ b/sys/contrib/openzfs/contrib/initramfs/scripts/zfs
@@ -979,7 +979,8 @@ mountroot()
touch /run/zfs_unlock_complete
if [ -e /run/zfs_unlock_complete_notify ]; then
- read -r < /run/zfs_unlock_complete_notify
+ # shellcheck disable=SC2034
+ read -r zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify
fi
# ------------
diff --git a/sys/contrib/openzfs/include/os/linux/kernel/linux/simd_x86.h b/sys/contrib/openzfs/include/os/linux/kernel/linux/simd_x86.h
index e8004e18c4a4..326f471d7c9b 100644
--- a/sys/contrib/openzfs/include/os/linux/kernel/linux/simd_x86.h
+++ b/sys/contrib/openzfs/include/os/linux/kernel/linux/simd_x86.h
@@ -598,6 +598,32 @@ zfs_movbe_available(void)
}
/*
+ * Check if VAES instruction set is available
+ */
+static inline boolean_t
+zfs_vaes_available(void)
+{
+#if defined(X86_FEATURE_VAES)
+ return (!!boot_cpu_has(X86_FEATURE_VAES));
+#else
+ return (B_FALSE);
+#endif
+}
+
+/*
+ * Check if VPCLMULQDQ instruction set is available
+ */
+static inline boolean_t
+zfs_vpclmulqdq_available(void)
+{
+#if defined(X86_FEATURE_VPCLMULQDQ)
+ return (!!boot_cpu_has(X86_FEATURE_VPCLMULQDQ));
+#else
+ return (B_FALSE);
+#endif
+}
+
+/*
* Check if SHA_NI instruction set is available
*/
static inline boolean_t
diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_zil.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_zil.h
index 955462c85d10..e34ea46b3fe8 100644
--- a/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_zil.h
+++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/trace_zil.h
@@ -139,18 +139,18 @@
#define ZCW_TP_STRUCT_ENTRY \
__field(lwb_t *, zcw_lwb) \
__field(boolean_t, zcw_done) \
- __field(int, zcw_zio_error) \
+ __field(int, zcw_error) \
#define ZCW_TP_FAST_ASSIGN \
__entry->zcw_lwb = zcw->zcw_lwb; \
__entry->zcw_done = zcw->zcw_done; \
- __entry->zcw_zio_error = zcw->zcw_zio_error;
+ __entry->zcw_error = zcw->zcw_error;
#define ZCW_TP_PRINTK_FMT \
"zcw { lwb %p done %u error %u }"
#define ZCW_TP_PRINTK_ARGS \
- __entry->zcw_lwb, __entry->zcw_done, __entry->zcw_zio_error
+ __entry->zcw_lwb, __entry->zcw_done, __entry->zcw_error
/*
* Generic support for two argument tracepoints of the form:
diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h
index db6de332ae67..66db16b33c51 100644
--- a/sys/contrib/openzfs/include/sys/spa.h
+++ b/sys/contrib/openzfs/include/sys/spa.h
@@ -880,7 +880,6 @@ extern kcondvar_t spa_namespace_cv;
#define SPA_CONFIG_UPDATE_VDEVS 1
extern void spa_write_cachefile(spa_t *, boolean_t, boolean_t, boolean_t);
-extern void spa_config_load(void);
extern int spa_all_configs(uint64_t *generation, nvlist_t **pools);
extern void spa_config_set(spa_t *spa, nvlist_t *config);
extern nvlist_t *spa_config_generate(spa_t *spa, vdev_t *vd, uint64_t txg,
@@ -1244,7 +1243,6 @@ extern void vdev_mirror_stat_fini(void);
/* Initialization and termination */
extern void spa_init(spa_mode_t mode);
extern void spa_fini(void);
-extern void spa_boot_init(void *);
/* properties */
extern int spa_prop_set(spa_t *spa, nvlist_t *nvp);
diff --git a/sys/contrib/openzfs/include/sys/zil_impl.h b/sys/contrib/openzfs/include/sys/zil_impl.h
index 44b776e16b52..ea1364a7e35a 100644
--- a/sys/contrib/openzfs/include/sys/zil_impl.h
+++ b/sys/contrib/openzfs/include/sys/zil_impl.h
@@ -41,8 +41,8 @@ extern "C" {
*
* An lwb will start out in the "new" state, and transition to the "opened"
* state via a call to zil_lwb_write_open() on first itx assignment. When
- * transitioning from "new" to "opened" the zilog's "zl_issuer_lock" must be
- * held.
+ * transitioning from "new" to "opened" the zilog's "zl_issuer_lock" and
+ * LWB's "lwb_lock" must be held.
*
* After the lwb is "opened", it can be assigned number of itxs and transition
* into the "closed" state via zil_lwb_write_close() when full or on timeout.
@@ -100,16 +100,22 @@ typedef enum {
* holding the "zl_issuer_lock". After the lwb is issued, the zilog's
* "zl_lock" is used to protect the lwb against concurrent access.
*/
+typedef enum {
+ LWB_FLAG_SLIM = (1<<0), /* log block has slim format */
+ LWB_FLAG_SLOG = (1<<1), /* lwb_blk is on SLOG device */
+ LWB_FLAG_CRASHED = (1<<2), /* lwb is on the crash list */
+} lwb_flag_t;
+
typedef struct lwb {
zilog_t *lwb_zilog; /* back pointer to log struct */
blkptr_t lwb_blk; /* on disk address of this log blk */
- boolean_t lwb_slim; /* log block has slim format */
- boolean_t lwb_slog; /* lwb_blk is on SLOG device */
+ lwb_flag_t lwb_flags; /* extra info about this lwb */
int lwb_error; /* log block allocation error */
int lwb_nmax; /* max bytes in the buffer */
int lwb_nused; /* # used bytes in buffer */
int lwb_nfilled; /* # filled bytes in buffer */
int lwb_sz; /* size of block and buffer */
+ int lwb_min_sz; /* min size for range allocation */
lwb_state_t lwb_state; /* the state of this lwb */
char *lwb_buf; /* log write buffer */
zio_t *lwb_child_zio; /* parent zio for children */
@@ -124,7 +130,7 @@ typedef struct lwb {
list_t lwb_itxs; /* list of itx's */
list_t lwb_waiters; /* list of zil_commit_waiter's */
avl_tree_t lwb_vdev_tree; /* vdevs to flush after lwb write */
- kmutex_t lwb_vdev_lock; /* protects lwb_vdev_tree */
+ kmutex_t lwb_lock; /* protects lwb_vdev_tree and size */
} lwb_t;
/*
@@ -149,7 +155,7 @@ typedef struct zil_commit_waiter {
list_node_t zcw_node; /* linkage in lwb_t:lwb_waiter list */
lwb_t *zcw_lwb; /* back pointer to lwb when linked */
boolean_t zcw_done; /* B_TRUE when "done", else B_FALSE */
- int zcw_zio_error; /* contains the zio io_error value */
+ int zcw_error; /* result to return from zil_commit() */
} zil_commit_waiter_t;
/*
diff --git a/sys/contrib/openzfs/include/sys/zio.h b/sys/contrib/openzfs/include/sys/zio.h
index 4f46eab3db89..353805fcb969 100644
--- a/sys/contrib/openzfs/include/sys/zio.h
+++ b/sys/contrib/openzfs/include/sys/zio.h
@@ -360,26 +360,26 @@ struct zbookmark_err_phys {
(zb)->zb_blkid == ZB_ROOT_BLKID)
typedef struct zio_prop {
- enum zio_checksum zp_checksum;
- enum zio_compress zp_compress;
+ enum zio_checksum zp_checksum:8;
+ enum zio_compress zp_compress:8;
uint8_t zp_complevel;
uint8_t zp_level;
uint8_t zp_copies;
uint8_t zp_gang_copies;
- dmu_object_type_t zp_type;
- boolean_t zp_dedup;
- boolean_t zp_dedup_verify;
- boolean_t zp_nopwrite;
- boolean_t zp_brtwrite;
- boolean_t zp_encrypt;
- boolean_t zp_byteorder;
- boolean_t zp_direct_write;
- boolean_t zp_rewrite;
+ dmu_object_type_t zp_type:8;
+ dmu_object_type_t zp_storage_type:8;
+ boolean_t zp_dedup:1;
+ boolean_t zp_dedup_verify:1;
+ boolean_t zp_nopwrite:1;
+ boolean_t zp_brtwrite:1;
+ boolean_t zp_encrypt:1;
+ boolean_t zp_byteorder:1;
+ boolean_t zp_direct_write:1;
+ boolean_t zp_rewrite:1;
+ uint32_t zp_zpl_smallblk;
uint8_t zp_salt[ZIO_DATA_SALT_LEN];
uint8_t zp_iv[ZIO_DATA_IV_LEN];
uint8_t zp_mac[ZIO_DATA_MAC_LEN];
- uint32_t zp_zpl_smallblk;
- dmu_object_type_t zp_storage_type;
} zio_prop_t;
typedef struct zio_cksum_report zio_cksum_report_t;
@@ -622,7 +622,8 @@ extern zio_t *zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg,
const blkptr_t *bp, zio_flag_t flags);
extern int zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg,
- blkptr_t *new_bp, uint64_t size, boolean_t *slog);
+ blkptr_t *new_bp, uint64_t min_size, uint64_t max_size, boolean_t *slog,
+ boolean_t allow_larger);
extern void zio_flush(zio_t *zio, vdev_t *vd);
extern void zio_shrink(zio_t *zio, uint64_t size);
diff --git a/sys/contrib/openzfs/include/sys/zvol_impl.h b/sys/contrib/openzfs/include/sys/zvol_impl.h
index f3dd9f26f23c..5422e66832c0 100644
--- a/sys/contrib/openzfs/include/sys/zvol_impl.h
+++ b/sys/contrib/openzfs/include/sys/zvol_impl.h
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 2024, Klara, Inc.
+ * Copyright (c) 2024, 2025, Klara, Inc.
*/
#ifndef _SYS_ZVOL_IMPL_H
@@ -56,6 +56,7 @@ typedef struct zvol_state {
atomic_t zv_suspend_ref; /* refcount for suspend */
krwlock_t zv_suspend_lock; /* suspend lock */
kcondvar_t zv_removing_cv; /* ready to remove minor */
+ list_node_t zv_remove_node; /* node on removal list */
struct zvol_state_os *zv_zso; /* private platform state */
boolean_t zv_threading; /* volthreading property */
} zvol_state_t;
@@ -135,7 +136,7 @@ int zvol_os_rename_minor(zvol_state_t *zv, const char *newname);
int zvol_os_create_minor(const char *name);
int zvol_os_update_volsize(zvol_state_t *zv, uint64_t volsize);
boolean_t zvol_os_is_zvol(const char *path);
-void zvol_os_clear_private(zvol_state_t *zv);
+void zvol_os_remove_minor(zvol_state_t *zv);
void zvol_os_set_disk_ro(zvol_state_t *zv, int flags);
void zvol_os_set_capacity(zvol_state_t *zv, uint64_t capacity);
diff --git a/sys/contrib/openzfs/lib/libicp/Makefile.am b/sys/contrib/openzfs/lib/libicp/Makefile.am
index ce24d13a760f..23adba10bc44 100644
--- a/sys/contrib/openzfs/lib/libicp/Makefile.am
+++ b/sys/contrib/openzfs/lib/libicp/Makefile.am
@@ -69,6 +69,7 @@ nodist_libicp_la_SOURCES += \
module/icp/asm-x86_64/aes/aes_aesni.S \
module/icp/asm-x86_64/modes/gcm_pclmulqdq.S \
module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S \
+ module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S \
module/icp/asm-x86_64/modes/ghash-x86_64.S \
module/icp/asm-x86_64/sha2/sha256-x86_64.S \
module/icp/asm-x86_64/sha2/sha512-x86_64.S \
diff --git a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
index 1ef24f5a7d39..4772a5416b2e 100644
--- a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
+++ b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h
@@ -102,7 +102,9 @@ typedef enum cpuid_inst_sets {
AES,
PCLMULQDQ,
MOVBE,
- SHA_NI
+ SHA_NI,
+ VAES,
+ VPCLMULQDQ
} cpuid_inst_sets_t;
/*
@@ -127,6 +129,8 @@ typedef struct cpuid_feature_desc {
#define _AES_BIT (1U << 25)
#define _PCLMULQDQ_BIT (1U << 1)
#define _MOVBE_BIT (1U << 22)
+#define _VAES_BIT (1U << 9)
+#define _VPCLMULQDQ_BIT (1U << 10)
#define _SHA_NI_BIT (1U << 29)
/*
@@ -157,6 +161,8 @@ static const cpuid_feature_desc_t cpuid_features[] = {
[PCLMULQDQ] = {1U, 0U, _PCLMULQDQ_BIT, ECX },
[MOVBE] = {1U, 0U, _MOVBE_BIT, ECX },
[SHA_NI] = {7U, 0U, _SHA_NI_BIT, EBX },
+ [VAES] = {7U, 0U, _VAES_BIT, ECX },
+ [VPCLMULQDQ] = {7U, 0U, _VPCLMULQDQ_BIT, ECX },
};
/*
@@ -231,6 +237,8 @@ CPUID_FEATURE_CHECK(aes, AES);
CPUID_FEATURE_CHECK(pclmulqdq, PCLMULQDQ);
CPUID_FEATURE_CHECK(movbe, MOVBE);
CPUID_FEATURE_CHECK(shani, SHA_NI);
+CPUID_FEATURE_CHECK(vaes, VAES);
+CPUID_FEATURE_CHECK(vpclmulqdq, VPCLMULQDQ);
/*
* Detect register set support
@@ -382,6 +390,24 @@ zfs_shani_available(void)
}
/*
+ * Check if VAES instruction is available
+ */
+static inline boolean_t
+zfs_vaes_available(void)
+{
+ return (__cpuid_has_vaes());
+}
+
+/*
+ * Check if VPCLMULQDQ instruction is available
+ */
+static inline boolean_t
+zfs_vpclmulqdq_available(void)
+{
+ return (__cpuid_has_vpclmulqdq());
+}
+
+/*
* AVX-512 family of instruction sets:
*
* AVX512F Foundation
diff --git a/sys/contrib/openzfs/lib/libzpool/kernel.c b/sys/contrib/openzfs/lib/libzpool/kernel.c
index e63153a03370..fea2f81458f9 100644
--- a/sys/contrib/openzfs/lib/libzpool/kernel.c
+++ b/sys/contrib/openzfs/lib/libzpool/kernel.c
@@ -38,6 +38,7 @@
#include <sys/processor.h>
#include <sys/rrwlock.h>
#include <sys/spa.h>
+#include <sys/spa_impl.h>
#include <sys/stat.h>
#include <sys/systeminfo.h>
#include <sys/time.h>
@@ -811,6 +812,79 @@ umem_out_of_memory(void)
return (0);
}
+static void
+spa_config_load(void)
+{
+ void *buf = NULL;
+ nvlist_t *nvlist, *child;
+ nvpair_t *nvpair;
+ char *pathname;
+ zfs_file_t *fp;
+ zfs_file_attr_t zfa;
+ uint64_t fsize;
+ int err;
+
+ /*
+ * Open the configuration file.
+ */
+ pathname = kmem_alloc(MAXPATHLEN, KM_SLEEP);
+
+ (void) snprintf(pathname, MAXPATHLEN, "%s", spa_config_path);
+
+ err = zfs_file_open(pathname, O_RDONLY, 0, &fp);
+ if (err)
+ err = zfs_file_open(ZPOOL_CACHE_BOOT, O_RDONLY, 0, &fp);
+
+ kmem_free(pathname, MAXPATHLEN);
+
+ if (err)
+ return;
+
+ if (zfs_file_getattr(fp, &zfa))
+ goto out;
+
+ fsize = zfa.zfa_size;
+ buf = kmem_alloc(fsize, KM_SLEEP);
+
+ /*
+ * Read the nvlist from the file.
+ */
+ if (zfs_file_read(fp, buf, fsize, NULL) < 0)
+ goto out;
+
+ /*
+ * Unpack the nvlist.
+ */
+ if (nvlist_unpack(buf, fsize, &nvlist, KM_SLEEP) != 0)
+ goto out;
+
+ /*
+ * Iterate over all elements in the nvlist, creating a new spa_t for
+ * each one with the specified configuration.
+ */
+ mutex_enter(&spa_namespace_lock);
+ nvpair = NULL;
+ while ((nvpair = nvlist_next_nvpair(nvlist, nvpair)) != NULL) {
+ if (nvpair_type(nvpair) != DATA_TYPE_NVLIST)
+ continue;
+
+ child = fnvpair_value_nvlist(nvpair);
+
+ if (spa_lookup(nvpair_name(nvpair)) != NULL)
+ continue;
+ (void) spa_add(nvpair_name(nvpair), child, NULL);
+ }
+ mutex_exit(&spa_namespace_lock);
+
+ nvlist_free(nvlist);
+
+out:
+ if (buf != NULL)
+ kmem_free(buf, fsize);
+
+ zfs_file_close(fp);
+}
+
void
kernel_init(int mode)
{
@@ -835,6 +909,7 @@ kernel_init(int mode)
zstd_init();
spa_init((spa_mode_t)mode);
+ spa_config_load();
fletcher_4_init();
diff --git a/sys/contrib/openzfs/lib/libzutil/zutil_import.c b/sys/contrib/openzfs/lib/libzutil/zutil_import.c
index a4a6e76a1d09..08367f4c064d 100644
--- a/sys/contrib/openzfs/lib/libzutil/zutil_import.c
+++ b/sys/contrib/openzfs/lib/libzutil/zutil_import.c
@@ -1903,30 +1903,43 @@ zpool_find_config(libpc_handle_t *hdl, const char *target, nvlist_t **configp,
*sepp = '\0';
pools = zpool_search_import(hdl, args);
+ if (pools == NULL) {
+ zutil_error_aux(hdl, dgettext(TEXT_DOMAIN, "no pools found"));
+ (void) zutil_error_fmt(hdl, LPC_UNKNOWN, dgettext(TEXT_DOMAIN,
+ "failed to find config for pool '%s'"), targetdup);
+ free(targetdup);
+ return (ENOENT);
+ }
- if (pools != NULL) {
- nvpair_t *elem = NULL;
- while ((elem = nvlist_next_nvpair(pools, elem)) != NULL) {
- VERIFY0(nvpair_value_nvlist(elem, &config));
- if (pool_match(config, targetdup)) {
- count++;
- if (match != NULL) {
- /* multiple matches found */
- continue;
- } else {
- match = fnvlist_dup(config);
- }
+ nvpair_t *elem = NULL;
+ while ((elem = nvlist_next_nvpair(pools, elem)) != NULL) {
+ VERIFY0(nvpair_value_nvlist(elem, &config));
+ if (pool_match(config, targetdup)) {
+ count++;
+ if (match != NULL) {
+ /* multiple matches found */
+ continue;
+ } else {
+ match = fnvlist_dup(config);
}
}
- fnvlist_free(pools);
}
+ fnvlist_free(pools);
if (count == 0) {
+ zutil_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "no matching pools"));
+ (void) zutil_error_fmt(hdl, LPC_UNKNOWN, dgettext(TEXT_DOMAIN,
+ "failed to find config for pool '%s'"), targetdup);
free(targetdup);
return (ENOENT);
}
if (count > 1) {
+ zutil_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "more than one matching pool"));
+ (void) zutil_error_fmt(hdl, LPC_UNKNOWN, dgettext(TEXT_DOMAIN,
+ "failed to find config for pool '%s'"), targetdup);
free(targetdup);
fnvlist_free(match);
return (EINVAL);
diff --git a/sys/contrib/openzfs/man/man4/zfs.4 b/sys/contrib/openzfs/man/man4/zfs.4
index 4a5f9fd93f4f..5c7958667f92 100644
--- a/sys/contrib/openzfs/man/man4/zfs.4
+++ b/sys/contrib/openzfs/man/man4/zfs.4
@@ -941,10 +941,6 @@ The target number of bytes the ARC should leave as free memory on the system.
If zero, equivalent to the bigger of
.Sy 512 KiB No and Sy all_system_memory/64 .
.
-.It Sy zfs_autoimport_disable Ns = Ns Sy 1 Ns | Ns 0 Pq int
-Disable pool import at module load by ignoring the cache file
-.Pq Sy spa_config_path .
-.
.It Sy zfs_checksum_events_per_second Ns = Ns Sy 20 Ns /s Pq uint
Rate limit checksum events to this many per second.
Note that this should not be set below the ZED thresholds
diff --git a/sys/contrib/openzfs/man/man8/zdb.8 b/sys/contrib/openzfs/man/man8/zdb.8
index 3984aaac5866..0a5b6af73fdb 100644
--- a/sys/contrib/openzfs/man/man8/zdb.8
+++ b/sys/contrib/openzfs/man/man8/zdb.8
@@ -15,7 +15,7 @@
.\" Copyright (c) 2017 Lawrence Livermore National Security, LLC.
.\" Copyright (c) 2017 Intel Corporation.
.\"
-.Dd October 27, 2024
+.Dd April 23, 2025
.Dt ZDB 8
.Os
.
@@ -531,6 +531,18 @@ option, with more occurrences enabling more verbosity.
If no options are specified, all information about the named pool will be
displayed at default verbosity.
.
+.Sh EXIT STATUS
+The
+.Nm
+utility exits
+.Sy 0
+on success,
+.Sy 1
+if a fatal error occurs,
+.Sy 2
+if invalid command line options were specified, or
+.Sy 3
+if on-disk corruption was detected, but was not fatal.
.Sh EXAMPLES
.Ss Example 1 : No Display the configuration of imported pool Ar rpool
.Bd -literal
diff --git a/sys/contrib/openzfs/man/man8/zfs-send.8 b/sys/contrib/openzfs/man/man8/zfs-send.8
index c920a5a48798..f7c6b840303c 100644
--- a/sys/contrib/openzfs/man/man8/zfs-send.8
+++ b/sys/contrib/openzfs/man/man8/zfs-send.8
@@ -173,8 +173,10 @@ The receiving system must have the
feature enabled.
If the
.Sy lz4_compress
-feature is active on the sending system, then the receiving system must have
-that feature enabled as well.
+or
+.Sy zstd_compress
+features are active on the sending system, then the receiving system must have
+the corresponding features enabled as well.
Datasets that are sent with this flag may not be
received as an encrypted dataset, since encrypted datasets cannot use the
.Sy embedded_data
@@ -201,8 +203,10 @@ property for details
.Pc .
If the
.Sy lz4_compress
-feature is active on the sending system, then the receiving system must have
-that feature enabled as well.
+or
+.Sy zstd_compress
+features are active on the sending system, then the receiving system must have
+the corresponding features enabled as well.
If the
.Sy large_blocks
feature is enabled on the sending system but the
@@ -357,8 +361,10 @@ property for details
.Pc .
If the
.Sy lz4_compress
-feature is active on the sending system, then the receiving system must have
-that feature enabled as well.
+or
+.Sy zstd_compress
+features are active on the sending system, then the receiving system must have
+the corresponding features enabled as well.
If the
.Sy large_blocks
feature is enabled on the sending system but the
@@ -400,8 +406,10 @@ The receiving system must have the
feature enabled.
If the
.Sy lz4_compress
-feature is active on the sending system, then the receiving system must have
-that feature enabled as well.
+or
+.Sy zstd_compress
+features are active on the sending system, then the receiving system must have
+the corresponding features enabled as well.
Datasets that are sent with this flag may not be received as an encrypted
dataset,
since encrypted datasets cannot use the
diff --git a/sys/contrib/openzfs/module/Kbuild.in b/sys/contrib/openzfs/module/Kbuild.in
index 3d6f288fa5da..362d2295e091 100644
--- a/sys/contrib/openzfs/module/Kbuild.in
+++ b/sys/contrib/openzfs/module/Kbuild.in
@@ -135,6 +135,7 @@ ICP_OBJS_X86_64 := \
asm-x86_64/sha2/sha256-x86_64.o \
asm-x86_64/sha2/sha512-x86_64.o \
asm-x86_64/modes/aesni-gcm-x86_64.o \
+ asm-x86_64/modes/aesni-gcm-avx2-vaes.o \
asm-x86_64/modes/gcm_pclmulqdq.o \
asm-x86_64/modes/ghash-x86_64.o
diff --git a/sys/contrib/openzfs/module/icp/algs/modes/gcm.c b/sys/contrib/openzfs/module/icp/algs/modes/gcm.c
index c2a982b5a376..3cfa5b8165ce 100644
--- a/sys/contrib/openzfs/module/icp/algs/modes/gcm.c
+++ b/sys/contrib/openzfs/module/icp/algs/modes/gcm.c
@@ -46,6 +46,9 @@
#define IMPL_CYCLE (UINT32_MAX-1)
#ifdef CAN_USE_GCM_ASM
#define IMPL_AVX (UINT32_MAX-2)
+#if CAN_USE_GCM_ASM >= 2
+#define IMPL_AVX2 (UINT32_MAX-3)
+#endif
#endif
#define GCM_IMPL_READ(i) (*(volatile uint32_t *) &(i))
static uint32_t icp_gcm_impl = IMPL_FASTEST;
@@ -56,17 +59,16 @@ static uint32_t user_sel_impl = IMPL_FASTEST;
boolean_t gcm_avx_can_use_movbe = B_FALSE;
/*
* Whether to use the optimized openssl gcm and ghash implementations.
- * Set to true if module parameter icp_gcm_impl == "avx".
*/
-static boolean_t gcm_use_avx = B_FALSE;
-#define GCM_IMPL_USE_AVX (*(volatile boolean_t *)&gcm_use_avx)
+static gcm_impl gcm_impl_used = GCM_IMPL_GENERIC;
+#define GCM_IMPL_USED (*(volatile gcm_impl *)&gcm_impl_used)
extern boolean_t ASMABI atomic_toggle_boolean_nv(volatile boolean_t *);
static inline boolean_t gcm_avx_will_work(void);
-static inline void gcm_set_avx(boolean_t);
-static inline boolean_t gcm_toggle_avx(void);
-static inline size_t gcm_simd_get_htab_size(boolean_t);
+static inline boolean_t gcm_avx2_will_work(void);
+static inline void gcm_use_impl(gcm_impl impl);
+static inline gcm_impl gcm_toggle_impl(void);
static int gcm_mode_encrypt_contiguous_blocks_avx(gcm_ctx_t *, char *, size_t,
crypto_data_t *, size_t);
@@ -89,7 +91,7 @@ gcm_mode_encrypt_contiguous_blocks(gcm_ctx_t *ctx, char *data, size_t length,
void (*xor_block)(uint8_t *, uint8_t *))
{
#ifdef CAN_USE_GCM_ASM
- if (ctx->gcm_use_avx == B_TRUE)
+ if (ctx->impl != GCM_IMPL_GENERIC)
return (gcm_mode_encrypt_contiguous_blocks_avx(
ctx, data, length, out, block_size));
#endif
@@ -208,7 +210,7 @@ gcm_encrypt_final(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size,
{
(void) copy_block;
#ifdef CAN_USE_GCM_ASM
- if (ctx->gcm_use_avx == B_TRUE)
+ if (ctx->impl != GCM_IMPL_GENERIC)
return (gcm_encrypt_final_avx(ctx, out, block_size));
#endif
@@ -374,7 +376,7 @@ gcm_decrypt_final(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size,
void (*xor_block)(uint8_t *, uint8_t *))
{
#ifdef CAN_USE_GCM_ASM
- if (ctx->gcm_use_avx == B_TRUE)
+ if (ctx->impl != GCM_IMPL_GENERIC)
return (gcm_decrypt_final_avx(ctx, out, block_size));
#endif
@@ -631,23 +633,23 @@ gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param,
((aes_key_t *)gcm_ctx->gcm_keysched)->ops->needs_byteswap;
if (GCM_IMPL_READ(icp_gcm_impl) != IMPL_CYCLE) {
- gcm_ctx->gcm_use_avx = GCM_IMPL_USE_AVX;
+ gcm_ctx->impl = GCM_IMPL_USED;
} else {
/*
- * Handle the "cycle" implementation by creating avx and
- * non-avx contexts alternately.
+ * Handle the "cycle" implementation by creating different
+ * contexts, one per implementation.
*/
- gcm_ctx->gcm_use_avx = gcm_toggle_avx();
+ gcm_ctx->impl = gcm_toggle_impl();
- /* The avx impl. doesn't handle byte swapped key schedules. */
- if (gcm_ctx->gcm_use_avx == B_TRUE && needs_bswap == B_TRUE) {
- gcm_ctx->gcm_use_avx = B_FALSE;
+ /* The AVX impl. doesn't handle byte swapped key schedules. */
+ if (needs_bswap == B_TRUE) {
+ gcm_ctx->impl = GCM_IMPL_GENERIC;
}
/*
- * If this is a GCM context, use the MOVBE and the BSWAP
+ * If this is an AVX context, use the MOVBE and the BSWAP
* variants alternately.
*/
- if (gcm_ctx->gcm_use_avx == B_TRUE &&
+ if (gcm_ctx->impl == GCM_IMPL_AVX &&
zfs_movbe_available() == B_TRUE) {
(void) atomic_toggle_boolean_nv(
(volatile boolean_t *)&gcm_avx_can_use_movbe);
@@ -658,12 +660,13 @@ gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param,
* still they could be created by the aes generic implementation.
* Make sure not to use them since we'll corrupt data if we do.
*/
- if (gcm_ctx->gcm_use_avx == B_TRUE && needs_bswap == B_TRUE) {
- gcm_ctx->gcm_use_avx = B_FALSE;
+ if (gcm_ctx->impl != GCM_IMPL_GENERIC && needs_bswap == B_TRUE) {
+ gcm_ctx->impl = GCM_IMPL_GENERIC;
cmn_err_once(CE_WARN,
"ICP: Can't use the aes generic or cycle implementations "
- "in combination with the gcm avx implementation!");
+ "in combination with the gcm avx or avx2-vaes "
+ "implementation!");
cmn_err_once(CE_WARN,
"ICP: Falling back to a compatible implementation, "
"aes-gcm performance will likely be degraded.");
@@ -672,36 +675,20 @@ gcm_init_ctx(gcm_ctx_t *gcm_ctx, char *param,
"restore performance.");
}
- /* Allocate Htab memory as needed. */
- if (gcm_ctx->gcm_use_avx == B_TRUE) {
- size_t htab_len = gcm_simd_get_htab_size(gcm_ctx->gcm_use_avx);
-
- if (htab_len == 0) {
- return (CRYPTO_MECHANISM_PARAM_INVALID);
- }
- gcm_ctx->gcm_htab_len = htab_len;
- gcm_ctx->gcm_Htable =
- kmem_alloc(htab_len, KM_SLEEP);
-
- if (gcm_ctx->gcm_Htable == NULL) {
- return (CRYPTO_HOST_MEMORY);
- }
+ /*
+ * AVX implementations use Htable with sizes depending on
+ * implementation.
+ */
+ if (gcm_ctx->impl != GCM_IMPL_GENERIC) {
+ rv = gcm_init_avx(gcm_ctx, iv, iv_len, aad, aad_len,
+ block_size);
}
- /* Avx and non avx context initialization differs from here on. */
- if (gcm_ctx->gcm_use_avx == B_FALSE) {
+ else
#endif /* ifdef CAN_USE_GCM_ASM */
- if (gcm_init(gcm_ctx, iv, iv_len, aad, aad_len, block_size,
- encrypt_block, copy_block, xor_block) != CRYPTO_SUCCESS) {
- rv = CRYPTO_MECHANISM_PARAM_INVALID;
- }
-#ifdef CAN_USE_GCM_ASM
- } else {
- if (gcm_init_avx(gcm_ctx, iv, iv_len, aad, aad_len,
- block_size) != CRYPTO_SUCCESS) {
- rv = CRYPTO_MECHANISM_PARAM_INVALID;
- }
+ if (gcm_init(gcm_ctx, iv, iv_len, aad, aad_len, block_size,
+ encrypt_block, copy_block, xor_block) != CRYPTO_SUCCESS) {
+ rv = CRYPTO_MECHANISM_PARAM_INVALID;
}
-#endif /* ifdef CAN_USE_GCM_ASM */
return (rv);
}
@@ -767,6 +754,9 @@ gcm_impl_get_ops(void)
break;
#ifdef CAN_USE_GCM_ASM
case IMPL_AVX:
+#if CAN_USE_GCM_ASM >= 2
+ case IMPL_AVX2:
+#endif
/*
* Make sure that we return a valid implementation while
* switching to the avx implementation since there still
@@ -828,6 +818,13 @@ gcm_impl_init(void)
* Use the avx implementation if it's available and the implementation
* hasn't changed from its default value of fastest on module load.
*/
+#if CAN_USE_GCM_ASM >= 2
+ if (gcm_avx2_will_work()) {
+ if (GCM_IMPL_READ(user_sel_impl) == IMPL_FASTEST) {
+ gcm_use_impl(GCM_IMPL_AVX2);
+ }
+ } else
+#endif
if (gcm_avx_will_work()) {
#ifdef HAVE_MOVBE
if (zfs_movbe_available() == B_TRUE) {
@@ -835,7 +832,7 @@ gcm_impl_init(void)
}
#endif
if (GCM_IMPL_READ(user_sel_impl) == IMPL_FASTEST) {
- gcm_set_avx(B_TRUE);
+ gcm_use_impl(GCM_IMPL_AVX);
}
}
#endif
@@ -852,6 +849,7 @@ static const struct {
{ "fastest", IMPL_FASTEST },
#ifdef CAN_USE_GCM_ASM
{ "avx", IMPL_AVX },
+ { "avx2-vaes", IMPL_AVX2 },
#endif
};
@@ -887,7 +885,13 @@ gcm_impl_set(const char *val)
/* Check mandatory options */
for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) {
#ifdef CAN_USE_GCM_ASM
+#if CAN_USE_GCM_ASM >= 2
/* Ignore avx implementation if it won't work. */
+ if (gcm_impl_opts[i].sel == IMPL_AVX2 &&
+ !gcm_avx2_will_work()) {
+ continue;
+ }
+#endif
if (gcm_impl_opts[i].sel == IMPL_AVX && !gcm_avx_will_work()) {
continue;
}
@@ -915,11 +919,17 @@ gcm_impl_set(const char *val)
* Use the avx implementation if available and the requested one is
* avx or fastest.
*/
+#if CAN_USE_GCM_ASM >= 2
+ if (gcm_avx2_will_work() == B_TRUE &&
+ (impl == IMPL_AVX2 || impl == IMPL_FASTEST)) {
+ gcm_use_impl(GCM_IMPL_AVX2);
+ } else
+#endif
if (gcm_avx_will_work() == B_TRUE &&
(impl == IMPL_AVX || impl == IMPL_FASTEST)) {
- gcm_set_avx(B_TRUE);
+ gcm_use_impl(GCM_IMPL_AVX);
} else {
- gcm_set_avx(B_FALSE);
+ gcm_use_impl(GCM_IMPL_GENERIC);
}
#endif
@@ -952,6 +962,12 @@ icp_gcm_impl_get(char *buffer, zfs_kernel_param_t *kp)
for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) {
#ifdef CAN_USE_GCM_ASM
/* Ignore avx implementation if it won't work. */
+#if CAN_USE_GCM_ASM >= 2
+ if (gcm_impl_opts[i].sel == IMPL_AVX2 &&
+ !gcm_avx2_will_work()) {
+ continue;
+ }
+#endif
if (gcm_impl_opts[i].sel == IMPL_AVX && !gcm_avx_will_work()) {
continue;
}
@@ -993,9 +1009,6 @@ MODULE_PARM_DESC(icp_gcm_impl, "Select gcm implementation.");
/* Clear the FPU registers since they hold sensitive internal state. */
#define clear_fpu_regs() clear_fpu_regs_avx()
-#define GHASH_AVX(ctx, in, len) \
- gcm_ghash_avx((ctx)->gcm_ghash, (const uint64_t *)(ctx)->gcm_Htable, \
- in, len)
#define gcm_incr_counter_block(ctx) gcm_incr_counter_block_by(ctx, 1)
@@ -1010,20 +1023,77 @@ MODULE_PARM_DESC(icp_gcm_impl, "Select gcm implementation.");
static uint32_t gcm_avx_chunk_size =
((32 * 1024) / GCM_AVX_MIN_DECRYPT_BYTES) * GCM_AVX_MIN_DECRYPT_BYTES;
+/*
+ * GCM definitions: uint128_t is copied from include/crypto/modes.h
+ * Avoiding u128 because it is already defined in kernel sources.
+ */
+typedef struct {
+ uint64_t hi, lo;
+} uint128_t;
+
extern void ASMABI clear_fpu_regs_avx(void);
extern void ASMABI gcm_xor_avx(const uint8_t *src, uint8_t *dst);
extern void ASMABI aes_encrypt_intel(const uint32_t rk[], int nr,
const uint32_t pt[4], uint32_t ct[4]);
extern void ASMABI gcm_init_htab_avx(uint64_t *Htable, const uint64_t H[2]);
+#if CAN_USE_GCM_ASM >= 2
+extern void ASMABI gcm_init_vpclmulqdq_avx2(uint128_t Htable[16],
+ const uint64_t H[2]);
+#endif
extern void ASMABI gcm_ghash_avx(uint64_t ghash[2], const uint64_t *Htable,
const uint8_t *in, size_t len);
+#if CAN_USE_GCM_ASM >= 2
+extern void ASMABI gcm_ghash_vpclmulqdq_avx2(uint64_t ghash[2],
+ const uint64_t *Htable, const uint8_t *in, size_t len);
+#endif
+static inline void GHASH_AVX(gcm_ctx_t *ctx, const uint8_t *in, size_t len)
+{
+ switch (ctx->impl) {
+#if CAN_USE_GCM_ASM >= 2
+ case GCM_IMPL_AVX2:
+ gcm_ghash_vpclmulqdq_avx2(ctx->gcm_ghash,
+ (const uint64_t *)ctx->gcm_Htable, in, len);
+ break;
+#endif
+
+ case GCM_IMPL_AVX:
+ gcm_ghash_avx(ctx->gcm_ghash,
+ (const uint64_t *)ctx->gcm_Htable, in, len);
+ break;
+
+ default:
+ VERIFY(B_FALSE);
+ }
+}
+typedef size_t ASMABI aesni_gcm_encrypt_impl(const uint8_t *, uint8_t *,
+ size_t, const void *, uint64_t *, const uint64_t *Htable, uint64_t *);
extern size_t ASMABI aesni_gcm_encrypt(const uint8_t *, uint8_t *, size_t,
const void *, uint64_t *, uint64_t *);
+#if CAN_USE_GCM_ASM >= 2
+extern void ASMABI aes_gcm_enc_update_vaes_avx2(const uint8_t *in,
+ uint8_t *out, size_t len, const void *key, const uint8_t ivec[16],
+ const uint128_t Htable[16], uint8_t Xi[16]);
+#endif
+typedef size_t ASMABI aesni_gcm_decrypt_impl(const uint8_t *, uint8_t *,
+ size_t, const void *, uint64_t *, const uint64_t *Htable, uint64_t *);
extern size_t ASMABI aesni_gcm_decrypt(const uint8_t *, uint8_t *, size_t,
const void *, uint64_t *, uint64_t *);
+#if CAN_USE_GCM_ASM >= 2
+extern void ASMABI aes_gcm_dec_update_vaes_avx2(const uint8_t *in,
+ uint8_t *out, size_t len, const void *key, const uint8_t ivec[16],
+ const uint128_t Htable[16], uint8_t Xi[16]);
+#endif
+
+static inline boolean_t
+gcm_avx2_will_work(void)
+{
+ return (kfpu_allowed() &&
+ zfs_avx2_available() && zfs_vaes_available() &&
+ zfs_vpclmulqdq_available());
+}
static inline boolean_t
gcm_avx_will_work(void)
@@ -1035,33 +1105,67 @@ gcm_avx_will_work(void)
}
static inline void
-gcm_set_avx(boolean_t val)
+gcm_use_impl(gcm_impl impl)
{
- if (gcm_avx_will_work() == B_TRUE) {
- atomic_swap_32(&gcm_use_avx, val);
+ switch (impl) {
+#if CAN_USE_GCM_ASM >= 2
+ case GCM_IMPL_AVX2:
+ if (gcm_avx2_will_work() == B_TRUE) {
+ atomic_swap_32(&gcm_impl_used, impl);
+ return;
+ }
+
+ zfs_fallthrough;
+#endif
+
+ case GCM_IMPL_AVX:
+ if (gcm_avx_will_work() == B_TRUE) {
+ atomic_swap_32(&gcm_impl_used, impl);
+ return;
+ }
+
+ zfs_fallthrough;
+
+ default:
+ atomic_swap_32(&gcm_impl_used, GCM_IMPL_GENERIC);
}
}
static inline boolean_t
-gcm_toggle_avx(void)
+gcm_impl_will_work(gcm_impl impl)
{
- if (gcm_avx_will_work() == B_TRUE) {
- return (atomic_toggle_boolean_nv(&GCM_IMPL_USE_AVX));
- } else {
- return (B_FALSE);
+ switch (impl) {
+#if CAN_USE_GCM_ASM >= 2
+ case GCM_IMPL_AVX2:
+ return (gcm_avx2_will_work());
+#endif
+
+ case GCM_IMPL_AVX:
+ return (gcm_avx_will_work());
+
+ default:
+ return (B_TRUE);
}
}
-static inline size_t
-gcm_simd_get_htab_size(boolean_t simd_mode)
+static inline gcm_impl
+gcm_toggle_impl(void)
{
- switch (simd_mode) {
- case B_TRUE:
- return (2 * 6 * 2 * sizeof (uint64_t));
+ gcm_impl current_impl, new_impl;
+ do { /* handle races */
+ current_impl = atomic_load_32(&gcm_impl_used);
+ new_impl = current_impl;
+ while (B_TRUE) { /* handle incompatble implementations */
+ new_impl = (new_impl + 1) % GCM_IMPL_MAX;
+ if (gcm_impl_will_work(new_impl)) {
+ break;
+ }
+ }
- default:
- return (0);
- }
+ } while (atomic_cas_32(&gcm_impl_used, current_impl, new_impl) !=
+ current_impl);
+
+ return (new_impl);
}
@@ -1077,6 +1181,50 @@ gcm_incr_counter_block_by(gcm_ctx_t *ctx, int n)
ctx->gcm_cb[1] = (ctx->gcm_cb[1] & ~counter_mask) | counter;
}
+static size_t aesni_gcm_encrypt_avx(const uint8_t *in, uint8_t *out,
+ size_t len, const void *key, uint64_t *iv, const uint64_t *Htable,
+ uint64_t *Xip)
+{
+ (void) Htable;
+ return (aesni_gcm_encrypt(in, out, len, key, iv, Xip));
+}
+
+#if CAN_USE_GCM_ASM >= 2
+// kSizeTWithoutLower4Bits is a mask that can be used to zero the lower four
+// bits of a |size_t|.
+// This is from boringssl/crypto/fipsmodule/aes/gcm.cc.inc
+static const size_t kSizeTWithoutLower4Bits = (size_t)-16;
+
+/* The following CRYPTO methods are from boringssl/crypto/internal.h */
+static inline uint32_t CRYPTO_bswap4(uint32_t x) {
+ return (__builtin_bswap32(x));
+}
+
+static inline uint32_t CRYPTO_load_u32_be(const void *in) {
+ uint32_t v;
+ memcpy(&v, in, sizeof (v));
+ return (CRYPTO_bswap4(v));
+}
+
+static inline void CRYPTO_store_u32_be(void *out, uint32_t v) {
+ v = CRYPTO_bswap4(v);
+ memcpy(out, &v, sizeof (v));
+}
+
+static size_t aesni_gcm_encrypt_avx2(const uint8_t *in, uint8_t *out,
+ size_t len, const void *key, uint64_t *iv, const uint64_t *Htable,
+ uint64_t *Xip)
+{
+ uint8_t *ivec = (uint8_t *)iv;
+ len &= kSizeTWithoutLower4Bits;
+ aes_gcm_enc_update_vaes_avx2(in, out, len, key, ivec,
+ (const uint128_t *)Htable, (uint8_t *)Xip);
+ CRYPTO_store_u32_be(&ivec[12],
+ CRYPTO_load_u32_be(&ivec[12]) + len / 16);
+ return (len);
+}
+#endif /* if CAN_USE_GCM_ASM >= 2 */
+
/*
* Encrypt multiple blocks of data in GCM mode.
* This is done in gcm_avx_chunk_size chunks, utilizing AVX assembler routines
@@ -1091,8 +1239,15 @@ gcm_mode_encrypt_contiguous_blocks_avx(gcm_ctx_t *ctx, char *data,
size_t done = 0;
uint8_t *datap = (uint8_t *)data;
size_t chunk_size = (size_t)GCM_CHUNK_SIZE_READ;
+ aesni_gcm_encrypt_impl *encrypt_blocks =
+#if CAN_USE_GCM_ASM >= 2
+ ctx->impl == GCM_IMPL_AVX2 ?
+ aesni_gcm_encrypt_avx2 :
+#endif
+ aesni_gcm_encrypt_avx;
const aes_key_t *key = ((aes_key_t *)ctx->gcm_keysched);
uint64_t *ghash = ctx->gcm_ghash;
+ uint64_t *htable = ctx->gcm_Htable;
uint64_t *cb = ctx->gcm_cb;
uint8_t *ct_buf = NULL;
uint8_t *tmp = (uint8_t *)ctx->gcm_tmp;
@@ -1156,8 +1311,8 @@ gcm_mode_encrypt_contiguous_blocks_avx(gcm_ctx_t *ctx, char *data,
/* Do the bulk encryption in chunk_size blocks. */
for (; bleft >= chunk_size; bleft -= chunk_size) {
kfpu_begin();
- done = aesni_gcm_encrypt(
- datap, ct_buf, chunk_size, key, cb, ghash);
+ done = encrypt_blocks(
+ datap, ct_buf, chunk_size, key, cb, htable, ghash);
clear_fpu_regs();
kfpu_end();
@@ -1180,7 +1335,8 @@ gcm_mode_encrypt_contiguous_blocks_avx(gcm_ctx_t *ctx, char *data,
/* Bulk encrypt the remaining data. */
kfpu_begin();
if (bleft >= GCM_AVX_MIN_ENCRYPT_BYTES) {
- done = aesni_gcm_encrypt(datap, ct_buf, bleft, key, cb, ghash);
+ done = encrypt_blocks(datap, ct_buf, bleft, key, cb, htable,
+ ghash);
if (done == 0) {
rv = CRYPTO_FAILED;
goto out;
@@ -1293,6 +1449,29 @@ gcm_encrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size)
return (CRYPTO_SUCCESS);
}
+static size_t aesni_gcm_decrypt_avx(const uint8_t *in, uint8_t *out,
+ size_t len, const void *key, uint64_t *iv, const uint64_t *Htable,
+ uint64_t *Xip)
+{
+ (void) Htable;
+ return (aesni_gcm_decrypt(in, out, len, key, iv, Xip));
+}
+
+#if CAN_USE_GCM_ASM >= 2
+static size_t aesni_gcm_decrypt_avx2(const uint8_t *in, uint8_t *out,
+ size_t len, const void *key, uint64_t *iv, const uint64_t *Htable,
+ uint64_t *Xip)
+{
+ uint8_t *ivec = (uint8_t *)iv;
+ len &= kSizeTWithoutLower4Bits;
+ aes_gcm_dec_update_vaes_avx2(in, out, len, key, ivec,
+ (const uint128_t *)Htable, (uint8_t *)Xip);
+ CRYPTO_store_u32_be(&ivec[12],
+ CRYPTO_load_u32_be(&ivec[12]) + len / 16);
+ return (len);
+}
+#endif /* if CAN_USE_GCM_ASM >= 2 */
+
/*
* Finalize decryption: We just have accumulated crypto text, so now we
* decrypt it here inplace.
@@ -1306,10 +1485,17 @@ gcm_decrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size)
B_FALSE);
size_t chunk_size = (size_t)GCM_CHUNK_SIZE_READ;
+ aesni_gcm_decrypt_impl *decrypt_blocks =
+#if CAN_USE_GCM_ASM >= 2
+ ctx->impl == GCM_IMPL_AVX2 ?
+ aesni_gcm_decrypt_avx2 :
+#endif
+ aesni_gcm_decrypt_avx;
size_t pt_len = ctx->gcm_processed_data_len - ctx->gcm_tag_len;
uint8_t *datap = ctx->gcm_pt_buf;
const aes_key_t *key = ((aes_key_t *)ctx->gcm_keysched);
uint32_t *cb = (uint32_t *)ctx->gcm_cb;
+ uint64_t *htable = ctx->gcm_Htable;
uint64_t *ghash = ctx->gcm_ghash;
uint32_t *tmp = (uint32_t *)ctx->gcm_tmp;
int rv = CRYPTO_SUCCESS;
@@ -1322,8 +1508,8 @@ gcm_decrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size)
*/
for (bleft = pt_len; bleft >= chunk_size; bleft -= chunk_size) {
kfpu_begin();
- done = aesni_gcm_decrypt(datap, datap, chunk_size,
- (const void *)key, ctx->gcm_cb, ghash);
+ done = decrypt_blocks(datap, datap, chunk_size,
+ (const void *)key, ctx->gcm_cb, htable, ghash);
clear_fpu_regs();
kfpu_end();
if (done != chunk_size) {
@@ -1334,8 +1520,8 @@ gcm_decrypt_final_avx(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size)
/* Decrypt remainder, which is less than chunk size, in one go. */
kfpu_begin();
if (bleft >= GCM_AVX_MIN_DECRYPT_BYTES) {
- done = aesni_gcm_decrypt(datap, datap, bleft,
- (const void *)key, ctx->gcm_cb, ghash);
+ done = decrypt_blocks(datap, datap, bleft,
+ (const void *)key, ctx->gcm_cb, htable, ghash);
if (done == 0) {
clear_fpu_regs();
kfpu_end();
@@ -1424,13 +1610,42 @@ gcm_init_avx(gcm_ctx_t *ctx, const uint8_t *iv, size_t iv_len,
ASSERT3S(((aes_key_t *)ctx->gcm_keysched)->ops->needs_byteswap, ==,
B_FALSE);
+ size_t htab_len = 0;
+#if CAN_USE_GCM_ASM >= 2
+ if (ctx->impl == GCM_IMPL_AVX2) {
+ /*
+ * BoringSSL's API specifies uint128_t[16] for htab; but only
+ * uint128_t[12] are used.
+ * See https://github.com/google/boringssl/blob/
+ * 813840dd094f9e9c1b00a7368aa25e656554221f1/crypto/fipsmodule/
+ * modes/asm/aes-gcm-avx2-x86_64.pl#L198-L200
+ */
+ htab_len = (2 * 8 * sizeof (uint128_t));
+ } else
+#endif /* CAN_USE_GCM_ASM >= 2 */
+ {
+ htab_len = (2 * 6 * sizeof (uint128_t));
+ }
+
+ ctx->gcm_Htable = kmem_alloc(htab_len, KM_SLEEP);
+ if (ctx->gcm_Htable == NULL) {
+ return (CRYPTO_HOST_MEMORY);
+ }
+
/* Init H (encrypt zero block) and create the initial counter block. */
memset(H, 0, sizeof (ctx->gcm_H));
kfpu_begin();
aes_encrypt_intel(keysched, aes_rounds,
(const uint32_t *)H, (uint32_t *)H);
- gcm_init_htab_avx(ctx->gcm_Htable, H);
+#if CAN_USE_GCM_ASM >= 2
+ if (ctx->impl == GCM_IMPL_AVX2) {
+ gcm_init_vpclmulqdq_avx2((uint128_t *)ctx->gcm_Htable, H);
+ } else
+#endif /* if CAN_USE_GCM_ASM >= 2 */
+ {
+ gcm_init_htab_avx(ctx->gcm_Htable, H);
+ }
if (iv_len == 12) {
memcpy(cb, iv, 12);
diff --git a/sys/contrib/openzfs/module/icp/algs/modes/modes.c b/sys/contrib/openzfs/module/icp/algs/modes/modes.c
index 343591cd9691..ef3c1806e4b6 100644
--- a/sys/contrib/openzfs/module/icp/algs/modes/modes.c
+++ b/sys/contrib/openzfs/module/icp/algs/modes/modes.c
@@ -171,7 +171,7 @@ gcm_clear_ctx(gcm_ctx_t *ctx)
explicit_memset(ctx->gcm_remainder, 0, sizeof (ctx->gcm_remainder));
explicit_memset(ctx->gcm_H, 0, sizeof (ctx->gcm_H));
#if defined(CAN_USE_GCM_ASM)
- if (ctx->gcm_use_avx == B_TRUE) {
+ if (ctx->impl != GCM_IMPL_GENERIC) {
ASSERT3P(ctx->gcm_Htable, !=, NULL);
explicit_memset(ctx->gcm_Htable, 0, ctx->gcm_htab_len);
kmem_free(ctx->gcm_Htable, ctx->gcm_htab_len);
diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl
new file mode 100644
index 000000000000..04c03a37e0cb
--- /dev/null
+++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl
@@ -0,0 +1,253 @@
+BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
+licensing. Files that are completely new have a Google copyright and an ISC
+license. This license is reproduced at the bottom of this file.
+
+Contributors to BoringSSL are required to follow the CLA rules for Chromium:
+https://cla.developers.google.com/clas
+
+Files in third_party/ have their own licenses, as described therein. The MIT
+license, for third_party/fiat, which, unlike other third_party directories, is
+compiled into non-test libraries, is included below.
+
+The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
+OpenSSL License and the original SSLeay license apply to the toolkit. See below
+for the actual license texts. Actually both licenses are BSD-style Open Source
+licenses. In case of any license issues related to OpenSSL please contact
+openssl-core@openssl.org.
+
+The following are Google-internal bug numbers where explicit permission from
+some authors is recorded for use of their work. (This is purely for our own
+record keeping.)
+ 27287199
+ 27287880
+ 27287883
+ 263291445
+
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+
+ISC license used for completely new code in BoringSSL:
+
+/* Copyright 2015 The BoringSSL Authors
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+
+The code in third_party/fiat carries the MIT license:
+
+Copyright (c) 2015-2016 the fiat-crypto authors (see
+https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+Licenses for support code
+-------------------------
+
+Parts of the TLS test suite are under the Go license. This code is not included
+in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so
+distributing code linked against BoringSSL does not trigger this license:
+
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+BoringSSL uses the Chromium test infrastructure to run a continuous build,
+trybots etc. The scripts which manage this, and the script for generating build
+metadata, are under the Chromium license. Distributing code linked against
+BoringSSL does not trigger this license.
+
+Copyright 2015 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip
new file mode 100644
index 000000000000..f63a67a4d2ae
--- /dev/null
+++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.boringssl.descrip
@@ -0,0 +1 @@
+PORTIONS OF AES GCM and GHASH FUNCTIONALITY
diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S
new file mode 100644
index 000000000000..3d1b045127e2
--- /dev/null
+++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S
@@ -0,0 +1,1323 @@
+// SPDX-License-Identifier: Apache-2.0
+// This file is generated from a similarly-named Perl script in the BoringSSL
+// source tree. Do not edit by hand.
+
+#if defined(__x86_64__) && defined(HAVE_AVX) && \
+ defined(HAVE_VAES) && defined(HAVE_VPCLMULQDQ)
+
+#define _ASM
+#include <sys/asm_linkage.h>
+
+/* Windows userland links with OpenSSL */
+#if !defined (_WIN32) || defined (_KERNEL)
+
+.section .rodata
+.balign 16
+
+
+.Lbswap_mask:
+.quad 0x08090a0b0c0d0e0f, 0x0001020304050607
+
+
+
+
+
+
+
+
+.Lgfpoly:
+.quad 1, 0xc200000000000000
+
+
+.Lgfpoly_and_internal_carrybit:
+.quad 1, 0xc200000000000001
+
+.balign 32
+
+.Lctr_pattern:
+.quad 0, 0
+.quad 1, 0
+.Linc_2blocks:
+.quad 2, 0
+.quad 2, 0
+
+ENTRY_ALIGN(gcm_init_vpclmulqdq_avx2, 32)
+.cfi_startproc
+
+ENDBR
+
+
+
+
+
+ vmovdqu (%rsi),%xmm3
+ // KCF/ICP stores H in network byte order with the hi qword first
+ // so we need to swap all bytes, not the 2 qwords.
+ vmovdqu .Lbswap_mask(%rip),%xmm4
+ vpshufb %xmm4,%xmm3,%xmm3
+
+
+
+
+
+ vpshufd $0xd3,%xmm3,%xmm0
+ vpsrad $31,%xmm0,%xmm0
+ vpaddq %xmm3,%xmm3,%xmm3
+ vpand .Lgfpoly_and_internal_carrybit(%rip),%xmm0,%xmm0
+ vpxor %xmm0,%xmm3,%xmm3
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm6
+
+
+ vpclmulqdq $0x00,%xmm3,%xmm3,%xmm0
+ vpclmulqdq $0x11,%xmm3,%xmm3,%xmm5
+ vpclmulqdq $0x01,%xmm0,%xmm6,%xmm1
+ vpshufd $0x4e,%xmm0,%xmm0
+ vpxor %xmm0,%xmm1,%xmm1
+ vpclmulqdq $0x01,%xmm1,%xmm6,%xmm0
+ vpshufd $0x4e,%xmm1,%xmm1
+ vpxor %xmm1,%xmm5,%xmm5
+ vpxor %xmm0,%xmm5,%xmm5
+
+
+
+ vinserti128 $1,%xmm3,%ymm5,%ymm3
+ vinserti128 $1,%xmm5,%ymm5,%ymm5
+
+
+ vpclmulqdq $0x00,%ymm5,%ymm3,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm3,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm3,%ymm4
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+
+
+ vmovdqu %ymm3,96(%rdi)
+ vmovdqu %ymm4,64(%rdi)
+
+
+
+ vpunpcklqdq %ymm3,%ymm4,%ymm0
+ vpunpckhqdq %ymm3,%ymm4,%ymm1
+ vpxor %ymm1,%ymm0,%ymm0
+ vmovdqu %ymm0,128+32(%rdi)
+
+
+ vpclmulqdq $0x00,%ymm5,%ymm4,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm4,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm4,%ymm3
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm3,%ymm3
+ vpxor %ymm0,%ymm3,%ymm3
+
+ vpclmulqdq $0x00,%ymm5,%ymm3,%ymm0
+ vpclmulqdq $0x01,%ymm5,%ymm3,%ymm1
+ vpclmulqdq $0x10,%ymm5,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm6,%ymm2
+ vpshufd $0x4e,%ymm0,%ymm0
+ vpxor %ymm0,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vpclmulqdq $0x11,%ymm5,%ymm3,%ymm4
+ vpclmulqdq $0x01,%ymm1,%ymm6,%ymm0
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vmovdqu %ymm3,32(%rdi)
+ vmovdqu %ymm4,0(%rdi)
+
+
+
+ vpunpcklqdq %ymm3,%ymm4,%ymm0
+ vpunpckhqdq %ymm3,%ymm4,%ymm1
+ vpxor %ymm1,%ymm0,%ymm0
+ vmovdqu %ymm0,128(%rdi)
+
+ vzeroupper
+ RET
+
+.cfi_endproc
+SET_SIZE(gcm_init_vpclmulqdq_avx2)
+ENTRY_ALIGN(gcm_gmult_vpclmulqdq_avx2, 32)
+.cfi_startproc
+
+ENDBR
+
+
+
+ vmovdqu (%rdi),%xmm0
+ vmovdqu .Lbswap_mask(%rip),%xmm1
+ vmovdqu 128-16(%rsi),%xmm2
+ vmovdqu .Lgfpoly(%rip),%xmm3
+ vpshufb %xmm1,%xmm0,%xmm0
+
+ vpclmulqdq $0x00,%xmm2,%xmm0,%xmm4
+ vpclmulqdq $0x01,%xmm2,%xmm0,%xmm5
+ vpclmulqdq $0x10,%xmm2,%xmm0,%xmm6
+ vpxor %xmm6,%xmm5,%xmm5
+ vpclmulqdq $0x01,%xmm4,%xmm3,%xmm6
+ vpshufd $0x4e,%xmm4,%xmm4
+ vpxor %xmm4,%xmm5,%xmm5
+ vpxor %xmm6,%xmm5,%xmm5
+ vpclmulqdq $0x11,%xmm2,%xmm0,%xmm0
+ vpclmulqdq $0x01,%xmm5,%xmm3,%xmm4
+ vpshufd $0x4e,%xmm5,%xmm5
+ vpxor %xmm5,%xmm0,%xmm0
+ vpxor %xmm4,%xmm0,%xmm0
+
+
+ vpshufb %xmm1,%xmm0,%xmm0
+ vmovdqu %xmm0,(%rdi)
+
+
+ RET
+
+.cfi_endproc
+SET_SIZE(gcm_gmult_vpclmulqdq_avx2)
+ENTRY_ALIGN(gcm_ghash_vpclmulqdq_avx2, 32)
+.cfi_startproc
+
+ENDBR
+
+
+
+
+
+
+ vmovdqu .Lbswap_mask(%rip),%xmm6
+ vmovdqu .Lgfpoly(%rip),%xmm7
+
+
+ vmovdqu (%rdi),%xmm5
+ vpshufb %xmm6,%xmm5,%xmm5
+
+
+ cmpq $32,%rcx
+ jb .Lghash_lastblock
+
+
+
+ vinserti128 $1,%xmm6,%ymm6,%ymm6
+ vinserti128 $1,%xmm7,%ymm7,%ymm7
+
+ cmpq $127,%rcx
+ jbe .Lghash_loop_1x
+
+
+ vmovdqu 128(%rsi),%ymm8
+ vmovdqu 128+32(%rsi),%ymm9
+.Lghash_loop_4x:
+
+ vmovdqu 0(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 0(%rsi),%ymm2
+ vpxor %ymm5,%ymm1,%ymm1
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x00,%ymm8,%ymm0,%ymm4
+
+ vmovdqu 32(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 32(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x10,%ymm8,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vmovdqu 64(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 64(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x00,%ymm9,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+
+ vmovdqu 96(%rdx),%ymm1
+ vpshufb %ymm6,%ymm1,%ymm1
+ vmovdqu 96(%rsi),%ymm2
+ vpclmulqdq $0x00,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm3,%ymm3
+ vpclmulqdq $0x11,%ymm2,%ymm1,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vpunpckhqdq %ymm1,%ymm1,%ymm0
+ vpxor %ymm1,%ymm0,%ymm0
+ vpclmulqdq $0x10,%ymm9,%ymm0,%ymm0
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vpxor %ymm3,%ymm4,%ymm4
+ vpxor %ymm5,%ymm4,%ymm4
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm3,%ymm2,%ymm0
+ vpshufd $0x4e,%ymm3,%ymm3
+ vpxor %ymm3,%ymm4,%ymm4
+ vpxor %ymm0,%ymm4,%ymm4
+
+ vpclmulqdq $0x01,%ymm4,%ymm2,%ymm0
+ vpshufd $0x4e,%ymm4,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpxor %ymm0,%ymm5,%ymm5
+ vextracti128 $1,%ymm5,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+
+ subq $-128,%rdx
+ addq $-128,%rcx
+ cmpq $127,%rcx
+ ja .Lghash_loop_4x
+
+
+ cmpq $32,%rcx
+ jb .Lghash_loop_1x_done
+.Lghash_loop_1x:
+ vmovdqu (%rdx),%ymm0
+ vpshufb %ymm6,%ymm0,%ymm0
+ vpxor %ymm0,%ymm5,%ymm5
+ vmovdqu 128-32(%rsi),%ymm0
+ vpclmulqdq $0x00,%ymm0,%ymm5,%ymm1
+ vpclmulqdq $0x01,%ymm0,%ymm5,%ymm2
+ vpclmulqdq $0x10,%ymm0,%ymm5,%ymm3
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x01,%ymm1,%ymm7,%ymm3
+ vpshufd $0x4e,%ymm1,%ymm1
+ vpxor %ymm1,%ymm2,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x11,%ymm0,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm7,%ymm1
+ vpshufd $0x4e,%ymm2,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpxor %ymm1,%ymm5,%ymm5
+
+ vextracti128 $1,%ymm5,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+ addq $32,%rdx
+ subq $32,%rcx
+ cmpq $32,%rcx
+ jae .Lghash_loop_1x
+.Lghash_loop_1x_done:
+
+
+.Lghash_lastblock:
+ testq %rcx,%rcx
+ jz .Lghash_done
+ vmovdqu (%rdx),%xmm0
+ vpshufb %xmm6,%xmm0,%xmm0
+ vpxor %xmm0,%xmm5,%xmm5
+ vmovdqu 128-16(%rsi),%xmm0
+ vpclmulqdq $0x00,%xmm0,%xmm5,%xmm1
+ vpclmulqdq $0x01,%xmm0,%xmm5,%xmm2
+ vpclmulqdq $0x10,%xmm0,%xmm5,%xmm3
+ vpxor %xmm3,%xmm2,%xmm2
+ vpclmulqdq $0x01,%xmm1,%xmm7,%xmm3
+ vpshufd $0x4e,%xmm1,%xmm1
+ vpxor %xmm1,%xmm2,%xmm2
+ vpxor %xmm3,%xmm2,%xmm2
+ vpclmulqdq $0x11,%xmm0,%xmm5,%xmm5
+ vpclmulqdq $0x01,%xmm2,%xmm7,%xmm1
+ vpshufd $0x4e,%xmm2,%xmm2
+ vpxor %xmm2,%xmm5,%xmm5
+ vpxor %xmm1,%xmm5,%xmm5
+
+
+.Lghash_done:
+
+ vpshufb %xmm6,%xmm5,%xmm5
+ vmovdqu %xmm5,(%rdi)
+
+ vzeroupper
+ RET
+
+.cfi_endproc
+SET_SIZE(gcm_ghash_vpclmulqdq_avx2)
+ENTRY_ALIGN(aes_gcm_enc_update_vaes_avx2, 32)
+.cfi_startproc
+
+ENDBR
+ pushq %r12
+.cfi_adjust_cfa_offset 8
+.cfi_offset %r12,-16
+
+ movq 16(%rsp),%r12
+#ifdef BORINGSSL_DISPATCH_TEST
+.extern BORINGSSL_function_hit
+.hidden BORINGSSL_function_hit
+ movb $1,BORINGSSL_function_hit+6(%rip)
+#endif
+ vbroadcasti128 .Lbswap_mask(%rip),%ymm0
+
+
+
+ vmovdqu (%r12),%xmm1
+ vpshufb %xmm0,%xmm1,%xmm1
+ vbroadcasti128 (%r8),%ymm11
+ vpshufb %ymm0,%ymm11,%ymm11
+
+
+
+ movl 504(%rcx),%r10d // ICP has a larger offset for rounds.
+ leal -24(,%r10,4),%r10d // ICP uses 10,12,14 not 9,11,13 for rounds.
+
+
+
+
+ leaq 96(%rcx,%r10,4),%r11
+ vbroadcasti128 (%rcx),%ymm9
+ vbroadcasti128 (%r11),%ymm10
+
+
+ vpaddd .Lctr_pattern(%rip),%ymm11,%ymm11
+
+
+
+ cmpq $127,%rdx
+ jbe .Lcrypt_loop_4x_done__func1
+
+ vmovdqu 128(%r9),%ymm7
+ vmovdqu 128+32(%r9),%ymm8
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_first_4_vecs__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_first_4_vecs__func1
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ jbe .Lghash_last_ciphertext_4x__func1
+.balign 16
+.Lcrypt_loop_4x__func1:
+
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ cmpl $24,%r10d
+ jl .Laes128__func1
+ je .Laes192__func1
+
+ vbroadcasti128 -208(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -192(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes192__func1:
+ vbroadcasti128 -176(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -160(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes128__func1:
+ prefetcht0 512(%rdi)
+ prefetcht0 512+64(%rdi)
+
+ vmovdqu 0(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vbroadcasti128 -144(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vbroadcasti128 -128(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 32(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -112(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 64(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+
+ vbroadcasti128 -96(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -80(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+
+ vbroadcasti128 -64(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -48(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -32(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -16(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+
+ subq $-128,%rsi
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ ja .Lcrypt_loop_4x__func1
+.Lghash_last_ciphertext_4x__func1:
+
+ vmovdqu 0(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vmovdqu 32(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vmovdqu 64(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rsi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+ subq $-128,%rsi
+.Lcrypt_loop_4x_done__func1:
+
+ testq %rdx,%rdx
+ jz .Ldone__func1
+
+
+
+
+
+ leaq 128(%r9),%r8
+ subq %rdx,%r8
+
+
+ vpxor %xmm5,%xmm5,%xmm5
+ vpxor %xmm6,%xmm6,%xmm6
+ vpxor %xmm7,%xmm7,%xmm7
+
+ cmpq $64,%rdx
+ jb .Llessthan64bytes__func1
+
+
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_1__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_1__func1
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%ymm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %ymm3,%ymm13,%ymm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+
+
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpshufb %ymm0,%ymm13,%ymm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%ymm3
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm7
+ vpclmulqdq $0x00,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+ addq $64,%r8
+ addq $64,%rdi
+ addq $64,%rsi
+ subq $64,%rdx
+ jz .Lreduce__func1
+
+ vpxor %xmm1,%xmm1,%xmm1
+
+
+.Llessthan64bytes__func1:
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_2__func1:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_2__func1
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+
+
+ cmpq $32,%rdx
+ jb .Lxor_one_block__func1
+ je .Lxor_two_blocks__func1
+
+.Lxor_three_blocks__func1:
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%xmm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %xmm3,%xmm13,%xmm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %xmm13,32(%rsi)
+
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpshufb %xmm0,%xmm13,%xmm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%xmm3
+ vpclmulqdq $0x00,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm7,%ymm7
+ jmp .Lghash_mul_one_vec_unreduced__func1
+
+.Lxor_two_blocks__func1:
+ vmovdqu (%rdi),%ymm2
+ vpxor %ymm2,%ymm12,%ymm12
+ vmovdqu %ymm12,(%rsi)
+ vpshufb %ymm0,%ymm12,%ymm12
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ jmp .Lghash_mul_one_vec_unreduced__func1
+
+.Lxor_one_block__func1:
+ vmovdqu (%rdi),%xmm2
+ vpxor %xmm2,%xmm12,%xmm12
+ vmovdqu %xmm12,(%rsi)
+ vpshufb %xmm0,%xmm12,%xmm12
+ vpxor %xmm1,%xmm12,%xmm12
+ vmovdqu (%r8),%xmm2
+
+.Lghash_mul_one_vec_unreduced__func1:
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+.Lreduce__func1:
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm5,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm3,%ymm6,%ymm6
+ vpclmulqdq $0x01,%ymm6,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm7,%ymm7
+ vpxor %ymm3,%ymm7,%ymm7
+ vextracti128 $1,%ymm7,%xmm1
+ vpxor %xmm7,%xmm1,%xmm1
+
+.Ldone__func1:
+
+ vpshufb %xmm0,%xmm1,%xmm1
+ vmovdqu %xmm1,(%r12)
+
+ vzeroupper
+ popq %r12
+.cfi_adjust_cfa_offset -8
+.cfi_restore %r12
+ RET
+
+.cfi_endproc
+SET_SIZE(aes_gcm_enc_update_vaes_avx2)
+ENTRY_ALIGN(aes_gcm_dec_update_vaes_avx2, 32)
+.cfi_startproc
+
+ENDBR
+ pushq %r12
+.cfi_adjust_cfa_offset 8
+.cfi_offset %r12,-16
+
+ movq 16(%rsp),%r12
+ vbroadcasti128 .Lbswap_mask(%rip),%ymm0
+
+
+
+ vmovdqu (%r12),%xmm1
+ vpshufb %xmm0,%xmm1,%xmm1
+ vbroadcasti128 (%r8),%ymm11
+ vpshufb %ymm0,%ymm11,%ymm11
+
+
+
+ movl 504(%rcx),%r10d // ICP has a larger offset for rounds.
+ leal -24(,%r10,4),%r10d // ICP uses 10,12,14 not 9,11,13 for rounds.
+
+
+
+
+ leaq 96(%rcx,%r10,4),%r11
+ vbroadcasti128 (%rcx),%ymm9
+ vbroadcasti128 (%r11),%ymm10
+
+
+ vpaddd .Lctr_pattern(%rip),%ymm11,%ymm11
+
+
+
+ cmpq $127,%rdx
+ jbe .Lcrypt_loop_4x_done__func2
+
+ vmovdqu 128(%r9),%ymm7
+ vmovdqu 128+32(%r9),%ymm8
+.balign 16
+.Lcrypt_loop_4x__func2:
+
+
+
+
+ vmovdqu .Linc_2blocks(%rip),%ymm2
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm14
+ vpaddd %ymm2,%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm15
+ vpaddd %ymm2,%ymm11,%ymm11
+
+
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ vpxor %ymm9,%ymm14,%ymm14
+ vpxor %ymm9,%ymm15,%ymm15
+
+ cmpl $24,%r10d
+ jl .Laes128__func2
+ je .Laes192__func2
+
+ vbroadcasti128 -208(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -192(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes192__func2:
+ vbroadcasti128 -176(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vbroadcasti128 -160(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+.Laes128__func2:
+ prefetcht0 512(%rdi)
+ prefetcht0 512+64(%rdi)
+
+ vmovdqu 0(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 0(%r9),%ymm4
+ vpxor %ymm1,%ymm3,%ymm3
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm7,%ymm2,%ymm6
+
+ vbroadcasti128 -144(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vbroadcasti128 -128(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 32(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 32(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm7,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -112(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vmovdqu 64(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+ vmovdqu 64(%r9),%ymm4
+
+ vbroadcasti128 -96(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -80(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x00,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+
+ vmovdqu 96(%rdi),%ymm3
+ vpshufb %ymm0,%ymm3,%ymm3
+
+ vbroadcasti128 -64(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vmovdqu 96(%r9),%ymm4
+ vpclmulqdq $0x00,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm5,%ymm5
+ vpclmulqdq $0x11,%ymm4,%ymm3,%ymm2
+ vpxor %ymm2,%ymm1,%ymm1
+ vpunpckhqdq %ymm3,%ymm3,%ymm2
+ vpxor %ymm3,%ymm2,%ymm2
+ vpclmulqdq $0x10,%ymm8,%ymm2,%ymm2
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -48(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm1,%ymm6,%ymm6
+
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm4
+ vpclmulqdq $0x01,%ymm5,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm2,%ymm6,%ymm6
+
+ vbroadcasti128 -32(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+
+ vpclmulqdq $0x01,%ymm6,%ymm4,%ymm2
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm1,%ymm1
+ vpxor %ymm2,%ymm1,%ymm1
+
+ vbroadcasti128 -16(%r11),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ vaesenc %ymm2,%ymm14,%ymm14
+ vaesenc %ymm2,%ymm15,%ymm15
+
+ vextracti128 $1,%ymm1,%xmm2
+ vpxor %xmm2,%xmm1,%xmm1
+
+
+
+ vpxor 0(%rdi),%ymm10,%ymm2
+ vpxor 32(%rdi),%ymm10,%ymm3
+ vpxor 64(%rdi),%ymm10,%ymm5
+ vpxor 96(%rdi),%ymm10,%ymm6
+ vaesenclast %ymm2,%ymm12,%ymm12
+ vaesenclast %ymm3,%ymm13,%ymm13
+ vaesenclast %ymm5,%ymm14,%ymm14
+ vaesenclast %ymm6,%ymm15,%ymm15
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+ vmovdqu %ymm14,64(%rsi)
+ vmovdqu %ymm15,96(%rsi)
+
+ subq $-128,%rdi
+ subq $-128,%rsi
+ addq $-128,%rdx
+ cmpq $127,%rdx
+ ja .Lcrypt_loop_4x__func2
+.Lcrypt_loop_4x_done__func2:
+
+ testq %rdx,%rdx
+ jz .Ldone__func2
+
+
+
+
+
+ leaq 128(%r9),%r8
+ subq %rdx,%r8
+
+
+ vpxor %xmm5,%xmm5,%xmm5
+ vpxor %xmm6,%xmm6,%xmm6
+ vpxor %xmm7,%xmm7,%xmm7
+
+ cmpq $64,%rdx
+ jb .Llessthan64bytes__func2
+
+
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_1__func2:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_1__func2
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%ymm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %ymm3,%ymm13,%ymm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %ymm13,32(%rsi)
+
+
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpshufb %ymm0,%ymm3,%ymm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%ymm3
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm7
+ vpclmulqdq $0x00,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm3,%ymm13,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+ addq $64,%r8
+ addq $64,%rdi
+ addq $64,%rsi
+ subq $64,%rdx
+ jz .Lreduce__func2
+
+ vpxor %xmm1,%xmm1,%xmm1
+
+
+.Llessthan64bytes__func2:
+ vpshufb %ymm0,%ymm11,%ymm12
+ vpaddd .Linc_2blocks(%rip),%ymm11,%ymm11
+ vpshufb %ymm0,%ymm11,%ymm13
+ vpxor %ymm9,%ymm12,%ymm12
+ vpxor %ymm9,%ymm13,%ymm13
+ leaq 16(%rcx),%rax
+.Lvaesenc_loop_tail_2__func2:
+ vbroadcasti128 (%rax),%ymm2
+ vaesenc %ymm2,%ymm12,%ymm12
+ vaesenc %ymm2,%ymm13,%ymm13
+ addq $16,%rax
+ cmpq %rax,%r11
+ jne .Lvaesenc_loop_tail_2__func2
+ vaesenclast %ymm10,%ymm12,%ymm12
+ vaesenclast %ymm10,%ymm13,%ymm13
+
+
+
+
+ cmpq $32,%rdx
+ jb .Lxor_one_block__func2
+ je .Lxor_two_blocks__func2
+
+.Lxor_three_blocks__func2:
+ vmovdqu 0(%rdi),%ymm2
+ vmovdqu 32(%rdi),%xmm3
+ vpxor %ymm2,%ymm12,%ymm12
+ vpxor %xmm3,%xmm13,%xmm13
+ vmovdqu %ymm12,0(%rsi)
+ vmovdqu %xmm13,32(%rsi)
+
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpshufb %xmm0,%xmm3,%xmm13
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ vmovdqu 32(%r8),%xmm3
+ vpclmulqdq $0x00,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%xmm3,%xmm13,%xmm4
+ vpxor %ymm4,%ymm7,%ymm7
+ jmp .Lghash_mul_one_vec_unreduced__func2
+
+.Lxor_two_blocks__func2:
+ vmovdqu (%rdi),%ymm2
+ vpxor %ymm2,%ymm12,%ymm12
+ vmovdqu %ymm12,(%rsi)
+ vpshufb %ymm0,%ymm2,%ymm12
+ vpxor %ymm1,%ymm12,%ymm12
+ vmovdqu (%r8),%ymm2
+ jmp .Lghash_mul_one_vec_unreduced__func2
+
+.Lxor_one_block__func2:
+ vmovdqu (%rdi),%xmm2
+ vpxor %xmm2,%xmm12,%xmm12
+ vmovdqu %xmm12,(%rsi)
+ vpshufb %xmm0,%xmm2,%xmm12
+ vpxor %xmm1,%xmm12,%xmm12
+ vmovdqu (%r8),%xmm2
+
+.Lghash_mul_one_vec_unreduced__func2:
+ vpclmulqdq $0x00,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm5,%ymm5
+ vpclmulqdq $0x01,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x10,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm6,%ymm6
+ vpclmulqdq $0x11,%ymm2,%ymm12,%ymm4
+ vpxor %ymm4,%ymm7,%ymm7
+
+.Lreduce__func2:
+
+ vbroadcasti128 .Lgfpoly(%rip),%ymm2
+ vpclmulqdq $0x01,%ymm5,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm5,%ymm5
+ vpxor %ymm5,%ymm6,%ymm6
+ vpxor %ymm3,%ymm6,%ymm6
+ vpclmulqdq $0x01,%ymm6,%ymm2,%ymm3
+ vpshufd $0x4e,%ymm6,%ymm6
+ vpxor %ymm6,%ymm7,%ymm7
+ vpxor %ymm3,%ymm7,%ymm7
+ vextracti128 $1,%ymm7,%xmm1
+ vpxor %xmm7,%xmm1,%xmm1
+
+.Ldone__func2:
+
+ vpshufb %xmm0,%xmm1,%xmm1
+ vmovdqu %xmm1,(%r12)
+
+ vzeroupper
+ popq %r12
+.cfi_adjust_cfa_offset -8
+.cfi_restore %r12
+ RET
+
+.cfi_endproc
+SET_SIZE(aes_gcm_dec_update_vaes_avx2)
+
+#endif /* !_WIN32 || _KERNEL */
+
+/* Mark the stack non-executable. */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
+
+#endif /* defined(__x86_64__) && defined(HAVE_AVX) && defined(HAVE_AES) ... */
diff --git a/sys/contrib/openzfs/module/icp/include/modes/modes.h b/sys/contrib/openzfs/module/icp/include/modes/modes.h
index ca734cf4f045..de11d9eafafb 100644
--- a/sys/contrib/openzfs/module/icp/include/modes/modes.h
+++ b/sys/contrib/openzfs/module/icp/include/modes/modes.h
@@ -42,7 +42,7 @@ extern "C" {
*/
#if defined(__x86_64__) && defined(HAVE_AVX) && \
defined(HAVE_AES) && defined(HAVE_PCLMULQDQ)
-#define CAN_USE_GCM_ASM
+#define CAN_USE_GCM_ASM (HAVE_VAES && HAVE_VPCLMULQDQ ? 2 : 1)
extern boolean_t gcm_avx_can_use_movbe;
#endif
@@ -129,6 +129,15 @@ typedef struct ccm_ctx {
#define ccm_copy_to ccm_common.cc_copy_to
#define ccm_flags ccm_common.cc_flags
+#ifdef CAN_USE_GCM_ASM
+typedef enum gcm_impl {
+ GCM_IMPL_GENERIC = 0,
+ GCM_IMPL_AVX,
+ GCM_IMPL_AVX2,
+ GCM_IMPL_MAX,
+} gcm_impl;
+#endif
+
/*
* gcm_tag_len: Length of authentication tag.
*
@@ -174,7 +183,7 @@ typedef struct gcm_ctx {
uint64_t gcm_len_a_len_c[2];
uint8_t *gcm_pt_buf;
#ifdef CAN_USE_GCM_ASM
- boolean_t gcm_use_avx;
+ enum gcm_impl impl;
#endif
} gcm_ctx_t;
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c b/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c
index c114db14a916..b218c0da8125 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c
@@ -112,7 +112,6 @@ static int zfs__fini(void);
static void zfs_shutdown(void *, int);
static eventhandler_tag zfs_shutdown_event_tag;
-static eventhandler_tag zfs_mountroot_event_tag;
#define ZFS_MIN_KSTACK_PAGES 4
@@ -311,9 +310,6 @@ zfs_modevent(module_t mod, int type, void *unused __unused)
zfs_shutdown_event_tag = EVENTHANDLER_REGISTER(
shutdown_post_sync, zfs_shutdown, NULL,
SHUTDOWN_PRI_FIRST);
- zfs_mountroot_event_tag = EVENTHANDLER_REGISTER(
- mountroot, spa_boot_init, NULL,
- SI_ORDER_ANY);
}
return (err);
case MOD_UNLOAD:
@@ -322,9 +318,6 @@ zfs_modevent(module_t mod, int type, void *unused __unused)
if (zfs_shutdown_event_tag != NULL)
EVENTHANDLER_DEREGISTER(shutdown_post_sync,
zfs_shutdown_event_tag);
- if (zfs_mountroot_event_tag != NULL)
- EVENTHANDLER_DEREGISTER(mountroot,
- zfs_mountroot_event_tag);
}
return (err);
case MOD_SHUTDOWN:
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
index 61d0bb26d1e5..a222c5de4a2a 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
@@ -494,7 +494,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap)
vap->va_uid = 0;
vap->va_gid = 0;
- vap->va_rdev = 0;
+ vap->va_rdev = NODEV;
/*
* We are a purely virtual object, so we have no
* blocksize or allocated blocks.
@@ -674,6 +674,7 @@ zfsctl_root_readdir(struct vop_readdir_args *ap)
zfs_uio_t uio;
int *eofp = ap->a_eofflag;
off_t dots_offset;
+ ssize_t orig_resid;
int error;
zfs_uio_init(&uio, ap->a_uio);
@@ -688,16 +689,16 @@ zfsctl_root_readdir(struct vop_readdir_args *ap)
* count to return is 0.
*/
if (zfs_uio_offset(&uio) == 3 * sizeof (entry)) {
+ if (eofp != NULL)
+ *eofp = 1;
return (0);
}
+ orig_resid = zfs_uio_resid(&uio);
error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, &uio,
&dots_offset);
- if (error != 0) {
- if (error == ENAMETOOLONG) /* ran out of destination space */
- error = 0;
- return (error);
- }
+ if (error != 0)
+ goto err;
if (zfs_uio_offset(&uio) != dots_offset)
return (SET_ERROR(EINVAL));
@@ -710,8 +711,11 @@ zfsctl_root_readdir(struct vop_readdir_args *ap)
entry.d_reclen = sizeof (entry);
error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio));
if (error != 0) {
- if (error == ENAMETOOLONG)
- error = 0;
+err:
+ if (error == ENAMETOOLONG) {
+ error = orig_resid == zfs_uio_resid(&uio) ?
+ EINVAL : 0;
+ }
return (SET_ERROR(error));
}
if (eofp != NULL)
@@ -1056,17 +1060,21 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap)
zfs_uio_t uio;
int *eofp = ap->a_eofflag;
off_t dots_offset;
+ ssize_t orig_resid;
int error;
zfs_uio_init(&uio, ap->a_uio);
+ orig_resid = zfs_uio_resid(&uio);
ASSERT3S(vp->v_type, ==, VDIR);
error = sfs_readdir_common(ZFSCTL_INO_ROOT, ZFSCTL_INO_SNAPDIR, ap,
&uio, &dots_offset);
if (error != 0) {
- if (error == ENAMETOOLONG) /* ran out of destination space */
- error = 0;
+ if (error == ENAMETOOLONG) { /* ran out of destination space */
+ error = orig_resid == zfs_uio_resid(&uio) ?
+ EINVAL : 0;
+ }
return (error);
}
@@ -1084,9 +1092,13 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap)
dsl_pool_config_exit(dmu_objset_pool(zfsvfs->z_os), FTAG);
if (error != 0) {
if (error == ENOENT) {
- if (eofp != NULL)
- *eofp = 1;
- error = 0;
+ if (orig_resid == zfs_uio_resid(&uio)) {
+ error = EINVAL;
+ } else {
+ error = 0;
+ if (eofp != NULL)
+ *eofp = 1;
+ }
}
zfs_exit(zfsvfs, FTAG);
return (error);
@@ -1099,8 +1111,10 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap)
entry.d_reclen = sizeof (entry);
error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio));
if (error != 0) {
- if (error == ENAMETOOLONG)
- error = 0;
+ if (error == ENAMETOOLONG) {
+ error = orig_resid == zfs_uio_resid(&uio) ?
+ EINVAL : 0;
+ }
zfs_exit(zfsvfs, FTAG);
return (SET_ERROR(error));
}
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
index 1813c411b013..174141a5deab 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -1695,6 +1695,7 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp,
objset_t *os;
caddr_t outbuf;
size_t bufsize;
+ ssize_t orig_resid;
zap_cursor_t zc;
zap_attribute_t *zap;
uint_t bytes_wanted;
@@ -1735,7 +1736,7 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp,
/*
* Quit if directory has been removed (posix)
*/
- if ((*eofp = zp->z_unlinked) != 0) {
+ if ((*eofp = (zp->z_unlinked != 0)) != 0) {
zfs_exit(zfsvfs, FTAG);
return (0);
}
@@ -1743,6 +1744,7 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp,
error = 0;
os = zfsvfs->z_os;
offset = zfs_uio_offset(uio);
+ orig_resid = zfs_uio_resid(uio);
prefetch = zp->z_zn_prefetch;
zap = zap_attribute_long_alloc();
@@ -1922,7 +1924,7 @@ update:
kmem_free(outbuf, bufsize);
if (error == ENOENT)
- error = 0;
+ error = orig_resid == zfs_uio_resid(uio) ? EINVAL : 0;
ZFS_ACCESSTIME_STAMP(zfsvfs, zp);
@@ -2013,7 +2015,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
if (vp->v_type == VBLK || vp->v_type == VCHR)
vap->va_rdev = zfs_cmpldev(rdev);
else
- vap->va_rdev = 0;
+ vap->va_rdev = NODEV;
vap->va_gen = zp->z_gen;
vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */
vap->va_filerev = zp->z_seq;
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
index 265dfd55fc4d..0dd2ecd7fd8d 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c
@@ -31,7 +31,7 @@
* Copyright (c) 2012, 2017 by Delphix. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
- * Copyright (c) 2024, Klara, Inc.
+ * Copyright (c) 2024, 2025, Klara, Inc.
*/
/* Portions Copyright 2011 Martin Matuska <mm@FreeBSD.org> */
@@ -196,7 +196,6 @@ DECLARE_GEOM_CLASS(zfs_zvol_class, zfs_zvol);
static int zvol_geom_open(struct g_provider *pp, int flag, int count);
static int zvol_geom_close(struct g_provider *pp, int flag, int count);
-static void zvol_geom_destroy(zvol_state_t *zv);
static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace);
static void zvol_geom_bio_start(struct bio *bp);
static int zvol_geom_bio_getattr(struct bio *bp);
@@ -226,25 +225,14 @@ zvol_geom_open(struct g_provider *pp, int flag, int count)
}
retry:
- rw_enter(&zvol_state_lock, ZVOL_RW_READER);
- /*
- * Obtain a copy of private under zvol_state_lock to make sure either
- * the result of zvol free code setting private to NULL is observed,
- * or the zv is protected from being freed because of the positive
- * zv_open_count.
- */
- zv = pp->private;
- if (zv == NULL) {
- rw_exit(&zvol_state_lock);
- err = SET_ERROR(ENXIO);
- goto out_locked;
- }
+ zv = atomic_load_ptr(&pp->private);
+ if (zv == NULL)
+ return (SET_ERROR(ENXIO));
mutex_enter(&zv->zv_state_lock);
if (zv->zv_zso->zso_dying || zv->zv_flags & ZVOL_REMOVING) {
- rw_exit(&zvol_state_lock);
err = SET_ERROR(ENXIO);
- goto out_zv_locked;
+ goto out_locked;
}
ASSERT3S(zv->zv_volmode, ==, ZFS_VOLMODE_GEOM);
@@ -257,8 +245,24 @@ retry:
drop_suspend = B_TRUE;
if (!rw_tryenter(&zv->zv_suspend_lock, ZVOL_RW_READER)) {
mutex_exit(&zv->zv_state_lock);
+
+ /*
+ * Removal may happen while the locks are down, so
+ * we can't trust zv any longer; we have to start over.
+ */
+ zv = atomic_load_ptr(&pp->private);
+ if (zv == NULL)
+ return (SET_ERROR(ENXIO));
+
rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ if (zv->zv_zso->zso_dying ||
+ zv->zv_flags & ZVOL_REMOVING) {
+ err = SET_ERROR(ENXIO);
+ goto out_locked;
+ }
+
/* Check to see if zv_suspend_lock is needed. */
if (zv->zv_open_count != 0) {
rw_exit(&zv->zv_suspend_lock);
@@ -266,7 +270,6 @@ retry:
}
}
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -294,7 +297,7 @@ retry:
if (drop_namespace)
mutex_exit(&spa_namespace_lock);
if (err)
- goto out_zv_locked;
+ goto out_locked;
pp->mediasize = zv->zv_volsize;
pp->stripeoffset = 0;
pp->stripesize = zv->zv_volblocksize;
@@ -329,9 +332,8 @@ out_opened:
zvol_last_close(zv);
wakeup(zv);
}
-out_zv_locked:
- mutex_exit(&zv->zv_state_lock);
out_locked:
+ mutex_exit(&zv->zv_state_lock);
if (drop_suspend)
rw_exit(&zv->zv_suspend_lock);
return (err);
@@ -345,12 +347,9 @@ zvol_geom_close(struct g_provider *pp, int flag, int count)
boolean_t drop_suspend = B_TRUE;
int new_open_count;
- rw_enter(&zvol_state_lock, ZVOL_RW_READER);
- zv = pp->private;
- if (zv == NULL) {
- rw_exit(&zvol_state_lock);
+ zv = atomic_load_ptr(&pp->private);
+ if (zv == NULL)
return (SET_ERROR(ENXIO));
- }
mutex_enter(&zv->zv_state_lock);
if (zv->zv_flags & ZVOL_EXCL) {
@@ -377,6 +376,15 @@ zvol_geom_close(struct g_provider *pp, int flag, int count)
mutex_exit(&zv->zv_state_lock);
rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ /*
+ * Unlike in zvol_geom_open(), we don't check if
+ * removal started here, because we might be one of the
+ * openers that needs to be thrown out! If we're the
+ * last, we need to call zvol_last_close() below to
+ * finish cleanup. So, no special treatment for us.
+ */
+
/* Check to see if zv_suspend_lock is needed. */
new_open_count = zv->zv_open_count - count;
if (new_open_count != 0) {
@@ -387,7 +395,6 @@ zvol_geom_close(struct g_provider *pp, int flag, int count)
} else {
drop_suspend = B_FALSE;
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -408,20 +415,6 @@ zvol_geom_close(struct g_provider *pp, int flag, int count)
return (0);
}
-static void
-zvol_geom_destroy(zvol_state_t *zv)
-{
- struct zvol_state_geom *zsg = &zv->zv_zso->zso_geom;
- struct g_provider *pp = zsg->zsg_provider;
-
- ASSERT3S(zv->zv_volmode, ==, ZFS_VOLMODE_GEOM);
-
- g_topology_assert();
-
- zsg->zsg_provider = NULL;
- g_wither_geom(pp->geom, ENXIO);
-}
-
void
zvol_wait_close(zvol_state_t *zv)
{
@@ -454,7 +447,7 @@ zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace)
("Unsupported access request to %s (acr=%d, acw=%d, ace=%d).",
pp->name, acr, acw, ace));
- if (pp->private == NULL) {
+ if (atomic_load_ptr(&pp->private) == NULL) {
if (acr <= 0 && acw <= 0 && ace <= 0)
return (0);
return (pp->error);
@@ -921,25 +914,14 @@ zvol_cdev_open(struct cdev *dev, int flags, int fmt, struct thread *td)
boolean_t drop_suspend = B_FALSE;
retry:
- rw_enter(&zvol_state_lock, ZVOL_RW_READER);
- /*
- * Obtain a copy of si_drv2 under zvol_state_lock to make sure either
- * the result of zvol free code setting si_drv2 to NULL is observed,
- * or the zv is protected from being freed because of the positive
- * zv_open_count.
- */
- zv = dev->si_drv2;
- if (zv == NULL) {
- rw_exit(&zvol_state_lock);
- err = SET_ERROR(ENXIO);
- goto out_locked;
- }
+ zv = atomic_load_ptr(&dev->si_drv2);
+ if (zv == NULL)
+ return (SET_ERROR(ENXIO));
mutex_enter(&zv->zv_state_lock);
- if (zv->zv_zso->zso_dying) {
- rw_exit(&zvol_state_lock);
+ if (zv->zv_zso->zso_dying || zv->zv_flags & ZVOL_REMOVING) {
err = SET_ERROR(ENXIO);
- goto out_zv_locked;
+ goto out_locked;
}
ASSERT3S(zv->zv_volmode, ==, ZFS_VOLMODE_DEV);
@@ -954,6 +936,13 @@ retry:
mutex_exit(&zv->zv_state_lock);
rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ if (unlikely(zv->zv_flags & ZVOL_REMOVING)) {
+ /* Removal started while locks were down. */
+ err = SET_ERROR(ENXIO);
+ goto out_locked;
+ }
+
/* Check to see if zv_suspend_lock is needed. */
if (zv->zv_open_count != 0) {
rw_exit(&zv->zv_suspend_lock);
@@ -961,7 +950,6 @@ retry:
}
}
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -989,7 +977,7 @@ retry:
if (drop_namespace)
mutex_exit(&spa_namespace_lock);
if (err)
- goto out_zv_locked;
+ goto out_locked;
}
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -1016,9 +1004,8 @@ out_opened:
zvol_last_close(zv);
wakeup(zv);
}
-out_zv_locked:
- mutex_exit(&zv->zv_state_lock);
out_locked:
+ mutex_exit(&zv->zv_state_lock);
if (drop_suspend)
rw_exit(&zv->zv_suspend_lock);
return (err);
@@ -1030,12 +1017,9 @@ zvol_cdev_close(struct cdev *dev, int flags, int fmt, struct thread *td)
zvol_state_t *zv;
boolean_t drop_suspend = B_TRUE;
- rw_enter(&zvol_state_lock, ZVOL_RW_READER);
- zv = dev->si_drv2;
- if (zv == NULL) {
- rw_exit(&zvol_state_lock);
+ zv = atomic_load_ptr(&dev->si_drv2);
+ if (zv == NULL)
return (SET_ERROR(ENXIO));
- }
mutex_enter(&zv->zv_state_lock);
if (zv->zv_flags & ZVOL_EXCL) {
@@ -1060,6 +1044,15 @@ zvol_cdev_close(struct cdev *dev, int flags, int fmt, struct thread *td)
mutex_exit(&zv->zv_state_lock);
rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ /*
+ * Unlike in zvol_cdev_open(), we don't check if
+ * removal started here, because we might be one of the
+ * openers that needs to be thrown out! If we're the
+ * last, we need to call zvol_last_close() below to
+ * finish cleanup. So, no special treatment for us.
+ */
+
/* Check to see if zv_suspend_lock is needed. */
if (zv->zv_open_count != 1) {
rw_exit(&zv->zv_suspend_lock);
@@ -1069,7 +1062,6 @@ zvol_cdev_close(struct cdev *dev, int flags, int fmt, struct thread *td)
} else {
drop_suspend = B_FALSE;
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -1101,7 +1093,8 @@ zvol_cdev_ioctl(struct cdev *dev, ulong_t cmd, caddr_t data,
int error;
boolean_t sync;
- zv = dev->si_drv2;
+ zv = atomic_load_ptr(&dev->si_drv2);
+ ASSERT3P(zv, !=, NULL);
error = 0;
KASSERT(zv->zv_open_count > 0,
@@ -1162,6 +1155,7 @@ zvol_cdev_ioctl(struct cdev *dev, ulong_t cmd, caddr_t data,
*(off_t *)data = 0;
break;
case DIOCGATTR: {
+ rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
spa_t *spa = dmu_objset_spa(zv->zv_objset);
struct diocgattr_arg *arg = (struct diocgattr_arg *)data;
uint64_t refd, avail, usedobjs, availobjs;
@@ -1186,6 +1180,7 @@ zvol_cdev_ioctl(struct cdev *dev, ulong_t cmd, caddr_t data,
arg->value.off = refd / DEV_BSIZE;
} else
error = SET_ERROR(ENOIOCTL);
+ rw_exit(&zv->zv_suspend_lock);
break;
}
case FIOSEEKHOLE:
@@ -1196,10 +1191,12 @@ zvol_cdev_ioctl(struct cdev *dev, ulong_t cmd, caddr_t data,
hole = (cmd == FIOSEEKHOLE);
noff = *off;
+ rw_enter(&zv->zv_suspend_lock, ZVOL_RW_READER);
lr = zfs_rangelock_enter(&zv->zv_rangelock, 0, UINT64_MAX,
RL_READER);
error = dmu_offset_next(zv->zv_objset, ZVOL_OBJ, hole, &noff);
zfs_rangelock_exit(lr);
+ rw_exit(&zv->zv_suspend_lock);
*off = noff;
break;
}
@@ -1400,42 +1397,65 @@ zvol_alloc(const char *name, uint64_t volsize, uint64_t volblocksize,
* Remove minor node for the specified volume.
*/
void
-zvol_os_free(zvol_state_t *zv)
+zvol_os_remove_minor(zvol_state_t *zv)
{
- ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
- ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
ASSERT0(zv->zv_open_count);
+ ASSERT0(atomic_read(&zv->zv_suspend_ref));
+ ASSERT(zv->zv_flags & ZVOL_REMOVING);
- ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name);
-
- rw_destroy(&zv->zv_suspend_lock);
- zfs_rangelock_fini(&zv->zv_rangelock);
+ struct zvol_state_os *zso = zv->zv_zso;
+ zv->zv_zso = NULL;
if (zv->zv_volmode == ZFS_VOLMODE_GEOM) {
- struct zvol_state_geom *zsg = &zv->zv_zso->zso_geom;
- struct g_provider *pp __maybe_unused = zsg->zsg_provider;
-
- ASSERT0P(pp->private);
+ struct zvol_state_geom *zsg = &zso->zso_geom;
+ struct g_provider *pp = zsg->zsg_provider;
+ atomic_store_ptr(&pp->private, NULL);
+ mutex_exit(&zv->zv_state_lock);
g_topology_lock();
- zvol_geom_destroy(zv);
+ g_wither_geom(pp->geom, ENXIO);
g_topology_unlock();
} else if (zv->zv_volmode == ZFS_VOLMODE_DEV) {
- struct zvol_state_dev *zsd = &zv->zv_zso->zso_dev;
+ struct zvol_state_dev *zsd = &zso->zso_dev;
struct cdev *dev = zsd->zsd_cdev;
+ if (dev != NULL)
+ atomic_store_ptr(&dev->si_drv2, NULL);
+ mutex_exit(&zv->zv_state_lock);
+
if (dev != NULL) {
- ASSERT0P(dev->si_drv2);
destroy_dev(dev);
knlist_clear(&zsd->zsd_selinfo.si_note, 0);
knlist_destroy(&zsd->zsd_selinfo.si_note);
}
}
+ kmem_free(zso, sizeof (struct zvol_state_os));
+
+ mutex_enter(&zv->zv_state_lock);
+}
+
+void
+zvol_os_free(zvol_state_t *zv)
+{
+ ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
+ ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
+ ASSERT0(zv->zv_open_count);
+ ASSERT0P(zv->zv_zso);
+
+ ASSERT0P(zv->zv_objset);
+ ASSERT0P(zv->zv_zilog);
+ ASSERT0P(zv->zv_dn);
+
+ ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name);
+
+ rw_destroy(&zv->zv_suspend_lock);
+ zfs_rangelock_fini(&zv->zv_rangelock);
+
mutex_destroy(&zv->zv_state_lock);
cv_destroy(&zv->zv_removing_cv);
dataset_kstats_destroy(&zv->zv_kstat);
- kmem_free(zv->zv_zso, sizeof (struct zvol_state_os));
kmem_free(zv, sizeof (zvol_state_t));
zvol_minors--;
}
@@ -1538,28 +1558,6 @@ out_doi:
return (error);
}
-void
-zvol_os_clear_private(zvol_state_t *zv)
-{
- ASSERT(RW_LOCK_HELD(&zvol_state_lock));
- if (zv->zv_volmode == ZFS_VOLMODE_GEOM) {
- struct zvol_state_geom *zsg = &zv->zv_zso->zso_geom;
- struct g_provider *pp = zsg->zsg_provider;
-
- if (pp->private == NULL) /* already cleared */
- return;
-
- pp->private = NULL;
- ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
- } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) {
- struct zvol_state_dev *zsd = &zv->zv_zso->zso_dev;
- struct cdev *dev = zsd->zsd_cdev;
-
- if (dev != NULL)
- dev->si_drv2 = NULL;
- }
-}
-
int
zvol_os_update_volsize(zvol_state_t *zv, uint64_t volsize)
{
diff --git a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
index a73acdad34ae..bac166fcd89e 100644
--- a/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
+++ b/sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2012, 2020 by Delphix. All rights reserved.
* Copyright (c) 2024, Rob Norris <robn@despairlabs.com>
- * Copyright (c) 2024, Klara, Inc.
+ * Copyright (c) 2024, 2025, Klara, Inc.
*/
#include <sys/dataset_kstats.h>
@@ -679,28 +679,19 @@ zvol_open(struct block_device *bdev, fmode_t flag)
retry:
#endif
- rw_enter(&zvol_state_lock, RW_READER);
- /*
- * Obtain a copy of private_data under the zvol_state_lock to make
- * sure that either the result of zvol free code path setting
- * disk->private_data to NULL is observed, or zvol_os_free()
- * is not called on this zv because of the positive zv_open_count.
- */
+
#ifdef HAVE_BLK_MODE_T
- zv = disk->private_data;
+ zv = atomic_load_ptr(&disk->private_data);
#else
- zv = bdev->bd_disk->private_data;
+ zv = atomic_load_ptr(&bdev->bd_disk->private_data);
#endif
if (zv == NULL) {
- rw_exit(&zvol_state_lock);
return (-SET_ERROR(ENXIO));
}
mutex_enter(&zv->zv_state_lock);
-
if (unlikely(zv->zv_flags & ZVOL_REMOVING)) {
mutex_exit(&zv->zv_state_lock);
- rw_exit(&zvol_state_lock);
return (-SET_ERROR(ENXIO));
}
@@ -712,8 +703,28 @@ retry:
if (zv->zv_open_count == 0) {
if (!rw_tryenter(&zv->zv_suspend_lock, RW_READER)) {
mutex_exit(&zv->zv_state_lock);
+
+ /*
+ * Removal may happen while the locks are down, so
+ * we can't trust zv any longer; we have to start over.
+ */
+#ifdef HAVE_BLK_MODE_T
+ zv = atomic_load_ptr(&disk->private_data);
+#else
+ zv = atomic_load_ptr(&bdev->bd_disk->private_data);
+#endif
+ if (zv == NULL)
+ return (-SET_ERROR(ENXIO));
+
rw_enter(&zv->zv_suspend_lock, RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ if (unlikely(zv->zv_flags & ZVOL_REMOVING)) {
+ mutex_exit(&zv->zv_state_lock);
+ rw_exit(&zv->zv_suspend_lock);
+ return (-SET_ERROR(ENXIO));
+ }
+
/* check to see if zv_suspend_lock is needed */
if (zv->zv_open_count != 0) {
rw_exit(&zv->zv_suspend_lock);
@@ -724,7 +735,6 @@ retry:
drop_suspend = B_TRUE;
}
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -821,11 +831,11 @@ zvol_release(struct gendisk *disk, fmode_t unused)
#if !defined(HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG)
(void) unused;
#endif
- zvol_state_t *zv;
boolean_t drop_suspend = B_TRUE;
- rw_enter(&zvol_state_lock, RW_READER);
- zv = disk->private_data;
+ zvol_state_t *zv = atomic_load_ptr(&disk->private_data);
+ if (zv == NULL)
+ return;
mutex_enter(&zv->zv_state_lock);
ASSERT3U(zv->zv_open_count, >, 0);
@@ -839,6 +849,15 @@ zvol_release(struct gendisk *disk, fmode_t unused)
mutex_exit(&zv->zv_state_lock);
rw_enter(&zv->zv_suspend_lock, RW_READER);
mutex_enter(&zv->zv_state_lock);
+
+ /*
+ * Unlike in zvol_open(), we don't check if removal
+ * started here, because we might be one of the openers
+ * that needs to be thrown out! If we're the last, we
+ * need to call zvol_last_close() below to finish
+ * cleanup. So, no special treatment for us.
+ */
+
/* check to see if zv_suspend_lock is needed */
if (zv->zv_open_count != 1) {
rw_exit(&zv->zv_suspend_lock);
@@ -848,7 +867,6 @@ zvol_release(struct gendisk *disk, fmode_t unused)
} else {
drop_suspend = B_FALSE;
}
- rw_exit(&zvol_state_lock);
ASSERT(MUTEX_HELD(&zv->zv_state_lock));
@@ -868,9 +886,10 @@ static int
zvol_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
- zvol_state_t *zv = bdev->bd_disk->private_data;
int error = 0;
+ zvol_state_t *zv = atomic_load_ptr(&bdev->bd_disk->private_data);
+ ASSERT3P(zv, !=, NULL);
ASSERT3U(zv->zv_open_count, >, 0);
switch (cmd) {
@@ -923,9 +942,8 @@ zvol_check_events(struct gendisk *disk, unsigned int clearing)
{
unsigned int mask = 0;
- rw_enter(&zvol_state_lock, RW_READER);
+ zvol_state_t *zv = atomic_load_ptr(&disk->private_data);
- zvol_state_t *zv = disk->private_data;
if (zv != NULL) {
mutex_enter(&zv->zv_state_lock);
mask = zv->zv_changed ? DISK_EVENT_MEDIA_CHANGE : 0;
@@ -933,17 +951,14 @@ zvol_check_events(struct gendisk *disk, unsigned int clearing)
mutex_exit(&zv->zv_state_lock);
}
- rw_exit(&zvol_state_lock);
-
return (mask);
}
static int
zvol_revalidate_disk(struct gendisk *disk)
{
- rw_enter(&zvol_state_lock, RW_READER);
+ zvol_state_t *zv = atomic_load_ptr(&disk->private_data);
- zvol_state_t *zv = disk->private_data;
if (zv != NULL) {
mutex_enter(&zv->zv_state_lock);
set_capacity(zv->zv_zso->zvo_disk,
@@ -951,8 +966,6 @@ zvol_revalidate_disk(struct gendisk *disk)
mutex_exit(&zv->zv_state_lock);
}
- rw_exit(&zvol_state_lock);
-
return (0);
}
@@ -971,16 +984,6 @@ zvol_os_update_volsize(zvol_state_t *zv, uint64_t volsize)
return (0);
}
-void
-zvol_os_clear_private(zvol_state_t *zv)
-{
- /*
- * Cleared while holding zvol_state_lock as a writer
- * which will prevent zvol_open() from opening it.
- */
- zv->zv_zso->zvo_disk->private_data = NULL;
-}
-
/*
* Provide a simple virtual geometry for legacy compatibility. For devices
* smaller than 1 MiB a small head and sector count is used to allow very
@@ -990,9 +993,10 @@ zvol_os_clear_private(zvol_state_t *zv)
static int
zvol_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
- zvol_state_t *zv = bdev->bd_disk->private_data;
sector_t sectors;
+ zvol_state_t *zv = atomic_load_ptr(&bdev->bd_disk->private_data);
+ ASSERT3P(zv, !=, NULL);
ASSERT3U(zv->zv_open_count, >, 0);
sectors = get_capacity(zv->zv_zso->zvo_disk);
@@ -1417,53 +1421,70 @@ out_kmem:
return (ret);
}
-/*
- * Cleanup then free a zvol_state_t which was created by zvol_alloc().
- * At this time, the structure is not opened by anyone, is taken off
- * the zvol_state_list, and has its private data set to NULL.
- * The zvol_state_lock is dropped.
- *
- * This function may take many milliseconds to complete (e.g. we've seen
- * it take over 256ms), due to the calls to "blk_cleanup_queue" and
- * "del_gendisk". Thus, consumers need to be careful to account for this
- * latency when calling this function.
- */
void
-zvol_os_free(zvol_state_t *zv)
+zvol_os_remove_minor(zvol_state_t *zv)
{
-
- ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
- ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
+ ASSERT(MUTEX_HELD(&zv->zv_state_lock));
ASSERT0(zv->zv_open_count);
- ASSERT0P(zv->zv_zso->zvo_disk->private_data);
+ ASSERT0(atomic_read(&zv->zv_suspend_ref));
+ ASSERT(zv->zv_flags & ZVOL_REMOVING);
- rw_destroy(&zv->zv_suspend_lock);
- zfs_rangelock_fini(&zv->zv_rangelock);
+ struct zvol_state_os *zso = zv->zv_zso;
+ zv->zv_zso = NULL;
+
+ /* Clearing private_data will make new callers return immediately. */
+ atomic_store_ptr(&zso->zvo_disk->private_data, NULL);
+
+ /*
+ * Drop the state lock before calling del_gendisk(). There may be
+ * callers waiting to acquire it, but del_gendisk() will block until
+ * they exit, which would deadlock.
+ */
+ mutex_exit(&zv->zv_state_lock);
- del_gendisk(zv->zv_zso->zvo_disk);
+ del_gendisk(zso->zvo_disk);
#if defined(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS) && \
(defined(HAVE_BLK_ALLOC_DISK) || defined(HAVE_BLK_ALLOC_DISK_2ARG))
#if defined(HAVE_BLK_CLEANUP_DISK)
- blk_cleanup_disk(zv->zv_zso->zvo_disk);
+ blk_cleanup_disk(zso->zvo_disk);
#else
- put_disk(zv->zv_zso->zvo_disk);
+ put_disk(zso->zvo_disk);
#endif
#else
- blk_cleanup_queue(zv->zv_zso->zvo_queue);
- put_disk(zv->zv_zso->zvo_disk);
+ blk_cleanup_queue(zso->zvo_queue);
+ put_disk(zso->zvo_disk);
#endif
- if (zv->zv_zso->use_blk_mq)
- blk_mq_free_tag_set(&zv->zv_zso->tag_set);
+ if (zso->use_blk_mq)
+ blk_mq_free_tag_set(&zso->tag_set);
+
+ ida_simple_remove(&zvol_ida, MINOR(zso->zvo_dev) >> ZVOL_MINOR_BITS);
- ida_simple_remove(&zvol_ida,
- MINOR(zv->zv_zso->zvo_dev) >> ZVOL_MINOR_BITS);
+ kmem_free(zso, sizeof (struct zvol_state_os));
+
+ mutex_enter(&zv->zv_state_lock);
+}
+
+void
+zvol_os_free(zvol_state_t *zv)
+{
+
+ ASSERT(!RW_LOCK_HELD(&zv->zv_suspend_lock));
+ ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
+ ASSERT0(zv->zv_open_count);
+ ASSERT0P(zv->zv_zso);
+
+ ASSERT0P(zv->zv_objset);
+ ASSERT0P(zv->zv_zilog);
+ ASSERT0P(zv->zv_dn);
+
+ rw_destroy(&zv->zv_suspend_lock);
+ zfs_rangelock_fini(&zv->zv_rangelock);
cv_destroy(&zv->zv_removing_cv);
mutex_destroy(&zv->zv_state_lock);
dataset_kstats_destroy(&zv->zv_kstat);
- kmem_free(zv->zv_zso, sizeof (struct zvol_state_os));
kmem_free(zv, sizeof (zvol_state_t));
}
diff --git a/sys/contrib/openzfs/module/zcommon/simd_stat.c b/sys/contrib/openzfs/module/zcommon/simd_stat.c
index 11e2080ff9f2..007ae9e4fbbc 100644
--- a/sys/contrib/openzfs/module/zcommon/simd_stat.c
+++ b/sys/contrib/openzfs/module/zcommon/simd_stat.c
@@ -118,6 +118,10 @@ simd_stat_kstat_data(char *buf, size_t size, void *data)
"pclmulqdq", zfs_pclmulqdq_available());
off += SIMD_STAT_PRINT(simd_stat_kstat_payload,
"movbe", zfs_movbe_available());
+ off += SIMD_STAT_PRINT(simd_stat_kstat_payload,
+ "vaes", zfs_vaes_available());
+ off += SIMD_STAT_PRINT(simd_stat_kstat_payload,
+ "vpclmulqdq", zfs_vpclmulqdq_available());
off += SIMD_STAT_PRINT(simd_stat_kstat_payload,
"osxsave", boot_cpu_has(X86_FEATURE_OSXSAVE));
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c b/sys/contrib/openzfs/module/zfs/dbuf.c
index 3d0f88b36336..7403f10d91b7 100644
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -2557,12 +2557,13 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
/*
* Due to our use of dn_nlevels below, this can only be called
- * in open context, unless we are operating on the MOS.
- * From syncing context, dn_nlevels may be different from the
- * dn_nlevels used when dbuf was dirtied.
+ * in open context, unless we are operating on the MOS or it's
+ * a special object. From syncing context, dn_nlevels may be
+ * different from the dn_nlevels used when dbuf was dirtied.
*/
ASSERT(db->db_objset ==
dmu_objset_pool(db->db_objset)->dp_meta_objset ||
+ DMU_OBJECT_IS_SPECIAL(db->db.db_object) ||
txg != spa_syncing_txg(dmu_objset_spa(db->db_objset)));
ASSERT(db->db_blkid != DMU_BONUS_BLKID);
ASSERT0(db->db_level);
diff --git a/sys/contrib/openzfs/module/zfs/multilist.c b/sys/contrib/openzfs/module/zfs/multilist.c
index 7b85d19e19ee..46fb79269310 100644
--- a/sys/contrib/openzfs/module/zfs/multilist.c
+++ b/sys/contrib/openzfs/module/zfs/multilist.c
@@ -81,7 +81,7 @@ multilist_create_impl(multilist_t *ml, size_t size, size_t offset,
ml->ml_num_sublists = num;
ml->ml_index_func = index_func;
- ml->ml_sublists = kmem_zalloc(sizeof (multilist_sublist_t) *
+ ml->ml_sublists = vmem_zalloc(sizeof (multilist_sublist_t) *
ml->ml_num_sublists, KM_SLEEP);
ASSERT3P(ml->ml_sublists, !=, NULL);
@@ -134,7 +134,7 @@ multilist_destroy(multilist_t *ml)
}
ASSERT3P(ml->ml_sublists, !=, NULL);
- kmem_free(ml->ml_sublists,
+ vmem_free(ml->ml_sublists,
sizeof (multilist_sublist_t) * ml->ml_num_sublists);
ml->ml_num_sublists = 0;
diff --git a/sys/contrib/openzfs/module/zfs/spa_config.c b/sys/contrib/openzfs/module/zfs/spa_config.c
index 7d4d06659146..cf28955b0c50 100644
--- a/sys/contrib/openzfs/module/zfs/spa_config.c
+++ b/sys/contrib/openzfs/module/zfs/spa_config.c
@@ -48,18 +48,17 @@
/*
* Pool configuration repository.
*
- * Pool configuration is stored as a packed nvlist on the filesystem. By
- * default, all pools are stored in /etc/zfs/zpool.cache and loaded on boot
- * (when the ZFS module is loaded). Pools can also have the 'cachefile'
- * property set that allows them to be stored in an alternate location until
- * the control of external software.
+ * Pool configuration is stored as a packed nvlist on the filesystem. When
+ * pools are imported they are added to the /etc/zfs/zpool.cache file and
+ * removed from it when exported. For each cache file, we have a single nvlist
+ * which holds all the configuration information. Pools can also have the
+ * 'cachefile' property set which allows this config to be stored in an
+ * alternate location under the control of external software.
*
- * For each cache file, we have a single nvlist which holds all the
- * configuration information. When the module loads, we read this information
- * from /etc/zfs/zpool.cache and populate the SPA namespace. This namespace is
- * maintained independently in spa.c. Whenever the namespace is modified, or
- * the configuration of a pool is changed, we call spa_write_cachefile(), which
- * walks through all the active pools and writes the configuration to disk.
+ * The kernel independantly maintains an AVL tree of imported pools. See the
+ * "SPA locking" comment in spa.c. Whenever a pool configuration is modified
+ * we call spa_write_cachefile() which walks through all the active pools and
+ * writes the updated configuration to to /etc/zfs/zpool.cache file.
*/
static uint64_t spa_config_generation = 1;
@@ -69,94 +68,6 @@ static uint64_t spa_config_generation = 1;
* userland pools when doing testing.
*/
char *spa_config_path = (char *)ZPOOL_CACHE;
-#ifdef _KERNEL
-static int zfs_autoimport_disable = B_TRUE;
-#endif
-
-/*
- * Called when the module is first loaded, this routine loads the configuration
- * file into the SPA namespace. It does not actually open or load the pools; it
- * only populates the namespace.
- */
-void
-spa_config_load(void)
-{
- void *buf = NULL;
- nvlist_t *nvlist, *child;
- nvpair_t *nvpair;
- char *pathname;
- zfs_file_t *fp;
- zfs_file_attr_t zfa;
- uint64_t fsize;
- int err;
-
-#ifdef _KERNEL
- if (zfs_autoimport_disable)
- return;
-#endif
-
- /*
- * Open the configuration file.
- */
- pathname = kmem_alloc(MAXPATHLEN, KM_SLEEP);
-
- (void) snprintf(pathname, MAXPATHLEN, "%s", spa_config_path);
-
- err = zfs_file_open(pathname, O_RDONLY, 0, &fp);
-
-#ifdef __FreeBSD__
- if (err)
- err = zfs_file_open(ZPOOL_CACHE_BOOT, O_RDONLY, 0, &fp);
-#endif
- kmem_free(pathname, MAXPATHLEN);
-
- if (err)
- return;
-
- if (zfs_file_getattr(fp, &zfa))
- goto out;
-
- fsize = zfa.zfa_size;
- buf = kmem_alloc(fsize, KM_SLEEP);
-
- /*
- * Read the nvlist from the file.
- */
- if (zfs_file_read(fp, buf, fsize, NULL) < 0)
- goto out;
-
- /*
- * Unpack the nvlist.
- */
- if (nvlist_unpack(buf, fsize, &nvlist, KM_SLEEP) != 0)
- goto out;
-
- /*
- * Iterate over all elements in the nvlist, creating a new spa_t for
- * each one with the specified configuration.
- */
- mutex_enter(&spa_namespace_lock);
- nvpair = NULL;
- while ((nvpair = nvlist_next_nvpair(nvlist, nvpair)) != NULL) {
- if (nvpair_type(nvpair) != DATA_TYPE_NVLIST)
- continue;
-
- child = fnvpair_value_nvlist(nvpair);
-
- if (spa_lookup(nvpair_name(nvpair)) != NULL)
- continue;
- (void) spa_add(nvpair_name(nvpair), child, NULL);
- }
- mutex_exit(&spa_namespace_lock);
-
- nvlist_free(nvlist);
-
-out:
- if (buf != NULL)
- kmem_free(buf, fsize);
-
- zfs_file_close(fp);
-}
static int
spa_config_remove(spa_config_dirent_t *dp)
@@ -623,7 +534,6 @@ spa_config_update(spa_t *spa, int what)
spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
}
-EXPORT_SYMBOL(spa_config_load);
EXPORT_SYMBOL(spa_all_configs);
EXPORT_SYMBOL(spa_config_set);
EXPORT_SYMBOL(spa_config_generate);
@@ -634,8 +544,3 @@ EXPORT_SYMBOL(spa_config_update);
ZFS_MODULE_PARAM(zfs_spa, spa_, config_path, STRING, ZMOD_RD,
"SPA config file (/etc/zfs/zpool.cache)");
#endif
-
-#ifdef _KERNEL
-ZFS_MODULE_PARAM(zfs, zfs_, autoimport_disable, INT, ZMOD_RW,
- "Disable pool import at module load");
-#endif
diff --git a/sys/contrib/openzfs/module/zfs/spa_misc.c b/sys/contrib/openzfs/module/zfs/spa_misc.c
index cce772eae598..dceafbc27556 100644
--- a/sys/contrib/openzfs/module/zfs/spa_misc.c
+++ b/sys/contrib/openzfs/module/zfs/spa_misc.c
@@ -2548,13 +2548,6 @@ spa_name_compare(const void *a1, const void *a2)
}
void
-spa_boot_init(void *unused)
-{
- (void) unused;
- spa_config_load();
-}
-
-void
spa_init(spa_mode_t mode)
{
mutex_init(&spa_namespace_lock, NULL, MUTEX_DEFAULT, NULL);
@@ -2607,7 +2600,6 @@ spa_init(spa_mode_t mode)
chksum_init();
zpool_prop_init();
zpool_feature_init();
- spa_config_load();
vdev_prop_init();
l2arc_start();
scan_init();
diff --git a/sys/contrib/openzfs/module/zfs/zil.c b/sys/contrib/openzfs/module/zfs/zil.c
index 31b59c55f17b..0307df55aa21 100644
--- a/sys/contrib/openzfs/module/zfs/zil.c
+++ b/sys/contrib/openzfs/module/zfs/zil.c
@@ -819,34 +819,37 @@ zil_lwb_vdev_compare(const void *x1, const void *x2)
* we choose them here and later make the block allocation match.
*/
static lwb_t *
-zil_alloc_lwb(zilog_t *zilog, int sz, blkptr_t *bp, boolean_t slog,
- uint64_t txg, lwb_state_t state)
+zil_alloc_lwb(zilog_t *zilog, blkptr_t *bp, int min_sz, int sz,
+ boolean_t slog, uint64_t txg)
{
lwb_t *lwb;
lwb = kmem_cache_alloc(zil_lwb_cache, KM_SLEEP);
+ lwb->lwb_flags = 0;
lwb->lwb_zilog = zilog;
if (bp) {
lwb->lwb_blk = *bp;
- lwb->lwb_slim = (BP_GET_CHECKSUM(bp) == ZIO_CHECKSUM_ZILOG2);
+ if (BP_GET_CHECKSUM(bp) == ZIO_CHECKSUM_ZILOG2)
+ lwb->lwb_flags |= LWB_FLAG_SLIM;
sz = BP_GET_LSIZE(bp);
+ lwb->lwb_min_sz = sz;
} else {
BP_ZERO(&lwb->lwb_blk);
- lwb->lwb_slim = (spa_version(zilog->zl_spa) >=
- SPA_VERSION_SLIM_ZIL);
+ if (spa_version(zilog->zl_spa) >= SPA_VERSION_SLIM_ZIL)
+ lwb->lwb_flags |= LWB_FLAG_SLIM;
+ lwb->lwb_min_sz = min_sz;
}
- lwb->lwb_slog = slog;
+ if (slog)
+ lwb->lwb_flags |= LWB_FLAG_SLOG;
lwb->lwb_error = 0;
- if (lwb->lwb_slim) {
- lwb->lwb_nmax = sz;
- lwb->lwb_nused = lwb->lwb_nfilled = sizeof (zil_chain_t);
- } else {
- lwb->lwb_nmax = sz - sizeof (zil_chain_t);
- lwb->lwb_nused = lwb->lwb_nfilled = 0;
- }
+ /*
+ * Buffer allocation and capacity setup will be done in
+ * zil_lwb_write_open() when the LWB is opened for ITX assignment.
+ */
+ lwb->lwb_nmax = lwb->lwb_nused = lwb->lwb_nfilled = 0;
lwb->lwb_sz = sz;
- lwb->lwb_state = state;
- lwb->lwb_buf = zio_buf_alloc(sz);
+ lwb->lwb_buf = NULL;
+ lwb->lwb_state = LWB_STATE_NEW;
lwb->lwb_child_zio = NULL;
lwb->lwb_write_zio = NULL;
lwb->lwb_root_zio = NULL;
@@ -857,8 +860,6 @@ zil_alloc_lwb(zilog_t *zilog, int sz, blkptr_t *bp, boolean_t slog,
mutex_enter(&zilog->zl_lock);
list_insert_tail(&zilog->zl_lwb_list, lwb);
- if (state != LWB_STATE_NEW)
- zilog->zl_last_lwb_opened = lwb;
mutex_exit(&zilog->zl_lock);
return (lwb);
@@ -878,7 +879,7 @@ zil_free_lwb(zilog_t *zilog, lwb_t *lwb)
VERIFY(list_is_empty(&lwb->lwb_itxs));
VERIFY(list_is_empty(&lwb->lwb_waiters));
ASSERT(avl_is_empty(&lwb->lwb_vdev_tree));
- ASSERT(!MUTEX_HELD(&lwb->lwb_vdev_lock));
+ ASSERT(!MUTEX_HELD(&lwb->lwb_lock));
/*
* Clear the zilog's field to indicate this lwb is no longer
@@ -1019,7 +1020,7 @@ zil_create(zilog_t *zilog)
}
error = zio_alloc_zil(zilog->zl_spa, zilog->zl_os, txg, &blk,
- ZIL_MIN_BLKSZ, &slog);
+ ZIL_MIN_BLKSZ, ZIL_MIN_BLKSZ, &slog, B_TRUE);
if (error == 0)
zil_init_log_chain(zilog, &blk);
}
@@ -1028,7 +1029,7 @@ zil_create(zilog_t *zilog)
* Allocate a log write block (lwb) for the first log block.
*/
if (error == 0)
- lwb = zil_alloc_lwb(zilog, 0, &blk, slog, txg, LWB_STATE_NEW);
+ lwb = zil_alloc_lwb(zilog, &blk, 0, 0, slog, txg);
/*
* If we just allocated the first log block, commit our transaction
@@ -1324,10 +1325,12 @@ zil_check_log_chain(dsl_pool_t *dp, dsl_dataset_t *ds, void *tx)
* zil_commit() is racing with spa_sync().
*/
static void
-zil_commit_waiter_skip(zil_commit_waiter_t *zcw)
+zil_commit_waiter_done(zil_commit_waiter_t *zcw, int err)
{
mutex_enter(&zcw->zcw_lock);
ASSERT3B(zcw->zcw_done, ==, B_FALSE);
+ zcw->zcw_lwb = NULL;
+ zcw->zcw_error = err;
zcw->zcw_done = B_TRUE;
cv_broadcast(&zcw->zcw_cv);
mutex_exit(&zcw->zcw_lock);
@@ -1389,7 +1392,7 @@ zil_lwb_add_block(lwb_t *lwb, const blkptr_t *bp)
if (zil_nocacheflush)
return;
- mutex_enter(&lwb->lwb_vdev_lock);
+ mutex_enter(&lwb->lwb_lock);
for (i = 0; i < ndvas; i++) {
zvsearch.zv_vdev = DVA_GET_VDEV(&bp->blk_dva[i]);
if (avl_find(t, &zvsearch, &where) == NULL) {
@@ -1398,7 +1401,7 @@ zil_lwb_add_block(lwb_t *lwb, const blkptr_t *bp)
avl_insert(t, zv, where);
}
}
- mutex_exit(&lwb->lwb_vdev_lock);
+ mutex_exit(&lwb->lwb_lock);
}
static void
@@ -1415,12 +1418,12 @@ zil_lwb_flush_defer(lwb_t *lwb, lwb_t *nlwb)
/*
* While 'lwb' is at a point in its lifetime where lwb_vdev_tree does
- * not need the protection of lwb_vdev_lock (it will only be modified
+ * not need the protection of lwb_lock (it will only be modified
* while holding zilog->zl_lock) as its writes and those of its
* children have all completed. The younger 'nlwb' may be waiting on
* future writes to additional vdevs.
*/
- mutex_enter(&nlwb->lwb_vdev_lock);
+ mutex_enter(&nlwb->lwb_lock);
/*
* Tear down the 'lwb' vdev tree, ensuring that entries which do not
* exist in 'nlwb' are moved to it, freeing any would-be duplicates.
@@ -1434,7 +1437,7 @@ zil_lwb_flush_defer(lwb_t *lwb, lwb_t *nlwb)
kmem_free(zv, sizeof (*zv));
}
}
- mutex_exit(&nlwb->lwb_vdev_lock);
+ mutex_exit(&nlwb->lwb_lock);
}
void
@@ -1491,10 +1494,6 @@ zil_lwb_flush_vdevs_done(zio_t *zio)
zil_itx_destroy(itx, 0);
while ((zcw = list_remove_head(&lwb->lwb_waiters)) != NULL) {
- mutex_enter(&zcw->zcw_lock);
-
- ASSERT3P(zcw->zcw_lwb, ==, lwb);
- zcw->zcw_lwb = NULL;
/*
* We expect any ZIO errors from child ZIOs to have been
* propagated "up" to this specific LWB's root ZIO, in
@@ -1509,14 +1508,7 @@ zil_lwb_flush_vdevs_done(zio_t *zio)
* errors not being handled correctly here. See the
* comment above the call to "zio_flush" for details.
*/
-
- zcw->zcw_zio_error = zio->io_error;
-
- ASSERT3B(zcw->zcw_done, ==, B_FALSE);
- zcw->zcw_done = B_TRUE;
- cv_broadcast(&zcw->zcw_cv);
-
- mutex_exit(&zcw->zcw_lock);
+ zil_commit_waiter_done(zcw, zio->io_error);
}
uint64_t txg = lwb->lwb_issued_txg;
@@ -1588,7 +1580,7 @@ zil_lwb_write_done(zio_t *zio)
avl_tree_t *t = &lwb->lwb_vdev_tree;
void *cookie = NULL;
zil_vdev_node_t *zv;
- lwb_t *nlwb;
+ lwb_t *nlwb = NULL;
ASSERT3S(spa_config_held(spa, SCL_STATE, RW_READER), !=, 0);
@@ -1608,9 +1600,11 @@ zil_lwb_write_done(zio_t *zio)
* its write ZIO a parent this ZIO. In such case we can not defer
* our flushes or below may be a race between the done callbacks.
*/
- nlwb = list_next(&zilog->zl_lwb_list, lwb);
- if (nlwb && nlwb->lwb_state != LWB_STATE_ISSUED)
- nlwb = NULL;
+ if (!(lwb->lwb_flags & LWB_FLAG_CRASHED)) {
+ nlwb = list_next(&zilog->zl_lwb_list, lwb);
+ if (nlwb && nlwb->lwb_state != LWB_STATE_ISSUED)
+ nlwb = NULL;
+ }
mutex_exit(&zilog->zl_lock);
if (avl_numnodes(t) == 0)
@@ -1624,12 +1618,17 @@ zil_lwb_write_done(zio_t *zio)
* written out.
*
* Additionally, we don't perform any further error handling at
- * this point (e.g. setting "zcw_zio_error" appropriately), as
- * we expect that to occur in "zil_lwb_flush_vdevs_done" (thus,
- * we expect any error seen here, to have been propagated to
- * that function).
+ * this point (e.g. setting "zcw_error" appropriately), as we
+ * expect that to occur in "zil_lwb_flush_vdevs_done" (thus, we
+ * expect any error seen here, to have been propagated to that
+ * function).
+ *
+ * Note that we treat a "crashed" LWB as though it was in error,
+ * even if it did appear to succeed, because we've already
+ * signaled error and cleaned up waiters and committers in
+ * zil_crash(); we just want to clean up and get out of here.
*/
- if (zio->io_error != 0) {
+ if (zio->io_error != 0 || (lwb->lwb_flags & LWB_FLAG_CRASHED)) {
while ((zv = avl_destroy_nodes(t, &cookie)) != NULL)
kmem_free(zv, sizeof (*zv));
return;
@@ -1742,10 +1741,26 @@ zil_lwb_write_open(zilog_t *zilog, lwb_t *lwb)
return;
}
+ mutex_enter(&lwb->lwb_lock);
mutex_enter(&zilog->zl_lock);
lwb->lwb_state = LWB_STATE_OPENED;
zilog->zl_last_lwb_opened = lwb;
mutex_exit(&zilog->zl_lock);
+ mutex_exit(&lwb->lwb_lock);
+
+ /*
+ * Allocate buffer and set up LWB capacities.
+ */
+ ASSERT0P(lwb->lwb_buf);
+ ASSERT3U(lwb->lwb_sz, >, 0);
+ lwb->lwb_buf = zio_buf_alloc(lwb->lwb_sz);
+ if (lwb->lwb_flags & LWB_FLAG_SLIM) {
+ lwb->lwb_nmax = lwb->lwb_sz;
+ lwb->lwb_nused = lwb->lwb_nfilled = sizeof (zil_chain_t);
+ } else {
+ lwb->lwb_nmax = lwb->lwb_sz - sizeof (zil_chain_t);
+ lwb->lwb_nused = lwb->lwb_nfilled = 0;
+ }
}
/*
@@ -1762,6 +1777,8 @@ static uint_t
zil_lwb_plan(zilog_t *zilog, uint64_t size, uint_t *minsize)
{
uint_t md = zilog->zl_max_block_size - sizeof (zil_chain_t);
+ uint_t waste = zil_max_waste_space(zilog);
+ waste = MAX(waste, zilog->zl_cur_max);
if (size <= md) {
/*
@@ -1772,9 +1789,10 @@ zil_lwb_plan(zilog_t *zilog, uint64_t size, uint_t *minsize)
} else if (size > 8 * md) {
/*
* Big bursts use maximum blocks. The first block size
- * is hard to predict, but it does not really matter.
+ * is hard to predict, but we need at least enough space
+ * to make reasonable progress.
*/
- *minsize = 0;
+ *minsize = waste;
return (md);
}
@@ -1787,57 +1805,52 @@ zil_lwb_plan(zilog_t *zilog, uint64_t size, uint_t *minsize)
uint_t s = size;
uint_t n = DIV_ROUND_UP(s, md - sizeof (lr_write_t));
uint_t chunk = DIV_ROUND_UP(s, n);
- uint_t waste = zil_max_waste_space(zilog);
- waste = MAX(waste, zilog->zl_cur_max);
if (chunk <= md - waste) {
*minsize = MAX(s - (md - waste) * (n - 1), waste);
return (chunk);
} else {
- *minsize = 0;
+ *minsize = waste;
return (md);
}
}
/*
* Try to predict next block size based on previous history. Make prediction
- * sufficient for 7 of 8 previous bursts. Don't try to save if the saving is
- * less then 50%, extra writes may cost more, but we don't want single spike
- * to badly affect our predictions.
+ * sufficient for 7 of 8 previous bursts, but don't try to save if the saving
+ * is less then 50%. Extra writes may cost more, but we don't want single
+ * spike to badly affect our predictions.
*/
-static uint_t
-zil_lwb_predict(zilog_t *zilog)
+static void
+zil_lwb_predict(zilog_t *zilog, uint64_t *min_predict, uint64_t *max_predict)
{
- uint_t m, o;
+ uint_t m1 = 0, m2 = 0, o;
- /* If we are in the middle of a burst, take it into account also. */
- if (zilog->zl_cur_size > 0) {
- o = zil_lwb_plan(zilog, zilog->zl_cur_size, &m);
- } else {
+ /* If we are in the middle of a burst, take it as another data point. */
+ if (zilog->zl_cur_size > 0)
+ o = zil_lwb_plan(zilog, zilog->zl_cur_size, &m1);
+ else
o = UINT_MAX;
- m = 0;
- }
- /* Find minimum optimal size. We don't need to go below that. */
- for (int i = 0; i < ZIL_BURSTS; i++)
- o = MIN(o, zilog->zl_prev_opt[i]);
-
- /* Find two biggest minimal first block sizes above the optimal. */
- uint_t m1 = MAX(m, o), m2 = o;
+ /* Find two largest minimal first block sizes. */
for (int i = 0; i < ZIL_BURSTS; i++) {
- m = zilog->zl_prev_min[i];
- if (m >= m1) {
+ uint_t cur = zilog->zl_prev_min[i];
+ if (cur >= m1) {
m2 = m1;
- m1 = m;
- } else if (m > m2) {
- m2 = m;
+ m1 = cur;
+ } else if (cur > m2) {
+ m2 = cur;
}
}
- /*
- * If second minimum size gives 50% saving -- use it. It may cost us
- * one additional write later, but the space saving is just too big.
- */
- return ((m1 < m2 * 2) ? m1 : m2);
+ /* Minimum should guarantee progress in most cases. */
+ *min_predict = (m1 < m2 * 2) ? m1 : m2;
+
+ /* Maximum doesn't need to go below the minimum optimal size. */
+ for (int i = 0; i < ZIL_BURSTS; i++)
+ o = MIN(o, zilog->zl_prev_opt[i]);
+ m1 = MAX(m1, o);
+ m2 = MAX(m2, o);
+ *max_predict = (m1 < m2 * 2) ? m1 : m2;
}
/*
@@ -1845,12 +1858,13 @@ zil_lwb_predict(zilog_t *zilog)
* Has to be called under zl_issuer_lock to chain more lwbs.
*/
static lwb_t *
-zil_lwb_write_close(zilog_t *zilog, lwb_t *lwb, lwb_state_t state)
+zil_lwb_write_close(zilog_t *zilog, lwb_t *lwb)
{
- uint64_t blksz, plan, plan2;
+ uint64_t minbs, maxbs;
ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock));
ASSERT3S(lwb->lwb_state, ==, LWB_STATE_OPENED);
+ membar_producer();
lwb->lwb_state = LWB_STATE_CLOSED;
/*
@@ -1875,27 +1889,34 @@ zil_lwb_write_close(zilog_t *zilog, lwb_t *lwb, lwb_state_t state)
* Try to predict what can it be and plan for the worst case.
*/
uint_t m;
- plan = zil_lwb_plan(zilog, zilog->zl_cur_left, &m);
+ maxbs = zil_lwb_plan(zilog, zilog->zl_cur_left, &m);
+ minbs = m;
if (zilog->zl_parallel) {
- plan2 = zil_lwb_plan(zilog, zilog->zl_cur_left +
- zil_lwb_predict(zilog), &m);
- if (plan < plan2)
- plan = plan2;
+ uint64_t minp, maxp;
+ zil_lwb_predict(zilog, &minp, &maxp);
+ maxp = zil_lwb_plan(zilog, zilog->zl_cur_left + maxp,
+ &m);
+ if (maxbs < maxp)
+ maxbs = maxp;
}
} else {
/*
* The previous burst is done and we can only predict what
* will come next.
*/
- plan = zil_lwb_predict(zilog);
+ zil_lwb_predict(zilog, &minbs, &maxbs);
}
- blksz = plan + sizeof (zil_chain_t);
- blksz = P2ROUNDUP_TYPED(blksz, ZIL_MIN_BLKSZ, uint64_t);
- blksz = MIN(blksz, zilog->zl_max_block_size);
- DTRACE_PROBE3(zil__block__size, zilog_t *, zilog, uint64_t, blksz,
- uint64_t, plan);
- return (zil_alloc_lwb(zilog, blksz, NULL, 0, 0, state));
+ minbs += sizeof (zil_chain_t);
+ maxbs += sizeof (zil_chain_t);
+ minbs = P2ROUNDUP_TYPED(minbs, ZIL_MIN_BLKSZ, uint64_t);
+ maxbs = P2ROUNDUP_TYPED(maxbs, ZIL_MIN_BLKSZ, uint64_t);
+ maxbs = MIN(maxbs, zilog->zl_max_block_size);
+ minbs = MIN(minbs, maxbs);
+ DTRACE_PROBE3(zil__block__size, zilog_t *, zilog, uint64_t, minbs,
+ uint64_t, maxbs);
+
+ return (zil_alloc_lwb(zilog, NULL, minbs, maxbs, 0, 0));
}
/*
@@ -1944,14 +1965,16 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb)
mutex_exit(&zilog->zl_lock);
next_lwb:
- if (lwb->lwb_slim)
+ if (lwb->lwb_flags & LWB_FLAG_SLIM)
zilc = (zil_chain_t *)lwb->lwb_buf;
else
zilc = (zil_chain_t *)(lwb->lwb_buf + lwb->lwb_nmax);
- int wsz = lwb->lwb_sz;
+ uint64_t alloc_size = BP_GET_LSIZE(&lwb->lwb_blk);
+ int wsz = alloc_size;
if (lwb->lwb_error == 0) {
abd_t *lwb_abd = abd_get_from_buf(lwb->lwb_buf, lwb->lwb_sz);
- if (!lwb->lwb_slog || zilog->zl_cur_size <= zil_slog_bulk)
+ if (!(lwb->lwb_flags & LWB_FLAG_SLOG) ||
+ zilog->zl_cur_size <= zil_slog_bulk)
prio = ZIO_PRIORITY_SYNC_WRITE;
else
prio = ZIO_PRIORITY_ASYNC_WRITE;
@@ -1959,16 +1982,17 @@ next_lwb:
ZB_ZIL_OBJECT, ZB_ZIL_LEVEL,
lwb->lwb_blk.blk_cksum.zc_word[ZIL_ZC_SEQ]);
lwb->lwb_write_zio = zio_rewrite(lwb->lwb_root_zio, spa, 0,
- &lwb->lwb_blk, lwb_abd, lwb->lwb_sz, zil_lwb_write_done,
+ &lwb->lwb_blk, lwb_abd, alloc_size, zil_lwb_write_done,
lwb, prio, ZIO_FLAG_CANFAIL, &zb);
zil_lwb_add_block(lwb, &lwb->lwb_blk);
- if (lwb->lwb_slim) {
+ if (lwb->lwb_flags & LWB_FLAG_SLIM) {
/* For Slim ZIL only write what is used. */
wsz = P2ROUNDUP_TYPED(lwb->lwb_nused, ZIL_MIN_BLKSZ,
int);
- ASSERT3S(wsz, <=, lwb->lwb_sz);
- zio_shrink(lwb->lwb_write_zio, wsz);
+ ASSERT3S(wsz, <=, alloc_size);
+ if (wsz < alloc_size)
+ zio_shrink(lwb->lwb_write_zio, wsz);
wsz = lwb->lwb_write_zio->io_size;
}
memset(lwb->lwb_buf + lwb->lwb_nused, 0, wsz - lwb->lwb_nused);
@@ -2004,13 +2028,53 @@ next_lwb:
BP_ZERO(bp);
error = lwb->lwb_error;
if (error == 0) {
- error = zio_alloc_zil(spa, zilog->zl_os, txg, bp, nlwb->lwb_sz,
- &slog);
+ /*
+ * Allocation flexibility depends on LWB state:
+ * if NEW: allow range allocation and larger sizes;
+ * if OPENED: use fixed predetermined allocation size;
+ * if CLOSED + Slim: allocate precisely for actual usage.
+ */
+ boolean_t flexible = (nlwb->lwb_state == LWB_STATE_NEW);
+ if (flexible) {
+ /* We need to prevent opening till we update lwb_sz. */
+ mutex_enter(&nlwb->lwb_lock);
+ flexible = (nlwb->lwb_state == LWB_STATE_NEW);
+ if (!flexible)
+ mutex_exit(&nlwb->lwb_lock); /* We lost. */
+ }
+ boolean_t closed_slim = (nlwb->lwb_state == LWB_STATE_CLOSED &&
+ (lwb->lwb_flags & LWB_FLAG_SLIM));
+
+ uint64_t min_size, max_size;
+ if (closed_slim) {
+ /* This transition is racy, but only one way. */
+ membar_consumer();
+ min_size = max_size = P2ROUNDUP_TYPED(nlwb->lwb_nused,
+ ZIL_MIN_BLKSZ, uint64_t);
+ } else if (flexible) {
+ min_size = nlwb->lwb_min_sz;
+ max_size = nlwb->lwb_sz;
+ } else {
+ min_size = max_size = nlwb->lwb_sz;
+ }
+
+ error = zio_alloc_zil(spa, zilog->zl_os, txg, bp,
+ min_size, max_size, &slog, flexible);
+ if (error == 0) {
+ if (closed_slim)
+ ASSERT3U(BP_GET_LSIZE(bp), ==, max_size);
+ else if (flexible)
+ nlwb->lwb_sz = BP_GET_LSIZE(bp);
+ else
+ ASSERT3U(BP_GET_LSIZE(bp), ==, nlwb->lwb_sz);
+ }
+ if (flexible)
+ mutex_exit(&nlwb->lwb_lock);
}
if (error == 0) {
ASSERT3U(BP_GET_BIRTH(bp), ==, txg);
- BP_SET_CHECKSUM(bp, nlwb->lwb_slim ? ZIO_CHECKSUM_ZILOG2 :
- ZIO_CHECKSUM_ZILOG);
+ BP_SET_CHECKSUM(bp, (nlwb->lwb_flags & LWB_FLAG_SLIM) ?
+ ZIO_CHECKSUM_ZILOG2 : ZIO_CHECKSUM_ZILOG);
bp->blk_cksum = lwb->lwb_blk.blk_cksum;
bp->blk_cksum.zc_word[ZIL_ZC_SEQ]++;
}
@@ -2039,14 +2103,15 @@ next_lwb:
if (nlwb) {
nlwb->lwb_blk = *bp;
nlwb->lwb_error = error;
- nlwb->lwb_slog = slog;
+ if (slog)
+ nlwb->lwb_flags |= LWB_FLAG_SLOG;
nlwb->lwb_alloc_txg = txg;
if (nlwb->lwb_state != LWB_STATE_READY)
nlwb = NULL;
}
mutex_exit(&zilog->zl_lock);
- if (lwb->lwb_slog) {
+ if (lwb->lwb_flags & LWB_FLAG_SLOG) {
ZIL_STAT_BUMP(zilog, zil_itx_metaslab_slog_count);
ZIL_STAT_INCR(zilog, zil_itx_metaslab_slog_bytes,
lwb->lwb_nused);
@@ -2220,7 +2285,6 @@ zil_lwb_assign(zilog_t *zilog, lwb_t *lwb, itx_t *itx, list_t *ilwbs)
ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock));
ASSERT3P(lwb, !=, NULL);
- ASSERT3P(lwb->lwb_buf, !=, NULL);
zil_lwb_write_open(zilog, lwb);
@@ -2262,9 +2326,10 @@ cont:
(dlen % max_log_data == 0 ||
lwb_sp < reclen + dlen % max_log_data))) {
list_insert_tail(ilwbs, lwb);
- lwb = zil_lwb_write_close(zilog, lwb, LWB_STATE_OPENED);
+ lwb = zil_lwb_write_close(zilog, lwb);
if (lwb == NULL)
return (NULL);
+ zil_lwb_write_open(zilog, lwb);
lwb_sp = lwb->lwb_nmax - lwb->lwb_nused;
}
@@ -2554,7 +2619,7 @@ zil_itxg_clean(void *arg)
* called) we will hit this case.
*/
if (itx->itx_lr.lrc_txtype == TX_COMMIT)
- zil_commit_waiter_skip(itx->itx_private);
+ zil_commit_waiter_done(itx->itx_private, 0);
zil_itx_destroy(itx, 0);
}
@@ -2742,6 +2807,7 @@ zil_crash_clean(zilog_t *zilog, uint64_t synced_txg)
}
/* This LWB is from the past, so we can clean it up now. */
+ ASSERT(lwb->lwb_flags & LWB_FLAG_CRASHED);
list_remove(&zilog->zl_lwb_crash_list, lwb);
if (lwb->lwb_buf != NULL)
zio_buf_free(lwb->lwb_buf, lwb->lwb_sz);
@@ -2981,7 +3047,7 @@ zil_prune_commit_list(zilog_t *zilog)
* never any itx's for it to wait on), so it's
* safe to skip this waiter and mark it done.
*/
- zil_commit_waiter_skip(itx->itx_private);
+ zil_commit_waiter_done(itx->itx_private, 0);
} else {
zil_commit_waiter_link_lwb(itx->itx_private, last_lwb);
}
@@ -3212,15 +3278,21 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
* "next" lwb on-disk. When this happens, we must stall
* the ZIL write pipeline; see the comment within
* zil_commit_writer_stall() for more details.
+ *
+ * ESHUTDOWN has to be handled carefully here. If we get it,
+ * then the pool suspended and zil_crash() was called, so we
+ * need to stop trying and just get an error back to the
+ * callers.
*/
int err = 0;
while ((lwb = list_remove_head(ilwbs)) != NULL) {
- err = zil_lwb_write_issue(zilog, lwb);
- if (err != 0)
- break;
+ if (err == 0)
+ err = zil_lwb_write_issue(zilog, lwb);
}
- if (err == 0)
+ if (err != ESHUTDOWN)
err = zil_commit_writer_stall(zilog);
+ if (err == ESHUTDOWN)
+ err = SET_ERROR(EIO);
/*
* Additionally, we have to signal and mark the "nolwb"
@@ -3230,7 +3302,7 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
*/
zil_commit_waiter_t *zcw;
while ((zcw = list_remove_head(&nolwb_waiters)) != NULL)
- zil_commit_waiter_skip(zcw);
+ zil_commit_waiter_done(zcw, err);
/*
* And finally, we have to destroy the itx's that
@@ -3238,7 +3310,7 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
* the itx's callback if one exists for the itx.
*/
while ((itx = list_remove_head(&nolwb_itxs)) != NULL)
- zil_itx_destroy(itx, 0);
+ zil_itx_destroy(itx, err);
} else {
ASSERT(list_is_empty(&nolwb_waiters));
ASSERT3P(lwb, !=, NULL);
@@ -3292,17 +3364,17 @@ zil_process_commit_list(zilog_t *zilog, zil_commit_waiter_t *zcw, list_t *ilwbs)
(!zilog->zl_parallel || zilog->zl_suspend > 0)) {
zil_burst_done(zilog);
list_insert_tail(ilwbs, lwb);
- lwb = zil_lwb_write_close(zilog, lwb, LWB_STATE_NEW);
+ lwb = zil_lwb_write_close(zilog, lwb);
if (lwb == NULL) {
int err = 0;
while ((lwb =
list_remove_head(ilwbs)) != NULL) {
- err = zil_lwb_write_issue(zilog, lwb);
- if (err != 0)
- break;
+ if (err == 0)
+ err = zil_lwb_write_issue(
+ zilog, lwb);
}
- if (err == 0)
- zil_commit_writer_stall(zilog);
+ if (err != ESHUTDOWN)
+ (void) zil_commit_writer_stall(zilog);
}
}
}
@@ -3470,7 +3542,7 @@ zil_commit_waiter_timeout(zilog_t *zilog, zil_commit_waiter_t *zcw)
* hasn't been issued.
*/
zil_burst_done(zilog);
- lwb_t *nlwb = zil_lwb_write_close(zilog, lwb, LWB_STATE_NEW);
+ lwb_t *nlwb = zil_lwb_write_close(zilog, lwb);
ASSERT3S(lwb->lwb_state, ==, LWB_STATE_CLOSED);
@@ -3546,7 +3618,7 @@ zil_commit_waiter(zilog_t *zilog, zil_commit_waiter_t *zcw)
* commit itxs. When this occurs, the commit waiters linked
* off of these commit itxs will not be committed to an
* lwb. Additionally, these commit waiters will not be
- * marked done until zil_commit_waiter_skip() is called via
+ * marked done until zil_commit_waiter_done() is called via
* zil_itxg_clean().
*
* Thus, it's possible for this commit waiter (i.e. the
@@ -3624,7 +3696,7 @@ zil_alloc_commit_waiter(void)
list_link_init(&zcw->zcw_node);
zcw->zcw_lwb = NULL;
zcw->zcw_done = B_FALSE;
- zcw->zcw_zio_error = 0;
+ zcw->zcw_error = 0;
return (zcw);
}
@@ -3728,6 +3800,9 @@ zil_crash(zilog_t *zilog)
*/
for (lwb_t *lwb = list_head(&zilog->zl_lwb_crash_list); lwb != NULL;
lwb = list_next(&zilog->zl_lwb_crash_list, lwb)) {
+ ASSERT(!(lwb->lwb_flags & LWB_FLAG_CRASHED));
+ lwb->lwb_flags |= LWB_FLAG_CRASHED;
+
itx_t *itx;
while ((itx = list_remove_head(&lwb->lwb_itxs)) != NULL)
zil_itx_destroy(itx, EIO);
@@ -3736,7 +3811,7 @@ zil_crash(zilog_t *zilog)
while ((zcw = list_remove_head(&lwb->lwb_waiters)) != NULL) {
mutex_enter(&zcw->zcw_lock);
zcw->zcw_lwb = NULL;
- zcw->zcw_zio_error = EIO;
+ zcw->zcw_error = EIO;
zcw->zcw_done = B_TRUE;
cv_broadcast(&zcw->zcw_cv);
mutex_exit(&zcw->zcw_lock);
@@ -4014,7 +4089,7 @@ zil_commit_impl(zilog_t *zilog, uint64_t foid)
zil_commit_waiter(zilog, zcw);
int err = 0;
- if (zcw->zcw_zio_error != 0) {
+ if (zcw->zcw_error != 0) {
/*
* If there was an error writing out the ZIL blocks that
* this thread is waiting on, then we fallback to
@@ -4149,7 +4224,7 @@ zil_lwb_cons(void *vbuf, void *unused, int kmflag)
offsetof(zil_commit_waiter_t, zcw_node));
avl_create(&lwb->lwb_vdev_tree, zil_lwb_vdev_compare,
sizeof (zil_vdev_node_t), offsetof(zil_vdev_node_t, zv_node));
- mutex_init(&lwb->lwb_vdev_lock, NULL, MUTEX_DEFAULT, NULL);
+ mutex_init(&lwb->lwb_lock, NULL, MUTEX_DEFAULT, NULL);
return (0);
}
@@ -4158,7 +4233,7 @@ zil_lwb_dest(void *vbuf, void *unused)
{
(void) unused;
lwb_t *lwb = vbuf;
- mutex_destroy(&lwb->lwb_vdev_lock);
+ mutex_destroy(&lwb->lwb_lock);
avl_destroy(&lwb->lwb_vdev_tree);
list_destroy(&lwb->lwb_waiters);
list_destroy(&lwb->lwb_itxs);
@@ -4381,7 +4456,7 @@ zil_close(zilog_t *zilog)
if (lwb != NULL) {
ASSERT(list_is_empty(&zilog->zl_lwb_list));
ASSERT3S(lwb->lwb_state, ==, LWB_STATE_NEW);
- zio_buf_free(lwb->lwb_buf, lwb->lwb_sz);
+ ASSERT0P(lwb->lwb_buf);
zil_free_lwb(zilog, lwb);
}
mutex_exit(&zilog->zl_lock);
@@ -4472,16 +4547,16 @@ zil_suspend(const char *osname, void **cookiep)
cv_wait(&zilog->zl_cv_suspend, &zilog->zl_lock);
mutex_exit(&zilog->zl_lock);
- if (cookiep == NULL)
+ if (zilog->zl_restart_txg > 0) {
+ /* ZIL crashed while we were waiting. */
+ zil_resume(os);
+ error = SET_ERROR(EBUSY);
+ } else if (cookiep == NULL)
zil_resume(os);
else
*cookiep = os;
- if (zilog->zl_restart_txg > 0)
- /* ZIL crashed while we were waiting. */
- return (SET_ERROR(EBUSY));
-
- return (0);
+ return (error);
}
/*
diff --git a/sys/contrib/openzfs/module/zfs/zio.c b/sys/contrib/openzfs/module/zfs/zio.c
index 3f0ddb63249d..4cf8912d4269 100644
--- a/sys/contrib/openzfs/module/zfs/zio.c
+++ b/sys/contrib/openzfs/module/zfs/zio.c
@@ -4434,12 +4434,15 @@ zio_dva_unallocate(zio_t *zio, zio_gang_node_t *gn, blkptr_t *bp)
*/
int
zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
- uint64_t size, boolean_t *slog)
+ uint64_t min_size, uint64_t max_size, boolean_t *slog,
+ boolean_t allow_larger)
{
int error;
zio_alloc_list_t io_alloc_list;
+ uint64_t alloc_size = 0;
ASSERT(txg > spa_syncing_txg(spa));
+ ASSERT3U(min_size, <=, max_size);
metaslab_trace_init(&io_alloc_list);
@@ -4448,7 +4451,7 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
* Fill in the obvious ones before calling into metaslab_alloc().
*/
BP_SET_TYPE(new_bp, DMU_OT_INTENT_LOG);
- BP_SET_PSIZE(new_bp, size);
+ BP_SET_PSIZE(new_bp, max_size);
BP_SET_LEVEL(new_bp, 0);
/*
@@ -4463,43 +4466,51 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
ZIOSTAT_BUMP(ziostat_total_allocations);
/* Try log class (dedicated slog devices) first */
- error = metaslab_alloc(spa, spa_log_class(spa), size, new_bp, 1,
- txg, NULL, flags, &io_alloc_list, allocator, NULL);
+ error = metaslab_alloc_range(spa, spa_log_class(spa), min_size,
+ max_size, new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
+ NULL, &alloc_size);
*slog = (error == 0);
/* Try special_embedded_log class (reserved on special vdevs) */
if (error != 0) {
- error = metaslab_alloc(spa, spa_special_embedded_log_class(spa),
- size, new_bp, 1, txg, NULL, flags, &io_alloc_list,
- allocator, NULL);
+ error = metaslab_alloc_range(spa,
+ spa_special_embedded_log_class(spa), min_size, max_size,
+ new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
+ NULL, &alloc_size);
}
/* Try special class (general special vdev allocation) */
if (error != 0) {
- error = metaslab_alloc(spa, spa_special_class(spa), size,
- new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
- NULL);
+ error = metaslab_alloc_range(spa, spa_special_class(spa),
+ min_size, max_size, new_bp, 1, txg, NULL, flags,
+ &io_alloc_list, allocator, NULL, &alloc_size);
}
/* Try embedded_log class (reserved on normal vdevs) */
if (error != 0) {
- error = metaslab_alloc(spa, spa_embedded_log_class(spa), size,
- new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
- NULL);
+ error = metaslab_alloc_range(spa, spa_embedded_log_class(spa),
+ min_size, max_size, new_bp, 1, txg, NULL, flags,
+ &io_alloc_list, allocator, NULL, &alloc_size);
}
/* Finally fall back to normal class */
if (error != 0) {
ZIOSTAT_BUMP(ziostat_alloc_class_fallbacks);
- error = metaslab_alloc(spa, spa_normal_class(spa), size,
- new_bp, 1, txg, NULL, flags, &io_alloc_list, allocator,
- NULL);
+ error = metaslab_alloc_range(spa, spa_normal_class(spa),
+ min_size, max_size, new_bp, 1, txg, NULL, flags,
+ &io_alloc_list, allocator, NULL, &alloc_size);
}
metaslab_trace_fini(&io_alloc_list);
if (error == 0) {
- BP_SET_LSIZE(new_bp, size);
- BP_SET_PSIZE(new_bp, size);
+ if (!allow_larger)
+ alloc_size = MIN(alloc_size, max_size);
+ else if (max_size <= SPA_OLD_MAXBLOCKSIZE)
+ alloc_size = MIN(alloc_size, SPA_OLD_MAXBLOCKSIZE);
+ alloc_size = P2ALIGN_TYPED(alloc_size, ZIL_MIN_BLKSZ, uint64_t);
+
+ BP_SET_LSIZE(new_bp, alloc_size);
+ BP_SET_PSIZE(new_bp, alloc_size);
BP_SET_COMPRESS(new_bp, ZIO_COMPRESS_OFF);
BP_SET_CHECKSUM(new_bp,
spa_version(spa) >= SPA_VERSION_SLIM_ZIL
@@ -4527,8 +4538,8 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
}
} else {
zfs_dbgmsg("%s: zil block allocation failure: "
- "size %llu, error %d", spa_name(spa), (u_longlong_t)size,
- error);
+ "min_size %llu, max_size %llu, error %d", spa_name(spa),
+ (u_longlong_t)min_size, (u_longlong_t)max_size, error);
}
return (error);
diff --git a/sys/contrib/openzfs/module/zfs/zvol.c b/sys/contrib/openzfs/module/zfs/zvol.c
index 29f51e230a37..2fd3e1c37045 100644
--- a/sys/contrib/openzfs/module/zfs/zvol.c
+++ b/sys/contrib/openzfs/module/zfs/zvol.c
@@ -38,25 +38,36 @@
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2016 Actifio, Inc. All rights reserved.
* Copyright (c) 2012, 2019 by Delphix. All rights reserved.
- * Copyright (c) 2024, Klara, Inc.
+ * Copyright (c) 2024, 2025, Klara, Inc.
*/
/*
* Note on locking of zvol state structures.
*
- * These structures are used to maintain internal state used to emulate block
- * devices on top of zvols. In particular, management of device minor number
- * operations - create, remove, rename, and set_snapdev - involves access to
- * these structures. The zvol_state_lock is primarily used to protect the
- * zvol_state_list. The zv->zv_state_lock is used to protect the contents
- * of the zvol_state_t structures, as well as to make sure that when the
- * time comes to remove the structure from the list, it is not in use, and
- * therefore, it can be taken off zvol_state_list and freed.
+ * zvol_state_t represents the connection between a single dataset
+ * (DMU_OST_ZVOL) and the device "minor" (some OS-specific representation of a
+ * "disk" or "device" or "volume", eg, a /dev/zdXX node, a GEOM object, etc).
*
- * The zv_suspend_lock was introduced to allow for suspending I/O to a zvol,
- * e.g. for the duration of receive and rollback operations. This lock can be
- * held for significant periods of time. Given that it is undesirable to hold
- * mutexes for long periods of time, the following lock ordering applies:
+ * The global zvol_state_lock is used to protect access to zvol_state_list and
+ * zvol_htable, which are the primary way to obtain a zvol_state_t from a name.
+ * It should not be used for anything not name-relateds, and you should avoid
+ * sleeping or waiting while its held. See zvol_find_by_name(), zvol_insert(),
+ * zvol_remove().
+ *
+ * The zv_state_lock is used to protect the contents of the associated
+ * zvol_state_t. Most of the zvol_state_t is dedicated to control and
+ * configuration; almost none of it is needed for data operations (that is,
+ * read, write, flush) so this lock is rarely taken during general IO. It
+ * should be released quickly; you should avoid sleeping or waiting while its
+ * held.
+ *
+ * zv_suspend_lock is used to suspend IO/data operations to a zvol. The read
+ * half should held for the duration of an IO operation. The write half should
+ * be taken when something to wait for IO to complete and the block further IO,
+ * eg for the duration of receive and rollback operations. This lock can be
+ * held for long periods of time.
+ *
+ * Thus, the following lock ordering appies.
* - take zvol_state_lock if necessary, to protect zvol_state_list
* - take zv_suspend_lock if necessary, by the code path in question
* - take zv_state_lock to protect zvol_state_t
@@ -67,9 +78,8 @@
* these operations are serialized per pool. Consequently, we can be certain
* that for a given zvol, there is only one operation at a time in progress.
* That is why one can be sure that first, zvol_state_t for a given zvol is
- * allocated and placed on zvol_state_list, and then other minor operations
- * for this zvol are going to proceed in the order of issue.
- *
+ * allocated and placed on zvol_state_list, and then other minor operations for
+ * this zvol are going to proceed in the order of issue.
*/
#include <sys/dataset_kstats.h>
@@ -1570,184 +1580,156 @@ zvol_create_minors_impl(zvol_task_t *task)
}
/*
- * Remove minors for specified dataset including children and snapshots.
- */
-
-/*
- * Remove the minor for a given zvol. This will do it all:
- * - flag the zvol for removal, so new requests are rejected
- * - wait until outstanding requests are completed
- * - remove it from lists
- * - free it
- * It's also usable as a taskq task, and smells nice too.
+ * Remove minors for specified dataset and, optionally, its children and
+ * snapshots.
*/
static void
-zvol_remove_minor_task(void *arg)
-{
- zvol_state_t *zv = (zvol_state_t *)arg;
-
- ASSERT(!RW_LOCK_HELD(&zvol_state_lock));
- ASSERT(!MUTEX_HELD(&zv->zv_state_lock));
-
- mutex_enter(&zv->zv_state_lock);
- while (zv->zv_open_count > 0 || atomic_read(&zv->zv_suspend_ref)) {
- zv->zv_flags |= ZVOL_REMOVING;
- cv_wait(&zv->zv_removing_cv, &zv->zv_state_lock);
- }
- mutex_exit(&zv->zv_state_lock);
-
- rw_enter(&zvol_state_lock, RW_WRITER);
- mutex_enter(&zv->zv_state_lock);
-
- zvol_remove(zv);
- zvol_os_clear_private(zv);
-
- mutex_exit(&zv->zv_state_lock);
- rw_exit(&zvol_state_lock);
-
- zvol_os_free(zv);
-}
-
-static void
-zvol_free_task(void *arg)
-{
- zvol_os_free(arg);
-}
-
-static void
zvol_remove_minors_impl(zvol_task_t *task)
{
zvol_state_t *zv, *zv_next;
const char *name = task ? task->zt_name1 : NULL;
int namelen = ((name) ? strlen(name) : 0);
- taskqid_t t;
- list_t delay_list, free_list;
+ boolean_t children = task ? !!task->zt_value : B_TRUE;
if (zvol_inhibit_dev)
return;
- list_create(&delay_list, sizeof (zvol_state_t),
- offsetof(zvol_state_t, zv_next));
- list_create(&free_list, sizeof (zvol_state_t),
- offsetof(zvol_state_t, zv_next));
+ /*
+ * We collect up zvols that we want to remove on a separate list, so
+ * that we don't have to hold zvol_state_lock for the whole time.
+ *
+ * We can't remove them from the global lists until we're completely
+ * done with them, because that would make them appear to ZFS-side ops
+ * that they don't exist, and the name might be reused, which can't be
+ * good.
+ */
+ list_t remove_list;
+ list_create(&remove_list, sizeof (zvol_state_t),
+ offsetof(zvol_state_t, zv_remove_node));
- rw_enter(&zvol_state_lock, RW_WRITER);
+ rw_enter(&zvol_state_lock, RW_READER);
for (zv = list_head(&zvol_state_list); zv != NULL; zv = zv_next) {
zv_next = list_next(&zvol_state_list, zv);
mutex_enter(&zv->zv_state_lock);
+ if (zv->zv_flags & ZVOL_REMOVING) {
+ /* Another thread is handling shutdown, skip it. */
+ mutex_exit(&zv->zv_state_lock);
+ continue;
+ }
+
+ /*
+ * This zvol should be removed if:
+ * - no name was offered (ie removing all at shutdown); or
+ * - name matches exactly; or
+ * - we were asked to remove children, and
+ * - the start of the name matches, and
+ * - there is a '/' immediately after the matched name; or
+ * - there is a '@' immediately after the matched name
+ */
if (name == NULL || strcmp(zv->zv_name, name) == 0 ||
- (strncmp(zv->zv_name, name, namelen) == 0 &&
+ (children && strncmp(zv->zv_name, name, namelen) == 0 &&
(zv->zv_name[namelen] == '/' ||
zv->zv_name[namelen] == '@'))) {
- /*
- * By holding zv_state_lock here, we guarantee that no
- * one is currently using this zv
- */
/*
- * If in use, try to throw everyone off and try again
- * later.
+ * Matched, so mark it removal. We want to take the
+ * write half of the suspend lock to make sure that
+ * the zvol is not suspended, and give any data ops
+ * chance to finish.
*/
- if (zv->zv_open_count > 0 ||
- atomic_read(&zv->zv_suspend_ref)) {
- zv->zv_flags |= ZVOL_REMOVING;
- t = taskq_dispatch(
- zv->zv_objset->os_spa->spa_zvol_taskq,
- zvol_remove_minor_task, zv, TQ_SLEEP);
- if (t == TASKQID_INVALID) {
- /*
- * Couldn't create the task, so we'll
- * do it in place once the loop is
- * finished.
- */
- list_insert_head(&delay_list, zv);
- }
+ mutex_exit(&zv->zv_state_lock);
+ rw_enter(&zv->zv_suspend_lock, RW_WRITER);
+ mutex_enter(&zv->zv_state_lock);
+
+ if (zv->zv_flags & ZVOL_REMOVING) {
+ /* Another thread has taken it, let them. */
mutex_exit(&zv->zv_state_lock);
+ rw_exit(&zv->zv_suspend_lock);
continue;
}
- zvol_remove(zv);
-
/*
- * Cleared while holding zvol_state_lock as a writer
- * which will prevent zvol_open() from opening it.
+ * Mark it and unlock. New entries will see the flag
+ * and return ENXIO.
*/
- zvol_os_clear_private(zv);
-
- /* Drop zv_state_lock before zvol_free() */
+ zv->zv_flags |= ZVOL_REMOVING;
mutex_exit(&zv->zv_state_lock);
+ rw_exit(&zv->zv_suspend_lock);
- /* Try parallel zv_free, if failed do it in place */
- t = taskq_dispatch(system_taskq, zvol_free_task, zv,
- TQ_SLEEP);
- if (t == TASKQID_INVALID)
- list_insert_head(&free_list, zv);
- } else {
+ /* Put it on the list for the next stage. */
+ list_insert_head(&remove_list, zv);
+ } else
mutex_exit(&zv->zv_state_lock);
- }
}
- rw_exit(&zvol_state_lock);
- /* Wait for zvols that we couldn't create a remove task for */
- while ((zv = list_remove_head(&delay_list)) != NULL)
- zvol_remove_minor_task(zv);
-
- /* Free any that we couldn't free in parallel earlier */
- while ((zv = list_remove_head(&free_list)) != NULL)
- zvol_os_free(zv);
-}
-
-/* Remove minor for this specific volume only */
-static int
-zvol_remove_minor_impl(const char *name)
-{
- zvol_state_t *zv = NULL, *zv_next;
-
- if (zvol_inhibit_dev)
- return (0);
+ rw_exit(&zvol_state_lock);
- rw_enter(&zvol_state_lock, RW_WRITER);
+ /* Didn't match any, nothing to do! */
+ if (list_is_empty(&remove_list)) {
+ if (task)
+ task->zt_error = SET_ERROR(ENOENT);
+ return;
+ }
- for (zv = list_head(&zvol_state_list); zv != NULL; zv = zv_next) {
- zv_next = list_next(&zvol_state_list, zv);
+ /* Actually shut them all down. */
+ for (zv = list_head(&remove_list); zv != NULL; zv = zv_next) {
+ zv_next = list_next(&remove_list, zv);
mutex_enter(&zv->zv_state_lock);
- if (strcmp(zv->zv_name, name) == 0)
- /* Found, leave the the loop with zv_lock held */
- break;
- mutex_exit(&zv->zv_state_lock);
- }
-
- if (zv == NULL) {
- rw_exit(&zvol_state_lock);
- return (SET_ERROR(ENOENT));
- }
- ASSERT(MUTEX_HELD(&zv->zv_state_lock));
+ /*
+ * Still open or suspended, just wait. This can happen if, for
+ * example, we managed to acquire zv_state_lock in the moments
+ * where zvol_open() or zvol_release() are trading locks to
+ * call zvol_first_open() or zvol_last_close().
+ */
+ while (zv->zv_open_count > 0 ||
+ atomic_read(&zv->zv_suspend_ref))
+ cv_wait(&zv->zv_removing_cv, &zv->zv_state_lock);
- if (zv->zv_open_count > 0 || atomic_read(&zv->zv_suspend_ref)) {
/*
- * In use, so try to throw everyone off, then wait
- * until finished.
+ * No users, shut down the OS side. This may not remove the
+ * minor from view immediately, depending on the kernel
+ * specifics, but it will ensure that it is unusable and that
+ * this zvol_state_t can never again be reached from an OS-side
+ * operation.
*/
- zv->zv_flags |= ZVOL_REMOVING;
+ zvol_os_remove_minor(zv);
mutex_exit(&zv->zv_state_lock);
+
+ /* Remove it from the name lookup lists */
+ rw_enter(&zvol_state_lock, RW_WRITER);
+ zvol_remove(zv);
rw_exit(&zvol_state_lock);
- zvol_remove_minor_task(zv);
- return (0);
}
- zvol_remove(zv);
- zvol_os_clear_private(zv);
+ /*
+ * Our own references on remove_list is the last one, free them and
+ * we're done.
+ */
+ while ((zv = list_remove_head(&remove_list)) != NULL)
+ zvol_os_free(zv);
- mutex_exit(&zv->zv_state_lock);
- rw_exit(&zvol_state_lock);
+ list_destroy(&remove_list);
+}
- zvol_os_free(zv);
+/* Remove minor for this specific volume only */
+static int
+zvol_remove_minor_impl(const char *name)
+{
+ if (zvol_inhibit_dev)
+ return (0);
- return (0);
+ zvol_task_t task;
+ memset(&task, 0, sizeof (zvol_task_t));
+ strlcpy(task.zt_name1, name, sizeof (task.zt_name1));
+ task.zt_value = B_FALSE;
+
+ zvol_remove_minors_impl(&task);
+
+ return (task.zt_error);
}
/*
@@ -2067,6 +2049,7 @@ zvol_remove_minors(spa_t *spa, const char *name, boolean_t async)
task = kmem_zalloc(sizeof (zvol_task_t), KM_SLEEP);
task->zt_op = ZVOL_ASYNC_REMOVE_MINORS;
strlcpy(task->zt_name1, name, sizeof (task->zt_name1));
+ task->zt_value = B_TRUE;
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
if ((async == B_FALSE) && (id != TASKQID_INVALID))
taskq_wait_id(spa->spa_zvol_taskq, id);
@@ -2188,14 +2171,6 @@ zvol_fini_impl(void)
zvol_remove_minors_impl(NULL);
- /*
- * The call to "zvol_remove_minors_impl" may dispatch entries to
- * the system_taskq, but it doesn't wait for those entries to
- * complete before it returns. Thus, we must wait for all of the
- * removals to finish, before we can continue.
- */
- taskq_wait_outstanding(system_taskq, 0);
-
kmem_free(zvol_htable, ZVOL_HT_SIZE * sizeof (struct hlist_head));
list_destroy(&zvol_state_list);
rw_destroy(&zvol_state_lock);
diff --git a/sys/contrib/openzfs/module/zstd/zfs_zstd.c b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
index 391216d6e263..3db196953f74 100644
--- a/sys/contrib/openzfs/module/zstd/zfs_zstd.c
+++ b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
@@ -876,9 +876,9 @@ static void __init
zstd_mempool_init(void)
{
zstd_mempool_cctx =
- kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
+ vmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
zstd_mempool_dctx =
- kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
+ vmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP);
for (int i = 0; i < ZSTD_POOL_MAX; i++) {
mutex_init(&zstd_mempool_cctx[i].barrier, NULL,
@@ -924,8 +924,8 @@ zstd_mempool_deinit(void)
release_pool(&zstd_mempool_dctx[i]);
}
- kmem_free(zstd_mempool_dctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool));
- kmem_free(zstd_mempool_cctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool));
+ vmem_free(zstd_mempool_dctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool));
+ vmem_free(zstd_mempool_cctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool));
zstd_mempool_dctx = NULL;
zstd_mempool_cctx = NULL;
}
diff --git a/sys/contrib/openzfs/scripts/spdxcheck.pl b/sys/contrib/openzfs/scripts/spdxcheck.pl
index 88f5a235d70c..cdab5368f19c 100755
--- a/sys/contrib/openzfs/scripts/spdxcheck.pl
+++ b/sys/contrib/openzfs/scripts/spdxcheck.pl
@@ -190,6 +190,7 @@ my @path_license_tags = (
['BSD-2-Clause OR GPL-2.0-only', 'CDDL-1.0'],
'module/icp' => ['Apache-2.0', 'CDDL-1.0'],
+ 'contrib/icp' => ['Apache-2.0', 'CDDL-1.0'],
# Python bindings are always Apache-2.0
'contrib/pyzfs' => ['Apache-2.0'],
diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run
index 131845f5ed40..2da46458289a 100644
--- a/sys/contrib/openzfs/tests/runfiles/common.run
+++ b/sys/contrib/openzfs/tests/runfiles/common.run
@@ -1093,7 +1093,7 @@ tests = ['zvol_misc_002_pos', 'zvol_misc_hierarchy', 'zvol_misc_rename_inuse',
tags = ['functional', 'zvol', 'zvol_misc']
[tests/functional/zvol/zvol_stress]
-tests = ['zvol_stress']
+tests = ['zvol_stress', 'zvol_stress_destroy']
tags = ['functional', 'zvol', 'zvol_stress']
[tests/functional/zvol/zvol_swap]
diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/crypto_test.c b/sys/contrib/openzfs/tests/zfs-tests/cmd/crypto_test.c
index e08003f80464..cbebd33e0bf6 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/crypto_test.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/crypto_test.c
@@ -529,6 +529,8 @@ static const char *aes_gcm_impl[][2] = {
{ "aesni", "pclmulqdq" },
{ "x86_64", "avx" },
{ "aesni", "avx" },
+ { "x86_64", "avx2" },
+ { "aesni", "avx2" },
};
/* signature of function to call after setting implementation params */
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
index b8b8bbe45a42..41e7b45ef4ec 100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/Makefile.am
@@ -2244,6 +2244,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
functional/zvol/zvol_stress/cleanup.ksh \
functional/zvol/zvol_stress/setup.ksh \
functional/zvol/zvol_stress/zvol_stress.ksh \
+ functional/zvol/zvol_stress/zvol_stress_destroy.ksh \
functional/zvol/zvol_swap/cleanup.ksh \
functional/zvol/zvol_swap/setup.ksh \
functional/zvol/zvol_swap/zvol_swap_001_pos.ksh \
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh
new file mode 100755
index 000000000000..669b59fac01f
--- /dev/null
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress_destroy.ksh
@@ -0,0 +1,66 @@
+#!/bin/ksh -p
+# SPDX-License-Identifier: CDDL-1.0
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or https://opensource.org/licenses/CDDL-1.0.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2025, Klara, Inc.
+#
+
+. $STF_SUITE/include/libtest.shlib
+
+verify_runnable "global"
+
+typeset -i nzvols=1000
+typeset -i parallel=$(( $(get_num_cpus) * 2 ))
+
+function cleanup {
+ for zvol in $(zfs list -Ho name -t vol) ; do
+ log_must_busy zfs destroy $zvol
+ done
+}
+
+log_onexit cleanup
+
+log_assert "stress test concurrent zvol create/destroy"
+
+function destroy_zvols_until {
+ typeset cond=$1
+ while true ; do
+ IFS='' zfs list -Ho name -t vol | read -r -d '' zvols
+ if [[ -n $zvols ]] ; then
+ echo $zvols | xargs -n 1 -P $parallel zfs destroy
+ fi
+ if ! $cond ; then
+ break
+ fi
+ done
+}
+
+( seq $nzvols | \
+ xargs -P $parallel -I % zfs create -s -V 1G $TESTPOOL/testvol% ) &
+cpid=$!
+sleep 1
+
+destroy_zvols_until "kill -0 $cpid"
+destroy_zvols_until "false"
+
+log_pass "stress test done"
diff --git a/sys/crypto/ccp/ccp.c b/sys/crypto/ccp/ccp.c
index 7db9a27ab059..c3d40f6e99ac 100644
--- a/sys/crypto/ccp/ccp.c
+++ b/sys/crypto/ccp/ccp.c
@@ -79,7 +79,7 @@ static struct pciid {
{ 0x15df1022, "AMD CCP-5a" },
};
-static struct random_source random_ccp = {
+static const struct random_source random_ccp = {
.rs_ident = "AMD CCP TRNG",
.rs_source = RANDOM_PURE_CCP,
.rs_read = random_ccp_read,
diff --git a/sys/dev/acpica/acpi_powerres.c b/sys/dev/acpica/acpi_powerres.c
index 29d1690f1bdd..0a8b67a5fa84 100644
--- a/sys/dev/acpica/acpi_powerres.c
+++ b/sys/dev/acpica/acpi_powerres.c
@@ -76,6 +76,13 @@ struct acpi_powerconsumer {
/* Device which is powered */
ACPI_HANDLE ac_consumer;
int ac_state;
+
+ struct {
+ bool prx_has;
+ size_t prx_count;
+ ACPI_HANDLE *prx_deps;
+ } ac_prx[ACPI_D_STATE_COUNT];
+
TAILQ_ENTRY(acpi_powerconsumer) ac_link;
TAILQ_HEAD(,acpi_powerreference) ac_references;
};
@@ -96,9 +103,7 @@ static TAILQ_HEAD(acpi_powerconsumer_list, acpi_powerconsumer)
ACPI_SERIAL_DECL(powerres, "ACPI power resources");
static ACPI_STATUS acpi_pwr_register_consumer(ACPI_HANDLE consumer);
-#ifdef notyet
static ACPI_STATUS acpi_pwr_deregister_consumer(ACPI_HANDLE consumer);
-#endif /* notyet */
static ACPI_STATUS acpi_pwr_register_resource(ACPI_HANDLE res);
#ifdef notyet
static ACPI_STATUS acpi_pwr_deregister_resource(ACPI_HANDLE res);
@@ -112,6 +117,8 @@ static struct acpi_powerresource
*acpi_pwr_find_resource(ACPI_HANDLE res);
static struct acpi_powerconsumer
*acpi_pwr_find_consumer(ACPI_HANDLE consumer);
+static ACPI_STATUS acpi_pwr_infer_state(struct acpi_powerconsumer *pc);
+static ACPI_STATUS acpi_pwr_get_state_locked(ACPI_HANDLE consumer, int *state);
/*
* Register a power resource.
@@ -222,6 +229,84 @@ acpi_pwr_deregister_resource(ACPI_HANDLE res)
#endif /* notyet */
/*
+ * Evaluate the _PRx (power resources each D-state depends on). This also
+ * populates the acpi_powerresources queue with the power resources discovered
+ * during this step.
+ *
+ * ACPI 7.3.8 - 7.3.11 guarantee that _PRx will return the same data each
+ * time they are evaluated.
+ *
+ * If this function fails, acpi_pwr_deregister_consumer() must be called on the
+ * power consumer to free already allocated memory.
+ */
+static ACPI_STATUS
+acpi_pwr_get_power_resources(ACPI_HANDLE consumer, struct acpi_powerconsumer *pc)
+{
+ ACPI_INTEGER status;
+ ACPI_STRING reslist_name;
+ ACPI_HANDLE reslist_handle;
+ ACPI_STRING reslist_names[] = {"_PR0", "_PR1", "_PR2", "_PR3"};
+ ACPI_BUFFER reslist;
+ ACPI_OBJECT *reslist_object;
+ ACPI_OBJECT *dep;
+ ACPI_HANDLE *res;
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+ ACPI_SERIAL_ASSERT(powerres);
+
+ MPASS(consumer != NULL);
+
+ for (int state = ACPI_STATE_D0; state <= ACPI_STATE_D3_HOT; state++) {
+ pc->ac_prx[state].prx_has = false;
+ pc->ac_prx[state].prx_count = 0;
+ pc->ac_prx[state].prx_deps = NULL;
+
+ reslist_name = reslist_names[state - ACPI_STATE_D0];
+ if (ACPI_FAILURE(AcpiGetHandle(consumer, reslist_name, &reslist_handle)))
+ continue;
+
+ reslist.Pointer = NULL;
+ reslist.Length = ACPI_ALLOCATE_BUFFER;
+ status = AcpiEvaluateObjectTyped(reslist_handle, NULL, NULL, &reslist,
+ ACPI_TYPE_PACKAGE);
+ if (ACPI_FAILURE(status) || reslist.Pointer == NULL)
+ /*
+ * ACPI_ALLOCATE_BUFFER entails everything will be freed on error
+ * by AcpiEvaluateObjectTyped.
+ */
+ continue;
+
+ reslist_object = (ACPI_OBJECT *)reslist.Pointer;
+ pc->ac_prx[state].prx_has = true;
+ pc->ac_prx[state].prx_count = reslist_object->Package.Count;
+
+ if (reslist_object->Package.Count == 0) {
+ AcpiOsFree(reslist_object);
+ continue;
+ }
+
+ pc->ac_prx[state].prx_deps = mallocarray(pc->ac_prx[state].prx_count,
+ sizeof(*pc->ac_prx[state].prx_deps), M_ACPIPWR, M_NOWAIT);
+ if (pc->ac_prx[state].prx_deps == NULL) {
+ AcpiOsFree(reslist_object);
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ for (size_t i = 0; i < reslist_object->Package.Count; i++) {
+ dep = &reslist_object->Package.Elements[i];
+ res = dep->Reference.Handle;
+ pc->ac_prx[state].prx_deps[i] = res;
+
+ /* It's fine to attempt to register the same resource twice. */
+ acpi_pwr_register_resource(res);
+ }
+ AcpiOsFree(reslist_object);
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/*
* Register a power consumer.
*
* It's OK to call this if we already know about the consumer.
@@ -229,6 +314,7 @@ acpi_pwr_deregister_resource(ACPI_HANDLE res)
static ACPI_STATUS
acpi_pwr_register_consumer(ACPI_HANDLE consumer)
{
+ ACPI_INTEGER status;
struct acpi_powerconsumer *pc;
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -239,14 +325,30 @@ acpi_pwr_register_consumer(ACPI_HANDLE consumer)
return_ACPI_STATUS (AE_OK);
/* Allocate a new power consumer */
- if ((pc = malloc(sizeof(*pc), M_ACPIPWR, M_NOWAIT)) == NULL)
+ if ((pc = malloc(sizeof(*pc), M_ACPIPWR, M_NOWAIT | M_ZERO)) == NULL)
return_ACPI_STATUS (AE_NO_MEMORY);
TAILQ_INSERT_HEAD(&acpi_powerconsumers, pc, ac_link);
TAILQ_INIT(&pc->ac_references);
pc->ac_consumer = consumer;
- /* XXX we should try to find its current state */
- pc->ac_state = ACPI_STATE_UNKNOWN;
+ /*
+ * Get all its power resource dependencies, if it has _PRx. We do this now
+ * as an opportunity to populate the acpi_powerresources queue.
+ *
+ * If this fails, immediately deregister it.
+ */
+ status = acpi_pwr_get_power_resources(consumer, pc);
+ if (ACPI_FAILURE(status)) {
+ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
+ "failed to get power resources for %s\n",
+ acpi_name(consumer)));
+ acpi_pwr_deregister_consumer(consumer);
+ return_ACPI_STATUS (status);
+ }
+
+ /* Find its initial state. */
+ if (ACPI_FAILURE(acpi_pwr_get_state_locked(consumer, &pc->ac_state)))
+ pc->ac_state = ACPI_STATE_UNKNOWN;
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "registered power consumer %s\n",
acpi_name(consumer)));
@@ -254,7 +356,6 @@ acpi_pwr_register_consumer(ACPI_HANDLE consumer)
return_ACPI_STATUS (AE_OK);
}
-#ifdef notyet
/*
* Deregister a power consumer.
*
@@ -279,6 +380,9 @@ acpi_pwr_deregister_consumer(ACPI_HANDLE consumer)
/* Pull the consumer off the list and free it */
TAILQ_REMOVE(&acpi_powerconsumers, pc, ac_link);
+ for (size_t i = 0; i < sizeof(pc->ac_prx) / sizeof(*pc->ac_prx); i++)
+ if (pc->ac_prx[i].prx_deps != NULL)
+ free(pc->ac_prx[i].prx_deps, M_ACPIPWR);
free(pc, M_ACPIPWR);
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "deregistered power consumer %s\n",
@@ -286,10 +390,139 @@ acpi_pwr_deregister_consumer(ACPI_HANDLE consumer)
return_ACPI_STATUS (AE_OK);
}
-#endif /* notyet */
/*
- * Set a power consumer to a particular power state.
+ * The _PSC control method isn't required if it's possible to infer the D-state
+ * from the _PRx control methods. (See 7.3.6.)
+ * We can infer that a given D-state has been achieved when all the dependencies
+ * are in the ON state.
+ */
+static ACPI_STATUS
+acpi_pwr_infer_state(struct acpi_powerconsumer *pc)
+{
+ ACPI_HANDLE *res;
+ uint32_t on;
+ bool all_on = false;
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+ ACPI_SERIAL_ASSERT(powerres);
+
+ /* It is important we go from the hottest to the coldest state. */
+ for (
+ pc->ac_state = ACPI_STATE_D0;
+ pc->ac_state <= ACPI_STATE_D3_HOT && !all_on;
+ pc->ac_state++
+ ) {
+ MPASS(pc->ac_state <= sizeof(pc->ac_prx) / sizeof(*pc->ac_prx));
+
+ if (!pc->ac_prx[pc->ac_state].prx_has)
+ continue;
+
+ all_on = true;
+
+ for (size_t i = 0; i < pc->ac_prx[pc->ac_state].prx_count; i++) {
+ res = pc->ac_prx[pc->ac_state].prx_deps[i];
+ /* If failure, better to assume D-state is hotter than colder. */
+ if (ACPI_FAILURE(acpi_GetInteger(res, "_STA", &on)))
+ continue;
+ if (on == 0) {
+ all_on = false;
+ break;
+ }
+ }
+ }
+
+ MPASS(pc->ac_state != ACPI_STATE_D0);
+
+ /*
+ * If none of the power resources required for the shallower D-states are
+ * on, then we can assume it is unpowered (i.e. D3cold). A device is not
+ * required to support D3cold however; in that case, _PR3 is not explicitly
+ * provided. Those devices should default to D3hot instead.
+ *
+ * See comments of first row of table 7.1 in ACPI spec.
+ */
+ if (!all_on)
+ pc->ac_state = pc->ac_prx[ACPI_STATE_D3_HOT].prx_has ?
+ ACPI_STATE_D3_COLD : ACPI_STATE_D3_HOT;
+ else
+ pc->ac_state--;
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+static ACPI_STATUS
+acpi_pwr_get_state_locked(ACPI_HANDLE consumer, int *state)
+{
+ struct acpi_powerconsumer *pc;
+ ACPI_HANDLE method_handle;
+ ACPI_STATUS status;
+ ACPI_BUFFER result;
+ ACPI_OBJECT *object = NULL;
+
+ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+ ACPI_SERIAL_ASSERT(powerres);
+
+ if (consumer == NULL)
+ return_ACPI_STATUS (AE_NOT_FOUND);
+
+ if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) {
+ if (ACPI_FAILURE(status = acpi_pwr_register_consumer(consumer)))
+ goto out;
+ if ((pc = acpi_pwr_find_consumer(consumer)) == NULL)
+ panic("acpi added power consumer but can't find it");
+ }
+
+ status = AcpiGetHandle(consumer, "_PSC", &method_handle);
+ if (ACPI_FAILURE(status)) {
+ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "no _PSC object - %s\n",
+ AcpiFormatException(status)));
+ status = acpi_pwr_infer_state(pc);
+ if (ACPI_FAILURE(status)) {
+ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "couldn't infer D-state - %s\n",
+ AcpiFormatException(status)));
+ pc->ac_state = ACPI_STATE_UNKNOWN;
+ }
+ goto out;
+ }
+
+ result.Pointer = NULL;
+ result.Length = ACPI_ALLOCATE_BUFFER;
+ status = AcpiEvaluateObjectTyped(method_handle, NULL, NULL, &result, ACPI_TYPE_INTEGER);
+ if (ACPI_FAILURE(status) || result.Pointer == NULL) {
+ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "failed to get state with _PSC - %s\n",
+ AcpiFormatException(status)));
+ pc->ac_state = ACPI_STATE_UNKNOWN;
+ goto out;
+ }
+
+ object = (ACPI_OBJECT *)result.Pointer;
+ pc->ac_state = ACPI_STATE_D0 + object->Integer.Value;
+ status = AE_OK;
+
+out:
+ if (object != NULL)
+ AcpiOsFree(object);
+ *state = pc->ac_state;
+ return_ACPI_STATUS (status);
+}
+
+/*
+ * Get a power consumer's D-state.
+ */
+ACPI_STATUS
+acpi_pwr_get_state(ACPI_HANDLE consumer, int *state)
+{
+ ACPI_STATUS res;
+
+ ACPI_SERIAL_BEGIN(powerres);
+ res = acpi_pwr_get_state_locked(consumer, state);
+ ACPI_SERIAL_END(powerres);
+ return (res);
+}
+
+/*
+ * Set a power consumer to a particular D-state.
*/
ACPI_STATUS
acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
@@ -300,6 +533,7 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
ACPI_OBJECT *reslist_object;
ACPI_STATUS status;
char *method_name, *reslist_name = NULL;
+ int new_state;
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -501,8 +735,28 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state)
}
}
- /* Transition was successful */
- pc->ac_state = state;
+ /*
+ * Make sure the transition succeeded. If getting new state failed,
+ * just assume the new state is what we wanted. This was the behaviour
+ * before we were checking D-states.
+ */
+ if (ACPI_FAILURE(acpi_pwr_get_state_locked(consumer, &new_state))) {
+ printf("%s: failed to get new D-state\n", __func__);
+ pc->ac_state = state;
+ } else {
+ if (new_state != state)
+ printf("%s: new power state %s is not the one requested %s\n",
+ __func__, acpi_d_state_to_str(new_state),
+ acpi_d_state_to_str(state));
+ pc->ac_state = new_state;
+ }
+
+ /*
+ * We consider the transition successful even if the state we got doesn't
+ * reflect what we set it to. This is because we weren't previously
+ * checking the new state at all, so there might exist buggy platforms on
+ * which suspend would otherwise succeed if we failed here.
+ */
status = AE_OK;
out:
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 6887f080311d..7495a010432b 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -490,6 +490,7 @@ EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t);
/* Device power control. */
ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable);
+ACPI_STATUS acpi_pwr_get_state(ACPI_HANDLE consumer, int *state);
ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state);
acpi_pwr_for_sleep_t acpi_device_pwr_for_sleep;
int acpi_set_powerstate(device_t child, int state);
diff --git a/sys/dev/bnxt/bnxt_re/qplib_res.c b/sys/dev/bnxt/bnxt_re/qplib_res.c
index 69661c67708c..f527af031176 100644
--- a/sys/dev/bnxt/bnxt_re/qplib_res.c
+++ b/sys/dev/bnxt/bnxt_re/qplib_res.c
@@ -875,7 +875,7 @@ int bnxt_qplib_alloc_dpi(struct bnxt_qplib_res *res,
dpi->umdbr = umaddr;
switch (type) {
case BNXT_QPLIB_DPI_TYPE_KERNEL:
- /* priviledged dbr was already mapped just initialize it. */
+ /* privileged dbr was already mapped just initialize it. */
dpi->umdbr = dpit->ucreg.bar_base +
dpit->ucreg.offset + bit_num * PAGE_SIZE;
dpi->dbr = dpit->priv_db;
@@ -1150,7 +1150,7 @@ int bnxt_qplib_map_db_bar(struct bnxt_qplib_res *res)
}
ucreg->bar_reg = ioremap(ucreg->bar_base, ucreg->len);
if (!ucreg->bar_reg) {
- dev_err(&res->pdev->dev, "priviledged dpi map failed!\n");
+ dev_err(&res->pdev->dev, "privileged dpi map failed!\n");
return -ENOMEM;
}
diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c
index c34897e3b31a..634f48171c3e 100644
--- a/sys/dev/e1000/e1000_phy.c
+++ b/sys/dev/e1000/e1000_phy.c
@@ -1707,10 +1707,9 @@ s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
* autonegotiation.
*/
ret_val = e1000_copper_link_autoneg(hw);
- if (ret_val && !hw->mac.forced_speed_duplex)
+ if (ret_val)
return ret_val;
- }
- if (!hw->mac.autoneg || (ret_val && hw->mac.forced_speed_duplex)) {
+ } else {
/* PHY will be set to 10H, 10F, 100H or 100F
* depending on user settings.
*/
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index f0ef6051fab1..9c5ae2806f75 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -2000,18 +2000,7 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr)
(sc->hw.phy.media_type == e1000_media_type_internal_serdes)) {
if (sc->hw.mac.type == e1000_82545)
fiber_type = IFM_1000_LX;
- switch (sc->link_speed) {
- case 10:
- ifmr->ifm_active |= IFM_10_FL;
- break;
- case 100:
- ifmr->ifm_active |= IFM_100_FX;
- break;
- case 1000:
- default:
- ifmr->ifm_active |= fiber_type | IFM_FDX;
- break;
- }
+ ifmr->ifm_active |= fiber_type | IFM_FDX;
} else {
switch (sc->link_speed) {
case 10:
@@ -2024,12 +2013,11 @@ em_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr)
ifmr->ifm_active |= IFM_1000_T;
break;
}
+ if (sc->link_duplex == FULL_DUPLEX)
+ ifmr->ifm_active |= IFM_FDX;
+ else
+ ifmr->ifm_active |= IFM_HDX;
}
-
- if (sc->link_duplex == FULL_DUPLEX)
- ifmr->ifm_active |= IFM_FDX;
- else
- ifmr->ifm_active |= IFM_HDX;
}
/*********************************************************************
@@ -2063,26 +2051,6 @@ em_if_media_change(if_ctx_t ctx)
sc->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL;
break;
case IFM_100_TX:
- sc->hw.mac.autoneg = DO_AUTO_NEG;
- if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
- sc->hw.phy.autoneg_advertised = ADVERTISE_100_FULL;
- sc->hw.mac.forced_speed_duplex = ADVERTISE_100_FULL;
- } else {
- sc->hw.phy.autoneg_advertised = ADVERTISE_100_HALF;
- sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF;
- }
- break;
- case IFM_10_T:
- sc->hw.mac.autoneg = DO_AUTO_NEG;
- if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
- sc->hw.phy.autoneg_advertised = ADVERTISE_10_FULL;
- sc->hw.mac.forced_speed_duplex = ADVERTISE_10_FULL;
- } else {
- sc->hw.phy.autoneg_advertised = ADVERTISE_10_HALF;
- sc->hw.mac.forced_speed_duplex = ADVERTISE_10_HALF;
- }
- break;
- case IFM_100_FX:
sc->hw.mac.autoneg = false;
sc->hw.phy.autoneg_advertised = 0;
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
@@ -2090,7 +2058,7 @@ em_if_media_change(if_ctx_t ctx)
else
sc->hw.mac.forced_speed_duplex = ADVERTISE_100_HALF;
break;
- case IFM_10_FL:
+ case IFM_10_T:
sc->hw.mac.autoneg = false;
sc->hw.phy.autoneg_advertised = 0;
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
index 1fea4c6f1392..f43551c6310e 100644
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -62,8 +62,6 @@
SYSCTL_NODE(_hw, OID_AUTO, fdt, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"Flattened Device Tree");
-struct fdt_ic_list fdt_ic_list_head = SLIST_HEAD_INITIALIZER(fdt_ic_list_head);
-
static int
fdt_get_range_by_busaddr(phandle_t node, u_long addr, u_long *base,
u_long *size)
diff --git a/sys/dev/fdt/fdt_common.h b/sys/dev/fdt/fdt_common.h
index ece54290a6ad..f597233f9771 100644
--- a/sys/dev/fdt/fdt_common.h
+++ b/sys/dev/fdt/fdt_common.h
@@ -59,13 +59,6 @@ struct fdt_fixup_entry {
extern struct fdt_fixup_entry fdt_fixup_table[];
#endif
-extern SLIST_HEAD(fdt_ic_list, fdt_ic) fdt_ic_list_head;
-struct fdt_ic {
- SLIST_ENTRY(fdt_ic) fdt_ics;
- ihandle_t iph;
- device_t dev;
-};
-
#if defined(FDT_DTB_STATIC)
extern u_char fdt_static_dtb;
#endif
diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c
index 170f23615416..0d2455cab399 100644
--- a/sys/dev/gpio/acpi_gpiobus.c
+++ b/sys/dev/gpio/acpi_gpiobus.c
@@ -37,6 +37,7 @@
#include <dev/gpio/gpiobusvar.h>
#include <dev/gpio/acpi_gpiobusvar.h>
#include <dev/gpio/gpiobus_internal.h>
+#include <sys/sbuf.h>
#include "gpiobus_if.h"
@@ -52,12 +53,11 @@ struct acpi_gpiobus_ctx {
struct acpi_gpiobus_ivar
{
- struct gpiobus_ivar gpiobus; /* Must come first */
- ACPI_HANDLE dev_handle; /* ACPI handle for bus */
- uint32_t flags;
+ struct gpiobus_ivar gpiobus;
+ ACPI_HANDLE handle;
};
-static uint32_t
+uint32_t
acpi_gpiobus_convflags(ACPI_RESOURCE_GPIO *gpio_res)
{
uint32_t flags = 0;
@@ -150,70 +150,24 @@ acpi_gpiobus_enumerate_res(ACPI_RESOURCE *res, void *context)
return (AE_OK);
}
-static struct acpi_gpiobus_ivar *
-acpi_gpiobus_setup_devinfo(device_t bus, device_t child,
- ACPI_RESOURCE_GPIO *gpio_res)
-{
- struct acpi_gpiobus_ivar *devi;
-
- devi = malloc(sizeof(*devi), M_DEVBUF, M_NOWAIT | M_ZERO);
- if (devi == NULL)
- return (NULL);
- resource_list_init(&devi->gpiobus.rl);
-
- devi->flags = acpi_gpiobus_convflags(gpio_res);
- if (acpi_quirks & ACPI_Q_AEI_NOPULL)
- devi->flags &= ~GPIO_PIN_PULLUP;
-
- devi->gpiobus.npins = 1;
- if (gpiobus_alloc_ivars(&devi->gpiobus) != 0) {
- free(devi, M_DEVBUF);
- return (NULL);
- }
-
- for (int i = 0; i < devi->gpiobus.npins; i++)
- devi->gpiobus.pins[i] = gpio_res->PinTable[i];
-
- return (devi);
-}
-
static ACPI_STATUS
acpi_gpiobus_enumerate_aei(ACPI_RESOURCE *res, void *context)
{
ACPI_RESOURCE_GPIO *gpio_res = &res->Data.Gpio;
- struct acpi_gpiobus_ctx *ctx = context;
- device_t bus = ctx->sc->sc_busdev;
- device_t child;
- struct acpi_gpiobus_ivar *devi;
+ uint32_t *npins = context, *pins = npins + 1;
- /* Check that we have a GpioInt object. */
+ /*
+ * Check that we have a GpioInt object.
+ * Note that according to the spec this
+ * should always be the case.
+ */
if (res->Type != ACPI_RESOURCE_TYPE_GPIO)
return (AE_OK);
if (gpio_res->ConnectionType != ACPI_RESOURCE_GPIO_TYPE_INT)
return (AE_OK);
- /* Add a child. */
- child = device_add_child_ordered(bus, 0, "gpio_aei", DEVICE_UNIT_ANY);
- if (child == NULL)
- return (AE_OK);
- devi = acpi_gpiobus_setup_devinfo(bus, child, gpio_res);
- if (devi == NULL) {
- device_delete_child(bus, child);
- return (AE_OK);
- }
- device_set_ivars(child, devi);
-
- for (int i = 0; i < devi->gpiobus.npins; i++) {
- if (GPIOBUS_PIN_SETFLAGS(bus, child, 0, devi->flags &
- ~GPIO_INTR_MASK)) {
- device_delete_child(bus, child);
- return (AE_OK);
- }
- }
-
- /* Pass ACPI information to children. */
- devi->dev_handle = ctx->dev_handle;
-
+ for (int i = 0; i < gpio_res->PinTableLength; i++)
+ pins[(*npins)++] = gpio_res->PinTable[i];
return (AE_OK);
}
@@ -296,6 +250,63 @@ err:
return (AE_BAD_PARAMETER);
}
+static void
+acpi_gpiobus_attach_aei(struct acpi_gpiobus_softc *sc, ACPI_HANDLE handle)
+{
+ struct acpi_gpiobus_ivar *devi;
+ ACPI_HANDLE aei_handle;
+ device_t child;
+ uint32_t *pins;
+ ACPI_STATUS status;
+ int err;
+
+ status = AcpiGetHandle(handle, "_AEI", &aei_handle);
+ if (ACPI_FAILURE(status))
+ return;
+
+ /* pins[0] specifies the length of the array. */
+ pins = mallocarray(sc->super_sc.sc_npins + 1,
+ sizeof(uint32_t), M_DEVBUF, M_WAITOK);
+ pins[0] = 0;
+
+ status = AcpiWalkResources(handle, "_AEI",
+ acpi_gpiobus_enumerate_aei, pins);
+ if (ACPI_FAILURE(status)) {
+ device_printf(sc->super_sc.sc_busdev,
+ "Failed to enumerate AEI resources\n");
+ free(pins, M_DEVBUF);
+ return;
+ }
+
+ child = BUS_ADD_CHILD(sc->super_sc.sc_busdev, 0, "gpio_aei",
+ DEVICE_UNIT_ANY);
+ if (child == NULL) {
+ device_printf(sc->super_sc.sc_busdev,
+ "Failed to add gpio_aei child\n");
+ free(pins, M_DEVBUF);
+ return;
+ }
+
+ devi = device_get_ivars(child);
+ devi->gpiobus.npins = pins[0];
+ devi->handle = aei_handle;
+
+ err = gpiobus_alloc_ivars(&devi->gpiobus);
+ if (err != 0) {
+ device_printf(sc->super_sc.sc_busdev,
+ "Failed to allocate gpio_aei ivars\n");
+ device_delete_child(sc->super_sc.sc_busdev, child);
+ free(pins, M_DEVBUF);
+ return;
+ }
+
+ for (int i = 0; i < pins[0]; i++)
+ devi->gpiobus.pins[i] = pins[i + 1];
+ free(pins, M_DEVBUF);
+
+ bus_attach_children(sc->super_sc.sc_busdev);
+}
+
static int
acpi_gpiobus_probe(device_t dev)
{
@@ -353,13 +364,8 @@ acpi_gpiobus_attach(device_t dev)
if (ACPI_FAILURE(status))
device_printf(dev, "Failed to enumerate GPIO resources\n");
- /* Look for AEI children */
- status = AcpiWalkResources(handle, "_AEI", acpi_gpiobus_enumerate_aei,
- &ctx);
-
- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
- device_printf(dev, "Failed to enumerate AEI resources\n");
-
+ /* Look for AEI child */
+ acpi_gpiobus_attach_aei(sc, handle);
return (0);
}
@@ -390,10 +396,7 @@ acpi_gpiobus_read_ivar(device_t dev, device_t child, int which,
switch (which) {
case ACPI_GPIOBUS_IVAR_HANDLE:
- *result = (uintptr_t)devi->dev_handle;
- break;
- case ACPI_GPIOBUS_IVAR_FLAGS:
- *result = (uintptr_t)devi->flags;
+ *result = (uintptr_t)devi->handle;
break;
default:
return (gpiobus_read_ivar(dev, child, which, result));
@@ -402,6 +405,28 @@ acpi_gpiobus_read_ivar(device_t dev, device_t child, int which,
return (0);
}
+static device_t
+acpi_gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
+{
+ return (gpiobus_add_child_common(dev, order, name, unit,
+ sizeof(struct acpi_gpiobus_ivar)));
+}
+
+static int
+acpi_gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb)
+{
+ struct acpi_gpiobus_ivar *devi;
+ int err;
+
+ err = gpiobus_child_location(bus, child, sb);
+ if (err != 0)
+ return (err);
+
+ devi = device_get_ivars(child);
+ sbuf_printf(sb, " handle=%s", acpi_name(devi->handle));
+ return (0);
+}
+
static device_method_t acpi_gpiobus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, acpi_gpiobus_probe),
@@ -410,6 +435,8 @@ static device_method_t acpi_gpiobus_methods[] = {
/* Bus interface */
DEVMETHOD(bus_read_ivar, acpi_gpiobus_read_ivar),
+ DEVMETHOD(bus_add_child, acpi_gpiobus_add_child),
+ DEVMETHOD(bus_child_location, acpi_gpiobus_child_location),
DEVMETHOD_END
};
diff --git a/sys/dev/gpio/acpi_gpiobusvar.h b/sys/dev/gpio/acpi_gpiobusvar.h
index f8d502eab9d1..288e8bd0f2af 100644
--- a/sys/dev/gpio/acpi_gpiobusvar.h
+++ b/sys/dev/gpio/acpi_gpiobusvar.h
@@ -33,16 +33,16 @@
#include <contrib/dev/acpica/include/acpi.h>
enum acpi_gpiobus_ivars {
- ACPI_GPIOBUS_IVAR_HANDLE = 10600,
- ACPI_GPIOBUS_IVAR_FLAGS,
+ ACPI_GPIOBUS_IVAR_HANDLE = 10600
};
#define ACPI_GPIOBUS_ACCESSOR(var, ivar, type) \
__BUS_ACCESSOR(acpi_gpiobus, var, ACPI_GPIOBUS, ivar, type)
ACPI_GPIOBUS_ACCESSOR(handle, HANDLE, ACPI_HANDLE)
-ACPI_GPIOBUS_ACCESSOR(flags, FLAGS, uint32_t)
#undef ACPI_GPIOBUS_ACCESSOR
+uint32_t acpi_gpiobus_convflags(ACPI_RESOURCE_GPIO *);
+
#endif /* __ACPI_GPIOBUS_H__ */
diff --git a/sys/dev/gpio/gpioaei.c b/sys/dev/gpio/gpioaei.c
index ecae8ccaf2fa..7b97277aaf61 100644
--- a/sys/dev/gpio/gpioaei.c
+++ b/sys/dev/gpio/gpioaei.c
@@ -45,13 +45,21 @@ enum gpio_aei_type {
ACPI_AEI_TYPE_EVT
};
-struct gpio_aei_softc {
- ACPI_HANDLE handle;
- enum gpio_aei_type type;
- int pin;
+struct gpio_aei_ctx {
+ SLIST_ENTRY(gpio_aei_ctx) next;
struct resource * intr_res;
- int intr_rid;
void * intr_cookie;
+ ACPI_HANDLE handle;
+ gpio_pin_t gpio;
+ uint32_t pin;
+ int intr_rid;
+ enum gpio_aei_type type;
+};
+
+struct gpio_aei_softc {
+ SLIST_HEAD(, gpio_aei_ctx) aei_ctx;
+ ACPI_HANDLE dev_handle;
+ device_t dev;
};
static int
@@ -65,69 +73,157 @@ gpio_aei_probe(device_t dev)
static void
gpio_aei_intr(void * arg)
{
- struct gpio_aei_softc * sc = arg;
+ struct gpio_aei_ctx * ctx = arg;
/* Ask ACPI to run the appropriate _EVT, _Exx or _Lxx method. */
- if (sc->type == ACPI_AEI_TYPE_EVT)
- acpi_SetInteger(sc->handle, NULL, sc->pin);
+ if (ctx->type == ACPI_AEI_TYPE_EVT)
+ acpi_SetInteger(ctx->handle, NULL, ctx->pin);
else
- AcpiEvaluateObject(sc->handle, NULL, NULL, NULL);
+ AcpiEvaluateObject(ctx->handle, NULL, NULL, NULL);
+}
+
+static ACPI_STATUS
+gpio_aei_enumerate(ACPI_RESOURCE * res, void * context)
+{
+ ACPI_RESOURCE_GPIO * gpio_res = &res->Data.Gpio;
+ struct gpio_aei_softc * sc = context;
+ uint32_t flags, maxpin;
+ device_t busdev;
+ int err;
+
+ /*
+ * Check that we have a GpioInt object.
+ * Note that according to the spec this
+ * should always be the case.
+ */
+ if (res->Type != ACPI_RESOURCE_TYPE_GPIO)
+ return (AE_OK);
+ if (gpio_res->ConnectionType != ACPI_RESOURCE_GPIO_TYPE_INT)
+ return (AE_OK);
+
+ flags = acpi_gpiobus_convflags(gpio_res);
+ if (acpi_quirks & ACPI_Q_AEI_NOPULL)
+ flags &= ~GPIO_PIN_PULLUP;
+
+ err = GPIO_PIN_MAX(acpi_get_device(sc->dev_handle), &maxpin);
+ if (err != 0)
+ return (AE_ERROR);
+
+ busdev = GPIO_GET_BUS(acpi_get_device(sc->dev_handle));
+ for (int i = 0; i < gpio_res->PinTableLength; i++) {
+ struct gpio_aei_ctx * ctx;
+ uint32_t pin = gpio_res->PinTable[i];
+
+ if (__predict_false(pin > maxpin)) {
+ device_printf(sc->dev,
+ "Invalid pin 0x%x, max: 0x%x (bad ACPI tables?)\n",
+ pin, maxpin);
+ continue;
+ }
+
+ ctx = malloc(sizeof(struct gpio_aei_ctx), M_DEVBUF, M_WAITOK);
+ ctx->type = ACPI_AEI_TYPE_UNKNOWN;
+ if (pin <= 255) {
+ char objname[5]; /* "_EXX" or "_LXX" */
+ sprintf(objname, "_%c%02X",
+ (flags & GPIO_INTR_EDGE_MASK) ? 'E' : 'L', pin);
+ if (ACPI_SUCCESS(AcpiGetHandle(sc->dev_handle, objname,
+ &ctx->handle)))
+ ctx->type = ACPI_AEI_TYPE_ELX;
+ }
+
+ if (ctx->type == ACPI_AEI_TYPE_UNKNOWN) {
+ if (ACPI_SUCCESS(AcpiGetHandle(sc->dev_handle, "_EVT",
+ &ctx->handle)))
+ ctx->type = ACPI_AEI_TYPE_EVT;
+ else {
+ device_printf(sc->dev,
+ "AEI Device type is unknown for pin 0x%x\n",
+ pin);
+
+ free(ctx, M_DEVBUF);
+ continue;
+ }
+ }
+
+ err = gpio_pin_get_by_bus_pinnum(busdev, pin, &ctx->gpio);
+ if (err != 0) {
+ device_printf(sc->dev, "Cannot acquire pin 0x%x\n",
+ pin);
+
+ free(ctx, M_DEVBUF);
+ continue;
+ }
+
+ err = gpio_pin_setflags(ctx->gpio, flags & ~GPIO_INTR_MASK);
+ if (err != 0) {
+ device_printf(sc->dev,
+ "Cannot set pin flags for pin 0x%x\n", pin);
+
+ gpio_pin_release(ctx->gpio);
+ free(ctx, M_DEVBUF);
+ continue;
+ }
+
+ ctx->intr_rid = 0;
+ ctx->intr_res = gpio_alloc_intr_resource(sc->dev,
+ &ctx->intr_rid, RF_ACTIVE, ctx->gpio,
+ flags & GPIO_INTR_MASK);
+ if (ctx->intr_res == NULL) {
+ device_printf(sc->dev,
+ "Cannot allocate an IRQ for pin 0x%x\n", pin);
+
+ gpio_pin_release(ctx->gpio);
+ free(ctx, M_DEVBUF);
+ continue;
+ }
+
+ err = bus_setup_intr(sc->dev, ctx->intr_res, INTR_TYPE_MISC |
+ INTR_MPSAFE | INTR_EXCL | INTR_SLEEPABLE, NULL,
+ gpio_aei_intr, ctx, &ctx->intr_cookie);
+ if (err != 0) {
+ device_printf(sc->dev,
+ "Cannot set up an IRQ for pin 0x%x\n", pin);
+
+ bus_release_resource(sc->dev, ctx->intr_res);
+ gpio_pin_release(ctx->gpio);
+ free(ctx, M_DEVBUF);
+ continue;
+ }
+
+ ctx->pin = pin;
+ SLIST_INSERT_HEAD(&sc->aei_ctx, ctx, next);
+ }
+
+ return (AE_OK);
}
static int
gpio_aei_attach(device_t dev)
{
struct gpio_aei_softc * sc = device_get_softc(dev);
- gpio_pin_t pin;
- uint32_t flags;
ACPI_HANDLE handle;
- int err;
+ ACPI_STATUS status;
/* This is us. */
device_set_desc(dev, "ACPI Event Information Device");
- /* Store parameters needed by gpio_aei_intr. */
handle = acpi_gpiobus_get_handle(dev);
- if (gpio_pin_get_by_child_index(dev, 0, &pin) != 0) {
- device_printf(dev, "Unable to get the input pin\n");
+ status = AcpiGetParent(handle, &sc->dev_handle);
+ if (ACPI_FAILURE(status)) {
+ device_printf(dev, "Cannot get parent of %s\n",
+ acpi_name(handle));
return (ENXIO);
}
- sc->type = ACPI_AEI_TYPE_UNKNOWN;
- sc->pin = pin->pin;
-
- flags = acpi_gpiobus_get_flags(dev);
- if (pin->pin <= 255) {
- char objname[5]; /* "_EXX" or "_LXX" */
- sprintf(objname, "_%c%02X",
- (flags & GPIO_INTR_EDGE_MASK) ? 'E' : 'L', pin->pin);
- if (ACPI_SUCCESS(AcpiGetHandle(handle, objname, &sc->handle)))
- sc->type = ACPI_AEI_TYPE_ELX;
- }
- if (sc->type == ACPI_AEI_TYPE_UNKNOWN) {
- if (ACPI_SUCCESS(AcpiGetHandle(handle, "_EVT", &sc->handle)))
- sc->type = ACPI_AEI_TYPE_EVT;
- }
-
- if (sc->type == ACPI_AEI_TYPE_UNKNOWN) {
- device_printf(dev, "ACPI Event Information Device type is unknown");
- return (ENOTSUP);
- }
+ SLIST_INIT(&sc->aei_ctx);
+ sc->dev = dev;
- /* Set up the interrupt. */
- if ((sc->intr_res = gpio_alloc_intr_resource(dev, &sc->intr_rid,
- RF_ACTIVE, pin, flags & GPIO_INTR_MASK)) == NULL) {
- device_printf(dev, "Cannot allocate an IRQ\n");
- return (ENOTSUP);
- }
- err = bus_setup_intr(dev, sc->intr_res, INTR_TYPE_MISC | INTR_MPSAFE |
- INTR_EXCL | INTR_SLEEPABLE, NULL, gpio_aei_intr, sc,
- &sc->intr_cookie);
- if (err != 0) {
- device_printf(dev, "Cannot set up IRQ\n");
- bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid,
- sc->intr_res);
- return (err);
+ status = AcpiWalkResources(sc->dev_handle, "_AEI",
+ gpio_aei_enumerate, sc);
+ if (ACPI_FAILURE(status)) {
+ device_printf(dev, "Failed to enumerate AEI resources\n");
+ return (ENXIO);
}
return (0);
@@ -137,9 +233,15 @@ static int
gpio_aei_detach(device_t dev)
{
struct gpio_aei_softc * sc = device_get_softc(dev);
+ struct gpio_aei_ctx * ctx, * tctx;
+
+ SLIST_FOREACH_SAFE(ctx, &sc->aei_ctx, next, tctx) {
+ bus_teardown_intr(dev, ctx->intr_res, ctx->intr_cookie);
+ bus_release_resource(dev, ctx->intr_res);
+ gpio_pin_release(ctx->gpio);
+ free(ctx, M_DEVBUF);
+ }
- bus_teardown_intr(dev, sc->intr_res, sc->intr_cookie);
- bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid, sc->intr_res);
return (0);
}
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index c25c41f43042..5f1f6532a79b 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -57,7 +57,6 @@ static int gpiobus_suspend(device_t);
static int gpiobus_resume(device_t);
static void gpiobus_probe_nomatch(device_t, device_t);
static int gpiobus_print_child(device_t, device_t);
-static int gpiobus_child_location(device_t, device_t, struct sbuf *);
static device_t gpiobus_add_child(device_t, u_int, const char *, int);
static void gpiobus_hinted_child(device_t, const char *, int);
@@ -662,7 +661,7 @@ gpiobus_print_child(device_t dev, device_t child)
return (retval);
}
-static int
+int
gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb)
{
struct gpiobus_ivar *devi;
@@ -674,16 +673,19 @@ gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb)
return (0);
}
-static device_t
-gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
+device_t
+gpiobus_add_child_common(device_t dev, u_int order, const char *name, int unit,
+ size_t ivars_size)
{
device_t child;
struct gpiobus_ivar *devi;
+ KASSERT(ivars_size >= sizeof(struct gpiobus_ivar),
+ ("child ivars must include gpiobus_ivar as their first member"));
child = device_add_child_ordered(dev, order, name, unit);
if (child == NULL)
return (child);
- devi = malloc(sizeof(struct gpiobus_ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
+ devi = malloc(ivars_size, M_DEVBUF, M_NOWAIT | M_ZERO);
if (devi == NULL) {
device_delete_child(dev, child);
return (NULL);
@@ -694,6 +696,13 @@ gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
return (child);
}
+static device_t
+gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
+{
+ return (gpiobus_add_child_common(dev, order, name, unit,
+ sizeof(struct gpiobus_ivar)));
+}
+
static void
gpiobus_child_deleted(device_t dev, device_t child)
{
diff --git a/sys/dev/gpio/gpiobus_internal.h b/sys/dev/gpio/gpiobus_internal.h
index de3f57663132..c198e5f79989 100644
--- a/sys/dev/gpio/gpiobus_internal.h
+++ b/sys/dev/gpio/gpiobus_internal.h
@@ -42,6 +42,8 @@ void gpiobus_free_ivars(struct gpiobus_ivar *);
int gpiobus_read_ivar(device_t, device_t, int, uintptr_t *);
int gpiobus_acquire_pin(device_t, uint32_t);
void gpiobus_release_pin(device_t, uint32_t);
+int gpiobus_child_location(device_t, device_t, struct sbuf *);
+device_t gpiobus_add_child_common(device_t, u_int, const char *, int, size_t);
extern driver_t gpiobus_driver;
#endif
diff --git a/sys/dev/gpio/ofw_gpiobus.c b/sys/dev/gpio/ofw_gpiobus.c
index fc5fb03d6824..b12b78fac18c 100644
--- a/sys/dev/gpio/ofw_gpiobus.c
+++ b/sys/dev/gpio/ofw_gpiobus.c
@@ -451,28 +451,22 @@ ofw_gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
device_t child;
struct ofw_gpiobus_devinfo *devi;
- child = device_add_child_ordered(dev, order, name, unit);
+ child = gpiobus_add_child_common(dev, order, name, unit,
+ sizeof(struct ofw_gpiobus_devinfo));
if (child == NULL)
- return (child);
- devi = malloc(sizeof(struct ofw_gpiobus_devinfo), M_DEVBUF,
- M_NOWAIT | M_ZERO);
- if (devi == NULL) {
- device_delete_child(dev, child);
- return (0);
- }
+ return (NULL);
/*
* NULL all the OFW-related parts of the ivars for non-OFW
* children.
*/
+ devi = device_get_ivars(child);
devi->opd_obdinfo.obd_node = -1;
devi->opd_obdinfo.obd_name = NULL;
devi->opd_obdinfo.obd_compat = NULL;
devi->opd_obdinfo.obd_type = NULL;
devi->opd_obdinfo.obd_model = NULL;
- device_set_ivars(child, devi);
-
return (child);
}
diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c
index 96d36c8d191d..683449fca49c 100644
--- a/sys/dev/hid/hidbus.c
+++ b/sys/dev/hid/hidbus.c
@@ -65,7 +65,7 @@ struct hidbus_ivars {
struct mtx *mtx; /* child intr mtx */
hid_intr_t *intr_handler; /* executed under mtx*/
void *intr_ctx;
- unsigned int refcnt; /* protected by mtx */
+ bool active; /* protected by mtx */
struct epoch_context epoch_ctx;
CK_STAILQ_ENTRY(hidbus_ivars) link;
};
@@ -398,7 +398,7 @@ hidbus_child_detached(device_t bus, device_t child)
struct hidbus_softc *sc = device_get_softc(bus);
struct hidbus_ivars *tlc = device_get_ivars(child);
- KASSERT(tlc->refcnt == 0, ("Child device is running"));
+ KASSERT(!tlc->active, ("Child device is running"));
tlc->mtx = &sc->mtx;
tlc->intr_handler = NULL;
tlc->flags &= ~HIDBUS_FLAG_CAN_POLL;
@@ -423,7 +423,7 @@ hidbus_child_deleted(device_t bus, device_t child)
struct hidbus_ivars *tlc = device_get_ivars(child);
sx_xlock(&sc->sx);
- KASSERT(tlc->refcnt == 0, ("Child device is running"));
+ KASSERT(!tlc->active, ("Child device is running"));
CK_STAILQ_REMOVE(&sc->tlcs, tlc, hidbus_ivars, link);
sx_unlock(&sc->sx);
epoch_call(INPUT_EPOCH, hidbus_ivar_dtor, &tlc->epoch_ctx);
@@ -572,7 +572,7 @@ hidbus_intr(void *context, void *buf, hid_size_t len)
if (!HID_IN_POLLING_MODE())
epoch_enter_preempt(INPUT_EPOCH, &et);
CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) {
- if (tlc->refcnt == 0 || tlc->intr_handler == NULL)
+ if (!tlc->active || tlc->intr_handler == NULL)
continue;
if (HID_IN_POLLING_MODE()) {
if ((tlc->flags & HIDBUS_FLAG_CAN_POLL) != 0)
@@ -602,21 +602,14 @@ hidbus_intr_start(device_t bus, device_t child)
MPASS(bus == device_get_parent(child));
struct hidbus_softc *sc = device_get_softc(bus);
struct hidbus_ivars *ivar = device_get_ivars(child);
- struct hidbus_ivars *tlc;
- bool refcnted = false;
int error;
if (sx_xlock_sig(&sc->sx) != 0)
return (EINTR);
- CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) {
- refcnted |= (tlc->refcnt != 0);
- if (tlc == ivar) {
- mtx_lock(tlc->mtx);
- ++tlc->refcnt;
- mtx_unlock(tlc->mtx);
- }
- }
- error = refcnted ? 0 : hid_intr_start(bus);
+ mtx_lock(ivar->mtx);
+ ivar->active = true;
+ mtx_unlock(ivar->mtx);
+ error = hid_intr_start(bus);
sx_unlock(&sc->sx);
return (error);
@@ -629,21 +622,17 @@ hidbus_intr_stop(device_t bus, device_t child)
struct hidbus_softc *sc = device_get_softc(bus);
struct hidbus_ivars *ivar = device_get_ivars(child);
struct hidbus_ivars *tlc;
- bool refcnted = false;
+ bool active = false;
int error;
if (sx_xlock_sig(&sc->sx) != 0)
return (EINTR);
- CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) {
- if (tlc == ivar) {
- mtx_lock(tlc->mtx);
- MPASS(tlc->refcnt != 0);
- --tlc->refcnt;
- mtx_unlock(tlc->mtx);
- }
- refcnted |= (tlc->refcnt != 0);
- }
- error = refcnted ? 0 : hid_intr_stop(bus);
+ mtx_lock(ivar->mtx);
+ ivar->active = false;
+ mtx_unlock(ivar->mtx);
+ CK_STAILQ_FOREACH(tlc, &sc->tlcs, link)
+ active |= tlc->active;
+ error = active ? 0 : hid_intr_stop(bus);
sx_unlock(&sc->sx);
return (error);
diff --git a/sys/dev/hid/hidquirk.h b/sys/dev/hid/hidquirk.h
index 4f8b8acbe201..f6fa9f88c6c9 100644
--- a/sys/dev/hid/hidquirk.h
+++ b/sys/dev/hid/hidquirk.h
@@ -50,6 +50,7 @@
HQ(IS_XBOX360GP), /* device is XBox 360 GamePad */ \
HQ(NOWRITE), /* device does not support writes */ \
HQ(IICHID_SAMPLING), /* IIC backend runs in sampling mode */ \
+ HQ(NO_READAHEAD), /* Disable interrupt after one report */\
\
/* Various quirks */ \
HQ(HID_IGNORE), /* device should be ignored by hid class */ \
diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c
index 06f70070f61b..4855843cd265 100644
--- a/sys/dev/hid/hidraw.c
+++ b/sys/dev/hid/hidraw.c
@@ -85,6 +85,12 @@ SYSCTL_INT(_hw_hid_hidraw, OID_AUTO, debug, CTLFLAG_RWTUN,
free((buf), M_DEVBUF); \
}
+#ifdef HIDRAW_MAKE_UHID_ALIAS
+#define HIDRAW_NAME "uhid"
+#else
+#define HIDRAW_NAME "hidraw"
+#endif
+
struct hidraw_softc {
device_t sc_dev; /* base device */
@@ -183,8 +189,8 @@ hidraw_identify(driver_t *driver, device_t parent)
{
device_t child;
- if (device_find_child(parent, "hidraw", DEVICE_UNIT_ANY) == NULL) {
- child = BUS_ADD_CHILD(parent, 0, "hidraw",
+ if (device_find_child(parent, HIDRAW_NAME, DEVICE_UNIT_ANY) == NULL) {
+ child = BUS_ADD_CHILD(parent, 0, HIDRAW_NAME,
device_get_unit(parent));
if (child != NULL)
hidbus_set_index(child, HIDRAW_INDEX);
@@ -1050,7 +1056,7 @@ static device_method_t hidraw_methods[] = {
};
static driver_t hidraw_driver = {
- "hidraw",
+ HIDRAW_NAME,
hidraw_methods,
sizeof(struct hidraw_softc)
};
diff --git a/sys/dev/hid/ietp.c b/sys/dev/hid/ietp.c
index 217585a7948b..73a5cb7414d4 100644
--- a/sys/dev/hid/ietp.c
+++ b/sys/dev/hid/ietp.c
@@ -102,6 +102,7 @@ struct ietp_softc {
device_t dev;
struct evdev_dev *evdev;
+ bool open;
uint8_t report_id;
hid_size_t report_len;
@@ -217,13 +218,25 @@ static const struct evdev_methods ietp_evdev_methods = {
static int
ietp_ev_open(struct evdev_dev *evdev)
{
- return (hid_intr_start(evdev_get_softc(evdev)));
+ struct ietp_softc *sc = evdev_get_softc(evdev);
+ int error;
+
+ error = hid_intr_start(sc->dev);
+ if (error == 0)
+ sc->open = true;
+ return (error);
}
static int
ietp_ev_close(struct evdev_dev *evdev)
{
- return (hid_intr_stop(evdev_get_softc(evdev)));
+ struct ietp_softc *sc = evdev_get_softc(evdev);
+ int error;
+
+ error = hid_intr_stop(sc->dev);
+ if (error == 0)
+ sc->open = false;
+ return (error);
}
static int
@@ -275,7 +288,7 @@ ietp_attach(struct ietp_softc *sc)
evdev_set_id(sc->evdev, hw->idBus, hw->idVendor, hw->idProduct,
hw->idVersion);
evdev_set_serial(sc->evdev, hw->serial);
- evdev_set_methods(sc->evdev, sc->dev, &ietp_evdev_methods);
+ evdev_set_methods(sc->evdev, sc, &ietp_evdev_methods);
evdev_set_flag(sc->evdev, EVDEV_FLAG_MT_STCOMPAT);
evdev_set_flag(sc->evdev, EVDEV_FLAG_EXT_EPOCH); /* hidbus child */
@@ -584,11 +597,13 @@ ietp_iic_set_absolute_mode(device_t dev, bool enable)
* Some ASUS touchpads need to be powered on to enter absolute mode.
*/
require_wakeup = false;
- for (i = 0; i < nitems(special_fw); i++) {
- if (sc->ic_type == special_fw[i].ic_type &&
- sc->product_id == special_fw[i].product_id) {
- require_wakeup = true;
- break;
+ if (!sc->open) {
+ for (i = 0; i < nitems(special_fw); i++) {
+ if (sc->ic_type == special_fw[i].ic_type &&
+ sc->product_id == special_fw[i].product_id) {
+ require_wakeup = true;
+ break;
+ }
}
}
diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c
new file mode 100644
index 000000000000..ac2eba7a499d
--- /dev/null
+++ b/sys/dev/hid/u2f.c
@@ -0,0 +1,590 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022-2023 Vladimir Kondratyev <wulf@FreeBSD.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "opt_hid.h"
+
+#include <sys/param.h>
+#ifdef COMPAT_FREEBSD32
+#include <sys/abi_compat.h>
+#endif
+#include <sys/bus.h>
+#include <sys/conf.h>
+#include <sys/fcntl.h>
+#include <sys/filio.h>
+#include <sys/ioccom.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/poll.h>
+#include <sys/priv.h>
+#include <sys/proc.h>
+#include <sys/selinfo.h>
+#include <sys/sysctl.h>
+#include <sys/systm.h>
+#include <sys/uio.h>
+
+#include <dev/evdev/input.h>
+
+#define HID_DEBUG_VAR u2f_debug
+#include <dev/hid/hid.h>
+#include <dev/hid/hidbus.h>
+#include <dev/hid/hidquirk.h>
+
+#include <dev/usb/usb_ioctl.h>
+
+#ifdef HID_DEBUG
+static int u2f_debug = 0;
+static SYSCTL_NODE(_hw_hid, OID_AUTO, u2f, CTLFLAG_RW, 0,
+ "FIDO/U2F authenticator");
+SYSCTL_INT(_hw_hid_u2f, OID_AUTO, debug, CTLFLAG_RWTUN,
+ &u2f_debug, 0, "Debug level");
+#endif
+
+#define U2F_MAX_REPORT_SIZE 64
+
+/* A match on these entries will load u2f */
+static const struct hid_device_id u2f_devs[] = {
+ { HID_BUS(BUS_USB), HID_TLC(HUP_FIDO, HUF_U2FHID) },
+};
+
+struct u2f_softc {
+ device_t sc_dev; /* base device */
+ struct cdev *dev;
+
+ struct mtx sc_mtx; /* hidbus private mutex */
+ void *sc_rdesc;
+ hid_size_t sc_rdesc_size;
+ hid_size_t sc_isize;
+ hid_size_t sc_osize;
+ struct selinfo sc_rsel;
+ struct { /* driver state */
+ bool open:1; /* device is open */
+ bool aslp:1; /* waiting for device data in read() */
+ bool sel:1; /* waiting for device data in poll() */
+ bool data:1; /* input report is stored in sc_buf */
+ int reserved:28;
+ } sc_state;
+ int sc_fflags; /* access mode for open lifetime */
+
+ uint8_t sc_buf[U2F_MAX_REPORT_SIZE];
+};
+
+static d_open_t u2f_open;
+static d_read_t u2f_read;
+static d_write_t u2f_write;
+static d_ioctl_t u2f_ioctl;
+static d_poll_t u2f_poll;
+static d_kqfilter_t u2f_kqfilter;
+
+static d_priv_dtor_t u2f_dtor;
+
+static struct cdevsw u2f_cdevsw = {
+ .d_version = D_VERSION,
+ .d_open = u2f_open,
+ .d_read = u2f_read,
+ .d_write = u2f_write,
+ .d_ioctl = u2f_ioctl,
+ .d_poll = u2f_poll,
+ .d_kqfilter = u2f_kqfilter,
+ .d_name = "u2f",
+};
+
+static hid_intr_t u2f_intr;
+
+static device_probe_t u2f_probe;
+static device_attach_t u2f_attach;
+static device_detach_t u2f_detach;
+
+static int u2f_kqread(struct knote *, long);
+static void u2f_kqdetach(struct knote *);
+static void u2f_notify(struct u2f_softc *);
+
+static struct filterops u2f_filterops_read = {
+ .f_isfd = 1,
+ .f_detach = u2f_kqdetach,
+ .f_event = u2f_kqread,
+};
+
+static int
+u2f_probe(device_t dev)
+{
+ int error;
+
+ error = HIDBUS_LOOKUP_DRIVER_INFO(dev, u2f_devs);
+ if (error != 0)
+ return (error);
+
+ hidbus_set_desc(dev, "Authenticator");
+
+ return (BUS_PROBE_GENERIC);
+}
+
+static int
+u2f_attach(device_t dev)
+{
+ struct u2f_softc *sc = device_get_softc(dev);
+ struct hid_device_info *hw = __DECONST(struct hid_device_info *,
+ hid_get_device_info(dev));
+ struct make_dev_args mda;
+ int error;
+
+ sc->sc_dev = dev;
+
+ error = hid_get_report_descr(dev, &sc->sc_rdesc, &sc->sc_rdesc_size);
+ if (error != 0)
+ return (ENXIO);
+ sc->sc_isize = hid_report_size_max(sc->sc_rdesc, sc->sc_rdesc_size,
+ hid_input, NULL);
+ if (sc->sc_isize > U2F_MAX_REPORT_SIZE) {
+ device_printf(dev, "Input report size too large. Truncate.\n");
+ sc->sc_isize = U2F_MAX_REPORT_SIZE;
+ }
+ sc->sc_osize = hid_report_size_max(sc->sc_rdesc, sc->sc_rdesc_size,
+ hid_output, NULL);
+ if (sc->sc_osize > U2F_MAX_REPORT_SIZE) {
+ device_printf(dev, "Output report size too large. Truncate.\n");
+ sc->sc_osize = U2F_MAX_REPORT_SIZE;
+ }
+
+ mtx_init(&sc->sc_mtx, "u2f lock", NULL, MTX_DEF);
+ knlist_init_mtx(&sc->sc_rsel.si_note, &sc->sc_mtx);
+
+ make_dev_args_init(&mda);
+ mda.mda_flags = MAKEDEV_WAITOK;
+ mda.mda_devsw = &u2f_cdevsw;
+ mda.mda_uid = UID_ROOT;
+ mda.mda_gid = GID_U2F;
+ mda.mda_mode = 0660;
+ mda.mda_si_drv1 = sc;
+
+ error = make_dev_s(&mda, &sc->dev, "u2f/%d", device_get_unit(dev));
+ if (error) {
+ device_printf(dev, "Can not create character device\n");
+ u2f_detach(dev);
+ return (error);
+ }
+#ifdef U2F_MAKE_UHID_ALIAS
+ (void)make_dev_alias(sc->dev, "uhid%d", device_get_unit(dev));
+#endif
+
+ hid_add_dynamic_quirk(hw, HQ_NO_READAHEAD);
+
+ hidbus_set_lock(dev, &sc->sc_mtx);
+ hidbus_set_intr(dev, u2f_intr, sc);
+
+ return (0);
+}
+
+static int
+u2f_detach(device_t dev)
+{
+ struct u2f_softc *sc = device_get_softc(dev);
+
+ DPRINTF("sc=%p\n", sc);
+
+ if (sc->dev != NULL) {
+ mtx_lock(&sc->sc_mtx);
+ sc->dev->si_drv1 = NULL;
+ /* Wake everyone */
+ u2f_notify(sc);
+ mtx_unlock(&sc->sc_mtx);
+ destroy_dev(sc->dev);
+ }
+
+ hid_intr_stop(sc->sc_dev);
+
+ knlist_clear(&sc->sc_rsel.si_note, 0);
+ knlist_destroy(&sc->sc_rsel.si_note);
+ seldrain(&sc->sc_rsel);
+ mtx_destroy(&sc->sc_mtx);
+
+ return (0);
+}
+
+void
+u2f_intr(void *context, void *buf, hid_size_t len)
+{
+ struct u2f_softc *sc = context;
+
+ mtx_assert(&sc->sc_mtx, MA_OWNED);
+
+ DPRINTFN(5, "len=%d\n", len);
+ DPRINTFN(5, "data = %*D\n", len, buf, " ");
+
+ if (sc->sc_state.data)
+ return;
+
+ if (len > sc->sc_isize)
+ len = sc->sc_isize;
+
+ bcopy(buf, sc->sc_buf, len);
+
+ /* Make sure we don't process old data */
+ if (len < sc->sc_isize)
+ bzero(sc->sc_buf + len, sc->sc_isize - len);
+
+ sc->sc_state.data = true;
+
+ u2f_notify(sc);
+}
+
+static int
+u2f_open(struct cdev *dev, int flag, int mode, struct thread *td)
+{
+ struct u2f_softc *sc = dev->si_drv1;
+ int error;
+
+ if (sc == NULL)
+ return (ENXIO);
+
+ DPRINTF("sc=%p\n", sc);
+
+ mtx_lock(&sc->sc_mtx);
+ if (sc->sc_state.open) {
+ mtx_unlock(&sc->sc_mtx);
+ return (EBUSY);
+ }
+ sc->sc_state.open = true;
+ mtx_unlock(&sc->sc_mtx);
+
+ error = devfs_set_cdevpriv(sc, u2f_dtor);
+ if (error != 0) {
+ mtx_lock(&sc->sc_mtx);
+ sc->sc_state.open = false;
+ mtx_unlock(&sc->sc_mtx);
+ return (error);
+ }
+
+ /* Set up interrupt pipe. */
+ sc->sc_state.data = false;
+ sc->sc_fflags = flag;
+
+ return (0);
+}
+
+
+static void
+u2f_dtor(void *data)
+{
+ struct u2f_softc *sc = data;
+
+#ifdef NOT_YET
+ /* Disable interrupts. */
+ hid_intr_stop(sc->sc_dev);
+#endif
+
+ mtx_lock(&sc->sc_mtx);
+ sc->sc_state.open = false;
+ mtx_unlock(&sc->sc_mtx);
+}
+
+static int
+u2f_read(struct cdev *dev, struct uio *uio, int flag)
+{
+ uint8_t buf[U2F_MAX_REPORT_SIZE];
+ struct u2f_softc *sc = dev->si_drv1;
+ size_t length = 0;
+ int error;
+
+ DPRINTFN(1, "\n");
+
+ if (sc == NULL)
+ return (EIO);
+
+ if (!sc->sc_state.data)
+ hid_intr_start(sc->sc_dev);
+
+ mtx_lock(&sc->sc_mtx);
+ if (dev->si_drv1 == NULL) {
+ error = EIO;
+ goto exit;
+ }
+
+ while (!sc->sc_state.data) {
+ if (flag & O_NONBLOCK) {
+ error = EWOULDBLOCK;
+ goto exit;
+ }
+ sc->sc_state.aslp = true;
+ DPRINTFN(5, "sleep on %p\n", &sc->sc_buf);
+ error = mtx_sleep(&sc->sc_buf, &sc->sc_mtx, PZERO | PCATCH,
+ "u2frd", 0);
+ DPRINTFN(5, "woke, error=%d\n", error);
+ if (dev->si_drv1 == NULL)
+ error = EIO;
+ if (error) {
+ sc->sc_state.aslp = false;
+ goto exit;
+ }
+ }
+
+ if (sc->sc_state.data && uio->uio_resid > 0) {
+ length = min(uio->uio_resid, sc->sc_isize);
+ memcpy(buf, sc->sc_buf, length);
+ sc->sc_state.data = false;
+ }
+exit:
+ mtx_unlock(&sc->sc_mtx);
+ if (length != 0) {
+ /* Copy the data to the user process. */
+ DPRINTFN(5, "got %lu chars\n", (u_long)length);
+ error = uiomove(buf, length, uio);
+ }
+
+ return (error);
+}
+
+static int
+u2f_write(struct cdev *dev, struct uio *uio, int flag)
+{
+ uint8_t buf[U2F_MAX_REPORT_SIZE];
+ struct u2f_softc *sc = dev->si_drv1;
+ int error;
+
+ DPRINTFN(1, "\n");
+
+ if (sc == NULL)
+ return (EIO);
+
+ if (uio->uio_resid != sc->sc_osize)
+ return (EINVAL);
+ error = uiomove(buf, uio->uio_resid, uio);
+ if (error == 0)
+ error = hid_write(sc->sc_dev, buf, sc->sc_osize);
+
+ return (error);
+}
+
+#ifdef COMPAT_FREEBSD32
+static void
+update_ugd32(const struct usb_gen_descriptor *ugd,
+ struct usb_gen_descriptor32 *ugd32)
+{
+ /* Don't update hgd_data pointer */
+ CP(*ugd, *ugd32, ugd_lang_id);
+ CP(*ugd, *ugd32, ugd_maxlen);
+ CP(*ugd, *ugd32, ugd_actlen);
+ CP(*ugd, *ugd32, ugd_offset);
+ CP(*ugd, *ugd32, ugd_config_index);
+ CP(*ugd, *ugd32, ugd_string_index);
+ CP(*ugd, *ugd32, ugd_iface_index);
+ CP(*ugd, *ugd32, ugd_altif_index);
+ CP(*ugd, *ugd32, ugd_endpt_index);
+ CP(*ugd, *ugd32, ugd_report_type);
+ /* Don't update reserved */
+}
+#endif
+
+static int
+u2f_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
+ struct thread *td)
+{
+#ifdef COMPAT_FREEBSD32
+ struct usb_gen_descriptor local_ugd;
+ struct usb_gen_descriptor32 *ugd32 = NULL;
+#endif
+ struct u2f_softc *sc = dev->si_drv1;
+ struct usb_gen_descriptor *ugd = (struct usb_gen_descriptor *)addr;
+ uint32_t size;
+
+ DPRINTFN(2, "cmd=%lx\n", cmd);
+
+ if (sc == NULL)
+ return (EIO);
+
+#ifdef COMPAT_FREEBSD32
+ switch (cmd) {
+ case USB_GET_REPORT_DESC32:
+ cmd = _IOC_NEWTYPE(cmd, struct usb_gen_descriptor);
+ ugd32 = (struct usb_gen_descriptor32 *)addr;
+ ugd = &local_ugd;
+ PTRIN_CP(*ugd32, *ugd, ugd_data);
+ CP(*ugd32, *ugd, ugd_lang_id);
+ CP(*ugd32, *ugd, ugd_maxlen);
+ CP(*ugd32, *ugd, ugd_actlen);
+ CP(*ugd32, *ugd, ugd_offset);
+ CP(*ugd32, *ugd, ugd_config_index);
+ CP(*ugd32, *ugd, ugd_string_index);
+ CP(*ugd32, *ugd, ugd_iface_index);
+ CP(*ugd32, *ugd, ugd_altif_index);
+ CP(*ugd32, *ugd, ugd_endpt_index);
+ CP(*ugd32, *ugd, ugd_report_type);
+ /* Don't copy reserved */
+ break;
+ }
+#endif
+
+ /* fixed-length ioctls handling */
+ switch (cmd) {
+ case FIONBIO:
+ /* All handled in the upper FS layer. */
+ return (0);
+
+ case USB_GET_REPORT_DESC:
+ size = MIN(sc->sc_rdesc_size, ugd->ugd_maxlen);
+ ugd->ugd_actlen = size;
+#ifdef COMPAT_FREEBSD32
+ if (ugd32 != NULL)
+ update_ugd32(ugd, ugd32);
+#endif
+ if (ugd->ugd_data == NULL)
+ return (0); /* descriptor length only */
+
+ return (copyout(sc->sc_rdesc, ugd->ugd_data, size));
+
+ case USB_GET_DEVICEINFO:
+ return(hid_ioctl(
+ sc->sc_dev, USB_GET_DEVICEINFO, (uintptr_t)addr));
+ }
+
+ return (EINVAL);
+}
+
+static int
+u2f_poll(struct cdev *dev, int events, struct thread *td)
+{
+ struct u2f_softc *sc = dev->si_drv1;
+ int revents = 0;
+ bool start_intr = false;
+
+ if (sc == NULL)
+ return (POLLHUP);
+
+ if (events & (POLLOUT | POLLWRNORM) && (sc->sc_fflags & FWRITE))
+ revents |= events & (POLLOUT | POLLWRNORM);
+ if (events & (POLLIN | POLLRDNORM) && (sc->sc_fflags & FREAD)) {
+ mtx_lock(&sc->sc_mtx);
+ if (sc->sc_state.data)
+ revents |= events & (POLLIN | POLLRDNORM);
+ else {
+ sc->sc_state.sel = true;
+ start_intr = true;
+ selrecord(td, &sc->sc_rsel);
+ }
+ mtx_unlock(&sc->sc_mtx);
+ if (start_intr)
+ hid_intr_start(sc->sc_dev);
+ }
+
+ return (revents);
+}
+
+static int
+u2f_kqfilter(struct cdev *dev, struct knote *kn)
+{
+ struct u2f_softc *sc = dev->si_drv1;
+
+ if (sc == NULL)
+ return (ENXIO);
+
+ switch(kn->kn_filter) {
+ case EVFILT_READ:
+ if (sc->sc_fflags & FREAD) {
+ kn->kn_fop = &u2f_filterops_read;
+ break;
+ }
+ /* FALLTHROUGH */
+ default:
+ return(EINVAL);
+ }
+ kn->kn_hook = sc;
+
+ knlist_add(&sc->sc_rsel.si_note, kn, 0);
+ return (0);
+}
+
+static int
+u2f_kqread(struct knote *kn, long hint)
+{
+ struct u2f_softc *sc = kn->kn_hook;
+ int ret;
+
+ mtx_assert(&sc->sc_mtx, MA_OWNED);
+
+ if (sc->dev->si_drv1 == NULL) {
+ kn->kn_flags |= EV_EOF;
+ ret = 1;
+ } else {
+ ret = sc->sc_state.data ? 1 : 0;
+ if (!sc->sc_state.data)
+ hid_intr_start(sc->sc_dev);
+ }
+
+ return (ret);
+}
+
+static void
+u2f_kqdetach(struct knote *kn)
+{
+ struct u2f_softc *sc = kn->kn_hook;
+
+ knlist_remove(&sc->sc_rsel.si_note, kn, 0);
+}
+
+static void
+u2f_notify(struct u2f_softc *sc)
+{
+ mtx_assert(&sc->sc_mtx, MA_OWNED);
+
+ if (sc->sc_state.aslp) {
+ sc->sc_state.aslp = false;
+ DPRINTFN(5, "waking %p\n", &sc->sc_buf);
+ wakeup(&sc->sc_buf);
+ }
+ if (sc->sc_state.sel) {
+ sc->sc_state.sel = false;
+ selwakeuppri(&sc->sc_rsel, PZERO);
+ }
+ KNOTE_LOCKED(&sc->sc_rsel.si_note, 0);
+}
+
+static device_method_t u2f_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, u2f_probe),
+ DEVMETHOD(device_attach, u2f_attach),
+ DEVMETHOD(device_detach, u2f_detach),
+
+ DEVMETHOD_END
+};
+
+static driver_t u2f_driver = {
+#ifdef U2F_MAKE_UHID_ALIAS
+ "uhid",
+#else
+ "u2f",
+#endif
+ u2f_methods,
+ sizeof(struct u2f_softc)
+};
+
+DRIVER_MODULE(u2f, hidbus, u2f_driver, NULL, NULL);
+MODULE_DEPEND(u2f, hidbus, 1, 1, 1);
+MODULE_DEPEND(u2f, hid, 1, 1, 1);
+MODULE_VERSION(u2f, 1);
+HID_PNP_INFO(u2f_devs);
diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h
index c480900596f4..a623f810c101 100644
--- a/sys/dev/ice/ice_bitops.h
+++ b/sys/dev/ice/ice_bitops.h
@@ -198,7 +198,7 @@ static inline void ice_zero_bitmap(ice_bitmap_t *bmp, u16 size)
* ice_and_bitmap - bitwise AND 2 bitmaps and store result in dst bitmap
* @dst: Destination bitmap that receive the result of the operation
* @bmp1: The first bitmap to intersect
- * @bmp2: The second bitmap to intersect wit the first
+ * @bmp2: The second bitmap to intersect with the first
* @size: Size of the bitmaps in bits
*
* This function performs a bitwise AND on two "source" bitmaps of the same size
@@ -237,7 +237,7 @@ ice_and_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1,
* ice_or_bitmap - bitwise OR 2 bitmaps and store result in dst bitmap
* @dst: Destination bitmap that receive the result of the operation
* @bmp1: The first bitmap to intersect
- * @bmp2: The second bitmap to intersect wit the first
+ * @bmp2: The second bitmap to intersect with the first
* @size: Size of the bitmaps in bits
*
* This function performs a bitwise OR on two "source" bitmaps of the same size
diff --git a/sys/dev/ice/ice_lan_tx_rx.h b/sys/dev/ice/ice_lan_tx_rx.h
index 693e0ca5efc6..eedacdab0216 100644
--- a/sys/dev/ice/ice_lan_tx_rx.h
+++ b/sys/dev/ice/ice_lan_tx_rx.h
@@ -630,7 +630,7 @@ enum ice_rxdid {
ICE_RXDID_LAST = 63,
};
-/* Recceive Flex descriptor Dword Index */
+/* Receive Flex descriptor Dword Index */
enum ice_flex_word {
ICE_RX_FLEX_DWORD_0 = 0,
ICE_RX_FLEX_DWORD_1,
diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h
index 308b2bda2790..640bdf8fed7b 100644
--- a/sys/dev/ice/ice_lib.h
+++ b/sys/dev/ice/ice_lib.h
@@ -313,7 +313,7 @@ enum ice_dyn_idx_t {
ICE_ITR_NONE = 3 /* ITR_NONE must not be used as an index */
};
-/* By convenction ITR0 is used for RX, and ITR1 is used for TX */
+/* By convention ITR0 is used for RX, and ITR1 is used for TX */
#define ICE_RX_ITR ICE_IDX_ITR0
#define ICE_TX_ITR ICE_IDX_ITR1
diff --git a/sys/dev/ice/ice_protocol_type.h b/sys/dev/ice/ice_protocol_type.h
index 300d61bfb5d9..b90c25e6c427 100644
--- a/sys/dev/ice/ice_protocol_type.h
+++ b/sys/dev/ice/ice_protocol_type.h
@@ -143,7 +143,7 @@ enum ice_prot_id {
ICE_PROT_LLDP_OF = 117,
ICE_PROT_ARP_OF = 118,
ICE_PROT_EAPOL_OF = 120,
- ICE_PROT_META_ID = 255, /* when offset == metaddata */
+ ICE_PROT_META_ID = 255, /* when offset == metadata */
ICE_PROT_INVALID = 255 /* when offset == ICE_FV_OFFSET_INVAL */
};
diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
index 3f1d7a0cefba..fdb4816b8bd9 100644
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -861,7 +861,8 @@ iichid_intr_start(device_t dev, device_t child __unused)
sc = device_get_softc(dev);
DPRINTF(sc, "iichid device open\n");
- iichid_set_power_state(sc, IICHID_PS_ON, IICHID_PS_NULL);
+ if (!sc->open)
+ iichid_set_power_state(sc, IICHID_PS_ON, IICHID_PS_NULL);
return (0);
}
diff --git a/sys/dev/isci/scil/intel_sata.h b/sys/dev/isci/scil/intel_sata.h
index 4cf4adf03e07..fdad5be9b083 100644
--- a/sys/dev/isci/scil/intel_sata.h
+++ b/sys/dev/isci/scil/intel_sata.h
@@ -61,7 +61,7 @@
*
* @brief This file defines all of the SATA releated constants, enumerations,
* and types. Please note that this file does not necessarily contain
- * an exhaustive list of all contants and commands.
+ * an exhaustive list of all constants and commands.
*/
/**
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 959afa79e7da..73c0fd1ab16f 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -45,7 +45,7 @@
/************************************************************************
* Driver version
************************************************************************/
-static const char ixgbe_driver_version[] = "4.0.1-k";
+static const char ixgbe_driver_version[] = "5.0.1-k";
/************************************************************************
* PCI Device ID Table
@@ -144,6 +144,16 @@ static const pci_vendor_info_t ixgbe_vendor_info_array[] =
"Intel(R) X540-T2 (Bypass)"),
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS,
"Intel(R) X520 82599 (Bypass)"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_BACKPLANE,
+ "Intel(R) E610 (Backplane)"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_SFP,
+ "Intel(R) E610 (SFP)"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_2_5G_T,
+ "Intel(R) E610 (2.5 GbE)"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_10G_T,
+ "Intel(R) E610 (10 GbE)"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_SGMII,
+ "Intel(R) E610 (SGMII)"),
/* required last entry */
PVID_END
};
@@ -253,6 +263,10 @@ static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS);
static void ixgbe_handle_msf(void *);
static void ixgbe_handle_mod(void *);
static void ixgbe_handle_phy(void *);
+static void ixgbe_handle_fw_event(void *);
+
+static int ixgbe_enable_lse(struct ixgbe_softc *sc);
+static int ixgbe_disable_lse(struct ixgbe_softc *sc);
/************************************************************************
* FreeBSD Device Interface Entry Points
@@ -621,6 +635,7 @@ ixgbe_initialize_rss_mapping(struct ixgbe_softc *sc)
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
+ case ixgbe_mac_E610:
table_size = 512;
break;
default:
@@ -902,6 +917,32 @@ ixgbe_initialize_transmit_units(if_ctx_t ctx)
} /* ixgbe_initialize_transmit_units */
+static int
+ixgbe_check_fw_api_version(struct ixgbe_softc *sc)
+{
+ struct ixgbe_hw *hw = &sc->hw;
+ if (hw->api_maj_ver > IXGBE_FW_API_VER_MAJOR) {
+ device_printf(sc->dev,
+ "The driver for the device stopped because the NVM "
+ "image is newer than expected. You must install the "
+ "most recent version of the network driver.\n");
+ return (EOPNOTSUPP);
+ } else if (hw->api_maj_ver == IXGBE_FW_API_VER_MAJOR &&
+ hw->api_min_ver > (IXGBE_FW_API_VER_MINOR + 2)) {
+ device_printf(sc->dev,
+ "The driver for the device detected a newer version of "
+ "the NVM image than expected. Please install the most "
+ "recent version of the network driver.\n");
+ } else if (hw->api_maj_ver < IXGBE_FW_API_VER_MAJOR ||
+ hw->api_min_ver < IXGBE_FW_API_VER_MINOR - 2) {
+ device_printf(sc->dev,
+ "The driver for the device detected an older version "
+ "of the NVM image than expected. "
+ "Please update the NVM image.\n");
+ }
+ return (0);
+}
+
/************************************************************************
* ixgbe_register
************************************************************************/
@@ -970,6 +1011,9 @@ ixgbe_if_attach_pre(if_ctx_t ctx)
goto err_pci;
}
+ if (hw->mac.type == ixgbe_mac_E610)
+ ixgbe_init_aci(hw);
+
if (hw->mac.ops.fw_recovery_mode &&
hw->mac.ops.fw_recovery_mode(hw)) {
device_printf(dev,
@@ -1058,6 +1102,12 @@ ixgbe_if_attach_pre(if_ctx_t ctx)
break;
}
+ /* Check the FW API version */
+ if (hw->mac.type == ixgbe_mac_E610 && ixgbe_check_fw_api_version(sc)) {
+ error = EIO;
+ goto err_pci;
+ }
+
/* Most of the iflib initialization... */
iflib_set_mac(ctx, hw->mac.addr);
@@ -1111,6 +1161,9 @@ err_pci:
IXGBE_WRITE_REG(&sc->hw, IXGBE_CTRL_EXT, ctrl_ext);
ixgbe_free_pci_resources(ctx);
+ if (hw->mac.type == ixgbe_mac_E610)
+ ixgbe_shutdown_aci(hw);
+
return (error);
} /* ixgbe_if_attach_pre */
@@ -1358,6 +1411,10 @@ ixgbe_add_media_types(if_ctx_t ctx)
/* Media types with matching FreeBSD media defines */
if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T)
ifmedia_add(sc->media, IFM_ETHER | IFM_10G_T, 0, NULL);
+ if (layer & IXGBE_PHYSICAL_LAYER_5000BASE_T)
+ ifmedia_add(sc->media, IFM_ETHER | IFM_5000_T, 0, NULL);
+ if (layer & IXGBE_PHYSICAL_LAYER_2500BASE_T)
+ ifmedia_add(sc->media, IFM_ETHER | IFM_2500_T, 0, NULL);
if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_T)
ifmedia_add(sc->media, IFM_ETHER | IFM_1000_T, 0, NULL);
if (layer & IXGBE_PHYSICAL_LAYER_100BASE_TX)
@@ -1459,6 +1516,7 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
}
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
+ case ixgbe_mac_E610:
if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber)
return (true);
return (false);
@@ -1525,6 +1583,15 @@ ixgbe_config_link(if_ctx_t ctx)
IXGBE_LINK_SPEED_5GB_FULL);
}
+ if (hw->mac.type == ixgbe_mac_E610) {
+ hw->phy.ops.init(hw);
+ err = ixgbe_enable_lse(sc);
+ if (err)
+ device_printf(sc->dev,
+ "Failed to enable Link Status Event, "
+ "error: %d", err);
+ }
+
if (hw->mac.ops.setup_link)
err = hw->mac.ops.setup_link(hw, autoneg,
sc->link_up);
@@ -2158,14 +2225,15 @@ get_parent_info:
ixgbe_set_pci_config_data_generic(hw, link);
display:
- device_printf(dev, "PCI Express Bus: Speed %s %s\n",
- ((hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s" :
+ device_printf(dev, "PCI Express Bus: Speed %s Width %s\n",
+ ((hw->bus.speed == ixgbe_bus_speed_16000) ? "16.0GT/s" :
+ (hw->bus.speed == ixgbe_bus_speed_8000) ? "8.0GT/s" :
(hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0GT/s" :
(hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5GT/s" :
"Unknown"),
- ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" :
- (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" :
- (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" :
+ ((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "x8" :
+ (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "x4" :
+ (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "x1" :
"Unknown"));
if (bus_info_valid) {
@@ -2372,14 +2440,17 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr)
ifmr->ifm_status |= IFM_ACTIVE;
layer = sc->phy_layer;
- if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_T ||
- layer & IXGBE_PHYSICAL_LAYER_1000BASE_T ||
- layer & IXGBE_PHYSICAL_LAYER_100BASE_TX ||
- layer & IXGBE_PHYSICAL_LAYER_10BASE_T)
+ if (layer & IXGBE_PHYSICAL_LAYERS_BASE_T_ALL)
switch (sc->link_speed) {
case IXGBE_LINK_SPEED_10GB_FULL:
ifmr->ifm_active |= IFM_10G_T | IFM_FDX;
break;
+ case IXGBE_LINK_SPEED_5GB_FULL:
+ ifmr->ifm_active |= IFM_5000_T | IFM_FDX;
+ break;
+ case IXGBE_LINK_SPEED_2_5GB_FULL:
+ ifmr->ifm_active |= IFM_2500_T | IFM_FDX;
+ break;
case IXGBE_LINK_SPEED_1GB_FULL:
ifmr->ifm_active |= IFM_1000_T | IFM_FDX;
break;
@@ -2390,15 +2461,6 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr)
ifmr->ifm_active |= IFM_10_T | IFM_FDX;
break;
}
- if (hw->mac.type == ixgbe_mac_X550)
- switch (sc->link_speed) {
- case IXGBE_LINK_SPEED_5GB_FULL:
- ifmr->ifm_active |= IFM_5000_T | IFM_FDX;
- break;
- case IXGBE_LINK_SPEED_2_5GB_FULL:
- ifmr->ifm_active |= IFM_2500_T | IFM_FDX;
- break;
- }
if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU ||
layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA)
switch (sc->link_speed) {
@@ -2676,6 +2738,11 @@ ixgbe_msix_link(void *arg)
sc->task_requests |= IXGBE_REQUEST_TASK_LSC;
}
+ if (eicr & IXGBE_EICR_FW_EVENT) {
+ IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FW_EVENT);
+ sc->task_requests |= IXGBE_REQUEST_TASK_FWEVENT;
+ }
+
if (sc->hw.mac.type != ixgbe_mac_82598EB) {
if ((sc->feat_en & IXGBE_FEATURE_FDIR) &&
(eicr & IXGBE_EICR_FLOW_DIR)) {
@@ -2734,11 +2801,16 @@ ixgbe_msix_link(void *arg)
/* Check for VF message */
if ((sc->feat_en & IXGBE_FEATURE_SRIOV) &&
- (eicr & IXGBE_EICR_MAILBOX))
+ (eicr & IXGBE_EICR_MAILBOX)) {
sc->task_requests |= IXGBE_REQUEST_TASK_MBX;
+ }
}
- if (ixgbe_is_sfp(hw)) {
+ /*
+ * On E610, the firmware handles PHY configuration, so
+ * there is no need to perform any SFP-specific tasks.
+ */
+ if (hw->mac.type != ixgbe_mac_E610 && ixgbe_is_sfp(hw)) {
/* Pluggable optics-related interrupt */
if (hw->mac.type >= ixgbe_mac_X540)
eicr_mask = IXGBE_EICR_GPI_SDP0_X540;
@@ -2985,7 +3057,13 @@ ixgbe_if_detach(if_ctx_t ctx)
callout_drain(&sc->fw_mode_timer);
+ if (sc->hw.mac.type == ixgbe_mac_E610) {
+ ixgbe_disable_lse(sc);
+ ixgbe_shutdown_aci(&sc->hw);
+ }
+
ixgbe_free_pci_resources(ctx);
+
free(sc->mta, M_IXGBE);
return (0);
@@ -3404,6 +3482,7 @@ ixgbe_set_ivar(struct ixgbe_softc *sc, u8 entry, u8 vector, s8 type)
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
+ case ixgbe_mac_E610:
if (type == -1) { /* MISC IVAR */
index = (entry & 1) * 8;
ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC);
@@ -3826,6 +3905,96 @@ ixgbe_handle_phy(void *context)
} /* ixgbe_handle_phy */
/************************************************************************
+ * ixgbe_enable_lse - enable link status events
+ *
+ * Sets mask and enables link status events
+ ************************************************************************/
+s32 ixgbe_enable_lse(struct ixgbe_softc *sc)
+{
+ s32 error;
+
+ u16 mask = ~((u16)(IXGBE_ACI_LINK_EVENT_UPDOWN |
+ IXGBE_ACI_LINK_EVENT_MEDIA_NA |
+ IXGBE_ACI_LINK_EVENT_MODULE_QUAL_FAIL |
+ IXGBE_ACI_LINK_EVENT_PHY_FW_LOAD_FAIL));
+
+ error = ixgbe_configure_lse(&sc->hw, TRUE, mask);
+ if (error)
+ return (error);
+
+ sc->lse_mask = mask;
+ return (IXGBE_SUCCESS);
+} /* ixgbe_enable_lse */
+
+/************************************************************************
+ * ixgbe_disable_lse - disable link status events
+ ************************************************************************/
+s32 ixgbe_disable_lse(struct ixgbe_softc *sc)
+{
+ s32 error;
+
+ error = ixgbe_configure_lse(&sc->hw, false, sc->lse_mask);
+ if (error)
+ return (error);
+
+ sc->lse_mask = 0;
+ return (IXGBE_SUCCESS);
+} /* ixgbe_disable_lse */
+
+/************************************************************************
+ * ixgbe_handle_fw_event - Tasklet for MSI-X Link Status Event interrupts
+ ************************************************************************/
+static void
+ixgbe_handle_fw_event(void *context)
+{
+ if_ctx_t ctx = context;
+ struct ixgbe_softc *sc = iflib_get_softc(ctx);
+ struct ixgbe_hw *hw = &sc->hw;
+ struct ixgbe_aci_event event;
+ bool pending = false;
+ s32 error;
+
+ event.buf_len = IXGBE_ACI_MAX_BUFFER_SIZE;
+ event.msg_buf = malloc(event.buf_len, M_IXGBE, M_ZERO | M_NOWAIT);
+ if (!event.msg_buf) {
+ device_printf(sc->dev, "Can not allocate buffer for "
+ "event message\n");
+ return;
+ }
+
+ do {
+ error = ixgbe_aci_get_event(hw, &event, &pending);
+ if (error) {
+ device_printf(sc->dev, "Error getting event from "
+ "FW:%d\n", error);
+ break;
+ }
+
+ switch (le16toh(event.desc.opcode)) {
+ case ixgbe_aci_opc_get_link_status:
+ sc->task_requests |= IXGBE_REQUEST_TASK_LSC;
+ break;
+
+ case ixgbe_aci_opc_temp_tca_event:
+ if (hw->adapter_stopped == FALSE)
+ ixgbe_if_stop(ctx);
+ device_printf(sc->dev,
+ "CRITICAL: OVER TEMP!! PHY IS SHUT DOWN!!\n");
+ device_printf(sc->dev, "System shutdown required!\n");
+ break;
+
+ default:
+ device_printf(sc->dev,
+ "Unknown FW event captured, opcode=0x%04X\n",
+ le16toh(event.desc.opcode));
+ break;
+ }
+ } while (pending);
+
+ free(event.msg_buf, M_IXGBE);
+} /* ixgbe_handle_fw_event */
+
+/************************************************************************
* ixgbe_if_stop - Stop the hardware
*
* Disables all traffic on the adapter by issuing a
@@ -3899,6 +4068,8 @@ ixgbe_if_update_admin_status(if_ctx_t ctx)
}
/* Handle task requests from msix_link() */
+ if (sc->task_requests & IXGBE_REQUEST_TASK_FWEVENT)
+ ixgbe_handle_fw_event(ctx);
if (sc->task_requests & IXGBE_REQUEST_TASK_MOD)
ixgbe_handle_mod(ctx);
if (sc->task_requests & IXGBE_REQUEST_TASK_MSF)
@@ -3986,6 +4157,9 @@ ixgbe_if_enable_intr(if_ctx_t ctx)
mask |= IXGBE_EICR_GPI_SDP0_X540;
mask |= IXGBE_EIMS_ECC;
break;
+ case ixgbe_mac_E610:
+ mask |= IXGBE_EIMS_FW_EVENT;
+ break;
default:
break;
}
@@ -4008,6 +4182,7 @@ ixgbe_if_enable_intr(if_ctx_t ctx)
/* Don't autoclear Link */
mask &= ~IXGBE_EIMS_OTHER;
mask &= ~IXGBE_EIMS_LSC;
+ mask &= ~IXGBE_EIMS_FW_EVENT;
if (sc->feat_cap & IXGBE_FEATURE_SRIOV)
mask &= ~IXGBE_EIMS_MAILBOX;
IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask);
@@ -4026,7 +4201,7 @@ ixgbe_if_enable_intr(if_ctx_t ctx)
} /* ixgbe_if_enable_intr */
/************************************************************************
- * ixgbe_disable_intr
+ * ixgbe_if_disable_intr
************************************************************************/
static void
ixgbe_if_disable_intr(if_ctx_t ctx)
@@ -4176,8 +4351,9 @@ ixgbe_intr(void *arg)
/* External PHY interrupt */
if ((hw->phy.type == ixgbe_phy_x550em_ext_t) &&
- (eicr & IXGBE_EICR_GPI_SDP0_X540))
+ (eicr & IXGBE_EICR_GPI_SDP0_X540)) {
sc->task_requests |= IXGBE_REQUEST_TASK_PHY;
+ }
return (FILTER_SCHEDULE_THREAD);
} /* ixgbe_intr */
@@ -4219,7 +4395,7 @@ ixgbe_sysctl_flowcntl(SYSCTL_HANDLER_ARGS)
int error, fc;
sc = (struct ixgbe_softc *)arg1;
- fc = sc->hw.fc.current_mode;
+ fc = sc->hw.fc.requested_mode;
error = sysctl_handle_int(oidp, &fc, 0, req);
if ((error) || (req->newptr == NULL))
@@ -4248,12 +4424,10 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc)
case ixgbe_fc_rx_pause:
case ixgbe_fc_tx_pause:
case ixgbe_fc_full:
- sc->hw.fc.requested_mode = fc;
if (sc->num_rx_queues > 1)
ixgbe_disable_rx_drop(sc);
break;
case ixgbe_fc_none:
- sc->hw.fc.requested_mode = ixgbe_fc_none;
if (sc->num_rx_queues > 1)
ixgbe_enable_rx_drop(sc);
break;
@@ -4261,6 +4435,8 @@ ixgbe_set_flowcntl(struct ixgbe_softc *sc, int fc)
return (EINVAL);
}
+ sc->hw.fc.requested_mode = fc;
+
/* Don't autoneg if forcing a value */
sc->hw.fc.disable_fc_autoneg = true;
ixgbe_fc_enable(&sc->hw);
@@ -4978,6 +5154,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc)
if (sc->hw.device_id == IXGBE_DEV_ID_82599_QSFP_SF_QP)
sc->feat_cap &= ~IXGBE_FEATURE_LEGACY_IRQ;
break;
+ case ixgbe_mac_E610:
+ sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE;
+ break;
default:
break;
}
diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c
index 54b2c8c1dd68..8a1c1aae041d 100644
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -68,6 +68,8 @@ static const pci_vendor_info_t ixv_vendor_info_array[] =
"Intel(R) X552 Virtual Function"),
PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF,
"Intel(R) X553 Virtual Function"),
+ PVID(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_E610_VF,
+ "Intel(R) E610 Virtual Function"),
/* required last entry */
PVID_END
};
@@ -1020,6 +1022,9 @@ ixv_identify_hardware(if_ctx_t ctx)
case IXGBE_DEV_ID_X550EM_A_VF:
hw->mac.type = ixgbe_mac_X550EM_a_vf;
break;
+ case IXGBE_DEV_ID_E610_VF:
+ hw->mac.type = ixgbe_mac_E610_vf;
+ break;
default:
device_printf(dev, "unknown mac type\n");
hw->mac.type = ixgbe_mac_unknown;
@@ -1955,6 +1960,7 @@ ixv_init_device_features(struct ixgbe_softc *sc)
case ixgbe_mac_X550_vf:
case ixgbe_mac_X550EM_x_vf:
case ixgbe_mac_X550EM_a_vf:
+ case ixgbe_mac_E610_vf:
sc->feat_cap |= IXGBE_FEATURE_NEEDS_CTXD;
sc->feat_cap |= IXGBE_FEATURE_RSS;
break;
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
index 341d4ebfcebc..844064bf8543 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -86,6 +86,7 @@
#include "ixgbe_phy.h"
#include "ixgbe_vf.h"
#include "ixgbe_features.h"
+#include "ixgbe_e610.h"
/* Tunables */
@@ -195,6 +196,15 @@
CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \
CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP)
+/* All BASE-T Physical layers */
+#define IXGBE_PHYSICAL_LAYERS_BASE_T_ALL \
+ (IXGBE_PHYSICAL_LAYER_10GBASE_T |\
+ IXGBE_PHYSICAL_LAYER_5000BASE_T |\
+ IXGBE_PHYSICAL_LAYER_2500BASE_T |\
+ IXGBE_PHYSICAL_LAYER_1000BASE_T |\
+ IXGBE_PHYSICAL_LAYER_100BASE_TX |\
+ IXGBE_PHYSICAL_LAYER_10BASE_T)
+
#define IXGBE_CAPS (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_TSO | \
IFCAP_LRO | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | \
IFCAP_VLAN_HWCSUM | IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU | \
@@ -464,6 +474,7 @@ struct ixgbe_softc {
/* Feature capable/enabled flags. See ixgbe_features.h */
u32 feat_cap;
u32 feat_en;
+ u16 lse_mask;
};
/* Precision Time Sync (IEEE 1588) defines */
diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c
index 4c50f10ed92e..f11f52a646e4 100644
--- a/sys/dev/ixgbe/ixgbe_api.c
+++ b/sys/dev/ixgbe/ixgbe_api.c
@@ -112,11 +112,15 @@ s32 ixgbe_init_shared_code(struct ixgbe_hw *hw)
case ixgbe_mac_X550EM_a:
status = ixgbe_init_ops_X550EM_a(hw);
break;
+ case ixgbe_mac_E610:
+ status = ixgbe_init_ops_E610(hw);
+ break;
case ixgbe_mac_82599_vf:
case ixgbe_mac_X540_vf:
case ixgbe_mac_X550_vf:
case ixgbe_mac_X550EM_x_vf:
case ixgbe_mac_X550EM_a_vf:
+ case ixgbe_mac_E610_vf:
status = ixgbe_init_ops_vf(hw);
break;
default:
@@ -240,6 +244,18 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
hw->mac.type = ixgbe_mac_X550EM_a_vf;
hw->mvals = ixgbe_mvals_X550EM_a;
break;
+ case IXGBE_DEV_ID_E610_BACKPLANE:
+ case IXGBE_DEV_ID_E610_SFP:
+ case IXGBE_DEV_ID_E610_10G_T:
+ case IXGBE_DEV_ID_E610_2_5G_T:
+ case IXGBE_DEV_ID_E610_SGMII:
+ hw->mac.type = ixgbe_mac_E610;
+ hw->mvals = ixgbe_mvals_X550EM_a;
+ break;
+ case IXGBE_DEV_ID_E610_VF:
+ hw->mac.type = ixgbe_mac_E610_vf;
+ hw->mvals = ixgbe_mvals_X550EM_a;
+ break;
default:
ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
ERROR_REPORT2(IXGBE_ERROR_UNSUPPORTED,
diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h
index b81510dacb95..2b4cec8d110e 100644
--- a/sys/dev/ixgbe/ixgbe_api.h
+++ b/sys/dev/ixgbe/ixgbe_api.h
@@ -48,6 +48,7 @@ extern s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw);
extern s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw);
extern s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw);
extern s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw);
+extern s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw);
extern s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw);
s32 ixgbe_set_mac_type(struct ixgbe_hw *hw);
diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c
index df7ab90e72ab..bff022585a03 100644
--- a/sys/dev/ixgbe/ixgbe_common.c
+++ b/sys/dev/ixgbe/ixgbe_common.c
@@ -178,6 +178,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
case IXGBE_DEV_ID_X550EM_A_SFP_N:
case IXGBE_DEV_ID_X550EM_A_QSFP:
case IXGBE_DEV_ID_X550EM_A_QSFP_N:
+ case IXGBE_DEV_ID_E610_SFP:
supported = false;
break;
default:
@@ -210,6 +211,8 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
case IXGBE_DEV_ID_X550EM_A_10G_T:
case IXGBE_DEV_ID_X550EM_A_1G_T:
case IXGBE_DEV_ID_X550EM_A_1G_T_L:
+ case IXGBE_DEV_ID_E610_10G_T:
+ case IXGBE_DEV_ID_E610_2_5G_T:
supported = true;
break;
default:
@@ -616,7 +619,8 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw)
}
}
- if (hw->mac.type == ixgbe_mac_X550 || hw->mac.type == ixgbe_mac_X540) {
+ if (hw->mac.type == ixgbe_mac_X540 ||
+ hw->mac.type == ixgbe_mac_X550) {
if (hw->phy.id == 0)
ixgbe_identify_phy(hw);
hw->phy.ops.read_reg(hw, IXGBE_PCRC8ECL,
@@ -1037,6 +1041,9 @@ void ixgbe_set_pci_config_data_generic(struct ixgbe_hw *hw, u16 link_status)
case IXGBE_PCI_LINK_SPEED_8000:
hw->bus.speed = ixgbe_bus_speed_8000;
break;
+ case IXGBE_PCI_LINK_SPEED_16000:
+ hw->bus.speed = ixgbe_bus_speed_16000;
+ break;
default:
hw->bus.speed = ixgbe_bus_speed_unknown;
break;
@@ -1059,7 +1066,9 @@ s32 ixgbe_get_bus_info_generic(struct ixgbe_hw *hw)
DEBUGFUNC("ixgbe_get_bus_info_generic");
/* Get the negotiated link width and speed from PCI config space */
- link_status = IXGBE_READ_PCIE_WORD(hw, IXGBE_PCI_LINK_STATUS);
+ link_status = IXGBE_READ_PCIE_WORD(hw, hw->mac.type == ixgbe_mac_E610 ?
+ IXGBE_PCI_LINK_STATUS_E610 :
+ IXGBE_PCI_LINK_STATUS);
ixgbe_set_pci_config_data_generic(hw, link_status);
@@ -1878,7 +1887,6 @@ static s32 ixgbe_get_eeprom_semaphore(struct ixgbe_hw *hw)
DEBUGFUNC("ixgbe_get_eeprom_semaphore");
-
/* Get SMBI software semaphore between device drivers first */
for (i = 0; i < timeout; i++) {
/*
@@ -3363,7 +3371,6 @@ s32 ixgbe_disable_sec_rx_path_generic(struct ixgbe_hw *hw)
DEBUGFUNC("ixgbe_disable_sec_rx_path_generic");
-
secrxreg = IXGBE_READ_REG(hw, IXGBE_SECRXCTRL);
secrxreg |= IXGBE_SECRXCTRL_RX_DIS;
IXGBE_WRITE_REG(hw, IXGBE_SECRXCTRL, secrxreg);
@@ -3692,6 +3699,10 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw)
pcie_offset = IXGBE_PCIE_MSIX_82599_CAPS;
max_msix_count = IXGBE_MAX_MSIX_VECTORS_82599;
break;
+ case ixgbe_mac_E610:
+ pcie_offset = IXGBE_PCIE_MSIX_E610_CAPS;
+ max_msix_count = IXGBE_MAX_MSIX_VECTORS_82599;
+ break;
default:
return msix_count;
}
@@ -4139,7 +4150,6 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw)
return IXGBE_SUCCESS;
}
-
/**
* ixgbe_toggle_txdctl_generic - Toggle VF's queues
* @hw: pointer to hardware structure
@@ -4323,7 +4333,8 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
break;
case IXGBE_LINKS_SPEED_100_82599:
*speed = IXGBE_LINK_SPEED_100_FULL;
- if (hw->mac.type == ixgbe_mac_X550) {
+ if (hw->mac.type == ixgbe_mac_X550 ||
+ hw->mac.type == ixgbe_mac_E610) {
if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
*speed = IXGBE_LINK_SPEED_5GB_FULL;
}
@@ -5494,6 +5505,7 @@ void ixgbe_get_nvm_version(struct ixgbe_hw *hw,
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
+ case ixgbe_mac_E610:
/* version of eeprom section */
if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word))
word = NVM_VER_INVALID;
@@ -5512,6 +5524,7 @@ void ixgbe_get_nvm_version(struct ixgbe_hw *hw,
case ixgbe_mac_X550:
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
+ case ixgbe_mac_E610:
/* intel phy firmware version */
if (ixgbe_read_eeprom(hw, NVM_EEP_PHY_OFF_X540, &word))
word = NVM_VER_INVALID;
diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c
new file mode 100644
index 000000000000..95c6dca416c6
--- /dev/null
+++ b/sys/dev/ixgbe/ixgbe_e610.c
@@ -0,0 +1,5567 @@
+/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
+
+ Copyright (c) 2025, Intel Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+
+#include "ixgbe_type.h"
+#include "ixgbe_e610.h"
+#include "ixgbe_x550.h"
+#include "ixgbe_common.h"
+#include "ixgbe_phy.h"
+#include "ixgbe_api.h"
+
+/**
+ * ixgbe_init_aci - initialization routine for Admin Command Interface
+ * @hw: pointer to the hardware structure
+ *
+ * Initialize the ACI lock.
+ */
+void ixgbe_init_aci(struct ixgbe_hw *hw)
+{
+ ixgbe_init_lock(&hw->aci.lock);
+}
+
+/**
+ * ixgbe_shutdown_aci - shutdown routine for Admin Command Interface
+ * @hw: pointer to the hardware structure
+ *
+ * Destroy the ACI lock.
+ */
+void ixgbe_shutdown_aci(struct ixgbe_hw *hw)
+{
+ ixgbe_destroy_lock(&hw->aci.lock);
+}
+
+/**
+ * ixgbe_should_retry_aci_send_cmd_execute - decide if ACI command should
+ * be resent
+ * @opcode: ACI opcode
+ *
+ * Check if ACI command should be sent again depending on the provided opcode.
+ *
+ * Return: true if the sending command routine should be repeated,
+ * otherwise false.
+ */
+static bool ixgbe_should_retry_aci_send_cmd_execute(u16 opcode)
+{
+ switch (opcode) {
+ case ixgbe_aci_opc_disable_rxen:
+ case ixgbe_aci_opc_get_phy_caps:
+ case ixgbe_aci_opc_get_link_status:
+ case ixgbe_aci_opc_get_link_topo:
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * ixgbe_aci_send_cmd_execute - execute sending FW Admin Command to FW Admin
+ * Command Interface
+ * @hw: pointer to the HW struct
+ * @desc: descriptor describing the command
+ * @buf: buffer to use for indirect commands (NULL for direct commands)
+ * @buf_size: size of buffer for indirect commands (0 for direct commands)
+ *
+ * Admin Command is sent using CSR by setting descriptor and buffer in specific
+ * registers.
+ *
+ * Return: the exit code of the operation.
+ * * - IXGBE_SUCCESS - success.
+ * * - IXGBE_ERR_ACI_DISABLED - CSR mechanism is not enabled.
+ * * - IXGBE_ERR_ACI_BUSY - CSR mechanism is busy.
+ * * - IXGBE_ERR_PARAM - buf_size is too big or
+ * invalid argument buf or buf_size.
+ * * - IXGBE_ERR_ACI_TIMEOUT - Admin Command X command timeout.
+ * * - IXGBE_ERR_ACI_ERROR - Admin Command X invalid state of HICR register or
+ * Admin Command failed because of bad opcode was returned or
+ * Admin Command failed with error Y.
+ */
+static s32
+ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,
+ void *buf, u16 buf_size)
+{
+ u32 hicr = 0, tmp_buf_size = 0, i = 0;
+ u32 *raw_desc = (u32 *)desc;
+ s32 status = IXGBE_SUCCESS;
+ bool valid_buf = false;
+ u32 *tmp_buf = NULL;
+ u16 opcode = 0;
+
+ do {
+ hw->aci.last_status = IXGBE_ACI_RC_OK;
+
+ /* It's necessary to check if mechanism is enabled */
+ hicr = IXGBE_READ_REG(hw, PF_HICR);
+ if (!(hicr & PF_HICR_EN)) {
+ status = IXGBE_ERR_ACI_DISABLED;
+ break;
+ }
+ if (hicr & PF_HICR_C) {
+ hw->aci.last_status = IXGBE_ACI_RC_EBUSY;
+ status = IXGBE_ERR_ACI_BUSY;
+ break;
+ }
+ opcode = desc->opcode;
+
+ if (buf_size > IXGBE_ACI_MAX_BUFFER_SIZE) {
+ status = IXGBE_ERR_PARAM;
+ break;
+ }
+
+ if (buf)
+ desc->flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_BUF);
+
+ /* Check if buf and buf_size are proper params */
+ if (desc->flags & IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_BUF)) {
+ if ((buf && buf_size == 0) ||
+ (buf == NULL && buf_size)) {
+ status = IXGBE_ERR_PARAM;
+ break;
+ }
+ if (buf && buf_size)
+ valid_buf = true;
+ }
+
+ if (valid_buf == true) {
+ if (buf_size % 4 == 0)
+ tmp_buf_size = buf_size;
+ else
+ tmp_buf_size = (buf_size & (u16)(~0x03)) + 4;
+
+ tmp_buf = (u32*)ixgbe_malloc(hw, tmp_buf_size);
+ if (!tmp_buf)
+ return IXGBE_ERR_OUT_OF_MEM;
+
+ /* tmp_buf will be firstly filled with 0xFF and after
+ * that the content of buf will be written into it.
+ * This approach lets us use valid buf_size and
+ * prevents us from reading past buf area
+ * when buf_size mod 4 not equal to 0.
+ */
+ memset(tmp_buf, 0xFF, tmp_buf_size);
+ memcpy(tmp_buf, buf, buf_size);
+
+ if (tmp_buf_size > IXGBE_ACI_LG_BUF)
+ desc->flags |=
+ IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_LB);
+
+ desc->datalen = IXGBE_CPU_TO_LE16(buf_size);
+
+ if (desc->flags & IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD)) {
+ for (i = 0; i < tmp_buf_size / 4; i++) {
+ IXGBE_WRITE_REG(hw, PF_HIBA(i),
+ IXGBE_LE32_TO_CPU(tmp_buf[i]));
+ }
+ }
+ }
+
+ /* Descriptor is written to specific registers */
+ for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
+ IXGBE_WRITE_REG(hw, PF_HIDA(i),
+ IXGBE_LE32_TO_CPU(raw_desc[i]));
+
+ /* SW has to set PF_HICR.C bit and clear PF_HICR.SV and
+ * PF_HICR_EV
+ */
+ hicr = IXGBE_READ_REG(hw, PF_HICR);
+ hicr = (hicr | PF_HICR_C) & ~(PF_HICR_SV | PF_HICR_EV);
+ IXGBE_WRITE_REG(hw, PF_HICR, hicr);
+
+ /* Wait for sync Admin Command response */
+ for (i = 0; i < IXGBE_ACI_SYNC_RESPONSE_TIMEOUT; i += 1) {
+ hicr = IXGBE_READ_REG(hw, PF_HICR);
+ if ((hicr & PF_HICR_SV) || !(hicr & PF_HICR_C))
+ break;
+
+ msec_delay(1);
+ }
+
+ /* Wait for async Admin Command response */
+ if ((hicr & PF_HICR_SV) && (hicr & PF_HICR_C)) {
+ for (i = 0; i < IXGBE_ACI_ASYNC_RESPONSE_TIMEOUT;
+ i += 1) {
+ hicr = IXGBE_READ_REG(hw, PF_HICR);
+ if ((hicr & PF_HICR_EV) || !(hicr & PF_HICR_C))
+ break;
+
+ msec_delay(1);
+ }
+ }
+
+ /* Read sync Admin Command response */
+ if ((hicr & PF_HICR_SV)) {
+ for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
+ raw_desc[i] = IXGBE_READ_REG(hw, PF_HIDA(i));
+ raw_desc[i] = IXGBE_CPU_TO_LE32(raw_desc[i]);
+ }
+ }
+
+ /* Read async Admin Command response */
+ if ((hicr & PF_HICR_EV) && !(hicr & PF_HICR_C)) {
+ for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
+ raw_desc[i] = IXGBE_READ_REG(hw, PF_HIDA_2(i));
+ raw_desc[i] = IXGBE_CPU_TO_LE32(raw_desc[i]);
+ }
+ }
+
+ /* Handle timeout and invalid state of HICR register */
+ if (hicr & PF_HICR_C) {
+ status = IXGBE_ERR_ACI_TIMEOUT;
+ break;
+ } else if (!(hicr & PF_HICR_SV) && !(hicr & PF_HICR_EV)) {
+ status = IXGBE_ERR_ACI_ERROR;
+ break;
+ }
+
+ /* For every command other than 0x0014 treat opcode mismatch
+ * as an error. Response to 0x0014 command read from HIDA_2
+ * is a descriptor of an event which is expected to contain
+ * different opcode than the command.
+ */
+ if (desc->opcode != opcode &&
+ opcode != IXGBE_CPU_TO_LE16(ixgbe_aci_opc_get_fw_event)) {
+ status = IXGBE_ERR_ACI_ERROR;
+ break;
+ }
+
+ if (desc->retval != IXGBE_ACI_RC_OK) {
+ hw->aci.last_status = (enum ixgbe_aci_err)desc->retval;
+ status = IXGBE_ERR_ACI_ERROR;
+ break;
+ }
+
+ /* Write a response values to a buf */
+ if (valid_buf && (desc->flags &
+ IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_BUF))) {
+ for (i = 0; i < tmp_buf_size / 4; i++) {
+ tmp_buf[i] = IXGBE_READ_REG(hw, PF_HIBA(i));
+ tmp_buf[i] = IXGBE_CPU_TO_LE32(tmp_buf[i]);
+ }
+ memcpy(buf, tmp_buf, buf_size);
+ }
+ } while (0);
+
+ if (tmp_buf)
+ ixgbe_free(hw, tmp_buf);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_send_cmd - send FW Admin Command to FW Admin Command Interface
+ * @hw: pointer to the HW struct
+ * @desc: descriptor describing the command
+ * @buf: buffer to use for indirect commands (NULL for direct commands)
+ * @buf_size: size of buffer for indirect commands (0 for direct commands)
+ *
+ * Helper function to send FW Admin Commands to the FW Admin Command Interface.
+ *
+ * Retry sending the FW Admin Command multiple times to the FW ACI
+ * if the EBUSY Admin Command error is returned.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,
+ void *buf, u16 buf_size)
+{
+ struct ixgbe_aci_desc desc_cpy;
+ enum ixgbe_aci_err last_status;
+ bool is_cmd_for_retry;
+ u8 *buf_cpy = NULL;
+ s32 status;
+ u16 opcode;
+ u8 idx = 0;
+
+ opcode = IXGBE_LE16_TO_CPU(desc->opcode);
+ is_cmd_for_retry = ixgbe_should_retry_aci_send_cmd_execute(opcode);
+ memset(&desc_cpy, 0, sizeof(desc_cpy));
+
+ if (is_cmd_for_retry) {
+ if (buf) {
+ buf_cpy = (u8 *)ixgbe_malloc(hw, buf_size);
+ if (!buf_cpy)
+ return IXGBE_ERR_OUT_OF_MEM;
+ }
+ memcpy(&desc_cpy, desc, sizeof(desc_cpy));
+ }
+
+ do {
+ ixgbe_acquire_lock(&hw->aci.lock);
+ status = ixgbe_aci_send_cmd_execute(hw, desc, buf, buf_size);
+ last_status = hw->aci.last_status;
+ ixgbe_release_lock(&hw->aci.lock);
+
+ if (!is_cmd_for_retry || status == IXGBE_SUCCESS ||
+ (last_status != IXGBE_ACI_RC_EBUSY && status != IXGBE_ERR_ACI_ERROR))
+ break;
+
+ if (buf)
+ memcpy(buf, buf_cpy, buf_size);
+ memcpy(desc, &desc_cpy, sizeof(desc_cpy));
+
+ msec_delay(IXGBE_ACI_SEND_DELAY_TIME_MS);
+ } while (++idx < IXGBE_ACI_SEND_MAX_EXECUTE);
+
+ if (buf_cpy)
+ ixgbe_free(hw, buf_cpy);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_check_event_pending - check if there are any pending events
+ * @hw: pointer to the HW struct
+ *
+ * Determine if there are any pending events.
+ *
+ * Return: true if there are any currently pending events
+ * otherwise false.
+ */
+bool ixgbe_aci_check_event_pending(struct ixgbe_hw *hw)
+{
+ u32 ep_bit_mask;
+ u32 fwsts;
+
+ ep_bit_mask = hw->bus.func ? GL_FWSTS_EP_PF1 : GL_FWSTS_EP_PF0;
+
+ /* Check state of Event Pending (EP) bit */
+ fwsts = IXGBE_READ_REG(hw, GL_FWSTS);
+ return (fwsts & ep_bit_mask) ? true : false;
+}
+
+/**
+ * ixgbe_aci_get_event - get an event from ACI
+ * @hw: pointer to the HW struct
+ * @e: event information structure
+ * @pending: optional flag signaling that there are more pending events
+ *
+ * Obtain an event from ACI and return its content
+ * through 'e' using ACI command (0x0014).
+ * Provide information if there are more events
+ * to retrieve through 'pending'.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_event(struct ixgbe_hw *hw, struct ixgbe_aci_event *e,
+ bool *pending)
+{
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ if (!e || (!e->msg_buf && e->buf_len) || (e->msg_buf && !e->buf_len))
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_acquire_lock(&hw->aci.lock);
+
+ /* Check if there are any events pending */
+ if (!ixgbe_aci_check_event_pending(hw)) {
+ status = IXGBE_ERR_ACI_NO_EVENTS;
+ goto aci_get_event_exit;
+ }
+
+ /* Obtain pending event */
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_fw_event);
+ status = ixgbe_aci_send_cmd_execute(hw, &desc, e->msg_buf, e->buf_len);
+ if (status)
+ goto aci_get_event_exit;
+
+ /* Returned 0x0014 opcode indicates that no event was obtained */
+ if (desc.opcode == IXGBE_CPU_TO_LE16(ixgbe_aci_opc_get_fw_event)) {
+ status = IXGBE_ERR_ACI_NO_EVENTS;
+ goto aci_get_event_exit;
+ }
+
+ /* Determine size of event data */
+ e->msg_len = MIN_T(u16, IXGBE_LE16_TO_CPU(desc.datalen), e->buf_len);
+ /* Write event descriptor to event info structure */
+ memcpy(&e->desc, &desc, sizeof(e->desc));
+
+ /* Check if there are any further events pending */
+ if (pending) {
+ *pending = ixgbe_aci_check_event_pending(hw);
+ }
+
+aci_get_event_exit:
+ ixgbe_release_lock(&hw->aci.lock);
+
+ return status;
+}
+
+/**
+ * ixgbe_fill_dflt_direct_cmd_desc - fill ACI descriptor with default values.
+ * @desc: pointer to the temp descriptor (non DMA mem)
+ * @opcode: the opcode can be used to decide which flags to turn off or on
+ *
+ * Helper function to fill the descriptor desc with default values
+ * and the provided opcode.
+ */
+void ixgbe_fill_dflt_direct_cmd_desc(struct ixgbe_aci_desc *desc, u16 opcode)
+{
+ /* zero out the desc */
+ memset(desc, 0, sizeof(*desc));
+ desc->opcode = IXGBE_CPU_TO_LE16(opcode);
+ desc->flags = IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_SI);
+}
+
+/**
+ * ixgbe_aci_get_fw_ver - get the firmware version
+ * @hw: pointer to the HW struct
+ *
+ * Get the firmware version using ACI command (0x0001).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_fw_ver(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_ver *resp;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ resp = &desc.params.get_ver;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_ver);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ if (!status) {
+ hw->fw_branch = resp->fw_branch;
+ hw->fw_maj_ver = resp->fw_major;
+ hw->fw_min_ver = resp->fw_minor;
+ hw->fw_patch = resp->fw_patch;
+ hw->fw_build = IXGBE_LE32_TO_CPU(resp->fw_build);
+ hw->api_branch = resp->api_branch;
+ hw->api_maj_ver = resp->api_major;
+ hw->api_min_ver = resp->api_minor;
+ hw->api_patch = resp->api_patch;
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_send_driver_ver - send the driver version to firmware
+ * @hw: pointer to the HW struct
+ * @dv: driver's major, minor version
+ *
+ * Send the driver version to the firmware
+ * using the ACI command (0x0002).
+ *
+ * Return: the exit code of the operation.
+ * Returns IXGBE_ERR_PARAM, if dv is NULL.
+ */
+s32 ixgbe_aci_send_driver_ver(struct ixgbe_hw *hw, struct ixgbe_driver_ver *dv)
+{
+ struct ixgbe_aci_cmd_driver_ver *cmd;
+ struct ixgbe_aci_desc desc;
+ u16 len;
+
+ cmd = &desc.params.driver_ver;
+
+ if (!dv)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_driver_ver);
+
+ desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD);
+ cmd->major_ver = dv->major_ver;
+ cmd->minor_ver = dv->minor_ver;
+ cmd->build_ver = dv->build_ver;
+ cmd->subbuild_ver = dv->subbuild_ver;
+
+ len = 0;
+ while (len < sizeof(dv->driver_string) &&
+ IS_ASCII(dv->driver_string[len]) && dv->driver_string[len])
+ len++;
+
+ return ixgbe_aci_send_cmd(hw, &desc, dv->driver_string, len);
+}
+
+/**
+ * ixgbe_aci_req_res - request a common resource
+ * @hw: pointer to the HW struct
+ * @res: resource ID
+ * @access: access type
+ * @sdp_number: resource number
+ * @timeout: the maximum time in ms that the driver may hold the resource
+ *
+ * Requests a common resource using the ACI command (0x0008).
+ * Specifies the maximum time the driver may hold the resource.
+ * If the requested resource is currently occupied by some other driver,
+ * a busy return value is returned and the timeout field value indicates the
+ * maximum time the current owner has to free it.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32
+ixgbe_aci_req_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res,
+ enum ixgbe_aci_res_access_type access, u8 sdp_number,
+ u32 *timeout)
+{
+ struct ixgbe_aci_cmd_req_res *cmd_resp;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd_resp = &desc.params.res_owner;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_req_res);
+
+ cmd_resp->res_id = IXGBE_CPU_TO_LE16(res);
+ cmd_resp->access_type = IXGBE_CPU_TO_LE16(access);
+ cmd_resp->res_number = IXGBE_CPU_TO_LE32(sdp_number);
+ cmd_resp->timeout = IXGBE_CPU_TO_LE32(*timeout);
+ *timeout = 0;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ /* The completion specifies the maximum time in ms that the driver
+ * may hold the resource in the Timeout field.
+ * If the resource is held by some other driver, the command completes
+ * with a busy return value and the timeout field indicates the maximum
+ * time the current owner of the resource has to free it.
+ */
+ if (!status || hw->aci.last_status == IXGBE_ACI_RC_EBUSY)
+ *timeout = IXGBE_LE32_TO_CPU(cmd_resp->timeout);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_release_res - release a common resource using ACI
+ * @hw: pointer to the HW struct
+ * @res: resource ID
+ * @sdp_number: resource number
+ *
+ * Release a common resource using ACI command (0x0009).
+ *
+ * Return: the exit code of the operation.
+ */
+static s32
+ixgbe_aci_release_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res,
+ u8 sdp_number)
+{
+ struct ixgbe_aci_cmd_req_res *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.res_owner;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_release_res);
+
+ cmd->res_id = IXGBE_CPU_TO_LE16(res);
+ cmd->res_number = IXGBE_CPU_TO_LE32(sdp_number);
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_acquire_res - acquire the ownership of a resource
+ * @hw: pointer to the HW structure
+ * @res: resource ID
+ * @access: access type (read or write)
+ * @timeout: timeout in milliseconds
+ *
+ * Make an attempt to acquire the ownership of a resource using
+ * the ixgbe_aci_req_res to utilize ACI.
+ * In case if some other driver has previously acquired the resource and
+ * performed any necessary updates, the IXGBE_ERR_ACI_NO_WORK is returned,
+ * and the caller does not obtain the resource and has no further work to do.
+ * If needed, the function will poll until the current lock owner timeouts.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_acquire_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res,
+ enum ixgbe_aci_res_access_type access, u32 timeout)
+{
+#define IXGBE_RES_POLLING_DELAY_MS 10
+ u32 delay = IXGBE_RES_POLLING_DELAY_MS;
+ u32 res_timeout = timeout;
+ u32 retry_timeout = 0;
+ s32 status;
+
+ status = ixgbe_aci_req_res(hw, res, access, 0, &res_timeout);
+
+ /* A return code of IXGBE_ERR_ACI_NO_WORK means that another driver has
+ * previously acquired the resource and performed any necessary updates;
+ * in this case the caller does not obtain the resource and has no
+ * further work to do.
+ */
+ if (status == IXGBE_ERR_ACI_NO_WORK)
+ goto ixgbe_acquire_res_exit;
+
+ /* If necessary, poll until the current lock owner timeouts.
+ * Set retry_timeout to the timeout value reported by the FW in the
+ * response to the "Request Resource Ownership" (0x0008) Admin Command
+ * as it indicates the maximum time the current owner of the resource
+ * is allowed to hold it.
+ */
+ retry_timeout = res_timeout;
+ while (status && retry_timeout && res_timeout) {
+ msec_delay(delay);
+ retry_timeout = (retry_timeout > delay) ?
+ retry_timeout - delay : 0;
+ status = ixgbe_aci_req_res(hw, res, access, 0, &res_timeout);
+
+ if (status == IXGBE_ERR_ACI_NO_WORK)
+ /* lock free, but no work to do */
+ break;
+
+ if (!status)
+ /* lock acquired */
+ break;
+ }
+
+ixgbe_acquire_res_exit:
+ return status;
+}
+
+/**
+ * ixgbe_release_res - release a common resource
+ * @hw: pointer to the HW structure
+ * @res: resource ID
+ *
+ * Release a common resource using ixgbe_aci_release_res.
+ */
+void ixgbe_release_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res)
+{
+ u32 total_delay = 0;
+ s32 status;
+
+ status = ixgbe_aci_release_res(hw, res, 0);
+
+ /* There are some rare cases when trying to release the resource
+ * results in an admin command timeout, so handle them correctly.
+ */
+ while ((status == IXGBE_ERR_ACI_TIMEOUT) &&
+ (total_delay < IXGBE_ACI_RELEASE_RES_TIMEOUT)) {
+ msec_delay(1);
+ status = ixgbe_aci_release_res(hw, res, 0);
+ total_delay++;
+ }
+}
+
+/**
+ * ixgbe_parse_common_caps - Parse common device/function capabilities
+ * @hw: pointer to the HW struct
+ * @caps: pointer to common capabilities structure
+ * @elem: the capability element to parse
+ * @prefix: message prefix for tracing capabilities
+ *
+ * Given a capability element, extract relevant details into the common
+ * capability structure.
+ *
+ * Return: true if the capability matches one of the common capability ids,
+ * false otherwise.
+ */
+static bool
+ixgbe_parse_common_caps(struct ixgbe_hw *hw, struct ixgbe_hw_common_caps *caps,
+ struct ixgbe_aci_cmd_list_caps_elem *elem,
+ const char *prefix)
+{
+ u32 logical_id = IXGBE_LE32_TO_CPU(elem->logical_id);
+ u32 phys_id = IXGBE_LE32_TO_CPU(elem->phys_id);
+ u32 number = IXGBE_LE32_TO_CPU(elem->number);
+ u16 cap = IXGBE_LE16_TO_CPU(elem->cap);
+ bool found = true;
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ switch (cap) {
+ case IXGBE_ACI_CAPS_VALID_FUNCTIONS:
+ caps->valid_functions = number;
+ break;
+ case IXGBE_ACI_CAPS_SRIOV:
+ caps->sr_iov_1_1 = (number == 1);
+ break;
+ case IXGBE_ACI_CAPS_VMDQ:
+ caps->vmdq = (number == 1);
+ break;
+ case IXGBE_ACI_CAPS_DCB:
+ caps->dcb = (number == 1);
+ caps->active_tc_bitmap = logical_id;
+ caps->maxtc = phys_id;
+ break;
+ case IXGBE_ACI_CAPS_RSS:
+ caps->rss_table_size = number;
+ caps->rss_table_entry_width = logical_id;
+ break;
+ case IXGBE_ACI_CAPS_RXQS:
+ caps->num_rxq = number;
+ caps->rxq_first_id = phys_id;
+ break;
+ case IXGBE_ACI_CAPS_TXQS:
+ caps->num_txq = number;
+ caps->txq_first_id = phys_id;
+ break;
+ case IXGBE_ACI_CAPS_MSIX:
+ caps->num_msix_vectors = number;
+ caps->msix_vector_first_id = phys_id;
+ break;
+ case IXGBE_ACI_CAPS_NVM_VER:
+ break;
+ case IXGBE_ACI_CAPS_NVM_MGMT:
+ caps->sec_rev_disabled =
+ (number & IXGBE_NVM_MGMT_SEC_REV_DISABLED) ?
+ true : false;
+ caps->update_disabled =
+ (number & IXGBE_NVM_MGMT_UPDATE_DISABLED) ?
+ true : false;
+ caps->nvm_unified_update =
+ (number & IXGBE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ?
+ true : false;
+ caps->netlist_auth =
+ (number & IXGBE_NVM_MGMT_NETLIST_AUTH_SUPPORT) ?
+ true : false;
+ break;
+ case IXGBE_ACI_CAPS_MAX_MTU:
+ caps->max_mtu = number;
+ break;
+ case IXGBE_ACI_CAPS_PCIE_RESET_AVOIDANCE:
+ caps->pcie_reset_avoidance = (number > 0);
+ break;
+ case IXGBE_ACI_CAPS_POST_UPDATE_RESET_RESTRICT:
+ caps->reset_restrict_support = (number == 1);
+ break;
+ case IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG0:
+ case IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG1:
+ case IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG2:
+ case IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG3:
+ {
+ u8 index = cap - IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG0;
+
+ caps->ext_topo_dev_img_ver_high[index] = number;
+ caps->ext_topo_dev_img_ver_low[index] = logical_id;
+ caps->ext_topo_dev_img_part_num[index] =
+ (phys_id & IXGBE_EXT_TOPO_DEV_IMG_PART_NUM_M) >>
+ IXGBE_EXT_TOPO_DEV_IMG_PART_NUM_S;
+ caps->ext_topo_dev_img_load_en[index] =
+ (phys_id & IXGBE_EXT_TOPO_DEV_IMG_LOAD_EN) != 0;
+ caps->ext_topo_dev_img_prog_en[index] =
+ (phys_id & IXGBE_EXT_TOPO_DEV_IMG_PROG_EN) != 0;
+ break;
+ }
+ case IXGBE_ACI_CAPS_OROM_RECOVERY_UPDATE:
+ caps->orom_recovery_update = (number == 1);
+ break;
+ case IXGBE_ACI_CAPS_NEXT_CLUSTER_ID:
+ caps->next_cluster_id_support = (number == 1);
+ DEBUGOUT2("%s: next_cluster_id_support = %d\n",
+ prefix, caps->next_cluster_id_support);
+ break;
+ default:
+ /* Not one of the recognized common capabilities */
+ found = false;
+ }
+
+ return found;
+}
+
+/**
+ * ixgbe_hweight8 - count set bits among the 8 lowest bits
+ * @w: variable storing set bits to count
+ *
+ * Return: the number of set bits among the 8 lowest bits in the provided value.
+ */
+static u8 ixgbe_hweight8(u32 w)
+{
+ u8 hweight = 0, i;
+
+ for (i = 0; i < 8; i++)
+ if (w & (1 << i))
+ hweight++;
+
+ return hweight;
+}
+
+/**
+ * ixgbe_hweight32 - count set bits among the 32 lowest bits
+ * @w: variable storing set bits to count
+ *
+ * Return: the number of set bits among the 32 lowest bits in the
+ * provided value.
+ */
+static u8 ixgbe_hweight32(u32 w)
+{
+ u32 bitMask = 0x1, i;
+ u8 bitCnt = 0;
+
+ for (i = 0; i < 32; i++)
+ {
+ if (w & bitMask)
+ bitCnt++;
+
+ bitMask = bitMask << 0x1;
+ }
+
+ return bitCnt;
+}
+
+/**
+ * ixgbe_parse_valid_functions_cap - Parse IXGBE_ACI_CAPS_VALID_FUNCTIONS caps
+ * @hw: pointer to the HW struct
+ * @dev_p: pointer to device capabilities structure
+ * @cap: capability element to parse
+ *
+ * Parse IXGBE_ACI_CAPS_VALID_FUNCTIONS for device capabilities.
+ */
+static void
+ixgbe_parse_valid_functions_cap(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ u32 number = IXGBE_LE32_TO_CPU(cap->number);
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ dev_p->num_funcs = ixgbe_hweight32(number);
+}
+
+/**
+ * ixgbe_parse_vf_dev_caps - Parse IXGBE_ACI_CAPS_VF device caps
+ * @hw: pointer to the HW struct
+ * @dev_p: pointer to device capabilities structure
+ * @cap: capability element to parse
+ *
+ * Parse IXGBE_ACI_CAPS_VF for device capabilities.
+ */
+static void ixgbe_parse_vf_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ u32 number = IXGBE_LE32_TO_CPU(cap->number);
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ dev_p->num_vfs_exposed = number;
+}
+
+/**
+ * ixgbe_parse_vsi_dev_caps - Parse IXGBE_ACI_CAPS_VSI device caps
+ * @hw: pointer to the HW struct
+ * @dev_p: pointer to device capabilities structure
+ * @cap: capability element to parse
+ *
+ * Parse IXGBE_ACI_CAPS_VSI for device capabilities.
+ */
+static void ixgbe_parse_vsi_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ u32 number = IXGBE_LE32_TO_CPU(cap->number);
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ dev_p->num_vsi_allocd_to_host = number;
+}
+
+/**
+ * ixgbe_parse_fdir_dev_caps - Parse IXGBE_ACI_CAPS_FD device caps
+ * @hw: pointer to the HW struct
+ * @dev_p: pointer to device capabilities structure
+ * @cap: capability element to parse
+ *
+ * Parse IXGBE_ACI_CAPS_FD for device capabilities.
+ */
+static void ixgbe_parse_fdir_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ u32 number = IXGBE_LE32_TO_CPU(cap->number);
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ dev_p->num_flow_director_fltr = number;
+}
+
+/**
+ * ixgbe_parse_dev_caps - Parse device capabilities
+ * @hw: pointer to the HW struct
+ * @dev_p: pointer to device capabilities structure
+ * @buf: buffer containing the device capability records
+ * @cap_count: the number of capabilities
+ *
+ * Helper device to parse device (0x000B) capabilities list. For
+ * capabilities shared between device and function, this relies on
+ * ixgbe_parse_common_caps.
+ *
+ * Loop through the list of provided capabilities and extract the relevant
+ * data into the device capabilities structured.
+ */
+static void ixgbe_parse_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_p,
+ void *buf, u32 cap_count)
+{
+ struct ixgbe_aci_cmd_list_caps_elem *cap_resp;
+ u32 i;
+
+ cap_resp = (struct ixgbe_aci_cmd_list_caps_elem *)buf;
+
+ memset(dev_p, 0, sizeof(*dev_p));
+
+ for (i = 0; i < cap_count; i++) {
+ u16 cap = IXGBE_LE16_TO_CPU(cap_resp[i].cap);
+ bool found;
+
+ found = ixgbe_parse_common_caps(hw, &dev_p->common_cap,
+ &cap_resp[i], "dev caps");
+
+ switch (cap) {
+ case IXGBE_ACI_CAPS_VALID_FUNCTIONS:
+ ixgbe_parse_valid_functions_cap(hw, dev_p,
+ &cap_resp[i]);
+ break;
+ case IXGBE_ACI_CAPS_VF:
+ ixgbe_parse_vf_dev_caps(hw, dev_p, &cap_resp[i]);
+ break;
+ case IXGBE_ACI_CAPS_VSI:
+ ixgbe_parse_vsi_dev_caps(hw, dev_p, &cap_resp[i]);
+ break;
+ case IXGBE_ACI_CAPS_FD:
+ ixgbe_parse_fdir_dev_caps(hw, dev_p, &cap_resp[i]);
+ break;
+ default:
+ /* Don't list common capabilities as unknown */
+ if (!found)
+ break;
+ }
+ }
+
+}
+
+/**
+ * ixgbe_parse_vf_func_caps - Parse IXGBE_ACI_CAPS_VF function caps
+ * @hw: pointer to the HW struct
+ * @func_p: pointer to function capabilities structure
+ * @cap: pointer to the capability element to parse
+ *
+ * Extract function capabilities for IXGBE_ACI_CAPS_VF.
+ */
+static void ixgbe_parse_vf_func_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_func_caps *func_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ u32 logical_id = IXGBE_LE32_TO_CPU(cap->logical_id);
+ u32 number = IXGBE_LE32_TO_CPU(cap->number);
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ func_p->num_allocd_vfs = number;
+ func_p->vf_base_id = logical_id;
+}
+
+/**
+ * ixgbe_get_num_per_func - determine number of resources per PF
+ * @hw: pointer to the HW structure
+ * @max: value to be evenly split between each PF
+ *
+ * Determine the number of valid functions by going through the bitmap returned
+ * from parsing capabilities and use this to calculate the number of resources
+ * per PF based on the max value passed in.
+ *
+ * Return: the number of resources per PF or 0, if no PH are available.
+ */
+static u32 ixgbe_get_num_per_func(struct ixgbe_hw *hw, u32 max)
+{
+ u8 funcs;
+
+#define IXGBE_CAPS_VALID_FUNCS_M 0xFF
+ funcs = ixgbe_hweight8(hw->dev_caps.common_cap.valid_functions &
+ IXGBE_CAPS_VALID_FUNCS_M);
+
+ if (!funcs)
+ return 0;
+
+ return max / funcs;
+}
+
+/**
+ * ixgbe_parse_vsi_func_caps - Parse IXGBE_ACI_CAPS_VSI function caps
+ * @hw: pointer to the HW struct
+ * @func_p: pointer to function capabilities structure
+ * @cap: pointer to the capability element to parse
+ *
+ * Extract function capabilities for IXGBE_ACI_CAPS_VSI.
+ */
+static void ixgbe_parse_vsi_func_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_func_caps *func_p,
+ struct ixgbe_aci_cmd_list_caps_elem *cap)
+{
+ func_p->guar_num_vsi = ixgbe_get_num_per_func(hw, IXGBE_MAX_VSI);
+}
+
+/**
+ * ixgbe_parse_func_caps - Parse function capabilities
+ * @hw: pointer to the HW struct
+ * @func_p: pointer to function capabilities structure
+ * @buf: buffer containing the function capability records
+ * @cap_count: the number of capabilities
+ *
+ * Helper function to parse function (0x000A) capabilities list. For
+ * capabilities shared between device and function, this relies on
+ * ixgbe_parse_common_caps.
+ *
+ * Loop through the list of provided capabilities and extract the relevant
+ * data into the function capabilities structured.
+ */
+static void ixgbe_parse_func_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_func_caps *func_p,
+ void *buf, u32 cap_count)
+{
+ struct ixgbe_aci_cmd_list_caps_elem *cap_resp;
+ u32 i;
+
+ cap_resp = (struct ixgbe_aci_cmd_list_caps_elem *)buf;
+
+ memset(func_p, 0, sizeof(*func_p));
+
+ for (i = 0; i < cap_count; i++) {
+ u16 cap = IXGBE_LE16_TO_CPU(cap_resp[i].cap);
+ ixgbe_parse_common_caps(hw, &func_p->common_cap,
+ &cap_resp[i], "func caps");
+
+ switch (cap) {
+ case IXGBE_ACI_CAPS_VF:
+ ixgbe_parse_vf_func_caps(hw, func_p, &cap_resp[i]);
+ break;
+ case IXGBE_ACI_CAPS_VSI:
+ ixgbe_parse_vsi_func_caps(hw, func_p, &cap_resp[i]);
+ break;
+ default:
+ /* Don't list common capabilities as unknown */
+ break;
+ }
+ }
+
+}
+
+/**
+ * ixgbe_aci_list_caps - query function/device capabilities
+ * @hw: pointer to the HW struct
+ * @buf: a buffer to hold the capabilities
+ * @buf_size: size of the buffer
+ * @cap_count: if not NULL, set to the number of capabilities reported
+ * @opc: capabilities type to discover, device or function
+ *
+ * Get the function (0x000A) or device (0x000B) capabilities description from
+ * firmware and store it in the buffer.
+ *
+ * If the cap_count pointer is not NULL, then it is set to the number of
+ * capabilities firmware will report. Note that if the buffer size is too
+ * small, it is possible the command will return IXGBE_ERR_OUT_OF_MEM. The
+ * cap_count will still be updated in this case. It is recommended that the
+ * buffer size be set to IXGBE_ACI_MAX_BUFFER_SIZE (the largest possible
+ * buffer that firmware could return) to avoid this.
+ *
+ * Return: the exit code of the operation.
+ * Exit code of IXGBE_ERR_OUT_OF_MEM means the buffer size is too small.
+ */
+s32 ixgbe_aci_list_caps(struct ixgbe_hw *hw, void *buf, u16 buf_size,
+ u32 *cap_count, enum ixgbe_aci_opc opc)
+{
+ struct ixgbe_aci_cmd_list_caps *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.get_cap;
+
+ if (opc != ixgbe_aci_opc_list_func_caps &&
+ opc != ixgbe_aci_opc_list_dev_caps)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, opc);
+ status = ixgbe_aci_send_cmd(hw, &desc, buf, buf_size);
+
+ if (cap_count)
+ *cap_count = IXGBE_LE32_TO_CPU(cmd->count);
+
+ return status;
+}
+
+/**
+ * ixgbe_discover_dev_caps - Read and extract device capabilities
+ * @hw: pointer to the hardware structure
+ * @dev_caps: pointer to device capabilities structure
+ *
+ * Read the device capabilities and extract them into the dev_caps structure
+ * for later use.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_discover_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_caps)
+{
+ u32 status, cap_count = 0;
+ u8 *cbuf = NULL;
+
+ cbuf = (u8*)ixgbe_malloc(hw, IXGBE_ACI_MAX_BUFFER_SIZE);
+ if (!cbuf)
+ return IXGBE_ERR_OUT_OF_MEM;
+ /* Although the driver doesn't know the number of capabilities the
+ * device will return, we can simply send a 4KB buffer, the maximum
+ * possible size that firmware can return.
+ */
+ cap_count = IXGBE_ACI_MAX_BUFFER_SIZE /
+ sizeof(struct ixgbe_aci_cmd_list_caps_elem);
+
+ status = ixgbe_aci_list_caps(hw, cbuf, IXGBE_ACI_MAX_BUFFER_SIZE,
+ &cap_count,
+ ixgbe_aci_opc_list_dev_caps);
+ if (!status)
+ ixgbe_parse_dev_caps(hw, dev_caps, cbuf, cap_count);
+
+ if (cbuf)
+ ixgbe_free(hw, cbuf);
+
+ return status;
+}
+
+/**
+ * ixgbe_discover_func_caps - Read and extract function capabilities
+ * @hw: pointer to the hardware structure
+ * @func_caps: pointer to function capabilities structure
+ *
+ * Read the function capabilities and extract them into the func_caps structure
+ * for later use.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_discover_func_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_func_caps *func_caps)
+{
+ u32 cap_count = 0;
+ u8 *cbuf = NULL;
+ s32 status;
+
+ cbuf = (u8*)ixgbe_malloc(hw, IXGBE_ACI_MAX_BUFFER_SIZE);
+ if(!cbuf)
+ return IXGBE_ERR_OUT_OF_MEM;
+ /* Although the driver doesn't know the number of capabilities the
+ * device will return, we can simply send a 4KB buffer, the maximum
+ * possible size that firmware can return.
+ */
+ cap_count = IXGBE_ACI_MAX_BUFFER_SIZE /
+ sizeof(struct ixgbe_aci_cmd_list_caps_elem);
+
+ status = ixgbe_aci_list_caps(hw, cbuf, IXGBE_ACI_MAX_BUFFER_SIZE,
+ &cap_count,
+ ixgbe_aci_opc_list_func_caps);
+ if (!status)
+ ixgbe_parse_func_caps(hw, func_caps, cbuf, cap_count);
+
+ if (cbuf)
+ ixgbe_free(hw, cbuf);
+
+ return status;
+}
+
+/**
+ * ixgbe_get_caps - get info about the HW
+ * @hw: pointer to the hardware structure
+ *
+ * Retrieve both device and function capabilities.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_caps(struct ixgbe_hw *hw)
+{
+ s32 status;
+
+ status = ixgbe_discover_dev_caps(hw, &hw->dev_caps);
+ if (status)
+ return status;
+
+ return ixgbe_discover_func_caps(hw, &hw->func_caps);
+}
+
+/**
+ * ixgbe_aci_disable_rxen - disable RX
+ * @hw: pointer to the HW struct
+ *
+ * Request a safe disable of Receive Enable using ACI command (0x000C).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_disable_rxen(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_disable_rxen *cmd;
+ struct ixgbe_aci_desc desc;
+
+ UNREFERENCED_1PARAMETER(hw);
+
+ cmd = &desc.params.disable_rxen;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_disable_rxen);
+
+ cmd->lport_num = (u8)hw->bus.func;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_get_phy_caps - returns PHY capabilities
+ * @hw: pointer to the HW struct
+ * @qual_mods: report qualified modules
+ * @report_mode: report mode capabilities
+ * @pcaps: structure for PHY capabilities to be filled
+ *
+ * Returns the various PHY capabilities supported on the Port
+ * using ACI command (0x0600).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_phy_caps(struct ixgbe_hw *hw, bool qual_mods, u8 report_mode,
+ struct ixgbe_aci_cmd_get_phy_caps_data *pcaps)
+{
+ struct ixgbe_aci_cmd_get_phy_caps *cmd;
+ u16 pcaps_size = sizeof(*pcaps);
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.get_phy;
+
+ if (!pcaps || (report_mode & ~IXGBE_ACI_REPORT_MODE_M))
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_phy_caps);
+
+ if (qual_mods)
+ cmd->param0 |= IXGBE_CPU_TO_LE16(IXGBE_ACI_GET_PHY_RQM);
+
+ cmd->param0 |= IXGBE_CPU_TO_LE16(report_mode);
+ status = ixgbe_aci_send_cmd(hw, &desc, pcaps, pcaps_size);
+
+ if (status == IXGBE_SUCCESS &&
+ report_mode == IXGBE_ACI_REPORT_TOPO_CAP_MEDIA) {
+ hw->phy.phy_type_low = IXGBE_LE64_TO_CPU(pcaps->phy_type_low);
+ hw->phy.phy_type_high = IXGBE_LE64_TO_CPU(pcaps->phy_type_high);
+ memcpy(hw->link.link_info.module_type, &pcaps->module_type,
+ sizeof(hw->link.link_info.module_type));
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_phy_caps_equals_cfg - check if capabilities match the PHY config
+ * @phy_caps: PHY capabilities
+ * @phy_cfg: PHY configuration
+ *
+ * Helper function to determine if PHY capabilities match PHY
+ * configuration
+ *
+ * Return: true if PHY capabilities match PHY configuration.
+ */
+bool
+ixgbe_phy_caps_equals_cfg(struct ixgbe_aci_cmd_get_phy_caps_data *phy_caps,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *phy_cfg)
+{
+ u8 caps_mask, cfg_mask;
+
+ if (!phy_caps || !phy_cfg)
+ return false;
+
+ /* These bits are not common between capabilities and configuration.
+ * Do not use them to determine equality.
+ */
+ caps_mask = IXGBE_ACI_PHY_CAPS_MASK & ~(IXGBE_ACI_PHY_AN_MODE |
+ IXGBE_ACI_PHY_EN_MOD_QUAL);
+ cfg_mask = IXGBE_ACI_PHY_ENA_VALID_MASK &
+ ~IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ if (phy_caps->phy_type_low != phy_cfg->phy_type_low ||
+ phy_caps->phy_type_high != phy_cfg->phy_type_high ||
+ ((phy_caps->caps & caps_mask) != (phy_cfg->caps & cfg_mask)) ||
+ phy_caps->low_power_ctrl_an != phy_cfg->low_power_ctrl_an ||
+ phy_caps->eee_cap != phy_cfg->eee_cap ||
+ phy_caps->eeer_value != phy_cfg->eeer_value ||
+ phy_caps->link_fec_options != phy_cfg->link_fec_opt)
+ return false;
+
+ return true;
+}
+
+/**
+ * ixgbe_copy_phy_caps_to_cfg - Copy PHY ability data to configuration data
+ * @caps: PHY ability structure to copy data from
+ * @cfg: PHY configuration structure to copy data to
+ *
+ * Helper function to copy data from PHY capabilities data structure
+ * to PHY configuration data structure
+ */
+void ixgbe_copy_phy_caps_to_cfg(struct ixgbe_aci_cmd_get_phy_caps_data *caps,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg)
+{
+ if (!caps || !cfg)
+ return;
+
+ memset(cfg, 0, sizeof(*cfg));
+ cfg->phy_type_low = caps->phy_type_low;
+ cfg->phy_type_high = caps->phy_type_high;
+ cfg->caps = caps->caps;
+ cfg->low_power_ctrl_an = caps->low_power_ctrl_an;
+ cfg->eee_cap = caps->eee_cap;
+ cfg->eeer_value = caps->eeer_value;
+ cfg->link_fec_opt = caps->link_fec_options;
+ cfg->module_compliance_enforcement =
+ caps->module_compliance_enforcement;
+}
+
+/**
+ * ixgbe_aci_set_phy_cfg - set PHY configuration
+ * @hw: pointer to the HW struct
+ * @cfg: structure with PHY configuration data to be set
+ *
+ * Set the various PHY configuration parameters supported on the Port
+ * using ACI command (0x0601).
+ * One or more of the Set PHY config parameters may be ignored in an MFP
+ * mode as the PF may not have the privilege to set some of the PHY Config
+ * parameters.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg)
+{
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ if (!cfg)
+ return IXGBE_ERR_PARAM;
+
+ /* Ensure that only valid bits of cfg->caps can be turned on. */
+ if (cfg->caps & ~IXGBE_ACI_PHY_ENA_VALID_MASK) {
+ cfg->caps &= IXGBE_ACI_PHY_ENA_VALID_MASK;
+ }
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_phy_cfg);
+ desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, cfg, sizeof(*cfg));
+
+ if (!status)
+ hw->phy.curr_user_phy_cfg = *cfg;
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_set_link_restart_an - set up link and restart AN
+ * @hw: pointer to the HW struct
+ * @ena_link: if true: enable link, if false: disable link
+ *
+ * Function sets up the link and restarts the Auto-Negotiation over the link.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_link_restart_an(struct ixgbe_hw *hw, bool ena_link)
+{
+ struct ixgbe_aci_cmd_restart_an *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.restart_an;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_restart_an);
+
+ cmd->cmd_flags = IXGBE_ACI_RESTART_AN_LINK_RESTART;
+ if (ena_link)
+ cmd->cmd_flags |= IXGBE_ACI_RESTART_AN_LINK_ENABLE;
+ else
+ cmd->cmd_flags &= ~IXGBE_ACI_RESTART_AN_LINK_ENABLE;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_is_media_cage_present - check if media cage is present
+ * @hw: pointer to the HW struct
+ *
+ * Identify presence of media cage using the ACI command (0x06E0).
+ *
+ * Return: true if media cage is present, else false. If no cage, then
+ * media type is backplane or BASE-T.
+ */
+static bool ixgbe_is_media_cage_present(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_link_topo *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.get_link_topo;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_link_topo);
+
+ cmd->addr.topo_params.node_type_ctx =
+ (IXGBE_ACI_LINK_TOPO_NODE_CTX_PORT <<
+ IXGBE_ACI_LINK_TOPO_NODE_CTX_S);
+
+ /* set node type */
+ cmd->addr.topo_params.node_type_ctx |=
+ (IXGBE_ACI_LINK_TOPO_NODE_TYPE_M &
+ IXGBE_ACI_LINK_TOPO_NODE_TYPE_CAGE);
+
+ /* Node type cage can be used to determine if cage is present. If AQC
+ * returns error (ENOENT), then no cage present. If no cage present then
+ * connection type is backplane or BASE-T.
+ */
+ return ixgbe_aci_get_netlist_node(hw, cmd, NULL, NULL);
+}
+
+/**
+ * ixgbe_get_media_type_from_phy_type - Gets media type based on phy type
+ * @hw: pointer to the HW struct
+ *
+ * Try to identify the media type based on the phy type.
+ * If more than one media type, the ixgbe_media_type_unknown is returned.
+ * First, phy_type_low is checked, then phy_type_high.
+ * If none are identified, the ixgbe_media_type_unknown is returned
+ *
+ * Return: type of a media based on phy type in form of enum.
+ */
+static enum ixgbe_media_type
+ixgbe_get_media_type_from_phy_type(struct ixgbe_hw *hw)
+{
+ struct ixgbe_link_status *hw_link_info;
+
+ if (!hw)
+ return ixgbe_media_type_unknown;
+
+ hw_link_info = &hw->link.link_info;
+ if (hw_link_info->phy_type_low && hw_link_info->phy_type_high)
+ /* If more than one media type is selected, report unknown */
+ return ixgbe_media_type_unknown;
+
+ if (hw_link_info->phy_type_low) {
+ /* 1G SGMII is a special case where some DA cable PHYs
+ * may show this as an option when it really shouldn't
+ * be since SGMII is meant to be between a MAC and a PHY
+ * in a backplane. Try to detect this case and handle it
+ */
+ if (hw_link_info->phy_type_low == IXGBE_PHY_TYPE_LOW_1G_SGMII &&
+ (hw_link_info->module_type[IXGBE_ACI_MOD_TYPE_IDENT] ==
+ IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE ||
+ hw_link_info->module_type[IXGBE_ACI_MOD_TYPE_IDENT] ==
+ IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE))
+ return ixgbe_media_type_da;
+
+ switch (hw_link_info->phy_type_low) {
+ case IXGBE_PHY_TYPE_LOW_1000BASE_SX:
+ case IXGBE_PHY_TYPE_LOW_1000BASE_LX:
+ case IXGBE_PHY_TYPE_LOW_10GBASE_SR:
+ case IXGBE_PHY_TYPE_LOW_10GBASE_LR:
+ return ixgbe_media_type_fiber;
+ case IXGBE_PHY_TYPE_LOW_10G_SFI_AOC_ACC:
+ return ixgbe_media_type_fiber;
+ case IXGBE_PHY_TYPE_LOW_100BASE_TX:
+ case IXGBE_PHY_TYPE_LOW_1000BASE_T:
+ case IXGBE_PHY_TYPE_LOW_2500BASE_T:
+ case IXGBE_PHY_TYPE_LOW_5GBASE_T:
+ case IXGBE_PHY_TYPE_LOW_10GBASE_T:
+ return ixgbe_media_type_copper;
+ case IXGBE_PHY_TYPE_LOW_10G_SFI_DA:
+ return ixgbe_media_type_da;
+ case IXGBE_PHY_TYPE_LOW_1000BASE_KX:
+ case IXGBE_PHY_TYPE_LOW_2500BASE_KX:
+ case IXGBE_PHY_TYPE_LOW_2500BASE_X:
+ case IXGBE_PHY_TYPE_LOW_5GBASE_KR:
+ case IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1:
+ case IXGBE_PHY_TYPE_LOW_10G_SFI_C2C:
+ return ixgbe_media_type_backplane;
+ }
+ } else {
+ switch (hw_link_info->phy_type_high) {
+ case IXGBE_PHY_TYPE_HIGH_10BASE_T:
+ return ixgbe_media_type_copper;
+ }
+ }
+ return ixgbe_media_type_unknown;
+}
+
+/**
+ * ixgbe_update_link_info - update status of the HW network link
+ * @hw: pointer to the HW struct
+ *
+ * Update the status of the HW network link.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_update_link_info(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data *pcaps;
+ struct ixgbe_link_status *li;
+ s32 status;
+
+ if (!hw)
+ return IXGBE_ERR_PARAM;
+
+ li = &hw->link.link_info;
+
+ status = ixgbe_aci_get_link_info(hw, true, NULL);
+ if (status)
+ return status;
+
+ if (li->link_info & IXGBE_ACI_MEDIA_AVAILABLE) {
+ pcaps = (struct ixgbe_aci_cmd_get_phy_caps_data *)
+ ixgbe_malloc(hw, sizeof(*pcaps));
+ if (!pcaps)
+ return IXGBE_ERR_OUT_OF_MEM;
+
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_TOPO_CAP_MEDIA,
+ pcaps);
+
+ if (status == IXGBE_SUCCESS)
+ memcpy(li->module_type, &pcaps->module_type,
+ sizeof(li->module_type));
+
+ ixgbe_free(hw, pcaps);
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_get_link_status - get status of the HW network link
+ * @hw: pointer to the HW struct
+ * @link_up: pointer to bool (true/false = linkup/linkdown)
+ *
+ * Variable link_up is true if link is up, false if link is down.
+ * The variable link_up is invalid if status is non zero. As a
+ * result of this call, link status reporting becomes enabled
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_link_status(struct ixgbe_hw *hw, bool *link_up)
+{
+ s32 status = IXGBE_SUCCESS;
+
+ if (!hw || !link_up)
+ return IXGBE_ERR_PARAM;
+
+ if (hw->link.get_link_info) {
+ status = ixgbe_update_link_info(hw);
+ if (status) {
+ return status;
+ }
+ }
+
+ *link_up = hw->link.link_info.link_info & IXGBE_ACI_LINK_UP;
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_get_link_info - get the link status
+ * @hw: pointer to the HW struct
+ * @ena_lse: enable/disable LinkStatusEvent reporting
+ * @link: pointer to link status structure - optional
+ *
+ * Get the current Link Status using ACI command (0x607).
+ * The current link can be optionally provided to update
+ * the status.
+ *
+ * Return: the link status of the adapter.
+ */
+s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
+ struct ixgbe_link_status *link)
+{
+ struct ixgbe_aci_cmd_get_link_status_data link_data = { 0 };
+ struct ixgbe_aci_cmd_get_link_status *resp;
+ struct ixgbe_link_status *li_old, *li;
+ struct ixgbe_fc_info *hw_fc_info;
+ struct ixgbe_aci_desc desc;
+ bool tx_pause, rx_pause;
+ u8 cmd_flags;
+ s32 status;
+
+ if (!hw)
+ return IXGBE_ERR_PARAM;
+
+ li_old = &hw->link.link_info_old;
+ li = &hw->link.link_info;
+ hw_fc_info = &hw->fc;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_link_status);
+ cmd_flags = (ena_lse) ? IXGBE_ACI_LSE_ENA : IXGBE_ACI_LSE_DIS;
+ resp = &desc.params.get_link_status;
+ resp->cmd_flags = cmd_flags;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, &link_data, sizeof(link_data));
+
+ if (status != IXGBE_SUCCESS)
+ return status;
+
+ /* save off old link status information */
+ *li_old = *li;
+
+ /* update current link status information */
+ li->link_speed = IXGBE_LE16_TO_CPU(link_data.link_speed);
+ li->phy_type_low = IXGBE_LE64_TO_CPU(link_data.phy_type_low);
+ li->phy_type_high = IXGBE_LE64_TO_CPU(link_data.phy_type_high);
+ li->link_info = link_data.link_info;
+ li->link_cfg_err = link_data.link_cfg_err;
+ li->an_info = link_data.an_info;
+ li->ext_info = link_data.ext_info;
+ li->max_frame_size = IXGBE_LE16_TO_CPU(link_data.max_frame_size);
+ li->fec_info = link_data.cfg & IXGBE_ACI_FEC_MASK;
+ li->topo_media_conflict = link_data.topo_media_conflict;
+ li->pacing = link_data.cfg & (IXGBE_ACI_CFG_PACING_M |
+ IXGBE_ACI_CFG_PACING_TYPE_M);
+
+ /* update fc info */
+ tx_pause = !!(link_data.an_info & IXGBE_ACI_LINK_PAUSE_TX);
+ rx_pause = !!(link_data.an_info & IXGBE_ACI_LINK_PAUSE_RX);
+ if (tx_pause && rx_pause)
+ hw_fc_info->current_mode = ixgbe_fc_full;
+ else if (tx_pause)
+ hw_fc_info->current_mode = ixgbe_fc_tx_pause;
+ else if (rx_pause)
+ hw_fc_info->current_mode = ixgbe_fc_rx_pause;
+ else
+ hw_fc_info->current_mode = ixgbe_fc_none;
+
+ li->lse_ena = !!(resp->cmd_flags & IXGBE_ACI_LSE_IS_ENABLED);
+
+ /* save link status information */
+ if (link)
+ *link = *li;
+
+ /* flag cleared so calling functions don't call AQ again */
+ hw->link.get_link_info = false;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_aci_set_event_mask - set event mask
+ * @hw: pointer to the HW struct
+ * @port_num: port number of the physical function
+ * @mask: event mask to be set
+ *
+ * Set the event mask using ACI command (0x0613).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask)
+{
+ struct ixgbe_aci_cmd_set_event_mask *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.set_event_mask;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_event_mask);
+
+ cmd->event_mask = IXGBE_CPU_TO_LE16(mask);
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_configure_lse - enable/disable link status events
+ * @hw: pointer to the HW struct
+ * @activate: bool value deciding if lse should be enabled nor disabled
+ * @mask: event mask to be set; a set bit means deactivation of the
+ * corresponding event
+ *
+ * Set the event mask and then enable or disable link status events
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask)
+{
+ s32 rc;
+
+ rc = ixgbe_aci_set_event_mask(hw, (u8)hw->bus.func, mask);
+ if (rc) {
+ return rc;
+ }
+
+ /* Enabling link status events generation by fw */
+ rc = ixgbe_aci_get_link_info(hw, activate, NULL);
+ if (rc) {
+ return rc;
+ }
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_aci_get_netlist_node - get a node handle
+ * @hw: pointer to the hw struct
+ * @cmd: get_link_topo AQ structure
+ * @node_part_number: output node part number if node found
+ * @node_handle: output node handle parameter if node found
+ *
+ * Get the netlist node and assigns it to
+ * the provided handle using ACI command (0x06E0).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_get_link_topo *cmd,
+ u8 *node_part_number, u16 *node_handle)
+{
+ struct ixgbe_aci_desc desc;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_link_topo);
+ desc.params.get_link_topo = *cmd;
+
+ if (ixgbe_aci_send_cmd(hw, &desc, NULL, 0))
+ return IXGBE_ERR_NOT_SUPPORTED;
+
+ if (node_handle)
+ *node_handle =
+ IXGBE_LE16_TO_CPU(desc.params.get_link_topo.addr.handle);
+ if (node_part_number)
+ *node_part_number = desc.params.get_link_topo.node_part_num;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_find_netlist_node - find a node handle
+ * @hw: pointer to the hw struct
+ * @node_type_ctx: type of netlist node to look for
+ * @node_part_number: node part number to look for
+ * @node_handle: output parameter if node found - optional
+ *
+ * Find and return the node handle for a given node type and part number in the
+ * netlist. When found IXGBE_SUCCESS is returned, IXGBE_ERR_NOT_SUPPORTED
+ * otherwise. If @node_handle provided, it would be set to found node handle.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_find_netlist_node(struct ixgbe_hw *hw, u8 node_type_ctx,
+ u8 node_part_number, u16 *node_handle)
+{
+ struct ixgbe_aci_cmd_get_link_topo cmd;
+ u8 rec_node_part_number;
+ u16 rec_node_handle;
+ s32 status;
+ u8 idx;
+
+ for (idx = 0; idx < IXGBE_MAX_NETLIST_SIZE; idx++) {
+ memset(&cmd, 0, sizeof(cmd));
+
+ cmd.addr.topo_params.node_type_ctx =
+ (node_type_ctx << IXGBE_ACI_LINK_TOPO_NODE_TYPE_S);
+ cmd.addr.topo_params.index = idx;
+
+ status = ixgbe_aci_get_netlist_node(hw, &cmd,
+ &rec_node_part_number,
+ &rec_node_handle);
+ if (status)
+ return status;
+
+ if (rec_node_part_number == node_part_number) {
+ if (node_handle)
+ *node_handle = rec_node_handle;
+ return IXGBE_SUCCESS;
+ }
+ }
+
+ return IXGBE_ERR_NOT_SUPPORTED;
+}
+
+/**
+ * ixgbe_aci_read_i2c - read I2C register value
+ * @hw: pointer to the hw struct
+ * @topo_addr: topology address for a device to communicate with
+ * @bus_addr: 7-bit I2C bus address
+ * @addr: I2C memory address (I2C offset) with up to 16 bits
+ * @params: I2C parameters: bit [7] - Repeated start,
+ * bits [6:5] data offset size,
+ * bit [4] - I2C address type, bits [3:0] - data size
+ * to read (0-16 bytes)
+ * @data: pointer to data (0 to 16 bytes) to be read from the I2C device
+ *
+ * Read the value of the I2C pin register using ACI command (0x06E2).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_read_i2c(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data)
+{
+ struct ixgbe_aci_desc desc = { 0 };
+ struct ixgbe_aci_cmd_i2c *cmd;
+ u8 data_size;
+ s32 status;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_read_i2c);
+ cmd = &desc.params.read_write_i2c;
+
+ if (!data)
+ return IXGBE_ERR_PARAM;
+
+ data_size = (params & IXGBE_ACI_I2C_DATA_SIZE_M) >>
+ IXGBE_ACI_I2C_DATA_SIZE_S;
+
+ cmd->i2c_bus_addr = IXGBE_CPU_TO_LE16(bus_addr);
+ cmd->topo_addr = topo_addr;
+ cmd->i2c_params = params;
+ cmd->i2c_addr = addr;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (!status) {
+ struct ixgbe_aci_cmd_read_i2c_resp *resp;
+ u8 i;
+
+ resp = &desc.params.read_i2c_resp;
+ for (i = 0; i < data_size; i++) {
+ *data = resp->i2c_data[i];
+ data++;
+ }
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_write_i2c - write a value to I2C register
+ * @hw: pointer to the hw struct
+ * @topo_addr: topology address for a device to communicate with
+ * @bus_addr: 7-bit I2C bus address
+ * @addr: I2C memory address (I2C offset) with up to 16 bits
+ * @params: I2C parameters: bit [4] - I2C address type, bits [3:0] - data size
+ * to write (0-7 bytes)
+ * @data: pointer to data (0 to 4 bytes) to be written to the I2C device
+ *
+ * Write a value to the I2C pin register using ACI command (0x06E3).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_write_i2c(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data)
+{
+ struct ixgbe_aci_desc desc = { 0 };
+ struct ixgbe_aci_cmd_i2c *cmd;
+ u8 i, data_size;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_write_i2c);
+ cmd = &desc.params.read_write_i2c;
+
+ data_size = (params & IXGBE_ACI_I2C_DATA_SIZE_M) >>
+ IXGBE_ACI_I2C_DATA_SIZE_S;
+
+ /* data_size limited to 4 */
+ if (data_size > 4)
+ return IXGBE_ERR_PARAM;
+
+ cmd->i2c_bus_addr = IXGBE_CPU_TO_LE16(bus_addr);
+ cmd->topo_addr = topo_addr;
+ cmd->i2c_params = params;
+ cmd->i2c_addr = addr;
+
+ for (i = 0; i < data_size; i++) {
+ cmd->i2c_data[i] = *data;
+ data++;
+ }
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_set_port_id_led - set LED value for the given port
+ * @hw: pointer to the HW struct
+ * @orig_mode: set LED original mode
+ *
+ * Set LED value for the given port (0x06E9)
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_port_id_led(struct ixgbe_hw *hw, bool orig_mode)
+{
+ struct ixgbe_aci_cmd_set_port_id_led *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.set_port_id_led;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_port_id_led);
+
+ cmd->lport_num = (u8)hw->bus.func;
+ cmd->lport_num_valid = IXGBE_ACI_PORT_ID_PORT_NUM_VALID;
+
+ if (orig_mode)
+ cmd->ident_mode = IXGBE_ACI_PORT_IDENT_LED_ORIG;
+ else
+ cmd->ident_mode = IXGBE_ACI_PORT_IDENT_LED_BLINK;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_set_gpio - set GPIO pin state
+ * @hw: pointer to the hw struct
+ * @gpio_ctrl_handle: GPIO controller node handle
+ * @pin_idx: IO Number of the GPIO that needs to be set
+ * @value: SW provide IO value to set in the LSB
+ *
+ * Set the GPIO pin state that is a part of the topology
+ * using ACI command (0x06EC).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+ bool value)
+{
+ struct ixgbe_aci_cmd_gpio *cmd;
+ struct ixgbe_aci_desc desc;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_set_gpio);
+ cmd = &desc.params.read_write_gpio;
+ cmd->gpio_ctrl_handle = IXGBE_CPU_TO_LE16(gpio_ctrl_handle);
+ cmd->gpio_num = pin_idx;
+ cmd->gpio_val = value ? 1 : 0;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_get_gpio - get GPIO pin state
+ * @hw: pointer to the hw struct
+ * @gpio_ctrl_handle: GPIO controller node handle
+ * @pin_idx: IO Number of the GPIO that needs to be set
+ * @value: IO value read
+ *
+ * Get the value of a GPIO signal which is part of the topology
+ * using ACI command (0x06ED).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+ bool *value)
+{
+ struct ixgbe_aci_cmd_gpio *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_gpio);
+ cmd = &desc.params.read_write_gpio;
+ cmd->gpio_ctrl_handle = IXGBE_CPU_TO_LE16(gpio_ctrl_handle);
+ cmd->gpio_num = pin_idx;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (status)
+ return status;
+
+ *value = !!cmd->gpio_val;
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_aci_sff_eeprom - read/write SFF EEPROM
+ * @hw: pointer to the HW struct
+ * @lport: bits [7:0] = logical port, bit [8] = logical port valid
+ * @bus_addr: I2C bus address of the eeprom (typically 0xA0, 0=topo default)
+ * @mem_addr: I2C offset. lower 8 bits for address, 8 upper bits zero padding.
+ * @page: QSFP page
+ * @page_bank_ctrl: configuration of SFF/CMIS paging and banking control
+ * @data: pointer to data buffer to be read/written to the I2C device.
+ * @length: 1-16 for read, 1 for write.
+ * @write: 0 read, 1 for write.
+ *
+ * Read/write SFF EEPROM using ACI command (0x06EE).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_sff_eeprom(struct ixgbe_hw *hw, u16 lport, u8 bus_addr,
+ u16 mem_addr, u8 page, u8 page_bank_ctrl, u8 *data,
+ u8 length, bool write)
+{
+ struct ixgbe_aci_cmd_sff_eeprom *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ if (!data || (mem_addr & 0xff00))
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_sff_eeprom);
+ cmd = &desc.params.read_write_sff_param;
+ desc.flags = IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD);
+ cmd->lport_num = (u8)(lport & 0xff);
+ cmd->lport_num_valid = (u8)((lport >> 8) & 0x01);
+ cmd->i2c_bus_addr = IXGBE_CPU_TO_LE16(((bus_addr >> 1) &
+ IXGBE_ACI_SFF_I2CBUS_7BIT_M) |
+ ((page_bank_ctrl <<
+ IXGBE_ACI_SFF_PAGE_BANK_CTRL_S) &
+ IXGBE_ACI_SFF_PAGE_BANK_CTRL_M));
+ cmd->i2c_offset = IXGBE_CPU_TO_LE16(mem_addr & 0xff);
+ cmd->module_page = page;
+ if (write)
+ cmd->i2c_bus_addr |= IXGBE_CPU_TO_LE16(IXGBE_ACI_SFF_IS_WRITE);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, data, length);
+ return status;
+}
+
+/**
+ * ixgbe_aci_prog_topo_dev_nvm - program Topology Device NVM
+ * @hw: pointer to the hardware structure
+ * @topo_params: pointer to structure storing topology parameters for a device
+ *
+ * Program Topology Device NVM using ACI command (0x06F2).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_prog_topo_dev_nvm(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_params *topo_params)
+{
+ struct ixgbe_aci_cmd_prog_topo_dev_nvm *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.prog_topo_dev_nvm;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_prog_topo_dev_nvm);
+
+ memcpy(&cmd->topo_params, topo_params, sizeof(*topo_params));
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_read_topo_dev_nvm - read Topology Device NVM
+ * @hw: pointer to the hardware structure
+ * @topo_params: pointer to structure storing topology parameters for a device
+ * @start_address: byte offset in the topology device NVM
+ * @data: pointer to data buffer
+ * @data_size: number of bytes to be read from the topology device NVM
+ * Read Topology Device NVM (0x06F3)
+ *
+ * Read Topology of Device NVM using ACI command (0x06F3).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_read_topo_dev_nvm(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_params *topo_params,
+ u32 start_address, u8 *data, u8 data_size)
+{
+ struct ixgbe_aci_cmd_read_topo_dev_nvm *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ if (!data || data_size == 0 ||
+ data_size > IXGBE_ACI_READ_TOPO_DEV_NVM_DATA_READ_SIZE)
+ return IXGBE_ERR_PARAM;
+
+ cmd = &desc.params.read_topo_dev_nvm;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_read_topo_dev_nvm);
+
+ desc.datalen = IXGBE_CPU_TO_LE16(data_size);
+ memcpy(&cmd->topo_params, topo_params, sizeof(*topo_params));
+ cmd->start_address = IXGBE_CPU_TO_LE32(start_address);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (status)
+ return status;
+
+ memcpy(data, cmd->data_read, data_size);
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_acquire_nvm - Generic request for acquiring the NVM ownership
+ * @hw: pointer to the HW structure
+ * @access: NVM access type (read or write)
+ *
+ * Request NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_acquire_nvm(struct ixgbe_hw *hw,
+ enum ixgbe_aci_res_access_type access)
+{
+ u32 fla;
+
+ /* Skip if we are in blank NVM programming mode */
+ fla = IXGBE_READ_REG(hw, GLNVM_FLA);
+ if ((fla & GLNVM_FLA_LOCKED_M) == 0)
+ return IXGBE_SUCCESS;
+
+ return ixgbe_acquire_res(hw, IXGBE_NVM_RES_ID, access,
+ IXGBE_NVM_TIMEOUT);
+}
+
+/**
+ * ixgbe_release_nvm - Generic request for releasing the NVM ownership
+ * @hw: pointer to the HW structure
+ *
+ * Release NVM ownership.
+ */
+void ixgbe_release_nvm(struct ixgbe_hw *hw)
+{
+ u32 fla;
+
+ /* Skip if we are in blank NVM programming mode */
+ fla = IXGBE_READ_REG(hw, GLNVM_FLA);
+ if ((fla & GLNVM_FLA_LOCKED_M) == 0)
+ return;
+
+ ixgbe_release_res(hw, IXGBE_NVM_RES_ID);
+}
+
+
+/**
+ * ixgbe_aci_read_nvm - read NVM
+ * @hw: pointer to the HW struct
+ * @module_typeid: module pointer location in words from the NVM beginning
+ * @offset: byte offset from the module beginning
+ * @length: length of the section to be read (in bytes from the offset)
+ * @data: command buffer (size [bytes] = length)
+ * @last_command: tells if this is the last command in a series
+ * @read_shadow_ram: tell if this is a shadow RAM read
+ *
+ * Read the NVM using ACI command (0x0701).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_read_nvm(struct ixgbe_hw *hw, u16 module_typeid, u32 offset,
+ u16 length, void *data, bool last_command,
+ bool read_shadow_ram)
+{
+ struct ixgbe_aci_desc desc;
+ struct ixgbe_aci_cmd_nvm *cmd;
+
+ cmd = &desc.params.nvm;
+
+ if (offset > IXGBE_ACI_NVM_MAX_OFFSET)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_read);
+
+ if (!read_shadow_ram && module_typeid == IXGBE_ACI_NVM_START_POINT)
+ cmd->cmd_flags |= IXGBE_ACI_NVM_FLASH_ONLY;
+
+ /* If this is the last command in a series, set the proper flag. */
+ if (last_command)
+ cmd->cmd_flags |= IXGBE_ACI_NVM_LAST_CMD;
+ cmd->module_typeid = IXGBE_CPU_TO_LE16(module_typeid);
+ cmd->offset_low = IXGBE_CPU_TO_LE16(offset & 0xFFFF);
+ cmd->offset_high = (offset >> 16) & 0xFF;
+ cmd->length = IXGBE_CPU_TO_LE16(length);
+
+ return ixgbe_aci_send_cmd(hw, &desc, data, length);
+}
+
+/**
+ * ixgbe_aci_erase_nvm - erase NVM sector
+ * @hw: pointer to the HW struct
+ * @module_typeid: module pointer location in words from the NVM beginning
+ *
+ * Erase the NVM sector using the ACI command (0x0702).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_erase_nvm(struct ixgbe_hw *hw, u16 module_typeid)
+{
+ struct ixgbe_aci_desc desc;
+ struct ixgbe_aci_cmd_nvm *cmd;
+ s32 status;
+ __le16 len;
+
+ /* read a length value from SR, so module_typeid is equal to 0 */
+ /* calculate offset where module size is placed from bytes to words */
+ /* set last command and read from SR values to true */
+ status = ixgbe_aci_read_nvm(hw, 0, 2 * module_typeid + 2, 2, &len, true,
+ true);
+ if (status)
+ return status;
+
+ cmd = &desc.params.nvm;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_erase);
+
+ cmd->module_typeid = IXGBE_CPU_TO_LE16(module_typeid);
+ cmd->length = len;
+ cmd->offset_low = 0;
+ cmd->offset_high = 0;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_aci_update_nvm - update NVM
+ * @hw: pointer to the HW struct
+ * @module_typeid: module pointer location in words from the NVM beginning
+ * @offset: byte offset from the module beginning
+ * @length: length of the section to be written (in bytes from the offset)
+ * @data: command buffer (size [bytes] = length)
+ * @last_command: tells if this is the last command in a series
+ * @command_flags: command parameters
+ *
+ * Update the NVM using the ACI command (0x0703).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_update_nvm(struct ixgbe_hw *hw, u16 module_typeid,
+ u32 offset, u16 length, void *data,
+ bool last_command, u8 command_flags)
+{
+ struct ixgbe_aci_desc desc;
+ struct ixgbe_aci_cmd_nvm *cmd;
+
+ cmd = &desc.params.nvm;
+
+ /* In offset the highest byte must be zeroed. */
+ if (offset & 0xFF000000)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_write);
+
+ cmd->cmd_flags |= command_flags;
+
+ /* If this is the last command in a series, set the proper flag. */
+ if (last_command)
+ cmd->cmd_flags |= IXGBE_ACI_NVM_LAST_CMD;
+ cmd->module_typeid = IXGBE_CPU_TO_LE16(module_typeid);
+ cmd->offset_low = IXGBE_CPU_TO_LE16(offset & 0xFFFF);
+ cmd->offset_high = (offset >> 16) & 0xFF;
+ cmd->length = IXGBE_CPU_TO_LE16(length);
+
+ desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD);
+
+ return ixgbe_aci_send_cmd(hw, &desc, data, length);
+}
+
+/**
+ * ixgbe_aci_read_nvm_cfg - read an NVM config block
+ * @hw: pointer to the HW struct
+ * @cmd_flags: NVM access admin command bits
+ * @field_id: field or feature ID
+ * @data: buffer for result
+ * @buf_size: buffer size
+ * @elem_count: pointer to count of elements read by FW
+ *
+ * Reads a single or multiple feature/field ID and data using ACI command
+ * (0x0704).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_read_nvm_cfg(struct ixgbe_hw *hw, u8 cmd_flags,
+ u16 field_id, void *data, u16 buf_size,
+ u16 *elem_count)
+{
+ struct ixgbe_aci_cmd_nvm_cfg *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.nvm_cfg;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_cfg_read);
+
+ cmd->cmd_flags = cmd_flags;
+ cmd->id = IXGBE_CPU_TO_LE16(field_id);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, data, buf_size);
+ if (!status && elem_count)
+ *elem_count = IXGBE_LE16_TO_CPU(cmd->count);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_write_nvm_cfg - write an NVM config block
+ * @hw: pointer to the HW struct
+ * @cmd_flags: NVM access admin command bits
+ * @data: buffer for result
+ * @buf_size: buffer size
+ * @elem_count: count of elements to be written
+ *
+ * Writes a single or multiple feature/field ID and data using ACI command
+ * (0x0705).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_write_nvm_cfg(struct ixgbe_hw *hw, u8 cmd_flags,
+ void *data, u16 buf_size, u16 elem_count)
+{
+ struct ixgbe_aci_cmd_nvm_cfg *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.nvm_cfg;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_cfg_write);
+ desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD);
+
+ cmd->count = IXGBE_CPU_TO_LE16(elem_count);
+ cmd->cmd_flags = cmd_flags;
+
+ return ixgbe_aci_send_cmd(hw, &desc, data, buf_size);
+}
+
+/**
+ * ixgbe_nvm_validate_checksum - validate checksum
+ * @hw: pointer to the HW struct
+ *
+ * Verify NVM PFA checksum validity using ACI command (0x0706).
+ * If the checksum verification failed, IXGBE_ERR_NVM_CHECKSUM is returned.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_nvm_validate_checksum(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_nvm_checksum *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ cmd = &desc.params.nvm_checksum;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_checksum);
+ cmd->flags = IXGBE_ACI_NVM_CHECKSUM_VERIFY;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ ixgbe_release_nvm(hw);
+
+ if (!status)
+ if (IXGBE_LE16_TO_CPU(cmd->checksum) !=
+ IXGBE_ACI_NVM_CHECKSUM_CORRECT) {
+ ERROR_REPORT1(IXGBE_ERROR_INVALID_STATE,
+ "Invalid Shadow Ram checksum");
+ status = IXGBE_ERR_NVM_CHECKSUM;
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_nvm_recalculate_checksum - recalculate checksum
+ * @hw: pointer to the HW struct
+ *
+ * Recalculate NVM PFA checksum using ACI command (0x0706).
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_nvm_recalculate_checksum(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_nvm_checksum *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_WRITE);
+ if (status)
+ return status;
+
+ cmd = &desc.params.nvm_checksum;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_checksum);
+ cmd->flags = IXGBE_ACI_NVM_CHECKSUM_RECALC;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_nvm_write_activate - NVM activate write
+ * @hw: pointer to the HW struct
+ * @cmd_flags: flags for write activate command
+ * @response_flags: response indicators from firmware
+ *
+ * Update the control word with the required banks' validity bits
+ * and dumps the Shadow RAM to flash using ACI command (0x0707).
+ *
+ * cmd_flags controls which banks to activate, the preservation level to use
+ * when activating the NVM bank, and whether an EMP reset is required for
+ * activation.
+ *
+ * Note that the 16bit cmd_flags value is split between two separate 1 byte
+ * flag values in the descriptor.
+ *
+ * On successful return of the firmware command, the response_flags variable
+ * is updated with the flags reported by firmware indicating certain status,
+ * such as whether EMP reset is enabled.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_nvm_write_activate(struct ixgbe_hw *hw, u16 cmd_flags,
+ u8 *response_flags)
+{
+ struct ixgbe_aci_desc desc;
+ struct ixgbe_aci_cmd_nvm *cmd;
+ s32 status;
+
+ cmd = &desc.params.nvm;
+ ixgbe_fill_dflt_direct_cmd_desc(&desc,
+ ixgbe_aci_opc_nvm_write_activate);
+
+ cmd->cmd_flags = LO_BYTE(cmd_flags);
+ cmd->offset_high = HI_BYTE(cmd_flags);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (!status && response_flags)
+ *response_flags = cmd->cmd_flags;
+
+ return status;
+}
+
+/**
+ * ixgbe_get_flash_bank_offset - Get offset into requested flash bank
+ * @hw: pointer to the HW structure
+ * @bank: whether to read from the active or inactive flash bank
+ * @module: the module to read from
+ *
+ * Based on the module, lookup the module offset from the beginning of the
+ * flash.
+ *
+ * Return: the flash offset. Note that a value of zero is invalid and must be
+ * treated as an error.
+ */
+static u32 ixgbe_get_flash_bank_offset(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u16 module)
+{
+ struct ixgbe_bank_info *banks = &hw->flash.banks;
+ enum ixgbe_flash_bank active_bank;
+ bool second_bank_active;
+ u32 offset, size;
+
+ switch (module) {
+ case E610_SR_1ST_NVM_BANK_PTR:
+ offset = banks->nvm_ptr;
+ size = banks->nvm_size;
+ active_bank = banks->nvm_bank;
+ break;
+ case E610_SR_1ST_OROM_BANK_PTR:
+ offset = banks->orom_ptr;
+ size = banks->orom_size;
+ active_bank = banks->orom_bank;
+ break;
+ case E610_SR_NETLIST_BANK_PTR:
+ offset = banks->netlist_ptr;
+ size = banks->netlist_size;
+ active_bank = banks->netlist_bank;
+ break;
+ default:
+ return 0;
+ }
+
+ switch (active_bank) {
+ case IXGBE_1ST_FLASH_BANK:
+ second_bank_active = false;
+ break;
+ case IXGBE_2ND_FLASH_BANK:
+ second_bank_active = true;
+ break;
+ default:
+ return 0;
+ }
+
+ /* The second flash bank is stored immediately following the first
+ * bank. Based on whether the 1st or 2nd bank is active, and whether
+ * we want the active or inactive bank, calculate the desired offset.
+ */
+ switch (bank) {
+ case IXGBE_ACTIVE_FLASH_BANK:
+ return offset + (second_bank_active ? size : 0);
+ case IXGBE_INACTIVE_FLASH_BANK:
+ return offset + (second_bank_active ? 0 : size);
+ }
+
+ return 0;
+}
+
+/**
+ * ixgbe_read_flash_module - Read a word from one of the main NVM modules
+ * @hw: pointer to the HW structure
+ * @bank: which bank of the module to read
+ * @module: the module to read
+ * @offset: the offset into the module in bytes
+ * @data: storage for the word read from the flash
+ * @length: bytes of data to read
+ *
+ * Read data from the specified flash module. The bank parameter indicates
+ * whether or not to read from the active bank or the inactive bank of that
+ * module.
+ *
+ * The word will be read using flat NVM access, and relies on the
+ * hw->flash.banks data being setup by ixgbe_determine_active_flash_banks()
+ * during initialization.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_flash_module(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u16 module, u32 offset, u8 *data, u32 length)
+{
+ s32 status;
+ u32 start;
+
+ start = ixgbe_get_flash_bank_offset(hw, bank, module);
+ if (!start) {
+ return IXGBE_ERR_PARAM;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ status = ixgbe_read_flat_nvm(hw, start + offset, &length, data, false);
+
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_read_netlist_module - Read data from the netlist module area
+ * @hw: pointer to the HW structure
+ * @bank: whether to read from the active or inactive module
+ * @offset: offset into the netlist to read from
+ * @data: storage for returned word value
+ *
+ * Read a word from the specified netlist bank.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_netlist_module(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u32 offset, u16 *data)
+{
+ __le16 data_local;
+ s32 status;
+
+ status = ixgbe_read_flash_module(hw, bank, E610_SR_NETLIST_BANK_PTR,
+ offset * sizeof(u16),
+ (u8 *)&data_local,
+ sizeof(u16));
+ if (!status)
+ *data = IXGBE_LE16_TO_CPU(data_local);
+
+ return status;
+}
+
+/**
+ * ixgbe_read_nvm_module - Read from the active main NVM module
+ * @hw: pointer to the HW structure
+ * @bank: whether to read from active or inactive NVM module
+ * @offset: offset into the NVM module to read, in words
+ * @data: storage for returned word value
+ *
+ * Read the specified word from the active NVM module. This includes the CSS
+ * header at the start of the NVM module.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_nvm_module(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u32 offset, u16 *data)
+{
+ __le16 data_local;
+ s32 status;
+
+ status = ixgbe_read_flash_module(hw, bank, E610_SR_1ST_NVM_BANK_PTR,
+ offset * sizeof(u16),
+ (u8 *)&data_local,
+ sizeof(u16));
+ if (!status)
+ *data = IXGBE_LE16_TO_CPU(data_local);
+
+ return status;
+}
+
+/**
+ * ixgbe_get_nvm_css_hdr_len - Read the CSS header length from the
+ * NVM CSS header
+ * @hw: pointer to the HW struct
+ * @bank: whether to read from the active or inactive flash bank
+ * @hdr_len: storage for header length in words
+ *
+ * Read the CSS header length from the NVM CSS header and add the
+ * Authentication header size, and then convert to words.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_get_nvm_css_hdr_len(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u32 *hdr_len)
+{
+ u16 hdr_len_l, hdr_len_h;
+ u32 hdr_len_dword;
+ s32 status;
+
+ status = ixgbe_read_nvm_module(hw, bank, IXGBE_NVM_CSS_HDR_LEN_L,
+ &hdr_len_l);
+ if (status)
+ return status;
+
+ status = ixgbe_read_nvm_module(hw, bank, IXGBE_NVM_CSS_HDR_LEN_H,
+ &hdr_len_h);
+ if (status)
+ return status;
+
+ /* CSS header length is in DWORD, so convert to words and add
+ * authentication header size
+ */
+ hdr_len_dword = hdr_len_h << 16 | hdr_len_l;
+ *hdr_len = (hdr_len_dword * 2) + IXGBE_NVM_AUTH_HEADER_LEN;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_read_nvm_sr_copy - Read a word from the Shadow RAM copy in the NVM bank
+ * @hw: pointer to the HW structure
+ * @bank: whether to read from the active or inactive NVM module
+ * @offset: offset into the Shadow RAM copy to read, in words
+ * @data: storage for returned word value
+ *
+ * Read the specified word from the copy of the Shadow RAM found in the
+ * specified NVM module.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_nvm_sr_copy(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ u32 offset, u16 *data)
+{
+ u32 hdr_len;
+ s32 status;
+
+ status = ixgbe_get_nvm_css_hdr_len(hw, bank, &hdr_len);
+ if (status)
+ return status;
+
+ hdr_len = ROUND_UP(hdr_len, 32);
+
+ return ixgbe_read_nvm_module(hw, bank, hdr_len + offset, data);
+}
+
+/**
+ * ixgbe_get_nvm_minsrevs - Get the minsrevs values from flash
+ * @hw: pointer to the HW struct
+ * @minsrevs: structure to store NVM and OROM minsrev values
+ *
+ * Read the Minimum Security Revision TLV and extract
+ * the revision values from the flash image
+ * into a readable structure for processing.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_nvm_minsrevs(struct ixgbe_hw *hw,
+ struct ixgbe_minsrev_info *minsrevs)
+{
+ struct ixgbe_aci_cmd_nvm_minsrev data;
+ s32 status;
+ u16 valid;
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ status = ixgbe_aci_read_nvm(hw, IXGBE_ACI_NVM_MINSREV_MOD_ID,
+ 0, sizeof(data), &data,
+ true, false);
+
+ ixgbe_release_nvm(hw);
+
+ if (status)
+ return status;
+
+ valid = IXGBE_LE16_TO_CPU(data.validity);
+
+ /* Extract NVM minimum security revision */
+ if (valid & IXGBE_ACI_NVM_MINSREV_NVM_VALID) {
+ u16 minsrev_l = IXGBE_LE16_TO_CPU(data.nvm_minsrev_l);
+ u16 minsrev_h = IXGBE_LE16_TO_CPU(data.nvm_minsrev_h);
+
+ minsrevs->nvm = minsrev_h << 16 | minsrev_l;
+ minsrevs->nvm_valid = true;
+ }
+
+ /* Extract the OROM minimum security revision */
+ if (valid & IXGBE_ACI_NVM_MINSREV_OROM_VALID) {
+ u16 minsrev_l = IXGBE_LE16_TO_CPU(data.orom_minsrev_l);
+ u16 minsrev_h = IXGBE_LE16_TO_CPU(data.orom_minsrev_h);
+
+ minsrevs->orom = minsrev_h << 16 | minsrev_l;
+ minsrevs->orom_valid = true;
+ }
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_update_nvm_minsrevs - Update minsrevs TLV data in flash
+ * @hw: pointer to the HW struct
+ * @minsrevs: minimum security revision information
+ *
+ * Update the NVM or Option ROM minimum security revision fields in the PFA
+ * area of the flash. Reads the minsrevs->nvm_valid and minsrevs->orom_valid
+ * fields to determine what update is being requested. If the valid bit is not
+ * set for that module, then the associated minsrev will be left as is.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_update_nvm_minsrevs(struct ixgbe_hw *hw,
+ struct ixgbe_minsrev_info *minsrevs)
+{
+ struct ixgbe_aci_cmd_nvm_minsrev data;
+ s32 status;
+
+ if (!minsrevs->nvm_valid && !minsrevs->orom_valid) {
+ return IXGBE_ERR_PARAM;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_WRITE);
+ if (status)
+ return status;
+
+ /* Get current data */
+ status = ixgbe_aci_read_nvm(hw, IXGBE_ACI_NVM_MINSREV_MOD_ID, 0,
+ sizeof(data), &data, true, false);
+ if (status)
+ goto exit_release_res;
+
+ if (minsrevs->nvm_valid) {
+ data.nvm_minsrev_l = IXGBE_CPU_TO_LE16(minsrevs->nvm & 0xFFFF);
+ data.nvm_minsrev_h = IXGBE_CPU_TO_LE16(minsrevs->nvm >> 16);
+ data.validity |=
+ IXGBE_CPU_TO_LE16(IXGBE_ACI_NVM_MINSREV_NVM_VALID);
+ }
+
+ if (minsrevs->orom_valid) {
+ data.orom_minsrev_l = IXGBE_CPU_TO_LE16(minsrevs->orom & 0xFFFF);
+ data.orom_minsrev_h = IXGBE_CPU_TO_LE16(minsrevs->orom >> 16);
+ data.validity |=
+ IXGBE_CPU_TO_LE16(IXGBE_ACI_NVM_MINSREV_OROM_VALID);
+ }
+
+ /* Update flash data */
+ status = ixgbe_aci_update_nvm(hw, IXGBE_ACI_NVM_MINSREV_MOD_ID, 0,
+ sizeof(data), &data, false,
+ IXGBE_ACI_NVM_SPECIAL_UPDATE);
+ if (status)
+ goto exit_release_res;
+
+ /* Dump the Shadow RAM to the flash */
+ status = ixgbe_nvm_write_activate(hw, 0, NULL);
+
+exit_release_res:
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_get_nvm_srev - Read the security revision from the NVM CSS header
+ * @hw: pointer to the HW struct
+ * @bank: whether to read from the active or inactive flash bank
+ * @srev: storage for security revision
+ *
+ * Read the security revision out of the CSS header of the active NVM module
+ * bank.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_get_nvm_srev(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank, u32 *srev)
+{
+ u16 srev_l, srev_h;
+ s32 status;
+
+ status = ixgbe_read_nvm_module(hw, bank, IXGBE_NVM_CSS_SREV_L, &srev_l);
+ if (status)
+ return status;
+
+ status = ixgbe_read_nvm_module(hw, bank, IXGBE_NVM_CSS_SREV_H, &srev_h);
+ if (status)
+ return status;
+
+ *srev = srev_h << 16 | srev_l;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_get_nvm_ver_info - Read NVM version information
+ * @hw: pointer to the HW struct
+ * @bank: whether to read from the active or inactive flash bank
+ * @nvm: pointer to NVM info structure
+ *
+ * Read the NVM EETRACK ID and map version of the main NVM image bank, filling
+ * in the nvm info structure.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_get_nvm_ver_info(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ struct ixgbe_nvm_info *nvm)
+{
+ u16 eetrack_lo, eetrack_hi, ver;
+ s32 status;
+
+ status = ixgbe_read_nvm_sr_copy(hw, bank,
+ E610_SR_NVM_DEV_STARTER_VER, &ver);
+ if (status) {
+ return status;
+ }
+
+ nvm->major = (ver & E610_NVM_VER_HI_MASK) >> E610_NVM_VER_HI_SHIFT;
+ nvm->minor = (ver & E610_NVM_VER_LO_MASK) >> E610_NVM_VER_LO_SHIFT;
+
+ status = ixgbe_read_nvm_sr_copy(hw, bank, E610_SR_NVM_EETRACK_LO,
+ &eetrack_lo);
+ if (status) {
+ return status;
+ }
+ status = ixgbe_read_nvm_sr_copy(hw, bank, E610_SR_NVM_EETRACK_HI,
+ &eetrack_hi);
+ if (status) {
+ return status;
+ }
+
+ nvm->eetrack = (eetrack_hi << 16) | eetrack_lo;
+
+ status = ixgbe_get_nvm_srev(hw, bank, &nvm->srev);
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_get_inactive_nvm_ver - Read Option ROM version from the inactive bank
+ * @hw: pointer to the HW structure
+ * @nvm: storage for Option ROM version information
+ *
+ * Reads the NVM EETRACK ID, Map version, and security revision of the
+ * inactive NVM bank. Used to access version data for a pending update that
+ * has not yet been activated.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_inactive_nvm_ver(struct ixgbe_hw *hw, struct ixgbe_nvm_info *nvm)
+{
+ return ixgbe_get_nvm_ver_info(hw, IXGBE_INACTIVE_FLASH_BANK, nvm);
+}
+
+/**
+ * ixgbe_get_active_nvm_ver - Read Option ROM version from the active bank
+ * @hw: pointer to the HW structure
+ * @nvm: storage for Option ROM version information
+ *
+ * Reads the NVM EETRACK ID, Map version, and security revision of the
+ * active NVM bank.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_active_nvm_ver(struct ixgbe_hw *hw, struct ixgbe_nvm_info *nvm)
+{
+ return ixgbe_get_nvm_ver_info(hw, IXGBE_ACTIVE_FLASH_BANK, nvm);
+}
+
+/**
+ * ixgbe_get_netlist_info
+ * @hw: pointer to the HW struct
+ * @bank: whether to read from the active or inactive flash bank
+ * @netlist: pointer to netlist version info structure
+ *
+ * Get the netlist version information from the requested bank. Reads the Link
+ * Topology section to find the Netlist ID block and extract the relevant
+ * information into the netlist version structure.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_get_netlist_info(struct ixgbe_hw *hw,
+ enum ixgbe_bank_select bank,
+ struct ixgbe_netlist_info *netlist)
+{
+ u16 module_id, length, node_count, i;
+ u16 *id_blk;
+ s32 status;
+
+ status = ixgbe_read_netlist_module(hw, bank, IXGBE_NETLIST_TYPE_OFFSET,
+ &module_id);
+ if (status)
+ return status;
+
+ if (module_id != IXGBE_NETLIST_LINK_TOPO_MOD_ID) {
+ return IXGBE_ERR_NVM;
+ }
+
+ status = ixgbe_read_netlist_module(hw, bank, IXGBE_LINK_TOPO_MODULE_LEN,
+ &length);
+ if (status)
+ return status;
+
+ /* sanity check that we have at least enough words to store the
+ * netlist ID block
+ */
+ if (length < IXGBE_NETLIST_ID_BLK_SIZE) {
+ return IXGBE_ERR_NVM;
+ }
+
+ status = ixgbe_read_netlist_module(hw, bank, IXGBE_LINK_TOPO_NODE_COUNT,
+ &node_count);
+ if (status)
+ return status;
+ node_count &= IXGBE_LINK_TOPO_NODE_COUNT_M;
+
+ id_blk = (u16 *)ixgbe_calloc(hw, IXGBE_NETLIST_ID_BLK_SIZE,
+ sizeof(*id_blk));
+ if (!id_blk)
+ return IXGBE_ERR_NO_SPACE;
+
+ /* Read out the entire Netlist ID Block at once. */
+ status = ixgbe_read_flash_module(hw, bank, E610_SR_NETLIST_BANK_PTR,
+ IXGBE_NETLIST_ID_BLK_OFFSET(node_count) * sizeof(u16),
+ (u8 *)id_blk,
+ IXGBE_NETLIST_ID_BLK_SIZE * sizeof(u16));
+ if (status)
+ goto exit_error;
+
+ for (i = 0; i < IXGBE_NETLIST_ID_BLK_SIZE; i++)
+ id_blk[i] = IXGBE_LE16_TO_CPU(((__le16 *)id_blk)[i]);
+
+ netlist->major = id_blk[IXGBE_NETLIST_ID_BLK_MAJOR_VER_HIGH] << 16 |
+ id_blk[IXGBE_NETLIST_ID_BLK_MAJOR_VER_LOW];
+ netlist->minor = id_blk[IXGBE_NETLIST_ID_BLK_MINOR_VER_HIGH] << 16 |
+ id_blk[IXGBE_NETLIST_ID_BLK_MINOR_VER_LOW];
+ netlist->type = id_blk[IXGBE_NETLIST_ID_BLK_TYPE_HIGH] << 16 |
+ id_blk[IXGBE_NETLIST_ID_BLK_TYPE_LOW];
+ netlist->rev = id_blk[IXGBE_NETLIST_ID_BLK_REV_HIGH] << 16 |
+ id_blk[IXGBE_NETLIST_ID_BLK_REV_LOW];
+ netlist->cust_ver = id_blk[IXGBE_NETLIST_ID_BLK_CUST_VER];
+ /* Read the left most 4 bytes of SHA */
+ netlist->hash = id_blk[IXGBE_NETLIST_ID_BLK_SHA_HASH_WORD(15)] << 16 |
+ id_blk[IXGBE_NETLIST_ID_BLK_SHA_HASH_WORD(14)];
+
+exit_error:
+ ixgbe_free(hw, id_blk);
+
+ return status;
+}
+
+/**
+ * ixgbe_get_inactive_netlist_ver
+ * @hw: pointer to the HW struct
+ * @netlist: pointer to netlist version info structure
+ *
+ * Read the netlist version data from the inactive netlist bank. Used to
+ * extract version data of a pending flash update in order to display the
+ * version data.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_inactive_netlist_ver(struct ixgbe_hw *hw,
+ struct ixgbe_netlist_info *netlist)
+{
+ return ixgbe_get_netlist_info(hw, IXGBE_INACTIVE_FLASH_BANK, netlist);
+}
+
+/**
+ * ixgbe_read_sr_pointer - Read the value of a Shadow RAM pointer word
+ * @hw: pointer to the HW structure
+ * @offset: the word offset of the Shadow RAM word to read
+ * @pointer: pointer value read from Shadow RAM
+ *
+ * Read the given Shadow RAM word, and convert it to a pointer value specified
+ * in bytes. This function assumes the specified offset is a valid pointer
+ * word.
+ *
+ * Each pointer word specifies whether it is stored in word size or 4KB
+ * sector size by using the highest bit. The reported pointer value will be in
+ * bytes, intended for flat NVM reads.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_sr_pointer(struct ixgbe_hw *hw, u16 offset, u32 *pointer)
+{
+ s32 status;
+ u16 value;
+
+ status = ixgbe_read_ee_aci_E610(hw, offset, &value);
+ if (status)
+ return status;
+
+ /* Determine if the pointer is in 4KB or word units */
+ if (value & IXGBE_SR_NVM_PTR_4KB_UNITS)
+ *pointer = (value & ~IXGBE_SR_NVM_PTR_4KB_UNITS) * 4 * 1024;
+ else
+ *pointer = value * 2;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_read_sr_area_size - Read an area size from a Shadow RAM word
+ * @hw: pointer to the HW structure
+ * @offset: the word offset of the Shadow RAM to read
+ * @size: size value read from the Shadow RAM
+ *
+ * Read the given Shadow RAM word, and convert it to an area size value
+ * specified in bytes. This function assumes the specified offset is a valid
+ * area size word.
+ *
+ * Each area size word is specified in 4KB sector units. This function reports
+ * the size in bytes, intended for flat NVM reads.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_read_sr_area_size(struct ixgbe_hw *hw, u16 offset, u32 *size)
+{
+ s32 status;
+ u16 value;
+
+ status = ixgbe_read_ee_aci_E610(hw, offset, &value);
+ if (status)
+ return status;
+
+ /* Area sizes are always specified in 4KB units */
+ *size = value * 4 * 1024;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_discover_flash_size - Discover the available flash size.
+ * @hw: pointer to the HW struct
+ *
+ * The device flash could be up to 16MB in size. However, it is possible that
+ * the actual size is smaller. Use bisection to determine the accessible size
+ * of flash memory.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_discover_flash_size(struct ixgbe_hw *hw)
+{
+ u32 min_size = 0, max_size = IXGBE_ACI_NVM_MAX_OFFSET + 1;
+ s32 status;
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ while ((max_size - min_size) > 1) {
+ u32 offset = (max_size + min_size) / 2;
+ u32 len = 1;
+ u8 data;
+
+ status = ixgbe_read_flat_nvm(hw, offset, &len, &data, false);
+ if (status == IXGBE_ERR_ACI_ERROR &&
+ hw->aci.last_status == IXGBE_ACI_RC_EINVAL) {
+ status = IXGBE_SUCCESS;
+ max_size = offset;
+ } else if (!status) {
+ min_size = offset;
+ } else {
+ /* an unexpected error occurred */
+ goto err_read_flat_nvm;
+ }
+ }
+
+ hw->flash.flash_size = max_size;
+
+err_read_flat_nvm:
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_determine_active_flash_banks - Discover active bank for each module
+ * @hw: pointer to the HW struct
+ *
+ * Read the Shadow RAM control word and determine which banks are active for
+ * the NVM, OROM, and Netlist modules. Also read and calculate the associated
+ * pointer and size. These values are then cached into the ixgbe_flash_info
+ * structure for later use in order to calculate the correct offset to read
+ * from the active module.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_determine_active_flash_banks(struct ixgbe_hw *hw)
+{
+ struct ixgbe_bank_info *banks = &hw->flash.banks;
+ u16 ctrl_word;
+ s32 status;
+
+ status = ixgbe_read_ee_aci_E610(hw, E610_SR_NVM_CTRL_WORD, &ctrl_word);
+ if (status) {
+ return status;
+ }
+
+ /* Check that the control word indicates validity */
+ if ((ctrl_word & IXGBE_SR_CTRL_WORD_1_M) >> IXGBE_SR_CTRL_WORD_1_S !=
+ IXGBE_SR_CTRL_WORD_VALID) {
+ return IXGBE_ERR_CONFIG;
+ }
+
+ if (!(ctrl_word & IXGBE_SR_CTRL_WORD_NVM_BANK))
+ banks->nvm_bank = IXGBE_1ST_FLASH_BANK;
+ else
+ banks->nvm_bank = IXGBE_2ND_FLASH_BANK;
+
+ if (!(ctrl_word & IXGBE_SR_CTRL_WORD_OROM_BANK))
+ banks->orom_bank = IXGBE_1ST_FLASH_BANK;
+ else
+ banks->orom_bank = IXGBE_2ND_FLASH_BANK;
+
+ if (!(ctrl_word & IXGBE_SR_CTRL_WORD_NETLIST_BANK))
+ banks->netlist_bank = IXGBE_1ST_FLASH_BANK;
+ else
+ banks->netlist_bank = IXGBE_2ND_FLASH_BANK;
+
+ status = ixgbe_read_sr_pointer(hw, E610_SR_1ST_NVM_BANK_PTR,
+ &banks->nvm_ptr);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_read_sr_area_size(hw, E610_SR_NVM_BANK_SIZE,
+ &banks->nvm_size);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_read_sr_pointer(hw, E610_SR_1ST_OROM_BANK_PTR,
+ &banks->orom_ptr);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_read_sr_area_size(hw, E610_SR_OROM_BANK_SIZE,
+ &banks->orom_size);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_read_sr_pointer(hw, E610_SR_NETLIST_BANK_PTR,
+ &banks->netlist_ptr);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_read_sr_area_size(hw, E610_SR_NETLIST_BANK_SIZE,
+ &banks->netlist_size);
+ if (status) {
+ return status;
+ }
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_init_nvm - initializes NVM setting
+ * @hw: pointer to the HW struct
+ *
+ * Read and populate NVM settings such as Shadow RAM size,
+ * max_timeout, and blank_nvm_mode
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_init_nvm(struct ixgbe_hw *hw)
+{
+ struct ixgbe_flash_info *flash = &hw->flash;
+ u32 fla, gens_stat, status;
+ u8 sr_size;
+
+ /* The SR size is stored regardless of the NVM programming mode
+ * as the blank mode may be used in the factory line.
+ */
+ gens_stat = IXGBE_READ_REG(hw, GLNVM_GENS);
+ sr_size = (gens_stat & GLNVM_GENS_SR_SIZE_M) >> GLNVM_GENS_SR_SIZE_S;
+
+ /* Switching to words (sr_size contains power of 2) */
+ flash->sr_words = BIT(sr_size) * IXGBE_SR_WORDS_IN_1KB;
+
+ /* Check if we are in the normal or blank NVM programming mode */
+ fla = IXGBE_READ_REG(hw, GLNVM_FLA);
+ if (fla & GLNVM_FLA_LOCKED_M) { /* Normal programming mode */
+ flash->blank_nvm_mode = false;
+ } else {
+ /* Blank programming mode */
+ flash->blank_nvm_mode = true;
+ return IXGBE_ERR_NVM_BLANK_MODE;
+ }
+
+ status = ixgbe_discover_flash_size(hw);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_determine_active_flash_banks(hw);
+ if (status) {
+ return status;
+ }
+
+ status = ixgbe_get_nvm_ver_info(hw, IXGBE_ACTIVE_FLASH_BANK,
+ &flash->nvm);
+ if (status) {
+ return status;
+ }
+
+ /* read the netlist version information */
+ status = ixgbe_get_netlist_info(hw, IXGBE_ACTIVE_FLASH_BANK,
+ &flash->netlist);
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_sanitize_operate - Clear the user data
+ * @hw: pointer to the HW struct
+ *
+ * Clear user data from NVM using ACI command (0x070C).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_sanitize_operate(struct ixgbe_hw *hw)
+{
+ s32 status;
+ u8 values;
+
+ u8 cmd_flags = IXGBE_ACI_SANITIZE_REQ_OPERATE |
+ IXGBE_ACI_SANITIZE_OPERATE_SUBJECT_CLEAR;
+
+ status = ixgbe_sanitize_nvm(hw, cmd_flags, &values);
+ if (status)
+ return status;
+ if ((!(values & IXGBE_ACI_SANITIZE_OPERATE_HOST_CLEAN_DONE) &&
+ !(values & IXGBE_ACI_SANITIZE_OPERATE_BMC_CLEAN_DONE)) ||
+ ((values & IXGBE_ACI_SANITIZE_OPERATE_HOST_CLEAN_DONE) &&
+ !(values & IXGBE_ACI_SANITIZE_OPERATE_HOST_CLEAN_SUCCESS)) ||
+ ((values & IXGBE_ACI_SANITIZE_OPERATE_BMC_CLEAN_DONE) &&
+ !(values & IXGBE_ACI_SANITIZE_OPERATE_BMC_CLEAN_SUCCESS)))
+ return IXGBE_ERR_ACI_ERROR;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_sanitize_nvm - Sanitize NVM
+ * @hw: pointer to the HW struct
+ * @cmd_flags: flag to the ACI command
+ * @values: values returned from the command
+ *
+ * Sanitize NVM using ACI command (0x070C).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_sanitize_nvm(struct ixgbe_hw *hw, u8 cmd_flags, u8 *values)
+{
+ struct ixgbe_aci_desc desc;
+ struct ixgbe_aci_cmd_nvm_sanitization *cmd;
+ s32 status;
+
+ cmd = &desc.params.nvm_sanitization;
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_nvm_sanitization);
+ cmd->cmd_flags = cmd_flags;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (values)
+ *values = cmd->values;
+
+ return status;
+}
+
+/**
+ * ixgbe_read_sr_word_aci - Reads Shadow RAM via ACI
+ * @hw: pointer to the HW structure
+ * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
+ * @data: word read from the Shadow RAM
+ *
+ * Reads one 16 bit word from the Shadow RAM using ixgbe_read_flat_nvm.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_sr_word_aci(struct ixgbe_hw *hw, u16 offset, u16 *data)
+{
+ u32 bytes = sizeof(u16);
+ __le16 data_local;
+ s32 status;
+
+ status = ixgbe_read_flat_nvm(hw, offset * sizeof(u16), &bytes,
+ (u8 *)&data_local, true);
+ if (status)
+ return status;
+
+ *data = IXGBE_LE16_TO_CPU(data_local);
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_read_sr_buf_aci - Reads Shadow RAM buf via ACI
+ * @hw: pointer to the HW structure
+ * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
+ * @words: (in) number of words to read; (out) number of words actually read
+ * @data: words read from the Shadow RAM
+ *
+ * Reads 16 bit words (data buf) from the Shadow RAM. Ownership of the NVM is
+ * taken before reading the buffer and later released.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_sr_buf_aci(struct ixgbe_hw *hw, u16 offset, u16 *words,
+ u16 *data)
+{
+ u32 bytes = *words * 2, i;
+ s32 status;
+
+ status = ixgbe_read_flat_nvm(hw, offset * 2, &bytes, (u8 *)data, true);
+
+ *words = bytes / 2;
+
+ for (i = 0; i < *words; i++)
+ data[i] = IXGBE_LE16_TO_CPU(((__le16 *)data)[i]);
+
+ return status;
+}
+
+/**
+ * ixgbe_read_flat_nvm - Read portion of NVM by flat offset
+ * @hw: pointer to the HW struct
+ * @offset: offset from beginning of NVM
+ * @length: (in) number of bytes to read; (out) number of bytes actually read
+ * @data: buffer to return data in (sized to fit the specified length)
+ * @read_shadow_ram: if true, read from shadow RAM instead of NVM
+ *
+ * Reads a portion of the NVM, as a flat memory space. This function correctly
+ * breaks read requests across Shadow RAM sectors, prevents Shadow RAM size
+ * from being exceeded in case of Shadow RAM read requests and ensures that no
+ * single read request exceeds the maximum 4KB read for a single admin command.
+ *
+ * Returns a status code on failure. Note that the data pointer may be
+ * partially updated if some reads succeed before a failure.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_flat_nvm(struct ixgbe_hw *hw, u32 offset, u32 *length,
+ u8 *data, bool read_shadow_ram)
+{
+ u32 inlen = *length;
+ u32 bytes_read = 0;
+ bool last_cmd;
+ s32 status;
+
+ *length = 0;
+
+ /* Verify the length of the read if this is for the Shadow RAM */
+ if (read_shadow_ram && ((offset + inlen) >
+ (hw->eeprom.word_size * 2u))) {
+ return IXGBE_ERR_PARAM;
+ }
+
+ do {
+ u32 read_size, sector_offset;
+
+ /* ixgbe_aci_read_nvm cannot read more than 4KB at a time.
+ * Additionally, a read from the Shadow RAM may not cross over
+ * a sector boundary. Conveniently, the sector size is also 4KB.
+ */
+ sector_offset = offset % IXGBE_ACI_MAX_BUFFER_SIZE;
+ read_size = MIN_T(u32,
+ IXGBE_ACI_MAX_BUFFER_SIZE - sector_offset,
+ inlen - bytes_read);
+
+ last_cmd = !(bytes_read + read_size < inlen);
+
+ /* ixgbe_aci_read_nvm takes the length as a u16. Our read_size
+ * is calculated using a u32, but the IXGBE_ACI_MAX_BUFFER_SIZE
+ * maximum size guarantees that it will fit within the 2 bytes.
+ */
+ status = ixgbe_aci_read_nvm(hw, IXGBE_ACI_NVM_START_POINT,
+ offset, (u16)read_size,
+ data + bytes_read, last_cmd,
+ read_shadow_ram);
+ if (status)
+ break;
+
+ bytes_read += read_size;
+ offset += read_size;
+ } while (!last_cmd);
+
+ *length = bytes_read;
+ return status;
+}
+
+/**
+ * ixgbe_check_sr_access_params - verify params for Shadow RAM R/W operations.
+ * @hw: pointer to the HW structure
+ * @offset: offset in words from module start
+ * @words: number of words to access
+ *
+ * Check if all the parameters are valid
+ * before performing any Shadow RAM read/write operations.
+ *
+ * Return: the exit code of the operation.
+ * * - IXGBE_SUCCESS - success.
+ * * - IXGBE_ERR_PARAM - NVM error: offset beyond SR limit or
+ * NVM error: tried to access more words then the set limit or
+ * NVM error: cannot spread over two sectors.
+ */
+static s32 ixgbe_check_sr_access_params(struct ixgbe_hw *hw, u32 offset,
+ u16 words)
+{
+ if ((offset + words) > hw->eeprom.word_size) {
+ return IXGBE_ERR_PARAM;
+ }
+
+ if (words > IXGBE_SR_SECTOR_SIZE_IN_WORDS) {
+ /* We can access only up to 4KB (one sector),
+ * in one Admin Command write
+ */
+ return IXGBE_ERR_PARAM;
+ }
+
+ if (((offset + (words - 1)) / IXGBE_SR_SECTOR_SIZE_IN_WORDS) !=
+ (offset / IXGBE_SR_SECTOR_SIZE_IN_WORDS)) {
+ /* A single access cannot spread over two sectors */
+ return IXGBE_ERR_PARAM;
+ }
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_write_sr_word_aci - Writes Shadow RAM word
+ * @hw: pointer to the HW structure
+ * @offset: offset of the Shadow RAM word to write
+ * @data: word to write to the Shadow RAM
+ *
+ * Writes a 16 bit word to the Shadow RAM using the admin command.
+ * NVM ownership must be acquired before calling this function and released
+ * by a caller. To commit SR to NVM update checksum function should be called.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_write_sr_word_aci(struct ixgbe_hw *hw, u32 offset, const u16 *data)
+{
+ __le16 data_local = IXGBE_CPU_TO_LE16(*data);
+ s32 status;
+
+ status = ixgbe_check_sr_access_params(hw, offset, 1);
+ if (!status)
+ status = ixgbe_aci_update_nvm(hw, 0, BYTES_PER_WORD * offset,
+ BYTES_PER_WORD, &data_local,
+ false, 0);
+
+ return status;
+}
+
+/**
+ * ixgbe_write_sr_buf_aci - Writes Shadow RAM buf
+ * @hw: pointer to the HW structure
+ * @offset: offset of the Shadow RAM buffer to write
+ * @words: number of words to write
+ * @data: words to write to the Shadow RAM
+ *
+ * Writes a 16 bit word to the Shadow RAM using the admin command.
+ * NVM ownership must be acquired before calling this function and released
+ * by a caller. To commit SR to NVM update checksum function should be called.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_write_sr_buf_aci(struct ixgbe_hw *hw, u32 offset, u16 words,
+ const u16 *data)
+{
+ __le16 *data_local;
+ s32 status;
+ void *vmem;
+ u32 i;
+
+ vmem = ixgbe_calloc(hw, words, sizeof(u16));
+ if (!vmem)
+ return IXGBE_ERR_OUT_OF_MEM;
+ data_local = (__le16 *)vmem;
+
+ for (i = 0; i < words; i++)
+ data_local[i] = IXGBE_CPU_TO_LE16(data[i]);
+
+ /* Here we will only write one buffer as the size of the modules
+ * mirrored in the Shadow RAM is always less than 4K.
+ */
+ status = ixgbe_check_sr_access_params(hw, offset, words);
+ if (!status)
+ status = ixgbe_aci_update_nvm(hw, 0, BYTES_PER_WORD * offset,
+ BYTES_PER_WORD * words,
+ data_local, false, 0);
+
+ ixgbe_free(hw, vmem);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_alternate_write - write to alternate structure
+ * @hw: pointer to the hardware structure
+ * @reg_addr0: address of first dword to be written
+ * @reg_val0: value to be written under 'reg_addr0'
+ * @reg_addr1: address of second dword to be written
+ * @reg_val1: value to be written under 'reg_addr1'
+ *
+ * Write one or two dwords to alternate structure using ACI command (0x0900).
+ * Fields are indicated by 'reg_addr0' and 'reg_addr1' register numbers.
+ *
+ * Return: 0 on success and error code on failure.
+ */
+s32 ixgbe_aci_alternate_write(struct ixgbe_hw *hw, u32 reg_addr0,
+ u32 reg_val0, u32 reg_addr1, u32 reg_val1)
+{
+ struct ixgbe_aci_cmd_read_write_alt_direct *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.read_write_alt_direct;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_write_alt_direct);
+ cmd->dword0_addr = IXGBE_CPU_TO_LE32(reg_addr0);
+ cmd->dword1_addr = IXGBE_CPU_TO_LE32(reg_addr1);
+ cmd->dword0_value = IXGBE_CPU_TO_LE32(reg_val0);
+ cmd->dword1_value = IXGBE_CPU_TO_LE32(reg_val1);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_alternate_read - read from alternate structure
+ * @hw: pointer to the hardware structure
+ * @reg_addr0: address of first dword to be read
+ * @reg_val0: pointer for data read from 'reg_addr0'
+ * @reg_addr1: address of second dword to be read
+ * @reg_val1: pointer for data read from 'reg_addr1'
+ *
+ * Read one or two dwords from alternate structure using ACI command (0x0902).
+ * Fields are indicated by 'reg_addr0' and 'reg_addr1' register numbers.
+ * If 'reg_val1' pointer is not passed then only register at 'reg_addr0'
+ * is read.
+ *
+ * Return: 0 on success and error code on failure.
+ */
+s32 ixgbe_aci_alternate_read(struct ixgbe_hw *hw, u32 reg_addr0,
+ u32 *reg_val0, u32 reg_addr1, u32 *reg_val1)
+{
+ struct ixgbe_aci_cmd_read_write_alt_direct *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.read_write_alt_direct;
+
+ if (!reg_val0)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_read_alt_direct);
+ cmd->dword0_addr = IXGBE_CPU_TO_LE32(reg_addr0);
+ cmd->dword1_addr = IXGBE_CPU_TO_LE32(reg_addr1);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ if (status == IXGBE_SUCCESS) {
+ *reg_val0 = IXGBE_LE32_TO_CPU(cmd->dword0_value);
+
+ if (reg_val1)
+ *reg_val1 = IXGBE_LE32_TO_CPU(cmd->dword1_value);
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_alternate_write_done - check if writing to alternate structure
+ * is done
+ * @hw: pointer to the HW structure.
+ * @bios_mode: indicates whether the command is executed by UEFI or legacy BIOS
+ * @reset_needed: indicates the SW should trigger GLOBAL reset
+ *
+ * Indicates to the FW that alternate structures have been changed.
+ *
+ * Return: 0 on success and error code on failure.
+ */
+s32 ixgbe_aci_alternate_write_done(struct ixgbe_hw *hw, u8 bios_mode,
+ bool *reset_needed)
+{
+ struct ixgbe_aci_cmd_done_alt_write *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.done_alt_write;
+
+ if (!reset_needed)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_done_alt_write);
+ cmd->flags = bios_mode;
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+ if (!status)
+ *reset_needed = (IXGBE_LE16_TO_CPU(cmd->flags) &
+ IXGBE_ACI_RESP_RESET_NEEDED) != 0;
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_alternate_clear - clear alternate structure
+ * @hw: pointer to the HW structure.
+ *
+ * Clear the alternate structures of the port from which the function
+ * is called.
+ *
+ * Return: 0 on success and error code on failure.
+ */
+s32 ixgbe_aci_alternate_clear(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc,
+ ixgbe_aci_opc_clear_port_alt_write);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+
+ return status;
+}
+
+/**
+ * ixgbe_aci_get_internal_data - get internal FW/HW data
+ * @hw: pointer to the hardware structure
+ * @cluster_id: specific cluster to dump
+ * @table_id: table ID within cluster
+ * @start: index of line in the block to read
+ * @buf: dump buffer
+ * @buf_size: dump buffer size
+ * @ret_buf_size: return buffer size (returned by FW)
+ * @ret_next_cluster: next cluster to read (returned by FW)
+ * @ret_next_table: next block to read (returned by FW)
+ * @ret_next_index: next index to read (returned by FW)
+ *
+ * Get internal FW/HW data using ACI command (0xFF08) for debug purposes.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_get_internal_data(struct ixgbe_hw *hw, u16 cluster_id,
+ u16 table_id, u32 start, void *buf,
+ u16 buf_size, u16 *ret_buf_size,
+ u16 *ret_next_cluster, u16 *ret_next_table,
+ u32 *ret_next_index)
+{
+ struct ixgbe_aci_cmd_debug_dump_internals *cmd;
+ struct ixgbe_aci_desc desc;
+ s32 status;
+
+ cmd = &desc.params.debug_dump;
+
+ if (buf_size == 0 || !buf)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc,
+ ixgbe_aci_opc_debug_dump_internals);
+
+ cmd->cluster_id = IXGBE_CPU_TO_LE16(cluster_id);
+ cmd->table_id = IXGBE_CPU_TO_LE16(table_id);
+ cmd->idx = IXGBE_CPU_TO_LE32(start);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, buf, buf_size);
+
+ if (!status) {
+ if (ret_buf_size)
+ *ret_buf_size = IXGBE_LE16_TO_CPU(desc.datalen);
+ if (ret_next_cluster)
+ *ret_next_cluster = IXGBE_LE16_TO_CPU(cmd->cluster_id);
+ if (ret_next_table)
+ *ret_next_table = IXGBE_LE16_TO_CPU(cmd->table_id);
+ if (ret_next_index)
+ *ret_next_index = IXGBE_LE32_TO_CPU(cmd->idx);
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_validate_nvm_rw_reg - Check that an NVM access request is valid
+ * @cmd: NVM access command structure
+ *
+ * Validates that an NVM access structure is request to read or write a valid
+ * register offset. First validates that the module and flags are correct, and
+ * then ensures that the register offset is one of the accepted registers.
+ *
+ * Return: 0 if the register access is valid, out of range error code otherwise.
+ */
+static s32
+ixgbe_validate_nvm_rw_reg(struct ixgbe_nvm_access_cmd *cmd)
+{
+ u16 i;
+
+ switch (cmd->offset) {
+ case GL_HICR:
+ case GL_HICR_EN: /* Note, this register is read only */
+ case GL_FWSTS:
+ case GL_MNG_FWSM:
+ case GLNVM_GENS:
+ case GLNVM_FLA:
+ case GL_FWRESETCNT:
+ return 0;
+ default:
+ break;
+ }
+
+ for (i = 0; i <= GL_HIDA_MAX_INDEX; i++)
+ if (cmd->offset == (u32)GL_HIDA(i))
+ return 0;
+
+ for (i = 0; i <= GL_HIBA_MAX_INDEX; i++)
+ if (cmd->offset == (u32)GL_HIBA(i))
+ return 0;
+
+ /* All other register offsets are not valid */
+ return IXGBE_ERR_OUT_OF_RANGE;
+}
+
+/**
+ * ixgbe_nvm_access_read - Handle an NVM read request
+ * @hw: pointer to the HW struct
+ * @cmd: NVM access command to process
+ * @data: storage for the register value read
+ *
+ * Process an NVM access request to read a register.
+ *
+ * Return: 0 if the register read is valid and successful,
+ * out of range error code otherwise.
+ */
+static s32 ixgbe_nvm_access_read(struct ixgbe_hw *hw,
+ struct ixgbe_nvm_access_cmd *cmd,
+ struct ixgbe_nvm_access_data *data)
+{
+ s32 status;
+
+ /* Always initialize the output data, even on failure */
+ memset(&data->regval, 0, cmd->data_size);
+
+ /* Make sure this is a valid read/write access request */
+ status = ixgbe_validate_nvm_rw_reg(cmd);
+ if (status)
+ return status;
+
+ DEBUGOUT1("NVM access: reading register %08x\n", cmd->offset);
+
+ /* Read the register and store the contents in the data field */
+ data->regval = IXGBE_READ_REG(hw, cmd->offset);
+
+ return 0;
+}
+
+/**
+ * ixgbe_nvm_access_write - Handle an NVM write request
+ * @hw: pointer to the HW struct
+ * @cmd: NVM access command to process
+ * @data: NVM access data to write
+ *
+ * Process an NVM access request to write a register.
+ *
+ * Return: 0 if the register write is valid and successful,
+ * out of range error code otherwise.
+ */
+static s32 ixgbe_nvm_access_write(struct ixgbe_hw *hw,
+ struct ixgbe_nvm_access_cmd *cmd,
+ struct ixgbe_nvm_access_data *data)
+{
+ s32 status;
+
+ /* Make sure this is a valid read/write access request */
+ status = ixgbe_validate_nvm_rw_reg(cmd);
+ if (status)
+ return status;
+
+ /* Reject requests to write to read-only registers */
+ switch (cmd->offset) {
+ case GL_HICR_EN:
+ return IXGBE_ERR_OUT_OF_RANGE;
+ default:
+ break;
+ }
+
+ DEBUGOUT2("NVM access: writing register %08x with value %08x\n",
+ cmd->offset, data->regval);
+
+ /* Write the data field to the specified register */
+ IXGBE_WRITE_REG(hw, cmd->offset, data->regval);
+
+ return 0;
+}
+
+/**
+ * ixgbe_handle_nvm_access - Handle an NVM access request
+ * @hw: pointer to the HW struct
+ * @cmd: NVM access command info
+ * @data: pointer to read or return data
+ *
+ * Process an NVM access request. Read the command structure information and
+ * determine if it is valid. If not, report an error indicating the command
+ * was invalid.
+ *
+ * For valid commands, perform the necessary function, copying the data into
+ * the provided data buffer.
+ *
+ * Return: 0 if the nvm access request is valid and successful,
+ * error code otherwise.
+ */
+s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw,
+ struct ixgbe_nvm_access_cmd *cmd,
+ struct ixgbe_nvm_access_data *data)
+{
+ switch (cmd->command) {
+ case IXGBE_NVM_CMD_READ:
+ return ixgbe_nvm_access_read(hw, cmd, data);
+ case IXGBE_NVM_CMD_WRITE:
+ return ixgbe_nvm_access_write(hw, cmd, data);
+ default:
+ return IXGBE_ERR_PARAM;
+ }
+}
+
+/**
+ * ixgbe_aci_set_health_status_config - Configure FW health events
+ * @hw: pointer to the HW struct
+ * @event_source: type of diagnostic events to enable
+ *
+ * Configure the health status event types that the firmware will send to this
+ * PF using ACI command (0xFF20). The supported event types are: PF-specific,
+ * all PFs, and global.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_aci_set_health_status_config(struct ixgbe_hw *hw, u8 event_source)
+{
+ struct ixgbe_aci_cmd_set_health_status_config *cmd;
+ struct ixgbe_aci_desc desc;
+
+ cmd = &desc.params.set_health_status_config;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc,
+ ixgbe_aci_opc_set_health_status_config);
+
+ cmd->event_source = event_source;
+
+ return ixgbe_aci_send_cmd(hw, &desc, NULL, 0);
+}
+
+/**
+ * ixgbe_init_ops_E610 - Inits func ptrs and MAC type
+ * @hw: pointer to hardware structure
+ *
+ * Initialize the function pointers and assign the MAC type for E610.
+ * Does not touch the hardware.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
+ struct ixgbe_mac_info *mac = &hw->mac;
+ struct ixgbe_phy_info *phy = &hw->phy;
+ s32 ret_val;
+
+ ret_val = ixgbe_init_ops_X550(hw);
+
+ /* MAC */
+ mac->ops.reset_hw = ixgbe_reset_hw_E610;
+ mac->ops.start_hw = ixgbe_start_hw_E610;
+ mac->ops.get_media_type = ixgbe_get_media_type_E610;
+ mac->ops.get_supported_physical_layer =
+ ixgbe_get_supported_physical_layer_E610;
+ mac->ops.get_san_mac_addr = NULL;
+ mac->ops.set_san_mac_addr = NULL;
+ mac->ops.get_wwn_prefix = NULL;
+ mac->ops.setup_link = ixgbe_setup_link_E610;
+ mac->ops.check_link = ixgbe_check_link_E610;
+ mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_E610;
+ mac->ops.setup_fc = ixgbe_setup_fc_E610;
+ mac->ops.fc_autoneg = ixgbe_fc_autoneg_E610;
+ mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_E610;
+ mac->ops.disable_rx = ixgbe_disable_rx_E610;
+ mac->ops.setup_eee = ixgbe_setup_eee_E610;
+ mac->ops.fw_recovery_mode = ixgbe_fw_recovery_mode_E610;
+ mac->ops.fw_rollback_mode = ixgbe_fw_rollback_mode_E610;
+ mac->ops.get_fw_tsam_mode = ixgbe_get_fw_tsam_mode_E610;
+ mac->ops.get_fw_version = ixgbe_aci_get_fw_ver;
+ mac->ops.get_nvm_version = ixgbe_get_active_nvm_ver;
+ mac->ops.get_thermal_sensor_data = NULL;
+ mac->ops.init_thermal_sensor_thresh = NULL;
+
+ /* PHY */
+ phy->ops.init = ixgbe_init_phy_ops_E610;
+ phy->ops.identify = ixgbe_identify_phy_E610;
+ phy->eee_speeds_supported = IXGBE_LINK_SPEED_10_FULL |
+ IXGBE_LINK_SPEED_100_FULL |
+ IXGBE_LINK_SPEED_1GB_FULL;
+ phy->eee_speeds_advertised = phy->eee_speeds_supported;
+
+ /* Additional ops overrides for e610 to go here */
+ eeprom->ops.init_params = ixgbe_init_eeprom_params_E610;
+ eeprom->ops.read = ixgbe_read_ee_aci_E610;
+ eeprom->ops.read_buffer = ixgbe_read_ee_aci_buffer_E610;
+ eeprom->ops.write = ixgbe_write_ee_aci_E610;
+ eeprom->ops.write_buffer = ixgbe_write_ee_aci_buffer_E610;
+ eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_E610;
+ eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_E610;
+ eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_E610;
+ eeprom->ops.read_pba_string = ixgbe_read_pba_string_E610;
+
+ /* Initialize bus function number */
+ hw->mac.ops.set_lan_id(hw);
+
+ return ret_val;
+}
+
+/**
+ * ixgbe_reset_hw_E610 - Perform hardware reset
+ * @hw: pointer to hardware structure
+ *
+ * Resets the hardware by resetting the transmit and receive units, masks
+ * and clears all interrupts, and perform a reset.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_reset_hw_E610(struct ixgbe_hw *hw)
+{
+ u32 swfw_mask = hw->phy.phy_semaphore_mask;
+ u32 ctrl, i;
+ s32 status;
+
+ DEBUGFUNC("ixgbe_reset_hw_E610");
+
+ /* Call adapter stop to disable tx/rx and clear interrupts */
+ status = hw->mac.ops.stop_adapter(hw);
+ if (status != IXGBE_SUCCESS)
+ goto reset_hw_out;
+
+ /* flush pending Tx transactions */
+ ixgbe_clear_tx_pending(hw);
+
+ status = hw->phy.ops.init(hw);
+ if (status != IXGBE_SUCCESS)
+ DEBUGOUT1("Failed to initialize PHY ops, STATUS = %d\n",
+ status);
+mac_reset_top:
+ status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask);
+ if (status != IXGBE_SUCCESS) {
+ ERROR_REPORT2(IXGBE_ERROR_CAUTION,
+ "semaphore failed with %d", status);
+ return IXGBE_ERR_SWFW_SYNC;
+ }
+ ctrl = IXGBE_CTRL_RST;
+ ctrl |= IXGBE_READ_REG(hw, IXGBE_CTRL);
+ IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl);
+ IXGBE_WRITE_FLUSH(hw);
+ hw->mac.ops.release_swfw_sync(hw, swfw_mask);
+
+ /* Poll for reset bit to self-clear indicating reset is complete */
+ for (i = 0; i < 10; i++) {
+ usec_delay(1);
+ ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
+ if (!(ctrl & IXGBE_CTRL_RST_MASK))
+ break;
+ }
+
+ if (ctrl & IXGBE_CTRL_RST_MASK) {
+ status = IXGBE_ERR_RESET_FAILED;
+ ERROR_REPORT1(IXGBE_ERROR_POLLING,
+ "Reset polling failed to complete.\n");
+ }
+ msec_delay(100);
+
+ /*
+ * Double resets are required for recovery from certain error
+ * conditions. Between resets, it is necessary to stall to allow time
+ * for any pending HW events to complete.
+ */
+ if (hw->mac.flags & IXGBE_FLAGS_DOUBLE_RESET_REQUIRED) {
+ hw->mac.flags &= ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED;
+ goto mac_reset_top;
+ }
+
+ /* Set the Rx packet buffer size. */
+ IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(0), 384 << IXGBE_RXPBSIZE_SHIFT);
+
+ /* Store the permanent mac address */
+ hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr);
+
+ /*
+ * Store MAC address from RAR0, clear receive address registers, and
+ * clear the multicast table. Also reset num_rar_entries to 128,
+ * since we modify this value when programming the SAN MAC address.
+ */
+ hw->mac.num_rar_entries = 128;
+ hw->mac.ops.init_rx_addrs(hw);
+
+reset_hw_out:
+ return status;
+}
+
+/**
+ * ixgbe_start_hw_E610 - Prepare hardware for Tx/Rx
+ * @hw: pointer to hardware structure
+ *
+ * Gets firmware version and if API version matches it
+ * starts the hardware using the generic start_hw function
+ * and the generation start_hw function.
+ * Then performs revision-specific operations, if any.
+ **/
+s32 ixgbe_start_hw_E610(struct ixgbe_hw *hw)
+{
+ s32 ret_val = IXGBE_SUCCESS;
+
+ ret_val = hw->mac.ops.get_fw_version(hw);
+ if (ret_val)
+ goto out;
+
+ ret_val = ixgbe_start_hw_generic(hw);
+ if (ret_val != IXGBE_SUCCESS)
+ goto out;
+
+ ixgbe_start_hw_gen2(hw);
+
+out:
+ return ret_val;
+}
+
+/**
+ * ixgbe_get_media_type_E610 - Gets media type
+ * @hw: pointer to the HW struct
+ *
+ * In order to get the media type, the function gets PHY
+ * capabilities and later on use them to identify the PHY type
+ * checking phy_type_high and phy_type_low.
+ *
+ * Return: the type of media in form of ixgbe_media_type enum
+ * or ixgbe_media_type_unknown in case of an error.
+ */
+enum ixgbe_media_type ixgbe_get_media_type_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps;
+ u64 phy_mask = 0;
+ s32 rc;
+ u8 i;
+
+ rc = ixgbe_update_link_info(hw);
+ if (rc) {
+ return ixgbe_media_type_unknown;
+ }
+
+ /* If there is no link but PHY (dongle) is available SW should use
+ * Get PHY Caps admin command instead of Get Link Status, find most
+ * significant bit that is set in PHY types reported by the command
+ * and use it to discover media type.
+ */
+ if (!(hw->link.link_info.link_info & IXGBE_ACI_LINK_UP) &&
+ (hw->link.link_info.link_info & IXGBE_ACI_MEDIA_AVAILABLE)) {
+ /* Get PHY Capabilities */
+ rc = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_TOPO_CAP_MEDIA,
+ &pcaps);
+ if (rc) {
+ return ixgbe_media_type_unknown;
+ }
+
+ /* Check if there is some bit set in phy_type_high */
+ for (i = 64; i > 0; i--) {
+ phy_mask = (u64)((u64)1 << (i - 1));
+ if ((pcaps.phy_type_high & phy_mask) != 0) {
+ /* If any bit is set treat it as PHY type */
+ hw->link.link_info.phy_type_high = phy_mask;
+ hw->link.link_info.phy_type_low = 0;
+ break;
+ }
+ phy_mask = 0;
+ }
+
+ /* If nothing found in phy_type_high search in phy_type_low */
+ if (phy_mask == 0) {
+ for (i = 64; i > 0; i--) {
+ phy_mask = (u64)((u64)1 << (i - 1));
+ if ((pcaps.phy_type_low & phy_mask) != 0) {
+ /* If any bit is set treat it as PHY type */
+ hw->link.link_info.phy_type_high = 0;
+ hw->link.link_info.phy_type_low = phy_mask;
+ break;
+ }
+ }
+ }
+
+ }
+
+ /* Based on link status or search above try to discover media type */
+ hw->phy.media_type = ixgbe_get_media_type_from_phy_type(hw);
+
+ return hw->phy.media_type;
+}
+
+/**
+ * ixgbe_get_supported_physical_layer_E610 - Returns physical layer type
+ * @hw: pointer to hardware structure
+ *
+ * Determines physical layer capabilities of the current configuration.
+ *
+ * Return: the exit code of the operation.
+ **/
+u64 ixgbe_get_supported_physical_layer_E610(struct ixgbe_hw *hw)
+{
+ u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps;
+ u64 phy_type;
+ s32 rc;
+
+ rc = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_TOPO_CAP_MEDIA,
+ &pcaps);
+ if (rc)
+ return IXGBE_PHYSICAL_LAYER_UNKNOWN;
+
+ phy_type = IXGBE_LE64_TO_CPU(pcaps.phy_type_low);
+ if(phy_type & IXGBE_PHY_TYPE_LOW_10GBASE_T)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_T;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_1000BASE_T)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_100BASE_TX)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_100BASE_TX;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_10GBASE_LR)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_LR;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_10GBASE_SR)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_SR;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_1000BASE_KX)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_KX;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_10GBASE_KR;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_1000BASE_SX)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_SX;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_2500BASE_KX)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_2500BASE_KX;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_2500BASE_T)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_2500BASE_T;
+ if(phy_type & IXGBE_PHY_TYPE_LOW_5GBASE_T)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_5000BASE_T;
+
+ phy_type = IXGBE_LE64_TO_CPU(pcaps.phy_type_high);
+ if(phy_type & IXGBE_PHY_TYPE_HIGH_10BASE_T)
+ physical_layer |= IXGBE_PHYSICAL_LAYER_10BASE_T;
+
+ return physical_layer;
+}
+
+/**
+ * ixgbe_setup_link_E610 - Set up link
+ * @hw: pointer to hardware structure
+ * @speed: new link speed
+ * @autoneg_wait: true when waiting for completion is needed
+ *
+ * Set up the link with the specified speed.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_setup_link_E610(struct ixgbe_hw *hw, ixgbe_link_speed speed,
+ bool autoneg_wait)
+{
+ /* Simply request FW to perform proper PHY setup */
+ return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait);
+}
+
+/**
+ * ixgbe_check_link_E610 - Determine link and speed status
+ * @hw: pointer to hardware structure
+ * @speed: pointer to link speed
+ * @link_up: true when link is up
+ * @link_up_wait_to_complete: bool used to wait for link up or not
+ *
+ * Determine if the link is up and the current link speed
+ * using ACI command (0x0607).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_check_link_E610(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
+ bool *link_up, bool link_up_wait_to_complete)
+{
+ s32 rc;
+ u32 i;
+
+ if (!speed || !link_up)
+ return IXGBE_ERR_PARAM;
+
+ /* Set get_link_info flag to ensure that fresh
+ * link information will be obtained from FW
+ * by sending Get Link Status admin command. */
+ hw->link.get_link_info = true;
+
+ /* Update link information in adapter context. */
+ rc = ixgbe_get_link_status(hw, link_up);
+ if (rc)
+ return rc;
+
+ /* Wait for link up if it was requested. */
+ if (link_up_wait_to_complete && *link_up == false) {
+ for (i = 0; i < hw->mac.max_link_up_time; i++) {
+ msec_delay(100);
+ hw->link.get_link_info = true;
+ rc = ixgbe_get_link_status(hw, link_up);
+ if (rc)
+ return rc;
+ if (*link_up)
+ break;
+ }
+ }
+
+ /* Use link information in adapter context updated by the call
+ * to ixgbe_get_link_status() to determine current link speed.
+ * Link speed information is valid only when link up was
+ * reported by FW. */
+ if (*link_up) {
+ switch (hw->link.link_info.link_speed) {
+ case IXGBE_ACI_LINK_SPEED_10MB:
+ *speed = IXGBE_LINK_SPEED_10_FULL;
+ break;
+ case IXGBE_ACI_LINK_SPEED_100MB:
+ *speed = IXGBE_LINK_SPEED_100_FULL;
+ break;
+ case IXGBE_ACI_LINK_SPEED_1000MB:
+ *speed = IXGBE_LINK_SPEED_1GB_FULL;
+ break;
+ case IXGBE_ACI_LINK_SPEED_2500MB:
+ *speed = IXGBE_LINK_SPEED_2_5GB_FULL;
+ break;
+ case IXGBE_ACI_LINK_SPEED_5GB:
+ *speed = IXGBE_LINK_SPEED_5GB_FULL;
+ break;
+ case IXGBE_ACI_LINK_SPEED_10GB:
+ *speed = IXGBE_LINK_SPEED_10GB_FULL;
+ break;
+ default:
+ *speed = IXGBE_LINK_SPEED_UNKNOWN;
+ break;
+ }
+ } else {
+ *speed = IXGBE_LINK_SPEED_UNKNOWN;
+ }
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_get_link_capabilities_E610 - Determine link capabilities
+ * @hw: pointer to hardware structure
+ * @speed: pointer to link speed
+ * @autoneg: true when autoneg or autotry is enabled
+ *
+ * Determine speed and AN parameters of a link.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_link_capabilities_E610(struct ixgbe_hw *hw,
+ ixgbe_link_speed *speed,
+ bool *autoneg)
+{
+ if (!speed || !autoneg)
+ return IXGBE_ERR_PARAM;
+
+ *autoneg = true;
+ *speed = hw->phy.speeds_supported;
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_cfg_phy_fc - Configure PHY Flow Control (FC) data based on FC mode
+ * @hw: pointer to hardware structure
+ * @cfg: PHY configuration data to set FC mode
+ * @req_mode: FC mode to configure
+ *
+ * Configures PHY Flow Control according to the provided configuration.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_cfg_phy_fc(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg,
+ enum ixgbe_fc_mode req_mode)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data* pcaps = NULL;
+ s32 status = IXGBE_SUCCESS;
+ u8 pause_mask = 0x0;
+
+ if (!cfg)
+ return IXGBE_ERR_PARAM;
+
+ switch (req_mode) {
+ case ixgbe_fc_auto:
+ {
+ pcaps = (struct ixgbe_aci_cmd_get_phy_caps_data *)
+ ixgbe_malloc(hw, sizeof(*pcaps));
+ if (!pcaps) {
+ status = IXGBE_ERR_OUT_OF_MEM;
+ goto out;
+ }
+
+ /* Query the value of FC that both the NIC and the attached
+ * media can do. */
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_TOPO_CAP_MEDIA, pcaps);
+ if (status)
+ goto out;
+
+ pause_mask |= pcaps->caps & IXGBE_ACI_PHY_EN_TX_LINK_PAUSE;
+ pause_mask |= pcaps->caps & IXGBE_ACI_PHY_EN_RX_LINK_PAUSE;
+
+ break;
+ }
+ case ixgbe_fc_full:
+ pause_mask |= IXGBE_ACI_PHY_EN_TX_LINK_PAUSE;
+ pause_mask |= IXGBE_ACI_PHY_EN_RX_LINK_PAUSE;
+ break;
+ case ixgbe_fc_rx_pause:
+ pause_mask |= IXGBE_ACI_PHY_EN_RX_LINK_PAUSE;
+ break;
+ case ixgbe_fc_tx_pause:
+ pause_mask |= IXGBE_ACI_PHY_EN_TX_LINK_PAUSE;
+ break;
+ default:
+ break;
+ }
+
+ /* clear the old pause settings */
+ cfg->caps &= ~(IXGBE_ACI_PHY_EN_TX_LINK_PAUSE |
+ IXGBE_ACI_PHY_EN_RX_LINK_PAUSE);
+
+ /* set the new capabilities */
+ cfg->caps |= pause_mask;
+
+out:
+ if (pcaps)
+ ixgbe_free(hw, pcaps);
+ return status;
+}
+
+/**
+ * ixgbe_setup_fc_E610 - Set up flow control
+ * @hw: pointer to hardware structure
+ *
+ * Set up flow control. This has to be done during init time.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_setup_fc_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps = { 0 };
+ struct ixgbe_aci_cmd_set_phy_cfg_data cfg = { 0 };
+ s32 status;
+
+ /* Get the current PHY config */
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_ACTIVE_CFG, &pcaps);
+ if (status)
+ return status;
+
+ ixgbe_copy_phy_caps_to_cfg(&pcaps, &cfg);
+
+ /* Configure the set PHY data */
+ status = ixgbe_cfg_phy_fc(hw, &cfg, hw->fc.requested_mode);
+ if (status)
+ return status;
+
+ /* If the capabilities have changed, then set the new config */
+ if (cfg.caps != pcaps.caps) {
+ cfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ status = ixgbe_aci_set_phy_cfg(hw, &cfg);
+ if (status)
+ return status;
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_fc_autoneg_E610 - Configure flow control
+ * @hw: pointer to hardware structure
+ *
+ * Configure Flow Control.
+ */
+void ixgbe_fc_autoneg_E610(struct ixgbe_hw *hw)
+{
+ s32 status;
+
+ /* Get current link status.
+ * Current FC mode will be stored in the hw context. */
+ status = ixgbe_aci_get_link_info(hw, false, NULL);
+ if (status) {
+ goto out;
+ }
+
+ /* Check if the link is up */
+ if (!(hw->link.link_info.link_info & IXGBE_ACI_LINK_UP)) {
+ status = IXGBE_ERR_FC_NOT_NEGOTIATED;
+ goto out;
+ }
+
+ /* Check if auto-negotiation has completed */
+ if (!(hw->link.link_info.an_info & IXGBE_ACI_AN_COMPLETED)) {
+ status = IXGBE_ERR_FC_NOT_NEGOTIATED;
+ goto out;
+ }
+
+out:
+ if (status == IXGBE_SUCCESS) {
+ hw->fc.fc_was_autonegged = true;
+ } else {
+ hw->fc.fc_was_autonegged = false;
+ hw->fc.current_mode = hw->fc.requested_mode;
+ }
+}
+
+/**
+ * ixgbe_set_fw_drv_ver_E610 - Send driver version to FW
+ * @hw: pointer to the HW structure
+ * @maj: driver version major number
+ * @minor: driver version minor number
+ * @build: driver version build number
+ * @sub: driver version sub build number
+ * @len: length of driver_ver string
+ * @driver_ver: driver string
+ *
+ * Send driver version number to Firmware using ACI command (0x0002).
+ *
+ * Return: the exit code of the operation.
+ * IXGBE_SUCCESS - OK
+ * IXGBE_ERR_PARAM - incorrect parameters were given
+ * IXGBE_ERR_ACI_ERROR - encountered an error during sending the command
+ * IXGBE_ERR_ACI_TIMEOUT - a timeout occurred
+ * IXGBE_ERR_OUT_OF_MEM - ran out of memory
+ */
+s32 ixgbe_set_fw_drv_ver_E610(struct ixgbe_hw *hw, u8 maj, u8 minor, u8 build,
+ u8 sub, u16 len, const char *driver_ver)
+{
+ size_t limited_len = min(len, (u16)IXGBE_DRV_VER_STR_LEN_E610);
+ struct ixgbe_driver_ver dv;
+
+ DEBUGFUNC("ixgbe_set_fw_drv_ver_E610");
+
+ if (!len || !driver_ver)
+ return IXGBE_ERR_PARAM;
+
+ dv.major_ver = maj;
+ dv.minor_ver = minor;
+ dv.build_ver = build;
+ dv.subbuild_ver = sub;
+
+ memset(dv.driver_string, 0, IXGBE_DRV_VER_STR_LEN_E610);
+ memcpy(dv.driver_string, driver_ver, limited_len);
+
+ return ixgbe_aci_send_driver_ver(hw, &dv);
+}
+
+/**
+ * ixgbe_disable_rx_E610 - Disable RX unit
+ * @hw: pointer to hardware structure
+ *
+ * Disable RX DMA unit on E610 with use of ACI command (0x000C).
+ *
+ * Return: the exit code of the operation.
+ */
+void ixgbe_disable_rx_E610(struct ixgbe_hw *hw)
+{
+ u32 rxctrl;
+
+ DEBUGFUNC("ixgbe_disable_rx_E610");
+
+ rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
+ if (rxctrl & IXGBE_RXCTRL_RXEN) {
+ u32 pfdtxgswc;
+ s32 status;
+
+ pfdtxgswc = IXGBE_READ_REG(hw, IXGBE_PFDTXGSWC);
+ if (pfdtxgswc & IXGBE_PFDTXGSWC_VT_LBEN) {
+ pfdtxgswc &= ~IXGBE_PFDTXGSWC_VT_LBEN;
+ IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, pfdtxgswc);
+ hw->mac.set_lben = true;
+ } else {
+ hw->mac.set_lben = false;
+ }
+
+ status = ixgbe_aci_disable_rxen(hw);
+
+ /* If we fail - disable RX using register write */
+ if (status) {
+ rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
+ if (rxctrl & IXGBE_RXCTRL_RXEN) {
+ rxctrl &= ~IXGBE_RXCTRL_RXEN;
+ IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, rxctrl);
+ }
+ }
+ }
+}
+
+/**
+ * ixgbe_setup_eee_E610 - Enable/disable EEE support
+ * @hw: pointer to the HW structure
+ * @enable_eee: boolean flag to enable EEE
+ *
+ * Enables/disable EEE based on enable_eee flag.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_setup_eee_E610(struct ixgbe_hw *hw, bool enable_eee)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data phy_caps = { 0 };
+ struct ixgbe_aci_cmd_set_phy_cfg_data phy_cfg = { 0 };
+ u16 eee_cap = 0;
+ s32 status;
+
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_ACTIVE_CFG, &phy_caps);
+ if (status != IXGBE_SUCCESS)
+ return status;
+
+ ixgbe_copy_phy_caps_to_cfg(&phy_caps, &phy_cfg);
+
+ phy_cfg.caps |= IXGBE_ACI_PHY_ENA_LINK;
+ phy_cfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ if (enable_eee) {
+ if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_100BASE_TX)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_100BASE_TX;
+ if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_T)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_1000BASE_T;
+ if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_KX)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_1000BASE_KX;
+ if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_T)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_10GBASE_T;
+ if (phy_caps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_10GBASE_KR;
+ if (phy_caps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10BASE_T)
+ eee_cap |= IXGBE_ACI_PHY_EEE_EN_10BASE_T;
+ }
+
+ /* Set EEE capability for particular PHY types */
+ phy_cfg.eee_cap = IXGBE_CPU_TO_LE16(eee_cap);
+
+ status = ixgbe_aci_set_phy_cfg(hw, &phy_cfg);
+
+ return status;
+}
+
+/**
+ * ixgbe_fw_recovery_mode_E610 - Check FW NVM recovery mode
+ * @hw: pointer to hardware structure
+ *
+ * Checks FW NVM recovery mode by
+ * reading the value of the dedicated register.
+ *
+ * Return: true if FW is in recovery mode, otherwise false.
+ */
+bool ixgbe_fw_recovery_mode_E610(struct ixgbe_hw *hw)
+{
+ u32 fwsm = IXGBE_READ_REG(hw, GL_MNG_FWSM);
+
+ return !!(fwsm & GL_MNG_FWSM_FW_MODES_RECOVERY_M);
+}
+
+/**
+ * ixgbe_fw_rollback_mode_E610 - Check FW NVM Rollback
+ * @hw: pointer to hardware structure
+ *
+ * Checks FW NVM Rollback mode by reading the
+ * value of the dedicated register.
+ *
+ * Return: true if FW is in Rollback mode, otherwise false.
+ */
+bool ixgbe_fw_rollback_mode_E610(struct ixgbe_hw *hw)
+{
+ u32 fwsm = IXGBE_READ_REG(hw, GL_MNG_FWSM);
+
+ return !!(fwsm & GL_MNG_FWSM_FW_MODES_ROLLBACK_M);
+}
+
+/**
+ * ixgbe_get_fw_tsam_mode_E610 - Check FW NVM Thermal Sensor Autonomous Mode
+ * @hw: pointer to hardware structure
+ *
+ * Checks Thermal Sensor Autonomous Mode by reading the
+ * value of the dedicated register.
+ *
+ * Return: true if FW is in TSAM, otherwise false.
+ */
+bool ixgbe_get_fw_tsam_mode_E610(struct ixgbe_hw *hw)
+{
+ u32 fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM_X550EM_a);
+
+ return !!(fwsm & IXGBE_FWSM_TS_ENABLED);
+}
+
+/**
+ * ixgbe_init_phy_ops_E610 - PHY specific init
+ * @hw: pointer to hardware structure
+ *
+ * Initialize any function pointers that were not able to be
+ * set during init_shared_code because the PHY type was not known.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_init_phy_ops_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_mac_info *mac = &hw->mac;
+ struct ixgbe_phy_info *phy = &hw->phy;
+ s32 ret_val;
+
+ phy->ops.identify_sfp = ixgbe_identify_module_E610;
+ phy->ops.read_reg = NULL; /* PHY reg access is not required */
+ phy->ops.write_reg = NULL;
+ phy->ops.read_reg_mdi = NULL;
+ phy->ops.write_reg_mdi = NULL;
+ phy->ops.setup_link = ixgbe_setup_phy_link_E610;
+ phy->ops.get_firmware_version = ixgbe_get_phy_firmware_version_E610;
+ phy->ops.read_i2c_byte = NULL; /* disabled for E610 */
+ phy->ops.write_i2c_byte = NULL; /* disabled for E610 */
+ phy->ops.read_i2c_sff8472 = ixgbe_read_i2c_sff8472_E610;
+ phy->ops.read_i2c_eeprom = ixgbe_read_i2c_eeprom_E610;
+ phy->ops.write_i2c_eeprom = ixgbe_write_i2c_eeprom_E610;
+ phy->ops.i2c_bus_clear = NULL; /* do not use generic implementation */
+ phy->ops.check_overtemp = ixgbe_check_overtemp_E610;
+ if (mac->ops.get_media_type(hw) == ixgbe_media_type_copper)
+ phy->ops.set_phy_power = ixgbe_set_phy_power_E610;
+ else
+ phy->ops.set_phy_power = NULL;
+ phy->ops.enter_lplu = ixgbe_enter_lplu_E610;
+ phy->ops.handle_lasi = NULL; /* no implementation for E610 */
+ phy->ops.read_i2c_byte_unlocked = NULL; /* disabled for E610 */
+ phy->ops.write_i2c_byte_unlocked = NULL; /* disabled for E610 */
+
+ /* TODO: Set functions pointers based on device ID */
+
+ /* Identify the PHY */
+ ret_val = phy->ops.identify(hw);
+ if (ret_val != IXGBE_SUCCESS)
+ return ret_val;
+
+ /* TODO: Set functions pointers based on PHY type */
+
+ return ret_val;
+}
+
+/**
+ * ixgbe_identify_phy_E610 - Identify PHY
+ * @hw: pointer to hardware structure
+ *
+ * Determine PHY type, supported speeds and PHY ID.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps;
+ s32 rc;
+
+ /* Set PHY type */
+ hw->phy.type = ixgbe_phy_fw;
+
+ rc = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_TOPO_CAP_MEDIA,
+ &pcaps);
+ if (rc)
+ return rc;
+
+ if (!(pcaps.module_compliance_enforcement &
+ IXGBE_ACI_MOD_ENFORCE_STRICT_MODE)) {
+ /* Handle lenient mode */
+ rc = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_TOPO_CAP_NO_MEDIA,
+ &pcaps);
+ if (rc)
+ return rc;
+ }
+
+ /* Determine supported speeds */
+ hw->phy.speeds_supported = IXGBE_LINK_SPEED_UNKNOWN;
+
+ if (pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10BASE_T ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10M_SGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_10_FULL;
+ if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_100BASE_TX ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_100M_SGMII ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_100M_USXGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
+ if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_T ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_SX ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_LX ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1000BASE_KX ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_1G_SGMII ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_1G_USXGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_1GB_FULL;
+ if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_T ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10G_SFI_DA ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_SR ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_LR ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1 ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10G_SFI_AOC_ACC ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_10G_SFI_C2C ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_10G_USXGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_10GB_FULL;
+
+ /* 2.5 and 5 Gbps link speeds must be excluded from the
+ * auto-negotiation set used during driver initialization due to
+ * compatibility issues with certain switches. Those issues do not
+ * exist in case of E610 2.5G SKU device (0x57b1).
+ */
+ if (!hw->phy.autoneg_advertised &&
+ hw->device_id != IXGBE_DEV_ID_E610_2_5G_T)
+ hw->phy.autoneg_advertised = hw->phy.speeds_supported;
+
+ if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_T ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_X ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_2500BASE_KX ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_SGMII ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_2500M_USXGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+
+ if (!hw->phy.autoneg_advertised &&
+ hw->device_id == IXGBE_DEV_ID_E610_2_5G_T)
+ hw->phy.autoneg_advertised = hw->phy.speeds_supported;
+
+ if (pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_T ||
+ pcaps.phy_type_low & IXGBE_PHY_TYPE_LOW_5GBASE_KR ||
+ pcaps.phy_type_high & IXGBE_PHY_TYPE_HIGH_5G_USXGMII)
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+
+ /* Set PHY ID */
+ memcpy(&hw->phy.id, pcaps.phy_id_oui, sizeof(u32));
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_identify_module_E610 - Identify SFP module type
+ * @hw: pointer to hardware structure
+ *
+ * Identify the SFP module type.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_identify_module_E610(struct ixgbe_hw *hw)
+{
+ bool media_available;
+ u8 module_type;
+ s32 rc;
+
+ rc = ixgbe_update_link_info(hw);
+ if (rc)
+ goto err;
+
+ media_available =
+ (hw->link.link_info.link_info &
+ IXGBE_ACI_MEDIA_AVAILABLE) ? true : false;
+
+ if (media_available) {
+ hw->phy.sfp_type = ixgbe_sfp_type_unknown;
+
+ /* Get module type from hw context updated by ixgbe_update_link_info() */
+ module_type = hw->link.link_info.module_type[IXGBE_ACI_MOD_TYPE_IDENT];
+
+ if ((module_type & IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE) ||
+ (module_type & IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE)) {
+ hw->phy.sfp_type = ixgbe_sfp_type_da_cu;
+ } else if (module_type & IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_SR) {
+ hw->phy.sfp_type = ixgbe_sfp_type_sr;
+ } else if ((module_type & IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_LR) ||
+ (module_type & IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_LRM)) {
+ hw->phy.sfp_type = ixgbe_sfp_type_lr;
+ }
+ rc = IXGBE_SUCCESS;
+ } else {
+ hw->phy.sfp_type = ixgbe_sfp_type_not_present;
+ rc = IXGBE_ERR_SFP_NOT_PRESENT;
+ }
+err:
+ return rc;
+}
+
+/**
+ * ixgbe_setup_phy_link_E610 - Sets up firmware-controlled PHYs
+ * @hw: pointer to hardware structure
+ *
+ * Set the parameters for the firmware-controlled PHYs.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_setup_phy_link_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps;
+ struct ixgbe_aci_cmd_set_phy_cfg_data pcfg;
+ u8 rmode = IXGBE_ACI_REPORT_TOPO_CAP_MEDIA;
+ u64 sup_phy_type_low, sup_phy_type_high;
+ s32 rc;
+
+ rc = ixgbe_aci_get_link_info(hw, false, NULL);
+ if (rc) {
+ goto err;
+ }
+
+ /* If media is not available get default config */
+ if (!(hw->link.link_info.link_info & IXGBE_ACI_MEDIA_AVAILABLE))
+ rmode = IXGBE_ACI_REPORT_DFLT_CFG;
+
+ rc = ixgbe_aci_get_phy_caps(hw, false, rmode, &pcaps);
+ if (rc) {
+ goto err;
+ }
+
+ sup_phy_type_low = pcaps.phy_type_low;
+ sup_phy_type_high = pcaps.phy_type_high;
+
+ /* Get Active configuration to avoid unintended changes */
+ rc = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_ACTIVE_CFG,
+ &pcaps);
+ if (rc) {
+ goto err;
+ }
+ ixgbe_copy_phy_caps_to_cfg(&pcaps, &pcfg);
+
+ /* Set default PHY types for a given speed */
+ pcfg.phy_type_low = 0;
+ pcfg.phy_type_high = 0;
+
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10_FULL) {
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_10BASE_T;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_10M_SGMII;
+ }
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) {
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_100BASE_TX;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_100M_SGMII;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_100M_USXGMII;
+ }
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) {
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_1000BASE_T;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_1000BASE_SX;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_1000BASE_LX;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_1000BASE_KX;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_1G_SGMII;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_1G_USXGMII;
+ }
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_2_5GB_FULL) {
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_2500BASE_T;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_2500BASE_X;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_2500BASE_KX;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_2500M_SGMII;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_2500M_USXGMII;
+ }
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_5GB_FULL) {
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_5GBASE_T;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_5GBASE_KR;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_5G_USXGMII;
+ }
+ if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) {
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10GBASE_T;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10G_SFI_DA;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10GBASE_SR;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10GBASE_LR;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10G_SFI_AOC_ACC;
+ pcfg.phy_type_low |= IXGBE_PHY_TYPE_LOW_10G_SFI_C2C;
+ pcfg.phy_type_high |= IXGBE_PHY_TYPE_HIGH_10G_USXGMII;
+ }
+
+ /* Mask the set values to avoid requesting unsupported link types */
+ pcfg.phy_type_low &= sup_phy_type_low;
+ pcfg.phy_type_high &= sup_phy_type_high;
+
+ if (pcfg.phy_type_high != pcaps.phy_type_high ||
+ pcfg.phy_type_low != pcaps.phy_type_low ||
+ pcfg.caps != pcaps.caps) {
+ pcfg.caps |= IXGBE_ACI_PHY_ENA_LINK;
+ pcfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ rc = ixgbe_aci_set_phy_cfg(hw, &pcfg);
+ }
+
+err:
+ return rc;
+}
+
+/**
+ * ixgbe_get_phy_firmware_version_E610 - Gets the PHY Firmware Version
+ * @hw: pointer to hardware structure
+ * @firmware_version: pointer to the PHY Firmware Version
+ *
+ * Determines PHY FW version based on response to Get PHY Capabilities
+ * admin command (0x0600).
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_get_phy_firmware_version_E610(struct ixgbe_hw *hw,
+ u16 *firmware_version)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps;
+ s32 status;
+
+ if (!firmware_version)
+ return IXGBE_ERR_PARAM;
+
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_ACTIVE_CFG,
+ &pcaps);
+ if (status)
+ return status;
+
+ /* TODO: determine which bytes of the 8-byte phy_fw_ver
+ * field should be written to the 2-byte firmware_version
+ * output argument. */
+ memcpy(firmware_version, pcaps.phy_fw_ver, sizeof(u16));
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_read_i2c_sff8472_E610 - Reads 8 bit word over I2C interface
+ * @hw: pointer to hardware structure
+ * @byte_offset: byte offset at address 0xA2
+ * @sff8472_data: value read
+ *
+ * Performs byte read operation from SFP module's SFF-8472 data over I2C.
+ *
+ * Return: the exit code of the operation.
+ **/
+s32 ixgbe_read_i2c_sff8472_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 *sff8472_data)
+{
+ return ixgbe_aci_sff_eeprom(hw, 0, IXGBE_I2C_EEPROM_DEV_ADDR2,
+ byte_offset, 0,
+ IXGBE_ACI_SFF_NO_PAGE_BANK_UPDATE,
+ sff8472_data, 1, false);
+}
+
+/**
+ * ixgbe_read_i2c_eeprom_E610 - Reads 8 bit EEPROM word over I2C interface
+ * @hw: pointer to hardware structure
+ * @byte_offset: EEPROM byte offset to read
+ * @eeprom_data: value read
+ *
+ * Performs byte read operation from SFP module's EEPROM over I2C interface.
+ *
+ * Return: the exit code of the operation.
+ **/
+s32 ixgbe_read_i2c_eeprom_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 *eeprom_data)
+{
+ return ixgbe_aci_sff_eeprom(hw, 0, IXGBE_I2C_EEPROM_DEV_ADDR,
+ byte_offset, 0,
+ IXGBE_ACI_SFF_NO_PAGE_BANK_UPDATE,
+ eeprom_data, 1, false);
+}
+
+/**
+ * ixgbe_write_i2c_eeprom_E610 - Writes 8 bit EEPROM word over I2C interface
+ * @hw: pointer to hardware structure
+ * @byte_offset: EEPROM byte offset to write
+ * @eeprom_data: value to write
+ *
+ * Performs byte write operation to SFP module's EEPROM over I2C interface.
+ *
+ * Return: the exit code of the operation.
+ **/
+s32 ixgbe_write_i2c_eeprom_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 eeprom_data)
+{
+ return ixgbe_aci_sff_eeprom(hw, 0, IXGBE_I2C_EEPROM_DEV_ADDR,
+ byte_offset, 0,
+ IXGBE_ACI_SFF_NO_PAGE_BANK_UPDATE,
+ &eeprom_data, 1, true);
+}
+
+/**
+ * ixgbe_check_overtemp_E610 - Check firmware-controlled PHYs for overtemp
+ * @hw: pointer to hardware structure
+ *
+ * Get the link status and check if the PHY temperature alarm detected.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_check_overtemp_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_link_status_data link_data = { 0 };
+ struct ixgbe_aci_cmd_get_link_status *resp;
+ struct ixgbe_aci_desc desc;
+ s32 status = IXGBE_SUCCESS;
+
+ if (!hw)
+ return IXGBE_ERR_PARAM;
+
+ ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_get_link_status);
+ resp = &desc.params.get_link_status;
+ resp->cmd_flags = IXGBE_CPU_TO_LE16(IXGBE_ACI_LSE_NOP);
+
+ status = ixgbe_aci_send_cmd(hw, &desc, &link_data, sizeof(link_data));
+ if (status != IXGBE_SUCCESS)
+ return status;
+
+ if (link_data.ext_info & IXGBE_ACI_LINK_PHY_TEMP_ALARM) {
+ ERROR_REPORT1(IXGBE_ERROR_CAUTION,
+ "PHY Temperature Alarm detected");
+ status = IXGBE_ERR_OVERTEMP;
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_set_phy_power_E610 - Control power for copper PHY
+ * @hw: pointer to hardware structure
+ * @on: true for on, false for off
+ *
+ * Set the power on/off of the PHY
+ * by getting its capabilities and setting the appropriate
+ * configuration parameters.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_set_phy_power_E610(struct ixgbe_hw *hw, bool on)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data phy_caps = { 0 };
+ struct ixgbe_aci_cmd_set_phy_cfg_data phy_cfg = { 0 };
+ s32 status;
+
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_ACTIVE_CFG, &phy_caps);
+ if (status != IXGBE_SUCCESS)
+ return status;
+
+ ixgbe_copy_phy_caps_to_cfg(&phy_caps, &phy_cfg);
+
+ if (on) {
+ phy_cfg.caps &= ~IXGBE_ACI_PHY_ENA_LOW_POWER;
+ } else {
+ phy_cfg.caps |= IXGBE_ACI_PHY_ENA_LOW_POWER;
+ }
+
+ /* PHY is already in requested power mode */
+ if (phy_caps.caps == phy_cfg.caps)
+ return IXGBE_SUCCESS;
+
+ phy_cfg.caps |= IXGBE_ACI_PHY_ENA_LINK;
+ phy_cfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ status = ixgbe_aci_set_phy_cfg(hw, &phy_cfg);
+
+ return status;
+}
+
+/**
+ * ixgbe_enter_lplu_E610 - Transition to low power states
+ * @hw: pointer to hardware structure
+ *
+ * Configures Low Power Link Up on transition to low power states
+ * (from D0 to non-D0). Link is required to enter LPLU so avoid resetting the
+ * X557 PHY immediately prior to entering LPLU.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_enter_lplu_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data phy_caps = { 0 };
+ struct ixgbe_aci_cmd_set_phy_cfg_data phy_cfg = { 0 };
+ s32 status;
+
+ status = ixgbe_aci_get_phy_caps(hw, false,
+ IXGBE_ACI_REPORT_ACTIVE_CFG, &phy_caps);
+ if (status != IXGBE_SUCCESS)
+ return status;
+
+ ixgbe_copy_phy_caps_to_cfg(&phy_caps, &phy_cfg);
+
+ phy_cfg.low_power_ctrl_an |= IXGBE_ACI_PHY_EN_D3COLD_LOW_POWER_AUTONEG;
+
+ status = ixgbe_aci_set_phy_cfg(hw, &phy_cfg);
+
+ return status;
+}
+
+/**
+ * ixgbe_init_eeprom_params_E610 - Initialize EEPROM params
+ * @hw: pointer to hardware structure
+ *
+ * Initializes the EEPROM parameters ixgbe_eeprom_info within the
+ * ixgbe_hw struct in order to set up EEPROM access.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_init_eeprom_params_E610(struct ixgbe_hw *hw)
+{
+ struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
+ u32 gens_stat;
+ u8 sr_size;
+
+ if (eeprom->type == ixgbe_eeprom_uninitialized) {
+ eeprom->type = ixgbe_flash;
+
+ gens_stat = IXGBE_READ_REG(hw, GLNVM_GENS);
+ sr_size = (gens_stat & GLNVM_GENS_SR_SIZE_M) >>
+ GLNVM_GENS_SR_SIZE_S;
+
+ /* Switching to words (sr_size contains power of 2) */
+ eeprom->word_size = BIT(sr_size) * IXGBE_SR_WORDS_IN_1KB;
+
+ DEBUGOUT2("Eeprom params: type = %d, size = %d\n",
+ eeprom->type, eeprom->word_size);
+ }
+
+ return IXGBE_SUCCESS;
+}
+
+/**
+ * ixgbe_read_ee_aci_E610 - Read EEPROM word using the admin command.
+ * @hw: pointer to hardware structure
+ * @offset: offset of word in the EEPROM to read
+ * @data: word read from the EEPROM
+ *
+ * Reads a 16 bit word from the EEPROM using the ACI.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding with reading.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_ee_aci_E610(struct ixgbe_hw *hw, u16 offset, u16 *data)
+{
+ s32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ status = ixgbe_read_sr_word_aci(hw, offset, data);
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_read_ee_aci_buffer_E610- Read EEPROM word(s) using admin commands.
+ * @hw: pointer to hardware structure
+ * @offset: offset of word in the EEPROM to read
+ * @words: number of words
+ * @data: word(s) read from the EEPROM
+ *
+ * Reads a 16 bit word(s) from the EEPROM using the ACI.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding with reading.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_ee_aci_buffer_E610(struct ixgbe_hw *hw, u16 offset,
+ u16 words, u16 *data)
+{
+ s32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ status = ixgbe_read_sr_buf_aci(hw, offset, &words, data);
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_write_ee_aci_E610 - Write EEPROM word using the admin command.
+ * @hw: pointer to hardware structure
+ * @offset: offset of word in the EEPROM to write
+ * @data: word write to the EEPROM
+ *
+ * Write a 16 bit word to the EEPROM using the ACI.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding with writing.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_write_ee_aci_E610(struct ixgbe_hw *hw, u16 offset, u16 data)
+{
+ s32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_WRITE);
+ if (status)
+ return status;
+
+ status = ixgbe_write_sr_word_aci(hw, (u32)offset, &data);
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_write_ee_aci_buffer_E610 - Write EEPROM word(s) using admin commands.
+ * @hw: pointer to hardware structure
+ * @offset: offset of word in the EEPROM to write
+ * @words: number of words
+ * @data: word(s) write to the EEPROM
+ *
+ * Write a 16 bit word(s) to the EEPROM using the ACI.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding with writing.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_write_ee_aci_buffer_E610(struct ixgbe_hw *hw, u16 offset,
+ u16 words, u16 *data)
+{
+ s32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_WRITE);
+ if (status)
+ return status;
+
+ status = ixgbe_write_sr_buf_aci(hw, (u32)offset, words, data);
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_calc_eeprom_checksum_E610 - Calculates and returns the checksum
+ * @hw: pointer to hardware structure
+ *
+ * Calculate SW Checksum that covers the whole 64kB shadow RAM
+ * except the VPD and PCIe ALT Auto-load modules. The structure and size of VPD
+ * is customer specific and unknown. Therefore, this function skips all maximum
+ * possible size of VPD (1kB).
+ * If the EEPROM params are not initialized, the function
+ * initializes them before proceeding.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the negative error code on error, or the 16-bit checksum
+ */
+s32 ixgbe_calc_eeprom_checksum_E610(struct ixgbe_hw *hw)
+{
+ bool nvm_acquired = false;
+ u16 pcie_alt_module = 0;
+ u16 checksum_local = 0;
+ u16 checksum = 0;
+ u16 vpd_module;
+ void *vmem;
+ s32 status;
+ u16 *data;
+ u16 i;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ vmem = ixgbe_calloc(hw, IXGBE_SR_SECTOR_SIZE_IN_WORDS, sizeof(u16));
+ if (!vmem)
+ return IXGBE_ERR_OUT_OF_MEM;
+ data = (u16 *)vmem;
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ goto ixgbe_calc_sr_checksum_exit;
+ nvm_acquired = true;
+
+ /* read pointer to VPD area */
+ status = ixgbe_read_sr_word_aci(hw, E610_SR_VPD_PTR, &vpd_module);
+ if (status)
+ goto ixgbe_calc_sr_checksum_exit;
+
+ /* read pointer to PCIe Alt Auto-load module */
+ status = ixgbe_read_sr_word_aci(hw, E610_SR_PCIE_ALT_AUTO_LOAD_PTR,
+ &pcie_alt_module);
+ if (status)
+ goto ixgbe_calc_sr_checksum_exit;
+
+ /* Calculate SW checksum that covers the whole 64kB shadow RAM
+ * except the VPD and PCIe ALT Auto-load modules
+ */
+ for (i = 0; i < hw->eeprom.word_size; i++) {
+ /* Read SR page */
+ if ((i % IXGBE_SR_SECTOR_SIZE_IN_WORDS) == 0) {
+ u16 words = IXGBE_SR_SECTOR_SIZE_IN_WORDS;
+
+ status = ixgbe_read_sr_buf_aci(hw, i, &words, data);
+ if (status != IXGBE_SUCCESS)
+ goto ixgbe_calc_sr_checksum_exit;
+ }
+
+ /* Skip Checksum word */
+ if (i == E610_SR_SW_CHECKSUM_WORD)
+ continue;
+ /* Skip VPD module (convert byte size to word count) */
+ if (i >= (u32)vpd_module &&
+ i < ((u32)vpd_module + E610_SR_VPD_SIZE_WORDS))
+ continue;
+ /* Skip PCIe ALT module (convert byte size to word count) */
+ if (i >= (u32)pcie_alt_module &&
+ i < ((u32)pcie_alt_module + E610_SR_PCIE_ALT_SIZE_WORDS))
+ continue;
+
+ checksum_local += data[i % IXGBE_SR_SECTOR_SIZE_IN_WORDS];
+ }
+
+ checksum = (u16)IXGBE_SR_SW_CHECKSUM_BASE - checksum_local;
+
+ixgbe_calc_sr_checksum_exit:
+ if(nvm_acquired)
+ ixgbe_release_nvm(hw);
+ ixgbe_free(hw, vmem);
+
+ if(!status)
+ return (s32)checksum;
+ else
+ return status;
+}
+
+/**
+ * ixgbe_update_eeprom_checksum_E610 - Updates the EEPROM checksum and flash
+ * @hw: pointer to hardware structure
+ *
+ * After writing EEPROM to Shadow RAM, software sends the admin command
+ * to recalculate and update EEPROM checksum and instructs the hardware
+ * to update the flash.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_update_eeprom_checksum_E610(struct ixgbe_hw *hw)
+{
+ s32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_nvm_recalculate_checksum(hw);
+ if (status)
+ return status;
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_WRITE);
+ if (status)
+ return status;
+
+ status = ixgbe_nvm_write_activate(hw, IXGBE_ACI_NVM_ACTIV_REQ_EMPR,
+ NULL);
+ ixgbe_release_nvm(hw);
+
+ return status;
+}
+
+/**
+ * ixgbe_validate_eeprom_checksum_E610 - Validate EEPROM checksum
+ * @hw: pointer to hardware structure
+ * @checksum_val: calculated checksum
+ *
+ * Performs checksum calculation and validates the EEPROM checksum. If the
+ * caller does not need checksum_val, the value can be NULL.
+ * If the EEPROM params are not initialized, the function
+ * initialize them before proceeding.
+ * The function acquires and then releases the NVM ownership.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_validate_eeprom_checksum_E610(struct ixgbe_hw *hw, u16 *checksum_val)
+{
+ u32 status;
+
+ if (hw->eeprom.type == ixgbe_eeprom_uninitialized) {
+ status = ixgbe_init_eeprom_params(hw);
+ if (status)
+ return status;
+ }
+
+ status = ixgbe_nvm_validate_checksum(hw);
+
+ if (status)
+ return status;
+
+ if (checksum_val) {
+ u16 tmp_checksum;
+ status = ixgbe_acquire_nvm(hw, IXGBE_RES_READ);
+ if (status)
+ return status;
+
+ status = ixgbe_read_sr_word_aci(hw, E610_SR_SW_CHECKSUM_WORD,
+ &tmp_checksum);
+ ixgbe_release_nvm(hw);
+
+ if (!status)
+ *checksum_val = tmp_checksum;
+ }
+
+ return status;
+}
+
+/**
+ * ixgbe_get_pfa_module_tlv - Reads sub module TLV from NVM PFA
+ * @hw: pointer to hardware structure
+ * @module_tlv: pointer to module TLV to return
+ * @module_tlv_len: pointer to module TLV length to return
+ * @module_type: module type requested
+ *
+ * Finds the requested sub module TLV type from the Preserved Field
+ * Area (PFA) and returns the TLV pointer and length. The caller can
+ * use these to read the variable length TLV value.
+ *
+ * Return: the exit code of the operation.
+ */
+static s32 ixgbe_get_pfa_module_tlv(struct ixgbe_hw *hw, u16 *module_tlv,
+ u16 *module_tlv_len, u16 module_type)
+{
+ u16 pfa_len, pfa_ptr, pfa_end_ptr;
+ u16 next_tlv;
+ s32 status;
+
+ status = ixgbe_read_ee_aci_E610(hw, E610_SR_PFA_PTR, &pfa_ptr);
+ if (status != IXGBE_SUCCESS) {
+ return status;
+ }
+ status = ixgbe_read_ee_aci_E610(hw, pfa_ptr, &pfa_len);
+ if (status != IXGBE_SUCCESS) {
+ return status;
+ }
+ /* Starting with first TLV after PFA length, iterate through the list
+ * of TLVs to find the requested one.
+ */
+ next_tlv = pfa_ptr + 1;
+ pfa_end_ptr = pfa_ptr + pfa_len;
+ while (next_tlv < pfa_end_ptr) {
+ u16 tlv_sub_module_type, tlv_len;
+
+ /* Read TLV type */
+ status = ixgbe_read_ee_aci_E610(hw, next_tlv,
+ &tlv_sub_module_type);
+ if (status != IXGBE_SUCCESS) {
+ break;
+ }
+ /* Read TLV length */
+ status = ixgbe_read_ee_aci_E610(hw, next_tlv + 1, &tlv_len);
+ if (status != IXGBE_SUCCESS) {
+ break;
+ }
+ if (tlv_sub_module_type == module_type) {
+ if (tlv_len) {
+ *module_tlv = next_tlv;
+ *module_tlv_len = tlv_len;
+ return IXGBE_SUCCESS;
+ }
+ return IXGBE_ERR_INVAL_SIZE;
+ }
+ /* Check next TLV, i.e. current TLV pointer + length + 2 words
+ * (for current TLV's type and length)
+ */
+ next_tlv = next_tlv + tlv_len + 2;
+ }
+ /* Module does not exist */
+ return IXGBE_ERR_DOES_NOT_EXIST;
+}
+
+/**
+ * ixgbe_read_pba_string_E610 - Reads part number string from NVM
+ * @hw: pointer to hardware structure
+ * @pba_num: stores the part number string from the NVM
+ * @pba_num_size: part number string buffer length
+ *
+ * Reads the part number string from the NVM.
+ *
+ * Return: the exit code of the operation.
+ */
+s32 ixgbe_read_pba_string_E610(struct ixgbe_hw *hw, u8 *pba_num,
+ u32 pba_num_size)
+{
+ u16 pba_tlv, pba_tlv_len;
+ u16 pba_word, pba_size;
+ s32 status;
+ u16 i;
+
+ status = ixgbe_get_pfa_module_tlv(hw, &pba_tlv, &pba_tlv_len,
+ E610_SR_PBA_BLOCK_PTR);
+ if (status != IXGBE_SUCCESS) {
+ return status;
+ }
+
+ /* pba_size is the next word */
+ status = ixgbe_read_ee_aci_E610(hw, (pba_tlv + 2), &pba_size);
+ if (status != IXGBE_SUCCESS) {
+ return status;
+ }
+
+ if (pba_tlv_len < pba_size) {
+ return IXGBE_ERR_INVAL_SIZE;
+ }
+
+ /* Subtract one to get PBA word count (PBA Size word is included in
+ * total size)
+ */
+ pba_size--;
+ if (pba_num_size < (((u32)pba_size * 2) + 1)) {
+ return IXGBE_ERR_PARAM;
+ }
+
+ for (i = 0; i < pba_size; i++) {
+ status = ixgbe_read_ee_aci_E610(hw, (pba_tlv + 2 + 1) + i,
+ &pba_word);
+ if (status != IXGBE_SUCCESS) {
+ return status;
+ }
+
+ pba_num[(i * 2)] = (pba_word >> 8) & 0xFF;
+ pba_num[(i * 2) + 1] = pba_word & 0xFF;
+ }
+ pba_num[(pba_size * 2)] = '\0';
+
+ return status;
+}
diff --git a/sys/dev/ixgbe/ixgbe_e610.h b/sys/dev/ixgbe/ixgbe_e610.h
new file mode 100644
index 000000000000..94e600139499
--- /dev/null
+++ b/sys/dev/ixgbe/ixgbe_e610.h
@@ -0,0 +1,224 @@
+/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
+
+ Copyright (c) 2025, Intel Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+
+#ifndef _IXGBE_E610_H_
+#define _IXGBE_E610_H_
+
+#include "ixgbe_type.h"
+
+void ixgbe_init_aci(struct ixgbe_hw *hw);
+void ixgbe_shutdown_aci(struct ixgbe_hw *hw);
+s32 ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,
+ void *buf, u16 buf_size);
+bool ixgbe_aci_check_event_pending(struct ixgbe_hw *hw);
+s32 ixgbe_aci_get_event(struct ixgbe_hw *hw, struct ixgbe_aci_event *e,
+ bool *pending);
+
+void ixgbe_fill_dflt_direct_cmd_desc(struct ixgbe_aci_desc *desc, u16 opcode);
+
+s32 ixgbe_aci_get_fw_ver(struct ixgbe_hw *hw);
+s32 ixgbe_aci_send_driver_ver(struct ixgbe_hw *hw, struct ixgbe_driver_ver *dv);
+s32 ixgbe_aci_set_pf_context(struct ixgbe_hw *hw, u8 pf_id);
+
+s32 ixgbe_acquire_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res,
+ enum ixgbe_aci_res_access_type access, u32 timeout);
+void ixgbe_release_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res);
+s32 ixgbe_aci_list_caps(struct ixgbe_hw *hw, void *buf, u16 buf_size,
+ u32 *cap_count, enum ixgbe_aci_opc opc);
+s32 ixgbe_discover_dev_caps(struct ixgbe_hw *hw,
+ struct ixgbe_hw_dev_caps *dev_caps);
+s32 ixgbe_discover_func_caps(struct ixgbe_hw* hw,
+ struct ixgbe_hw_func_caps* func_caps);
+s32 ixgbe_get_caps(struct ixgbe_hw *hw);
+s32 ixgbe_aci_disable_rxen(struct ixgbe_hw *hw);
+s32 ixgbe_aci_get_phy_caps(struct ixgbe_hw *hw, bool qual_mods, u8 report_mode,
+ struct ixgbe_aci_cmd_get_phy_caps_data *pcaps);
+bool ixgbe_phy_caps_equals_cfg(struct ixgbe_aci_cmd_get_phy_caps_data *caps,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
+void ixgbe_copy_phy_caps_to_cfg(struct ixgbe_aci_cmd_get_phy_caps_data *caps,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
+s32 ixgbe_aci_set_phy_cfg(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg);
+s32 ixgbe_aci_set_link_restart_an(struct ixgbe_hw *hw, bool ena_link);
+s32 ixgbe_update_link_info(struct ixgbe_hw *hw);
+s32 ixgbe_get_link_status(struct ixgbe_hw *hw, bool *link_up);
+s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
+ struct ixgbe_link_status *link);
+s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask);
+s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask);
+
+s32 ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_get_link_topo *cmd,
+ u8 *node_part_number, u16 *node_handle);
+s32 ixgbe_find_netlist_node(struct ixgbe_hw *hw, u8 node_type_ctx,
+ u8 node_part_number, u16 *node_handle);
+s32 ixgbe_aci_read_i2c(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data);
+s32 ixgbe_aci_write_i2c(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data);
+
+s32 ixgbe_aci_set_port_id_led(struct ixgbe_hw *hw, bool orig_mode);
+s32 ixgbe_aci_set_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+ bool value);
+s32 ixgbe_aci_get_gpio(struct ixgbe_hw *hw, u16 gpio_ctrl_handle, u8 pin_idx,
+ bool *value);
+s32 ixgbe_aci_sff_eeprom(struct ixgbe_hw *hw, u16 lport, u8 bus_addr,
+ u16 mem_addr, u8 page, u8 page_bank_ctrl, u8 *data,
+ u8 length, bool write);
+s32 ixgbe_aci_prog_topo_dev_nvm(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_params *topo_params);
+s32 ixgbe_aci_read_topo_dev_nvm(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_link_topo_params *topo_params,
+ u32 start_address, u8 *data, u8 data_size);
+
+s32 ixgbe_acquire_nvm(struct ixgbe_hw *hw,
+ enum ixgbe_aci_res_access_type access);
+void ixgbe_release_nvm(struct ixgbe_hw *hw);
+
+s32 ixgbe_aci_read_nvm(struct ixgbe_hw *hw, u16 module_typeid, u32 offset,
+ u16 length, void *data, bool last_command,
+ bool read_shadow_ram);
+
+s32 ixgbe_aci_erase_nvm(struct ixgbe_hw *hw, u16 module_typeid);
+s32 ixgbe_aci_update_nvm(struct ixgbe_hw *hw, u16 module_typeid,
+ u32 offset, u16 length, void *data,
+ bool last_command, u8 command_flags);
+
+s32 ixgbe_aci_read_nvm_cfg(struct ixgbe_hw *hw, u8 cmd_flags,
+ u16 field_id, void *data, u16 buf_size,
+ u16 *elem_count);
+s32 ixgbe_aci_write_nvm_cfg(struct ixgbe_hw *hw, u8 cmd_flags,
+ void *data, u16 buf_size, u16 elem_count);
+
+s32 ixgbe_nvm_validate_checksum(struct ixgbe_hw *hw);
+s32 ixgbe_nvm_recalculate_checksum(struct ixgbe_hw *hw);
+
+s32 ixgbe_nvm_write_activate(struct ixgbe_hw *hw, u16 cmd_flags,
+ u8 *response_flags);
+
+s32 ixgbe_get_nvm_minsrevs(struct ixgbe_hw *hw, struct ixgbe_minsrev_info *minsrevs);
+s32 ixgbe_update_nvm_minsrevs(struct ixgbe_hw *hw, struct ixgbe_minsrev_info *minsrevs);
+
+s32 ixgbe_get_inactive_nvm_ver(struct ixgbe_hw *hw, struct ixgbe_nvm_info *nvm);
+s32 ixgbe_get_active_nvm_ver(struct ixgbe_hw *hw, struct ixgbe_nvm_info *nvm);
+
+s32 ixgbe_get_inactive_netlist_ver(struct ixgbe_hw *hw, struct ixgbe_netlist_info *netlist);
+s32 ixgbe_init_nvm(struct ixgbe_hw *hw);
+
+s32 ixgbe_sanitize_operate(struct ixgbe_hw *hw);
+s32 ixgbe_sanitize_nvm(struct ixgbe_hw *hw, u8 cmd_flags, u8 *values);
+
+s32 ixgbe_read_sr_word_aci(struct ixgbe_hw *hw, u16 offset, u16 *data);
+s32 ixgbe_read_sr_buf_aci(struct ixgbe_hw *hw, u16 offset, u16 *words, u16 *data);
+s32 ixgbe_read_flat_nvm(struct ixgbe_hw *hw, u32 offset, u32 *length,
+ u8 *data, bool read_shadow_ram);
+
+s32 ixgbe_write_sr_word_aci(struct ixgbe_hw *hw, u32 offset, const u16 *data);
+s32 ixgbe_write_sr_buf_aci(struct ixgbe_hw *hw, u32 offset, u16 words, const u16 *data);
+
+s32 ixgbe_aci_alternate_write(struct ixgbe_hw *hw, u32 reg_addr0,
+ u32 reg_val0, u32 reg_addr1, u32 reg_val1);
+s32 ixgbe_aci_alternate_read(struct ixgbe_hw *hw, u32 reg_addr0,
+ u32 *reg_val0, u32 reg_addr1, u32 *reg_val1);
+s32 ixgbe_aci_alternate_write_done(struct ixgbe_hw *hw, u8 bios_mode,
+ bool *reset_needed);
+s32 ixgbe_aci_alternate_clear(struct ixgbe_hw *hw);
+
+s32 ixgbe_aci_get_internal_data(struct ixgbe_hw *hw, u16 cluster_id,
+ u16 table_id, u32 start, void *buf,
+ u16 buf_size, u16 *ret_buf_size,
+ u16 *ret_next_cluster, u16 *ret_next_table,
+ u32 *ret_next_index);
+
+s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw,
+ struct ixgbe_nvm_access_cmd *cmd,
+ struct ixgbe_nvm_access_data *data);
+
+s32 ixgbe_aci_set_health_status_config(struct ixgbe_hw *hw, u8 event_source);
+
+/* E610 operations */
+s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw);
+s32 ixgbe_reset_hw_E610(struct ixgbe_hw *hw);
+s32 ixgbe_start_hw_E610(struct ixgbe_hw *hw);
+enum ixgbe_media_type ixgbe_get_media_type_E610(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer_E610(struct ixgbe_hw *hw);
+s32 ixgbe_setup_link_E610(struct ixgbe_hw *hw, ixgbe_link_speed speed,
+ bool autoneg_wait);
+s32 ixgbe_check_link_E610(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
+ bool *link_up, bool link_up_wait_to_complete);
+s32 ixgbe_get_link_capabilities_E610(struct ixgbe_hw *hw,
+ ixgbe_link_speed *speed,
+ bool *autoneg);
+s32 ixgbe_cfg_phy_fc(struct ixgbe_hw *hw,
+ struct ixgbe_aci_cmd_set_phy_cfg_data *cfg,
+ enum ixgbe_fc_mode req_mode);
+s32 ixgbe_setup_fc_E610(struct ixgbe_hw *hw);
+void ixgbe_fc_autoneg_E610(struct ixgbe_hw *hw);
+s32 ixgbe_set_fw_drv_ver_E610(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
+ u8 sub, u16 len, const char *driver_ver);
+void ixgbe_disable_rx_E610(struct ixgbe_hw *hw);
+s32 ixgbe_setup_eee_E610(struct ixgbe_hw *hw, bool enable_eee);
+bool ixgbe_fw_recovery_mode_E610(struct ixgbe_hw *hw);
+bool ixgbe_fw_rollback_mode_E610(struct ixgbe_hw *hw);
+bool ixgbe_get_fw_tsam_mode_E610(struct ixgbe_hw *hw);
+s32 ixgbe_init_phy_ops_E610(struct ixgbe_hw *hw);
+s32 ixgbe_identify_phy_E610(struct ixgbe_hw *hw);
+s32 ixgbe_identify_module_E610(struct ixgbe_hw *hw);
+s32 ixgbe_setup_phy_link_E610(struct ixgbe_hw *hw);
+s32 ixgbe_get_phy_firmware_version_E610(struct ixgbe_hw *hw,
+ u16 *firmware_version);
+s32 ixgbe_read_i2c_sff8472_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 *sff8472_data);
+s32 ixgbe_read_i2c_eeprom_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 *eeprom_data);
+s32 ixgbe_write_i2c_eeprom_E610(struct ixgbe_hw *hw, u8 byte_offset,
+ u8 eeprom_data);
+s32 ixgbe_check_overtemp_E610(struct ixgbe_hw *hw);
+s32 ixgbe_set_phy_power_E610(struct ixgbe_hw *hw, bool on);
+s32 ixgbe_enter_lplu_E610(struct ixgbe_hw *hw);
+s32 ixgbe_init_eeprom_params_E610(struct ixgbe_hw *hw);
+s32 ixgbe_read_ee_aci_E610(struct ixgbe_hw *hw, u16 offset, u16 *data);
+s32 ixgbe_read_ee_aci_buffer_E610(struct ixgbe_hw *hw, u16 offset,
+ u16 words, u16 *data);
+s32 ixgbe_write_ee_aci_E610(struct ixgbe_hw *hw, u16 offset, u16 data);
+s32 ixgbe_write_ee_aci_buffer_E610(struct ixgbe_hw *hw, u16 offset,
+ u16 words, u16 *data);
+s32 ixgbe_calc_eeprom_checksum_E610(struct ixgbe_hw *hw);
+s32 ixgbe_update_eeprom_checksum_E610(struct ixgbe_hw *hw);
+s32 ixgbe_validate_eeprom_checksum_E610(struct ixgbe_hw *hw, u16 *checksum_val);
+s32 ixgbe_read_pba_string_E610(struct ixgbe_hw *hw, u8 *pba_num, u32 pba_num_size);
+
+#endif /* _IXGBE_E610_H_ */
diff --git a/sys/dev/ixgbe/ixgbe_osdep.c b/sys/dev/ixgbe/ixgbe_osdep.c
index 892924712c38..9bd9ce63b786 100644
--- a/sys/dev/ixgbe/ixgbe_osdep.c
+++ b/sys/dev/ixgbe/ixgbe_osdep.c
@@ -114,3 +114,29 @@ ixgbe_link_speed_to_baudrate(ixgbe_link_speed speed)
return baudrate;
}
+
+void
+ixgbe_init_lock(struct ixgbe_lock *lock)
+{
+ mtx_init(&lock->mutex, "mutex",
+ "ixgbe ACI lock", MTX_DEF | MTX_DUPOK);
+}
+
+void
+ixgbe_acquire_lock(struct ixgbe_lock *lock)
+{
+ mtx_lock(&lock->mutex);
+}
+
+void
+ixgbe_release_lock(struct ixgbe_lock *lock)
+{
+ mtx_unlock(&lock->mutex);
+}
+
+void
+ixgbe_destroy_lock(struct ixgbe_lock *lock)
+{
+ if (mtx_initialized(&lock->mutex))
+ mtx_destroy(&lock->mutex);
+}
diff --git a/sys/dev/ixgbe/ixgbe_osdep.h b/sys/dev/ixgbe/ixgbe_osdep.h
index cf7c578fd684..8cf1d13736ce 100644
--- a/sys/dev/ixgbe/ixgbe_osdep.h
+++ b/sys/dev/ixgbe/ixgbe_osdep.h
@@ -133,7 +133,9 @@ enum {
/* XXX these need to be revisited */
#define IXGBE_CPU_TO_LE16 htole16
#define IXGBE_CPU_TO_LE32 htole32
+#define IXGBE_LE16_TO_CPU le16toh
#define IXGBE_LE32_TO_CPU le32toh
+#define IXGBE_LE64_TO_CPU le64toh
#define IXGBE_LE32_TO_CPUS(x) *(x) = le32dec(x)
#define IXGBE_CPU_TO_BE16 htobe16
#define IXGBE_CPU_TO_BE32 htobe32
@@ -146,6 +148,7 @@ typedef int16_t s16;
typedef uint32_t u32;
typedef int32_t s32;
typedef uint64_t u64;
+typedef int64_t s64;
#ifndef __bool_true_false_are_defined
typedef boolean_t bool;
#endif
@@ -195,6 +198,11 @@ struct ixgbe_osdep
bus_space_handle_t mem_bus_space_handle;
};
+struct ixgbe_lock
+{
+ struct mtx mutex;
+};
+
/* These routines need struct ixgbe_hw declared */
struct ixgbe_hw;
device_t ixgbe_dev_from_hw(struct ixgbe_hw *hw);
@@ -222,4 +230,27 @@ extern void ixgbe_write_reg_array(struct ixgbe_hw *, u32, u32, u32);
#define IXGBE_WRITE_REG_ARRAY(a, reg, offset, val) \
ixgbe_write_reg_array(a, reg, offset, val)
+void ixgbe_init_lock(struct ixgbe_lock *);
+void ixgbe_destroy_lock(struct ixgbe_lock *);
+void ixgbe_acquire_lock(struct ixgbe_lock *);
+void ixgbe_release_lock(struct ixgbe_lock *);
+
+static inline void *
+ixgbe_calloc(struct ixgbe_hw __unused *hw, size_t count, size_t size)
+{
+ return (malloc(count * size, M_DEVBUF, M_ZERO | M_NOWAIT));
+}
+
+static inline void *
+ixgbe_malloc(struct ixgbe_hw __unused *hw, size_t size)
+{
+ return (malloc(size, M_DEVBUF, M_ZERO | M_NOWAIT));
+}
+
+static inline void
+ixgbe_free(struct ixgbe_hw __unused *hw, void *addr)
+{
+ free(addr, M_DEVBUF);
+}
+
#endif /* _IXGBE_OSDEP_H_ */
diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h
index 91b46da72c75..0bbe7806d41d 100644
--- a/sys/dev/ixgbe/ixgbe_type.h
+++ b/sys/dev/ixgbe/ixgbe_type.h
@@ -74,6 +74,7 @@
*/
#include "ixgbe_osdep.h"
+#include "ixgbe_type_e610.h"
/* Override this by setting IOMEM in your ixgbe_osdep.h header */
#define IOMEM
@@ -150,12 +151,19 @@
#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD
#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE
#define IXGBE_DEV_ID_X550EM_X_XFI 0x15B0
+#define IXGBE_DEV_ID_E610_BACKPLANE 0x57AE
+#define IXGBE_DEV_ID_E610_SFP 0x57AF
+#define IXGBE_DEV_ID_E610_10G_T 0x57B0
+#define IXGBE_DEV_ID_E610_2_5G_T 0x57B1
+#define IXGBE_DEV_ID_E610_SGMII 0x57B2
#define IXGBE_DEV_ID_X550_VF_HV 0x1564
#define IXGBE_DEV_ID_X550_VF 0x1565
#define IXGBE_DEV_ID_X550EM_A_VF 0x15C5
#define IXGBE_DEV_ID_X550EM_A_VF_HV 0x15B4
#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8
#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9
+#define IXGBE_DEV_ID_E610_VF 0x57AD
+#define IXGBE_SUBDEV_ID_E610_VF_HV 0x0001
#define IXGBE_CAT(r, m) IXGBE_##r##m
@@ -1969,6 +1977,7 @@ enum {
#define IXGBE_EICR_MAILBOX 0x00080000 /* VF to PF Mailbox Interrupt */
#define IXGBE_EICR_LSC 0x00100000 /* Link Status Change */
#define IXGBE_EICR_LINKSEC 0x00200000 /* PN Threshold */
+#define IXGBE_EICR_FW_EVENT 0x00200000 /* Async FW event */
#define IXGBE_EICR_MNG 0x00400000 /* Manageability Event Interrupt */
#define IXGBE_EICR_TS 0x00800000 /* Thermal Sensor Event */
#define IXGBE_EICR_TIMESYNC 0x01000000 /* Timesync Event */
@@ -2004,6 +2013,7 @@ enum {
#define IXGBE_EICS_PCI IXGBE_EICR_PCI /* PCI Exception */
#define IXGBE_EICS_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
#define IXGBE_EICS_LSC IXGBE_EICR_LSC /* Link Status Change */
+#define IXGBE_EICS_FW_EVENT IXGBE_EICR_FW_EVENT /* Async FW event */
#define IXGBE_EICS_MNG IXGBE_EICR_MNG /* MNG Event Interrupt */
#define IXGBE_EICS_TIMESYNC IXGBE_EICR_TIMESYNC /* Timesync Event */
#define IXGBE_EICS_GPI_SDP0 IXGBE_EICR_GPI_SDP0 /* SDP0 Gen Purpose Int */
@@ -2025,6 +2035,7 @@ enum {
#define IXGBE_EIMS_PCI IXGBE_EICR_PCI /* PCI Exception */
#define IXGBE_EIMS_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
#define IXGBE_EIMS_LSC IXGBE_EICR_LSC /* Link Status Change */
+#define IXGBE_EIMS_FW_EVENT IXGBE_EICR_FW_EVENT /* Async FW event */
#define IXGBE_EIMS_MNG IXGBE_EICR_MNG /* MNG Event Interrupt */
#define IXGBE_EIMS_TS IXGBE_EICR_TS /* Thermal Sensor Event */
#define IXGBE_EIMS_TIMESYNC IXGBE_EICR_TIMESYNC /* Timesync Event */
@@ -2047,6 +2058,7 @@ enum {
#define IXGBE_EIMC_PCI IXGBE_EICR_PCI /* PCI Exception */
#define IXGBE_EIMC_MAILBOX IXGBE_EICR_MAILBOX /* VF to PF Mailbox Int */
#define IXGBE_EIMC_LSC IXGBE_EICR_LSC /* Link Status Change */
+#define IXGBE_EIMC_FW_EVENT IXGBE_EICR_FW_EVENT /* Async FW event */
#define IXGBE_EIMC_MNG IXGBE_EICR_MNG /* MNG Event Interrupt */
#define IXGBE_EIMC_TIMESYNC IXGBE_EICR_TIMESYNC /* Timesync Event */
#define IXGBE_EIMC_GPI_SDP0 IXGBE_EICR_GPI_SDP0 /* SDP0 Gen Purpose Int */
@@ -2454,6 +2466,7 @@ enum {
#define IXGBE_82599_SERIAL_NUMBER_MAC_ADDR 0x11
#define IXGBE_X550_SERIAL_NUMBER_MAC_ADDR 0x04
+#define IXGBE_PCIE_MSIX_E610_CAPS 0xB2
#define IXGBE_PCIE_MSIX_82599_CAPS 0x72
#define IXGBE_MAX_MSIX_VECTORS_82599 0x40
#define IXGBE_PCIE_MSIX_82598_CAPS 0x62
@@ -2571,6 +2584,7 @@ enum {
#define IXGBE_PCI_DEVICE_STATUS 0xAA
#define IXGBE_PCI_DEVICE_STATUS_TRANSACTION_PENDING 0x0020
#define IXGBE_PCI_LINK_STATUS 0xB2
+#define IXGBE_PCI_LINK_STATUS_E610 0x82
#define IXGBE_PCI_DEVICE_CONTROL2 0xC8
#define IXGBE_PCI_LINK_WIDTH 0x3F0
#define IXGBE_PCI_LINK_WIDTH_1 0x10
@@ -2581,6 +2595,7 @@ enum {
#define IXGBE_PCI_LINK_SPEED_2500 0x1
#define IXGBE_PCI_LINK_SPEED_5000 0x2
#define IXGBE_PCI_LINK_SPEED_8000 0x3
+#define IXGBE_PCI_LINK_SPEED_16000 0x4
#define IXGBE_PCI_HEADER_TYPE_REGISTER 0x0E
#define IXGBE_PCI_HEADER_TYPE_MULTIFUNC 0x80
#define IXGBE_PCI_DEVICE_CONTROL2_16ms 0x0005
@@ -3743,6 +3758,8 @@ enum ixgbe_mac_type {
ixgbe_mac_X550_vf,
ixgbe_mac_X550EM_x_vf,
ixgbe_mac_X550EM_a_vf,
+ ixgbe_mac_E610,
+ ixgbe_mac_E610_vf,
ixgbe_num_macs
};
@@ -3822,7 +3839,9 @@ enum ixgbe_media_type {
ixgbe_media_type_copper,
ixgbe_media_type_backplane,
ixgbe_media_type_cx4,
- ixgbe_media_type_virtual
+ ixgbe_media_type_virtual,
+ ixgbe_media_type_da,
+ ixgbe_media_type_aui
};
/* Flow Control Settings */
@@ -3831,6 +3850,7 @@ enum ixgbe_fc_mode {
ixgbe_fc_rx_pause,
ixgbe_fc_tx_pause,
ixgbe_fc_full,
+ ixgbe_fc_auto,
ixgbe_fc_default
};
@@ -3863,6 +3883,7 @@ enum ixgbe_bus_speed {
ixgbe_bus_speed_2500 = 2500,
ixgbe_bus_speed_5000 = 5000,
ixgbe_bus_speed_8000 = 8000,
+ ixgbe_bus_speed_16000 = 16000,
ixgbe_bus_speed_reserved
};
@@ -4007,6 +4028,7 @@ struct ixgbe_eeprom_operations {
s32 (*validate_checksum)(struct ixgbe_hw *, u16 *);
s32 (*update_checksum)(struct ixgbe_hw *);
s32 (*calc_checksum)(struct ixgbe_hw *);
+ s32 (*read_pba_string)(struct ixgbe_hw *, u8 *, u32);
};
struct ixgbe_mac_operations {
@@ -4118,6 +4140,10 @@ struct ixgbe_mac_operations {
void (*mdd_event)(struct ixgbe_hw *hw, u32 *vf_bitmap);
void (*restore_mdd_vf)(struct ixgbe_hw *hw, u32 vf);
bool (*fw_recovery_mode)(struct ixgbe_hw *hw);
+ bool (*fw_rollback_mode)(struct ixgbe_hw *hw);
+ bool (*get_fw_tsam_mode)(struct ixgbe_hw *hw);
+ s32 (*get_fw_version)(struct ixgbe_hw *hw);
+ s32 (*get_nvm_version)(struct ixgbe_hw *hw, struct ixgbe_nvm_info *nvm);
};
struct ixgbe_phy_operations {
@@ -4162,6 +4188,9 @@ struct ixgbe_link_operations {
struct ixgbe_link_info {
struct ixgbe_link_operations ops;
u8 addr;
+ struct ixgbe_link_status link_info;
+ struct ixgbe_link_status link_info_old;
+ u8 get_link_info;
};
struct ixgbe_eeprom_info {
@@ -4233,6 +4262,9 @@ struct ixgbe_phy_info {
bool reset_if_overtemp;
bool qsfp_shared_i2c_bus;
u32 nw_mng_if_sel;
+ u64 phy_type_low;
+ u64 phy_type_high;
+ struct ixgbe_aci_cmd_set_phy_cfg_data curr_user_phy_cfg;
};
#include "ixgbe_mbx.h"
@@ -4261,6 +4293,22 @@ struct ixgbe_hw {
bool wol_enabled;
bool need_crosstalk_fix;
u32 fw_rst_cnt;
+ u8 api_branch;
+ u8 api_maj_ver;
+ u8 api_min_ver;
+ u8 api_patch;
+ u8 fw_branch;
+ u8 fw_maj_ver;
+ u8 fw_min_ver;
+ u8 fw_patch;
+ u32 fw_build;
+ struct ixgbe_aci_info aci;
+ struct ixgbe_flash_info flash;
+ struct ixgbe_hw_dev_caps dev_caps;
+ struct ixgbe_hw_func_caps func_caps;
+ struct ixgbe_fwlog_cfg fwlog_cfg;
+ bool fwlog_support_ena;
+ struct ixgbe_fwlog_ring fwlog_ring;
};
#define ixgbe_call_func(hw, func, params, error) \
@@ -4312,6 +4360,24 @@ struct ixgbe_hw {
#define IXGBE_ERR_MBX_NOMSG -42
#define IXGBE_ERR_TIMEOUT -43
+#define IXGBE_ERR_NOT_SUPPORTED -45
+#define IXGBE_ERR_OUT_OF_RANGE -46
+
+#define IXGBE_ERR_NVM -50
+#define IXGBE_ERR_NVM_CHECKSUM -51
+#define IXGBE_ERR_BUF_TOO_SHORT -52
+#define IXGBE_ERR_NVM_BLANK_MODE -53
+#define IXGBE_ERR_INVAL_SIZE -54
+#define IXGBE_ERR_DOES_NOT_EXIST -55
+
+#define IXGBE_ERR_ACI_ERROR -100
+#define IXGBE_ERR_ACI_DISABLED -101
+#define IXGBE_ERR_ACI_TIMEOUT -102
+#define IXGBE_ERR_ACI_BUSY -103
+#define IXGBE_ERR_ACI_NO_WORK -104
+#define IXGBE_ERR_ACI_NO_EVENTS -105
+#define IXGBE_ERR_FW_API_VER -106
+
#define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF
@@ -4540,5 +4606,6 @@ struct ixgbe_bypass_eeprom {
#define IXGBE_REQUEST_TASK_FDIR 0x08
#define IXGBE_REQUEST_TASK_PHY 0x10
#define IXGBE_REQUEST_TASK_LSC 0x20
+#define IXGBE_REQUEST_TASK_FWEVENT 0x40
#endif /* _IXGBE_TYPE_H_ */
diff --git a/sys/dev/ixgbe/ixgbe_type_e610.h b/sys/dev/ixgbe/ixgbe_type_e610.h
new file mode 100644
index 000000000000..e300030c3ba4
--- /dev/null
+++ b/sys/dev/ixgbe/ixgbe_type_e610.h
@@ -0,0 +1,2278 @@
+/******************************************************************************
+ SPDX-License-Identifier: BSD-3-Clause
+
+ Copyright (c) 2025, Intel Corporation
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the Intel Corporation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************************/
+
+#ifndef _IXGBE_TYPE_E610_H_
+#define _IXGBE_TYPE_E610_H_
+
+
+/* Generic defines */
+#ifndef BIT
+#define BIT(a) (1UL << (a))
+#endif /* !BIT */
+#ifndef BIT_ULL
+#define BIT_ULL(a) (1ULL << (a))
+#endif /* !BIT_ULL */
+#ifndef BITS_PER_BYTE
+#define BITS_PER_BYTE 8
+#endif /* !BITS_PER_BYTE */
+#ifndef DIVIDE_AND_ROUND_UP
+#define DIVIDE_AND_ROUND_UP(a, b) (((a) + (b) - 1) / (b))
+#endif /* !DIVIDE_AND_ROUND_UP */
+
+#ifndef ROUND_UP
+/**
+ * ROUND_UP - round up to next arbitrary multiple (not a power of 2)
+ * @a: value to round up
+ * @b: arbitrary multiple
+ *
+ * Round up to the next multiple of the arbitrary b.
+ */
+#define ROUND_UP(a, b) ((b) * DIVIDE_AND_ROUND_UP((a), (b)))
+#endif /* !ROUND_UP */
+
+#define MAKEMASK(mask, shift) (mask << shift)
+
+#define BYTES_PER_WORD 2
+#define BYTES_PER_DWORD 4
+
+#ifndef BITS_PER_LONG
+#define BITS_PER_LONG 64
+#endif /* !BITS_PER_LONG */
+#ifndef BITS_PER_LONG_LONG
+#define BITS_PER_LONG_LONG 64
+#endif /* !BITS_PER_LONG_LONG */
+#undef GENMASK
+#define GENMASK(h, l) \
+ (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
+#undef GENMASK_ULL
+#define GENMASK_ULL(h, l) \
+ (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
+
+/* Data type manipulation macros. */
+#define HI_DWORD(x) ((u32)((((x) >> 16) >> 16) & 0xFFFFFFFF))
+#define LO_DWORD(x) ((u32)((x) & 0xFFFFFFFF))
+#define HI_WORD(x) ((u16)(((x) >> 16) & 0xFFFF))
+#define LO_WORD(x) ((u16)((x) & 0xFFFF))
+#define HI_BYTE(x) ((u8)(((x) >> 8) & 0xFF))
+#define LO_BYTE(x) ((u8)((x) & 0xFF))
+
+#ifndef MIN_T
+#define MIN_T(_t, _a, _b) min((_t)(_a), (_t)(_b))
+#endif
+
+#define IS_ASCII(_ch) ((_ch) < 0x80)
+
+/**
+ * ixgbe_struct_size - size of struct with C99 flexible array member
+ * @ptr: pointer to structure
+ * @field: flexible array member (last member of the structure)
+ * @num: number of elements of that flexible array member
+ */
+#define ixgbe_struct_size(ptr, field, num) \
+ (sizeof(*(ptr)) + sizeof(*(ptr)->field) * (num))
+
+/* General E610 defines */
+#define IXGBE_MAX_VSI 768
+
+/* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */
+#define E610_SR_VPD_SIZE_WORDS 512
+#define E610_SR_PCIE_ALT_SIZE_WORDS 512
+
+/* Checksum and Shadow RAM pointers */
+#define E610_SR_NVM_DEV_STARTER_VER 0x18
+#define E610_NVM_VER_LO_SHIFT 0
+#define E610_NVM_VER_LO_MASK (0xff << E610_NVM_VER_LO_SHIFT)
+#define E610_NVM_VER_HI_SHIFT 12
+#define E610_NVM_VER_HI_MASK (0xf << E610_NVM_VER_HI_SHIFT)
+#define E610_SR_NVM_MAP_VER 0x29
+#define E610_SR_NVM_EETRACK_LO 0x2D
+#define E610_SR_NVM_EETRACK_HI 0x2E
+#define E610_SR_VPD_PTR 0x2F
+#define E610_SR_PCIE_ALT_AUTO_LOAD_PTR 0x3E
+#define E610_SR_SW_CHECKSUM_WORD 0x3F
+#define E610_SR_PFA_PTR 0x40
+#define E610_SR_1ST_NVM_BANK_PTR 0x42
+#define E610_SR_NVM_BANK_SIZE 0x43
+#define E610_SR_1ST_OROM_BANK_PTR 0x44
+#define E610_SR_OROM_BANK_SIZE 0x45
+#define E610_SR_NETLIST_BANK_PTR 0x46
+#define E610_SR_NETLIST_BANK_SIZE 0x47
+#define E610_SR_POINTER_TYPE_BIT BIT(15)
+#define E610_SR_POINTER_MASK 0x7fff
+#define E610_SR_HALF_4KB_SECTOR_UNITS 2048
+#define E610_GET_PFA_POINTER_IN_WORDS(offset) \
+ ((offset & E610_SR_POINTER_TYPE_BIT) == E610_SR_POINTER_TYPE_BIT) ? \
+ ((offset & E610_SR_POINTER_MASK) * E610_SR_HALF_4KB_SECTOR_UNITS) : \
+ (offset & E610_SR_POINTER_MASK)
+
+/* Checksum and Shadow RAM pointers */
+#define E610_SR_NVM_CTRL_WORD 0x00
+#define E610_SR_PBA_BLOCK_PTR 0x16
+
+/* The Orom version topology */
+#define IXGBE_OROM_VER_PATCH_SHIFT 0
+#define IXGBE_OROM_VER_PATCH_MASK (0xff << IXGBE_OROM_VER_PATCH_SHIFT)
+#define IXGBE_OROM_VER_BUILD_SHIFT 8
+#define IXGBE_OROM_VER_BUILD_MASK (0xffff << IXGBE_OROM_VER_BUILD_SHIFT)
+#define IXGBE_OROM_VER_SHIFT 24
+#define IXGBE_OROM_VER_MASK (0xff << IXGBE_OROM_VER_SHIFT)
+
+/* CSS Header words */
+#define IXGBE_NVM_CSS_HDR_LEN_L 0x02
+#define IXGBE_NVM_CSS_HDR_LEN_H 0x03
+#define IXGBE_NVM_CSS_SREV_L 0x14
+#define IXGBE_NVM_CSS_SREV_H 0x15
+
+/* Length of Authentication header section in words */
+#define IXGBE_NVM_AUTH_HEADER_LEN 0x08
+
+/* The Netlist ID Block is located after all of the Link Topology nodes. */
+#define IXGBE_NETLIST_ID_BLK_SIZE 0x30
+#define IXGBE_NETLIST_ID_BLK_OFFSET(n) IXGBE_NETLIST_LINK_TOPO_OFFSET(0x0004 + 2 * (n))
+
+/* netlist ID block field offsets (word offsets) */
+#define IXGBE_NETLIST_ID_BLK_MAJOR_VER_LOW 0x02
+#define IXGBE_NETLIST_ID_BLK_MAJOR_VER_HIGH 0x03
+#define IXGBE_NETLIST_ID_BLK_MINOR_VER_LOW 0x04
+#define IXGBE_NETLIST_ID_BLK_MINOR_VER_HIGH 0x05
+#define IXGBE_NETLIST_ID_BLK_TYPE_LOW 0x06
+#define IXGBE_NETLIST_ID_BLK_TYPE_HIGH 0x07
+#define IXGBE_NETLIST_ID_BLK_REV_LOW 0x08
+#define IXGBE_NETLIST_ID_BLK_REV_HIGH 0x09
+#define IXGBE_NETLIST_ID_BLK_SHA_HASH_WORD(n) (0x0A + (n))
+#define IXGBE_NETLIST_ID_BLK_CUST_VER 0x2F
+
+/* The Link Topology Netlist section is stored as a series of words. It is
+ * stored in the NVM as a TLV, with the first two words containing the type
+ * and length.
+ */
+#define IXGBE_NETLIST_LINK_TOPO_MOD_ID 0x011B
+#define IXGBE_NETLIST_TYPE_OFFSET 0x0000
+#define IXGBE_NETLIST_LEN_OFFSET 0x0001
+
+/* The Link Topology section follows the TLV header. When reading the netlist
+ * using ixgbe_read_netlist_module, we need to account for the 2-word TLV
+ * header.
+ */
+#define IXGBE_NETLIST_LINK_TOPO_OFFSET(n) ((n) + 2)
+#define IXGBE_LINK_TOPO_MODULE_LEN IXGBE_NETLIST_LINK_TOPO_OFFSET(0x0000)
+#define IXGBE_LINK_TOPO_NODE_COUNT IXGBE_NETLIST_LINK_TOPO_OFFSET(0x0001)
+#define IXGBE_LINK_TOPO_NODE_COUNT_M MAKEMASK(0x3FF, 0)
+
+/* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */
+#define IXGBE_SR_CTRL_WORD_1_S 0x06
+#define IXGBE_SR_CTRL_WORD_1_M (0x03 << IXGBE_SR_CTRL_WORD_1_S)
+#define IXGBE_SR_CTRL_WORD_VALID 0x1
+#define IXGBE_SR_CTRL_WORD_OROM_BANK BIT(3)
+#define IXGBE_SR_CTRL_WORD_NETLIST_BANK BIT(4)
+#define IXGBE_SR_CTRL_WORD_NVM_BANK BIT(5)
+#define IXGBE_SR_NVM_PTR_4KB_UNITS BIT(15)
+
+/* These macros strip from NVM Image Revision the particular part of NVM ver:
+ major ver, minor ver and image id */
+#define E610_NVM_MAJOR_VER(x) ((x & 0xF000) >> 12)
+#define E610_NVM_MINOR_VER(x) (x & 0x00FF)
+
+/* Shadow RAM related */
+#define IXGBE_SR_SECTOR_SIZE_IN_WORDS 0x800
+#define IXGBE_SR_WORDS_IN_1KB 512
+/* Checksum should be calculated such that after adding all the words,
+ * including the checksum word itself, the sum should be 0xBABA.
+ */
+#define IXGBE_SR_SW_CHECKSUM_BASE 0xBABA
+
+/* Netlist */
+#define IXGBE_MAX_NETLIST_SIZE 10
+
+/* General registers */
+
+/* Firmware Status Register (GL_FWSTS) */
+#define GL_FWSTS 0x00083048 /* Reset Source: POR */
+#define GL_FWSTS_FWS0B_S 0
+#define GL_FWSTS_FWS0B_M MAKEMASK(0xFF, 0)
+#define GL_FWSTS_FWROWD_S 8
+#define GL_FWSTS_FWROWD_M BIT(8)
+#define GL_FWSTS_FWRI_S 9
+#define GL_FWSTS_FWRI_M BIT(9)
+#define GL_FWSTS_FWS1B_S 16
+#define GL_FWSTS_FWS1B_M MAKEMASK(0xFF, 16)
+#define GL_FWSTS_EP_PF0 BIT(24)
+#define GL_FWSTS_EP_PF1 BIT(25)
+
+/* Recovery mode values of Firmware Status 1 Byte (FWS1B) bitfield */
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_CORER_LEGACY 0x0B
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_GLOBR_LEGACY 0x0C
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_CORER 0x30
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_GLOBR 0x31
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_TRANSITION 0x32
+#define GL_FWSTS_FWS1B_RECOVERY_MODE_NVM 0x33
+
+/* Firmware Status (GL_MNG_FWSM) */
+#define GL_MNG_FWSM 0x000B6134 /* Reset Source: POR */
+#define GL_MNG_FWSM_FW_MODES_S 0
+#define GL_MNG_FWSM_FW_MODES_M MAKEMASK(0x7, 0)
+#define GL_MNG_FWSM_RSV0_S 2
+#define GL_MNG_FWSM_RSV0_M MAKEMASK(0xFF, 2)
+#define GL_MNG_FWSM_EEP_RELOAD_IND_S 10
+#define GL_MNG_FWSM_EEP_RELOAD_IND_M BIT(10)
+#define GL_MNG_FWSM_RSV1_S 11
+#define GL_MNG_FWSM_RSV1_M MAKEMASK(0xF, 11)
+#define GL_MNG_FWSM_RSV2_S 15
+#define GL_MNG_FWSM_RSV2_M BIT(15)
+#define GL_MNG_FWSM_PCIR_AL_FAILURE_S 16
+#define GL_MNG_FWSM_PCIR_AL_FAILURE_M BIT(16)
+#define GL_MNG_FWSM_POR_AL_FAILURE_S 17
+#define GL_MNG_FWSM_POR_AL_FAILURE_M BIT(17)
+#define GL_MNG_FWSM_RSV3_S 18
+#define GL_MNG_FWSM_RSV3_M BIT(18)
+#define GL_MNG_FWSM_EXT_ERR_IND_S 19
+#define GL_MNG_FWSM_EXT_ERR_IND_M MAKEMASK(0x3F, 19)
+#define GL_MNG_FWSM_RSV4_S 25
+#define GL_MNG_FWSM_RSV4_M BIT(25)
+#define GL_MNG_FWSM_RESERVED_11_S 26
+#define GL_MNG_FWSM_RESERVED_11_M MAKEMASK(0xF, 26)
+#define GL_MNG_FWSM_RSV5_S 30
+#define GL_MNG_FWSM_RSV5_M MAKEMASK(0x3, 30)
+
+/* FW mode indications */
+#define GL_MNG_FWSM_FW_MODES_DEBUG_M BIT(0)
+#define GL_MNG_FWSM_FW_MODES_RECOVERY_M BIT(1)
+#define GL_MNG_FWSM_FW_MODES_ROLLBACK_M BIT(2)
+
+/* Global NVM General Status Register */
+#define GLNVM_GENS 0x000B6100 /* Reset Source: POR */
+#define GLNVM_GENS_NVM_PRES_S 0
+#define GLNVM_GENS_NVM_PRES_M BIT(0)
+#define GLNVM_GENS_SR_SIZE_S 5
+#define GLNVM_GENS_SR_SIZE_M MAKEMASK(0x7, 5)
+#define GLNVM_GENS_BANK1VAL_S 8
+#define GLNVM_GENS_BANK1VAL_M BIT(8)
+#define GLNVM_GENS_ALT_PRST_S 23
+#define GLNVM_GENS_ALT_PRST_M BIT(23)
+#define GLNVM_GENS_FL_AUTO_RD_S 25
+#define GLNVM_GENS_FL_AUTO_RD_M BIT(25)
+
+/* Flash Access Register */
+#define GLNVM_FLA 0x000B6108 /* Reset Source: POR */
+#define GLNVM_FLA_LOCKED_S 6
+#define GLNVM_FLA_LOCKED_M BIT(6)
+
+/* Bit Bang registers */
+#define RDASB_MSGCTL 0x000B6820
+#define RDASB_MSGCTL_HDR_DWS_S 0
+#define RDASB_MSGCTL_EXP_RDW_S 8
+#define RDASB_MSGCTL_CMDV_M BIT(31)
+#define RDASB_RSPCTL 0x000B6824
+#define RDASB_RSPCTL_BAD_LENGTH_M BIT(30)
+#define RDASB_RSPCTL_NOT_SUCCESS_M BIT(31)
+#define RDASB_WHDR0 0x000B68F4
+#define RDASB_WHDR1 0x000B68F8
+#define RDASB_WHDR2 0x000B68FC
+#define RDASB_WHDR3 0x000B6900
+#define RDASB_WHDR4 0x000B6904
+#define RDASB_RHDR0 0x000B6AFC
+#define RDASB_RHDR0_RESPONSE_S 27
+#define RDASB_RHDR0_RESPONSE_M MAKEMASK(0x7, 27)
+#define RDASB_RDATA0 0x000B6B00
+#define RDASB_RDATA1 0x000B6B04
+
+/* SPI Registers */
+#define SPISB_MSGCTL 0x000B7020
+#define SPISB_MSGCTL_HDR_DWS_S 0
+#define SPISB_MSGCTL_EXP_RDW_S 8
+#define SPISB_MSGCTL_MSG_MODE_S 26
+#define SPISB_MSGCTL_TOKEN_MODE_S 28
+#define SPISB_MSGCTL_BARCLR_S 30
+#define SPISB_MSGCTL_CMDV_S 31
+#define SPISB_MSGCTL_CMDV_M BIT(31)
+#define SPISB_RSPCTL 0x000B7024
+#define SPISB_RSPCTL_BAD_LENGTH_M BIT(30)
+#define SPISB_RSPCTL_NOT_SUCCESS_M BIT(31)
+#define SPISB_WHDR0 0x000B70F4
+#define SPISB_WHDR0_DEST_SEL_S 12
+#define SPISB_WHDR0_OPCODE_SEL_S 16
+#define SPISB_WHDR0_TAG_S 24
+#define SPISB_WHDR1 0x000B70F8
+#define SPISB_WHDR2 0x000B70FC
+#define SPISB_RDATA 0x000B7300
+#define SPISB_WDATA 0x000B7100
+
+/* Firmware Reset Count register */
+#define GL_FWRESETCNT 0x00083100 /* Reset Source: POR */
+#define GL_FWRESETCNT_FWRESETCNT_S 0
+#define GL_FWRESETCNT_FWRESETCNT_M MAKEMASK(0xFFFFFFFF, 0)
+
+/* Admin Command Interface (ACI) registers */
+#define PF_HIDA(_i) (0x00085000 + ((_i) * 4))
+#define PF_HIDA_2(_i) (0x00085020 + ((_i) * 4))
+#define PF_HIBA(_i) (0x00084000 + ((_i) * 4))
+#define PF_HICR 0x00082048
+
+#define PF_HIDA_MAX_INDEX 15
+#define PF_HIBA_MAX_INDEX 1023
+
+#define PF_HICR_EN BIT(0)
+#define PF_HICR_C BIT(1)
+#define PF_HICR_SV BIT(2)
+#define PF_HICR_EV BIT(3)
+
+#define GL_HIDA(_i) (0x00082000 + ((_i) * 4))
+#define GL_HIDA_2(_i) (0x00082020 + ((_i) * 4))
+#define GL_HIBA(_i) (0x00081000 + ((_i) * 4))
+#define GL_HICR 0x00082040
+
+#define GL_HIDA_MAX_INDEX 15
+#define GL_HIBA_MAX_INDEX 1023
+
+#define GL_HICR_C BIT(1)
+#define GL_HICR_SV BIT(2)
+#define GL_HICR_EV BIT(3)
+
+#define GL_HICR_EN 0x00082044
+
+#define GL_HICR_EN_CHECK BIT(0)
+
+/* Admin Command Interface (ACI) defines */
+/* Defines that help manage the driver vs FW API checks.
+ */
+#define IXGBE_FW_API_VER_BRANCH 0x00
+#define IXGBE_FW_API_VER_MAJOR 0x01
+#define IXGBE_FW_API_VER_MINOR 0x07
+#define IXGBE_FW_API_VER_DIFF_ALLOWED 0x02
+
+#define IXGBE_ACI_DESC_SIZE 32
+#define IXGBE_ACI_DESC_SIZE_IN_DWORDS IXGBE_ACI_DESC_SIZE / BYTES_PER_DWORD
+
+#define IXGBE_ACI_MAX_BUFFER_SIZE 4096 /* Size in bytes */
+#define IXGBE_ACI_DESC_COOKIE_L_DWORD_OFFSET 3
+#define IXGBE_ACI_SEND_DELAY_TIME_MS 10
+#define IXGBE_ACI_SEND_MAX_EXECUTE 3
+/* [ms] timeout of waiting for sync response */
+#define IXGBE_ACI_SYNC_RESPONSE_TIMEOUT 100000
+/* [ms] timeout of waiting for async response */
+#define IXGBE_ACI_ASYNC_RESPONSE_TIMEOUT 150000
+/* [ms] timeout of waiting for resource release */
+#define IXGBE_ACI_RELEASE_RES_TIMEOUT 10000
+
+/* Timestamp spacing for Tools ACI: queue is active if spacing is within the range [LO..HI] */
+#define IXGBE_TOOLS_ACI_ACTIVE_STAMP_SPACING_LO 0
+#define IXGBE_TOOLS_ACI_ACTIVE_STAMP_SPACING_HI 200
+
+/* Timestamp spacing for Tools ACI: queue is expired if spacing is outside the range [LO..HI] */
+#define IXGBE_TOOLS_ACI_EXPIRED_STAMP_SPACING_LO -5
+#define IXGBE_TOOLS_ACI_EXPIRED_STAMP_SPACING_HI 205
+
+/* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */
+#define IXGBE_ACI_LG_BUF 512
+
+/* Flags sub-structure
+ * |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |
+ * |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
+ */
+
+/* command flags and offsets */
+#define IXGBE_ACI_FLAG_DD_S 0
+#define IXGBE_ACI_FLAG_CMP_S 1
+#define IXGBE_ACI_FLAG_ERR_S 2
+#define IXGBE_ACI_FLAG_VFE_S 3
+#define IXGBE_ACI_FLAG_LB_S 9
+#define IXGBE_ACI_FLAG_RD_S 10
+#define IXGBE_ACI_FLAG_VFC_S 11
+#define IXGBE_ACI_FLAG_BUF_S 12
+#define IXGBE_ACI_FLAG_SI_S 13
+#define IXGBE_ACI_FLAG_EI_S 14
+#define IXGBE_ACI_FLAG_FE_S 15
+
+#define IXGBE_ACI_FLAG_DD BIT(IXGBE_ACI_FLAG_DD_S) /* 0x1 */
+#define IXGBE_ACI_FLAG_CMP BIT(IXGBE_ACI_FLAG_CMP_S) /* 0x2 */
+#define IXGBE_ACI_FLAG_ERR BIT(IXGBE_ACI_FLAG_ERR_S) /* 0x4 */
+#define IXGBE_ACI_FLAG_VFE BIT(IXGBE_ACI_FLAG_VFE_S) /* 0x8 */
+#define IXGBE_ACI_FLAG_LB BIT(IXGBE_ACI_FLAG_LB_S) /* 0x200 */
+#define IXGBE_ACI_FLAG_RD BIT(IXGBE_ACI_FLAG_RD_S) /* 0x400 */
+#define IXGBE_ACI_FLAG_VFC BIT(IXGBE_ACI_FLAG_VFC_S) /* 0x800 */
+#define IXGBE_ACI_FLAG_BUF BIT(IXGBE_ACI_FLAG_BUF_S) /* 0x1000 */
+#define IXGBE_ACI_FLAG_SI BIT(IXGBE_ACI_FLAG_SI_S) /* 0x2000 */
+#define IXGBE_ACI_FLAG_EI BIT(IXGBE_ACI_FLAG_EI_S) /* 0x4000 */
+#define IXGBE_ACI_FLAG_FE BIT(IXGBE_ACI_FLAG_FE_S) /* 0x8000 */
+
+/* Admin Command Interface (ACI) error codes */
+enum ixgbe_aci_err {
+ IXGBE_ACI_RC_OK = 0, /* Success */
+ IXGBE_ACI_RC_EPERM = 1, /* Operation not permitted */
+ IXGBE_ACI_RC_ENOENT = 2, /* No such element */
+ IXGBE_ACI_RC_ESRCH = 3, /* Bad opcode */
+ IXGBE_ACI_RC_EINTR = 4, /* Operation interrupted */
+ IXGBE_ACI_RC_EIO = 5, /* I/O error */
+ IXGBE_ACI_RC_ENXIO = 6, /* No such resource */
+ IXGBE_ACI_RC_E2BIG = 7, /* Arg too long */
+ IXGBE_ACI_RC_EAGAIN = 8, /* Try again */
+ IXGBE_ACI_RC_ENOMEM = 9, /* Out of memory */
+ IXGBE_ACI_RC_EACCES = 10, /* Permission denied */
+ IXGBE_ACI_RC_EFAULT = 11, /* Bad address */
+ IXGBE_ACI_RC_EBUSY = 12, /* Device or resource busy */
+ IXGBE_ACI_RC_EEXIST = 13, /* Object already exists */
+ IXGBE_ACI_RC_EINVAL = 14, /* Invalid argument */
+ IXGBE_ACI_RC_ENOTTY = 15, /* Not a typewriter */
+ IXGBE_ACI_RC_ENOSPC = 16, /* No space left or allocation failure */
+ IXGBE_ACI_RC_ENOSYS = 17, /* Function not implemented */
+ IXGBE_ACI_RC_ERANGE = 18, /* Parameter out of range */
+ IXGBE_ACI_RC_EFLUSHED = 19, /* Cmd flushed due to prev cmd error */
+ IXGBE_ACI_RC_BAD_ADDR = 20, /* Descriptor contains a bad pointer */
+ IXGBE_ACI_RC_EMODE = 21, /* Op not allowed in current dev mode */
+ IXGBE_ACI_RC_EFBIG = 22, /* File too big */
+ IXGBE_ACI_RC_ESBCOMP = 23, /* SB-IOSF completion unsuccessful */
+ IXGBE_ACI_RC_ENOSEC = 24, /* Missing security manifest */
+ IXGBE_ACI_RC_EBADSIG = 25, /* Bad RSA signature */
+ IXGBE_ACI_RC_ESVN = 26, /* SVN number prohibits this package */
+ IXGBE_ACI_RC_EBADMAN = 27, /* Manifest hash mismatch */
+ IXGBE_ACI_RC_EBADBUF = 28, /* Buffer hash mismatches manifest */
+ IXGBE_ACI_RC_EACCES_BMCU = 29, /* BMC Update in progress */
+};
+
+/* Admin Command Interface (ACI) opcodes */
+enum ixgbe_aci_opc {
+ ixgbe_aci_opc_get_ver = 0x0001,
+ ixgbe_aci_opc_driver_ver = 0x0002,
+ ixgbe_aci_opc_get_exp_err = 0x0005,
+
+ /* resource ownership */
+ ixgbe_aci_opc_req_res = 0x0008,
+ ixgbe_aci_opc_release_res = 0x0009,
+
+ /* device/function capabilities */
+ ixgbe_aci_opc_list_func_caps = 0x000A,
+ ixgbe_aci_opc_list_dev_caps = 0x000B,
+
+ /* safe disable of RXEN */
+ ixgbe_aci_opc_disable_rxen = 0x000C,
+
+ /* FW events */
+ ixgbe_aci_opc_get_fw_event = 0x0014,
+
+ /* PHY commands */
+ ixgbe_aci_opc_get_phy_caps = 0x0600,
+ ixgbe_aci_opc_set_phy_cfg = 0x0601,
+ ixgbe_aci_opc_restart_an = 0x0605,
+ ixgbe_aci_opc_get_link_status = 0x0607,
+ ixgbe_aci_opc_set_event_mask = 0x0613,
+ ixgbe_aci_opc_get_link_topo = 0x06E0,
+ ixgbe_aci_opc_read_i2c = 0x06E2,
+ ixgbe_aci_opc_write_i2c = 0x06E3,
+ ixgbe_aci_opc_read_mdio = 0x06E4,
+ ixgbe_aci_opc_write_mdio = 0x06E5,
+ ixgbe_aci_opc_set_gpio_by_func = 0x06E6,
+ ixgbe_aci_opc_get_gpio_by_func = 0x06E7,
+ ixgbe_aci_opc_set_port_id_led = 0x06E9,
+ ixgbe_aci_opc_set_gpio = 0x06EC,
+ ixgbe_aci_opc_get_gpio = 0x06ED,
+ ixgbe_aci_opc_sff_eeprom = 0x06EE,
+ ixgbe_aci_opc_prog_topo_dev_nvm = 0x06F2,
+ ixgbe_aci_opc_read_topo_dev_nvm = 0x06F3,
+
+ /* NVM commands */
+ ixgbe_aci_opc_nvm_read = 0x0701,
+ ixgbe_aci_opc_nvm_erase = 0x0702,
+ ixgbe_aci_opc_nvm_write = 0x0703,
+ ixgbe_aci_opc_nvm_cfg_read = 0x0704,
+ ixgbe_aci_opc_nvm_cfg_write = 0x0705,
+ ixgbe_aci_opc_nvm_checksum = 0x0706,
+ ixgbe_aci_opc_nvm_write_activate = 0x0707,
+ ixgbe_aci_opc_nvm_sr_dump = 0x0707,
+ ixgbe_aci_opc_nvm_save_factory_settings = 0x0708,
+ ixgbe_aci_opc_nvm_update_empr = 0x0709,
+ ixgbe_aci_opc_nvm_pkg_data = 0x070A,
+ ixgbe_aci_opc_nvm_pass_component_tbl = 0x070B,
+ ixgbe_aci_opc_nvm_sanitization = 0x070C,
+
+ /* Alternate Structure Commands */
+ ixgbe_aci_opc_write_alt_direct = 0x0900,
+ ixgbe_aci_opc_write_alt_indirect = 0x0901,
+ ixgbe_aci_opc_read_alt_direct = 0x0902,
+ ixgbe_aci_opc_read_alt_indirect = 0x0903,
+ ixgbe_aci_opc_done_alt_write = 0x0904,
+ ixgbe_aci_opc_clear_port_alt_write = 0x0906,
+
+ ixgbe_aci_opc_temp_tca_event = 0x0C94,
+
+ /* debug commands */
+ ixgbe_aci_opc_debug_dump_internals = 0xFF08,
+
+ /* SystemDiagnostic commands */
+ ixgbe_aci_opc_set_health_status_config = 0xFF20,
+ ixgbe_aci_opc_get_supported_health_status_codes = 0xFF21,
+ ixgbe_aci_opc_get_health_status = 0xFF22,
+ ixgbe_aci_opc_clear_health_status = 0xFF23,
+
+ /* FW Logging Commands */
+ ixgbe_aci_opc_fw_logs_config = 0xFF30,
+ ixgbe_aci_opc_fw_logs_register = 0xFF31,
+ ixgbe_aci_opc_fw_logs_query = 0xFF32,
+ ixgbe_aci_opc_fw_logs_event = 0xFF33,
+ ixgbe_aci_opc_fw_logs_get = 0xFF34,
+ ixgbe_aci_opc_fw_logs_clear = 0xFF35
+};
+
+/* This macro is used to generate a compilation error if a structure
+ * is not exactly the correct length. It gives a divide by zero error if the
+ * structure is not of the correct size, otherwise it creates an enum that is
+ * never used.
+ */
+#define IXGBE_CHECK_STRUCT_LEN(n, X) enum ixgbe_static_assert_enum_##X \
+ { ixgbe_static_assert_##X = (n) / ((sizeof(struct X) == (n)) ? 1 : 0) }
+
+/* This macro is used to generate a compilation error if a variable-length
+ * structure is not exactly the correct length assuming a single element of
+ * the variable-length object as the last element of the structure. It gives
+ * a divide by zero error if the structure is not of the correct size,
+ * otherwise it creates an enum that is never used.
+ */
+#define IXGBE_CHECK_VAR_LEN_STRUCT_LEN(n, X, T) enum ixgbe_static_assert_enum_##X \
+ { ixgbe_static_assert_##X = (n) / \
+ (((sizeof(struct X) + sizeof(T)) == (n)) ? 1 : 0) }
+
+/* This macro is used to ensure that parameter structures (i.e. structures
+ * in the params union member of struct ixgbe_aci_desc) are 16 bytes in length.
+ *
+ * NOT intended to be used to check the size of an indirect command/response
+ * additional data buffer (e.g. struct foo) which should just happen to be 16
+ * bytes (instead, use IXGBE_CHECK_STRUCT_LEN(16, foo) for that).
+ */
+#define IXGBE_CHECK_PARAM_LEN(X) IXGBE_CHECK_STRUCT_LEN(16, X)
+
+struct ixgbe_aci_cmd_generic {
+ __le32 param0;
+ __le32 param1;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_generic);
+
+/* Get version (direct 0x0001) */
+struct ixgbe_aci_cmd_get_ver {
+ __le32 rom_ver;
+ __le32 fw_build;
+ u8 fw_branch;
+ u8 fw_major;
+ u8 fw_minor;
+ u8 fw_patch;
+ u8 api_branch;
+ u8 api_major;
+ u8 api_minor;
+ u8 api_patch;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_ver);
+
+#define IXGBE_DRV_VER_STR_LEN_E610 32
+
+struct ixgbe_driver_ver {
+ u8 major_ver;
+ u8 minor_ver;
+ u8 build_ver;
+ u8 subbuild_ver;
+ u8 driver_string[IXGBE_DRV_VER_STR_LEN_E610];
+};
+
+/* Send driver version (indirect 0x0002) */
+struct ixgbe_aci_cmd_driver_ver {
+ u8 major_ver;
+ u8 minor_ver;
+ u8 build_ver;
+ u8 subbuild_ver;
+ u8 reserved[4];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_driver_ver);
+
+/* Get Expanded Error Code (0x0005, direct) */
+struct ixgbe_aci_cmd_get_exp_err {
+ __le32 reason;
+#define IXGBE_ACI_EXPANDED_ERROR_NOT_PROVIDED 0xFFFFFFFF
+ __le32 identifier;
+ u8 rsvd[8];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_exp_err);
+
+/* FW update timeout definitions are in milliseconds */
+#define IXGBE_NVM_TIMEOUT 180000
+#define IXGBE_CHANGE_LOCK_TIMEOUT 1000
+#define IXGBE_GLOBAL_CFG_LOCK_TIMEOUT 3000
+
+enum ixgbe_aci_res_access_type {
+ IXGBE_RES_READ = 1,
+ IXGBE_RES_WRITE
+};
+
+enum ixgbe_aci_res_ids {
+ IXGBE_NVM_RES_ID = 1,
+ IXGBE_SPD_RES_ID,
+ IXGBE_CHANGE_LOCK_RES_ID,
+ IXGBE_GLOBAL_CFG_LOCK_RES_ID
+};
+
+/* Request resource ownership (direct 0x0008)
+ * Release resource ownership (direct 0x0009)
+ */
+struct ixgbe_aci_cmd_req_res {
+ __le16 res_id;
+#define IXGBE_ACI_RES_ID_NVM 1
+#define IXGBE_ACI_RES_ID_SDP 2
+#define IXGBE_ACI_RES_ID_CHNG_LOCK 3
+#define IXGBE_ACI_RES_ID_GLBL_LOCK 4
+ __le16 access_type;
+#define IXGBE_ACI_RES_ACCESS_READ 1
+#define IXGBE_ACI_RES_ACCESS_WRITE 2
+
+ /* Upon successful completion, FW writes this value and driver is
+ * expected to release resource before timeout. This value is provided
+ * in milliseconds.
+ */
+ __le32 timeout;
+#define IXGBE_ACI_RES_NVM_READ_DFLT_TIMEOUT_MS 3000
+#define IXGBE_ACI_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000
+#define IXGBE_ACI_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000
+#define IXGBE_ACI_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000
+ /* For SDP: pin ID of the SDP */
+ __le32 res_number;
+ /* Status is only used for IXGBE_ACI_RES_ID_GLBL_LOCK */
+ __le16 status;
+#define IXGBE_ACI_RES_GLBL_SUCCESS 0
+#define IXGBE_ACI_RES_GLBL_IN_PROG 1
+#define IXGBE_ACI_RES_GLBL_DONE 2
+ u8 reserved[2];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_req_res);
+
+/* Get function capabilities (indirect 0x000A)
+ * Get device capabilities (indirect 0x000B)
+ */
+struct ixgbe_aci_cmd_list_caps {
+ u8 cmd_flags;
+ u8 pf_index;
+ u8 reserved[2];
+ __le32 count;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_list_caps);
+
+/* Device/Function buffer entry, repeated per reported capability */
+struct ixgbe_aci_cmd_list_caps_elem {
+ __le16 cap;
+#define IXGBE_ACI_CAPS_VALID_FUNCTIONS 0x0005
+#define IXGBE_ACI_MAX_VALID_FUNCTIONS 0x8
+#define IXGBE_ACI_CAPS_SRIOV 0x0012
+#define IXGBE_ACI_CAPS_VF 0x0013
+#define IXGBE_ACI_CAPS_VMDQ 0x0014
+#define IXGBE_ACI_CAPS_VSI 0x0017
+#define IXGBE_ACI_CAPS_DCB 0x0018
+#define IXGBE_ACI_CAPS_RSS 0x0040
+#define IXGBE_ACI_CAPS_RXQS 0x0041
+#define IXGBE_ACI_CAPS_TXQS 0x0042
+#define IXGBE_ACI_CAPS_MSIX 0x0043
+#define IXGBE_ACI_CAPS_FD 0x0045
+#define IXGBE_ACI_CAPS_MAX_MTU 0x0047
+#define IXGBE_ACI_CAPS_NVM_VER 0x0048
+#define IXGBE_ACI_CAPS_INLINE_IPSEC 0x0070
+#define IXGBE_ACI_CAPS_NUM_ENABLED_PORTS 0x0072
+#define IXGBE_ACI_CAPS_PCIE_RESET_AVOIDANCE 0x0076
+#define IXGBE_ACI_CAPS_POST_UPDATE_RESET_RESTRICT 0x0077
+#define IXGBE_ACI_CAPS_NVM_MGMT 0x0080
+#define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG0 0x0081
+#define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG1 0x0082
+#define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG2 0x0083
+#define IXGBE_ACI_CAPS_EXT_TOPO_DEV_IMG3 0x0084
+#define IXGBE_ACI_CAPS_OROM_RECOVERY_UPDATE 0x0090
+#define IXGBE_ACI_CAPS_NEXT_CLUSTER_ID 0x0096
+ u8 major_ver;
+ u8 minor_ver;
+ /* Number of resources described by this capability */
+ __le32 number;
+ /* Only meaningful for some types of resources */
+ __le32 logical_id;
+ /* Only meaningful for some types of resources */
+ __le32 phys_id;
+ __le64 rsvd1;
+ __le64 rsvd2;
+};
+
+IXGBE_CHECK_STRUCT_LEN(32, ixgbe_aci_cmd_list_caps_elem);
+
+/* Disable RXEN (direct 0x000C) */
+struct ixgbe_aci_cmd_disable_rxen {
+ u8 lport_num;
+ u8 reserved[15];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_disable_rxen);
+
+/* Get FW Event (indirect 0x0014) */
+struct ixgbe_aci_cmd_get_fw_event {
+ __le16 fw_buf_status;
+#define IXGBE_ACI_GET_FW_EVENT_STATUS_OBTAINED BIT(0)
+#define IXGBE_ACI_GET_FW_EVENT_STATUS_PENDING BIT(1)
+ u8 rsvd[14];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_fw_event);
+
+/* Get PHY capabilities (indirect 0x0600) */
+struct ixgbe_aci_cmd_get_phy_caps {
+ u8 lport_num;
+ u8 reserved;
+ __le16 param0;
+ /* 18.0 - Report qualified modules */
+#define IXGBE_ACI_GET_PHY_RQM BIT(0)
+ /* 18.1 - 18.3 : Report mode
+ * 000b - Report topology capabilities, without media
+ * 001b - Report topology capabilities, with media
+ * 010b - Report Active configuration
+ * 011b - Report PHY Type and FEC mode capabilities
+ * 100b - Report Default capabilities
+ */
+#define IXGBE_ACI_REPORT_MODE_S 1
+#define IXGBE_ACI_REPORT_MODE_M (7 << IXGBE_ACI_REPORT_MODE_S)
+#define IXGBE_ACI_REPORT_TOPO_CAP_NO_MEDIA 0
+#define IXGBE_ACI_REPORT_TOPO_CAP_MEDIA BIT(1)
+#define IXGBE_ACI_REPORT_ACTIVE_CFG BIT(2)
+#define IXGBE_ACI_REPORT_DFLT_CFG BIT(3)
+ __le32 reserved1;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_phy_caps);
+
+/* This is #define of PHY type (Extended):
+ * The first set of defines is for phy_type_low.
+ */
+#define IXGBE_PHY_TYPE_LOW_100BASE_TX BIT_ULL(0)
+#define IXGBE_PHY_TYPE_LOW_100M_SGMII BIT_ULL(1)
+#define IXGBE_PHY_TYPE_LOW_1000BASE_T BIT_ULL(2)
+#define IXGBE_PHY_TYPE_LOW_1000BASE_SX BIT_ULL(3)
+#define IXGBE_PHY_TYPE_LOW_1000BASE_LX BIT_ULL(4)
+#define IXGBE_PHY_TYPE_LOW_1000BASE_KX BIT_ULL(5)
+#define IXGBE_PHY_TYPE_LOW_1G_SGMII BIT_ULL(6)
+#define IXGBE_PHY_TYPE_LOW_2500BASE_T BIT_ULL(7)
+#define IXGBE_PHY_TYPE_LOW_2500BASE_X BIT_ULL(8)
+#define IXGBE_PHY_TYPE_LOW_2500BASE_KX BIT_ULL(9)
+#define IXGBE_PHY_TYPE_LOW_5GBASE_T BIT_ULL(10)
+#define IXGBE_PHY_TYPE_LOW_5GBASE_KR BIT_ULL(11)
+#define IXGBE_PHY_TYPE_LOW_10GBASE_T BIT_ULL(12)
+#define IXGBE_PHY_TYPE_LOW_10G_SFI_DA BIT_ULL(13)
+#define IXGBE_PHY_TYPE_LOW_10GBASE_SR BIT_ULL(14)
+#define IXGBE_PHY_TYPE_LOW_10GBASE_LR BIT_ULL(15)
+#define IXGBE_PHY_TYPE_LOW_10GBASE_KR_CR1 BIT_ULL(16)
+#define IXGBE_PHY_TYPE_LOW_10G_SFI_AOC_ACC BIT_ULL(17)
+#define IXGBE_PHY_TYPE_LOW_10G_SFI_C2C BIT_ULL(18)
+#define IXGBE_PHY_TYPE_LOW_MAX_INDEX 18
+/* The second set of defines is for phy_type_high. */
+#define IXGBE_PHY_TYPE_HIGH_10BASE_T BIT_ULL(1)
+#define IXGBE_PHY_TYPE_HIGH_10M_SGMII BIT_ULL(2)
+#define IXGBE_PHY_TYPE_HIGH_2500M_SGMII BIT_ULL(56)
+#define IXGBE_PHY_TYPE_HIGH_100M_USXGMII BIT_ULL(57)
+#define IXGBE_PHY_TYPE_HIGH_1G_USXGMII BIT_ULL(58)
+#define IXGBE_PHY_TYPE_HIGH_2500M_USXGMII BIT_ULL(59)
+#define IXGBE_PHY_TYPE_HIGH_5G_USXGMII BIT_ULL(60)
+#define IXGBE_PHY_TYPE_HIGH_10G_USXGMII BIT_ULL(61)
+#define IXGBE_PHY_TYPE_HIGH_MAX_INDEX 61
+
+struct ixgbe_aci_cmd_get_phy_caps_data {
+ __le64 phy_type_low; /* Use values from IXGBE_PHY_TYPE_LOW_* */
+ __le64 phy_type_high; /* Use values from IXGBE_PHY_TYPE_HIGH_* */
+ u8 caps;
+#define IXGBE_ACI_PHY_EN_TX_LINK_PAUSE BIT(0)
+#define IXGBE_ACI_PHY_EN_RX_LINK_PAUSE BIT(1)
+#define IXGBE_ACI_PHY_LOW_POWER_MODE BIT(2)
+#define IXGBE_ACI_PHY_EN_LINK BIT(3)
+#define IXGBE_ACI_PHY_AN_MODE BIT(4)
+#define IXGBE_ACI_PHY_EN_MOD_QUAL BIT(5)
+#define IXGBE_ACI_PHY_EN_LESM BIT(6)
+#define IXGBE_ACI_PHY_EN_AUTO_FEC BIT(7)
+#define IXGBE_ACI_PHY_CAPS_MASK MAKEMASK(0xff, 0)
+ u8 low_power_ctrl_an;
+#define IXGBE_ACI_PHY_EN_D3COLD_LOW_POWER_AUTONEG BIT(0)
+#define IXGBE_ACI_PHY_AN_EN_CLAUSE28 BIT(1)
+#define IXGBE_ACI_PHY_AN_EN_CLAUSE73 BIT(2)
+#define IXGBE_ACI_PHY_AN_EN_CLAUSE37 BIT(3)
+ __le16 eee_cap;
+#define IXGBE_ACI_PHY_EEE_EN_100BASE_TX BIT(0)
+#define IXGBE_ACI_PHY_EEE_EN_1000BASE_T BIT(1)
+#define IXGBE_ACI_PHY_EEE_EN_10GBASE_T BIT(2)
+#define IXGBE_ACI_PHY_EEE_EN_1000BASE_KX BIT(3)
+#define IXGBE_ACI_PHY_EEE_EN_10GBASE_KR BIT(4)
+#define IXGBE_ACI_PHY_EEE_EN_25GBASE_KR BIT(5)
+#define IXGBE_ACI_PHY_EEE_EN_10BASE_T BIT(11)
+ __le16 eeer_value;
+ u8 phy_id_oui[4]; /* PHY/Module ID connected on the port */
+ u8 phy_fw_ver[8];
+ u8 link_fec_options;
+#define IXGBE_ACI_PHY_FEC_10G_KR_40G_KR4_EN BIT(0)
+#define IXGBE_ACI_PHY_FEC_10G_KR_40G_KR4_REQ BIT(1)
+#define IXGBE_ACI_PHY_FEC_25G_RS_528_REQ BIT(2)
+#define IXGBE_ACI_PHY_FEC_25G_KR_REQ BIT(3)
+#define IXGBE_ACI_PHY_FEC_25G_RS_544_REQ BIT(4)
+#define IXGBE_ACI_PHY_FEC_25G_RS_CLAUSE91_EN BIT(6)
+#define IXGBE_ACI_PHY_FEC_25G_KR_CLAUSE74_EN BIT(7)
+#define IXGBE_ACI_PHY_FEC_MASK MAKEMASK(0xdf, 0)
+ u8 module_compliance_enforcement;
+#define IXGBE_ACI_MOD_ENFORCE_STRICT_MODE BIT(0)
+ u8 extended_compliance_code;
+#define IXGBE_ACI_MODULE_TYPE_TOTAL_BYTE 3
+ u8 module_type[IXGBE_ACI_MODULE_TYPE_TOTAL_BYTE];
+#define IXGBE_ACI_MOD_TYPE_BYTE0_SFP_PLUS 0xA0
+#define IXGBE_ACI_MOD_TYPE_BYTE0_QSFP_PLUS 0x80
+#define IXGBE_ACI_MOD_TYPE_IDENT 1
+#define IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_PASSIVE BIT(0)
+#define IXGBE_ACI_MOD_TYPE_BYTE1_SFP_PLUS_CU_ACTIVE BIT(1)
+#define IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_SR BIT(4)
+#define IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_LR BIT(5)
+#define IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_LRM BIT(6)
+#define IXGBE_ACI_MOD_TYPE_BYTE1_10G_BASE_ER BIT(7)
+#define IXGBE_ACI_MOD_TYPE_BYTE2_SFP_PLUS 0xA0
+#define IXGBE_ACI_MOD_TYPE_BYTE2_QSFP_PLUS 0x86
+ u8 qualified_module_count;
+ u8 rsvd2[7]; /* Bytes 47:41 reserved */
+#define IXGBE_ACI_QUAL_MOD_COUNT_MAX 16
+ struct {
+ u8 v_oui[3];
+ u8 rsvd3;
+ u8 v_part[16];
+ __le32 v_rev;
+ __le64 rsvd4;
+ } qual_modules[IXGBE_ACI_QUAL_MOD_COUNT_MAX];
+};
+
+IXGBE_CHECK_STRUCT_LEN(560, ixgbe_aci_cmd_get_phy_caps_data);
+
+/* Set PHY capabilities (direct 0x0601)
+ * NOTE: This command must be followed by setup link and restart auto-neg
+ */
+struct ixgbe_aci_cmd_set_phy_cfg {
+ u8 reserved[8];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_phy_cfg);
+
+/* Set PHY config command data structure */
+struct ixgbe_aci_cmd_set_phy_cfg_data {
+ __le64 phy_type_low; /* Use values from IXGBE_PHY_TYPE_LOW_* */
+ __le64 phy_type_high; /* Use values from IXGBE_PHY_TYPE_HIGH_* */
+ u8 caps;
+#define IXGBE_ACI_PHY_ENA_VALID_MASK MAKEMASK(0xef, 0)
+#define IXGBE_ACI_PHY_ENA_TX_PAUSE_ABILITY BIT(0)
+#define IXGBE_ACI_PHY_ENA_RX_PAUSE_ABILITY BIT(1)
+#define IXGBE_ACI_PHY_ENA_LOW_POWER BIT(2)
+#define IXGBE_ACI_PHY_ENA_LINK BIT(3)
+#define IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT BIT(5)
+#define IXGBE_ACI_PHY_ENA_LESM BIT(6)
+#define IXGBE_ACI_PHY_ENA_AUTO_FEC BIT(7)
+ u8 low_power_ctrl_an;
+ __le16 eee_cap; /* Value from ixgbe_aci_get_phy_caps */
+ __le16 eeer_value; /* Use defines from ixgbe_aci_get_phy_caps */
+ u8 link_fec_opt; /* Use defines from ixgbe_aci_get_phy_caps */
+ u8 module_compliance_enforcement;
+};
+
+IXGBE_CHECK_STRUCT_LEN(24, ixgbe_aci_cmd_set_phy_cfg_data);
+
+/* Restart AN command data structure (direct 0x0605)
+ * Also used for response, with only the lport_num field present.
+ */
+struct ixgbe_aci_cmd_restart_an {
+ u8 reserved[2];
+ u8 cmd_flags;
+#define IXGBE_ACI_RESTART_AN_LINK_RESTART BIT(1)
+#define IXGBE_ACI_RESTART_AN_LINK_ENABLE BIT(2)
+ u8 reserved2[13];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_restart_an);
+
+#pragma pack(1)
+/* Get link status (indirect 0x0607), also used for Link Status Event */
+struct ixgbe_aci_cmd_get_link_status {
+ u8 reserved[2];
+ u8 cmd_flags;
+#define IXGBE_ACI_LSE_M 0x3
+#define IXGBE_ACI_LSE_NOP 0x0
+#define IXGBE_ACI_LSE_DIS 0x2
+#define IXGBE_ACI_LSE_ENA 0x3
+ /* only response uses this flag */
+#define IXGBE_ACI_LSE_IS_ENABLED 0x1
+ u8 reserved2[5];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_link_status);
+
+/* Get link status response data structure, also used for Link Status Event */
+struct ixgbe_aci_cmd_get_link_status_data {
+ u8 topo_media_conflict;
+#define IXGBE_ACI_LINK_TOPO_CONFLICT BIT(0)
+#define IXGBE_ACI_LINK_MEDIA_CONFLICT BIT(1)
+#define IXGBE_ACI_LINK_TOPO_CORRUPT BIT(2)
+#define IXGBE_ACI_LINK_TOPO_UNREACH_PRT BIT(4)
+#define IXGBE_ACI_LINK_TOPO_UNDRUTIL_PRT BIT(5)
+#define IXGBE_ACI_LINK_TOPO_UNDRUTIL_MEDIA BIT(6)
+#define IXGBE_ACI_LINK_TOPO_UNSUPP_MEDIA BIT(7)
+ u8 link_cfg_err;
+#define IXGBE_ACI_LINK_CFG_ERR BIT(0)
+#define IXGBE_ACI_LINK_CFG_COMPLETED BIT(1)
+#define IXGBE_ACI_LINK_ACT_PORT_OPT_INVAL BIT(2)
+#define IXGBE_ACI_LINK_FEAT_ID_OR_CONFIG_ID_INVAL BIT(3)
+#define IXGBE_ACI_LINK_TOPO_CRITICAL_SDP_ERR BIT(4)
+#define IXGBE_ACI_LINK_MODULE_POWER_UNSUPPORTED BIT(5)
+#define IXGBE_ACI_LINK_EXTERNAL_PHY_LOAD_FAILURE BIT(6)
+#define IXGBE_ACI_LINK_INVAL_MAX_POWER_LIMIT BIT(7)
+ u8 link_info;
+#define IXGBE_ACI_LINK_UP BIT(0) /* Link Status */
+#define IXGBE_ACI_LINK_FAULT BIT(1)
+#define IXGBE_ACI_LINK_FAULT_TX BIT(2)
+#define IXGBE_ACI_LINK_FAULT_RX BIT(3)
+#define IXGBE_ACI_LINK_FAULT_REMOTE BIT(4)
+#define IXGBE_ACI_LINK_UP_PORT BIT(5) /* External Port Link Status */
+#define IXGBE_ACI_MEDIA_AVAILABLE BIT(6)
+#define IXGBE_ACI_SIGNAL_DETECT BIT(7)
+ u8 an_info;
+#define IXGBE_ACI_AN_COMPLETED BIT(0)
+#define IXGBE_ACI_LP_AN_ABILITY BIT(1)
+#define IXGBE_ACI_PD_FAULT BIT(2) /* Parallel Detection Fault */
+#define IXGBE_ACI_FEC_EN BIT(3)
+#define IXGBE_ACI_PHY_LOW_POWER BIT(4) /* Low Power State */
+#define IXGBE_ACI_LINK_PAUSE_TX BIT(5)
+#define IXGBE_ACI_LINK_PAUSE_RX BIT(6)
+#define IXGBE_ACI_QUALIFIED_MODULE BIT(7)
+ u8 ext_info;
+#define IXGBE_ACI_LINK_PHY_TEMP_ALARM BIT(0)
+#define IXGBE_ACI_LINK_EXCESSIVE_ERRORS BIT(1) /* Excessive Link Errors */
+ /* Port Tx Suspended */
+#define IXGBE_ACI_LINK_TX_S 2
+#define IXGBE_ACI_LINK_TX_M (0x03 << IXGBE_ACI_LINK_TX_S)
+#define IXGBE_ACI_LINK_TX_ACTIVE 0
+#define IXGBE_ACI_LINK_TX_DRAINED 1
+#define IXGBE_ACI_LINK_TX_FLUSHED 3
+ u8 lb_status;
+#define IXGBE_ACI_LINK_LB_PHY_LCL BIT(0)
+#define IXGBE_ACI_LINK_LB_PHY_RMT BIT(1)
+#define IXGBE_ACI_LINK_LB_MAC_LCL BIT(2)
+#define IXGBE_ACI_LINK_LB_PHY_IDX_S 3
+#define IXGBE_ACI_LINK_LB_PHY_IDX_M (0x7 << IXGBE_ACI_LB_PHY_IDX_S)
+ __le16 max_frame_size;
+ u8 cfg;
+#define IXGBE_ACI_LINK_25G_KR_FEC_EN BIT(0)
+#define IXGBE_ACI_LINK_25G_RS_528_FEC_EN BIT(1)
+#define IXGBE_ACI_LINK_25G_RS_544_FEC_EN BIT(2)
+#define IXGBE_ACI_FEC_MASK MAKEMASK(0x7, 0)
+ /* Pacing Config */
+#define IXGBE_ACI_CFG_PACING_S 3
+#define IXGBE_ACI_CFG_PACING_M (0xF << IXGBE_ACI_CFG_PACING_S)
+#define IXGBE_ACI_CFG_PACING_TYPE_M BIT(7)
+#define IXGBE_ACI_CFG_PACING_TYPE_AVG 0
+#define IXGBE_ACI_CFG_PACING_TYPE_FIXED IXGBE_ACI_CFG_PACING_TYPE_M
+ /* External Device Power Ability */
+ u8 power_desc;
+#define IXGBE_ACI_PWR_CLASS_M 0x3F
+#define IXGBE_ACI_LINK_PWR_BASET_LOW_HIGH 0
+#define IXGBE_ACI_LINK_PWR_BASET_HIGH 1
+#define IXGBE_ACI_LINK_PWR_QSFP_CLASS_1 0
+#define IXGBE_ACI_LINK_PWR_QSFP_CLASS_2 1
+#define IXGBE_ACI_LINK_PWR_QSFP_CLASS_3 2
+#define IXGBE_ACI_LINK_PWR_QSFP_CLASS_4 3
+ __le16 link_speed;
+#define IXGBE_ACI_LINK_SPEED_M 0x7FF
+#define IXGBE_ACI_LINK_SPEED_10MB BIT(0)
+#define IXGBE_ACI_LINK_SPEED_100MB BIT(1)
+#define IXGBE_ACI_LINK_SPEED_1000MB BIT(2)
+#define IXGBE_ACI_LINK_SPEED_2500MB BIT(3)
+#define IXGBE_ACI_LINK_SPEED_5GB BIT(4)
+#define IXGBE_ACI_LINK_SPEED_10GB BIT(5)
+#define IXGBE_ACI_LINK_SPEED_20GB BIT(6)
+#define IXGBE_ACI_LINK_SPEED_25GB BIT(7)
+#define IXGBE_ACI_LINK_SPEED_40GB BIT(8)
+#define IXGBE_ACI_LINK_SPEED_50GB BIT(9)
+#define IXGBE_ACI_LINK_SPEED_100GB BIT(10)
+#define IXGBE_ACI_LINK_SPEED_200GB BIT(11)
+#define IXGBE_ACI_LINK_SPEED_UNKNOWN BIT(15)
+ __le16 reserved3; /* Aligns next field to 8-byte boundary */
+ u8 ext_fec_status;
+#define IXGBE_ACI_LINK_RS_272_FEC_EN BIT(0) /* RS 272 FEC enabled */
+ u8 reserved4;
+ __le64 phy_type_low; /* Use values from IXGBE_PHY_TYPE_LOW_* */
+ __le64 phy_type_high; /* Use values from IXGBE_PHY_TYPE_HIGH_* */
+ /* Get link status version 2 link partner data */
+ __le64 lp_phy_type_low; /* Use values from IXGBE_PHY_TYPE_LOW_* */
+ __le64 lp_phy_type_high; /* Use values from IXGBE_PHY_TYPE_HIGH_* */
+ u8 lp_fec_adv;
+#define IXGBE_ACI_LINK_LP_10G_KR_FEC_CAP BIT(0)
+#define IXGBE_ACI_LINK_LP_25G_KR_FEC_CAP BIT(1)
+#define IXGBE_ACI_LINK_LP_RS_528_FEC_CAP BIT(2)
+#define IXGBE_ACI_LINK_LP_50G_KR_272_FEC_CAP BIT(3)
+#define IXGBE_ACI_LINK_LP_100G_KR_272_FEC_CAP BIT(4)
+#define IXGBE_ACI_LINK_LP_200G_KR_272_FEC_CAP BIT(5)
+ u8 lp_fec_req;
+#define IXGBE_ACI_LINK_LP_10G_KR_FEC_REQ BIT(0)
+#define IXGBE_ACI_LINK_LP_25G_KR_FEC_REQ BIT(1)
+#define IXGBE_ACI_LINK_LP_RS_528_FEC_REQ BIT(2)
+#define IXGBE_ACI_LINK_LP_KR_272_FEC_REQ BIT(3)
+ u8 lp_flowcontrol;
+#define IXGBE_ACI_LINK_LP_PAUSE_ADV BIT(0)
+#define IXGBE_ACI_LINK_LP_ASM_DIR_ADV BIT(1)
+ u8 reserved5[5];
+};
+#pragma pack()
+
+IXGBE_CHECK_STRUCT_LEN(56, ixgbe_aci_cmd_get_link_status_data);
+
+/* Set event mask command (direct 0x0613) */
+struct ixgbe_aci_cmd_set_event_mask {
+ u8 reserved[8];
+ __le16 event_mask;
+#define IXGBE_ACI_LINK_EVENT_UPDOWN BIT(1)
+#define IXGBE_ACI_LINK_EVENT_MEDIA_NA BIT(2)
+#define IXGBE_ACI_LINK_EVENT_LINK_FAULT BIT(3)
+#define IXGBE_ACI_LINK_EVENT_PHY_TEMP_ALARM BIT(4)
+#define IXGBE_ACI_LINK_EVENT_EXCESSIVE_ERRORS BIT(5)
+#define IXGBE_ACI_LINK_EVENT_SIGNAL_DETECT BIT(6)
+#define IXGBE_ACI_LINK_EVENT_AN_COMPLETED BIT(7)
+#define IXGBE_ACI_LINK_EVENT_MODULE_QUAL_FAIL BIT(8)
+#define IXGBE_ACI_LINK_EVENT_PORT_TX_SUSPENDED BIT(9)
+#define IXGBE_ACI_LINK_EVENT_TOPO_CONFLICT BIT(10)
+#define IXGBE_ACI_LINK_EVENT_MEDIA_CONFLICT BIT(11)
+#define IXGBE_ACI_LINK_EVENT_PHY_FW_LOAD_FAIL BIT(12)
+ u8 reserved1[6];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_event_mask);
+
+struct ixgbe_aci_cmd_link_topo_params {
+ u8 lport_num;
+ u8 lport_num_valid;
+#define IXGBE_ACI_LINK_TOPO_PORT_NUM_VALID BIT(0)
+ u8 node_type_ctx;
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_S 0
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_M (0xF << IXGBE_ACI_LINK_TOPO_NODE_TYPE_S)
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_PHY 0
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_GPIO_CTRL 1
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_MUX_CTRL 2
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_LED_CTRL 3
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_LED 4
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_THERMAL 5
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_CAGE 6
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_MEZZ 7
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_ID_EEPROM 8
+#define IXGBE_ACI_LINK_TOPO_NODE_TYPE_GPS 11
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_S 4
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_M \
+ (0xF << IXGBE_ACI_LINK_TOPO_NODE_CTX_S)
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_GLOBAL 0
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_BOARD 1
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_PORT 2
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_NODE 3
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_NODE_HANDLE 4
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_DIRECT_BUS_ACCESS 5
+#define IXGBE_ACI_LINK_TOPO_NODE_CTX_NODE_HANDLE_BUS_ADDRESS 6
+ u8 index;
+};
+
+IXGBE_CHECK_STRUCT_LEN(4, ixgbe_aci_cmd_link_topo_params);
+
+struct ixgbe_aci_cmd_link_topo_addr {
+ struct ixgbe_aci_cmd_link_topo_params topo_params;
+ __le16 handle;
+#define IXGBE_ACI_LINK_TOPO_HANDLE_S 0
+#define IXGBE_ACI_LINK_TOPO_HANDLE_M (0x3FF << IXGBE_ACI_LINK_TOPO_HANDLE_S)
+/* Used to decode the handle field */
+#define IXGBE_ACI_LINK_TOPO_HANDLE_BRD_TYPE_M BIT(9)
+#define IXGBE_ACI_LINK_TOPO_HANDLE_BRD_TYPE_LOM BIT(9)
+#define IXGBE_ACI_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ 0
+#define IXGBE_ACI_LINK_TOPO_HANDLE_NODE_S 0
+/* In case of a Mezzanine type */
+#define IXGBE_ACI_LINK_TOPO_HANDLE_MEZZ_NODE_M \
+ (0x3F << IXGBE_ACI_LINK_TOPO_HANDLE_NODE_S)
+#define IXGBE_ACI_LINK_TOPO_HANDLE_MEZZ_S 6
+#define IXGBE_ACI_LINK_TOPO_HANDLE_MEZZ_M \
+ (0x7 << IXGBE_ACI_LINK_TOPO_HANDLE_MEZZ_S)
+/* In case of a LOM type */
+#define IXGBE_ACI_LINK_TOPO_HANDLE_LOM_NODE_M \
+ (0x1FF << IXGBE_ACI_LINK_TOPO_HANDLE_NODE_S)
+};
+
+IXGBE_CHECK_STRUCT_LEN(6, ixgbe_aci_cmd_link_topo_addr);
+
+/* Get Link Topology Handle (direct, 0x06E0) */
+struct ixgbe_aci_cmd_get_link_topo {
+ struct ixgbe_aci_cmd_link_topo_addr addr;
+ u8 node_part_num;
+#define IXGBE_ACI_GET_LINK_TOPO_NODE_NR_PCA9575 0x21
+#define IXGBE_ACI_GET_LINK_TOPO_NODE_NR_GEN_GPS 0x48
+#define IXGBE_ACI_GET_LINK_TOPO_NODE_NR_E610_PTC 0x49
+ u8 rsvd[9];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_link_topo);
+
+/* Read/Write I2C (direct, 0x06E2/0x06E3) */
+struct ixgbe_aci_cmd_i2c {
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr;
+ __le16 i2c_addr;
+ u8 i2c_params;
+#define IXGBE_ACI_I2C_DATA_SIZE_S 0
+#define IXGBE_ACI_I2C_DATA_SIZE_M (0xF << IXGBE_ACI_I2C_DATA_SIZE_S)
+#define IXGBE_ACI_I2C_ADDR_TYPE_M BIT(4)
+#define IXGBE_ACI_I2C_ADDR_TYPE_7BIT 0
+#define IXGBE_ACI_I2C_ADDR_TYPE_10BIT IXGBE_ACI_I2C_ADDR_TYPE_M
+#define IXGBE_ACI_I2C_DATA_OFFSET_S 5
+#define IXGBE_ACI_I2C_DATA_OFFSET_M (0x3 << IXGBE_ACI_I2C_DATA_OFFSET_S)
+#define IXGBE_ACI_I2C_USE_REPEATED_START BIT(7)
+ u8 rsvd;
+ __le16 i2c_bus_addr;
+#define IXGBE_ACI_I2C_ADDR_7BIT_MASK 0x7F
+#define IXGBE_ACI_I2C_ADDR_10BIT_MASK 0x3FF
+ u8 i2c_data[4]; /* Used only by write command, reserved in read. */
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_i2c);
+
+/* Read I2C Response (direct, 0x06E2) */
+struct ixgbe_aci_cmd_read_i2c_resp {
+ u8 i2c_data[16];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_read_i2c_resp);
+
+/* Read/Write MDIO (direct, 0x06E4/0x06E5) */
+struct ixgbe_aci_cmd_mdio {
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr;
+ u8 mdio_device_addr;
+#define IXGBE_ACI_MDIO_DEV_S 0
+#define IXGBE_ACI_MDIO_DEV_M (0x1F << IXGBE_ACI_MDIO_DEV_S)
+#define IXGBE_ACI_MDIO_CLAUSE_22 BIT(5)
+#define IXGBE_ACI_MDIO_CLAUSE_45 BIT(6)
+ u8 mdio_bus_address;
+#define IXGBE_ACI_MDIO_BUS_ADDR_S 0
+#define IXGBE_ACI_MDIO_BUS_ADDR_M (0x1F << IXGBE_ACI_MDIO_BUS_ADDR_S)
+ __le16 offset;
+ __le16 data; /* Input in write cmd, output in read cmd. */
+ u8 rsvd1[4];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_mdio);
+
+/* Set/Get GPIO By Function (direct, 0x06E6/0x06E7) */
+struct ixgbe_aci_cmd_gpio_by_func {
+ struct ixgbe_aci_cmd_link_topo_addr topo_addr;
+ u8 io_func_num;
+#define IXGBE_ACI_GPIO_FUNC_S 0
+#define IXGBE_ACI_GPIO_FUNC_M (0x1F << IXGBE_ACI_GPIO_IO_FUNC_NUM_S)
+ u8 io_value; /* Input in write cmd, output in read cmd. */
+#define IXGBE_ACI_GPIO_ON BIT(0)
+#define IXGBE_ACI_GPIO_OFF 0
+ u8 rsvd[8];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_gpio_by_func);
+
+/* Set Port Identification LED (direct, 0x06E9) */
+struct ixgbe_aci_cmd_set_port_id_led {
+ u8 lport_num;
+ u8 lport_num_valid;
+#define IXGBE_ACI_PORT_ID_PORT_NUM_VALID BIT(0)
+ u8 ident_mode;
+#define IXGBE_ACI_PORT_IDENT_LED_BLINK BIT(0)
+#define IXGBE_ACI_PORT_IDENT_LED_ORIG 0
+ u8 rsvd[13];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_port_id_led);
+
+/* Set/Get GPIO (direct, 0x06EC/0x06ED) */
+struct ixgbe_aci_cmd_gpio {
+ __le16 gpio_ctrl_handle;
+#define IXGBE_ACI_GPIO_HANDLE_S 0
+#define IXGBE_ACI_GPIO_HANDLE_M (0x3FF << IXGBE_ACI_GPIO_HANDLE_S)
+ u8 gpio_num;
+ u8 gpio_val;
+ u8 rsvd[12];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_gpio);
+
+/* Read/Write SFF EEPROM command (indirect 0x06EE) */
+struct ixgbe_aci_cmd_sff_eeprom {
+ u8 lport_num;
+ u8 lport_num_valid;
+#define IXGBE_ACI_SFF_PORT_NUM_VALID BIT(0)
+ __le16 i2c_bus_addr;
+#define IXGBE_ACI_SFF_I2CBUS_7BIT_M 0x7F
+#define IXGBE_ACI_SFF_I2CBUS_10BIT_M 0x3FF
+#define IXGBE_ACI_SFF_I2CBUS_TYPE_M BIT(10)
+#define IXGBE_ACI_SFF_I2CBUS_TYPE_7BIT 0
+#define IXGBE_ACI_SFF_I2CBUS_TYPE_10BIT IXGBE_ACI_SFF_I2CBUS_TYPE_M
+#define IXGBE_ACI_SFF_PAGE_BANK_CTRL_S 11
+#define IXGBE_ACI_SFF_PAGE_BANK_CTRL_M (0x3 << IXGBE_ACI_SFF_PAGE_BANK_CTRL_S)
+#define IXGBE_ACI_SFF_NO_PAGE_BANK_UPDATE 0
+#define IXGBE_ACI_SFF_UPDATE_PAGE 1
+#define IXGBE_ACI_SFF_UPDATE_BANK 2
+#define IXGBE_ACI_SFF_UPDATE_PAGE_BANK 3
+#define IXGBE_ACI_SFF_IS_WRITE BIT(15)
+ __le16 i2c_offset;
+ u8 module_bank;
+ u8 module_page;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_sff_eeprom);
+
+/* Program Topology Device NVM (direct, 0x06F2) */
+struct ixgbe_aci_cmd_prog_topo_dev_nvm {
+ struct ixgbe_aci_cmd_link_topo_params topo_params;
+ u8 rsvd[12];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_prog_topo_dev_nvm);
+
+/* Read Topology Device NVM (direct, 0x06F3) */
+struct ixgbe_aci_cmd_read_topo_dev_nvm {
+ struct ixgbe_aci_cmd_link_topo_params topo_params;
+ __le32 start_address;
+#define IXGBE_ACI_READ_TOPO_DEV_NVM_DATA_READ_SIZE 8
+ u8 data_read[IXGBE_ACI_READ_TOPO_DEV_NVM_DATA_READ_SIZE];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_read_topo_dev_nvm);
+
+/* NVM Read command (indirect 0x0701)
+ * NVM Erase commands (direct 0x0702)
+ * NVM Write commands (indirect 0x0703)
+ * NVM Write Activate commands (direct 0x0707)
+ * NVM Shadow RAM Dump commands (direct 0x0707)
+ */
+struct ixgbe_aci_cmd_nvm {
+#define IXGBE_ACI_NVM_MAX_OFFSET 0xFFFFFF
+ __le16 offset_low;
+ u8 offset_high; /* For Write Activate offset_high is used as flags2 */
+ u8 cmd_flags;
+#define IXGBE_ACI_NVM_LAST_CMD BIT(0)
+#define IXGBE_ACI_NVM_PCIR_REQ BIT(0) /* Used by NVM Write reply */
+#define IXGBE_ACI_NVM_PRESERVATION_S 1 /* Used by NVM Write Activate only */
+#define IXGBE_ACI_NVM_PRESERVATION_M (3 << IXGBE_ACI_NVM_PRESERVATION_S)
+#define IXGBE_ACI_NVM_NO_PRESERVATION (0 << IXGBE_ACI_NVM_PRESERVATION_S)
+#define IXGBE_ACI_NVM_PRESERVE_ALL BIT(1)
+#define IXGBE_ACI_NVM_FACTORY_DEFAULT (2 << IXGBE_ACI_NVM_PRESERVATION_S)
+#define IXGBE_ACI_NVM_PRESERVE_SELECTED (3 << IXGBE_ACI_NVM_PRESERVATION_S)
+#define IXGBE_ACI_NVM_ACTIV_SEL_NVM BIT(3) /* Write Activate/SR Dump only */
+#define IXGBE_ACI_NVM_ACTIV_SEL_OROM BIT(4)
+#define IXGBE_ACI_NVM_ACTIV_SEL_NETLIST BIT(5)
+#define IXGBE_ACI_NVM_SPECIAL_UPDATE BIT(6)
+#define IXGBE_ACI_NVM_REVERT_LAST_ACTIV BIT(6) /* Write Activate only */
+#define IXGBE_ACI_NVM_ACTIV_SEL_MASK MAKEMASK(0x7, 3)
+#define IXGBE_ACI_NVM_FLASH_ONLY BIT(7)
+#define IXGBE_ACI_NVM_RESET_LVL_M MAKEMASK(0x3, 0) /* Write reply only */
+#define IXGBE_ACI_NVM_POR_FLAG 0
+#define IXGBE_ACI_NVM_PERST_FLAG 1
+#define IXGBE_ACI_NVM_EMPR_FLAG 2
+#define IXGBE_ACI_NVM_EMPR_ENA BIT(0) /* Write Activate reply only */
+ /* For Write Activate, several flags are sent as part of a separate
+ * flags2 field using a separate byte. For simplicity of the software
+ * interface, we pass the flags as a 16 bit value so these flags are
+ * all offset by 8 bits
+ */
+#define IXGBE_ACI_NVM_ACTIV_REQ_EMPR BIT(8) /* NVM Write Activate only */
+ __le16 module_typeid;
+ __le16 length;
+#define IXGBE_ACI_NVM_ERASE_LEN 0xFFFF
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+/* NVM Module_Type ID, needed offset and read_len for struct ixgbe_aci_cmd_nvm. */
+#define IXGBE_ACI_NVM_SECTOR_UNIT 4096 /* In Bytes */
+#define IXGBE_ACI_NVM_WORD_UNIT 2 /* In Bytes */
+
+#define IXGBE_ACI_NVM_START_POINT 0
+#define IXGBE_ACI_NVM_EMP_SR_PTR_OFFSET 0x90
+#define IXGBE_ACI_NVM_EMP_SR_PTR_RD_LEN 2 /* In Bytes */
+#define IXGBE_ACI_NVM_EMP_SR_PTR_M MAKEMASK(0x7FFF, 0)
+#define IXGBE_ACI_NVM_EMP_SR_PTR_TYPE_S 15
+#define IXGBE_ACI_NVM_EMP_SR_PTR_TYPE_M BIT(15)
+#define IXGBE_ACI_NVM_EMP_SR_PTR_TYPE_SECTOR 1
+
+#define IXGBE_ACI_NVM_LLDP_CFG_PTR_OFFSET 0x46
+#define IXGBE_ACI_NVM_LLDP_CFG_HEADER_LEN 2 /* In Bytes */
+#define IXGBE_ACI_NVM_LLDP_CFG_PTR_RD_LEN 2 /* In Bytes */
+
+#define IXGBE_ACI_NVM_LLDP_PRESERVED_MOD_ID 0x129
+#define IXGBE_ACI_NVM_CUR_LLDP_PERSIST_RD_OFFSET 2 /* In Bytes */
+#define IXGBE_ACI_NVM_LLDP_STATUS_M MAKEMASK(0xF, 0)
+#define IXGBE_ACI_NVM_LLDP_STATUS_M_LEN 4 /* In Bits */
+#define IXGBE_ACI_NVM_LLDP_STATUS_RD_LEN 4 /* In Bytes */
+
+#define IXGBE_ACI_NVM_MINSREV_MOD_ID 0x130
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_nvm);
+
+/* Used for reading and writing MinSRev using 0x0701 and 0x0703. Note that the
+ * type field is excluded from the section when reading and writing from
+ * a module using the module_typeid field with these AQ commands.
+ */
+struct ixgbe_aci_cmd_nvm_minsrev {
+ __le16 length;
+ __le16 validity;
+#define IXGBE_ACI_NVM_MINSREV_NVM_VALID BIT(0)
+#define IXGBE_ACI_NVM_MINSREV_OROM_VALID BIT(1)
+ __le16 nvm_minsrev_l;
+ __le16 nvm_minsrev_h;
+ __le16 orom_minsrev_l;
+ __le16 orom_minsrev_h;
+};
+
+IXGBE_CHECK_STRUCT_LEN(12, ixgbe_aci_cmd_nvm_minsrev);
+
+/* Used for 0x0704 as well as for 0x0705 commands */
+struct ixgbe_aci_cmd_nvm_cfg {
+ u8 cmd_flags;
+#define IXGBE_ACI_ANVM_MULTIPLE_ELEMS BIT(0)
+#define IXGBE_ACI_ANVM_IMMEDIATE_FIELD BIT(1)
+#define IXGBE_ACI_ANVM_NEW_CFG BIT(2)
+ u8 reserved;
+ __le16 count;
+ __le16 id;
+ u8 reserved1[2];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_nvm_cfg);
+
+struct ixgbe_aci_cmd_nvm_cfg_data {
+ __le16 field_id;
+ __le16 field_options;
+ __le16 field_value;
+};
+
+IXGBE_CHECK_STRUCT_LEN(6, ixgbe_aci_cmd_nvm_cfg_data);
+
+/* NVM Checksum Command (direct, 0x0706) */
+struct ixgbe_aci_cmd_nvm_checksum {
+ u8 flags;
+#define IXGBE_ACI_NVM_CHECKSUM_VERIFY BIT(0)
+#define IXGBE_ACI_NVM_CHECKSUM_RECALC BIT(1)
+ u8 rsvd;
+ __le16 checksum; /* Used only by response */
+#define IXGBE_ACI_NVM_CHECKSUM_CORRECT 0xBABA
+ u8 rsvd2[12];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_nvm_checksum);
+
+/* Used for NVM Sanitization command - 0x070C */
+struct ixgbe_aci_cmd_nvm_sanitization {
+ u8 cmd_flags;
+#define IXGBE_ACI_SANITIZE_REQ_READ 0
+#define IXGBE_ACI_SANITIZE_REQ_OPERATE BIT(0)
+
+#define IXGBE_ACI_SANITIZE_READ_SUBJECT_NVM_BITS 0
+#define IXGBE_ACI_SANITIZE_READ_SUBJECT_NVM_STATE BIT(1)
+#define IXGBE_ACI_SANITIZE_OPERATE_SUBJECT_CLEAR 0
+ u8 values;
+#define IXGBE_ACI_SANITIZE_NVM_BITS_HOST_CLEAN_SUPPORT BIT(0)
+#define IXGBE_ACI_SANITIZE_NVM_BITS_BMC_CLEAN_SUPPORT BIT(2)
+#define IXGBE_ACI_SANITIZE_NVM_STATE_HOST_CLEAN_DONE BIT(0)
+#define IXGBE_ACI_SANITIZE_NVM_STATE_HOST_CLEAN_SUCCESS BIT(1)
+#define IXGBE_ACI_SANITIZE_NVM_STATE_BMC_CLEAN_DONE BIT(2)
+#define IXGBE_ACI_SANITIZE_NVM_STATE_BMC_CLEAN_SUCCESS BIT(3)
+#define IXGBE_ACI_SANITIZE_OPERATE_HOST_CLEAN_DONE BIT(0)
+#define IXGBE_ACI_SANITIZE_OPERATE_HOST_CLEAN_SUCCESS BIT(1)
+#define IXGBE_ACI_SANITIZE_OPERATE_BMC_CLEAN_DONE BIT(2)
+#define IXGBE_ACI_SANITIZE_OPERATE_BMC_CLEAN_SUCCESS BIT(3)
+ u8 reserved[14];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_nvm_sanitization);
+
+/* Write/Read Alternate - Direct (direct 0x0900/0x0902) */
+struct ixgbe_aci_cmd_read_write_alt_direct {
+ __le32 dword0_addr;
+ __le32 dword0_value;
+ __le32 dword1_addr;
+ __le32 dword1_value;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_read_write_alt_direct);
+
+/* Write/Read Alternate - Indirect (indirect 0x0901/0x0903) */
+struct ixgbe_aci_cmd_read_write_alt_indirect {
+ __le32 base_dword_addr;
+ __le32 num_dwords;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_read_write_alt_indirect);
+
+/* Done Alternate Write (direct 0x0904) */
+struct ixgbe_aci_cmd_done_alt_write {
+ u8 flags;
+#define IXGBE_ACI_CMD_UEFI_BIOS_MODE BIT(0)
+#define IXGBE_ACI_RESP_RESET_NEEDED BIT(1)
+ u8 reserved[15];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_done_alt_write);
+
+/* Clear Port Alternate Write (direct 0x0906) */
+struct ixgbe_aci_cmd_clear_port_alt_write {
+ u8 reserved[16];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_clear_port_alt_write);
+
+/* Get CGU abilities command response data structure (indirect 0x0C61) */
+struct ixgbe_aci_cmd_get_cgu_abilities {
+ u8 num_inputs;
+ u8 num_outputs;
+ u8 pps_dpll_idx;
+ u8 synce_dpll_idx;
+ __le32 max_in_freq;
+ __le32 max_in_phase_adj;
+ __le32 max_out_freq;
+ __le32 max_out_phase_adj;
+ u8 cgu_part_num;
+ u8 rsvd[3];
+};
+
+IXGBE_CHECK_STRUCT_LEN(24, ixgbe_aci_cmd_get_cgu_abilities);
+
+#define IXGBE_ACI_NODE_HANDLE_VALID BIT(10)
+#define IXGBE_ACI_NODE_HANDLE MAKEMASK(0x3FF, 0)
+#define IXGBE_ACI_DRIVING_CLK_NUM_SHIFT 10
+#define IXGBE_ACI_DRIVING_CLK_NUM MAKEMASK(0x3F, IXGBE_ACI_DRIVING_CLK_NUM_SHIFT)
+
+/* Set CGU input config (direct 0x0C62) */
+struct ixgbe_aci_cmd_set_cgu_input_config {
+ u8 input_idx;
+ u8 flags1;
+#define IXGBE_ACI_SET_CGU_IN_CFG_FLG1_UPDATE_FREQ BIT(6)
+#define IXGBE_ACI_SET_CGU_IN_CFG_FLG1_UPDATE_DELAY BIT(7)
+ u8 flags2;
+#define IXGBE_ACI_SET_CGU_IN_CFG_FLG2_INPUT_EN BIT(5)
+#define IXGBE_ACI_SET_CGU_IN_CFG_FLG2_ESYNC_EN BIT(6)
+ u8 rsvd;
+ __le32 freq;
+ __le32 phase_delay;
+ u8 rsvd2[2];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_cgu_input_config);
+
+/* Get CGU input config response descriptor structure (direct 0x0C63) */
+struct ixgbe_aci_cmd_get_cgu_input_config {
+ u8 input_idx;
+ u8 status;
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_LOS BIT(0)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_SCM_FAIL BIT(1)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_CFM_FAIL BIT(2)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_GST_FAIL BIT(3)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_PFM_FAIL BIT(4)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_ESYNC_FAIL BIT(6)
+#define IXGBE_ACI_GET_CGU_IN_CFG_STATUS_ESYNC_CAP BIT(7)
+ u8 type;
+#define IXGBE_ACI_GET_CGU_IN_CFG_TYPE_READ_ONLY BIT(0)
+#define IXGBE_ACI_GET_CGU_IN_CFG_TYPE_GPS BIT(4)
+#define IXGBE_ACI_GET_CGU_IN_CFG_TYPE_EXTERNAL BIT(5)
+#define IXGBE_ACI_GET_CGU_IN_CFG_TYPE_PHY BIT(6)
+ u8 flags1;
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG1_PHASE_DELAY_SUPP BIT(0)
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG1_1PPS_SUPP BIT(2)
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG1_10MHZ_SUPP BIT(3)
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG1_ANYFREQ BIT(7)
+ __le32 freq;
+ __le32 phase_delay;
+ u8 flags2;
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG2_INPUT_EN BIT(5)
+#define IXGBE_ACI_GET_CGU_IN_CFG_FLG2_ESYNC_EN BIT(6)
+ u8 rsvd[1];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_input_config);
+
+/* Set CGU output config (direct 0x0C64) */
+struct ixgbe_aci_cmd_set_cgu_output_config {
+ u8 output_idx;
+ u8 flags;
+#define IXGBE_ACI_SET_CGU_OUT_CFG_OUT_EN BIT(0)
+#define IXGBE_ACI_SET_CGU_OUT_CFG_ESYNC_EN BIT(1)
+#define IXGBE_ACI_SET_CGU_OUT_CFG_UPDATE_FREQ BIT(2)
+#define IXGBE_ACI_SET_CGU_OUT_CFG_UPDATE_PHASE BIT(3)
+#define IXGBE_ACI_SET_CGU_OUT_CFG_UPDATE_SRC_SEL BIT(4)
+ u8 src_sel;
+#define IXGBE_ACI_SET_CGU_OUT_CFG_DPLL_SRC_SEL MAKEMASK(0x1F, 0)
+ u8 rsvd;
+ __le32 freq;
+ __le32 phase_delay;
+ u8 rsvd2[2];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_cgu_output_config);
+
+/* Get CGU output config (direct 0x0C65) */
+struct ixgbe_aci_cmd_get_cgu_output_config {
+ u8 output_idx;
+ u8 flags;
+#define IXGBE_ACI_GET_CGU_OUT_CFG_OUT_EN BIT(0)
+#define IXGBE_ACI_GET_CGU_OUT_CFG_ESYNC_EN BIT(1)
+#define IXGBE_ACI_GET_CGU_OUT_CFG_ESYNC_ABILITY BIT(2)
+ u8 src_sel;
+#define IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_SRC_SEL_SHIFT 0
+#define IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_SRC_SEL \
+ MAKEMASK(0x1F, IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_SRC_SEL_SHIFT)
+#define IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_MODE_SHIFT 5
+#define IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_MODE \
+ MAKEMASK(0x7, IXGBE_ACI_GET_CGU_OUT_CFG_DPLL_MODE_SHIFT)
+ u8 rsvd;
+ __le32 freq;
+ __le32 src_freq;
+ u8 rsvd2[2];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_output_config);
+
+/* Get CGU DPLL status (direct 0x0C66) */
+struct ixgbe_aci_cmd_get_cgu_dpll_status {
+ u8 dpll_num;
+ u8 ref_state;
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_LOS BIT(0)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_SCM BIT(1)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_CFM BIT(2)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_GST BIT(3)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_PFM BIT(4)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_FAST_LOCK_EN BIT(5)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_REF_SW_ESYNC BIT(6)
+ __le16 dpll_state;
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_LOCK BIT(0)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_HO BIT(1)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_HO_READY BIT(2)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_FLHIT BIT(5)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_PSLHIT BIT(7)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_CLK_REF_SHIFT 8
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_CLK_REF_SEL \
+ MAKEMASK(0x1F, IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_CLK_REF_SHIFT)
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_MODE_SHIFT 13
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_MODE \
+ MAKEMASK(0x7, IXGBE_ACI_GET_CGU_DPLL_STATUS_STATE_MODE_SHIFT)
+ __le32 phase_offset_h;
+ __le32 phase_offset_l;
+ u8 eec_mode;
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_EEC_MODE_1 0xA
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_EEC_MODE_2 0xB
+#define IXGBE_ACI_GET_CGU_DPLL_STATUS_EEC_MODE_UNKNOWN 0xF
+ u8 rsvd[1];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_dpll_status);
+
+/* Set CGU DPLL config (direct 0x0C67) */
+struct ixgbe_aci_cmd_set_cgu_dpll_config {
+ u8 dpll_num;
+ u8 ref_state;
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_LOS BIT(0)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_SCM BIT(1)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_CFM BIT(2)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_GST BIT(3)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_PFM BIT(4)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_FLOCK_EN BIT(5)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_REF_SW_ESYNC BIT(6)
+ u8 rsvd;
+ u8 config;
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_CLK_REF_SEL MAKEMASK(0x1F, 0)
+#define IXGBE_ACI_SET_CGU_DPLL_CONFIG_MODE MAKEMASK(0x7, 5)
+ u8 rsvd2[8];
+ u8 eec_mode;
+ u8 rsvd3[1];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_cgu_dpll_config);
+
+/* Set CGU reference priority (direct 0x0C68) */
+struct ixgbe_aci_cmd_set_cgu_ref_prio {
+ u8 dpll_num;
+ u8 ref_idx;
+ u8 ref_priority;
+ u8 rsvd[11];
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_cgu_ref_prio);
+
+/* Get CGU reference priority (direct 0x0C69) */
+struct ixgbe_aci_cmd_get_cgu_ref_prio {
+ u8 dpll_num;
+ u8 ref_idx;
+ u8 ref_priority; /* Valid only in response */
+ u8 rsvd[13];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_ref_prio);
+
+/* Get CGU info (direct 0x0C6A) */
+struct ixgbe_aci_cmd_get_cgu_info {
+ __le32 cgu_id;
+ __le32 cgu_cfg_ver;
+ __le32 cgu_fw_ver;
+ u8 node_part_num;
+ u8 dev_rev;
+ __le16 node_handle;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_cgu_info);
+
+struct ixgbe_aci_cmd_temp_tca_event {
+ u8 event_desc;
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_SHIFT 0
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_NVM 0
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_EVENT_STATE 1
+#define IXGBE_TEMP_TCA_EVENT_DESC_SUBJ_ALL 2
+
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_SHIFT 2
+#define IXGBE_TEMP_TCA_EVENT_DESC_WARNING_CLEARED 0
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_CLEARED 1
+#define IXGBE_TEMP_TCA_EVENT_DESC_WARNING_RAISED 2
+#define IXGBE_TEMP_TCA_EVENT_DESC_ALARM_RAISED 3
+
+ u8 reserved;
+ __le16 temperature;
+ __le16 thermal_sensor_max_value;
+ __le16 thermal_sensor_min_value;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_temp_tca_event);
+
+/* Debug Dump Internal Data (indirect 0xFF08) */
+struct ixgbe_aci_cmd_debug_dump_internals {
+ __le16 cluster_id; /* Expresses next cluster ID in response */
+#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_LINK 0
+#define IXGBE_ACI_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE 1
+ __le16 table_id; /* Used only for non-memory clusters */
+ __le32 idx; /* In table entries for tables, in bytes for memory */
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_debug_dump_internals);
+
+/* Set Health Status (direct 0xFF20) */
+struct ixgbe_aci_cmd_set_health_status_config {
+ u8 event_source;
+#define IXGBE_ACI_HEALTH_STATUS_SET_PF_SPECIFIC_MASK BIT(0)
+#define IXGBE_ACI_HEALTH_STATUS_SET_ALL_PF_MASK BIT(1)
+#define IXGBE_ACI_HEALTH_STATUS_SET_GLOBAL_MASK BIT(2)
+ u8 reserved[15];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_set_health_status_config);
+
+#define IXGBE_ACI_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT 0x101
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_TYPE 0x102
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_QUAL 0x103
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_COMM 0x104
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_CONFLICT 0x105
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_NOT_PRESENT 0x106
+#define IXGBE_ACI_HEALTH_STATUS_INFO_MOD_UNDERUTILIZED 0x107
+#define IXGBE_ACI_HEALTH_STATUS_ERR_UNKNOWN_MOD_LENIENT 0x108
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MOD_DIAGNOSTIC_FEATURE 0x109
+#define IXGBE_ACI_HEALTH_STATUS_ERR_INVALID_LINK_CFG 0x10B
+#define IXGBE_ACI_HEALTH_STATUS_ERR_PORT_ACCESS 0x10C
+#define IXGBE_ACI_HEALTH_STATUS_ERR_PORT_UNREACHABLE 0x10D
+#define IXGBE_ACI_HEALTH_STATUS_INFO_PORT_SPEED_MOD_LIMITED 0x10F
+#define IXGBE_ACI_HEALTH_STATUS_ERR_PARALLEL_FAULT 0x110
+#define IXGBE_ACI_HEALTH_STATUS_INFO_PORT_SPEED_PHY_LIMITED 0x111
+#define IXGBE_ACI_HEALTH_STATUS_ERR_NETLIST_TOPO 0x112
+#define IXGBE_ACI_HEALTH_STATUS_ERR_NETLIST 0x113
+#define IXGBE_ACI_HEALTH_STATUS_ERR_TOPO_CONFLICT 0x114
+#define IXGBE_ACI_HEALTH_STATUS_ERR_LINK_HW_ACCESS 0x115
+#define IXGBE_ACI_HEALTH_STATUS_ERR_LINK_RUNTIME 0x116
+#define IXGBE_ACI_HEALTH_STATUS_ERR_DNL_INIT 0x117
+#define IXGBE_ACI_HEALTH_STATUS_ERR_PHY_NVM_PROG 0x120
+#define IXGBE_ACI_HEALTH_STATUS_ERR_PHY_FW_LOAD 0x121
+#define IXGBE_ACI_HEALTH_STATUS_INFO_RECOVERY 0x500
+#define IXGBE_ACI_HEALTH_STATUS_ERR_FLASH_ACCESS 0x501
+#define IXGBE_ACI_HEALTH_STATUS_ERR_NVM_AUTH 0x502
+#define IXGBE_ACI_HEALTH_STATUS_ERR_OROM_AUTH 0x503
+#define IXGBE_ACI_HEALTH_STATUS_ERR_DDP_AUTH 0x504
+#define IXGBE_ACI_HEALTH_STATUS_ERR_NVM_COMPAT 0x505
+#define IXGBE_ACI_HEALTH_STATUS_ERR_OROM_COMPAT 0x506
+#define IXGBE_ACI_HEALTH_STATUS_ERR_NVM_SEC_VIOLATION 0x507
+#define IXGBE_ACI_HEALTH_STATUS_ERR_OROM_SEC_VIOLATION 0x508
+#define IXGBE_ACI_HEALTH_STATUS_ERR_DCB_MIB 0x509
+#define IXGBE_ACI_HEALTH_STATUS_ERR_MNG_TIMEOUT 0x50A
+#define IXGBE_ACI_HEALTH_STATUS_ERR_BMC_RESET 0x50B
+#define IXGBE_ACI_HEALTH_STATUS_ERR_LAST_MNG_FAIL 0x50C
+#define IXGBE_ACI_HEALTH_STATUS_ERR_RESOURCE_ALLOC_FAIL 0x50D
+#define IXGBE_ACI_HEALTH_STATUS_ERR_FW_LOOP 0x1000
+#define IXGBE_ACI_HEALTH_STATUS_ERR_FW_PFR_FAIL 0x1001
+#define IXGBE_ACI_HEALTH_STATUS_ERR_LAST_FAIL_AQ 0x1002
+
+/* Get Health Status codes (indirect 0xFF21) */
+struct ixgbe_aci_cmd_get_supported_health_status_codes {
+ __le16 health_code_count;
+ u8 reserved[6];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_supported_health_status_codes);
+
+/* Get Health Status (indirect 0xFF22) */
+struct ixgbe_aci_cmd_get_health_status {
+ __le16 health_status_count;
+ u8 reserved[6];
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_get_health_status);
+
+/* Get Health Status event buffer entry, (0xFF22)
+ * repeated per reported health status
+ */
+struct ixgbe_aci_cmd_health_status_elem {
+ __le16 health_status_code;
+ __le16 event_source;
+#define IXGBE_ACI_HEALTH_STATUS_PF (0x1)
+#define IXGBE_ACI_HEALTH_STATUS_PORT (0x2)
+#define IXGBE_ACI_HEALTH_STATUS_GLOBAL (0x3)
+ __le32 internal_data1;
+#define IXGBE_ACI_HEALTH_STATUS_UNDEFINED_DATA (0xDEADBEEF)
+ __le32 internal_data2;
+};
+
+IXGBE_CHECK_STRUCT_LEN(12, ixgbe_aci_cmd_health_status_elem);
+
+/* Clear Health Status (direct 0xFF23) */
+struct ixgbe_aci_cmd_clear_health_status {
+ __le32 reserved[4];
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_clear_health_status);
+
+enum ixgbe_aci_fw_logging_mod {
+ IXGBE_ACI_FW_LOG_ID_GENERAL = 0,
+ IXGBE_ACI_FW_LOG_ID_CTRL = 1,
+ IXGBE_ACI_FW_LOG_ID_LINK = 2,
+ IXGBE_ACI_FW_LOG_ID_LINK_TOPO = 3,
+ IXGBE_ACI_FW_LOG_ID_DNL = 4,
+ IXGBE_ACI_FW_LOG_ID_I2C = 5,
+ IXGBE_ACI_FW_LOG_ID_SDP = 6,
+ IXGBE_ACI_FW_LOG_ID_MDIO = 7,
+ IXGBE_ACI_FW_LOG_ID_ADMINQ = 8,
+ IXGBE_ACI_FW_LOG_ID_HDMA = 9,
+ IXGBE_ACI_FW_LOG_ID_LLDP = 10,
+ IXGBE_ACI_FW_LOG_ID_DCBX = 11,
+ IXGBE_ACI_FW_LOG_ID_DCB = 12,
+ IXGBE_ACI_FW_LOG_ID_XLR = 13,
+ IXGBE_ACI_FW_LOG_ID_NVM = 14,
+ IXGBE_ACI_FW_LOG_ID_AUTH = 15,
+ IXGBE_ACI_FW_LOG_ID_VPD = 16,
+ IXGBE_ACI_FW_LOG_ID_IOSF = 17,
+ IXGBE_ACI_FW_LOG_ID_PARSER = 18,
+ IXGBE_ACI_FW_LOG_ID_SW = 19,
+ IXGBE_ACI_FW_LOG_ID_SCHEDULER = 20,
+ IXGBE_ACI_FW_LOG_ID_TXQ = 21,
+ IXGBE_ACI_FW_LOG_ID_ACL = 22,
+ IXGBE_ACI_FW_LOG_ID_POST = 23,
+ IXGBE_ACI_FW_LOG_ID_WATCHDOG = 24,
+ IXGBE_ACI_FW_LOG_ID_TASK_DISPATCH = 25,
+ IXGBE_ACI_FW_LOG_ID_MNG = 26,
+ IXGBE_ACI_FW_LOG_ID_SYNCE = 27,
+ IXGBE_ACI_FW_LOG_ID_HEALTH = 28,
+ IXGBE_ACI_FW_LOG_ID_TSDRV = 29,
+ IXGBE_ACI_FW_LOG_ID_PFREG = 30,
+ IXGBE_ACI_FW_LOG_ID_MDLVER = 31,
+ IXGBE_ACI_FW_LOG_ID_MAX = 32,
+};
+
+/* Only a single log level should be set and all log levels under the set value
+ * are enabled, e.g. if log level is set to IXGBE_FWLOG_LEVEL_VERBOSE, then all
+ * other log levels are included (except IXGBE_FWLOG_LEVEL_NONE)
+ */
+enum ixgbe_fwlog_level {
+ IXGBE_FWLOG_LEVEL_NONE = 0,
+ IXGBE_FWLOG_LEVEL_ERROR = 1,
+ IXGBE_FWLOG_LEVEL_WARNING = 2,
+ IXGBE_FWLOG_LEVEL_NORMAL = 3,
+ IXGBE_FWLOG_LEVEL_VERBOSE = 4,
+ IXGBE_FWLOG_LEVEL_INVALID, /* all values >= this entry are invalid */
+};
+
+struct ixgbe_fwlog_module_entry {
+ /* module ID for the corresponding firmware logging event */
+ u16 module_id;
+ /* verbosity level for the module_id */
+ u8 log_level;
+};
+
+struct ixgbe_fwlog_cfg {
+ /* list of modules for configuring log level */
+ struct ixgbe_fwlog_module_entry module_entries[IXGBE_ACI_FW_LOG_ID_MAX];
+#define IXGBE_FWLOG_OPTION_ARQ_ENA BIT(0)
+#define IXGBE_FWLOG_OPTION_UART_ENA BIT(1)
+ /* set before calling ixgbe_fwlog_init() so the PF registers for firmware
+ * logging on initialization
+ */
+#define IXGBE_FWLOG_OPTION_REGISTER_ON_INIT BIT(2)
+ /* set in the ixgbe_fwlog_get() response if the PF is registered for FW
+ * logging events over ARQ
+ */
+#define IXGBE_FWLOG_OPTION_IS_REGISTERED BIT(3)
+ /* options used to configure firmware logging */
+ u16 options;
+ /* minimum number of log events sent per Admin Receive Queue event */
+ u8 log_resolution;
+};
+
+struct ixgbe_fwlog_data {
+ u16 data_size;
+ u8 *data;
+};
+
+struct ixgbe_fwlog_ring {
+ struct ixgbe_fwlog_data *rings;
+ u16 size;
+ u16 head;
+ u16 tail;
+};
+
+#define IXGBE_FWLOG_RING_SIZE_DFLT 256
+#define IXGBE_FWLOG_RING_SIZE_MAX 512
+
+/* Set FW Logging configuration (indirect 0xFF30)
+ * Register for FW Logging (indirect 0xFF31)
+ * Query FW Logging (indirect 0xFF32)
+ * FW Log Event (indirect 0xFF33)
+ * Get FW Log (indirect 0xFF34)
+ * Clear FW Log (indirect 0xFF35)
+ */
+struct ixgbe_aci_cmd_fw_log {
+ u8 cmd_flags;
+#define IXGBE_ACI_FW_LOG_CONF_UART_EN BIT(0)
+#define IXGBE_ACI_FW_LOG_CONF_AQ_EN BIT(1)
+#define IXGBE_ACI_FW_LOG_QUERY_REGISTERED BIT(2)
+#define IXGBE_ACI_FW_LOG_CONF_SET_VALID BIT(3)
+#define IXGBE_ACI_FW_LOG_AQ_REGISTER BIT(0)
+#define IXGBE_ACI_FW_LOG_AQ_QUERY BIT(2)
+#define IXGBE_ACI_FW_LOG_PERSISTENT BIT(0)
+ u8 rsp_flag;
+#define IXGBE_ACI_FW_LOG_MORE_DATA BIT(1)
+ __le16 fw_rt_msb;
+ union {
+ struct {
+ __le32 fw_rt_lsb;
+ } sync;
+ struct {
+ __le16 log_resolution;
+#define IXGBE_ACI_FW_LOG_MIN_RESOLUTION (1)
+#define IXGBE_ACI_FW_LOG_MAX_RESOLUTION (128)
+ __le16 mdl_cnt;
+ } cfg;
+ } ops;
+ __le32 addr_high;
+ __le32 addr_low;
+};
+
+IXGBE_CHECK_PARAM_LEN(ixgbe_aci_cmd_fw_log);
+
+/* Response Buffer for:
+ * Set Firmware Logging Configuration (0xFF30)
+ * Query FW Logging (0xFF32)
+ */
+struct ixgbe_aci_cmd_fw_log_cfg_resp {
+ __le16 module_identifier;
+ u8 log_level;
+ u8 rsvd0;
+};
+
+IXGBE_CHECK_STRUCT_LEN(4, ixgbe_aci_cmd_fw_log_cfg_resp);
+
+/**
+ * struct ixgbe_aq_desc - Admin Command (AC) descriptor
+ * @flags: IXGBE_ACI_FLAG_* flags
+ * @opcode: Admin command opcode
+ * @datalen: length in bytes of indirect/external data buffer
+ * @retval: return value from firmware
+ * @cookie_high: opaque data high-half
+ * @cookie_low: opaque data low-half
+ * @params: command-specific parameters
+ *
+ * Descriptor format for commands the driver posts via the Admin Command Interface
+ * (ACI). The firmware writes back onto the command descriptor and returns
+ * the result of the command. Asynchronous events that are not an immediate
+ * result of the command are written to the Admin Command Interface (ACI) using
+ * the same descriptor format. Descriptors are in little-endian notation with
+ * 32-bit words.
+ */
+struct ixgbe_aci_desc {
+ __le16 flags;
+ __le16 opcode;
+ __le16 datalen;
+ __le16 retval;
+ __le32 cookie_high;
+ __le32 cookie_low;
+ union {
+ u8 raw[16];
+ struct ixgbe_aci_cmd_generic generic;
+ struct ixgbe_aci_cmd_get_ver get_ver;
+ struct ixgbe_aci_cmd_driver_ver driver_ver;
+ struct ixgbe_aci_cmd_get_exp_err exp_err;
+ struct ixgbe_aci_cmd_req_res res_owner;
+ struct ixgbe_aci_cmd_list_caps get_cap;
+ struct ixgbe_aci_cmd_disable_rxen disable_rxen;
+ struct ixgbe_aci_cmd_get_fw_event get_fw_event;
+ struct ixgbe_aci_cmd_get_phy_caps get_phy;
+ struct ixgbe_aci_cmd_set_phy_cfg set_phy;
+ struct ixgbe_aci_cmd_restart_an restart_an;
+ struct ixgbe_aci_cmd_get_link_status get_link_status;
+ struct ixgbe_aci_cmd_set_event_mask set_event_mask;
+ struct ixgbe_aci_cmd_get_link_topo get_link_topo;
+ struct ixgbe_aci_cmd_i2c read_write_i2c;
+ struct ixgbe_aci_cmd_read_i2c_resp read_i2c_resp;
+ struct ixgbe_aci_cmd_mdio read_write_mdio;
+ struct ixgbe_aci_cmd_mdio read_mdio;
+ struct ixgbe_aci_cmd_mdio write_mdio;
+ struct ixgbe_aci_cmd_set_port_id_led set_port_id_led;
+ struct ixgbe_aci_cmd_gpio_by_func read_write_gpio_by_func;
+ struct ixgbe_aci_cmd_gpio read_write_gpio;
+ struct ixgbe_aci_cmd_sff_eeprom read_write_sff_param;
+ struct ixgbe_aci_cmd_prog_topo_dev_nvm prog_topo_dev_nvm;
+ struct ixgbe_aci_cmd_read_topo_dev_nvm read_topo_dev_nvm;
+ struct ixgbe_aci_cmd_nvm nvm;
+ struct ixgbe_aci_cmd_nvm_cfg nvm_cfg;
+ struct ixgbe_aci_cmd_nvm_checksum nvm_checksum;
+ struct ixgbe_aci_cmd_read_write_alt_direct read_write_alt_direct;
+ struct ixgbe_aci_cmd_read_write_alt_indirect read_write_alt_indirect;
+ struct ixgbe_aci_cmd_done_alt_write done_alt_write;
+ struct ixgbe_aci_cmd_clear_port_alt_write clear_port_alt_write;
+ struct ixgbe_aci_cmd_debug_dump_internals debug_dump;
+ struct ixgbe_aci_cmd_set_health_status_config
+ set_health_status_config;
+ struct ixgbe_aci_cmd_get_supported_health_status_codes
+ get_supported_health_status_codes;
+ struct ixgbe_aci_cmd_get_health_status get_health_status;
+ struct ixgbe_aci_cmd_clear_health_status clear_health_status;
+ struct ixgbe_aci_cmd_fw_log fw_log;
+ struct ixgbe_aci_cmd_nvm_sanitization nvm_sanitization;
+ } params;
+};
+
+/* E610-specific adapter context structures */
+
+struct ixgbe_link_status {
+ /* Refer to ixgbe_aci_phy_type for bits definition */
+ u64 phy_type_low;
+ u64 phy_type_high;
+ u8 topo_media_conflict;
+ u16 max_frame_size;
+ u16 link_speed;
+ u16 req_speeds;
+ u8 link_cfg_err;
+ u8 lse_ena; /* Link Status Event notification */
+ u8 link_info;
+ u8 an_info;
+ u8 ext_info;
+ u8 fec_info;
+ u8 pacing;
+ /* Refer to #define from module_type[IXGBE_ACI_MODULE_TYPE_TOTAL_BYTE] of
+ * ixgbe_aci_get_phy_caps structure
+ */
+ u8 module_type[IXGBE_ACI_MODULE_TYPE_TOTAL_BYTE];
+};
+
+/* Common HW capabilities for SW use */
+struct ixgbe_hw_common_caps {
+ /* Write CSR protection */
+ u64 wr_csr_prot;
+ u32 switching_mode;
+ /* switching mode supported - EVB switching (including cloud) */
+#define IXGBE_NVM_IMAGE_TYPE_EVB 0x0
+
+ /* Manageability mode & supported protocols over MCTP */
+ u32 mgmt_mode;
+#define IXGBE_MGMT_MODE_PASS_THRU_MODE_M 0xF
+#define IXGBE_MGMT_MODE_CTL_INTERFACE_M 0xF0
+#define IXGBE_MGMT_MODE_REDIR_SB_INTERFACE_M 0xF00
+
+ u32 mgmt_protocols_mctp;
+#define IXGBE_MGMT_MODE_PROTO_RSVD BIT(0)
+#define IXGBE_MGMT_MODE_PROTO_PLDM BIT(1)
+#define IXGBE_MGMT_MODE_PROTO_OEM BIT(2)
+#define IXGBE_MGMT_MODE_PROTO_NC_SI BIT(3)
+
+ u32 os2bmc;
+ u32 valid_functions;
+ /* DCB capabilities */
+ u32 active_tc_bitmap;
+ u32 maxtc;
+
+ /* RSS related capabilities */
+ u32 rss_table_size; /* 512 for PFs and 64 for VFs */
+ u32 rss_table_entry_width; /* RSS Entry width in bits */
+
+ /* Tx/Rx queues */
+ u32 num_rxq; /* Number/Total Rx queues */
+ u32 rxq_first_id; /* First queue ID for Rx queues */
+ u32 num_txq; /* Number/Total Tx queues */
+ u32 txq_first_id; /* First queue ID for Tx queues */
+
+ /* MSI-X vectors */
+ u32 num_msix_vectors;
+ u32 msix_vector_first_id;
+
+ /* Max MTU for function or device */
+ u32 max_mtu;
+
+ /* WOL related */
+ u32 num_wol_proxy_fltr;
+ u32 wol_proxy_vsi_seid;
+
+ /* LED/SDP pin count */
+ u32 led_pin_num;
+ u32 sdp_pin_num;
+
+ /* LED/SDP - Supports up to 12 LED pins and 8 SDP signals */
+#define IXGBE_MAX_SUPPORTED_GPIO_LED 12
+#define IXGBE_MAX_SUPPORTED_GPIO_SDP 8
+ u8 led[IXGBE_MAX_SUPPORTED_GPIO_LED];
+ u8 sdp[IXGBE_MAX_SUPPORTED_GPIO_SDP];
+ /* SR-IOV virtualization */
+ u8 sr_iov_1_1; /* SR-IOV enabled */
+ /* VMDQ */
+ u8 vmdq; /* VMDQ supported */
+
+ /* EVB capabilities */
+ u8 evb_802_1_qbg; /* Edge Virtual Bridging */
+ u8 evb_802_1_qbh; /* Bridge Port Extension */
+
+ u8 dcb;
+ u8 iscsi;
+ u8 mgmt_cem;
+
+ /* WoL and APM support */
+#define IXGBE_WOL_SUPPORT_M BIT(0)
+#define IXGBE_ACPI_PROG_MTHD_M BIT(1)
+#define IXGBE_PROXY_SUPPORT_M BIT(2)
+ u8 apm_wol_support;
+ u8 acpi_prog_mthd;
+ u8 proxy_support;
+ bool sec_rev_disabled;
+ bool update_disabled;
+ bool nvm_unified_update;
+ bool netlist_auth;
+#define IXGBE_NVM_MGMT_SEC_REV_DISABLED BIT(0)
+#define IXGBE_NVM_MGMT_UPDATE_DISABLED BIT(1)
+#define IXGBE_NVM_MGMT_UNIFIED_UPD_SUPPORT BIT(3)
+#define IXGBE_NVM_MGMT_NETLIST_AUTH_SUPPORT BIT(5)
+ bool no_drop_policy_support;
+ /* PCIe reset avoidance */
+ bool pcie_reset_avoidance; /* false: not supported, true: supported */
+ /* Post update reset restriction */
+ bool reset_restrict_support; /* false: not supported, true: supported */
+
+ /* External topology device images within the NVM */
+#define IXGBE_EXT_TOPO_DEV_IMG_COUNT 4
+ u32 ext_topo_dev_img_ver_high[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
+ u32 ext_topo_dev_img_ver_low[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
+ u8 ext_topo_dev_img_part_num[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
+#define IXGBE_EXT_TOPO_DEV_IMG_PART_NUM_S 8
+#define IXGBE_EXT_TOPO_DEV_IMG_PART_NUM_M \
+ MAKEMASK(0xFF, IXGBE_EXT_TOPO_DEV_IMG_PART_NUM_S)
+ bool ext_topo_dev_img_load_en[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
+#define IXGBE_EXT_TOPO_DEV_IMG_LOAD_EN BIT(0)
+ bool ext_topo_dev_img_prog_en[IXGBE_EXT_TOPO_DEV_IMG_COUNT];
+#define IXGBE_EXT_TOPO_DEV_IMG_PROG_EN BIT(1)
+ /* Support for OROM update in Recovery Mode. */
+ bool orom_recovery_update;
+ bool next_cluster_id_support;
+};
+
+#pragma pack(1)
+struct ixgbe_orom_civd_info {
+ u8 signature[4]; /* Must match ASCII '$CIV' characters */
+ u8 checksum; /* Simple modulo 256 sum of all structure bytes must equal 0 */
+ __le32 combo_ver; /* Combo Image Version number */
+ u8 combo_name_len; /* Length of the unicode combo image version string, max of 32 */
+ __le16 combo_name[32]; /* Unicode string representing the Combo Image version */
+};
+#pragma pack()
+
+/* Function specific capabilities */
+struct ixgbe_hw_func_caps {
+ struct ixgbe_hw_common_caps common_cap;
+ u32 num_allocd_vfs; /* Number of allocated VFs */
+ u32 vf_base_id; /* Logical ID of the first VF */
+ u32 guar_num_vsi;
+ bool no_drop_policy_ena;
+};
+
+/* Device wide capabilities */
+struct ixgbe_hw_dev_caps {
+ struct ixgbe_hw_common_caps common_cap;
+ u32 num_vfs_exposed; /* Total number of VFs exposed */
+ u32 num_vsi_allocd_to_host; /* Excluding EMP VSI */
+ u32 num_flow_director_fltr; /* Number of FD filters available */
+ u32 num_funcs;
+};
+
+/* ACI event information */
+struct ixgbe_aci_event {
+ struct ixgbe_aci_desc desc;
+ u16 msg_len;
+ u16 buf_len;
+ u8 *msg_buf;
+};
+
+struct ixgbe_aci_info {
+ enum ixgbe_aci_err last_status; /* last status of sent admin command */
+ struct ixgbe_lock lock; /* admin command interface lock */
+};
+
+/* Minimum Security Revision information */
+struct ixgbe_minsrev_info {
+ u32 nvm;
+ u32 orom;
+ u8 nvm_valid : 1;
+ u8 orom_valid : 1;
+};
+
+/* Enumeration of which flash bank is desired to read from, either the active
+ * bank or the inactive bank. Used to abstract 1st and 2nd bank notion from
+ * code which just wants to read the active or inactive flash bank.
+ */
+enum ixgbe_bank_select {
+ IXGBE_ACTIVE_FLASH_BANK,
+ IXGBE_INACTIVE_FLASH_BANK,
+};
+
+/* Option ROM version information */
+struct ixgbe_orom_info {
+ u8 major; /* Major version of OROM */
+ u8 patch; /* Patch version of OROM */
+ u16 build; /* Build version of OROM */
+ u32 srev; /* Security revision */
+};
+
+/* NVM version information */
+struct ixgbe_nvm_info {
+ u32 eetrack;
+ u32 srev;
+ u8 major;
+ u8 minor;
+};
+
+/* netlist version information */
+struct ixgbe_netlist_info {
+ u32 major; /* major high/low */
+ u32 minor; /* minor high/low */
+ u32 type; /* type high/low */
+ u32 rev; /* revision high/low */
+ u32 hash; /* SHA-1 hash word */
+ u16 cust_ver; /* customer version */
+};
+
+/* Enumeration of possible flash banks for the NVM, OROM, and Netlist modules
+ * of the flash image.
+ */
+enum ixgbe_flash_bank {
+ IXGBE_INVALID_FLASH_BANK,
+ IXGBE_1ST_FLASH_BANK,
+ IXGBE_2ND_FLASH_BANK,
+};
+
+/* information for accessing NVM, OROM, and Netlist flash banks */
+struct ixgbe_bank_info {
+ u32 nvm_ptr; /* Pointer to 1st NVM bank */
+ u32 nvm_size; /* Size of NVM bank */
+ u32 orom_ptr; /* Pointer to 1st OROM bank */
+ u32 orom_size; /* Size of OROM bank */
+ u32 netlist_ptr; /* Pointer to 1st Netlist bank */
+ u32 netlist_size; /* Size of Netlist bank */
+ enum ixgbe_flash_bank nvm_bank; /* Active NVM bank */
+ enum ixgbe_flash_bank orom_bank; /* Active OROM bank */
+ enum ixgbe_flash_bank netlist_bank; /* Active Netlist bank */
+};
+
+/* Flash Chip Information */
+struct ixgbe_flash_info {
+ struct ixgbe_orom_info orom; /* Option ROM version info */
+ struct ixgbe_nvm_info nvm; /* NVM version information */
+ struct ixgbe_netlist_info netlist; /* Netlist version info */
+ struct ixgbe_bank_info banks; /* Flash Bank information */
+ u16 sr_words; /* Shadow RAM size in words */
+ u32 flash_size; /* Size of available flash in bytes */
+ u8 blank_nvm_mode; /* is NVM empty (no FW present) */
+};
+
+#define IXGBE_NVM_CMD_READ 0x0000000B
+#define IXGBE_NVM_CMD_WRITE 0x0000000C
+
+/* NVM Access command */
+struct ixgbe_nvm_access_cmd {
+ u32 command; /* NVM command: READ or WRITE */
+ u32 offset; /* Offset to read/write, in bytes */
+ u32 data_size; /* Size of data field, in bytes */
+};
+
+/* NVM Access data */
+struct ixgbe_nvm_access_data {
+ u32 regval; /* Storage for register value */
+};
+
+#endif /* _IXGBE_TYPE_E610_H_ */
diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c
index cac3c6b5e5e7..4e48f7f33c9d 100644
--- a/sys/dev/ixgbe/ixgbe_vf.c
+++ b/sys/dev/ixgbe/ixgbe_vf.c
@@ -656,7 +656,8 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
break;
case IXGBE_LINKS_SPEED_100_82599:
*speed = IXGBE_LINK_SPEED_100_FULL;
- if (hw->mac.type == ixgbe_mac_X550_vf) {
+ if (hw->mac.type == ixgbe_mac_X550_vf ||
+ hw->mac.type == ixgbe_mac_E610_vf) {
if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
*speed = IXGBE_LINK_SPEED_5GB_FULL;
}
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c
index 60e66aeaf579..43c3af056b67 100644
--- a/sys/dev/ixl/if_ixl.c
+++ b/sys/dev/ixl/if_ixl.c
@@ -1151,13 +1151,20 @@ ixl_if_enable_intr(if_ctx_t ctx)
struct ixl_pf *pf = iflib_get_softc(ctx);
struct ixl_vsi *vsi = &pf->vsi;
struct i40e_hw *hw = vsi->hw;
- struct ixl_rx_queue *que = vsi->rx_queues;
+ struct ixl_rx_queue *rx_que = vsi->rx_queues;
ixl_enable_intr0(hw);
/* Enable queue interrupts */
- for (int i = 0; i < vsi->num_rx_queues; i++, que++)
- /* TODO: Queue index parameter is probably wrong */
- ixl_enable_queue(hw, que->rxr.me);
+ if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) {
+ for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++)
+ ixl_enable_queue(hw, rx_que->rxr.me);
+ } else {
+ /*
+ * Set PFINT_LNKLST0 FIRSTQ_INDX to 0x0 to enable
+ * triggering interrupts by queues.
+ */
+ wr32(hw, I40E_PFINT_LNKLST0, 0x0);
+ }
}
/*
@@ -1175,11 +1182,13 @@ ixl_if_disable_intr(if_ctx_t ctx)
if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) {
for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++)
- ixl_disable_queue(hw, rx_que->msix - 1);
+ ixl_disable_queue(hw, rx_que->rxr.me);
} else {
- // Set PFINT_LNKLST0 FIRSTQ_INDX to 0x7FF
- // stops queues from triggering interrupts
- wr32(hw, I40E_PFINT_LNKLST0, 0x7FF);
+ /*
+ * Set PFINT_LNKLST0 FIRSTQ_INDX to End of List (0x7FF)
+ * to stop queues from triggering interrupts.
+ */
+ wr32(hw, I40E_PFINT_LNKLST0, IXL_QUEUE_EOL);
}
}
diff --git a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c
index 978e5f25ceaf..cc0bc1f3fcd2 100644
--- a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c
+++ b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_offload.c
@@ -120,7 +120,7 @@ static void mlx5e_ipsec_packet_setup(void *obj, u32 pdn,
switch (attrs->dir) {
case IPSEC_DIR_OUTBOUND:
- if (attrs->replay_esn.replay_window != 0)
+ if (attrs->replay_esn.trigger)
MLX5_SET(ipsec_aso, aso_ctx, mode, MLX5_IPSEC_ASO_INC_SN);
else
MLX5_SET(ipsec_aso, aso_ctx, mode, MLX5_IPSEC_ASO_MODE);
diff --git a/sys/dev/psci/smccc_trng.c b/sys/dev/psci/smccc_trng.c
index ab98837d3841..8a2e5508ef48 100644
--- a/sys/dev/psci/smccc_trng.c
+++ b/sys/dev/psci/smccc_trng.c
@@ -58,7 +58,7 @@ static device_attach_t trng_attach;
static unsigned trng_read(void *, unsigned);
-static struct random_source random_trng = {
+static const struct random_source random_trng = {
.rs_ident = "Arm SMCCC TRNG",
.rs_source = RANDOM_PURE_ARM_TRNG,
.rs_read = trng_read,
diff --git a/sys/dev/qcom_rnd/qcom_rnd.c b/sys/dev/qcom_rnd/qcom_rnd.c
index fdd0b553523e..a5ece7e00f28 100644
--- a/sys/dev/qcom_rnd/qcom_rnd.c
+++ b/sys/dev/qcom_rnd/qcom_rnd.c
@@ -63,7 +63,7 @@ static int qcom_rnd_detach(device_t);
static int qcom_rnd_harvest(struct qcom_rnd_softc *, void *, size_t *);
static unsigned qcom_rnd_read(void *, unsigned);
-static struct random_source random_qcom_rnd = {
+static const struct random_source random_qcom_rnd = {
.rs_ident = "Qualcomm Entropy Adapter",
.rs_source = RANDOM_PURE_QUALCOMM,
.rs_read = qcom_rnd_read,
diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c
index 61698bfff820..524d80317681 100644
--- a/sys/dev/random/armv8rng.c
+++ b/sys/dev/random/armv8rng.c
@@ -44,7 +44,7 @@
static u_int random_rndr_read(void *, u_int);
static bool has_rndr;
-static struct random_source random_armv8_rndr = {
+static const struct random_source random_armv8_rndr = {
.rs_ident = "Armv8 rndr RNG",
.rs_source = RANDOM_PURE_ARMV8,
.rs_read = random_rndr_read,
diff --git a/sys/dev/random/darn.c b/sys/dev/random/darn.c
index a66754e095fb..9bb4991df82f 100644
--- a/sys/dev/random/darn.c
+++ b/sys/dev/random/darn.c
@@ -56,7 +56,7 @@
static u_int random_darn_read(void *, u_int);
-static struct random_source random_darn = {
+static const struct random_source random_darn = {
.rs_ident = "PowerISA DARN random number generator",
.rs_source = RANDOM_PURE_DARN,
.rs_read = random_darn_read
diff --git a/sys/dev/random/ivy.c b/sys/dev/random/ivy.c
index 05474d977276..fa1e4831f1b9 100644
--- a/sys/dev/random/ivy.c
+++ b/sys/dev/random/ivy.c
@@ -51,7 +51,7 @@
static bool has_rdrand, has_rdseed;
static u_int random_ivy_read(void *, u_int);
-static struct random_source random_ivy = {
+static const struct random_source random_ivy = {
.rs_ident = "Intel Secure Key RNG",
.rs_source = RANDOM_PURE_RDRAND,
.rs_read = random_ivy_read
diff --git a/sys/dev/random/nehemiah.c b/sys/dev/random/nehemiah.c
index f76071290b8f..56f144169dae 100644
--- a/sys/dev/random/nehemiah.c
+++ b/sys/dev/random/nehemiah.c
@@ -44,7 +44,7 @@
static u_int random_nehemiah_read(void *, u_int);
-static struct random_source random_nehemiah = {
+static const struct random_source random_nehemiah = {
.rs_ident = "VIA Nehemiah Padlock RNG",
.rs_source = RANDOM_PURE_NEHEMIAH,
.rs_read = random_nehemiah_read
diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c
index c7762967c4fb..84ec174bd08e 100644
--- a/sys/dev/random/random_harvestq.c
+++ b/sys/dev/random/random_harvestq.c
@@ -110,7 +110,7 @@ __read_frequently u_int hc_source_mask;
struct random_sources {
CK_LIST_ENTRY(random_sources) rrs_entries;
- struct random_source *rrs_source;
+ const struct random_source *rrs_source;
};
static CK_LIST_HEAD(sources_head, random_sources) source_list =
@@ -493,9 +493,9 @@ random_healthtest_init(enum random_entropy_source source)
* The RCT limit comes from the formula in section 4.4.1.
*
* The APT cutoff is calculated using the formula in section 4.4.2
- * footnote 10 with the window size changed from 512 to 511, since the
- * test as written counts the number of samples equal to the first
- * sample in the window, and thus tests W-1 samples.
+ * footnote 10 with the number of Bernoulli trials changed from W to
+ * W-1, since the test as written counts the number of samples equal to
+ * the first sample in the window, and thus tests W-1 samples.
*/
ht->ht_rct_limit = 35;
ht->ht_apt_cutoff = 330;
@@ -849,7 +849,7 @@ random_harvest_deregister_source(enum random_entropy_source source)
}
void
-random_source_register(struct random_source *rsource)
+random_source_register(const struct random_source *rsource)
{
struct random_sources *rrs;
@@ -868,7 +868,7 @@ random_source_register(struct random_source *rsource)
}
void
-random_source_deregister(struct random_source *rsource)
+random_source_deregister(const struct random_source *rsource)
{
struct random_sources *rrs = NULL;
diff --git a/sys/dev/random/randomdev.h b/sys/dev/random/randomdev.h
index e1c9ac7b680d..6d742447ea8b 100644
--- a/sys/dev/random/randomdev.h
+++ b/sys/dev/random/randomdev.h
@@ -103,8 +103,8 @@ struct random_source {
random_source_read_t *rs_read;
};
-void random_source_register(struct random_source *);
-void random_source_deregister(struct random_source *);
+void random_source_register(const struct random_source *);
+void random_source_deregister(const struct random_source *);
#endif /* _KERNEL */
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c
index a31081663f0c..e2b97f5accac 100644
--- a/sys/dev/usb/input/uhid.c
+++ b/sys/dev/usb/input/uhid.c
@@ -40,8 +40,6 @@
* HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf
*/
-#include "opt_hid.h"
-
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
@@ -928,11 +926,7 @@ static device_method_t uhid_methods[] = {
};
static driver_t uhid_driver = {
-#ifdef HIDRAW_MAKE_UHID_ALIAS
- .name = "hidraw",
-#else
.name = "uhid",
-#endif
.methods = uhid_methods,
.size = sizeof(struct uhid_softc),
};
diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c
index df810012b3f8..cba3f34053e5 100644
--- a/sys/dev/usb/input/usbhid.c
+++ b/sys/dev/usb/input/usbhid.c
@@ -114,6 +114,7 @@ struct usbhid_xfer_ctx {
void *cb_ctx;
int waiters;
bool influx;
+ bool no_readahead;
};
struct usbhid_softc {
@@ -272,7 +273,7 @@ usbhid_intr_handler_cb(struct usbhid_xfer_ctx *xfer_ctx)
sc->sc_intr_handler(sc->sc_intr_ctx, xfer_ctx->buf,
xfer_ctx->req.intr.actlen);
- return (0);
+ return (xfer_ctx->no_readahead ? ECANCELED : 0);
}
static int
@@ -430,6 +431,7 @@ usbhid_intr_start(device_t dev, device_t child __unused)
.cb = usbhid_intr_handler_cb,
.cb_ctx = sc,
.buf = sc->sc_intr_buf,
+ .no_readahead = hid_test_quirk(&sc->sc_hw, HQ_NO_READAHEAD),
};
sc->sc_xfer_ctx[POLL_XFER(USBHID_INTR_IN_DT)] = (struct usbhid_xfer_ctx) {
.req.intr.maxlen =
@@ -705,6 +707,10 @@ usbhid_ioctl(device_t dev, device_t child __unused, unsigned long cmd,
if (error == 0)
ucr->ucr_actlen = UGETW(req.ctrl.wLength);
break;
+ case USB_GET_DEVICEINFO:
+ error = usbd_fill_deviceinfo(sc->sc_udev,
+ (struct usb_device_info *)data);
+ break;
default:
error = EINVAL;
}
diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c
index 60c2d6745b3f..f0989972f49f 100644
--- a/sys/dev/usb/usb_device.c
+++ b/sys/dev/usb/usb_device.c
@@ -3111,3 +3111,51 @@ usbd_get_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep)
{
return (ep->ep_mode);
}
+
+/*------------------------------------------------------------------------*
+ * usbd_fill_deviceinfo
+ *
+ * This function dumps information about an USB device to the
+ * structure pointed to by the "di" argument.
+ *
+ * Returns:
+ * 0: Success
+ * Else: Failure
+ *------------------------------------------------------------------------*/
+int
+usbd_fill_deviceinfo(struct usb_device *udev, struct usb_device_info *di)
+{
+ struct usb_device *hub;
+
+ bzero(di, sizeof(di[0]));
+
+ di->udi_bus = device_get_unit(udev->bus->bdev);
+ di->udi_addr = udev->address;
+ di->udi_index = udev->device_index;
+ strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial));
+ strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor));
+ strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product));
+ usb_printbcd(di->udi_release, sizeof(di->udi_release),
+ UGETW(udev->ddesc.bcdDevice));
+ di->udi_vendorNo = UGETW(udev->ddesc.idVendor);
+ di->udi_productNo = UGETW(udev->ddesc.idProduct);
+ di->udi_releaseNo = UGETW(udev->ddesc.bcdDevice);
+ di->udi_class = udev->ddesc.bDeviceClass;
+ di->udi_subclass = udev->ddesc.bDeviceSubClass;
+ di->udi_protocol = udev->ddesc.bDeviceProtocol;
+ di->udi_config_no = udev->curr_config_no;
+ di->udi_config_index = udev->curr_config_index;
+ di->udi_power = udev->flags.self_powered ? 0 : udev->power;
+ di->udi_speed = udev->speed;
+ di->udi_mode = udev->flags.usb_mode;
+ di->udi_power_mode = udev->power_mode;
+ di->udi_suspended = udev->flags.peer_suspended;
+
+ hub = udev->parent_hub;
+ if (hub) {
+ di->udi_hubaddr = hub->address;
+ di->udi_hubindex = hub->device_index;
+ di->udi_hubport = udev->port_no;
+ }
+ return (0);
+}
diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c
index c0af27d77e5d..ccb0b2184ec4 100644
--- a/sys/dev/usb/usb_generic.c
+++ b/sys/dev/usb/usb_generic.c
@@ -831,42 +831,7 @@ ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd)
int
ugen_fill_deviceinfo(struct usb_fifo *f, struct usb_device_info *di)
{
- struct usb_device *udev;
- struct usb_device *hub;
-
- udev = f->udev;
-
- bzero(di, sizeof(di[0]));
-
- di->udi_bus = device_get_unit(udev->bus->bdev);
- di->udi_addr = udev->address;
- di->udi_index = udev->device_index;
- strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial));
- strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor));
- strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product));
- usb_printbcd(di->udi_release, sizeof(di->udi_release),
- UGETW(udev->ddesc.bcdDevice));
- di->udi_vendorNo = UGETW(udev->ddesc.idVendor);
- di->udi_productNo = UGETW(udev->ddesc.idProduct);
- di->udi_releaseNo = UGETW(udev->ddesc.bcdDevice);
- di->udi_class = udev->ddesc.bDeviceClass;
- di->udi_subclass = udev->ddesc.bDeviceSubClass;
- di->udi_protocol = udev->ddesc.bDeviceProtocol;
- di->udi_config_no = udev->curr_config_no;
- di->udi_config_index = udev->curr_config_index;
- di->udi_power = udev->flags.self_powered ? 0 : udev->power;
- di->udi_speed = udev->speed;
- di->udi_mode = udev->flags.usb_mode;
- di->udi_power_mode = udev->power_mode;
- di->udi_suspended = udev->flags.peer_suspended;
-
- hub = udev->parent_hub;
- if (hub) {
- di->udi_hubaddr = hub->address;
- di->udi_hubindex = hub->device_index;
- di->udi_hubport = udev->port_no;
- }
- return (0);
+ return (usbd_fill_deviceinfo(f->udev, di));
}
int
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 08d130aa2868..0826d9f078c4 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -38,6 +38,7 @@ struct usb_process;
struct usb_proc_msg;
struct usb_mbuf;
struct usb_fs_privdata;
+struct usb_device_info;
struct mbuf;
typedef enum { /* keep in sync with usb_errstr_table */
@@ -587,6 +588,8 @@ usb_error_t usbd_set_endpoint_mode(struct usb_device *udev,
struct usb_endpoint *ep, uint8_t ep_mode);
uint8_t usbd_get_endpoint_mode(struct usb_device *udev,
struct usb_endpoint *ep);
+int usbd_fill_deviceinfo(struct usb_device *udev,
+ struct usb_device_info *di);
const struct usb_device_id *usbd_lookup_id_by_info(
const struct usb_device_id *id, usb_size_t sizeof_id,
diff --git a/sys/dev/virtio/mmio/virtio_mmio.c b/sys/dev/virtio/mmio/virtio_mmio.c
index 5a81c8a24779..fe531fced998 100644
--- a/sys/dev/virtio/mmio/virtio_mmio.c
+++ b/sys/dev/virtio/mmio/virtio_mmio.c
@@ -53,7 +53,6 @@
#include <dev/virtio/virtqueue.h>
#include <dev/virtio/mmio/virtio_mmio.h>
-#include "virtio_mmio_if.h"
#include "virtio_bus_if.h"
#include "virtio_if.h"
@@ -79,7 +78,6 @@ static int vtmmio_alloc_virtqueues(device_t, int,
struct vq_alloc_info *);
static int vtmmio_setup_intr(device_t, enum intr_type);
static void vtmmio_stop(device_t);
-static void vtmmio_poll(device_t);
static int vtmmio_reinit(device_t, uint64_t);
static void vtmmio_reinit_complete(device_t);
static void vtmmio_notify_virtqueue(device_t, uint16_t, bus_size_t);
@@ -104,29 +102,11 @@ static void vtmmio_vq_intr(void *);
* I/O port read/write wrappers.
*/
#define vtmmio_write_config_1(sc, o, v) \
-do { \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \
- bus_write_1((sc)->res[0], (o), (v)); \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \
-} while (0)
+ bus_write_1((sc)->res[0], (o), (v))
#define vtmmio_write_config_2(sc, o, v) \
-do { \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \
- bus_write_2((sc)->res[0], (o), (v)); \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \
-} while (0)
+ bus_write_2((sc)->res[0], (o), (v))
#define vtmmio_write_config_4(sc, o, v) \
-do { \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_PREWRITE(sc->platform, (o), (v)); \
- bus_write_4((sc)->res[0], (o), (v)); \
- if (sc->platform != NULL) \
- VIRTIO_MMIO_NOTE(sc->platform, (o), (v)); \
-} while (0)
+ bus_write_4((sc)->res[0], (o), (v))
#define vtmmio_read_config_1(sc, o) \
bus_read_1((sc)->res[0], (o))
@@ -157,7 +137,6 @@ static device_method_t vtmmio_methods[] = {
DEVMETHOD(virtio_bus_alloc_virtqueues, vtmmio_alloc_virtqueues),
DEVMETHOD(virtio_bus_setup_intr, vtmmio_setup_intr),
DEVMETHOD(virtio_bus_stop, vtmmio_stop),
- DEVMETHOD(virtio_bus_poll, vtmmio_poll),
DEVMETHOD(virtio_bus_reinit, vtmmio_reinit),
DEVMETHOD(virtio_bus_reinit_complete, vtmmio_reinit_complete),
DEVMETHOD(virtio_bus_notify_vq, vtmmio_notify_virtqueue),
@@ -220,19 +199,9 @@ vtmmio_setup_intr(device_t dev, enum intr_type type)
{
struct vtmmio_softc *sc;
int rid;
- int err;
sc = device_get_softc(dev);
- if (sc->platform != NULL) {
- err = VIRTIO_MMIO_SETUP_INTR(sc->platform, sc->dev,
- vtmmio_vq_intr, sc);
- if (err == 0) {
- /* Okay we have backend-specific interrupts */
- return (0);
- }
- }
-
rid = 0;
sc->res[1] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
RF_ACTIVE);
@@ -597,17 +566,6 @@ vtmmio_stop(device_t dev)
vtmmio_reset(device_get_softc(dev));
}
-static void
-vtmmio_poll(device_t dev)
-{
- struct vtmmio_softc *sc;
-
- sc = device_get_softc(dev);
-
- if (sc->platform != NULL)
- VIRTIO_MMIO_POLL(sc->platform);
-}
-
static int
vtmmio_reinit(device_t dev, uint64_t features)
{
diff --git a/sys/dev/virtio/mmio/virtio_mmio.h b/sys/dev/virtio/mmio/virtio_mmio.h
index ac6a96c1c7fe..edcbf0519acc 100644
--- a/sys/dev/virtio/mmio/virtio_mmio.h
+++ b/sys/dev/virtio/mmio/virtio_mmio.h
@@ -37,7 +37,6 @@ struct vtmmio_virtqueue;
struct vtmmio_softc {
device_t dev;
- device_t platform;
struct resource *res[2];
uint64_t vtmmio_features;
diff --git a/sys/dev/virtio/mmio/virtio_mmio_fdt.c b/sys/dev/virtio/mmio/virtio_mmio_fdt.c
index 7fba8aad8db8..bb9ea8efbaeb 100644
--- a/sys/dev/virtio/mmio/virtio_mmio_fdt.c
+++ b/sys/dev/virtio/mmio/virtio_mmio_fdt.c
@@ -63,12 +63,10 @@
#include <dev/virtio/mmio/virtio_mmio.h>
static int vtmmio_fdt_probe(device_t);
-static int vtmmio_fdt_attach(device_t);
static device_method_t vtmmio_fdt_methods[] = {
/* Device interface. */
DEVMETHOD(device_probe, vtmmio_fdt_probe),
- DEVMETHOD(device_attach, vtmmio_fdt_attach),
DEVMETHOD_END
};
@@ -93,48 +91,3 @@ vtmmio_fdt_probe(device_t dev)
return (vtmmio_probe(dev));
}
-
-static int
-vtmmio_setup_platform(device_t dev, struct vtmmio_softc *sc)
-{
- phandle_t platform_node;
- struct fdt_ic *ic;
- phandle_t xref;
- phandle_t node;
-
- sc->platform = NULL;
-
- if ((node = ofw_bus_get_node(dev)) == -1)
- return (ENXIO);
-
- if (OF_searchencprop(node, "platform", &xref,
- sizeof(xref)) == -1) {
- return (ENXIO);
- }
-
- platform_node = OF_node_from_xref(xref);
-
- SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) {
- if (ic->iph == platform_node) {
- sc->platform = ic->dev;
- break;
- }
- }
-
- if (sc->platform == NULL) {
- /* No platform-specific device. Ignore it. */
- }
-
- return (0);
-}
-
-static int
-vtmmio_fdt_attach(device_t dev)
-{
- struct vtmmio_softc *sc;
-
- sc = device_get_softc(dev);
- vtmmio_setup_platform(dev, sc);
-
- return (vtmmio_attach(dev));
-}
diff --git a/sys/dev/virtio/mmio/virtio_mmio_if.m b/sys/dev/virtio/mmio/virtio_mmio_if.m
deleted file mode 100644
index baebbd9a0b1c..000000000000
--- a/sys/dev/virtio/mmio/virtio_mmio_if.m
+++ /dev/null
@@ -1,99 +0,0 @@
-#-
-# Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com>
-# All rights reserved.
-#
-# This software was developed by SRI International and the University of
-# Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
-# ("CTSRD"), as part of the DARPA CRASH research programme.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-#
-
-#include <sys/types.h>
-
-#
-# This is optional interface to virtio mmio backend.
-# Useful when backend is implemented not by the hardware but software, e.g.
-# by using another cpu core.
-#
-
-INTERFACE virtio_mmio;
-
-CODE {
- static int
- virtio_mmio_prewrite(device_t dev, size_t offset, int val)
- {
-
- return (1);
- }
-
- static int
- virtio_mmio_note(device_t dev, size_t offset, int val)
- {
-
- return (1);
- }
-
- static int
- virtio_mmio_setup_intr(device_t dev, device_t mmio_dev,
- void *handler, void *ih_user)
- {
-
- return (1);
- }
-};
-
-#
-# Inform backend we are going to write data at offset.
-#
-METHOD int prewrite {
- device_t dev;
- size_t offset;
- int val;
-} DEFAULT virtio_mmio_prewrite;
-
-#
-# Inform backend we have data wrotten to offset.
-#
-METHOD int note {
- device_t dev;
- size_t offset;
- int val;
-} DEFAULT virtio_mmio_note;
-
-#
-# Inform backend we are going to poll virtqueue.
-#
-METHOD int poll {
- device_t dev;
-};
-
-#
-# Setup backend-specific interrupts.
-#
-METHOD int setup_intr {
- device_t dev;
- device_t mmio_dev;
- void *handler;
- void *ih_user;
-} DEFAULT virtio_mmio_setup_intr;
diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c
index f938ba99ae53..3f30c8b68f4c 100644
--- a/sys/dev/virtio/random/virtio_random.c
+++ b/sys/dev/virtio/random/virtio_random.c
@@ -77,7 +77,7 @@ static struct virtio_feature_desc vtrnd_feature_desc[] = {
{ 0, NULL }
};
-static struct random_source random_vtrnd = {
+static const struct random_source random_vtrnd = {
.rs_ident = "VirtIO Entropy Adapter",
.rs_source = RANDOM_PURE_VIRTIO,
.rs_read = vtrnd_read,
diff --git a/sys/dev/virtio/virtio_bus_if.m b/sys/dev/virtio/virtio_bus_if.m
index 57ae90bdc917..4181b641faad 100644
--- a/sys/dev/virtio/virtio_bus_if.m
+++ b/sys/dev/virtio/virtio_bus_if.m
@@ -109,7 +109,3 @@ METHOD void write_device_config {
int len;
};
-METHOD void poll {
- device_t dev;
-};
-
diff --git a/sys/dev/virtio/virtqueue.c b/sys/dev/virtio/virtqueue.c
index 8cc3326dc08e..cc7a233d60ee 100644
--- a/sys/dev/virtio/virtqueue.c
+++ b/sys/dev/virtio/virtqueue.c
@@ -605,10 +605,8 @@ virtqueue_poll(struct virtqueue *vq, uint32_t *len)
{
void *cookie;
- VIRTIO_BUS_POLL(vq->vq_dev);
while ((cookie = virtqueue_dequeue(vq, len)) == NULL) {
cpu_spinwait();
- VIRTIO_BUS_POLL(vq->vq_dev);
}
return (cookie);
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index c4d0e6ba7b30..a496b41fcf6e 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -124,7 +124,7 @@ cd9660_access(struct vop_access_args *ap)
uid_t uid;
gid_t gid;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
/*
@@ -162,7 +162,7 @@ cd9660_open(struct vop_open_args *ap)
struct vnode *vp = ap->a_vp;
struct iso_node *ip = VTOI(vp);
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
vnode_create_vobject(vp, ip->i_size, ap->a_td);
@@ -242,7 +242,7 @@ cd9660_ioctl(struct vop_ioctl_args *ap)
VOP_UNLOCK(vp);
return (EBADF);
}
- if (vp->v_type == VCHR || vp->v_type == VBLK) {
+ if (VN_ISDEV(vp)) {
VOP_UNLOCK(vp);
return (EOPNOTSUPP);
}
@@ -280,7 +280,7 @@ cd9660_read(struct vop_read_args *ap)
int seqcount;
long size, n, on;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
seqcount = ap->a_ioflag >> IO_SEQSHIFT;
@@ -711,7 +711,7 @@ cd9660_strategy(struct vop_strategy_args *ap)
struct bufobj *bo;
ip = VTOI(vp);
- if (vp->v_type == VBLK || vp->v_type == VCHR)
+ if (VN_ISDEV(vp))
panic("cd9660_strategy: spec");
if (bp->b_blkno == bp->b_lblkno) {
bp->b_blkno = (ip->iso_start + bp->b_lblkno) <<
@@ -818,7 +818,7 @@ cd9660_getpages(struct vop_getpages_args *ap)
struct vnode *vp;
vp = ap->a_vp;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (use_buf_pager)
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index 064c10bd18b2..00389c927087 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -222,7 +222,7 @@ ext2_itimes_locked(struct vnode *vp)
ip = VTOI(vp);
if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0)
return;
- if ((vp->v_type == VBLK || vp->v_type == VCHR))
+ if (VN_ISDEV(vp))
ip->i_flag |= IN_LAZYMOD;
else
ip->i_flag |= IN_MODIFIED;
@@ -276,7 +276,7 @@ static int
ext2_open(struct vop_open_args *ap)
{
- if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
/*
@@ -360,7 +360,7 @@ ext2_getattr(struct vop_getattr_args *ap)
vap->va_nlink = ip->i_nlink;
vap->va_uid = ip->i_uid;
vap->va_gid = ip->i_gid;
- vap->va_rdev = ip->i_rdev;
+ vap->va_rdev = VN_ISDEV(vp) ? ip->i_rdev : NODEV;
vap->va_size = ip->i_size;
vap->va_atime.tv_sec = ip->i_atime;
vap->va_atime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_atimensec : 0;
@@ -1571,7 +1571,7 @@ ext2_strategy(struct vop_strategy_args *ap)
daddr_t blkno;
int error;
- if (vp->v_type == VBLK || vp->v_type == VCHR)
+ if (VN_ISDEV(vp))
panic("ext2_strategy: spec");
if (bp->b_blkno == bp->b_lblkno) {
if (VTOI(ap->a_vp)->i_flag & IN_E4EXTENTS)
@@ -1733,7 +1733,7 @@ ext2_deleteextattr(struct vop_deleteextattr_args *ap)
if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR))
return (EOPNOTSUPP);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
@@ -1771,7 +1771,7 @@ ext2_getextattr(struct vop_getextattr_args *ap)
if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR))
return (EOPNOTSUPP);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
@@ -1814,7 +1814,7 @@ ext2_listextattr(struct vop_listextattr_args *ap)
if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR))
return (EOPNOTSUPP);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
@@ -1855,7 +1855,7 @@ ext2_setextattr(struct vop_setextattr_args *ap)
if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR))
return (EOPNOTSUPP);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index b782146b7278..de60a4717dd4 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -1748,7 +1748,7 @@ fuse_vnop_open(struct vop_open_args *ap)
if (fuse_isdeadfs(vp))
return (EXTERROR(ENXIO, "This FUSE session is about "
"to be closed"));
- if (vp->v_type == VCHR || vp->v_type == VBLK || vp->v_type == VFIFO)
+ if (VN_ISDEV(vp) || vp->v_type == VFIFO)
return (EXTERROR(EOPNOTSUPP, "Unsupported vnode type",
vp->v_type));
if ((a_mode & (FREAD | FWRITE | FEXEC)) == 0)
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index bd6107187966..5a019b4989cf 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -909,15 +909,6 @@ int nfsmsleep(void *, void *, int, const char *, struct timespec *);
#define NFSBZERO(s, l) bzero((s), (l))
/*
- * Some queue.h files don't have these dfined in them.
- */
-#ifndef LIST_END
-#define LIST_END(head) NULL
-#define SLIST_END(head) NULL
-#define TAILQ_END(head) NULL
-#endif
-
-/*
* This must be defined to be a global variable that increments once
* per second, but never stops or goes backwards, even when a "date"
* command changes the TOD clock. It is used for delta times for
@@ -1038,9 +1029,6 @@ void ncl_copy_vattr(struct vattr *dst, struct vattr *src);
#define NFSDECRGLOBAL(a) ((a)--)
/*
- * Assorted funky stuff to make things work under Darwin8.
- */
-/*
* These macros checks for a field in vattr being set.
*/
#define NFSATTRISSET(t, v, a) ((v)->a != (t)VNOVAL)
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 6824ee6ef13d..52f72dc43c3f 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1782,7 +1782,7 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
int error = 0, attrflag, dattrflag;
u_int32_t rdev;
- if (vap->va_type == VCHR || vap->va_type == VBLK)
+ if (VATTR_ISDEV(vap))
rdev = vap->va_rdev;
else if (vap->va_type == VFIFO || vap->va_type == VSOCK)
rdev = 0xffffffff;
diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c
index 227e2b93883e..acb73973d93b 100644
--- a/sys/fs/p9fs/p9fs_vnops.c
+++ b/sys/fs/p9fs/p9fs_vnops.c
@@ -1326,7 +1326,7 @@ p9fs_read(struct vop_read_args *ap)
np = P9FS_VTON(vp);
error = 0;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (vp->v_type != VREG)
return (EISDIR);
diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c
index afb8e05f5929..acf18de5ab51 100644
--- a/sys/fs/tarfs/tarfs_vnops.c
+++ b/sys/fs/tarfs/tarfs_vnops.c
@@ -208,8 +208,7 @@ tarfs_getattr(struct vop_getattr_args *ap)
vap->va_birthtime = tnp->birthtime;
vap->va_gen = tnp->gen;
vap->va_flags = tnp->flags;
- vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
- tnp->rdev : NODEV;
+ vap->va_rdev = VN_ISDEV(vp) ? tnp->rdev : NODEV;
vap->va_bytes = round_page(tnp->physize);
vap->va_filerev = 0;
@@ -515,7 +514,7 @@ tarfs_read(struct vop_read_args *ap)
uiop = ap->a_uio;
vp = ap->a_vp;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (vp->v_type != VREG)
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 1237f6b92cdb..dd281d18d87d 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -551,7 +551,7 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, __enum_uint8(vtype)
MPASS(IMPLIES(tmp->tm_root == NULL, parent == NULL && type == VDIR));
MPASS((type == VLNK) ^ (target == NULL));
- MPASS((type == VBLK || type == VCHR) ^ (rdev == VNOVAL));
+ MPASS(VTYPE_ISDEV(type) ^ (rdev == VNOVAL));
if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
return (ENOSPC);
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index 79b6c8b2e6a1..0f4ea2fdc28c 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -280,8 +280,7 @@ tmpfs_mknod(struct vop_mknod_args *v)
struct componentname *cnp = v->a_cnp;
struct vattr *vap = v->a_vap;
- if (vap->va_type != VBLK && vap->va_type != VCHR &&
- vap->va_type != VFIFO)
+ if (!VATTR_ISDEV(vap) && vap->va_type != VFIFO)
return (EINVAL);
return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL));
@@ -462,8 +461,7 @@ tmpfs_stat(struct vop_stat_args *v)
sb->st_nlink = node->tn_links;
sb->st_uid = node->tn_uid;
sb->st_gid = node->tn_gid;
- sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
- node->tn_rdev : NODEV;
+ sb->st_rdev = VN_ISDEV(vp) ? node->tn_rdev : NODEV;
sb->st_size = node->tn_size;
sb->st_atim.tv_sec = node->tn_atime.tv_sec;
sb->st_atim.tv_nsec = node->tn_atime.tv_nsec;
@@ -521,8 +519,7 @@ tmpfs_getattr(struct vop_getattr_args *v)
vap->va_birthtime = node->tn_birthtime;
vap->va_gen = node->tn_gen;
vap->va_flags = node->tn_flags;
- vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
- node->tn_rdev : NODEV;
+ vap->va_rdev = VN_ISDEV(vp) ? node->tn_rdev : NODEV;
if (vp->v_type == VREG) {
#ifdef __ILP32__
vm_object_t obj = node->tn_reg.tn_aobj;
@@ -1918,7 +1915,7 @@ tmpfs_deleteextattr(struct vop_deleteextattr_args *ap)
node = VP_TO_TMPFS_NODE(vp);
tmp = VFS_TO_TMPFS(vp->v_mount);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
ap->a_cred, ap->a_td, VWRITE);
@@ -1956,7 +1953,7 @@ tmpfs_getextattr(struct vop_getextattr_args *ap)
int error;
node = VP_TO_TMPFS_NODE(vp);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
ap->a_cred, ap->a_td, VREAD);
@@ -1993,7 +1990,7 @@ tmpfs_listextattr(struct vop_listextattr_args *ap)
int error;
node = VP_TO_TMPFS_NODE(vp);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
ap->a_cred, ap->a_td, VREAD);
@@ -2037,7 +2034,7 @@ tmpfs_setextattr(struct vop_setextattr_args *ap)
tmp = VFS_TO_TMPFS(vp->v_mount);
attr_size = ap->a_uio->uio_resid;
diff = 0;
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
ap->a_cred, ap->a_td, VWRITE);
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index 41125f6478ac..88e44b335b29 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1046,7 +1046,7 @@ g_part_ctl_create(struct gctl_req *req, struct g_part_parms *gpp)
/*
* Synthesize a disk geometry. Some partitioning schemes
* depend on it and since some file systems need it even
- * when the partitition scheme doesn't, we do it here in
+ * when the partition scheme doesn't, we do it here in
* scheme-independent code.
*/
g_part_geometry(table, cp, pp->mediasize / pp->sectorsize);
@@ -1539,7 +1539,7 @@ g_part_ctl_undo(struct gctl_req *req, struct g_part_parms *gpp)
/*
* Synthesize a disk geometry. Some partitioning schemes
* depend on it and since some file systems need it even
- * when the partitition scheme doesn't, we do it here in
+ * when the partition scheme doesn't, we do it here in
* scheme-independent code.
*/
pp = cp->provider;
@@ -2023,7 +2023,7 @@ g_part_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
/*
* Synthesize a disk geometry. Some partitioning schemes
* depend on it and since some file systems need it even
- * when the partitition scheme doesn't, we do it here in
+ * when the partition scheme doesn't, we do it here in
* scheme-independent code.
*/
g_part_geometry(table, cp, pp->mediasize / pp->sectorsize);
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index f577cd07ac7c..88b8967cd693 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -343,3 +343,4 @@ options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
options IICHID_SAMPLING # Workaround missing GPIO INTR support
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
diff --git a/sys/isa/isareg.h b/sys/isa/isareg.h
index e89136c7e1e5..8b2d55608078 100644
--- a/sys/isa/isareg.h
+++ b/sys/isa/isareg.h
@@ -49,7 +49,7 @@
#define IO_RTC 0x070 /* RTC */
#define IO_ICU2 0x0A0 /* 8259A Interrupt Controller #2 */
-#define IO_MDA 0x3B0 /* Monochome Adapter */
+#define IO_MDA 0x3B0 /* Monochrome Adapter */
#define IO_VGA 0x3C0 /* E/VGA Ports */
#define IO_CGA 0x3D0 /* CGA Ports */
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index fa655c43d155..19c39e42bafa 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -5170,7 +5170,7 @@ bufstrategy(struct bufobj *bo, struct buf *bp)
vp = bp->b_vp;
KASSERT(vp == bo->bo_private, ("Inconsistent vnode bufstrategy"));
- KASSERT(vp->v_type != VCHR && vp->v_type != VBLK,
+ KASSERT(!VN_ISDEV(vp),
("Wrong vnode in bufstrategy(bp=%p, vp=%p)", bp, vp));
i = VOP_STRATEGY(vp, bp);
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index b805e147bd62..bf3ed9d515dc 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2839,7 +2839,7 @@ setfflags(struct thread *td, struct vnode *vp, u_long flags)
* if they are allowed to set flags and programs assume that
* chown can't fail when done as root.
*/
- if (vp->v_type == VCHR || vp->v_type == VBLK) {
+ if (VN_ISDEV(vp)) {
error = priv_check(td, PRIV_VFS_CHFLAGS_DEV);
if (error != 0)
return (error);
diff --git a/sys/modules/hid/Makefile b/sys/modules/hid/Makefile
index 56c3267d8684..10720570deb7 100644
--- a/sys/modules/hid/Makefile
+++ b/sys/modules/hid/Makefile
@@ -17,6 +17,7 @@ SUBDIR += \
hsctrl \
ietp \
ps4dshock \
+ u2f \
xb360gp
.include <bsd.subdir.mk>
diff --git a/sys/modules/hid/u2f/Makefile b/sys/modules/hid/u2f/Makefile
new file mode 100644
index 000000000000..227e7154035b
--- /dev/null
+++ b/sys/modules/hid/u2f/Makefile
@@ -0,0 +1,8 @@
+.PATH: ${SRCTOP}/sys/dev/hid
+
+KMOD= u2f
+SRCS= u2f.c
+SRCS+= opt_hid.h opt_usb.h
+SRCS+= bus_if.h device_if.h
+
+.include <bsd.kmod.mk>
diff --git a/sys/modules/ix/Makefile b/sys/modules/ix/Makefile
index ad9f36e054e3..aec6eaabffdd 100644
--- a/sys/modules/ix/Makefile
+++ b/sys/modules/ix/Makefile
@@ -7,7 +7,7 @@ SRCS += if_ix.c if_bypass.c if_fdir.c if_sriov.c ix_txrx.c ixgbe_osdep.c
# Shared source
SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
-SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c
+SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c ixgbe_e610.c
CFLAGS+= -I${SRCTOP}/sys/dev/ixgbe
.include <bsd.kmod.mk>
diff --git a/sys/modules/ixv/Makefile b/sys/modules/ixv/Makefile
index 1b4431ac11cd..e7066bb7829b 100644
--- a/sys/modules/ixv/Makefile
+++ b/sys/modules/ixv/Makefile
@@ -7,7 +7,7 @@ SRCS += if_ixv.c if_fdir.c ix_txrx.c ixgbe_osdep.c
# Shared source
SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
-SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c
+SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c ixgbe_e610.c
CFLAGS+= -I${SRCTOP}/sys/dev/ixgbe
.include <bsd.kmod.mk>
diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile
index 9739ede11073..822be639da43 100644
--- a/sys/modules/rtw88/Makefile
+++ b/sys/modules/rtw88/Makefile
@@ -43,6 +43,7 @@ SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h
CFLAGS+= -DKBUILD_MODNAME='"rtw88"'
+CFLAGS+= -DLINUXKPI_VERSION=61400
CFLAGS+= -I${DEVRTW88DIR}
CFLAGS+= ${LINUXKPI_INCLUDES}
diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile
index 09580f288c62..e66f85c3ac17 100644
--- a/sys/modules/rtw89/Makefile
+++ b/sys/modules/rtw89/Makefile
@@ -39,6 +39,7 @@ SRCS+= ${LINUXKPI_GENSRCS}
SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
CFLAGS+= -DKBUILD_MODNAME='"rtw89"'
+CFLAGS+= -DLINUXKPI_VERSION=61400
CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
CFLAGS+= -I${DEVRTW89DIR}
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index 2dd9e2be3f56..ec531ed646a7 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -15,6 +15,7 @@ KMOD= zfs
${SRCDIR}/icp/asm-ppc64/sha2 \
${SRCDIR}/icp/asm-ppc64/blake3 \
${SRCDIR}/icp/asm-x86_64/blake3 \
+ ${SRCDIR}/icp/asm-x86_64/modes \
${SRCDIR}/icp/asm-x86_64/sha2 \
${SRCDIR}/os/freebsd/spl \
${SRCDIR}/os/freebsd/zfs \
@@ -40,7 +41,8 @@ CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \
- -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW
+ -DHAVE_AVX -DHAVE_AVX2 -DHAVE_AVX512F -DHAVE_AVX512VL -DHAVE_AVX512BW \
+ -DHAVE_VAES -DHAVE_VPCLMULQDQ
.endif
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
@@ -82,6 +84,9 @@ SRCS+= blake3_avx2.S \
blake3_avx512.S \
blake3_sse2.S \
blake3_sse41.S
+
+#icp/asm-x86_64/modes
+SRCS+= aesni-gcm-avx2-vaes.S
.endif
#icp/algs/sha2
diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h
index c79c9eaa1a5f..12274bcceea1 100644
--- a/sys/modules/zfs/zfs_config.h
+++ b/sys/modules/zfs/zfs_config.h
@@ -704,6 +704,11 @@
/* iops->setattr() takes struct user_namespace* */
/* #undef HAVE_USERNS_IOPS_SETATTR */
+#ifdef __amd64__
+/* Define if host toolchain supports VAES */
+#define HAVE_VAES 1
+#endif
+
/* fops->clone_file_range() is available */
/* #undef HAVE_VFS_CLONE_FILE_RANGE */
@@ -743,6 +748,11 @@
/* __vmalloc page flags exists */
/* #undef HAVE_VMALLOC_PAGE_KERNEL */
+#ifdef __amd64__
+/* Define if host toolchain supports VPCLMULQDQ */
+#define HAVE_VPCLMULQDQ 1
+#endif
+
/* int (*writepage_t)() takes struct folio* */
/* #undef HAVE_WRITEPAGE_T_FOLIO */
@@ -830,7 +840,7 @@
/* #undef ZFS_DEVICE_MINOR */
/* Define the project alias string. */
-#define ZFS_META_ALIAS "zfs-2.3.99-539-FreeBSD_g1d0b94c4e"
+#define ZFS_META_ALIAS "zfs-2.3.99-571-FreeBSD_ga9410ccbd"
/* Define the project author. */
#define ZFS_META_AUTHOR "OpenZFS"
@@ -839,7 +849,7 @@
/* #undef ZFS_META_DATA */
/* Define the maximum compatible kernel version. */
-#define ZFS_META_KVER_MAX "6.15"
+#define ZFS_META_KVER_MAX "6.16"
/* Define the minimum compatible kernel version. */
#define ZFS_META_KVER_MIN "4.18"
@@ -860,7 +870,7 @@
#define ZFS_META_NAME "zfs"
/* Define the project release. */
-#define ZFS_META_RELEASE "539-FreeBSD_g1d0b94c4e"
+#define ZFS_META_RELEASE "571-FreeBSD_ga9410ccbd"
/* Define the project version. */
#define ZFS_META_VERSION "2.3.99"
diff --git a/sys/modules/zfs/zfs_gitrev.h b/sys/modules/zfs/zfs_gitrev.h
index 20fd58c620b5..5c265cf5b08e 100644
--- a/sys/modules/zfs/zfs_gitrev.h
+++ b/sys/modules/zfs/zfs_gitrev.h
@@ -1 +1 @@
-#define ZFS_META_GITREV "zfs-2.3.99-539-g1d0b94c4e"
+#define ZFS_META_GITREV "zfs-2.3.99-571-ga9410ccbd"
diff --git a/sys/net/if_clone.h b/sys/net/if_clone.h
index 5a74ffa1cc2f..d780e49af25f 100644
--- a/sys/net/if_clone.h
+++ b/sys/net/if_clone.h
@@ -153,7 +153,7 @@ int if_clone_destroy(const char *);
int if_clone_list(struct if_clonereq *);
void if_clone_restoregroup(struct ifnet *);
-/* The below interfaces are used only by epair(4). */
+/* The below interfaces are used only by epair(4) and tun(4)/tap(4). */
void if_clone_addif(struct if_clone *, struct ifnet *);
int if_clone_destroyif(struct if_clone *, struct ifnet *);
diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h
index 1efc220aa8e1..e99df0b85ccf 100644
--- a/sys/net/if_pfsync.h
+++ b/sys/net/if_pfsync.h
@@ -160,8 +160,8 @@ struct pfsync_ins_ack {
struct pfsync_upd_c {
u_int64_t id;
- struct pfsync_state_peer src;
- struct pfsync_state_peer dst;
+ struct pf_state_peer_export src;
+ struct pf_state_peer_export dst;
u_int32_t creatorid;
u_int32_t expire;
u_int8_t timeout;
diff --git a/sys/net/if_tap.h b/sys/net/if_tap.h
index d84cd2eba6f3..8297b8d9e3d2 100644
--- a/sys/net/if_tap.h
+++ b/sys/net/if_tap.h
@@ -57,6 +57,8 @@
#define TAPGIFNAME TUNGIFNAME
#define TAPSVNETHDR _IOW('t', 91, int)
#define TAPGVNETHDR _IOR('t', 94, int)
+#define TAPSTRANSIENT TUNSTRANSIENT
+#define TAPGTRANSIENT TUNGTRANSIENT
/* VMware ioctl's */
#define VMIO_SIOCSIFFLAGS _IOWINT('V', 0)
diff --git a/sys/net/if_tun.h b/sys/net/if_tun.h
index a8fb61db45a2..ccdc25944823 100644
--- a/sys/net/if_tun.h
+++ b/sys/net/if_tun.h
@@ -43,5 +43,7 @@ struct tuninfo {
#define TUNSIFPID _IO('t', 95)
#define TUNSIFHEAD _IOW('t', 96, int)
#define TUNGIFHEAD _IOR('t', 97, int)
+#define TUNSTRANSIENT _IOW('t', 98, int)
+#define TUNGTRANSIENT _IOR('t', 99, int)
#endif /* !_NET_IF_TUN_H_ */
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
index 5e6f65c04b2f..c8dbb6aa8893 100644
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -132,6 +132,7 @@ struct tuntap_softc {
#define TUN_DYING 0x0200
#define TUN_L2 0x0400
#define TUN_VMNET 0x0800
+#define TUN_TRANSIENT 0x1000
#define TUN_DRIVER_IDENT_MASK (TUN_L2 | TUN_VMNET)
#define TUN_READY (TUN_OPEN | TUN_INITED)
@@ -443,6 +444,18 @@ tuntap_name2info(const char *name, int *outunit, int *outflags)
return (0);
}
+static struct if_clone *
+tuntap_cloner_from_flags(int tun_flags)
+{
+
+ for (u_int i = 0; i < NDRV; i++)
+ if ((tun_flags & TUN_DRIVER_IDENT_MASK) ==
+ tuntap_drivers[i].ident_flags)
+ return (V_tuntap_driver_cloners[i]);
+
+ return (NULL);
+}
+
/*
* Get driver information from a set of flags specified. Masks the identifying
* part of the flags and compares it against all of the available
@@ -615,19 +628,39 @@ out:
CURVNET_RESTORE();
}
-static void
-tun_destroy(struct tuntap_softc *tp)
+static int
+tun_destroy(struct tuntap_softc *tp, bool may_intr)
{
+ int error;
TUN_LOCK(tp);
+
+ /*
+ * Transient tunnels may have set TUN_DYING if we're being destroyed as
+ * a result of the last close, which we'll allow.
+ */
+ MPASS((tp->tun_flags & (TUN_DYING | TUN_TRANSIENT)) != TUN_DYING);
tp->tun_flags |= TUN_DYING;
- if (tp->tun_busy != 0)
- cv_wait_unlock(&tp->tun_cv, &tp->tun_mtx);
- else
- TUN_UNLOCK(tp);
+ error = 0;
+ while (tp->tun_busy != 0) {
+ if (may_intr)
+ error = cv_wait_sig(&tp->tun_cv, &tp->tun_mtx);
+ else
+ cv_wait(&tp->tun_cv, &tp->tun_mtx);
+ if (error != 0) {
+ tp->tun_flags &= ~TUN_DYING;
+ TUN_UNLOCK(tp);
+ return (error);
+ }
+ }
+ TUN_UNLOCK(tp);
CURVNET_SET(TUN2IFP(tp)->if_vnet);
+ mtx_lock(&tunmtx);
+ TAILQ_REMOVE(&tunhead, tp, tun_list);
+ mtx_unlock(&tunmtx);
+
/* destroy_dev will take care of any alias. */
destroy_dev(tp->tun_dev);
seldrain(&tp->tun_rsel);
@@ -648,6 +681,8 @@ tun_destroy(struct tuntap_softc *tp)
cv_destroy(&tp->tun_cv);
free(tp, M_TUN);
CURVNET_RESTORE();
+
+ return (0);
}
static int
@@ -655,12 +690,7 @@ tun_clone_destroy(struct if_clone *ifc __unused, struct ifnet *ifp, uint32_t fla
{
struct tuntap_softc *tp = ifp->if_softc;
- mtx_lock(&tunmtx);
- TAILQ_REMOVE(&tunhead, tp, tun_list);
- mtx_unlock(&tunmtx);
- tun_destroy(tp);
-
- return (0);
+ return (tun_destroy(tp, true));
}
static void
@@ -702,9 +732,9 @@ tun_uninit(const void *unused __unused)
mtx_lock(&tunmtx);
while ((tp = TAILQ_FIRST(&tunhead)) != NULL) {
- TAILQ_REMOVE(&tunhead, tp, tun_list);
mtx_unlock(&tunmtx);
- tun_destroy(tp);
+ /* tun_destroy() will remove it from the tailq. */
+ tun_destroy(tp, false);
mtx_lock(&tunmtx);
}
mtx_unlock(&tunmtx);
@@ -1217,6 +1247,23 @@ out:
tun_vnethdr_set(ifp, 0);
tun_unbusy_locked(tp);
+ if ((tp->tun_flags & TUN_TRANSIENT) != 0) {
+ struct if_clone *cloner;
+ int error __diagused;
+
+ /* Mark it busy so that nothing can re-open it. */
+ tp->tun_flags |= TUN_DYING;
+ TUN_UNLOCK(tp);
+
+ CURVNET_SET_QUIET(ifp->if_home_vnet);
+ cloner = tuntap_cloner_from_flags(tp->tun_flags);
+ CURVNET_RESTORE();
+
+ error = if_clone_destroyif(cloner, ifp);
+ MPASS(error == 0 || error == EINTR || error == ERESTART);
+ return;
+ }
+
TUN_UNLOCK(tp);
}
@@ -1668,6 +1715,19 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
case TUNGDEBUG:
*(int *)data = tundebug;
break;
+ case TUNSTRANSIENT:
+ TUN_LOCK(tp);
+ if (*(int *)data)
+ tp->tun_flags |= TUN_TRANSIENT;
+ else
+ tp->tun_flags &= ~TUN_TRANSIENT;
+ TUN_UNLOCK(tp);
+ break;
+ case TUNGTRANSIENT:
+ TUN_LOCK(tp);
+ *(int *)data = (tp->tun_flags & TUN_TRANSIENT) != 0;
+ TUN_UNLOCK(tp);
+ break;
case FIONBIO:
break;
case FIOASYNC:
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 2b43f6f19051..98c59e5de988 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -142,6 +142,7 @@ struct iflib_ctx;
static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid);
static void iflib_timer(void *arg);
static void iflib_tqg_detach(if_ctx_t ctx);
+static int iflib_simple_transmit(if_t ifp, struct mbuf *m);
typedef struct iflib_filter_info {
driver_filter_t *ifi_filter;
@@ -198,6 +199,7 @@ struct iflib_ctx {
uint8_t ifc_sysctl_use_logical_cores;
uint16_t ifc_sysctl_extra_msix_vectors;
bool ifc_cpus_are_physical_cores;
+ bool ifc_sysctl_simple_tx;
qidx_t ifc_sysctl_ntxds[8];
qidx_t ifc_sysctl_nrxds[8];
@@ -725,6 +727,7 @@ static void iflib_free_intr_mem(if_ctx_t ctx);
#ifndef __NO_STRICT_ALIGNMENT
static struct mbuf *iflib_fixup_rx(struct mbuf *m);
#endif
+static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh);
static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets =
SLIST_HEAD_INITIALIZER(cpu_offsets);
@@ -2624,8 +2627,10 @@ iflib_stop(if_ctx_t ctx)
#endif /* DEV_NETMAP */
CALLOUT_UNLOCK(txq);
- /* clean any enqueued buffers */
- iflib_ifmp_purge(txq);
+ if (!ctx->ifc_sysctl_simple_tx) {
+ /* clean any enqueued buffers */
+ iflib_ifmp_purge(txq);
+ }
/* Free any existing tx buffers. */
for (j = 0; j < txq->ift_size; j++) {
iflib_txsd_free(ctx, txq, j);
@@ -3635,13 +3640,16 @@ defrag:
* cxgb
*/
if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) {
- txq->ift_no_desc_avail++;
- bus_dmamap_unload(buf_tag, map);
- DBG_COUNTER_INC(encap_txq_avail_fail);
- DBG_COUNTER_INC(encap_txd_encap_fail);
- if ((txq->ift_task.gt_task.ta_flags & TASK_ENQUEUED) == 0)
- GROUPTASK_ENQUEUE(&txq->ift_task);
- return (ENOBUFS);
+ (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx));
+ if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) {
+ txq->ift_no_desc_avail++;
+ bus_dmamap_unload(buf_tag, map);
+ DBG_COUNTER_INC(encap_txq_avail_fail);
+ DBG_COUNTER_INC(encap_txd_encap_fail);
+ if ((txq->ift_task.gt_task.ta_flags & TASK_ENQUEUED) == 0)
+ GROUPTASK_ENQUEUE(&txq->ift_task);
+ return (ENOBUFS);
+ }
}
/*
* On Intel cards we can greatly reduce the number of TX interrupts
@@ -4014,6 +4022,12 @@ _task_fn_tx(void *context)
netmap_tx_irq(ifp, txq->ift_id))
goto skip_ifmp;
#endif
+ if (ctx->ifc_sysctl_simple_tx) {
+ mtx_lock(&txq->ift_mtx);
+ (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx));
+ mtx_unlock(&txq->ift_mtx);
+ goto skip_ifmp;
+ }
#ifdef ALTQ
if (if_altq_is_enabled(ifp))
iflib_altq_if_start(ifp);
@@ -4027,9 +4041,8 @@ _task_fn_tx(void *context)
*/
if (abdicate)
ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
-#ifdef DEV_NETMAP
+
skip_ifmp:
-#endif
if (ctx->ifc_flags & IFC_LEGACY)
IFDI_INTR_ENABLE(ctx);
else
@@ -5131,7 +5144,14 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct
scctx = &ctx->ifc_softc_ctx;
ifp = ctx->ifc_ifp;
-
+ if (ctx->ifc_sysctl_simple_tx) {
+#ifndef ALTQ
+ if_settransmitfn(ifp, iflib_simple_transmit);
+ device_printf(dev, "using simple if_transmit\n");
+#else
+ device_printf(dev, "ALTQ prevents using simple if_transmit\n");
+#endif
+ }
iflib_reset_qvalues(ctx);
IFNET_WLOCK();
CTX_LOCK(ctx);
@@ -6766,6 +6786,9 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx)
SYSCTL_ADD_CONST_STRING(ctx_list, oid_list, OID_AUTO, "driver_version",
CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, "driver version");
+ SYSCTL_ADD_BOOL(ctx_list, oid_list, OID_AUTO, "simple_tx",
+ CTLFLAG_RDTUN, &ctx->ifc_sysctl_simple_tx, 0,
+ "use simple tx ring");
SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_ntxqs",
CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0,
"# of txqs to use, 0 => use default #");
@@ -7088,3 +7111,48 @@ iflib_debugnet_poll(if_t ifp, int count)
return (0);
}
#endif /* DEBUGNET */
+
+
+static inline iflib_txq_t
+iflib_simple_select_queue(if_ctx_t ctx, struct mbuf *m)
+{
+ int qidx;
+
+ if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m))
+ qidx = QIDX(ctx, m);
+ else
+ qidx = NTXQSETS(ctx) + FIRST_QSET(ctx) - 1;
+ return (&ctx->ifc_txqs[qidx]);
+}
+
+static int
+iflib_simple_transmit(if_t ifp, struct mbuf *m)
+{
+ if_ctx_t ctx;
+ iflib_txq_t txq;
+ int error;
+ int bytes_sent = 0, pkt_sent = 0, mcast_sent = 0;
+
+
+ ctx = if_getsoftc(ifp);
+ if ((if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
+ IFF_DRV_RUNNING)
+ return (EBUSY);
+ txq = iflib_simple_select_queue(ctx, m);
+ mtx_lock(&txq->ift_mtx);
+ error = iflib_encap(txq, &m);
+ if (error == 0) {
+ pkt_sent++;
+ bytes_sent += m->m_pkthdr.len;
+ mcast_sent += !!(m->m_flags & M_MCAST);
+ (void)iflib_txd_db_check(txq, true);
+ }
+ (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx));
+ mtx_unlock(&txq->ift_mtx);
+ if_inc_counter(ifp, IFCOUNTER_OBYTES, bytes_sent);
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent);
+ if (mcast_sent)
+ if_inc_counter(ifp, IFCOUNTER_OMCASTS, mcast_sent);
+
+ return (error);
+}
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index c397f0b67896..d6c13470f2eb 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1020,7 +1020,7 @@ struct pf_state_scrub_export {
#define PF_SCRUB_FLAG_VALID 0x01
uint8_t scrub_flag;
uint32_t pfss_ts_mod; /* timestamp modulation */
-};
+} __packed;
struct pf_state_key_export {
struct pf_addr addr[2];
@@ -1037,7 +1037,7 @@ struct pf_state_peer_export {
uint8_t state; /* active state level */
uint8_t wscale; /* window scaling factor */
uint8_t dummy[6];
-};
+} __packed;
_Static_assert(sizeof(struct pf_state_peer_export) == 32, "size incorrect");
struct pf_state_export {
@@ -1179,26 +1179,6 @@ struct pf_test_ctx {
* Unified state structures for pulling states out of the kernel
* used by pfsync(4) and the pf(4) ioctl.
*/
-struct pfsync_state_scrub {
- u_int16_t pfss_flags;
- u_int8_t pfss_ttl; /* stashed TTL */
-#define PFSYNC_SCRUB_FLAG_VALID 0x01
- u_int8_t scrub_flag;
- u_int32_t pfss_ts_mod; /* timestamp modulation */
-} __packed;
-
-struct pfsync_state_peer {
- struct pfsync_state_scrub scrub; /* state is scrubbed */
- u_int32_t seqlo; /* Max sequence number sent */
- u_int32_t seqhi; /* Max the other end ACKd + win */
- u_int32_t seqdiff; /* Sequence number modulator */
- u_int16_t max_win; /* largest window (pre scaling) */
- u_int16_t mss; /* Maximum segment size option */
- u_int8_t state; /* active state level */
- u_int8_t wscale; /* window scaling factor */
- u_int8_t pad[6];
-} __packed;
-
struct pfsync_state_key {
struct pf_addr addr[2];
u_int16_t port[2];
@@ -1208,8 +1188,8 @@ struct pfsync_state_1301 {
u_int64_t id;
char ifname[IFNAMSIZ];
struct pfsync_state_key key[2];
- struct pfsync_state_peer src;
- struct pfsync_state_peer dst;
+ struct pf_state_peer_export src;
+ struct pf_state_peer_export dst;
struct pf_addr rt_addr;
u_int32_t rule;
u_int32_t anchor;
@@ -1235,8 +1215,8 @@ struct pfsync_state_1400 {
u_int64_t id;
char ifname[IFNAMSIZ];
struct pfsync_state_key key[2];
- struct pfsync_state_peer src;
- struct pfsync_state_peer dst;
+ struct pf_state_peer_export src;
+ struct pf_state_peer_export dst;
struct pf_addr rt_addr;
u_int32_t rule;
u_int32_t anchor;
@@ -1323,39 +1303,10 @@ extern pflog_packet_t *pflog_packet_ptr;
/* for copies to/from network byte order */
/* ioctl interface also uses network byte order */
-#define pf_state_peer_hton(s,d) do { \
- (d)->seqlo = htonl((s)->seqlo); \
- (d)->seqhi = htonl((s)->seqhi); \
- (d)->seqdiff = htonl((s)->seqdiff); \
- (d)->max_win = htons((s)->max_win); \
- (d)->mss = htons((s)->mss); \
- (d)->state = (s)->state; \
- (d)->wscale = (s)->wscale; \
- if ((s)->scrub) { \
- (d)->scrub.pfss_flags = \
- htons((s)->scrub->pfss_flags & PFSS_TIMESTAMP); \
- (d)->scrub.pfss_ttl = (s)->scrub->pfss_ttl; \
- (d)->scrub.pfss_ts_mod = htonl((s)->scrub->pfss_ts_mod);\
- (d)->scrub.scrub_flag = PFSYNC_SCRUB_FLAG_VALID; \
- } \
-} while (0)
-
-#define pf_state_peer_ntoh(s,d) do { \
- (d)->seqlo = ntohl((s)->seqlo); \
- (d)->seqhi = ntohl((s)->seqhi); \
- (d)->seqdiff = ntohl((s)->seqdiff); \
- (d)->max_win = ntohs((s)->max_win); \
- (d)->mss = ntohs((s)->mss); \
- (d)->state = (s)->state; \
- (d)->wscale = (s)->wscale; \
- if ((s)->scrub.scrub_flag == PFSYNC_SCRUB_FLAG_VALID && \
- (d)->scrub != NULL) { \
- (d)->scrub->pfss_flags = \
- ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \
- (d)->scrub->pfss_ttl = (s)->scrub.pfss_ttl; \
- (d)->scrub->pfss_ts_mod = ntohl((s)->scrub.pfss_ts_mod);\
- } \
-} while (0)
+void pf_state_peer_hton(const struct pf_state_peer *,
+ struct pf_state_peer_export *);
+void pf_state_peer_ntoh(const struct pf_state_peer_export *,
+ struct pf_state_peer *);
#define pf_state_counter_hton(s,d) do { \
d[0] = htonl((s>>32)&0xffffffff); \
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 543b846fbba5..fc0848b2c944 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -391,7 +391,6 @@ stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs(oip->ip_len) -
nip->ip_hl = 5;
nip->ip_p = IPPROTO_ICMP;
nip->ip_tos = 0;
- nip->ip_off = 0;
if (V_error_keeptags)
m_tag_copy_chain(m, n, M_NOWAIT);
@@ -872,6 +871,8 @@ match:
mac_netinet_icmp_replyinplace(m);
#endif
ip->ip_src = t;
+ /* ip->ip_tos will be reflected. */
+ ip->ip_off = htons(0);
ip->ip_ttl = V_ip_defttl;
if (optlen > 0) {
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 2f2f9abf1c83..3e6519118a40 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -448,7 +448,7 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in)
/*
* No matching pcb found; discard datagram. (No need
* to send an ICMP Port Unreachable for a broadcast
- * or multicast datgram.)
+ * or multicast datagram.)
*/
UDPSTAT_INC(udps_noport);
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)))
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 0027cf3bd230..1a32365f5d1d 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -341,7 +341,7 @@ udp6_multi_input(struct mbuf *m, int off, int proto,
/*
* No matching pcb found; discard datagram. (No need
* to send an ICMP Port Unreachable for a broadcast
- * or multicast datgram.)
+ * or multicast datagram.)
*/
UDPSTAT_INC(udps_noport);
UDPSTAT_INC(udps_noportmcast);
diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c
index 4bf913d9c978..5f605b05f7b8 100644
--- a/sys/netlink/route/iface_drivers.c
+++ b/sys/netlink/route/iface_drivers.c
@@ -82,9 +82,12 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
}
}
- if ((lattrs->ifi_change & IFF_UP) && (lattrs->ifi_flags & IFF_UP) == 0) {
- /* Request to down the interface */
- if_down(ifp);
+ if ((lattrs->ifi_change & IFF_UP) != 0 || lattrs->ifi_change == 0) {
+ /* Request to up or down the interface */
+ if (lattrs->ifi_flags & IFF_UP)
+ if_up(ifp);
+ else
+ if_down(ifp);
}
if (lattrs->ifla_mtu > 0) {
@@ -97,7 +100,8 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
}
}
- if (lattrs->ifi_change & IFF_PROMISC) {
+ if ((lattrs->ifi_change & IFF_PROMISC) != 0 ||
+ lattrs->ifi_change == 0) {
error = ifpromisc(ifp, lattrs->ifi_flags & IFF_PROMISC);
if (error != 0) {
nlmsg_report_err_msg(npt, "unable to set promisc");
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index e34c08c8c4db..585c196391c0 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -123,8 +123,8 @@ union inet_template {
sizeof(struct pfsync_header) + \
sizeof(struct pfsync_subheader) )
-static int pfsync_upd_tcp(struct pf_kstate *, struct pfsync_state_peer *,
- struct pfsync_state_peer *);
+static int pfsync_upd_tcp(struct pf_kstate *, struct pf_state_peer_export *,
+ struct pf_state_peer_export *);
static int pfsync_in_clr(struct mbuf *, int, int, int, int);
static int pfsync_in_ins(struct mbuf *, int, int, int, int);
static int pfsync_in_iack(struct mbuf *, int, int, int, int);
@@ -330,7 +330,7 @@ SYSCTL_UINT(_net_pfsync, OID_AUTO, defer_delay, CTLFLAG_VNET | CTLFLAG_RW,
static int pfsync_clone_create(struct if_clone *, int, caddr_t);
static void pfsync_clone_destroy(struct ifnet *);
-static int pfsync_alloc_scrub_memory(struct pfsync_state_peer *,
+static int pfsync_alloc_scrub_memory(struct pf_state_peer_export *,
struct pf_state_peer *);
static int pfsyncoutput(struct ifnet *, struct mbuf *,
const struct sockaddr *, struct route *);
@@ -502,7 +502,7 @@ pfsync_clone_destroy(struct ifnet *ifp)
}
static int
-pfsync_alloc_scrub_memory(struct pfsync_state_peer *s,
+pfsync_alloc_scrub_memory(struct pf_state_peer_export *s,
struct pf_state_peer *d)
{
if (s->scrub.scrub_flag && d->scrub == NULL) {
@@ -1172,8 +1172,8 @@ pfsync_in_iack(struct mbuf *m, int offset, int count, int flags, int action)
}
static int
-pfsync_upd_tcp(struct pf_kstate *st, struct pfsync_state_peer *src,
- struct pfsync_state_peer *dst)
+pfsync_upd_tcp(struct pf_kstate *st, struct pf_state_peer_export *src,
+ struct pf_state_peer_export *dst)
{
int sync = 0;
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 9d83e7b82e6f..8cd4fff95b15 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -2069,6 +2069,44 @@ pf_find_state_all_exists(const struct pf_state_key_cmp *key, u_int dir)
return (false);
}
+void
+pf_state_peer_hton(const struct pf_state_peer *s, struct pf_state_peer_export *d)
+{
+ d->seqlo = htonl(s->seqlo);
+ d->seqhi = htonl(s->seqhi);
+ d->seqdiff = htonl(s->seqdiff);
+ d->max_win = htons(s->max_win);
+ d->mss = htons(s->mss);
+ d->state = s->state;
+ d->wscale = s->wscale;
+ if (s->scrub) {
+ d->scrub.pfss_flags = htons(
+ s->scrub->pfss_flags & PFSS_TIMESTAMP);
+ d->scrub.pfss_ttl = (s)->scrub->pfss_ttl;
+ d->scrub.pfss_ts_mod = htonl((s)->scrub->pfss_ts_mod);
+ d->scrub.scrub_flag = PF_SCRUB_FLAG_VALID;
+ }
+}
+
+void
+pf_state_peer_ntoh(const struct pf_state_peer_export *s, struct pf_state_peer *d)
+{
+ d->seqlo = ntohl(s->seqlo);
+ d->seqhi = ntohl(s->seqhi);
+ d->seqdiff = ntohl(s->seqdiff);
+ d->max_win = ntohs(s->max_win);
+ d->mss = ntohs(s->mss);
+ d->state = s->state;
+ d->wscale = s->wscale;
+ if (s->scrub.scrub_flag == PF_SCRUB_FLAG_VALID &&
+ d->scrub != NULL) {
+ d->scrub->pfss_flags = ntohs(s->scrub.pfss_flags) &
+ PFSS_TIMESTAMP;
+ d->scrub->pfss_ttl = s->scrub.pfss_ttl;
+ d->scrub->pfss_ts_mod = ntohl(s->scrub.pfss_ts_mod);
+ }
+}
+
struct pf_udp_mapping *
pf_udp_mapping_create(sa_family_t af, struct pf_addr *src_addr, uint16_t src_port,
struct pf_addr *nat_addr, uint16_t nat_port)
diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c
index 09754359ec2d..45b5b8dd5fef 100644
--- a/sys/netpfil/pf/pf_nl.c
+++ b/sys/netpfil/pf/pf_nl.c
@@ -118,7 +118,7 @@ dump_state_peer(struct nl_writer *nw, int attr, const struct pf_state_peer *peer
nlattr_add_u16(nw, PF_STP_PFSS_FLAGS, pfss_flags);
nlattr_add_u32(nw, PF_STP_PFSS_TS_MOD, sc->pfss_ts_mod);
nlattr_add_u8(nw, PF_STP_PFSS_TTL, sc->pfss_ttl);
- nlattr_add_u8(nw, PF_STP_SCRUB_FLAG, PFSYNC_SCRUB_FLAG_VALID);
+ nlattr_add_u8(nw, PF_STP_SCRUB_FLAG, PF_SCRUB_FLAG_VALID);
}
nlattr_set_len(nw, off);
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
index 85711c8fc3ff..630c88b97dd7 100644
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -293,3 +293,4 @@ device virtio_balloon # VirtIO Memory Balloon device
options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE
index a56feb6574a4..eb9a9441425d 100644
--- a/sys/powerpc/conf/GENERIC64LE
+++ b/sys/powerpc/conf/GENERIC64LE
@@ -274,3 +274,4 @@ device virtio_balloon # VirtIO Memory Balloon device
options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
index a8500fe80019..2ff711e80127 100644
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -132,6 +132,7 @@ device umass # Disks/Mass storage - Requires scbus and da
options HID_DEBUG # enable debug msgs
device hid # Generic HID support
device hidbus # Generic HID Bus
+options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/
# Serial (COM) ports
device uart # Generic UART driver
diff --git a/sys/riscv/starfive/jh7110_pcie.c b/sys/riscv/starfive/jh7110_pcie.c
index 2d0a4be69b2c..5181252ab2dc 100644
--- a/sys/riscv/starfive/jh7110_pcie.c
+++ b/sys/riscv/starfive/jh7110_pcie.c
@@ -483,6 +483,16 @@ jh7110_pcie_msi_enable_intr(device_t dev, struct intr_irqsrc *isrc)
}
static void
+jh7110_pcie_msi_post_filter(device_t dev, struct intr_irqsrc *isrc)
+{
+}
+
+static void
+jh7110_pcie_msi_post_ithread(device_t dev, struct intr_irqsrc *isrc)
+{
+}
+
+static void
jh7110_pcie_msi_pre_ithread(device_t dev, struct intr_irqsrc *isrc)
{
struct jh7110_pcie_softc *sc;
@@ -1008,6 +1018,8 @@ static device_method_t jh7110_pcie_methods[] = {
/* Interrupt controller interface */
DEVMETHOD(pic_enable_intr, jh7110_pcie_msi_enable_intr),
DEVMETHOD(pic_disable_intr, jh7110_pcie_msi_disable_intr),
+ DEVMETHOD(pic_post_filter, jh7110_pcie_msi_post_filter),
+ DEVMETHOD(pic_post_ithread, jh7110_pcie_msi_post_ithread),
DEVMETHOD(pic_pre_ithread, jh7110_pcie_msi_pre_ithread),
/* OFW bus interface */
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c
index 8856be5fa1a3..7a5ac2e01f75 100644
--- a/sys/security/mac_do/mac_do.c
+++ b/sys/security/mac_do/mac_do.c
@@ -44,7 +44,7 @@ SYSCTL_INT(_security_mac_do, OID_AUTO, print_parse_error, CTLFLAG_RWTUN,
&print_parse_error, 0, "Print parse errors on setting rules "
"(via sysctl(8)).");
-static MALLOC_DEFINE(M_DO, "do_rule", "Rules for mac_do");
+static MALLOC_DEFINE(M_MAC_DO, "mac_do", "mac_do(4) security module");
#define MAC_RULE_STRING_LEN 1024
@@ -319,17 +319,17 @@ toast_rules(struct rules *const rules)
struct rule *rule, *rule_next;
STAILQ_FOREACH_SAFE(rule, head, r_entries, rule_next) {
- free(rule->uids, M_DO);
- free(rule->gids, M_DO);
- free(rule, M_DO);
+ free(rule->uids, M_MAC_DO);
+ free(rule->gids, M_MAC_DO);
+ free(rule, M_MAC_DO);
}
- free(rules, M_DO);
+ free(rules, M_MAC_DO);
}
static struct rules *
alloc_rules(void)
{
- struct rules *const rules = malloc(sizeof(*rules), M_DO, M_WAITOK);
+ struct rules *const rules = malloc(sizeof(*rules), M_MAC_DO, M_WAITOK);
_Static_assert(MAC_RULE_STRING_LEN > 0, "MAC_RULE_STRING_LEN <= 0!");
rules->string[0] = 0;
@@ -433,7 +433,7 @@ static void
make_parse_error(struct parse_error **const parse_error, const size_t pos,
const char *const fmt, ...)
{
- struct parse_error *const err = malloc(sizeof(*err), M_DO, M_WAITOK);
+ struct parse_error *const err = malloc(sizeof(*err), M_MAC_DO, M_WAITOK);
va_list ap;
err->pos = pos;
@@ -448,7 +448,7 @@ make_parse_error(struct parse_error **const parse_error, const size_t pos,
static void
free_parse_error(struct parse_error *const parse_error)
{
- free(parse_error, M_DO);
+ free(parse_error, M_MAC_DO);
}
static int
@@ -733,7 +733,7 @@ parse_target_clause(char *to, struct rule *const rule,
"Too many target clauses of type '%s'.", to_type);
return (EOVERFLOW);
}
- ie = malloc(sizeof(*ie), M_DO, M_WAITOK);
+ ie = malloc(sizeof(*ie), M_MAC_DO, M_WAITOK);
ie->spec = is;
STAILQ_INSERT_TAIL(list, ie, ie_entries);
check_type_and_id_spec(type, &is);
@@ -784,7 +784,7 @@ pour_list_into_rule(const id_type_t type, struct id_list *const list,
STAILQ_FOREACH_SAFE(ie, list, ie_entries, ie_next) {
MPASS(idx < *nb);
array[idx] = ie->spec;
- free(ie, M_DO);
+ free(ie, M_MAC_DO);
++idx;
}
MPASS(idx == *nb);
@@ -874,7 +874,7 @@ parse_single_rule(char *rule, struct rules *const rules,
STAILQ_INIT(&gid_list);
/* Freed when the 'struct rules' container is freed. */
- new = malloc(sizeof(*new), M_DO, M_WAITOK | M_ZERO);
+ new = malloc(sizeof(*new), M_MAC_DO, M_WAITOK | M_ZERO);
from_type = strsep_noblanks(&rule, "=");
MPASS(from_type != NULL); /* Because 'rule' was not NULL. */
@@ -933,7 +933,7 @@ parse_single_rule(char *rule, struct rules *const rules,
} while (to_list != NULL);
if (new->uids_nb != 0) {
- new->uids = malloc(sizeof(*new->uids) * new->uids_nb, M_DO,
+ new->uids = malloc(sizeof(*new->uids) * new->uids_nb, M_MAC_DO,
M_WAITOK);
error = pour_list_into_rule(IT_UID, &uid_list, new->uids,
&new->uids_nb, parse_error);
@@ -949,7 +949,7 @@ parse_single_rule(char *rule, struct rules *const rules,
}
if (new->gids_nb != 0) {
- new->gids = malloc(sizeof(*new->gids) * new->gids_nb, M_DO,
+ new->gids = malloc(sizeof(*new->gids) * new->gids_nb, M_MAC_DO,
M_WAITOK);
error = pour_list_into_rule(IT_GID, &gid_list, new->gids,
&new->gids_nb, parse_error);
@@ -969,13 +969,13 @@ parse_single_rule(char *rule, struct rules *const rules,
return (0);
einval:
- free(new->gids, M_DO);
- free(new->uids, M_DO);
- free(new, M_DO);
+ free(new->gids, M_MAC_DO);
+ free(new->uids, M_MAC_DO);
+ free(new, M_MAC_DO);
STAILQ_FOREACH_SAFE(ie, &gid_list, ie_entries, ie_next)
- free(ie, M_DO);
+ free(ie, M_MAC_DO);
STAILQ_FOREACH_SAFE(ie, &uid_list, ie_entries, ie_next)
- free(ie, M_DO);
+ free(ie, M_MAC_DO);
MPASS(*parse_error != NULL);
return (EINVAL);
}
@@ -1028,7 +1028,7 @@ parse_rules(const char *const string, struct rules **const rulesp,
bcopy(string, rules->string, len + 1);
MPASS(rules->string[len] == '\0'); /* Catch some races. */
- copy = malloc(len + 1, M_DO, M_WAITOK);
+ copy = malloc(len + 1, M_MAC_DO, M_WAITOK);
bcopy(string, copy, len + 1);
MPASS(copy[len] == '\0'); /* Catch some races. */
@@ -1046,7 +1046,7 @@ parse_rules(const char *const string, struct rules **const rulesp,
*rulesp = rules;
out:
- free(copy, M_DO);
+ free(copy, M_MAC_DO);
return (error);
}
@@ -1226,7 +1226,7 @@ parse_and_set_rules(struct prison *const pr, const char *rules_string,
static int
mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS)
{
- char *const buf = malloc(MAC_RULE_STRING_LEN, M_DO, M_WAITOK);
+ char *const buf = malloc(MAC_RULE_STRING_LEN, M_MAC_DO, M_WAITOK);
struct prison *const td_pr = req->td->td_ucred->cr_prison;
struct prison *pr;
struct rules *rules;
@@ -1250,7 +1250,7 @@ mac_do_sysctl_rules(SYSCTL_HANDLER_ARGS)
free_parse_error(parse_error);
}
out:
- free(buf, M_DO);
+ free(buf, M_MAC_DO);
return (error);
}
@@ -1573,7 +1573,7 @@ set_data_header(void *const data, const size_t size, const int priv,
static void *
alloc_data(void *const data, const size_t size)
{
- struct mac_do_data_header *const hdr = realloc(data, size, M_DO,
+ struct mac_do_data_header *const hdr = realloc(data, size, M_MAC_DO,
M_WAITOK);
MPASS(size >= sizeof(struct mac_do_data_header));
@@ -1602,7 +1602,7 @@ alloc_data(void *const data, const size_t size)
static void
dealloc_thread_osd(void *const value)
{
- free(value, M_DO);
+ free(value, M_MAC_DO);
}
/*
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 1646aa108701..a830c9d4c622 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -159,6 +159,7 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct kerneldumpheader *kdh);
#define GID_RT_PRIO 47
#define GID_ID_PRIO 48
#define GID_DIALER 68
+#define GID_U2F 116
#define GID_NOGROUP 65533
#define GID_NOBODY 65534
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 89ab2b2b0ea8..fc2a78883f1e 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -74,7 +74,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1500061
+#define __FreeBSD_version 1500063
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 074769d55c2d..6ef9bbec9446 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -67,6 +67,11 @@ __enum_uint8_decl(vtype) {
VLASTTYPE = VMARKER,
};
+/*
+ * We frequently need to test is something is a device node.
+ */
+#define VTYPE_ISDEV(vtype) ((vtype) == VCHR || (vtype) == VBLK)
+
__enum_uint8_decl(vstate) {
VSTATE_UNINITIALIZED,
VSTATE_CONSTRUCTED,
@@ -199,6 +204,8 @@ struct vnode {
int v_seqc_users; /* i modifications pending */
};
+#define VN_ISDEV(vp) VTYPE_ISDEV((vp)->v_type)
+
#ifndef DEBUG_LOCKS
#ifdef _LP64
/*
@@ -309,6 +316,8 @@ struct vattr {
long va_spare; /* remain quad aligned */
};
+#define VATTR_ISDEV(vap) VTYPE_ISDEV((vap)->va_type)
+
/*
* Flags for va_vaflags.
*/
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 897a21032907..c7e2b3f4b8e6 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1550,7 +1550,7 @@ ffs_openextattr(
} */ *ap)
{
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
return (ffs_open_ea(ap->a_vp, ap->a_cred, ap->a_td));
@@ -1572,7 +1572,7 @@ ffs_closeextattr(
struct vnode *vp;
vp = ap->a_vp;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (ap->a_commit && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0)
return (EROFS);
@@ -1610,7 +1610,7 @@ ffs_deleteextattr(
vp = ap->a_vp;
ip = VTOI(vp);
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (strlen(ap->a_name) == 0)
return (EINVAL);
@@ -1688,7 +1688,7 @@ ffs_getextattr(
ip = VTOI(ap->a_vp);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
@@ -1738,7 +1738,7 @@ ffs_listextattr(
ip = VTOI(ap->a_vp);
- if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK)
+ if (VN_ISDEV(ap->a_vp))
return (EOPNOTSUPP);
error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace,
@@ -1803,7 +1803,7 @@ ffs_setextattr(
ip = VTOI(vp);
fs = ITOFS(ip);
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
if (strlen(ap->a_name) == 0)
return (EINVAL);
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index ffc993aef9fc..0921eee92b9d 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -156,30 +156,30 @@ ufs_itimes_locked(struct vnode *vp)
if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0)
return;
- if ((vp->v_type == VBLK || vp->v_type == VCHR) && !DOINGSOFTDEP(vp))
+ if (VN_ISDEV(vp) && !DOINGSOFTDEP(vp))
UFS_INODE_SET_FLAG(ip, IN_LAZYMOD);
else if (((vp->v_mount->mnt_kern_flag &
- (MNTK_SUSPENDED | MNTK_SUSPEND)) == 0) ||
- (ip->i_flag & (IN_CHANGE | IN_UPDATE)))
+ (MNTK_SUSPENDED | MNTK_SUSPEND)) == 0) ||
+ (ip->i_flag & (IN_CHANGE | IN_UPDATE)) != 0)
UFS_INODE_SET_FLAG(ip, IN_MODIFIED);
- else if (ip->i_flag & IN_ACCESS)
+ else if ((ip->i_flag & IN_ACCESS) != 0)
UFS_INODE_SET_FLAG(ip, IN_LAZYACCESS);
vfs_timestamp(&ts);
- if (ip->i_flag & IN_ACCESS) {
+ if ((ip->i_flag & IN_ACCESS) != 0) {
DIP_SET(ip, i_atime, ts.tv_sec);
DIP_SET(ip, i_atimensec, ts.tv_nsec);
}
- if (ip->i_flag & IN_UPDATE) {
+ if ((ip->i_flag & IN_UPDATE) != 0) {
DIP_SET(ip, i_mtime, ts.tv_sec);
DIP_SET(ip, i_mtimensec, ts.tv_nsec);
}
- if (ip->i_flag & IN_CHANGE) {
+ if ((ip->i_flag & IN_CHANGE) != 0) {
DIP_SET(ip, i_ctime, ts.tv_sec);
DIP_SET(ip, i_ctimensec, ts.tv_nsec);
DIP_SET(ip, i_modrev, DIP(ip, i_modrev) + 1);
}
- out:
+out:
ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE);
}
@@ -319,7 +319,7 @@ ufs_open(struct vop_open_args *ap)
struct vnode *vp = ap->a_vp;
struct inode *ip;
- if (vp->v_type == VCHR || vp->v_type == VBLK)
+ if (VN_ISDEV(vp))
return (EOPNOTSUPP);
ip = VTOI(vp);
@@ -540,7 +540,7 @@ ufs_stat(struct vop_stat_args *ap)
sb->st_uid = ip->i_uid;
sb->st_gid = ip->i_gid;
if (I_IS_UFS1(ip)) {
- sb->st_rdev = ip->i_din1->di_rdev;
+ sb->st_rdev = VN_ISDEV(vp) ? ip->i_din1->di_rdev : NODEV;
sb->st_size = ip->i_din1->di_size;
sb->st_mtim.tv_sec = ip->i_din1->di_mtime;
sb->st_mtim.tv_nsec = ip->i_din1->di_mtimensec;
@@ -551,7 +551,7 @@ ufs_stat(struct vop_stat_args *ap)
sb->st_blocks = dbtob((uint64_t)ip->i_din1->di_blocks) / S_BLKSIZE;
sb->st_filerev = ip->i_din1->di_modrev;
} else {
- sb->st_rdev = ip->i_din2->di_rdev;
+ sb->st_rdev = VN_ISDEV(vp) ? ip->i_din2->di_rdev : NODEV;
sb->st_size = ip->i_din2->di_size;
sb->st_mtim.tv_sec = ip->i_din2->di_mtime;
sb->st_mtim.tv_nsec = ip->i_din2->di_mtimensec;
@@ -603,7 +603,7 @@ ufs_getattr(
vap->va_uid = ip->i_uid;
vap->va_gid = ip->i_gid;
if (I_IS_UFS1(ip)) {
- vap->va_rdev = ip->i_din1->di_rdev;
+ vap->va_rdev = VN_ISDEV(vp) ? ip->i_din1->di_rdev : NODEV;
vap->va_size = ip->i_din1->di_size;
vap->va_mtime.tv_sec = ip->i_din1->di_mtime;
vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec;
@@ -612,7 +612,7 @@ ufs_getattr(
vap->va_bytes = dbtob((uint64_t)ip->i_din1->di_blocks);
vap->va_filerev = ip->i_din1->di_modrev;
} else {
- vap->va_rdev = ip->i_din2->di_rdev;
+ vap->va_rdev = VN_ISDEV(vp) ? ip->i_din2->di_rdev : NODEV;
vap->va_size = ip->i_din2->di_size;
vap->va_mtime.tv_sec = ip->i_din2->di_mtime;
vap->va_mtime.tv_nsec = ip->i_din2->di_mtimensec;
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index de8a6c52c08f..244aa31ea703 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -901,8 +901,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count,
int error, before, after, rbehind, rahead, poff, i;
int bytecount, secmask;
- KASSERT(vp->v_type != VCHR && vp->v_type != VBLK,
- ("%s does not support devices", __func__));
+ KASSERT(!VN_ISDEV(vp), ("%s does not support devices", __func__));
if (VN_IS_DOOMED(vp))
return (VM_PAGER_BAD);
diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc
index 65cdc3919652..e8081dea9604 100644
--- a/tests/sys/fs/fusefs/mockfs.cc
+++ b/tests/sys/fs/fusefs/mockfs.cc
@@ -472,7 +472,7 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other,
sprintf(fdstr, "%d", m_fuse_fd);
build_iovec(&iov, &iovlen, "fd", fdstr, -1);
if (m_maxread > 0) {
- char val[10];
+ char val[12];
snprintf(val, sizeof(val), "%d", m_maxread);
build_iovec(&iov, &iovlen, "max_read=", &val, -1);
diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile
index 65cc99a3e932..e390c6e8059d 100644
--- a/tests/sys/net/Makefile
+++ b/tests/sys/net/Makefile
@@ -40,6 +40,7 @@ ${PACKAGE}FILESMODE_stp.py= 0555
MAN=
PROGS+= randsleep
+PROGS+= transient_tuntap
CFLAGS+= -I${.CURDIR:H:H}
diff --git a/tests/sys/net/if_tun_test.sh b/tests/sys/net/if_tun_test.sh
index a4ffe66e04ce..f4ce7800272e 100755
--- a/tests/sys/net/if_tun_test.sh
+++ b/tests/sys/net/if_tun_test.sh
@@ -56,8 +56,30 @@ basic_cleanup()
vnet_cleanup
}
+atf_test_case "transient" "cleanup"
+transient_head()
+{
+ atf_set descr "Test transient tunnel support"
+ atf_set require.user root
+}
+transient_body()
+{
+ vnet_init
+ vnet_mkjail one
+
+ tun=$(jexec one ifconfig tun create)
+ atf_check -s exit:0 -o not-empty jexec one ifconfig ${tun}
+ jexec one $(atf_get_srcdir)/transient_tuntap /dev/${tun}
+ atf_check -s not-exit:0 -e not-empty jexec one ifconfig ${tun}
+}
+transient_cleanup()
+{
+ vnet_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "235704"
atf_add_test_case "basic"
+ atf_add_test_case "transient"
}
diff --git a/tests/sys/net/transient_tuntap.c b/tests/sys/net/transient_tuntap.c
new file mode 100644
index 000000000000..b0cf43064317
--- /dev/null
+++ b/tests/sys/net/transient_tuntap.c
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2024 Kyle Evans <kevans@FreeBSD.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+/*
+ * This test simply configures the tunnel as transient and exits. By the time
+ * we return, the tunnel should be gone because the last reference disappears.
+ */
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <net/if_tun.h>
+#include <net/if_tap.h>
+
+#include <assert.h>
+#include <err.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+
+int
+main(int argc, char *argv[])
+{
+ unsigned long tunreq;
+ const char *tundev;
+ int one = 1, tunfd;
+
+ assert(argc > 1);
+ tundev = argv[1];
+
+ tunfd = open(tundev, O_RDWR);
+ assert(tunfd >= 0);
+
+ /*
+ * These are technically the same request, but we'll use the technically
+ * correct one just in case.
+ */
+ if (strstr(tundev, "tun") != NULL) {
+ tunreq = TUNSTRANSIENT;
+ } else {
+ assert(strstr(tundev, "tap") != NULL);
+ tunreq = TAPSTRANSIENT;
+ }
+
+ if (ioctl(tunfd, tunreq, &one) == -1)
+ err(1, "ioctl");
+
+ /* Final close should destroy the tunnel automagically. */
+ close(tunfd);
+
+ return (0);
+}
diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh
index c773518e95e4..65492545a13b 100644
--- a/tests/sys/netpfil/pf/table.sh
+++ b/tests/sys/netpfil/pf/table.sh
@@ -641,9 +641,31 @@ large_body()
-e match:"${expected}/${expected} addresses added." \
jexec alcatraz pfctl -t foo -T add -f ${pwd}/foo.lst
actual=$(jexec alcatraz pfctl -t foo -T show | wc -l | awk '{ print $1; }')
- if [[ $actual -ne $expected ]]; then
+ if [ $actual -ne $expected ]; then
atf_fail "Unexpected number of table entries $expected $acual"
fi
+
+ # The second pass should work too, but confirm we've inserted everything
+ atf_check -s exit:0 \
+ -e match:"0/${expected} addresses added." \
+ jexec alcatraz pfctl -t foo -T add -f ${pwd}/foo.lst
+
+ echo '42.42.42.42' >> ${pwd}/foo.lst
+ expected=$((${expected} + 1))
+
+ # And we can also insert one additional address
+ atf_check -s exit:0 \
+ -e match:"1/${expected} addresses added." \
+ jexec alcatraz pfctl -t foo -T add -f ${pwd}/foo.lst
+
+ # Try to delete one address
+ atf_check -s exit:0 \
+ -e match:"1/1 addresses deleted." \
+ jexec alcatraz pfctl -t foo -T delete 42.42.42.42
+ # And again, for the same address
+ atf_check -s exit:0 \
+ -e match:"0/1 addresses deleted." \
+ jexec alcatraz pfctl -t foo -T delete 42.42.42.42
}
large_cleanup()
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 83f589ce3864..3c4e07e3cfc2 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -495,6 +495,7 @@ INSTALLDIR_LIST= \
bin \
lib/geom \
usr/include/casper \
+ usr/include/openssl \
usr/include/private/ucl \
usr/include/private/zstd \
usr/lib \
diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index cd51c59ff0e1..22bf34439758 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -50,12 +50,12 @@
# - Replacing generated files with files committed to the tree. This is special
# case of moving from one directory to another. The stale generated file also
# needs to be deleted, so that it isn't found in make's .PATH. Note the
-# unconditional `rm -f`: there's no need for an extra call to first check for
+# unconditional `rm -fv`: there's no need for an extra call to first check for
# the file's existence.
#
# # 20250110 3863fec1ce2d add strlen SIMD implementation
# clean_dep lib/libc strlen S arm-optimized-routines
-# run rm -f "$OBJTOP"/lib/libc/strlen.S
+# run rm -fv "$OBJTOP"/lib/libc/strlen.S
#
# A rule may be required for only one architecture:
#
@@ -152,6 +152,11 @@ run()
fi
}
+# Clean the depend and object files for a given source file if the
+# depend file matches a regex (which defaults to the source file
+# name). This is typically used if a file was renamed, especially if
+# only its extension was changed (e.g. from .c to .cc).
+#
# $1 directory
# $2 source filename w/o extension
# $3 source extension
@@ -162,13 +167,34 @@ clean_dep()
dirprfx=${libcompat:+obj-lib${libcompat}/}
if egrep -qw "${4:-$2\.$3}" "$OBJTOP"/$dirprfx$1/.depend.$2.*o 2>/dev/null; then
echo "Removing stale ${libcompat:+lib${libcompat} }dependencies and objects for $2.$3"
- run rm -f \
+ run rm -fv \
"$OBJTOP"/$dirprfx$1/.depend.$2.* \
"$OBJTOP"/$dirprfx$1/$2.*o
fi
done
}
+# Clean the object file for a given source file if it exists and
+# matches a regex. This is typically used if a a change in CFLAGS or
+# similar caused a change in the generated code without a change in
+# the sources.
+#
+# $1 directory
+# $2 source filename w/o extension
+# $3 source extension
+# $4 regex for egrep -w
+clean_obj()
+{
+ for libcompat in "" $ALL_libcompats; do
+ dirprfx=${libcompat:+obj-lib${libcompat}/}
+ if strings "$OBJTOP"/$dirprfx$1/$2.*o 2>/dev/null | egrep -qw "${4}"; then
+ echo "Removing stale ${libcompat:+lib${libcompat} }objects for $2.$3"
+ run rm -fv \
+ "$OBJTOP"/$dirprfx$1/$2.*o
+ fi
+ done
+}
+
extract_epoch()
{
[ -s "$1" ] || return 0
@@ -243,7 +269,7 @@ fi
if stat "$OBJTOP"/tests/sys/kqueue/libkqueue/*kqtest* \
"$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.kqtest* >/dev/null 2>&1; then
echo "Removing old kqtest"
- run rm -f "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \
+ run rm -fv "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \
"$OBJTOP"/tests/sys/kqueue/libkqueue/*
fi
@@ -317,7 +343,7 @@ fi
if [ -f "$OBJTOP"/rescue/rescue/rescue.mk ] && \
! grep -q 'nvme_util.o' "$OBJTOP"/rescue/rescue/rescue.mk; then
echo "removing rescue.mk without nvme_util.o"
- run rm -f "$OBJTOP"/rescue/rescue/rescue.mk
+ run rm -fv "$OBJTOP"/rescue/rescue/rescue.mk
fi
# 20240910 e2df9bb44109
@@ -337,7 +363,7 @@ if [ ${MACHINE} = riscv ]; then
fi
if ! grep -q 'lib/libc/csu/riscv/reloc\.c' "$f"; then
echo "Removing stale dependencies and objects for libc_start1.c"
- run rm -f \
+ run rm -fv \
"$OBJTOP"/lib/libc/.depend.libc_start1.* \
"$OBJTOP"/lib/libc/libc_start1.*o
break
@@ -351,28 +377,28 @@ f="$p"/arm_mve_builtin_sema.inc
if [ -e "$f" ]; then
if grep -q SemaBuiltinConstantArgRange "$f"; then
echo "Removing pre-llvm19 clang-tblgen output"
- run rm -f "$p"/*.inc
+ run rm -fv "$p"/*.inc
fi
fi
# 20241025 cb5e41b16083 Unbundle hash functions fom lib/libcrypt
-clean_dep lib/libcrypt crypt-md5 c
-clean_dep lib/libcrypt crypt-nthash c
-clean_dep lib/libcrypt crypt-sha256 c
-clean_dep lib/libcrypt crypt-sha512 c
+clean_obj lib/libcrypt crypt-md5 c __MD5Init
+clean_obj lib/libcrypt crypt-nthash c __MD4Init
+clean_obj lib/libcrypt crypt-sha256 c __SHA256Init
+clean_obj lib/libcrypt crypt-sha512 c __SHA512Init
# 20241213 b55f5e1c4ae3 jemalloc: Move generated jemalloc.3 into lib/libc tree
if [ -h "$OBJTOP"/lib/libc/jemalloc.3 ]; then
# Have to cleanup the jemalloc.3 in the obj tree since make gets
# confused and won't use the one in lib/libc/malloc/jemalloc/jemalloc.3
echo "Removing stale jemalloc.3 object"
- run rm -f "$OBJTOP"/lib/libc/jemalloc.3
+ run rm -fv "$OBJTOP"/lib/libc/jemalloc.3
fi
if [ $MACHINE_ARCH = aarch64 ]; then
# 20250110 5e7d93a60440 add strcmp SIMD implementation
ALL_libcompats= clean_dep lib/libc strcmp S arm-optimized-routines
- run rm -f "$OBJTOP"/lib/libc/strcmp.S
+ run rm -fv "$OBJTOP"/lib/libc/strcmp.S
# 20250110 b91003acffe7 add strspn optimized implementation
ALL_libcompats= clean_dep lib/libc strspn c
@@ -391,7 +417,7 @@ if [ $MACHINE_ARCH = aarch64 ]; then
# 20250110 25c485e14769 add strncmp SIMD implementation
ALL_libcompats= clean_dep lib/libc strncmp S arm-optimized-routines
- run rm -f "$OBJTOP"/lib/libc/strncmp.S
+ run rm -fv "$OBJTOP"/lib/libc/strncmp.S
# 20250110 bad17991c06d add memccpy SIMD implementation
ALL_libcompats= clean_dep lib/libc memccpy c
@@ -402,11 +428,11 @@ if [ $MACHINE_ARCH = aarch64 ]; then
# 20250110 bea89d038ac5 add strlcat SIMD implementation, and move memchr
ALL_libcompats= clean_dep lib/libc strlcat c "libc.string.strlcat.c"
ALL_libcompats= clean_dep lib/libc memchr S "[[:space:]]memchr.S"
- run rm -f "$OBJTOP"/lib/libc/memchr.S
+ run rm -fv "$OBJTOP"/lib/libc/memchr.S
# 20250110 3863fec1ce2d add strlen SIMD implementation
ALL_libcompats= clean_dep lib/libc strlen S arm-optimized-routines
- run rm -f "$OBJTOP"/lib/libc/strlen.S
+ run rm -fv "$OBJTOP"/lib/libc/strlen.S
# 20250110 79e01e7e643c add bcopy & bzero wrapper
ALL_libcompats= clean_dep lib/libc bcopy c "libc.string.bcopy.c"
@@ -431,15 +457,15 @@ clean_dep usr.sbin/ctld uclparse c
# 20250425 2e47f35be5dc libllvm, libclang and liblldb became shared libraries
if [ -f "$OBJTOP"/lib/clang/libllvm/libllvm.a ]; then
echo "Removing old static libllvm library"
- run rm -f "$OBJTOP"/lib/clang/libllvm/libllvm.a
+ run rm -fv "$OBJTOP"/lib/clang/libllvm/libllvm.a
fi
if [ -f "$OBJTOP"/lib/clang/libclang/libclang.a ]; then
echo "Removing old static libclang library"
- run rm -f "$OBJTOP"/lib/clang/libclang/libclang.a
+ run rm -fv "$OBJTOP"/lib/clang/libclang/libclang.a
fi
if [ -f "$OBJTOP"/lib/clang/liblldb/liblldb.a ]; then
echo "Removing old static liblldb library"
- run rm -f "$OBJTOP"/lib/clang/liblldb/liblldb.a
+ run rm -fv "$OBJTOP"/lib/clang/liblldb/liblldb.a
fi
# 20250813 4f766afc1ca0 tcopy converted to C++
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index b30604238855..fe92cf671ebc 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1709,6 +1709,8 @@ OLD_FILES+=usr/share/examples/hostapd/hostapd.conf
OLD_FILES+=usr/share/examples/hostapd/hostapd.eap_user
OLD_FILES+=usr/share/examples/hostapd/hostapd.wpa_psk
OLD_FILES+=usr/share/examples/indent/indent.pro
+OLD_FILES+=usr/share/examples/inotify/Makefile
+OLD_FILES+=usr/share/examples/inotify/inotify.c
OLD_FILES+=usr/share/examples/ipfilter/BASIC.NAT
OLD_FILES+=usr/share/examples/ipfilter/BASIC_1.FW
OLD_FILES+=usr/share/examples/ipfilter/BASIC_2.FW
@@ -1921,6 +1923,7 @@ OLD_DIRS+=usr/share/examples/hast
OLD_DIRS+=usr/share/examples/ibcs2
OLD_DIRS+=usr/share/examples/hostapd
OLD_DIRS+=usr/share/examples/indent
+OLD_DIRS+=usr/share/examples/inotify
OLD_DIRS+=usr/share/examples/ipfilter
OLD_DIRS+=usr/share/examples/ipfw
OLD_DIRS+=usr/share/examples/jails
@@ -2259,83 +2262,6 @@ OLD_FILES+=usr/share/man/man3/gpio_pin_tristate.3.gz
OLD_FILES+=usr/share/man/man8/gpioctl.8.gz
.endif
-.if ${MK_GSSAPI} == "no" || ${MK_KERBEROS_SUPPORT} == "no"
-OLD_FILES+=etc/rc.d/gssd
-OLD_FILES+=usr/sbin/gssd
-OLD_FILES+=usr/share/man/man8/gssd.8.gz
-.endif
-
-.if ${MK_GSSAPI} == no
-OLD_FILES+=usr/include/gssapi/gssapi.h
-OLD_DIRS+=usr/include/gssapi
-OLD_FILES+=usr/include/gssapi.h
-OLD_FILES+=usr/lib/libgssapi.a
-OLD_FILES+=usr/lib/libgssapi.so
-OLD_LIBS+=usr/lib/libgssapi.so.10
-OLD_FILES+=usr/lib/libgssapi_p.a
-OLD_FILES+=usr/lib/librpcsec_gss.a
-OLD_FILES+=usr/lib/librpcsec_gss.so
-OLD_LIBS+=usr/lib/librpcsec_gss.so.1
-OLD_FILES+=usr/share/man/man3/gss_accept_sec_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_acquire_cred.3.gz
-OLD_FILES+=usr/share/man/man3/gss_add_cred.3.gz
-OLD_FILES+=usr/share/man/man3/gss_add_oid_set_member.3.gz
-OLD_FILES+=usr/share/man/man3/gss_canonicalize_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_compare_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_context_time.3.gz
-OLD_FILES+=usr/share/man/man3/gss_create_empty_oid_set.3.gz
-OLD_FILES+=usr/share/man/man3/gss_delete_sec_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_display_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_display_status.3.gz
-OLD_FILES+=usr/share/man/man3/gss_duplicate_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_export_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_export_sec_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_get_mic.3.gz
-OLD_FILES+=usr/share/man/man3/gss_import_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_import_sec_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_indicate_mechs.3.gz
-OLD_FILES+=usr/share/man/man3/gss_init_sec_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_inquire_context.3.gz
-OLD_FILES+=usr/share/man/man3/gss_inquire_cred.3.gz
-OLD_FILES+=usr/share/man/man3/gss_inquire_cred_by_mech.3.gz
-OLD_FILES+=usr/share/man/man3/gss_inquire_mechs_for_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_inquire_names_for_mech.3.gz
-OLD_FILES+=usr/share/man/man3/gss_process_context_token.3.gz
-OLD_FILES+=usr/share/man/man3/gss_release_buffer.3.gz
-OLD_FILES+=usr/share/man/man3/gss_release_cred.3.gz
-OLD_FILES+=usr/share/man/man3/gss_release_name.3.gz
-OLD_FILES+=usr/share/man/man3/gss_release_oid_set.3.gz
-OLD_FILES+=usr/share/man/man3/gss_seal.3.gz
-OLD_FILES+=usr/share/man/man3/gss_sign.3.gz
-OLD_FILES+=usr/share/man/man3/gss_test_oid_set_member.3.gz
-OLD_FILES+=usr/share/man/man3/gss_unseal.3.gz
-OLD_FILES+=usr/share/man/man3/gss_unwrap.3.gz
-OLD_FILES+=usr/share/man/man3/gss_verify.3.gz
-OLD_FILES+=usr/share/man/man3/gss_verify_mic.3.gz
-OLD_FILES+=usr/share/man/man3/gss_wrap.3.gz
-OLD_FILES+=usr/share/man/man3/gss_wrap_size_limit.3.gz
-OLD_FILES+=usr/share/man/man3/gssapi.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_get_error.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_get_mech_info.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_get_mechanisms.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_get_principal_name.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_get_versions.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_getcred.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_is_installed.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_max_data_length.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_mech_to_oid.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_oid_to_mech.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_qop_to_num.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_seccreate.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_set_callback.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_set_defaults.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_set_svc_name.3.gz
-OLD_FILES+=usr/share/man/man3/rpc_gss_svc_max_data_length.3.gz
-OLD_FILES+=usr/share/man/man3/rpcsec_gss.3.gz
-OLD_FILES+=usr/share/man/man5/mech.5.gz
-OLD_FILES+=usr/share/man/man5/qop.5.gz
-.endif
-
.if ${MK_HAST} == no
OLD_FILES+=etc/rc.d/hastd
OLD_FILES+=sbin/hastctl
@@ -2733,2116 +2659,94 @@ OLD_FILES+=usr/share/man/man1/kdump.1.gz
OLD_FILES+=usr/share/man/man1/truss.1.gz
.endif
-.if ${MK_KERBEROS} == no
-.if ${MK_MITKRB5} == no
-# Remove Heimdal because we do not want Kerberos
-OLD_FILES+=etc/rc.d/ipropd_master
-OLD_FILES+=etc/rc.d/ipropd_slave
-OLD_FILES+=usr/bin/asn1_compile
+.if ${MK_KERBEROS_SUPPORT} == "no"
+OLD_FILES+=etc/rc.d/gssd
+OLD_FILES+=usr/sbin/gssd
+OLD_FILES+=usr/share/man/man8/gssd.8.gz
+.endif
+
+# Kerberos files which are installed by both Heimdal and MIT. These should
+# only be removed if Kerberos is disabled entirely.
+.if ${MK_KERBEROS} == "no"
+
OLD_FILES+=usr/bin/compile_et
-OLD_FILES+=usr/bin/hxtool
+OLD_FILES+=usr/share/man/man1/compile_et.1.gz
+# This is kadmin(1) in MIT but kadmin(8) in Heimdal, therefore the manpage
+# is not listed here.
OLD_FILES+=usr/bin/kadmin
-OLD_FILES+=usr/bin/kcc
OLD_FILES+=usr/bin/kdestroy
-OLD_FILES+=usr/bin/kf
-OLD_FILES+=usr/bin/kgetcred
-OLD_FILES+=usr/bin/kinit
-OLD_FILES+=usr/bin/klist
-OLD_FILES+=usr/bin/kpasswd
-OLD_FILES+=usr/bin/krb5-config
-OLD_FILES+=usr/bin/ksu
-OLD_FILES+=usr/bin/kswitch
-OLD_FILES+=usr/bin/make-roken
-OLD_FILES+=usr/bin/slc
-OLD_FILES+=usr/bin/string2key
-OLD_FILES+=usr/bin/verify_krb5_conf
-OLD_FILES+=usr/include/asn1-common.h
-OLD_FILES+=usr/include/asn1_err.h
-OLD_FILES+=usr/include/base64.h
-OLD_FILES+=usr/include/cms_asn1.h
-OLD_FILES+=usr/include/common.h
-OLD_FILES+=usr/include/crmf_asn1.h
-OLD_FILES+=usr/include/der-private.h
-OLD_FILES+=usr/include/der-protos.h
-OLD_FILES+=usr/include/der.h
-OLD_FILES+=usr/include/digest_asn1.h
-OLD_FILES+=usr/include/edwards25519_fiat.h
-OLD_FILES+=usr/include/edwards25519_tables.h
-OLD_FILES+=usr/include/getarg.h
-OLD_FILES+=usr/include/groups.h
-OLD_FILES+=usr/include/gssapi/gssapi_krb5.h
-OLD_FILES+=usr/include/hdb-protos.h
-OLD_FILES+=usr/include/hdb.h
-OLD_FILES+=usr/include/hdb_asn1.h
-OLD_FILES+=usr/include/hdb_err.h
-OLD_FILES+=usr/include/heim_asn1.h
-OLD_FILES+=usr/include/heim_err.h
-OLD_FILES+=usr/include/heim_threads.h
-OLD_FILES+=usr/include/heimbase.h
-OLD_FILES+=usr/include/heimntlm-protos.h
-OLD_FILES+=usr/include/heimntlm.h
-OLD_FILES+=usr/include/hex.h
-OLD_FILES+=usr/include/hx509-private.h
-OLD_FILES+=usr/include/hx509-protos.h
-OLD_FILES+=usr/include/hx509.h
-OLD_FILES+=usr/include/hx509_err.h
-OLD_FILES+=usr/include/iana.h
-OLD_FILES+=usr/include/k524_err.h
-OLD_FILES+=usr/include/kadm5/admin.h
-OLD_FILES+=usr/include/kadm5/kadm5-private.h
-OLD_FILES+=usr/include/kadm5/kadm5-protos.h
-OLD_FILES+=usr/include/kadm5/kadm5-pwcheck.h
-OLD_FILES+=usr/include/kadm5/kadm5_err.h
-OLD_FILES+=usr/include/kadm5/private.h
-OLD_DIRS+=usr/include/kadm5
-OLD_FILES+=usr/include/kafs.h
-OLD_FILES+=usr/include/kdc-protos.h
-OLD_FILES+=usr/include/kdc.h
-OLD_FILES+=usr/include/krb5-private.h
-OLD_FILES+=usr/include/krb5-protos.h
-OLD_FILES+=usr/include/krb5-types.h
-OLD_FILES+=usr/include/krb5.h
-OLD_FILES+=usr/include/krb5/ccache_plugin.h
-OLD_FILES+=usr/include/krb5/locate_plugin.h
-OLD_FILES+=usr/include/krb5/send_to_kdc_plugin.h
-OLD_FILES+=usr/include/krb5/windc_plugin.h
-OLD_DIRS+=usr/include/krb5
-OLD_FILES+=usr/include/krb5_asn1.h
-OLD_FILES+=usr/include/krb5_ccapi.h
-OLD_FILES+=usr/include/krb5_err.h
-OLD_FILES+=usr/include/kx509_asn1.h
-OLD_FILES+=usr/include/ntlm_err.h
-OLD_FILES+=usr/include/ocsp_asn1.h
-OLD_FILES+=usr/include/parse_bytes.h
-OLD_FILES+=usr/include/parse_time.h
-OLD_FILES+=usr/include/parse_units.h
-OLD_FILES+=usr/include/pkcs10_asn1.h
-OLD_FILES+=usr/include/pkcs12_asn1.h
-OLD_FILES+=usr/include/pkcs8_asn1.h
-OLD_FILES+=usr/include/pkcs9_asn1.h
-OLD_FILES+=usr/include/pkinit_asn1.h
-OLD_FILES+=usr/include/resolve.h
-OLD_FILES+=usr/include/rfc2459_asn1.h
-OLD_FILES+=usr/include/roken-common.h
-OLD_FILES+=usr/include/rtbl.h
-OLD_FILES+=usr/include/trace.h
-OLD_FILES+=usr/include/util.h
-OLD_FILES+=usr/include/wind.h
-OLD_FILES+=usr/include/wind_err.h
-OLD_FILES+=usr/include/xdbm.h
-OLD_FILES+=usr/lib/libasn1.a
-OLD_FILES+=usr/lib/libasn1.so
-OLD_LIBS+=usr/lib/libasn1.so.11
-OLD_FILES+=usr/lib/libasn1_p.a
-OLD_FILES+=usr/lib/libcom_err.a
-OLD_FILES+=usr/lib/libcom_err.so
-OLD_LIBS+=usr/lib/libcom_err.so.5
-OLD_FILES+=usr/lib/libcom_err_p.a
-OLD_FILES+=usr/lib/libgssapi_krb5.a
-OLD_FILES+=usr/lib/libgssapi_krb5.so
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.10
-OLD_FILES+=usr/lib/libgssapi_krb5_p.a
-OLD_FILES+=usr/lib/libgssapi_mech.a
-OLD_FILES+=usr/lib/libgssapi_mech.so
-OLD_LIBS+=usr/lib/libgssapi_mech.so.10
-OLD_FILES+=usr/lib/libgssapi_ntlm.a
-OLD_FILES+=usr/lib/libgssapi_ntlm.so
-OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10
-OLD_FILES+=usr/lib/libgssapi_ntlm_p.a
-OLD_FILES+=usr/lib/libgssapi_spnego.a
-OLD_FILES+=usr/lib/libgssapi_spnego.so
-OLD_LIBS+=usr/lib/libgssapi_spnego.so.10
-OLD_FILES+=usr/lib/libgssapi_spnego_p.a
-OLD_FILES+=usr/lib/libhdb.a
-OLD_FILES+=usr/lib/libhdb.so
-OLD_LIBS+=usr/lib/libhdb.so.11
-OLD_FILES+=usr/lib/libhdb_p.a
-OLD_FILES+=usr/lib/libheimbase.a
-OLD_FILES+=usr/lib/libheimbase.so
-OLD_LIBS+=usr/lib/libheimbase.so.11
-OLD_FILES+=usr/lib/libheimbase_p.a
-OLD_FILES+=usr/lib/libheimntlm.a
-OLD_FILES+=usr/lib/libheimntlm.so
-OLD_LIBS+=usr/lib/libheimntlm.so.11
-OLD_FILES+=usr/lib/libheimntlm_p.a
-OLD_FILES+=usr/lib/libheimsqlite.a
-OLD_FILES+=usr/lib/libheimsqlite.so
-OLD_LIBS+=usr/lib/libheimsqlite.so.11
-OLD_FILES+=usr/lib/libheimsqlite_p.a
-OLD_FILES+=usr/lib/libhx509.a
-OLD_FILES+=usr/lib/libhx509.so
-OLD_LIBS+=usr/lib/libhx509.so.11
-OLD_FILES+=usr/lib/libhx509_p.a
-OLD_FILES+=usr/lib/libkadm5clnt.a
-OLD_FILES+=usr/lib/libkadm5clnt.so
-OLD_LIBS+=usr/lib/libkadm5clnt.so.11
-OLD_FILES+=usr/lib/libkadm5clnt_p.a
-OLD_FILES+=usr/lib/libkadm5srv.a
-OLD_FILES+=usr/lib/libkadm5srv.so
-OLD_LIBS+=usr/lib/libkadm5srv.so.11
-OLD_FILES+=usr/lib/libkadm5srv_p.a
-OLD_FILES+=usr/lib/libkafs5.a
-OLD_FILES+=usr/lib/libkafs5.so
-OLD_LIBS+=usr/lib/libkafs5.so.11
-OLD_FILES+=usr/lib/libkafs5_p.a
-OLD_FILES+=usr/lib/libkdc.a
-OLD_FILES+=usr/lib/libkdc.so
-OLD_LIBS+=usr/lib/libkdc.so.11
-OLD_FILES+=usr/lib/libkdc_p.a
-OLD_FILES+=usr/lib/libkrb5.a
-OLD_FILES+=usr/lib/libkrb5.so
-OLD_LIBS+=usr/lib/libkrb5.so.11
-OLD_FILES+=usr/lib/libkrb5_p.a
-OLD_FILES+=usr/lib/libroken.a
-OLD_FILES+=usr/lib/libroken.so
-OLD_LIBS+=usr/lib/libroken.so.11
-OLD_FILES+=usr/lib/libroken_p.a
-OLD_FILES+=usr/lib/libwind.a
-OLD_FILES+=usr/lib/libwind.so
-OLD_LIBS+=usr/lib/libwind.so.11
-OLD_FILES+=usr/lib/libwind_p.a
-OLD_FILES+=usr/lib/libprivateheimipcc.a
-OLD_FILES+=usr/lib/libprivateheimipcc.so
-OLD_LIBS+=usr/lib/libprivateheimipcc.so.11
-OLD_FILES+=usr/lib/libprivateheimipcc_p.a
-OLD_FILES+=usr/lib/libprivateheimipcs.a
-OLD_FILES+=usr/lib/libprivateheimipcs.so
-OLD_LIBS+=usr/lib/libprivateheimipcs.so.11
-OLD_FILES+=usr/lib/libprivateheimipcs_p.a
-OLD_FILES+=usr/libexec/digest-service
-OLD_FILES+=usr/libexec/hprop
-OLD_FILES+=usr/libexec/hpropd
-OLD_FILES+=usr/libexec/ipropd-master
-OLD_FILES+=usr/libexec/ipropd-slave
-OLD_FILES+=usr/libexec/kadmind
-OLD_FILES+=usr/libexec/kcm
-OLD_FILES+=usr/libexec/kdc
-OLD_FILES+=usr/libexec/kdigest
-OLD_FILES+=usr/libexec/kfd
-OLD_FILES+=usr/libexec/kimpersonate
-OLD_FILES+=usr/libexec/kpasswdd
-OLD_FILES+=usr/sbin/kstash
-OLD_FILES+=usr/sbin/ktutil
-OLD_FILES+=usr/sbin/iprop-log
OLD_FILES+=usr/share/man/man1/kdestroy.1.gz
-OLD_FILES+=usr/share/man/man1/kf.1.gz
+OLD_FILES+=usr/bin/kinit
OLD_FILES+=usr/share/man/man1/kinit.1.gz
+OLD_FILES+=usr/bin/klist
OLD_FILES+=usr/share/man/man1/klist.1.gz
+OLD_FILES+=usr/bin/kpasswd
OLD_FILES+=usr/share/man/man1/kpasswd.1.gz
+OLD_FILES+=usr/bin/krb5-config
OLD_FILES+=usr/share/man/man1/krb5-config.1.gz
+OLD_FILES+=usr/bin/kswitch
OLD_FILES+=usr/share/man/man1/kswitch.1.gz
-OLD_FILES+=usr/share/man/man3/HDB.3.gz
-OLD_FILES+=usr/share/man/man3/hdb__del.3.gz
-OLD_FILES+=usr/share/man/man3/hdb__get.3.gz
-OLD_FILES+=usr/share/man/man3/hdb__put.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_auth_status.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_check_constrained_delegation.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_check_pkinit_ms_upn_match.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_check_s4u2self.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_close.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_entry_ex.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_fetch_kvno.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_firstkey.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_free.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_get_realms.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_lock.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_name.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_nextkey.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_open.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_password.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_remove.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_rename.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_store.3.gz
-OLD_FILES+=usr/share/man/man3/hdb_unlock.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_build_ntlm1_master.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_build_ntlm2_master.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_calculate_lm2.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_calculate_ntlm1.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_calculate_ntlm2.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_decode_targetinfo.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_encode_targetinfo.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_encode_type1.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_encode_type2.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_encode_type3.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_free_buf.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_free_targetinfo.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_free_type1.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_free_type2.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_free_type3.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_keyex_unwrap.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_nt_key.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_ntlmv2_key.3.gz
-OLD_FILES+=usr/share/man/man3/heim_ntlm_verify_ntlm2.3.gz
-OLD_FILES+=usr/share/man/man3/hx509.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_bitstring_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_sign.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_sign_self.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_crl_dp_uri.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_eku.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_hostname.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_jid.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_ms_upn.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_otherName.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_pkinit.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_add_san_rfc822name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_ca.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_domaincontroller.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_notAfter.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_notBefore.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_proxy.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_serialnumber.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_spki.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_subject.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_template.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_set_unique.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_subject_expand.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ca_tbs_template_units.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_binary.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_check_eku.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_cmp.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_find_subjectAltName_otherName.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_SPKI.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_attribute.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_base_subject.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_friendly_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_issuer.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_issuer_unique_id.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_notAfter.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_notBefore.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_serialnumber.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_subject.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_get_subject_unique_id.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_init_data.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_keyusage_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_ref.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cert_set_friendly_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_add.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_append.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_end_seq.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_filter.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_find.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_info.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_iter_f.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_merge.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_next_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_start_seq.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_certs_store.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ci_print_names.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_clear_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_create_signed_1.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_envelope_1.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_unenvelope.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_unwrap_ContentInfo.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_verify_signed.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_cms_wrap_ContentInfo.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_context_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_context_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_context_set_missing_revoke.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crl_add_revoked_certs.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crl_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crl_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crl_lifetime.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crl_sign.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_crypto.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_add.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_add_binding.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_find.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_find_binding.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_env_lfind.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_err.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_error.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_free_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_free_octet_string_list.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_general_name_unparse.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_get_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_get_one_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_keyset.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_lock.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_misc.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_binary.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_cmp.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_copy.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_expand.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_is_null_p.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_to_Name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_name_to_string.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ocsp_request.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_ocsp_verify.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_oid_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_oid_sprint.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_parse_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer_info_add_cms_alg.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer_info_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer_info_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer_info_set_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_peer_info_set_cms_algs.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_print_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_print_stdout.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_match_cmp_func.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_match_eku.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_match_friendly_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_match_issuer_serial.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_match_option.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_statistic_file.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_query_unparse_stats.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_add_crl.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_add_ocsp.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_ocsp_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_revoke_verify.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_set_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_set_error_stringv.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_unparse_der_name.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_validate_cert.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_validate_ctx_add_flags.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_validate_ctx_free.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_validate_ctx_init.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_validate_ctx_set_print.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_attach_anchors.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_attach_revoke.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_destroy_ctx.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_hostname.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_init_ctx.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_path.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_set_max_depth.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_set_proxy_certificate.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_set_strict_rfc3280_verification.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_set_time.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_verify_signature.3.gz
-OLD_FILES+=usr/share/man/man3/hx509_xfree.3.gz
-OLD_FILES+=usr/share/man/man3/k_afs_cell_of_file.3.gz
-OLD_FILES+=usr/share/man/man3/k_hasafs.3.gz
-OLD_FILES+=usr/share/man/man3/k_pioctl.3.gz
-OLD_FILES+=usr/share/man/man3/k_setpag.3.gz
-OLD_FILES+=usr/share/man/man3/k_unlog.3.gz
-OLD_FILES+=usr/share/man/man3/kadm5_pwcheck.3.gz
-OLD_FILES+=usr/share/man/man3/kafs.3.gz
-OLD_FILES+=usr/share/man/man3/kafs5.3.gz
-OLD_FILES+=usr/share/man/man3/kafs_set_verbose.3.gz
-OLD_FILES+=usr/share/man/man3/kafs_settoken.3.gz
-OLD_FILES+=usr/share/man/man3/kafs_settoken5.3.gz
-OLD_FILES+=usr/share/man/man3/kafs_settoken_rxkad.3.gz
-OLD_FILES+=usr/share/man/man3/krb5.3.gz
-OLD_FILES+=usr/share/man/man3/krb524_convert_creds_kdc.3.gz
-OLD_FILES+=usr/share/man/man3/krb524_convert_creds_kdc_ccache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_425_conv_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_425_conv_principal_ext.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_524_conv_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_acc_ops.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_acl_match_file.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_acl_match_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_add_et_list.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_add_extra_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_add_ignore_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_addlog_dest.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_addlog_func.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_addr2sockaddr.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_address_compare.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_address_order.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_address_prefixlen_boundary.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_address_search.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_afslog.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_afslog_uid.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_allow_weak_crypto.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_aname_to_localname.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_anyaddr.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_appdefault.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_appdefault_boolean.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_appdefault_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_appdefault_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_append_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_genaddrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getaddrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getflags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getlocalsubkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getrcache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getremotesubkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_getuserkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_initivector.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setaddrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setaddrs_from_fd.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setflags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setivector.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setlocalsubkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setrcache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setremotesubkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_con_setuserkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_context.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_getauthenticator.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_getcksumtype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_getkeytype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_getlocalseqnumber.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_getremoteseqnumber.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_setcksumtype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_setkeytype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_setlocalseqnumber.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_auth_setremoteseqnumber.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_build_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_build_principal_ext.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_build_principal_va.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_build_principal_va_ext.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_c_enctype_compare.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_c_make_checksum.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_cache_end_seq_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_cache_get_first.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_cache_match.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_cache_next.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_clear_mcred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_close.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_copy_cache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_copy_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_copy_match_f.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_default_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_end_seq_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_gen_new.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_config.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_friendly_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_full_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_kdc_offset.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_lifetime.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_ops.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_prefix_ops.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_type.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_get_version.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_initialize.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_last_change_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_move.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_new_unique.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_next_cred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_register.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_remove_cred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_resolve.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_retrieve_cred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_set_config.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_set_default_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_set_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_set_friendly_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_set_kdc_offset.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_start_seq_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_store_cred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_support_switch.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cc_switch.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ccache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ccache_intro.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cccol_cursor_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cccol_cursor_new.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cccol_cursor_next.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cccol_last_change_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_change_password.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_check_transited.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_checksum_is_collision_proof.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_checksum_is_keyed.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_checksumsize.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_cksumtype_to_enctype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_clear_error_message.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_clear_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_closelog.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_compare_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_file_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_free_strings.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_bool.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_bool_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_list.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_string_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_strings.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_get_time_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_parse_file_multi.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_parse_string_multi.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_bool.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_bool_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_list.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_string_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_strings.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_config_vget_time_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_context.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_creds_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_host_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_keyblock.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_keyblock_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_copy_ticket.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_create_checksum.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_create_checksum_iov.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_credential.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_creds_get_ticket_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_fx_cf2.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_getblocksize.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_getconfoundersize.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_getenctype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_getpadsize.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_crypto_iov.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_cmp.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_copy.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_ct_cmp.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_realloc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_data_zero.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_decrypt.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_decrypt_EncryptedData.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_decrypt_iov_ivec.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_deprecated.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_digest.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_digest_probe.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_eai_to_heim_errno.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_encrypt.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_encrypt_EncryptedData.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_encrypt_iov_ivec.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_enctype_disable.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_enctype_enable.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_enctype_valid.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_enctypes_compatible_keys.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_error.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_expand_hostname.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_expand_hostname_realms.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_fcc_ops.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_fileformats.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_find_padata.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_config_files.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_context.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_cred_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_creds_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_data_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_host_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_keyblock.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_keyblock_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_krbhst.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_ticket.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_free_unparsed_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_fwd_tgt_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_generate_random_block.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_generate_subkey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_generate_subkey_extended.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_all_client_addrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_all_server_addrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_cred_from_kdc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_cred_from_kdc_opt.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_credentials.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_default_config_files.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_default_in_tkt_etypes.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_default_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_default_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_default_realms.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_dns_canonicalize_hostname.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_extra_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_fcache_version.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_forwarded_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_host_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_ignore_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_in_cred.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_in_tkt_with_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_in_tkt_with_password.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_in_tkt_with_skey.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_keyblock.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_opt_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_opt_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_opt_get_error.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_opt_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_init_creds_password.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_kdc_sec_offset.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_krb524hst.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_krb_admin_hst.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_krb_changepw_hst.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_krbhst.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_max_time_skew.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_use_admin_kdc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_get_validated_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_getportbyname.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_h_addr2addr.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_h_addr2sockaddr.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_h_errno_to_heim_errno.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_context.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_get_error.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_intro.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_set_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_set_password.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_set_service.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_creds_step.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_init_ets.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_initlog.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_introduction.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_is_config_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_is_thread_safe.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kerberos_enctypes.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keyblock_get_enctype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keyblock_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keyblock_zero.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytab_intro.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytab_key_proc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytype_to_enctypes.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytype_to_enctypes_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_keytype_to_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_format_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_get_addrinfo.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_next.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_next_as_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_krbhst_reset.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_add_entry.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_close.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_compare.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_copy_entry_contents.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_default_modify_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_default_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_destroy.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_end_seq_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_free_entry.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_get_entry.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_get_full_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_get_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_get_type.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_have_content.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_next_entry.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_read_service_key.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_register.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_remove_entry.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_resolve.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kt_start_seq_get.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_kuserok.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_log.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_log_msg.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_make_addrport.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_make_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_max_sockaddr_size.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_mcc_ops.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_mk_req.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_mk_safe.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_openlog.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_pac.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_pac_get_buffer.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_pac_verify.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_parse_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_parse_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_parse_name_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_parse_nametype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_password_key_proc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_plugin_register.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_prepend_config_files_default.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_princ_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_princ_set_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_compare.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_compare_any_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_get_comp_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_get_num_comp.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_get_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_get_type.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_intro.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_is_krbtgt.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_match.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_set_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_principal_set_type.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_print_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_random_to_key.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rcache.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_error.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_ctx.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_in_ctx_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_in_set_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_in_set_pac_check.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_out_ctx_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_req_out_get_server.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_rd_safe.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_realm_compare.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_addrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_authdata.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_creds_tag.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_int16.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_int32.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_int8.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_keyblock.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_stringz.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_times.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_uint16.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_uint32.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ret_uint8.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_config_files.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_default_in_tkt_etypes.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_default_realm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_dns_canonicalize_hostname.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_error_message.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_extra_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_fcache_version.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_home_dir_access.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_ignore_addresses.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_kdc_sec_offset.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_max_time_skew.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_password.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_real_time.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_set_use_admin_kdc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_sname_to_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_sock_to_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_sockaddr2address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_sockaddr2port.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_sockaddr_uninteresting.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_clear_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_emem.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_free.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_from_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_from_fd.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_from_mem.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_from_readonly_mem.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_get_byteorder.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_get_eof_code.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_is_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_read.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_seek.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_set_byteorder.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_set_eof_code.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_set_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_set_max_alloc.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_to_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_truncate.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_storage_write.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_address.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_addrs.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_authdata.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_creds_tag.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_data.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_int16.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_int32.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_int8.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_keyblock.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_principal.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_stringz.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_times.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_uint16.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_uint32.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_store_uint8.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_string_to_key.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_string_to_keytype.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_support.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket_get_authorization_data_type.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket_get_client.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket_get_endtime.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket_get_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_ticket_get_server.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_timeofday.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name_fixed_short.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_unparse_name_short.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_us_timeofday.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_v4compat.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_checksum.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_checksum_iov.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_init_creds.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_opt_init.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_flags.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_keytab.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_secure.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_opt_set_service.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_user.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_user_lrealm.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_verify_user_opt.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_vlog.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_vlog_msg.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_vset_error_string.3.gz
-OLD_FILES+=usr/share/man/man3/krb5_vwarn.3.gz
-OLD_FILES+=usr/share/man/man3/krb_afslog.3.gz
-OLD_FILES+=usr/share/man/man3/krb_afslog_uid.3.gz
-OLD_FILES+=usr/share/man/man3/ntlm_buf.3.gz
-OLD_FILES+=usr/share/man/man3/ntlm_core.3.gz
-OLD_FILES+=usr/share/man/man3/ntlm_type1.3.gz
-OLD_FILES+=usr/share/man/man3/ntlm_type2.3.gz
-OLD_FILES+=usr/share/man/man3/ntlm_type3.3.gz
-OLD_FILES+=usr/share/man/man5/krb5.conf.5.gz
-OLD_FILES+=usr/share/man/man8/hprop.8.gz
-OLD_FILES+=usr/share/man/man8/hpropd.8.gz
-OLD_FILES+=usr/share/man/man8/iprop-log.8.gz
-OLD_FILES+=usr/share/man/man8/iprop.8.gz
-OLD_FILES+=usr/share/man/man8/kadmin.8.gz
-OLD_FILES+=usr/share/man/man8/kadmind.8.gz
-OLD_FILES+=usr/share/man/man8/kcm.8.gz
-OLD_FILES+=usr/share/man/man8/kdc.8.gz
-OLD_FILES+=usr/share/man/man8/kdigest.8.gz
-OLD_FILES+=usr/share/man/man8/kerberos.8.gz
-OLD_FILES+=usr/share/man/man8/kimpersonate.8.gz
-OLD_FILES+=usr/share/man/man8/kpasswdd.8.gz
-OLD_FILES+=usr/share/man/man8/kstash.8.gz
-OLD_FILES+=usr/share/man/man8/ktutil.8.gz
-OLD_FILES+=usr/share/man/man8/string2key.8.gz
-OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz
-.else
-# Remove MIT KRB5 because we do not want Kerberos
-OLD_FILES+=usr/bin/compile_et
-OLD_FILES+=usr/bin/gss-client
-OLD_FILES+=usr/bin/k5srvutil
-OLD_FILES+=usr/bin/kadmin
-OLD_FILES+=usr/bin/kdestroy
-OLD_FILES+=usr/bin/kinit
-OLD_FILES+=usr/bin/klist
-OLD_FILES+=usr/bin/kpasswd
-OLD_FILES+=usr/bin/krb5-config
+# MIT has a manpage for this, Heimdal does not.
OLD_FILES+=usr/bin/ksu
-OLD_FILES+=usr/bin/kswitch
-OLD_FILES+=usr/bin/ktutil
-OLD_FILES+=usr/bin/kvno
-OLD_FILES+=usr/bin/sclient
-OLD_FILES+=usr/bin/sim_client
-OLD_FILES+=usr/bin/uuclient
-OLD_FILES+=etc/rc.d/kpropd
+
OLD_FILES+=usr/include/com_err.h
-OLD_FILES+=usr/include/common.h
-OLD_FILES+=usr/include/edwards25519_fiat.h
-OLD_FILES+=usr/include/edwards25519_tables.h
-OLD_FILES+=usr/include/groups.h
OLD_FILES+=usr/include/gssapi.h
OLD_FILES+=usr/include/gssapi/gssapi.h
-OLD_FILES+=usr/include/gssapi/gssapi_alloc.h
-OLD_FILES+=usr/include/gssapi/gssapi_ext.h
-OLD_FILES+=usr/include/gssapi/gssapi_generic.h
OLD_FILES+=usr/include/gssapi/gssapi_krb5.h
-OLD_FILES+=usr/include/gssapi/mechglue.h
-OLD_FILES+=usr/include/gssrpc/auth.h
-OLD_FILES+=usr/include/gssrpc/auth_gss.h
-OLD_FILES+=usr/include/gssrpc/auth_gssapi.h
-OLD_FILES+=usr/include/gssrpc/auth_unix.h
-OLD_FILES+=usr/include/gssrpc/clnt.h
-OLD_FILES+=usr/include/gssrpc/netdb.h
-OLD_FILES+=usr/include/gssrpc/pmap_clnt.h
-OLD_FILES+=usr/include/gssrpc/pmap_prot.h
-OLD_FILES+=usr/include/gssrpc/pmap_rmt.h
-OLD_FILES+=usr/include/gssrpc/rename.h
-OLD_FILES+=usr/include/gssrpc/rpc.h
-OLD_FILES+=usr/include/gssrpc/rpc_msg.h
-OLD_FILES+=usr/include/gssrpc/svc.h
-OLD_FILES+=usr/include/gssrpc/svc_auth.h
-OLD_FILES+=usr/include/gssrpc/types.h
-OLD_FILES+=usr/include/gssrpc/xdr.h
-OLD_FILES+=usr/include/iana.h
OLD_FILES+=usr/include/kadm5/admin.h
-OLD_FILES+=usr/include/kadm5/chpass_util_strings.h
-OLD_FILES+=usr/include/kadm5/kadm_err.h
-OLD_FILES+=usr/include/kdb.h
-OLD_FILES+=usr/include/krad.h
OLD_FILES+=usr/include/krb5.h
-OLD_FILES+=usr/include/krb5/ccselect_plugin.h
-OLD_FILES+=usr/include/krb5/certauth_plugin.h
-OLD_FILES+=usr/include/krb5/clpreauth_plugin.h
-OLD_FILES+=usr/include/krb5/hostrealm_plugin.h
-OLD_FILES+=usr/include/krb5/kadm5_auth_plugin.h
-OLD_FILES+=usr/include/krb5/kadm5_hook_plugin.h
-OLD_FILES+=usr/include/krb5/kdcpolicy_plugin.h
-OLD_FILES+=usr/include/krb5/kdcpreauth_plugin.h
-OLD_FILES+=usr/include/krb5/krb5.h
-OLD_FILES+=usr/include/krb5/localauth_plugin.h
OLD_FILES+=usr/include/krb5/locate_plugin.h
-OLD_FILES+=usr/include/krb5/plugin.h
-OLD_FILES+=usr/include/krb5/preauth_plugin.h
-OLD_FILES+=usr/include/krb5/pwqual_plugin.h
-OLD_FILES+=usr/include/profile.h
-OLD_FILES+=usr/include/trace.h
-OLD_FILES+=usr/include/util.h
-OLD_FILES+=usr/include/verto-module.h
-OLD_FILES+=usr/include/verto.h
-OLD_FILES+=usr/lib/krb5/plugins/kdb/db2.so
-OLD_FILES+=usr/lib/krb5/plugins/preauth/otp.so
-OLD_FILES+=usr/lib/krb5/plugins/preauth/pkinit.so
-OLD_FILES+=usr/lib/krb5/plugins/preauth/spake.so
-OLD_FILES+=usr/lib/krb5/plugins/preauth/test.so
-OLD_FILES+=usr/lib/krb5/plugins/tls/k5tls.so
+
OLD_FILES+=usr/lib/libcom_err.a
-OLD_LIBS+=usr/lib/libcom_err.so
-OLD_LIBS+=usr/lib/libcom_err.so.122
+OLD_FILES+=usr/lib/libcom_err.so
+OLD_FILES+=usr/lib/libgssapi_krb5.a
OLD_FILES+=usr/lib/libgssapi_krb5.so
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.122
-OLD_FILES+=usr/lib/libgssrpc.so
-OLD_LIBS+=usr/lib/libgssrpc.so.122
-OLD_FILES+=usr/lib/libk5crypto.so
-OLD_LIBS+=usr/lib/libk5crypto.so.122
OLD_FILES+=usr/lib/libkadm5clnt.so
-OLD_FILES+=usr/lib/libkadm5clnt_mit.so
-OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.122
-OLD_FILES+=usr/lib/libkadm5srv.so
-OLD_FILES+=usr/lib/libkadm5srv_mit.so
-OLD_LIBS+=usr/lib/libkadm5srv_mit.so.122
-OLD_FILES+=usr/lib/libkdb5.so
-OLD_LIBS+=usr/lib/libkdb5.so.122
-OLD_FILES+=usr/lib/libkrad.so
-OLD_LIBS+=usr/lib/libkrad.so.122
+OLD_FILES+=usr/lib/libkrb5.a
OLD_FILES+=usr/lib/libkrb5.so
-OLD_LIBS+=usr/lib/libkrb5.so.122
-OLD_FILES+=usr/lib/libkrb5profile.a
-OLD_FILES+=usr/lib/libkrb5profile.so
-OLD_LIBS+=usr/lib/libkrb5profile.so.122
-OLD_FILES+=usr/lib/libkrb5support.a
-OLD_FILES+=usr/lib/libkrb5support.so
-OLD_LIBS+=usr/lib/libkrb5support.so.122
-OLD_FILES+=usr/lib/libverto.so
-OLD_LIBS+=usr/lib/libverto.so.122
-OLD_FILES+=usr/libdata/pkgconfig/gssrpc.pc
-OLD_FILES+=usr/libdata/pkgconfig/kadm-client.pc
-OLD_FILES+=usr/libdata/pkgconfig/kadm-server.pc
-OLD_FILES+=usr/libdata/pkgconfig/kdb.pc
-OLD_FILES+=usr/libdata/pkgconfig/krb5-gssapi.pc
-OLD_FILES+=usr/libdata/pkgconfig/krb5.pc
-OLD_FILES+=usr/libdata/pkgconfig/mit-krb5-gssapi.pc
-OLD_FILES+=usr/libdata/pkgconfig/mit-krb5.pc
-OLD_FILES+=usr/libexec/krb5kdc
+OLD_FILES+=usr/lib/librpcsec_gss.a
+OLD_FILES+=usr/lib/librpcsec_gss.so
+OLD_LIBS+=usr/lib/librpcsec_gss.so.1
+OLD_FILES+=usr/lib/pam_krb5.so
+OLD_LIBS+=usr/lib/pam_krb5.so.6
+OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz
+OLD_FILES+=usr/lib/pam_ksu.so
+OLD_LIBS+=usr/lib/pam_ksu.so.6
+OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz
+
OLD_FILES+=usr/libexec/kadmind
-OLD_FILES+=usr/libexec/kprop
-OLD_FILES+=usr/libexec/kpropd
-OLD_FILES+=usr/sbin/gss-server
-OLD_FILES+=usr/sbin/kadmin.local
-OLD_FILES+=usr/sbin/kdb5_util
-OLD_FILES+=usr/sbin/kproplog
-OLD_FILES+=usr/sbin/krb5-send-pr
-OLD_FILES+=usr/sbin/sim_server
-OLD_FILES+=usr/sbin/sserver
-OLD_FILES+=usr/sbin/uuserver
-OLD_FILES+=usr/share/doc/krb5/doc/html/.buildinfo
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/agogo.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/basic.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/bgfooter.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/bgtop.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/doctools.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/documentation_options.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/file.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/jquery.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/kerb.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/language_data.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/minus.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/plus.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/pygments.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/searchtools.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/underscore.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/about.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/k5srvutil.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kadmin_local.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kadmind.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kdb5_ldap_util.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kdb5_util.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kprop.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kpropd.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kproplog.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/krb5kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/ktutil.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/sserver.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/advanced/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/advanced/retiring-des.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/appl_servers.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/auth_indicator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/backup_host.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/kadm5_acl.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/kdc_conf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/krb5_conf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_ldap.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/database.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/dbtypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/dictionary.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/env_variables.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/host_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/https.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_appl_srv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_clients.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/lockout.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/otp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/pkinit.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/princ_dns.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/realm_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/spake.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/troubleshoot.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/various_envs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/gssapi.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/h5l_mit_apidiff.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/init_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/princ_handle.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_425_conv_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_524_conv_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_524_convert_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_order.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_search.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_allow_weak_crypto.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_aname_to_localname.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_anonymous_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_anonymous_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_appdefault_boolean.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_appdefault_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_genaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_get_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getauthenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getflags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getlocalseqnumber.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getlocalsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrecvsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrecvsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getremoteseqnumber.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getremotesubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getsendsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getsendsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_initivector.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_set_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_set_req_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setflags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setports.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrecvsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrecvsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setsendsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setsendsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setuseruserkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_alloc_va.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_va.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_block_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_checksum_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_crypto_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_crypto_length_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_decrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_derive_prfplus.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_enctype_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_free_state.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_fx_cf2_simple.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_init_state.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_is_coll_proof_cksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_is_keyed_cksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_keyed_checksum_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_keylengths.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_padding_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prf_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prfplus.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_add_entropy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_make_octets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_os_entropy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_seed.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_string_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_string_to_key_with_params.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_valid_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_valid_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_verify_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_calculate_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_cache_match.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_close.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_copy_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_destroy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_dup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_end_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_gen_new.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_full_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_initialize.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_move.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_new_unique.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_next_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_remove_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_resolve.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_retrieve_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_select.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_start_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_store_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_support_switch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_switch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_new.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_next.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_have_content.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_change_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_check_clockskew.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_checksum_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_chpw_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cksumtype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_clear_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_addresses.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_keyblock_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decode_authdata_container.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decode_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_deltat_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_eblock_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encode_authdata_container.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encrypt_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_enctype_to_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_enctype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_expand_hostname.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_find_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_finish_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_finish_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_addresses.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_ap_rep_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_checksum_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_cksumtypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_cred_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_data_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keyblock_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keytab_entry_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_tgt_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_unparsed_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_fwd_tgt_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials_renew.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials_validate.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_etype_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_fallback_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_skey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_alloc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_get_fast_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_address_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_anonymous.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_canonicalize.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_change_password_prompt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_etype_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_expire_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_ccache_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_forwardable.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_in_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_out_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_pa.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_pac_request.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_preauth_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_proxiable.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_renew_life.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_responder.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_salt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_tkt_life.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_permitted_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_prompt_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_renewed_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_server_rcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_time_offsets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_validated_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_context_profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_service.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_step.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_secure_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_config_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_referral_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_thread_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_create_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_decrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_encrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_free_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_key_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_key_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_make_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_make_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_prf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_reference_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_verify_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kdc_sign_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kdc_verify_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_add_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_client_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_close.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_dup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_end_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_free_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_have_content.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_next_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_read_service_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_remove_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_resolve.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_start_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kuserok.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_make_authdata_kdc_issued.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_marshal_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_merge_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_1cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_ncred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_priv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_rep_dce.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_req_extended.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_os_localaddr.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_add_buffer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_buffer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_client_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_parse.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_sign.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_sign_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_verify.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_verify_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_parse_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_parse_name_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_prepend_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal2salt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare_any_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_process_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_prompter_posix.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_priv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_rep_dce.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_read_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_realm_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_recvauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_recvauth_version.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_list_questions.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_challenge_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_challenge_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_salttype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sendauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_server_decrypt_ticket_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_default_tgs_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_kdc_recv_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_kdc_send_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_password_using_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_principal_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_real_time.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_trace_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_trace_filename.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sname_match.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sname_to_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_deltat.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_salttype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_timestamp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timeofday.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timestamp_to_sfstring.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timestamp_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_step.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unmarshal_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_flags_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_us_timeofday.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_use_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_authdata_kdc_issued.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds_opt_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds_opt_set_ap_req_nofail.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vprepend_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vset_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vwrap_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_wrap_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_ADDRPORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_CHAOS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_DDP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_INET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_INET6.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_IPPORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_ISO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_IS_LOCAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_NETBIOS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_XNS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_EXTERNAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_FIELD_TYPE_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_REGISTERED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_RESERVED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_ETYPE_NEGOTIATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_MUTUAL_REQUIRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_RESERVED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_USE_SESSION_KEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_USE_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_WIRE_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CMAC_CAMELLIA128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CMAC_CAMELLIA256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CRC32.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_DESCBC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_MD5_ARCFOUR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_96_AES128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_96_AES256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_DES3.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA256_128_AES128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA384_192_AES256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_MD5_HMAC_ARCFOUR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_NIST_SHA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD4_DES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD5.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD5_DES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES128_CTS_HMAC_SHA1_96.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES128_CTS_HMAC_SHA256_128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES256_CTS_HMAC_SHA1_96.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES256_CTS_HMAC_SHA384_192.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_ARCFOUR_HMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_ARCFOUR_HMAC_EXP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_CAMELLIA128_CTS_CMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_CAMELLIA256_CTS_CMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_RAW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_SHA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_CRC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_MD4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_MD5.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_RAW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_HMAC_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DSA_SHA1_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_MD5_RSA_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_NULL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RC2_CBC_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RSA_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RSA_ES_OAEP_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_SHA1_RSA_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_UNKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_ALLOW_POSTDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_CNAME_IN_ADDL_TKT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_DISABLE_TRANSITED_CHECK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_ENC_TKT_IN_SKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_FORWARDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_POSTDATED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_PROXY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEWABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEWABLE_OK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_REQUEST_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_VALIDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_TKT_COMMON_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ANONYMOUS_PRINCSTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ANONYMOUS_REALMSTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AP_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AP_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AND_OR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AP_OPTIONS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AUTH_INDICATOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_CAMMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_ETYPE_NEGOTIATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_FX_ARMOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_IF_RELEVANT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_INITIAL_VERIFIED_CAS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_KDC_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_MANDATORY_FOR_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_OSF_DCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_SESAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_SIGNTICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_WIN2K_PAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_DO_SEQUENCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_DO_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_PERMIT_ALL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_RET_SEQUENCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_RET_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_USE_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_DATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_EMPTY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_HEADER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_PADDING.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_SIGN_ONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_STREAM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_TRAILER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CYBERSAFE_SECUREID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_DOMAIN_X500_COMPRESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ENCPADATA_REQ_ENC_PA_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_FAST_REQUIRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CACHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CONSTRAINED_DELEGATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_NO_STORE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_NO_TRANSIT_CHECK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_USER_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_TKT_LIFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CONTEXT_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CONTEXT_SECURE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CREDS_STEP_FLAG_CONTINUE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT16_MAX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT16_MIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT32_MAX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT32_MIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_ITE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_MTE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_SIGNEDPATH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_APP_DATA_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_APP_DATA_ENCRYPT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REP_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REQ_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REP_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_CAMMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_ENC_CHALLENGE_CLIENT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_ENC_CHALLENGE_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_ENC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_FINISHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_REQ_CHKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_MIC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_IAKERB_FINISHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KDC_REP_TICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_CRED_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_ERROR_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_PRIV_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_SAFE_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_AS_FRESHNESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_FX_COOKIE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_OTP_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_PKINIT_KX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_S4U_X509_USER_REPLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_S4U_X509_USER_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_SPAKE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_ACCESSDENIED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_AUTHERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_BAD_VERSION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_HARDERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_INITIAL_FLAG_NEEDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_MALFORMED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_SOFTERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_SUCCESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_ACCT_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_RENEWAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_TGT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_TGT_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_PW_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_NONE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_ACCT_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_RENEWAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_TGT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_TGT_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_PW_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_ENTERPRISE_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_ENT_PRINCIPAL_AND_ID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_MS_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_MS_PRINCIPAL_AND_ID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SMTP_NAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_HST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_INST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_XHST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_UID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_UNKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_WELLKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_X500_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_ATTRIBUTES_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CLIENT_CLAIMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CLIENT_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CREDENTIALS_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DELEGATION_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DEVICE_CLAIMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DEVICE_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_FULL_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_LOGON_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_PRIVSVR_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_REQUESTOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_SERVER_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_TICKET_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_UPN_DNS_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AFS3_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AP_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AS_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AS_FRESHNESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENCRYPTED_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_SANDIA_SECURID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_TIMESTAMP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_UNIX_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ETYPE_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ETYPE_INFO2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FOR_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_COOKIE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_ERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_FAST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_GET_FROM_TYPED_DATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_NONE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OSF_DCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_PIN_CHANGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PAC_OPTIONS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PAC_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PKINIT_KX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REP_OLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REQ_OLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PW_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REDHAT_IDP_OAUTH2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REDHAT_PASSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REFERRAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_S4U_X509_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_CHALLENGE_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_REDIRECT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_RESPONSE_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SESAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SPAKE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SVR_REFERRAL_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_TGS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_USE_SPECIFIED_KVNO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_CASEFOLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_ENTERPRISE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_IGNORE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_UTF8.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_ENTERPRISE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_IGNORE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_NO_DEF_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_NO_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_REQUIRE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_DISPLAY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_NO_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_SHORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRIV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_NEW_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_PREAUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PVNO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_REALM_BRANCH_CHAR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RECVAUTH_BADAUTHVERS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RECVAUTH_SKIP_VERSION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_REFERRAL_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_COLLECT_PIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_COLLECT_TOKEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_NEXTOTP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_SEPARATE_PIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_ALPHANUMERIC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_DECIMAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_HEXADECIMAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_COUNT_LOW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_FINAL_TRY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_LOCKED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_OTP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_PKINIT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_MUST_PK_ENCRYPT_SAD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_SEND_ENCRYPTED_SAD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_USE_SAD_AS_KEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_2ND_TKT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_AUTHDATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_FLAGS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_FLAGS_EXACT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_IS_SKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_KTYPE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_SRV_NAMEONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_TIMES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_TIMES_EXACT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_NOTICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_OPENCLOSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_SUPPORTED_KTYPES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_NAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_NAME_SIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TKT_CREDS_STEP_FLAG_CONTINUE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_WELLKNOWN_NAMESTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/LR_TYPE_INTERPRETATION_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/LR_TYPE_THIS_SERVER_ONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MAX_KEYTAB_NAME_LEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MSEC_DIRBIT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MSEC_VAL_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/SALT_TYPE_AFS_LENGTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/SALT_TYPE_NO_LENGTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/THREEPARAMOPEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_ENC_PA_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_FORWARDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_HW_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_INVALID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_MAY_POSTDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_OK_AS_DELEGATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_POSTDATED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PRE_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PROXY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_RENEWABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_TRANSIT_POLICY_CHECKED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/VALID_INT_BITS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/VALID_UINT_BITS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb524_convert_creds_kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb524_init_ets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_const.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_component.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_roundup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_x.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_xc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_address.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_addrtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_rep_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_auth_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authdatatype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_boolean.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cc_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cccol_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_const_pointer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_const_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_crypto_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cryptotype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_deltat.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_kdc_rep_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_tkt_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_encrypt_block.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_error_code.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_expire_callback_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_get_init_creds_opt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_gic_opt_pa_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_init_creds_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_int16.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_int32.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kdc_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kdc_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keytab_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keyusage.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kt_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kvno.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_last_req_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_magic.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_mk_req_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_msgtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_octet.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_pac_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_server_referral_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_svr_referral_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pac.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pointer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_post_recv_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pre_send_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_preauthtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_principal_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompt_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompter_fct.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pwd_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_rcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_replay_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_otp_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_otp_tokeninfo.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_pkinit_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_pkinit_identity.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_response.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ticket_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_timestamp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_tkt_authent.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_tkt_creds_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_trace_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_trace_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_transited.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_typed_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ui_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ui_4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_verify_init_creds_opt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/passwd_phrase_element.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/y2038.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/ccache_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/date_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/keytab_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/rcache_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/stash_file_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/directory_org.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/doing_build.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/options2configure.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/osconf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build_this.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/copyright.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/ccache_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/cookie.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/freshness_token.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/keytab_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/rcache_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-A.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-C.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-E.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-K.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-L.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-M.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-P.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-R.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-S.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-T.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-V.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-all.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5defaults.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5features.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5license.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/objects.inv
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/ccselect.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/certauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/clpreauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/general.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/gssapi.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/hostrealm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/internal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kadm5_auth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kadm5_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kdcpolicy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kdcpreauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/localauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/locate.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/pwqual.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/resources.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/search.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/searchindex.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/pwd_mgmt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/tkt_mgmt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kdestroy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kinit.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/klist.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kpasswd.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/krb5-config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/ksu.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kswitch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kvno.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/sclient.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/k5identity.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/k5login.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/kerberos.html
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/GMakefile
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LICRcyr2utf8.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LICRlatin2utf8.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LatinRules.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/admin.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/admin.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/appdev.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/appdev.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/basic.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/basic.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/build.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/build.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/latexmkjarc
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/latexmkrc
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/make.bat
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/plugindev.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/plugindev.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/python.ist
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinx.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinx.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxhighlight.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxhowto.cls
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexadmonitions.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexcontainers.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexgraphics.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexindbibtoc.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexlists.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexliterals.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexnumfig.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexobjects.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexshadowbox.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstyleheadings.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstylepage.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstyletext.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatextables.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxmanual.cls
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxmessages.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxoptionsgeometry.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxoptionshyperref.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxpackagecyrillic.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxpackagefootnote.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/user.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/user.tex
-OLD_FILES+=usr/share/et/et_c.awk
-OLD_FILES+=usr/share/et/et_h.awk
-OLD_FILES+=usr/share/examples/krb5/kdc.conf
-OLD_FILES+=usr/share/examples/krb5/krb5.conf
-OLD_FILES+=usr/share/examples/krb5/services.append
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/LICENSE
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/MIT
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/catalog.mk
-OLD_FILES+=usr/share/locale/de/LC_MESSAGES/mit-krb5.mo
-OLD_FILES+=usr/share/locale/en_US/LC_MESSAGES/mit-krb5.mo
-OLD_FILES+=usr/share/locale/ka/LC_MESSAGES/mit-krb5.mo
-OLD_FILES+=usr/share/man/man1/compile_et.1.gz
-OLD_FILES+=usr/share/man/man1/k5srvutil.1.gz
-OLD_FILES+=usr/share/man/man1/kadmin.1.gz
-OLD_FILES+=usr/share/man/man1/kdestroy.1.gz
-OLD_FILES+=usr/share/man/man1/kinit.1.gz
-OLD_FILES+=usr/share/man/man1/klist.1.gz
-OLD_FILES+=usr/share/man/man1/kpasswd.1.gz
-OLD_FILES+=usr/share/man/man1/krb5-config.1.gz
-OLD_FILES+=usr/share/man/man1/ksu.1.gz
-OLD_FILES+=usr/share/man/man1/kswitch.1.gz
-OLD_FILES+=usr/share/man/man1/ktutil.1.gz
-OLD_FILES+=usr/share/man/man1/kvno.1.gz
-OLD_FILES+=usr/share/man/man1/sclient.1.gz
-OLD_FILES+=usr/share/man/man5/.k5identity.5.gz
-OLD_FILES+=usr/share/man/man5/.k5login.5.gz
-OLD_FILES+=usr/share/man/man5/k5identity.5.gz
-OLD_FILES+=usr/share/man/man5/k5login.5.gz
-OLD_FILES+=usr/share/man/man5/kadm5.acl.5.gz
-OLD_FILES+=usr/share/man/man5/kdc.conf.5.gz
-OLD_FILES+=usr/share/man/man5/krb5.conf.5.gz
-OLD_FILES+=usr/share/man/man7/kerberos.7.gz
-OLD_FILES+=usr/share/man/man8/kadmin.local.8.gz
OLD_FILES+=usr/share/man/man8/kadmind.8.gz
-OLD_FILES+=usr/share/man/man8/kdb5_ldap_util.8.gz
-OLD_FILES+=usr/share/man/man8/kdb5_util.8.gz
-OLD_FILES+=usr/share/man/man8/kprop.8.gz
-OLD_FILES+=usr/share/man/man8/kpropd.8.gz
-OLD_FILES+=usr/share/man/man8/kproplog.8.gz
-OLD_FILES+=usr/share/man/man8/krb5kdc.8.gz
-OLD_FILES+=usr/share/man/man8/sserver.8.gz
-.endif
-.else
-.if ${MK_MITKRB5} != "no"
-# Remove Heimdal because we want MIT KRB5 but not Heimdal
-OLD_FILES+=etc/gss/qop
-OLD_FILES+=etc/rc.d/ipropd_master
-OLD_FILES+=etc/rc.d/ipropd_slave
+
+OLD_FILES+=usr/share/man/man3/com_err.3.gz
+OLD_FILES+=usr/share/man/man3/rpcsec_gss.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_get_error.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_get_mech_info.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_get_mechanisms.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_get_principal_name.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_get_versions.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_getcred.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_is_installed.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_max_data_length.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_mech_to_oid.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_oid_to_mech.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_qop_to_num.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_seccreate.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_set_callback.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_set_defaults.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_set_svc_name.3.gz
+OLD_FILES+=usr/share/man/man3/rpc_gss_svc_max_data_length.3.gz
+OLD_FILES+=usr/share/man/man5/krb5.conf.5.gz
+.endif # ${MK_KERBEROS} == "no"
+
+# Heimdal-specific files that don't exist in MIT Kerberos. These should be
+# removed if Kerberos is disabled, or if MIT Kerberos is selected.
+.if ${MK_KERBEROS} == "no" || ${MK_MITKRB5} != "no"
+
+# compile_et is a binary in Heimdal, but a shell script in MIT Kerberos.
+# When switching from Heimdal to MIT, we need to remove the debug symbols
+# explicitly.
+OLD_FILES+=usr/lib/debug/usr/bin/compile_et.debug
+
OLD_FILES+=usr/bin/asn1_compile
OLD_FILES+=usr/bin/hxtool
OLD_FILES+=usr/bin/kcc
@@ -4856,16 +2760,13 @@ OLD_FILES+=usr/include/asn1-common.h
OLD_FILES+=usr/include/asn1_err.h
OLD_FILES+=usr/include/base64.h
OLD_FILES+=usr/include/cms_asn1.h
-OLD_FILES+=usr/include/common.h
+OLD_FILES+=usr/include/com_right.h
OLD_FILES+=usr/include/crmf_asn1.h
OLD_FILES+=usr/include/der-private.h
OLD_FILES+=usr/include/der-protos.h
OLD_FILES+=usr/include/der.h
OLD_FILES+=usr/include/digest_asn1.h
-OLD_FILES+=usr/include/edwards25519_fiat.h
-OLD_FILES+=usr/include/edwards25519_tables.h
OLD_FILES+=usr/include/getarg.h
-OLD_FILES+=usr/include/groups.h
OLD_FILES+=usr/include/hdb-protos.h
OLD_FILES+=usr/include/hdb.h
OLD_FILES+=usr/include/hdb_asn1.h
@@ -4881,7 +2782,6 @@ OLD_FILES+=usr/include/hx509-private.h
OLD_FILES+=usr/include/hx509-protos.h
OLD_FILES+=usr/include/hx509.h
OLD_FILES+=usr/include/hx509_err.h
-OLD_FILES+=usr/include/iana.h
OLD_FILES+=usr/include/k524_err.h
OLD_FILES+=usr/include/kadm5/kadm5-private.h
OLD_FILES+=usr/include/kadm5/kadm5-protos.h
@@ -4914,86 +2814,43 @@ OLD_FILES+=usr/include/pkinit_asn1.h
OLD_FILES+=usr/include/resolve.h
OLD_FILES+=usr/include/rfc2459_asn1.h
OLD_FILES+=usr/include/roken-common.h
+OLD_FILES+=usr/include/roken.h
OLD_FILES+=usr/include/rtbl.h
-OLD_FILES+=usr/include/trace.h
-OLD_FILES+=usr/include/util.h
OLD_FILES+=usr/include/wind.h
OLD_FILES+=usr/include/wind_err.h
OLD_FILES+=usr/include/xdbm.h
OLD_FILES+=usr/lib/libasn1.a
OLD_FILES+=usr/lib/libasn1.so
-OLD_LIBS+=usr/lib/libasn1.so.11
-OLD_FILES+=usr/lib/libasn1_p.a
-OLD_LIBS+=usr/lib/libcom_err.so.5
-OLD_FILES+=usr/lib/libcom_err_p.a
-OLD_LIBS+=usr/lib/libgssapi.a
-OLD_LIBS+=usr/lib/libgssapi.so.10
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.10
-OLD_FILES+=usr/lib/libgssapi_krb5_p.a
-OLD_FILES+=usr/lib/libgssapi_mech.a
-OLD_FILES+=usr/lib/libgssapi_mech.so
-OLD_LIBS+=usr/lib/libgssapi_mech.so.10
+OLD_FILES+=usr/lib/libgssapi.a
+OLD_FILES+=usr/lib/libgssapi.so
OLD_FILES+=usr/lib/libgssapi_ntlm.a
OLD_FILES+=usr/lib/libgssapi_ntlm.so
-OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10
-OLD_FILES+=usr/lib/libgssapi_ntlm_p.a
OLD_FILES+=usr/lib/libgssapi_spnego.a
OLD_FILES+=usr/lib/libgssapi_spnego.so
-OLD_LIBS+=usr/lib/libgssapi_spnego.so.10
-OLD_FILES+=usr/lib/libgssapi_spnego_p.a
OLD_FILES+=usr/lib/libhdb.a
OLD_FILES+=usr/lib/libhdb.so
-OLD_LIBS+=usr/lib/libhdb.so.11
-OLD_FILES+=usr/lib/libhdb_p.a
OLD_FILES+=usr/lib/libheimbase.a
OLD_FILES+=usr/lib/libheimbase.so
-OLD_LIBS+=usr/lib/libheimbase.so.11
-OLD_FILES+=usr/lib/libheimbase_p.a
OLD_FILES+=usr/lib/libheimntlm.a
OLD_FILES+=usr/lib/libheimntlm.so
-OLD_LIBS+=usr/lib/libheimntlm.so.11
-OLD_FILES+=usr/lib/libheimntlm_p.a
-OLD_FILES+=usr/lib/libheimsqlite.a
-OLD_FILES+=usr/lib/libheimsqlite.so
-OLD_LIBS+=usr/lib/libheimsqlite.so.11
-OLD_FILES+=usr/lib/libheimsqlite_p.a
OLD_FILES+=usr/lib/libhx509.a
OLD_FILES+=usr/lib/libhx509.so
-OLD_LIBS+=usr/lib/libhx509.so.11
-OLD_FILES+=usr/lib/libhx509_p.a
OLD_FILES+=usr/lib/libkadm5clnt.a
-OLD_LIBS+=usr/lib/libkadm5clnt.so.11
-OLD_FILES+=usr/lib/libkadm5clnt_p.a
OLD_FILES+=usr/lib/libkadm5srv.a
OLD_FILES+=usr/lib/libkadm5srv.so
-OLD_LIBS+=usr/lib/libkadm5srv.so.11
-OLD_FILES+=usr/lib/libkadm5srv_p.a
OLD_FILES+=usr/lib/libkafs5.a
OLD_FILES+=usr/lib/libkafs5.so
-OLD_LIBS+=usr/lib/libkafs5.so.11
-OLD_FILES+=usr/lib/libkafs5_p.a
OLD_FILES+=usr/lib/libkdc.a
OLD_FILES+=usr/lib/libkdc.so
-OLD_LIBS+=usr/lib/libkdc.so.11
-OLD_FILES+=usr/lib/libkdc_p.a
-OLD_LIBS+=usr/lib/libkrb5.so.11
-OLD_FILES+=usr/lib/libkrb5_p.a
-OLD_FILES+=usr/lib/libroken.a
-OLD_FILES+=usr/lib/libroken.so
-OLD_LIBS+=usr/lib/libroken.so.11
-OLD_FILES+=usr/lib/libroken_p.a
-OLD_FILES+=usr/lib/libwind.a
-OLD_FILES+=usr/lib/libwind.so
-OLD_LIBS+=usr/lib/libwind.so.11
-OLD_FILES+=usr/lib/libwind_p.a
OLD_FILES+=usr/lib/libprivateheimipcc.a
OLD_FILES+=usr/lib/libprivateheimipcc.so
-OLD_LIBS+=usr/lib/libprivateheimipcc.so.11
-OLD_FILES+=usr/lib/libprivateheimipcc_p.a
OLD_FILES+=usr/lib/libprivateheimipcs.a
OLD_FILES+=usr/lib/libprivateheimipcs.so
-OLD_LIBS+=usr/lib/libprivateheimipcs.so.11
-OLD_FILES+=usr/lib/libprivateheimipcs_p.a
+OLD_FILES+=usr/lib/libroken.a
+OLD_FILES+=usr/lib/libroken.so
+OLD_FILES+=usr/lib/libwind.a
+OLD_FILES+=usr/lib/libwind.so
+OLD_FILES+=usr/lib/libwind.so.11
OLD_FILES+=usr/libexec/digest-service
OLD_FILES+=usr/libexec/hprop
OLD_FILES+=usr/libexec/hpropd
@@ -5005,11 +2862,51 @@ OLD_FILES+=usr/libexec/kdigest
OLD_FILES+=usr/libexec/kfd
OLD_FILES+=usr/libexec/kimpersonate
OLD_FILES+=usr/libexec/kpasswdd
+OLD_FILES+=usr/sbin/iprop-log
OLD_FILES+=usr/sbin/kstash
OLD_FILES+=usr/sbin/ktutil
-OLD_FILES+=usr/sbin/iprop-log
OLD_FILES+=usr/share/man/man1/kf.1.gz
+OLD_FILES+=usr/share/man/man1/kgetcred.1.gz
OLD_FILES+=usr/share/man/man3/HDB.3.gz
+OLD_FILES+=usr/share/man/man3/gss_accept_sec_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_acquire_cred.3.gz
+OLD_FILES+=usr/share/man/man3/gss_add_cred.3.gz
+OLD_FILES+=usr/share/man/man3/gss_add_oid_set_member.3.gz
+OLD_FILES+=usr/share/man/man3/gss_canonicalize_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_compare_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_context_time.3.gz
+OLD_FILES+=usr/share/man/man3/gss_create_empty_oid_set.3.gz
+OLD_FILES+=usr/share/man/man3/gss_delete_sec_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_display_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_display_status.3.gz
+OLD_FILES+=usr/share/man/man3/gss_duplicate_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_export_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_export_sec_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_get_mic.3.gz
+OLD_FILES+=usr/share/man/man3/gss_import_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_import_sec_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_indicate_mechs.3.gz
+OLD_FILES+=usr/share/man/man3/gss_init_sec_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_inquire_context.3.gz
+OLD_FILES+=usr/share/man/man3/gss_inquire_cred.3.gz
+OLD_FILES+=usr/share/man/man3/gss_inquire_cred_by_mech.3.gz
+OLD_FILES+=usr/share/man/man3/gss_inquire_mechs_for_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_inquire_names_for_mech.3.gz
+OLD_FILES+=usr/share/man/man3/gss_process_context_token.3.gz
+OLD_FILES+=usr/share/man/man3/gss_release_buffer.3.gz
+OLD_FILES+=usr/share/man/man3/gss_release_cred.3.gz
+OLD_FILES+=usr/share/man/man3/gss_release_name.3.gz
+OLD_FILES+=usr/share/man/man3/gss_release_oid_set.3.gz
+OLD_FILES+=usr/share/man/man3/gss_seal.3.gz
+OLD_FILES+=usr/share/man/man3/gss_sign.3.gz
+OLD_FILES+=usr/share/man/man3/gss_test_oid_set_member.3.gz
+OLD_FILES+=usr/share/man/man3/gss_unseal.3.gz
+OLD_FILES+=usr/share/man/man3/gss_unwrap.3.gz
+OLD_FILES+=usr/share/man/man3/gss_verify.3.gz
+OLD_FILES+=usr/share/man/man3/gss_verify_mic.3.gz
+OLD_FILES+=usr/share/man/man3/gss_wrap.3.gz
+OLD_FILES+=usr/share/man/man3/gss_wrap_size_limit.3.gz
+OLD_FILES+=usr/share/man/man3/gssapi.3.gz
OLD_FILES+=usr/share/man/man3/hdb__del.3.gz
OLD_FILES+=usr/share/man/man3/hdb__get.3.gz
OLD_FILES+=usr/share/man/man3/hdb__put.3.gz
@@ -5699,6 +3596,8 @@ OLD_FILES+=usr/share/man/man3/ntlm_core.3.gz
OLD_FILES+=usr/share/man/man3/ntlm_type1.3.gz
OLD_FILES+=usr/share/man/man3/ntlm_type2.3.gz
OLD_FILES+=usr/share/man/man3/ntlm_type3.3.gz
+OLD_FILES+=usr/share/man/man5/mech.5.gz
+OLD_FILES+=usr/share/man/man5/qop.5.gz
OLD_FILES+=usr/share/man/man8/hprop.8.gz
OLD_FILES+=usr/share/man/man8/hpropd.8.gz
OLD_FILES+=usr/share/man/man8/iprop-log.8.gz
@@ -5708,36 +3607,56 @@ OLD_FILES+=usr/share/man/man8/kcm.8.gz
OLD_FILES+=usr/share/man/man8/kdc.8.gz
OLD_FILES+=usr/share/man/man8/kdigest.8.gz
OLD_FILES+=usr/share/man/man8/kerberos.8.gz
+OLD_FILES+=usr/share/man/man8/kfd.8.gz
OLD_FILES+=usr/share/man/man8/kimpersonate.8.gz
OLD_FILES+=usr/share/man/man8/kpasswdd.8.gz
OLD_FILES+=usr/share/man/man8/kstash.8.gz
OLD_FILES+=usr/share/man/man8/ktutil.8.gz
OLD_FILES+=usr/share/man/man8/string2key.8.gz
OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz
-.else
-# Remove MIT KRB5 because we want Heimdal but not MIT
+
+OLD_LIBS+=usr/lib/libasn1.so.11
+OLD_LIBS+=usr/lib/libcom_err.so.5
+OLD_LIBS+=usr/lib/libgssapi.so.10
+OLD_LIBS+=usr/lib/libgssapi_krb5.so.10
+OLD_LIBS+=usr/lib/libgssapi_ntlm.so.10
+OLD_LIBS+=usr/lib/libgssapi_spnego.so.10
+OLD_LIBS+=usr/lib/libheimbase.so.11
+OLD_LIBS+=usr/lib/libheimntlm.so.11
+OLD_LIBS+=usr/lib/libhx509.so.11
+OLD_LIBS+=usr/lib/libhdb.so.11
+OLD_LIBS+=usr/lib/libkadm5clnt.so.11
+OLD_LIBS+=usr/lib/libkadm5srv.so.11
+OLD_LIBS+=usr/lib/libkafs5.so.11
+OLD_LIBS+=usr/lib/libkdc.so.11
+OLD_LIBS+=usr/lib/libkrb5.so.11
+OLD_LIBS+=usr/lib/libprivateheimipcc.so.11
+OLD_LIBS+=usr/lib/libprivateheimipcs.so.11
+OLD_LIBS+=usr/lib/libroken.so.11
+.endif # ${MK_KERBEROS} == "no" || ${MK_MITKRB5} != "no"
+
+# MIT-specific files that don't exist in Heimdal. These should be removed if
+# Kerberos is disabled, or if Heimdal is selected.
+.if ${MK_KERBEROS} == "no" || ${MK_MITKRB5} == "no"
+OLD_DIRS+=usr/lib/debug/usr/lib/krb5/plugins/kdb
+OLD_DIRS+=usr/lib/debug/usr/lib/krb5/plugins/preauth
+OLD_DIRS+=usr/lib/debug/usr/lib/krb5/plugins/tls
+OLD_DIRS+=usr/lib/debug/usr/lib/krb5/plugins
+OLD_DIRS+=usr/lib/debug/usr/lib/krb5
+
+# Heimdal doesn't install debug symbols for these.
+OLD_FILES+=usr/lib/debug/usr/bin/klist.debug
+OLD_FILES+=usr/lib/debug/usr/bin/kswitch.debug
+
OLD_FILES+=usr/bin/gss-client
OLD_FILES+=usr/bin/k5srvutil
OLD_FILES+=usr/bin/ktutil
OLD_FILES+=usr/bin/kvno
OLD_FILES+=usr/bin/sclient
-OLD_FILES+=usr/bin/sim_client
-OLD_FILES+=usr/bin/uuclient
-OLD_FILES+=etc/rc.d/kpropd
-OLD_FILES+=usr/include/common.h
-OLD_FILES+=usr/include/edwards25519_fiat.h
-OLD_FILES+=usr/include/edwards25519_tables.h
-OLD_FILES+=usr/include/groups.h
-OLD_FILES+=usr/include/gssapi/gssapi_ext.h
-OLD_FILES+=usr/include/gssapi/gssapi_oid.h
OLD_FILES+=usr/include/gssapi/gssapi_alloc.h
+OLD_FILES+=usr/include/gssapi/gssapi_ext.h
OLD_FILES+=usr/include/gssapi/gssapi_generic.h
-OLD_FILES+=usr/include/gssapi/gssapi_spnego.h
-OLD_FILES+=usr/include/gssapi/gssapi_asn1-priv.h
-OLD_FILES+=usr/include/gssapi/spnego_asn1-priv.h
-OLD_FILES+=usr/include/gssapi/gssapi_asn1.h
-OLD_FILES+=usr/include/gssapi/gssapi_ntlm.h
-OLD_FILES+=usr/include/gssapi/spnego_asn1.h
+OLD_FILES+=usr/include/gssapi/mechglue.h
OLD_FILES+=usr/include/gssrpc/auth.h
OLD_FILES+=usr/include/gssrpc/auth_gss.h
OLD_FILES+=usr/include/gssrpc/auth_gssapi.h
@@ -5754,7 +3673,6 @@ OLD_FILES+=usr/include/gssrpc/svc.h
OLD_FILES+=usr/include/gssrpc/svc_auth.h
OLD_FILES+=usr/include/gssrpc/types.h
OLD_FILES+=usr/include/gssrpc/xdr.h
-OLD_FILES+=usr/include/iana.h
OLD_FILES+=usr/include/kadm5/chpass_util_strings.h
OLD_FILES+=usr/include/kadm5/kadm_err.h
OLD_FILES+=usr/include/kdb.h
@@ -5762,1118 +3680,72 @@ OLD_FILES+=usr/include/krad.h
OLD_FILES+=usr/include/krb5/ccselect_plugin.h
OLD_FILES+=usr/include/krb5/certauth_plugin.h
OLD_FILES+=usr/include/krb5/clpreauth_plugin.h
+OLD_FILES+=usr/include/krb5/gssapi_err_generic.h
+OLD_FILES+=usr/include/krb5/gssapi_err_krb5.h
OLD_FILES+=usr/include/krb5/hostrealm_plugin.h
OLD_FILES+=usr/include/krb5/kadm5_auth_plugin.h
OLD_FILES+=usr/include/krb5/kadm5_hook_plugin.h
OLD_FILES+=usr/include/krb5/kdcpolicy_plugin.h
OLD_FILES+=usr/include/krb5/kdcpreauth_plugin.h
+OLD_FILES+=usr/include/krb5/krb5.h
OLD_FILES+=usr/include/krb5/localauth_plugin.h
OLD_FILES+=usr/include/krb5/plugin.h
OLD_FILES+=usr/include/krb5/preauth_plugin.h
OLD_FILES+=usr/include/krb5/pwqual_plugin.h
OLD_FILES+=usr/include/profile.h
-OLD_FILES+=usr/include/trace.h
-OLD_FILES+=usr/include/util.h
OLD_FILES+=usr/include/verto-module.h
OLD_FILES+=usr/include/verto.h
OLD_FILES+=usr/lib/krb5/plugins/kdb/db2.so
+OLD_FILES+=usr/lib/krb5/plugins/kdb/db2.so.122
OLD_FILES+=usr/lib/krb5/plugins/preauth/otp.so
+OLD_FILES+=usr/lib/krb5/plugins/preauth/otp.so.122
OLD_FILES+=usr/lib/krb5/plugins/preauth/pkinit.so
+OLD_FILES+=usr/lib/krb5/plugins/preauth/pkinit.so.122
OLD_FILES+=usr/lib/krb5/plugins/preauth/spake.so
+OLD_FILES+=usr/lib/krb5/plugins/preauth/spake.so.122
OLD_FILES+=usr/lib/krb5/plugins/preauth/test.so
+OLD_FILES+=usr/lib/krb5/plugins/preauth/test.so.122
OLD_FILES+=usr/lib/krb5/plugins/tls/k5tls.so
-OLD_LIBS+=usr/lib/libcom_err.so.122
-OLD_LIBS+=usr/lib/libgssapi_krb5.so.122
+OLD_FILES+=usr/lib/krb5/plugins/tls/k5tls.so.122
OLD_FILES+=usr/lib/libgssrpc.a
OLD_FILES+=usr/lib/libgssrpc.so
-OLD_LIBS+=usr/lib/libgssrpc.so.122
OLD_FILES+=usr/lib/libk5crypto.a
OLD_FILES+=usr/lib/libk5crypto.so
-OLD_LIBS+=usr/lib/libk5crypto.so.122
OLD_FILES+=usr/lib/libkadm5clnt_mit.a
OLD_FILES+=usr/lib/libkadm5clnt_mit.so
-OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.122
OLD_FILES+=usr/lib/libkadm5srv_mit.a
OLD_FILES+=usr/lib/libkadm5srv_mit.so
-OLD_LIBS+=usr/lib/libkadm5srv_mit.so.122
OLD_FILES+=usr/lib/libkdb5.a
OLD_FILES+=usr/lib/libkdb5.so
-OLD_LIBS+=usr/lib/libkdb5.so.122
-OLD_FILES+=usr/lib/libkrad.so
OLD_FILES+=usr/lib/libkrad.a
-OLD_LIBS+=usr/lib/libkrad.so.122
-OLD_LIBS+=usr/lib/libkrb5.so.122
+OLD_FILES+=usr/lib/libkrad.so
OLD_FILES+=usr/lib/libkrb5profile.a
OLD_FILES+=usr/lib/libkrb5profile.so
-OLD_LIBS+=usr/lib/libkrb5profile.so.122
OLD_FILES+=usr/lib/libkrb5support.a
OLD_FILES+=usr/lib/libkrb5support.so
-OLD_LIBS+=usr/lib/libkrb5support.so.122
OLD_FILES+=usr/lib/libverto.a
OLD_FILES+=usr/lib/libverto.so
-OLD_LIBS+=usr/lib/libverto.so.122
OLD_FILES+=usr/libdata/pkgconfig/gssrpc.pc
-OLD_FILES+=usr/libdata/pkgconfig/kadm-client.pc
OLD_FILES+=usr/libdata/pkgconfig/kadm-server.pc
+OLD_FILES+=usr/libdata/pkgconfig/kadm-client.pc
OLD_FILES+=usr/libdata/pkgconfig/kdb.pc
OLD_FILES+=usr/libdata/pkgconfig/krb5-gssapi.pc
OLD_FILES+=usr/libdata/pkgconfig/krb5.pc
-OLD_FILES+=usr/libdata/pkgconfig/mit-krb5-gssapi.pc
OLD_FILES+=usr/libdata/pkgconfig/mit-krb5.pc
+OLD_FILES+=usr/libdata/pkgconfig/mit-krb5-gssapi.pc
+OLD_FILES+=usr/libexec/kprop
+OLD_FILES+=usr/libexec/kpropd
+OLD_FILES+=usr/libexec/kproplog
+OLD_FILES+=usr/libexec/krb5kdc
OLD_FILES+=usr/sbin/gss-server
OLD_FILES+=usr/sbin/kadmin.local
-OLD_FILES+=usr/sbin/kadmind
OLD_FILES+=usr/sbin/kdb5_util
-OLD_FILES+=usr/sbin/kprop
-OLD_FILES+=usr/sbin/kpropd
-OLD_FILES+=usr/sbin/kproplog
-OLD_FILES+=usr/sbin/krb5-send-pr
-OLD_FILES+=usr/sbin/krb5kdc
OLD_FILES+=usr/sbin/sim_server
-OLD_FILES+=usr/sbin/sserver
-OLD_FILES+=usr/sbin/uuserver
-OLD_FILES+=usr/share/doc/krb5/doc/html/.buildinfo
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/agogo.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/basic.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/bgfooter.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/bgtop.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/doctools.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/documentation_options.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/file.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/jquery.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/kerb.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/language_data.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/minus.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/plus.png
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/pygments.css
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/searchtools.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/_static/underscore.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/about.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/k5srvutil.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kadmin_local.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kadmind.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kdb5_ldap_util.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kdb5_util.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kprop.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kpropd.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/kproplog.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/krb5kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/ktutil.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/admin_commands/sserver.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/advanced/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/advanced/retiring-des.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/appl_servers.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/auth_indicator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/backup_host.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/kadm5_acl.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/kdc_conf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_files/krb5_conf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/conf_ldap.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/database.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/dbtypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/dictionary.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/env_variables.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/host_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/https.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_appl_srv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_clients.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/install_kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/lockout.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/otp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/pkinit.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/princ_dns.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/realm_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/spake.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/troubleshoot.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/admin/various_envs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/gssapi.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/h5l_mit_apidiff.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/init_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/princ_handle.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_425_conv_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_524_conv_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_524_convert_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_order.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_address_search.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_allow_weak_crypto.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_aname_to_localname.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_anonymous_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_anonymous_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_appdefault_boolean.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_appdefault_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_genaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_get_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getauthenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getflags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getlocalseqnumber.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getlocalsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrecvsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getrecvsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getremoteseqnumber.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getremotesubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getsendsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_getsendsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_initivector.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_set_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_set_req_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setaddrs.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setflags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setports.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrecvsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setrecvsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setsendsubkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setsendsubkey_k.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_auth_con_setuseruserkey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_alloc_va.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_build_principal_va.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_block_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_checksum_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_crypto_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_crypto_length_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_decrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_derive_prfplus.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_encrypt_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_enctype_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_free_state.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_fx_cf2_simple.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_init_state.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_is_coll_proof_cksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_is_keyed_cksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_keyed_checksum_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_keylengths.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_make_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_padding_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prf_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_prfplus.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_add_entropy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_make_octets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_os_entropy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_seed.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_random_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_string_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_string_to_key_with_params.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_valid_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_valid_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_c_verify_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_calculate_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_cache_match.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_close.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_copy_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_destroy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_dup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_end_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_gen_new.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_full_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_get_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_initialize.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_move.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_new_unique.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_next_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_remove_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_resolve.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_retrieve_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_select.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_set_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_start_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_store_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_support_switch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cc_switch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_new.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_cursor_next.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cccol_have_content.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_change_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_check_clockskew.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_checksum_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_chpw_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_cksumtype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_clear_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_addresses.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_keyblock_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_copy_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decode_authdata_container.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decode_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_deltat_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_eblock_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encode_authdata_container.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_encrypt_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_enctype_to_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_enctype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_expand_hostname.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_find_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_finish_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_finish_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_addresses.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_ap_rep_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_checksum_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_cksumtypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_cred_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_data_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keyblock_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_keytab_entry_contents.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_tgt_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_free_unparsed_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_fwd_tgt_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials_renew.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_credentials_validate.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_etype_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_fallback_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_host_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_in_tkt_with_skey.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_alloc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_get_fast_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_address_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_anonymous.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_canonicalize.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_change_password_prompt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_etype_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_expire_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_ccache_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_fast_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_forwardable.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_in_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_out_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_pa.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_pac_request.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_preauth_list.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_proxiable.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_renew_life.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_responder.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_salt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_opt_set_tkt_life.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_init_creds_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_permitted_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_prompt_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_renewed_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_server_rcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_time_offsets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_get_validated_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_context_profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_get_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_set_service.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_creds_step.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_init_secure_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_config_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_referral_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_is_thread_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_create_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_decrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_decrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_encrypt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_encrypt_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_free_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_key_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_key_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_make_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_make_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_prf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_reference_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_k_verify_checksum_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kdc_sign_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kdc_verify_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_add_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_client_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_close.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_default.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_default_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_dup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_end_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_free_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_get_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_have_content.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_next_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_read_service_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_remove_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_resolve.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kt_start_seq_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_kuserok.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_make_authdata_kdc_issued.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_marshal_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_merge_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_1cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_ncred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_priv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_rep_dce.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_req_extended.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_mk_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_os_localaddr.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_add_buffer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_buffer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_client_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_get_types.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_parse.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_sign.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_sign_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_verify.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_pac_verify_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_parse_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_parse_name_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_prepend_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal2salt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare_any_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_principal_compare_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_process_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_prompter_posix.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_random_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_priv.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_rep_dce.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_rd_safe.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_read_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_realm_compare.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_recvauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_recvauth_version.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_list_questions.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_challenge_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_otp_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_challenge_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_get_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_pkinit_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_responder_set_answer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_salttype_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sendauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_server_decrypt_ticket_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_default_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_default_tgs_enctypes.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_kdc_recv_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_kdc_send_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_password.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_password_using_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_principal_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_real_time.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_trace_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_set_trace_filename.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sname_match.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_sname_to_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_deltat.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_salttype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_string_to_timestamp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timeofday.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timestamp_to_sfstring.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_timestamp_to_string.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_free.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_get_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_tkt_creds_step.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unmarshal_credentials.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_unparse_name_flags_ext.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_us_timeofday.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_use_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_authdata_kdc_issued.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds_opt_init.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_verify_init_creds_opt_set_ap_req_nofail.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vprepend_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vset_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_vwrap_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/api/krb5_wrap_error_message.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_ADDRPORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_CHAOS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_DDP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_INET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_INET6.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_IPPORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_ISO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_IS_LOCAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_NETBIOS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ADDRTYPE_XNS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_EXTERNAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_FIELD_TYPE_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_REGISTERED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AD_TYPE_RESERVED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_ETYPE_NEGOTIATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_MUTUAL_REQUIRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_RESERVED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_USE_SESSION_KEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_USE_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/AP_OPTS_WIRE_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CMAC_CAMELLIA128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CMAC_CAMELLIA256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_CRC32.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_DESCBC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_MD5_ARCFOUR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_96_AES128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_96_AES256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA1_DES3.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA256_128_AES128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_HMAC_SHA384_192_AES256.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_MD5_HMAC_ARCFOUR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_NIST_SHA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD4_DES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD5.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_RSA_MD5_DES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/CKSUMTYPE_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES128_CTS_HMAC_SHA1_96.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES128_CTS_HMAC_SHA256_128.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES256_CTS_HMAC_SHA1_96.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_AES256_CTS_HMAC_SHA384_192.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_ARCFOUR_HMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_ARCFOUR_HMAC_EXP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_CAMELLIA128_CTS_CMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_CAMELLIA256_CTS_CMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_RAW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_SHA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES3_CBC_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_CRC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_MD4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_MD5.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_CBC_RAW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DES_HMAC_SHA1.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_DSA_SHA1_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_MD5_RSA_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_NULL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RC2_CBC_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RSA_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_RSA_ES_OAEP_ENV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_SHA1_RSA_CMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/ENCTYPE_UNKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_ALLOW_POSTDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_CNAME_IN_ADDL_TKT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_DISABLE_TRANSITED_CHECK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_ENC_TKT_IN_SKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_FORWARDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_POSTDATED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_PROXY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEWABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_RENEWABLE_OK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_REQUEST_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_OPT_VALIDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KDC_TKT_COMMON_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ANONYMOUS_PRINCSTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ANONYMOUS_REALMSTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AP_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AP_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AND_OR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AP_OPTIONS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_AUTH_INDICATOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_CAMMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_ETYPE_NEGOTIATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_FX_ARMOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_IF_RELEVANT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_INITIAL_VERIFIED_CAS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_KDC_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_MANDATORY_FOR_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_OSF_DCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_SESAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_SIGNTICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTHDATA_WIN2K_PAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_DO_SEQUENCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_DO_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_PERMIT_ALL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_RET_SEQUENCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_RET_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_AUTH_CONTEXT_USE_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_DATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_EMPTY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_HEADER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_PADDING.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_SIGN_ONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_STREAM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CRYPTO_TYPE_TRAILER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_CYBERSAFE_SECUREID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_DOMAIN_X500_COMPRESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ENCPADATA_REQ_ENC_PA_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_ERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_FAST_REQUIRED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CACHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_CONSTRAINED_DELEGATION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_NO_STORE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_NO_TRANSIT_CHECK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GC_USER_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_CANONICALIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_GET_INIT_CREDS_OPT_TKT_LIFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CONTEXT_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CONTEXT_SECURE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INIT_CREDS_STEP_FLAG_CONTINUE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT16_MAX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT16_MIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT32_MAX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_INT32_MIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_ITE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_MTE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AD_SIGNEDPATH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_APP_DATA_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_APP_DATA_ENCRYPT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REP_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REQ_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REP_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_CAMMAC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_ENC_CHALLENGE_CLIENT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_ENC_CHALLENGE_KDC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_ENC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_FINISHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_FAST_REQ_CHKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_MIC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_IAKERB_FINISHED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KDC_REP_TICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_CRED_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_ERROR_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_PRIV_ENCPART.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_KRB_SAFE_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_AS_FRESHNESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_FX_COOKIE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_OTP_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_PKINIT_KX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_S4U_X509_USER_REPLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_S4U_X509_USER_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_PA_SAM_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_SPAKE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_ACCESSDENIED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_AUTHERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_BAD_VERSION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_HARDERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_INITIAL_FLAG_NEEDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_MALFORMED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_SOFTERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_KPASSWD_SUCCESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_ACCT_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_RENEWAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_TGT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_LAST_TGT_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ALL_PW_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_NONE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_ACCT_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_RENEWAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_TGT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_LAST_TGT_ISSUED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_LRQ_ONE_PW_EXPTIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_ENTERPRISE_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_ENT_PRINCIPAL_AND_ID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_MS_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_MS_PRINCIPAL_AND_ID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SMTP_NAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_HST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_INST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_SRV_XHST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_UID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_UNKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_WELLKNOWN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_NT_X500_PRINCIPAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_ATTRIBUTES_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CLIENT_CLAIMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CLIENT_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_CREDENTIALS_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DELEGATION_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DEVICE_CLAIMS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_DEVICE_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_FULL_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_LOGON_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_PRIVSVR_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_REQUESTOR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_SERVER_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_TICKET_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PAC_UPN_DNS_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AFS3_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AP_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AS_CHECKSUM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_AS_FRESHNESS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENCRYPTED_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_SANDIA_SECURID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_TIMESTAMP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ENC_UNIX_TIME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ETYPE_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_ETYPE_INFO2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FOR_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_COOKIE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_ERROR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_FX_FAST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_GET_FROM_TYPED_DATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_NONE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OSF_DCE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_PIN_CHANGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_OTP_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PAC_OPTIONS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PAC_REQUEST.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PKINIT_KX.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REP_OLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PK_AS_REQ_OLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_PW_SALT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REDHAT_IDP_OAUTH2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REDHAT_PASSKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_REFERRAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_S4U_X509_USER.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_CHALLENGE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_CHALLENGE_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_REDIRECT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_RESPONSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SAM_RESPONSE_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SESAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SPAKE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_SVR_REFERRAL_INFO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_TGS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PADATA_USE_SPECIFIED_KVNO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_CASEFOLD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_ENTERPRISE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_IGNORE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_COMPARE_UTF8.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_ENTERPRISE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_IGNORE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_NO_DEF_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_NO_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_REQUIRE_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_DISPLAY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_NO_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRINCIPAL_UNPARSE_SHORT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PRIV.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_NEW_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PROMPT_TYPE_PREAUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_PVNO.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_REALM_BRANCH_CHAR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RECVAUTH_BADAUTHVERS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RECVAUTH_SKIP_VERSION.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_REFERRAL_REALM.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_COLLECT_PIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_COLLECT_TOKEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_NEXTOTP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FLAGS_SEPARATE_PIN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_ALPHANUMERIC.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_DECIMAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_OTP_FORMAT_HEXADECIMAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_COUNT_LOW.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_FINAL_TRY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_LOCKED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_OTP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_PASSWORD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_RESPONDER_QUESTION_PKINIT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAFE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_MUST_PK_ENCRYPT_SAD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_SEND_ENCRYPTED_SAD.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_SAM_USE_SAD_AS_KEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_2ND_TKT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_AUTHDATA.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_FLAGS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_FLAGS_EXACT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_IS_SKEY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_KTYPE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_SRV_NAMEONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_TIMES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_MATCH_TIMES_EXACT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_NOTICKET.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_OPENCLOSE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TC_SUPPORTED_KTYPES.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_NAME.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_NAME_SIZE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TGS_REQ.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_TKT_CREDS_STEP_FLAG_CONTINUE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/KRB5_WELLKNOWN_NAMESTR.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/LR_TYPE_INTERPRETATION_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/LR_TYPE_THIS_SERVER_ONLY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MAX_KEYTAB_NAME_LEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MSEC_DIRBIT.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/MSEC_VAL_MASK.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/SALT_TYPE_AFS_LENGTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/SALT_TYPE_NO_LENGTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/THREEPARAMOPEN.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_ANONYMOUS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_ENC_PA_REP.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_FORWARDABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_FORWARDED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_HW_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_INITIAL.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_INVALID.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_MAY_POSTDATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_OK_AS_DELEGATE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_POSTDATED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PRE_AUTH.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PROXIABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_PROXY.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_RENEWABLE.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/TKT_FLG_TRANSIT_POLICY_CHECKED.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/VALID_INT_BITS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/VALID_UINT_BITS.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb524_convert_creds_kdc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb524_init_ets.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_const.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_component.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_name.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_set_realm_length.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_size.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_princ_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_roundup.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_x.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/macros/krb5_xc.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_address.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_addrtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_rep_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ap_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_auth_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authdata.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authdatatype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_authenticator.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_boolean.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cc_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ccache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cccol_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_checksum.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cksumtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_const_pointer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_const_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred_enc_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cred_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_creds.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_crypto_iov.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_cryptotype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_deltat.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_kdc_rep_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enc_tkt_part.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_encrypt_block.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_enctype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_error.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_error_code.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_expire_callback_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_flags.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_get_init_creds_opt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_gic_opt_pa_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_init_creds_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_int16.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_int32.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kdc_rep.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kdc_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_key.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keyblock.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keytab.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keytab_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_keyusage.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kt_cursor.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_kvno.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_last_req_entry.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_magic.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_mk_req_checksum_func.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_msgtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_octet.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_pac_req.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_server_referral_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pa_svr_referral_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pac.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pointer.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_post_recv_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pre_send_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_preauthtype.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_principal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_principal_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompt_type.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_prompter_fct.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_pwd_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_rcache.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_replay_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_fn.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_otp_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_otp_tokeninfo.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_pkinit_challenge.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_responder_pkinit_identity.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_response.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ticket.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ticket_times.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_timestamp.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_tkt_authent.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_tkt_creds_context.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_trace_callback.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_trace_info.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_transited.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_typed_data.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ui_2.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_ui_4.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/krb5_verify_init_creds_opt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/refs/types/passwd_phrase_element.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/appdev/y2038.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/ccache_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/date_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/keytab_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/rcache_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/basic/stash_file_def.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/directory_org.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/doing_build.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/options2configure.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build/osconf.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/build_this.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/copyright.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/ccache_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/cookie.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/freshness_token.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/keytab_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/formats/rcache_file_format.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-A.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-C.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-E.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-K.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-L.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-M.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-P.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-R.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-S.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-T.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-V.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex-all.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/genindex.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5defaults.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5features.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/mitK5license.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/objects.inv
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/ccselect.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/certauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/clpreauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/general.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/gssapi.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/hostrealm.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/internal.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kadm5_auth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kadm5_hook.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kdcpolicy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/kdcpreauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/localauth.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/locate.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/profile.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/plugindev/pwqual.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/resources.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/search.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/searchindex.js
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/pwd_mgmt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/tkt_mgmt.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kdestroy.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kinit.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/klist.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kpasswd.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/krb5-config.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/ksu.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kswitch.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/kvno.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_commands/sclient.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/index.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/k5identity.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/k5login.html
-OLD_FILES+=usr/share/doc/krb5/doc/html/user/user_config/kerberos.html
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/GMakefile
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LICRcyr2utf8.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LICRlatin2utf8.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/LatinRules.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/admin.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/admin.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/appdev.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/appdev.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/basic.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/basic.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/build.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/build.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/latexmkjarc
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/latexmkrc
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/make.bat
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/plugindev.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/plugindev.tex
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/python.ist
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinx.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinx.xdy
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxhighlight.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxhowto.cls
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexadmonitions.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexcontainers.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexgraphics.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexindbibtoc.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexlists.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexliterals.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexnumfig.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexobjects.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexshadowbox.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstyleheadings.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstylepage.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatexstyletext.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxlatextables.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxmanual.cls
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxmessages.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxoptionsgeometry.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxoptionshyperref.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxpackagecyrillic.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/sphinxpackagefootnote.sty
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/user.pdf
-OLD_FILES+=usr/share/doc/krb5/doc/pdf/user.tex
-OLD_FILES+=usr/share/et/et_c.awk
OLD_FILES+=usr/share/et/et_h.awk
-OLD_FILES+=usr/share/examples/krb5/kdc.conf
-OLD_FILES+=usr/share/examples/krb5/krb5.conf
-OLD_FILES+=usr/share/examples/krb5/services.append
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/LICENSE
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/MIT
-OLD_FILES+=usr/share/licenses/krb5-1.21.3_1/catalog.mk
-OLD_FILES+=usr/share/locale/de/LC_MESSAGES/mit-krb5.mo
-OLD_FILES+=usr/share/locale/en_US/LC_MESSAGES/mit-krb5.mo
-OLD_FILES+=usr/share/locale/ka/LC_MESSAGES/mit-krb5.mo
+OLD_FILES+=usr/share/et/et_c.awk
OLD_FILES+=usr/share/man/man1/k5srvutil.1.gz
OLD_FILES+=usr/share/man/man1/kadmin.1.gz
+OLD_FILES+=usr/share/man/man1/ksu.1.gz
OLD_FILES+=usr/share/man/man1/ktutil.1.gz
OLD_FILES+=usr/share/man/man1/kvno.1.gz
OLD_FILES+=usr/share/man/man1/sclient.1.gz
@@ -6885,29 +3757,26 @@ OLD_FILES+=usr/share/man/man5/kadm5.acl.5.gz
OLD_FILES+=usr/share/man/man5/kdc.conf.5.gz
OLD_FILES+=usr/share/man/man7/kerberos.7.gz
OLD_FILES+=usr/share/man/man8/kadmin.local.8.gz
-OLD_FILES+=usr/share/man/man8/kdb5_ldap_util.8.gz
OLD_FILES+=usr/share/man/man8/kdb5_util.8.gz
OLD_FILES+=usr/share/man/man8/kprop.8.gz
OLD_FILES+=usr/share/man/man8/kpropd.8.gz
OLD_FILES+=usr/share/man/man8/kproplog.8.gz
OLD_FILES+=usr/share/man/man8/krb5kdc.8.gz
-OLD_FILES+=usr/share/man/man8/sserver.8.gz
-.endif
-.endif
+OLD_FILES+=usr/share/man/man8/pam-krb5.8.gz
-.if ${MK_KERBEROS_SUPPORT} == no
-.if ${MK_MITKRB5} == no
-OLD_FILES+=usr/bin/compile_et
-OLD_FILES+=usr/include/com_err.h
-OLD_FILES+=usr/include/com_right.h
-OLD_FILES+=usr/lib/libcom_err.a
-OLD_FILES+=usr/lib/libcom_err.so
-OLD_LIBS+=usr/lib/libcom_err.so.5
-OLD_FILES+=usr/lib/libcom_err_p.a
-OLD_FILES+=usr/share/man/man1/compile_et.1.gz
-OLD_FILES+=usr/share/man/man3/com_err.3.gz
-.endif
-.endif
+OLD_LIBS+=usr/lib/libcom_err.so.122
+OLD_LIBS+=usr/lib/libgssapi_krb5.so.122
+OLD_LIBS+=usr/lib/libgssrpc.so.122
+OLD_LIBS+=usr/lib/libk5crypto.so.122
+OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.122
+OLD_LIBS+=usr/lib/libkadm5srv_mit.so.122
+OLD_LIBS+=usr/lib/libkdb5.so.122
+OLD_LIBS+=usr/lib/libkrad.so.122
+OLD_LIBS+=usr/lib/libkrb5.so.122
+OLD_LIBS+=usr/lib/libkrb5profile.so.122
+OLD_LIBS+=usr/lib/libkrb5support.so.122
+OLD_LIBS+=usr/lib/libverto.so.122
+.endif # ${MK_KERBEROS} == "no" || ${MK_MITKRB5} == "no"
.if ${MK_LDNS} == no
OLD_FILES+=usr/lib/libprivateldns.a
diff --git a/tools/build/options/WITHOUT_GSSAPI b/tools/build/options/WITHOUT_GSSAPI
deleted file mode 100644
index 3b208b6edecd..000000000000
--- a/tools/build/options/WITHOUT_GSSAPI
+++ /dev/null
@@ -1 +0,0 @@
-Do not build libgssapi.
diff --git a/tools/build/options/WITHOUT_KERBEROS b/tools/build/options/WITHOUT_KERBEROS
index 98e1ffe3721d..e0301ee1d786 100644
--- a/tools/build/options/WITHOUT_KERBEROS
+++ b/tools/build/options/WITHOUT_KERBEROS
@@ -1 +1 @@
-Set this to not build Kerberos 5 (KTH Heimdal).
+Set this to not build Kerberos.
diff --git a/tools/build/options/WITH_CLEAN b/tools/build/options/WITH_CLEAN
new file mode 100644
index 000000000000..0bb05e33371b
--- /dev/null
+++ b/tools/build/options/WITH_CLEAN
@@ -0,0 +1,4 @@
+Clean before building world and/or kernel.
+Note that recording a new epoch in
+.Pa .clean_build_epoch
+in the root of the source tree will also force a clean world build.
diff --git a/tools/test/netfibs/reflector.sh b/tools/test/netfibs/reflector.sh
index b9500689a321..a68019532010 100755
--- a/tools/test/netfibs/reflector.sh
+++ b/tools/test/netfibs/reflector.sh
@@ -897,7 +897,7 @@ testrx_run_test()
*) _opts="-d" ;;
esac
- # Convert netcat options to reflect aguments.
+ # Convert netcat options to reflect arguments.
case "${_o}" in
-i) _opts="${_opts} -T TCP6" ;; # Use TCP for START/DONE.
-u) _opts="${_opts} -T UDP6" ;;
diff --git a/tools/tools/usbtest/usb_msc_test.c b/tools/tools/usbtest/usb_msc_test.c
index 713da381820e..1b9c3192a472 100644
--- a/tools/tools/usbtest/usb_msc_test.c
+++ b/tools/tools/usbtest/usb_msc_test.c
@@ -952,7 +952,6 @@ find_usb_endpoints(struct libusb20_device *pdev, uint8_t class,
struct libusb20_interface *iface;
struct libusb20_endpoint *ep;
uint8_t x;
- uint8_t y;
uint8_t z;
*in_ep = 0;
@@ -966,9 +965,6 @@ find_usb_endpoints(struct libusb20_device *pdev, uint8_t class,
return;
for (x = 0; x != pcfg->num_interface; x++) {
-
- y = alt_setting;
-
iface = (pcfg->interface + x);
if ((iface->desc.bInterfaceClass == class) &&
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 512f75b5d093..da1a9b3a681f 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -219,7 +219,7 @@ SUBDIR.${MK_ISCSI}+= iscsictl
SUBDIR.${MK_KDUMP}+= kdump
SUBDIR.${MK_KDUMP}+= truss
.if ${MK_MITKRB5} == "no"
-SUBDIR.${MK_KERBEROS_SUPPORT}+= compile_et
+SUBDIR.${MK_KERBEROS}+= compile_et
.endif
SUBDIR.${MK_LDNS_UTILS}+= drill
SUBDIR.${MK_LDNS_UTILS}+= host
diff --git a/usr.bin/localedef/localedef.1 b/usr.bin/localedef/localedef.1
index be37715f490d..918b57961c6c 100644
--- a/usr.bin/localedef/localedef.1
+++ b/usr.bin/localedef/localedef.1
@@ -164,7 +164,7 @@ unless instructed otherwise by the
.Fl D (
BSD
output) option.
-The contants of this directory should generally be copied into the
+The content of this directory should generally be copied into the
appropriate subdirectory of
.Pa /usr/share/locale
in order the definitions to be visible to programs linked with libc.
diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc
index 891c37f871e5..37a146376c2e 100644
--- a/usr.bin/tcopy/tcopy.cc
+++ b/usr.bin/tcopy/tcopy.cc
@@ -738,7 +738,7 @@ main(int argc, char *argv[])
warnx("illegal block size");
usage();
}
- if (maxblk <= 0) {
+ if (tmp <= 0) {
warnx("illegal block size");
usage();
}
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index dcfe2037f8ce..b97c22ffeb08 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -139,9 +139,7 @@ SUBDIR.${MK_FLOPPY}+= fdformat
SUBDIR.${MK_FLOPPY}+= fdread
SUBDIR.${MK_FLOPPY}+= fdwrite
SUBDIR.${MK_FREEBSD_UPDATE}+= freebsd-update
-.if ${MK_KERBEROS_SUPPORT} != "no"
-SUBDIR.${MK_GSSAPI}+= gssd
-.endif
+SUBDIR.${MK_KERBEROS_SUPPORT}+= gssd
SUBDIR.${MK_GPIO}+= gpioctl
SUBDIR.${MK_HYPERV}+= hyperv
SUBDIR.${MK_INET6}+= ip6addrctl
diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile
index 88c024daf7e6..6900f0ce3b65 100644
--- a/usr.sbin/certctl/Makefile
+++ b/usr.sbin/certctl/Makefile
@@ -1,5 +1,14 @@
+.include <src.opts.mk>
+
PACKAGE= certctl
-SCRIPTS=certctl.sh
+PROG= certctl
MAN= certctl.8
+LIBADD= crypto
+HAS_TESTS=
+SUBDIR.${MK_TESTS}= tests
+
+.ifdef BOOTSTRAPPING
+CFLAGS+=-DBOOTSTRAPPING
+.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8
index 7e49bb89e2ac..edf993e1361a 100644
--- a/usr.sbin/certctl/certctl.8
+++ b/usr.sbin/certctl/certctl.8
@@ -24,7 +24,7 @@
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 17, 2025
+.Dd August 18, 2025
.Dt CERTCTL 8
.Os
.Sh NAME
@@ -32,63 +32,85 @@
.Nd "tool for managing trusted and untrusted TLS certificates"
.Sh SYNOPSIS
.Nm
-.Op Fl v
+.Op Fl lv
.Ic list
.Nm
-.Op Fl v
+.Op Fl lv
.Ic untrusted
.Nm
-.Op Fl cnUv
+.Op Fl BnUv
.Op Fl D Ar destdir
.Op Fl M Ar metalog
.Ic rehash
.Nm
-.Op Fl cnv
-.Ic untrust Ar file
+.Op Fl nv
+.Ic untrust Ar
.Nm
-.Op Fl cnv
-.Ic trust Ar file
+.Op Fl nv
+.Ic trust Ar
.Sh DESCRIPTION
The
.Nm
utility manages the list of TLS Certificate Authorities that are trusted by
applications that use OpenSSL.
.Pp
-Flags:
+The following options are available:
.Bl -tag -width 4n
-.It Fl c
-Copy certificates instead of linking to them.
+.It Fl B
+Do not generate a bundle.
+This option is only valid in conjunction with the
+.Ic rehash
+command.
.It Fl D Ar destdir
Specify the DESTDIR (overriding values from the environment).
.It Fl d Ar distbase
Specify the DISTBASE (overriding values from the environment).
+.It Fl l
+When listing installed (trusted or untrusted) certificates, show the
+full path and distinguished name for each certificate.
.It Fl M Ar metalog
-Specify the path of the METALOG file (default: $DESTDIR/METALOG).
+Specify the path of the METALOG file
+.Po
+default:
+.Pa ${DESTDIR}/METALOG
+.Pc .
+This option is only valid in conjunction with the
+.Ic rehash
+command.
.It Fl n
-No-Op mode, do not actually perform any actions.
+Dry-run mode.
+Do not actually perform any actions except write the metalog.
.It Fl v
-Be verbose, print details about actions before performing them.
+Verbose mode.
+Print detailed information about each action taken.
.It Fl U
-Unprivileged mode, do not change the ownership of created links.
-Do record the ownership in the METALOG file.
+Unprivileged mode.
+Do not attempt to set the ownership of created files.
+This option is only valid in conjunction with the
+.Fl M
+option and the
+.Ic rehash
+command.
.El
.Pp
Primary command functions:
.Bl -tag -width untrusted
.It Ic list
-List all currently trusted certificate authorities.
+List all currently trusted certificates.
.It Ic untrusted
List all currently untrusted certificates.
.It Ic rehash
-Rebuild the list of trusted certificate authorities by scanning all directories
+Rebuild the list of trusted certificates by scanning all directories
in
.Ev TRUSTPATH
and all untrusted certificates in
.Ev UNTRUSTPATH .
-A symbolic link to each trusted certificate is placed in
+A copy of each trusted certificate is placed in
.Ev CERTDESTDIR
and each untrusted certificate in
.Ev UNTRUSTDESTDIR .
+In addition, a bundle containing the trusted certificates is placed in
+.Ev BUNDLEFILE .
.It Ic untrust
Add the specified file to the untrusted list.
.It Ic trust
@@ -97,9 +119,13 @@ Remove the specified file from the untrusted list.
.Sh ENVIRONMENT
.Bl -tag -width UNTRUSTDESTDIR
.It Ev DESTDIR
-Alternate destination directory to operate on.
+Absolute path to an alternate destination directory to operate on
+instead of the file system root, e.g.
+.Dq Li /tmp/install .
.It Ev DISTBASE
Additional path component to include when operating on certificate directories.
+This must start with a slash, e.g.
+.Dq Li /base .
.It Ev LOCALBASE
Location for local programs.
Defaults to the value of the user.localbase sysctl which is usually
@@ -107,32 +133,34 @@ Defaults to the value of the user.localbase sysctl which is usually
.It Ev TRUSTPATH
List of paths to search for trusted certificates.
Default:
-.Pa <DESTDIR><DISTBASE>/usr/share/certs/trusted
-.Pa <DESTDIR><DISTBASE>/usr/local/share/certs
-.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/certs
+.Pa ${DESTDIR}${DISTBASE}/usr/share/certs/trusted
+.Pa ${DESTDIR}${LOCALBASE}/share/certs/trusted
+.Pa ${DESTDIR}${LOCALBASE}/share/certs
.It Ev UNTRUSTPATH
List of paths to search for untrusted certificates.
Default:
-.Pa <DESTDIR><DISTBASE>/usr/share/certs/untrusted
-.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/untrusted
-.Pa <DESTDIR><DISTBASE><LOCALBASE>/etc/ssl/blacklisted
-.It Ev CERTDESTDIR
+.Pa ${DESTDIR}${DISTBASE}/usr/share/certs/untrusted
+.Pa ${DESTDIR}${LOCALBASE}/share/certs/untrusted
+.It Ev TRUSTDESTDIR
Destination directory for symbolic links to trusted certificates.
Default:
-.Pa <DESTDIR><DISTBASE>/etc/ssl/certs
+.Pa ${DESTDIR}${DISTBASE}/etc/ssl/certs
.It Ev UNTRUSTDESTDIR
Destination directory for symbolic links to untrusted certificates.
Default:
-.Pa <DESTDIR><DISTBASE>/etc/ssl/untrusted
-.It Ev EXTENSIONS
-List of file extensions to read as certificate files.
-Default: *.pem *.crt *.cer *.crl *.0
+.Pa ${DESTDIR}${DISTBASE}/etc/ssl/untrusted
+.It Ev BUNDLE
+File name of bundle to produce.
.El
.Sh SEE ALSO
.Xr openssl 1
.Sh HISTORY
.Nm
first appeared in
-.Fx 12.2
+.Fx 12.2 .
.Sh AUTHORS
-.An Allan Jude Aq Mt allanjude@freebsd.org
+.An -nosplit
+The original shell implementation was written by
+.An Allan Jude Aq Mt allanjude@FreeBSD.org .
+The current C implementation was written by
+.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .
diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c
new file mode 100644
index 000000000000..ed7f05126ca7
--- /dev/null
+++ b/usr.sbin/certctl/certctl.c
@@ -0,0 +1,1114 @@
+/*-
+ * Copyright (c) 2023-2025 Dag-Erling Smørgrav <des@FreeBSD.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/sysctl.h>
+#include <sys/stat.h>
+#include <sys/tree.h>
+
+#include <dirent.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <fts.h>
+#include <paths.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <openssl/ssl.h>
+
+#define info(fmt, ...) \
+ do { \
+ if (verbose) \
+ fprintf(stderr, fmt "\n", ##__VA_ARGS__); \
+ } while (0)
+
+static char *
+xasprintf(const char *fmt, ...)
+{
+ va_list ap;
+ char *str;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vasprintf(&str, fmt, ap);
+ va_end(ap);
+ if (ret < 0 || str == NULL)
+ err(1, NULL);
+ return (str);
+}
+
+static char *
+xstrdup(const char *str)
+{
+ char *dup;
+
+ if ((dup = strdup(str)) == NULL)
+ err(1, NULL);
+ return (dup);
+}
+
+static void usage(void);
+
+static bool dryrun;
+static bool longnames;
+static bool nobundle;
+static bool unprivileged;
+static bool verbose;
+
+static const char *localbase;
+static const char *destdir;
+static const char *distbase;
+static const char *metalog;
+
+static const char *uname = "root";
+static const char *gname = "wheel";
+
+static const char *const default_trusted_paths[] = {
+ "/usr/share/certs/trusted",
+ "%L/share/certs/trusted",
+ "%L/share/certs",
+ NULL
+};
+static char **trusted_paths;
+
+static const char *const default_untrusted_paths[] = {
+ "/usr/share/certs/untrusted",
+ "%L/share/certs/untrusted",
+ NULL
+};
+static char **untrusted_paths;
+
+static char *trusted_dest;
+static char *untrusted_dest;
+static char *bundle_dest;
+
+#define SSL_PATH "/etc/ssl"
+#define TRUSTED_DIR "certs"
+#define TRUSTED_PATH SSL_PATH "/" TRUSTED_DIR
+#define UNTRUSTED_DIR "untrusted"
+#define UNTRUSTED_PATH SSL_PATH "/" UNTRUSTED_DIR
+#define LEGACY_DIR "blacklisted"
+#define LEGACY_PATH SSL_PATH "/" LEGACY_DIR
+#define BUNDLE_FILE "cert.pem"
+#define BUNDLE_PATH SSL_PATH "/" BUNDLE_FILE
+
+static FILE *mlf;
+
+/*
+ * Remove duplicate and trailing slashes from a path.
+ */
+static char *
+normalize_path(const char *str)
+{
+ char *buf, *dst;
+
+ if ((buf = malloc(strlen(str) + 1)) == NULL)
+ err(1, NULL);
+ for (dst = buf; *str != '\0'; dst++) {
+ if ((*dst = *str++) == '/') {
+ while (*str == '/')
+ str++;
+ if (*str == '\0')
+ break;
+ }
+ }
+ *dst = '\0';
+ return (buf);
+}
+
+/*
+ * Split a colon-separated list into a NULL-terminated array.
+ */
+static char **
+split_paths(const char *str)
+{
+ char **paths;
+ const char *p, *q;
+ unsigned int i, n;
+
+ for (p = str, n = 1; *p; p++) {
+ if (*p == ':')
+ n++;
+ }
+ if ((paths = calloc(n + 1, sizeof(*paths))) == NULL)
+ err(1, NULL);
+ for (p = q = str, i = 0; i < n; i++, p = q + 1) {
+ q = strchrnul(p, ':');
+ if ((paths[i] = strndup(p, q - p)) == NULL)
+ err(1, NULL);
+ }
+ return (paths);
+}
+
+/*
+ * Expand %L into LOCALBASE and prefix DESTDIR and DISTBASE as needed.
+ */
+static char *
+expand_path(const char *template)
+{
+ if (template[0] == '%' && template[1] == 'L')
+ return (xasprintf("%s%s%s", destdir, localbase, template + 2));
+ return (xasprintf("%s%s%s", destdir, distbase, template));
+}
+
+/*
+ * Expand an array of paths.
+ */
+static char **
+expand_paths(const char *const *templates)
+{
+ char **paths;
+ unsigned int i, n;
+
+ for (n = 0; templates[n] != NULL; n++)
+ continue;
+ if ((paths = calloc(n + 1, sizeof(*paths))) == NULL)
+ err(1, NULL);
+ for (i = 0; i < n; i++)
+ paths[i] = expand_path(templates[i]);
+ return (paths);
+}
+
+/*
+ * If destdir is a prefix of path, returns a pointer to the rest of path,
+ * otherwise returns path.
+ *
+ * Note that this intentionally does not strip distbase from the path!
+ * Unlike destdir, distbase is expected to be included in the metalog.
+ */
+static const char *
+unexpand_path(const char *path)
+{
+ const char *p = path;
+ const char *q = destdir;
+
+ while (*p && *p == *q) {
+ p++;
+ q++;
+ }
+ return (*q == '\0' && *p == '/' ? p : path);
+}
+
+/*
+ * X509 certificate in a rank-balanced tree.
+ */
+struct cert {
+ RB_ENTRY(cert) entry;
+ unsigned long hash;
+ char *name;
+ X509 *x509;
+ char *path;
+};
+
+static void
+free_cert(struct cert *cert)
+{
+ free(cert->name);
+ X509_free(cert->x509);
+ free(cert->path);
+ free(cert);
+}
+
+static int
+certcmp(const struct cert *a, const struct cert *b)
+{
+ return (X509_cmp(a->x509, b->x509));
+}
+
+RB_HEAD(cert_tree, cert);
+static struct cert_tree trusted = RB_INITIALIZER(&trusted);
+static struct cert_tree untrusted = RB_INITIALIZER(&untrusted);
+RB_GENERATE_STATIC(cert_tree, cert, entry, certcmp);
+
+static void
+free_certs(struct cert_tree *tree)
+{
+ struct cert *cert, *tmp;
+
+ RB_FOREACH_SAFE(cert, cert_tree, tree, tmp) {
+ RB_REMOVE(cert_tree, tree, cert);
+ free_cert(cert);
+ }
+}
+
+static struct cert *
+find_cert(struct cert_tree *haystack, X509 *x509)
+{
+ struct cert needle = { .x509 = x509 };
+
+ return (RB_FIND(cert_tree, haystack, &needle));
+}
+
+/*
+ * File containing a certificate in a rank-balanced tree sorted by
+ * certificate hash and disambiguating counter. This is needed because
+ * the certificate hash function is prone to collisions, necessitating a
+ * counter to distinguish certificates that hash to the same value.
+ */
+struct file {
+ RB_ENTRY(file) entry;
+ const struct cert *cert;
+ unsigned int c;
+};
+
+static int
+filecmp(const struct file *a, const struct file *b)
+{
+ if (a->cert->hash > b->cert->hash)
+ return (1);
+ if (a->cert->hash < b->cert->hash)
+ return (-1);
+ return (a->c - b->c);
+}
+
+RB_HEAD(file_tree, file);
+RB_GENERATE_STATIC(file_tree, file, entry, filecmp);
+
+/*
+ * Lexicographical sort for scandir().
+ */
+static int
+lexisort(const struct dirent **d1, const struct dirent **d2)
+{
+ return (strcmp((*d1)->d_name, (*d2)->d_name));
+}
+
+/*
+ * Read certificate(s) from a single file and insert them into a tree.
+ * Ignore certificates that already exist in the tree. If exclude is not
+ * null, also ignore certificates that exist in exclude.
+ *
+ * Returns the number certificates added to the tree, or -1 on failure.
+ */
+static int
+read_cert(const char *path, struct cert_tree *tree, struct cert_tree *exclude)
+{
+ FILE *f;
+ X509 *x509;
+ X509_NAME *name;
+ struct cert *cert;
+ unsigned long hash;
+ int len, ni, no;
+
+ if ((f = fopen(path, "r")) == NULL) {
+ warn("%s", path);
+ return (-1);
+ }
+ for (ni = no = 0;
+ (x509 = PEM_read_X509(f, NULL, NULL, NULL)) != NULL;
+ ni++) {
+ hash = X509_subject_name_hash(x509);
+ if (exclude && find_cert(exclude, x509)) {
+ info("%08lx: excluded", hash);
+ X509_free(x509);
+ continue;
+ }
+ if (find_cert(tree, x509)) {
+ info("%08lx: duplicate", hash);
+ X509_free(x509);
+ continue;
+ }
+ if ((cert = calloc(1, sizeof(*cert))) == NULL)
+ err(1, NULL);
+ cert->x509 = x509;
+ name = X509_get_subject_name(x509);
+ cert->hash = X509_NAME_hash_ex(name, NULL, NULL, NULL);
+ len = X509_NAME_get_text_by_NID(name, NID_commonName,
+ NULL, 0);
+ if (len > 0) {
+ if ((cert->name = malloc(len + 1)) == NULL)
+ err(1, NULL);
+ X509_NAME_get_text_by_NID(name, NID_commonName,
+ cert->name, len + 1);
+ } else {
+ /* fallback for certificates without CN */
+ cert->name = X509_NAME_oneline(name, NULL, 0);
+ }
+ cert->path = xstrdup(unexpand_path(path));
+ if (RB_INSERT(cert_tree, tree, cert) != NULL)
+ errx(1, "unexpected duplicate");
+ info("%08lx: %s", cert->hash, cert->name);
+ no++;
+ }
+ /*
+ * ni is the number of certificates we found in the file.
+ * no is the number of certificates that weren't already in our
+ * tree or on the exclusion list.
+ */
+ if (ni == 0)
+ warnx("%s: no valid certificates found", path);
+ fclose(f);
+ return (no);
+}
+
+/*
+ * Load all certificates found in the specified path into a tree,
+ * optionally excluding those that already exist in a different tree.
+ *
+ * Returns the number of certificates added to the tree, or -1 on failure.
+ */
+static int
+read_certs(const char *path, struct cert_tree *tree, struct cert_tree *exclude)
+{
+ struct stat sb;
+ char *paths[] = { (char *)(uintptr_t)path, NULL };
+ FTS *fts;
+ FTSENT *ent;
+ int fts_options = FTS_LOGICAL | FTS_NOCHDIR;
+ int ret, total = 0;
+
+ if (stat(path, &sb) != 0) {
+ return (-1);
+ } else if (!S_ISDIR(sb.st_mode)) {
+ errno = ENOTDIR;
+ return (-1);
+ }
+ if ((fts = fts_open(paths, fts_options, NULL)) == NULL)
+ err(1, "fts_open()");
+ while ((ent = fts_read(fts)) != NULL) {
+ if (ent->fts_info != FTS_F) {
+ if (ent->fts_info == FTS_ERR)
+ warnc(ent->fts_errno, "fts_read()");
+ continue;
+ }
+ info("found %s", ent->fts_path);
+ ret = read_cert(ent->fts_path, tree, exclude);
+ if (ret > 0)
+ total += ret;
+ }
+ fts_close(fts);
+ return (total);
+}
+
+/*
+ * Save the contents of a cert tree to disk.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+write_certs(const char *dir, struct cert_tree *tree)
+{
+ struct file_tree files = RB_INITIALIZER(&files);
+ struct cert *cert;
+ struct file *file, *tmp;
+ struct dirent **dents, **ent;
+ char *path, *tmppath = NULL;
+ FILE *f;
+ mode_t mode = 0444;
+ int cmp, d, fd, ndents, ret = 0;
+
+ /*
+ * Start by generating unambiguous file names for each certificate
+ * and storing them in lexicographical order
+ */
+ RB_FOREACH(cert, cert_tree, tree) {
+ if ((file = calloc(1, sizeof(*file))) == NULL)
+ err(1, NULL);
+ file->cert = cert;
+ for (file->c = 0; file->c < INT_MAX; file->c++)
+ if (RB_INSERT(file_tree, &files, file) == NULL)
+ break;
+ if (file->c == INT_MAX)
+ errx(1, "unable to disambiguate %08lx", cert->hash);
+ free(cert->path);
+ cert->path = xasprintf("%08lx.%d", cert->hash, file->c);
+ }
+ /*
+ * Open and scan the directory.
+ */
+ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 ||
+#ifdef BOOTSTRAPPING
+ (ndents = scandir(dir, &dents, NULL, lexisort))
+#else
+ (ndents = fdscandir(d, &dents, NULL, lexisort))
+#endif
+ < 0)
+ err(1, "%s", dir);
+ /*
+ * Iterate over the directory listing and the certificate listing
+ * in parallel. If the directory listing gets ahead of the
+ * certificate listing, we need to write the current certificate
+ * and advance the certificate listing. If the certificate
+ * listing is ahead of the directory listing, we need to delete
+ * the current file and advance the directory listing. If they
+ * are neck and neck, we have a match and could in theory compare
+ * the two, but in practice it's faster to just replace the
+ * current file with the current certificate (and advance both).
+ */
+ ent = dents;
+ file = RB_MIN(file_tree, &files);
+ for (;;) {
+ if (ent < dents + ndents) {
+ /* skip directories */
+ if ((*ent)->d_type == DT_DIR) {
+ free(*ent++);
+ continue;
+ }
+ if (file != NULL) {
+ /* compare current dirent to current cert */
+ path = file->cert->path;
+ cmp = strcmp((*ent)->d_name, path);
+ } else {
+ /* trailing files in directory */
+ path = NULL;
+ cmp = -1;
+ }
+ } else {
+ if (file != NULL) {
+ /* trailing certificates */
+ path = file->cert->path;
+ cmp = 1;
+ } else {
+ /* end of both lists */
+ path = NULL;
+ break;
+ }
+ }
+ if (cmp < 0) {
+ /* a file on disk with no matching certificate */
+ info("removing %s/%s", dir, (*ent)->d_name);
+ if (!dryrun)
+ (void)unlinkat(d, (*ent)->d_name, 0);
+ free(*ent++);
+ continue;
+ }
+ if (cmp == 0) {
+ /* a file on disk with a matching certificate */
+ info("replacing %s/%s", dir, (*ent)->d_name);
+ if (dryrun) {
+ fd = open(_PATH_DEVNULL, O_WRONLY);
+ } else {
+ tmppath = xasprintf(".%s", path);
+ fd = openat(d, tmppath,
+ O_CREAT | O_WRONLY | O_TRUNC, mode);
+ if (!unprivileged && fd >= 0)
+ (void)fchmod(fd, mode);
+ }
+ free(*ent++);
+ } else {
+ /* a certificate with no matching file */
+ info("writing %s/%s", dir, path);
+ if (dryrun) {
+ fd = open(_PATH_DEVNULL, O_WRONLY);
+ } else {
+ tmppath = xasprintf(".%s", path);
+ fd = openat(d, tmppath,
+ O_CREAT | O_WRONLY | O_EXCL, mode);
+ }
+ }
+ /* write the certificate */
+ if (fd < 0 ||
+ (f = fdopen(fd, "w")) == NULL ||
+ !PEM_write_X509(f, file->cert->x509)) {
+ if (tmppath != NULL && fd >= 0) {
+ int serrno = errno;
+ (void)unlinkat(d, tmppath, 0);
+ errno = serrno;
+ }
+ err(1, "%s/%s", dir, tmppath ? tmppath : path);
+ }
+ /* rename temp file if applicable */
+ if (tmppath != NULL) {
+ if (ret == 0 && renameat(d, tmppath, d, path) != 0) {
+ warn("%s/%s", dir, path);
+ ret = -1;
+ }
+ if (ret != 0)
+ (void)unlinkat(d, tmppath, 0);
+ free(tmppath);
+ tmppath = NULL;
+ }
+ fflush(f);
+ /* emit metalog */
+ if (mlf != NULL) {
+ fprintf(mlf, ".%s/%s type=file "
+ "uname=%s gname=%s mode=%#o size=%ld\n",
+ unexpand_path(dir), path,
+ uname, gname, mode, ftell(f));
+ }
+ fclose(f);
+ /* advance certificate listing */
+ tmp = RB_NEXT(file_tree, &files, file);
+ RB_REMOVE(file_tree, &files, file);
+ free(file);
+ file = tmp;
+ }
+ free(dents);
+ close(d);
+ return (ret);
+}
+
+/*
+ * Save all certs in a tree to a single file (bundle).
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+write_bundle(const char *dir, const char *file, struct cert_tree *tree)
+{
+ struct cert *cert;
+ char *tmpfile = NULL;
+ FILE *f;
+ int d, fd, ret = 0;
+ mode_t mode = 0444;
+
+ if (dir != NULL) {
+ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0)
+ err(1, "%s", dir);
+ } else {
+ dir = ".";
+ d = AT_FDCWD;
+ }
+ info("writing %s/%s", dir, file);
+ if (dryrun) {
+ fd = open(_PATH_DEVNULL, O_WRONLY);
+ } else {
+ tmpfile = xasprintf(".%s", file);
+ fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode);
+ }
+ if (fd < 0 || (f = fdopen(fd, "w")) == NULL) {
+ if (tmpfile != NULL && fd >= 0) {
+ int serrno = errno;
+ (void)unlinkat(d, tmpfile, 0);
+ errno = serrno;
+ }
+ err(1, "%s/%s", dir, tmpfile ? tmpfile : file);
+ }
+ RB_FOREACH(cert, cert_tree, tree) {
+ if (!PEM_write_X509(f, cert->x509)) {
+ warn("%s/%s", dir, tmpfile ? tmpfile : file);
+ ret = -1;
+ break;
+ }
+ }
+ if (tmpfile != NULL) {
+ if (ret == 0 && renameat(d, tmpfile, d, file) != 0) {
+ warn("%s/%s", dir, file);
+ ret = -1;
+ }
+ if (ret != 0)
+ (void)unlinkat(d, tmpfile, 0);
+ free(tmpfile);
+ }
+ if (ret == 0 && mlf != NULL) {
+ fprintf(mlf,
+ ".%s/%s type=file uname=%s gname=%s mode=%#o size=%ld\n",
+ unexpand_path(dir), file, uname, gname, mode, ftell(f));
+ }
+ fclose(f);
+ if (d != AT_FDCWD)
+ close(d);
+ return (ret);
+}
+
+/*
+ * Load trusted certificates.
+ *
+ * Returns the number of certificates loaded.
+ */
+static unsigned int
+load_trusted(bool all, struct cert_tree *exclude)
+{
+ unsigned int i, n;
+ int ret;
+
+ /* load external trusted certs */
+ for (i = n = 0; all && trusted_paths[i] != NULL; i++) {
+ ret = read_certs(trusted_paths[i], &trusted, exclude);
+ if (ret > 0)
+ n += ret;
+ }
+
+ /* load installed trusted certs */
+ ret = read_certs(trusted_dest, &trusted, exclude);
+ if (ret > 0)
+ n += ret;
+
+ info("%d trusted certificates found", n);
+ return (n);
+}
+
+/*
+ * Load untrusted certificates.
+ *
+ * Returns the number of certificates loaded.
+ */
+static unsigned int
+load_untrusted(bool all)
+{
+ char *path;
+ unsigned int i, n;
+ int ret;
+
+ /* load external untrusted certs */
+ for (i = n = 0; all && untrusted_paths[i] != NULL; i++) {
+ ret = read_certs(untrusted_paths[i], &untrusted, NULL);
+ if (ret > 0)
+ n += ret;
+ }
+
+ /* load installed untrusted certs */
+ ret = read_certs(untrusted_dest, &untrusted, NULL);
+ if (ret > 0)
+ n += ret;
+
+ /* load legacy untrusted certs */
+ path = expand_path(LEGACY_PATH);
+ ret = read_certs(path, &untrusted, NULL);
+ if (ret > 0) {
+ warnx("certificates found in legacy directory %s",
+ path);
+ n += ret;
+ } else if (ret == 0) {
+ warnx("legacy directory %s can safely be deleted",
+ path);
+ }
+ free(path);
+
+ info("%d untrusted certificates found", n);
+ return (n);
+}
+
+/*
+ * Save trusted certificates.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+save_trusted(void)
+{
+ int ret;
+
+ /* save untrusted certs */
+ ret = write_certs(trusted_dest, &trusted);
+ return (ret);
+}
+
+/*
+ * Save untrusted certificates.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+save_untrusted(void)
+{
+ int ret;
+
+ ret = write_certs(untrusted_dest, &untrusted);
+ return (ret);
+}
+
+/*
+ * Save certificate bundle.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+save_bundle(void)
+{
+ char *dir, *file, *sep;
+ int ret;
+
+ if ((sep = strrchr(bundle_dest, '/')) == NULL) {
+ dir = NULL;
+ file = bundle_dest;
+ } else {
+ dir = xasprintf("%.*s", (int)(sep - bundle_dest), bundle_dest);
+ file = sep + 1;
+ }
+ ret = write_bundle(dir, file, &trusted);
+ free(dir);
+ return (ret);
+}
+
+/*
+ * Save everything.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+save_all(void)
+{
+ int ret = 0;
+
+ ret |= save_untrusted();
+ ret |= save_trusted();
+ if (!nobundle)
+ ret |= save_bundle();
+ return (ret);
+}
+
+/*
+ * List the contents of a certificate tree.
+ */
+static void
+list_certs(struct cert_tree *tree)
+{
+ struct cert *cert;
+ char *path, *name;
+
+ RB_FOREACH(cert, cert_tree, tree) {
+ path = longnames ? NULL : strrchr(cert->path, '/');
+ name = longnames ? NULL : strrchr(cert->name, '=');
+ printf("%s\t%s\n", path ? path + 1 : cert->path,
+ name ? name + 1 : cert->name);
+ }
+}
+
+/*
+ * Load installed trusted certificates, then list them.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+certctl_list(int argc, char **argv __unused)
+{
+ if (argc > 1)
+ usage();
+ /* load trusted certificates */
+ load_trusted(false, NULL);
+ /* list them */
+ list_certs(&trusted);
+ free_certs(&trusted);
+ return (0);
+}
+
+/*
+ * Load installed untrusted certificates, then list them.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+certctl_untrusted(int argc, char **argv __unused)
+{
+ if (argc > 1)
+ usage();
+ /* load untrusted certificates */
+ load_untrusted(false);
+ /* list them */
+ list_certs(&untrusted);
+ free_certs(&untrusted);
+ return (0);
+}
+
+/*
+ * Load trusted and untrusted certificates from all sources, then
+ * regenerate both the hashed directories and the bundle.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+certctl_rehash(int argc, char **argv __unused)
+{
+ int ret;
+
+ if (argc > 1)
+ usage();
+
+ if (unprivileged && (mlf = fopen(metalog, "a")) == NULL) {
+ warn("%s", metalog);
+ return (-1);
+ }
+
+ /* load untrusted certs first */
+ load_untrusted(true);
+
+ /* load trusted certs, excluding any that are already untrusted */
+ load_trusted(true, &untrusted);
+
+ /* save everything */
+ ret = save_all();
+
+ /* clean up */
+ free_certs(&untrusted);
+ free_certs(&trusted);
+ if (mlf != NULL)
+ fclose(mlf);
+ return (ret);
+}
+
+/*
+ * Manually add one or more certificates to the list of trusted certificates.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+certctl_trust(int argc, char **argv)
+{
+ struct cert_tree extra = RB_INITIALIZER(&extra);
+ struct cert *cert, *other, *tmp;
+ unsigned int n;
+ int i, ret;
+
+ if (argc < 2)
+ usage();
+
+ /* load untrusted certs first */
+ load_untrusted(true);
+
+ /* load trusted certs, excluding any that are already untrusted */
+ load_trusted(true, &untrusted);
+
+ /* now load the additional trusted certificates */
+ n = 0;
+ for (i = 1; i < argc; i++) {
+ ret = read_cert(argv[i], &extra, &trusted);
+ if (ret > 0)
+ n += ret;
+ }
+ if (n == 0) {
+ warnx("no new trusted certificates found");
+ free_certs(&untrusted);
+ free_certs(&trusted);
+ free_certs(&extra);
+ return (0);
+ }
+
+ /*
+ * For each new trusted cert, move it from the extra list to the
+ * trusted list, then check if a matching certificate exists on
+ * the untrusted list. If that is the case, warn the user, then
+ * remove the matching certificate from the untrusted list.
+ */
+ RB_FOREACH_SAFE(cert, cert_tree, &extra, tmp) {
+ RB_REMOVE(cert_tree, &extra, cert);
+ RB_INSERT(cert_tree, &trusted, cert);
+ if ((other = RB_FIND(cert_tree, &untrusted, cert)) != NULL) {
+ warnx("%s was previously untrusted", cert->name);
+ RB_REMOVE(cert_tree, &untrusted, other);
+ free_cert(other);
+ }
+ }
+
+ /* save everything */
+ ret = save_all();
+
+ /* clean up */
+ free_certs(&untrusted);
+ free_certs(&trusted);
+ return (ret);
+}
+
+/*
+ * Manually add one or more certificates to the list of untrusted
+ * certificates.
+ *
+ * Returns 0 on success and -1 on failure.
+ */
+static int
+certctl_untrust(int argc, char **argv)
+{
+ unsigned int n;
+ int i, ret;
+
+ if (argc < 2)
+ usage();
+
+ /* load untrusted certs first */
+ load_untrusted(true);
+
+ /* now load the additional untrusted certificates */
+ n = 0;
+ for (i = 1; i < argc; i++) {
+ ret = read_cert(argv[i], &untrusted, NULL);
+ if (ret > 0)
+ n += ret;
+ }
+ if (n == 0) {
+ warnx("no new untrusted certificates found");
+ free_certs(&untrusted);
+ return (0);
+ }
+
+ /* load trusted certs, excluding any that are already untrusted */
+ load_trusted(true, &untrusted);
+
+ /* save everything */
+ ret = save_all();
+
+ /* clean up */
+ free_certs(&untrusted);
+ free_certs(&trusted);
+ return (ret);
+}
+
+static void
+set_defaults(void)
+{
+ const char *value;
+ char *str;
+ size_t len;
+
+ if (localbase == NULL &&
+ (localbase = getenv("LOCALBASE")) == NULL) {
+ if ((str = malloc((len = PATH_MAX) + 1)) == NULL)
+ err(1, NULL);
+ while (sysctlbyname("user.localbase", str, &len, NULL, 0) < 0) {
+ if (errno != ENOMEM)
+ err(1, "sysctl(user.localbase)");
+ if ((str = realloc(str, len + 1)) == NULL)
+ err(1, NULL);
+ }
+ str[len] = '\0';
+ localbase = str;
+ }
+
+ if (destdir == NULL &&
+ (destdir = getenv("DESTDIR")) == NULL)
+ destdir = "";
+ destdir = normalize_path(destdir);
+
+ if (distbase == NULL &&
+ (distbase = getenv("DISTBASE")) == NULL)
+ distbase = "";
+ if (*distbase != '\0' && *distbase != '/')
+ errx(1, "DISTBASE=%s does not begin with a slash", distbase);
+ distbase = normalize_path(distbase);
+
+ if (unprivileged && metalog == NULL &&
+ (metalog = getenv("METALOG")) == NULL)
+ metalog = xasprintf("%s/METALOG", destdir);
+
+ if (!verbose) {
+ if ((value = getenv("CERTCTL_VERBOSE")) != NULL) {
+ if (value[0] != '\0') {
+ verbose = true;
+ }
+ }
+ }
+
+ if ((value = getenv("TRUSTPATH")) != NULL)
+ trusted_paths = split_paths(value);
+ else
+ trusted_paths = expand_paths(default_trusted_paths);
+
+ if ((value = getenv("UNTRUSTPATH")) != NULL)
+ untrusted_paths = split_paths(value);
+ else
+ untrusted_paths = expand_paths(default_untrusted_paths);
+
+ if ((value = getenv("TRUSTDESTDIR")) != NULL ||
+ (value = getenv("CERTDESTDIR")) != NULL)
+ trusted_dest = xstrdup(value);
+ else
+ trusted_dest = expand_path(TRUSTED_PATH);
+
+ if ((value = getenv("UNTRUSTDESTDIR")) != NULL)
+ untrusted_dest = xstrdup(value);
+ else
+ untrusted_dest = expand_path(UNTRUSTED_PATH);
+
+ if ((value = getenv("BUNDLE")) != NULL)
+ bundle_dest = xstrdup(value);
+ else
+ bundle_dest = expand_path(BUNDLE_PATH);
+
+ info("localbase:\t%s", localbase);
+ info("destdir:\t%s", destdir);
+ info("distbase:\t%s", distbase);
+ info("unprivileged:\t%s", unprivileged ? "true" : "false");
+ info("verbose:\t%s", verbose ? "true" : "false");
+}
+
+typedef int (*main_t)(int, char **);
+
+static struct {
+ const char *name;
+ main_t func;
+} commands[] = {
+ { "list", certctl_list },
+ { "untrusted", certctl_untrusted },
+ { "rehash", certctl_rehash },
+ { "untrust", certctl_untrust },
+ { "trust", certctl_trust },
+ { 0 },
+};
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: certctl [-lv] [-D destdir] [-d distbase] list\n"
+ " certctl [-lv] [-D destdir] [-d distbase] untrusted\n"
+ " certctl [-BnUv] [-D destdir] [-d distbase] [-M metalog] rehash\n"
+ " certctl [-nv] [-D destdir] [-d distbase] untrust <file>\n"
+ " certctl [-nv] [-D destdir] [-d distbase] trust <file>\n");
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ const char *command;
+ int opt;
+
+ while ((opt = getopt(argc, argv, "BcD:d:g:lL:M:no:Uv")) != -1)
+ switch (opt) {
+ case 'B':
+ nobundle = true;
+ break;
+ case 'c':
+ /* ignored for compatibility */
+ break;
+ case 'D':
+ destdir = optarg;
+ break;
+ case 'd':
+ distbase = optarg;
+ break;
+ case 'g':
+ gname = optarg;
+ break;
+ case 'l':
+ longnames = true;
+ break;
+ case 'L':
+ localbase = optarg;
+ break;
+ case 'M':
+ metalog = optarg;
+ break;
+ case 'n':
+ dryrun = true;
+ break;
+ case 'o':
+ uname = optarg;
+ break;
+ case 'U':
+ unprivileged = true;
+ break;
+ case 'v':
+ verbose = true;
+ break;
+ default:
+ usage();
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc < 1)
+ usage();
+
+ command = *argv;
+
+ if ((nobundle || unprivileged || metalog != NULL) &&
+ strcmp(command, "rehash") != 0)
+ usage();
+ if (!unprivileged && metalog != NULL) {
+ warnx("-M may only be used in conjunction with -U");
+ usage();
+ }
+
+ set_defaults();
+
+ for (unsigned i = 0; commands[i].name != NULL; i++)
+ if (strcmp(command, commands[i].name) == 0)
+ exit(!!commands[i].func(argc, argv));
+ usage();
+}
diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh
deleted file mode 100755
index 2bde651de126..000000000000
--- a/usr.sbin/certctl/certctl.sh
+++ /dev/null
@@ -1,366 +0,0 @@
-#!/bin/sh
-#-
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright 2018 Allan Jude <allanjude@freebsd.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted providing that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-set -u
-
-############################################################ CONFIGURATION
-
-: ${DESTDIR:=}
-: ${DISTBASE:=}
-
-############################################################ GLOBALS
-
-SCRIPTNAME="${0##*/}"
-LINK=-lrs
-ERRORS=0
-NOOP=false
-UNPRIV=false
-VERBOSE=false
-
-############################################################ FUNCTIONS
-
-info()
-{
- echo "${0##*/}: $@" >&2
-}
-
-verbose()
-{
- if "${VERBOSE}" ; then
- info "$@"
- fi
-}
-
-perform()
-{
- if ! "${NOOP}" ; then
- "$@"
- fi
-}
-
-cert_files_in()
-{
- find -L "$@" -type f \( \
- -name '*.pem' -or \
- -name '*.crt' -or \
- -name '*.cer' \
- \) 2>/dev/null
-}
-
-eolcvt()
-{
- cat "$@" | tr -s '\r' '\n'
-}
-
-do_hash()
-{
- local hash
-
- if hash=$(openssl x509 -noout -subject_hash -in "$1") ; then
- echo "$hash"
- return 0
- else
- info "Error: $1"
- ERRORS=$((ERRORS + 1))
- return 1
- fi
-}
-
-get_decimal()
-{
- local checkdir hash decimal
-
- checkdir=$1
- hash=$2
- decimal=0
-
- while [ -e "$checkdir/$hash.$decimal" ] ; do
- decimal=$((decimal + 1))
- done
-
- echo ${decimal}
- return 0
-}
-
-create_trusted()
-{
- local hash certhash otherfile otherhash
- local suffix
-
- hash=$(do_hash "$1") || return
- certhash=$(openssl x509 -sha1 -in "$1" -noout -fingerprint)
- for otherfile in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do
- otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint)
- if [ "$certhash" = "$otherhash" ] ; then
- info "Skipping untrusted certificate $hash ($otherfile)"
- return 0
- fi
- done
- for otherfile in $(find $CERTDESTDIR -name "$hash.*") ; do
- otherhash=$(openssl x509 -sha1 -in "$otherfile" -noout -fingerprint)
- if [ "$certhash" = "$otherhash" ] ; then
- verbose "Skipping duplicate entry for certificate $hash"
- return 0
- fi
- done
- suffix=$(get_decimal "$CERTDESTDIR" "$hash")
- verbose "Adding $hash.$suffix to trust store"
- perform install ${INSTALLFLAGS} -m 0444 ${LINK} \
- "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix"
-}
-
-# Accepts either dot-hash form from `certctl list` or a path to a valid cert.
-resolve_certname()
-{
- local hash srcfile filename
- local suffix
-
- # If it exists as a file, we'll try that; otherwise, we'll scan
- if [ -e "$1" ] ; then
- hash=$(do_hash "$1") || return
- srcfile=$(realpath "$1")
- suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash")
- filename="$hash.$suffix"
- echo "$srcfile" "$hash.$suffix"
- elif [ -e "${CERTDESTDIR}/$1" ] ; then
- srcfile=$(realpath "${CERTDESTDIR}/$1")
- hash=$(echo "$1" | sed -Ee 's/\.([0-9])+$//')
- suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash")
- filename="$hash.$suffix"
- echo "$srcfile" "$hash.$suffix"
- fi
-}
-
-create_untrusted()
-{
- local srcfile filename
-
- set -- $(resolve_certname "$1")
- srcfile=$1
- filename=$2
-
- if [ -z "$srcfile" -o -z "$filename" ] ; then
- return
- fi
-
- verbose "Adding $filename to untrusted list"
- perform install ${INSTALLFLAGS} -m 0444 ${LINK} \
- "$srcfile" "$UNTRUSTDESTDIR/$filename"
-}
-
-do_scan()
-{
- local CFUNC CSEARCH CPATH CFILE CERT SPLITDIR
- local oldIFS="$IFS"
- CFUNC="$1"
- CSEARCH="$2"
-
- IFS=:
- set -- $CSEARCH
- IFS="$oldIFS"
- for CFILE in $(cert_files_in "$@") ; do
- verbose "Reading $CFILE"
- case $(eolcvt "$CFILE" | egrep -c '^-+BEGIN CERTIFICATE-+$') in
- 0)
- ;;
- 1)
- "$CFUNC" "$CFILE"
- ;;
- *)
- verbose "Multiple certificates found, splitting..."
- SPLITDIR=$(mktemp -d)
- eolcvt "$CFILE" | egrep '^(---|[0-9A-Za-z/+=]+$)' | \
- split -p '^-+BEGIN CERTIFICATE-+$' - "$SPLITDIR/x"
- for CERT in $(find "$SPLITDIR" -type f) ; do
- "$CFUNC" "$CERT"
- done
- rm -rf "$SPLITDIR"
- ;;
- esac
- done
-}
-
-do_list()
-{
- local CFILE subject
-
- for CFILE in $(find "$@" \( -type f -or -type l \) -name '*.[0-9]') ; do
- if [ ! -s "$CFILE" ] ; then
- info "Unable to read $CFILE"
- ERRORS=$((ERRORS + 1))
- continue
- fi
- subject=
- if ! "$VERBOSE" ; then
- subject=$(openssl x509 -noout -subject -nameopt multiline -in "$CFILE" | sed -n '/commonName/s/.*= //p')
- fi
- if [ -z "$subject" ] ; then
- subject=$(openssl x509 -noout -subject -in "$CFILE")
- fi
- printf "%s\t%s\n" "${CFILE##*/}" "$subject"
- done
-}
-
-cmd_rehash()
-{
-
- if [ -e "$CERTDESTDIR" ] ; then
- perform find "$CERTDESTDIR" \( -type f -or -type l \) -delete
- else
- perform install -d -m 0755 "$CERTDESTDIR"
- fi
- if [ -e "$UNTRUSTDESTDIR" ] ; then
- perform find "$UNTRUSTDESTDIR" \( -type f -or -type l \) -delete
- else
- perform install -d -m 0755 "$UNTRUSTDESTDIR"
- fi
-
- do_scan create_untrusted "$UNTRUSTPATH"
- do_scan create_trusted "$TRUSTPATH"
-}
-
-cmd_list()
-{
- info "Listing Trusted Certificates:"
- do_list "$CERTDESTDIR"
-}
-
-cmd_untrust()
-{
- local UTFILE
-
- shift # verb
- perform install -d -m 0755 "$UNTRUSTDESTDIR"
- for UTFILE in "$@"; do
- info "Adding $UTFILE to untrusted list"
- create_untrusted "$UTFILE"
- done
-}
-
-cmd_trust()
-{
- local UTFILE untrustedhash certhash hash
-
- shift # verb
- for UTFILE in "$@"; do
- if [ -s "$UTFILE" ] ; then
- hash=$(do_hash "$UTFILE")
- certhash=$(openssl x509 -sha1 -in "$UTFILE" -noout -fingerprint)
- for UNTRUSTEDFILE in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do
- untrustedhash=$(openssl x509 -sha1 -in "$UNTRUSTEDFILE" -noout -fingerprint)
- if [ "$certhash" = "$untrustedhash" ] ; then
- info "Removing $(basename "$UNTRUSTEDFILE") from untrusted list"
- perform rm -f $UNTRUSTEDFILE
- fi
- done
- elif [ -e "$UNTRUSTDESTDIR/$UTFILE" ] ; then
- info "Removing $UTFILE from untrusted list"
- perform rm -f "$UNTRUSTDESTDIR/$UTFILE"
- else
- info "Cannot find $UTFILE"
- ERRORS=$((ERRORS + 1))
- fi
- done
-}
-
-cmd_untrusted()
-{
- info "Listing Untrusted Certificates:"
- do_list "$UNTRUSTDESTDIR"
-}
-
-usage()
-{
- exec >&2
- echo "Manage the TLS trusted certificates on the system"
- echo " $SCRIPTNAME [-v] list"
- echo " List trusted certificates"
- echo " $SCRIPTNAME [-v] untrusted"
- echo " List untrusted certificates"
- echo " $SCRIPTNAME [-cnUv] [-D <destdir>] [-d <distbase>] [-M <metalog>] rehash"
- echo " Rehash all trusted and untrusted certificates"
- echo " $SCRIPTNAME [-cnv] untrust <file>"
- echo " Add <file> to the list of untrusted certificates"
- echo " $SCRIPTNAME [-cnv] trust <file>"
- echo " Remove <file> from the list of untrusted certificates"
- exit 64
-}
-
-############################################################ MAIN
-
-while getopts cD:d:M:nUv flag; do
- case "$flag" in
- c) LINK=-c ;;
- D) DESTDIR=${OPTARG} ;;
- d) DISTBASE=${OPTARG} ;;
- M) METALOG=${OPTARG} ;;
- n) NOOP=true ;;
- U) UNPRIV=true ;;
- v) VERBOSE=true ;;
- esac
-done
-shift $((OPTIND - 1))
-
-DESTDIR=${DESTDIR%/}
-
-if ! [ -z "${CERTCTL_VERBOSE:-}" ] ; then
- VERBOSE=true
-fi
-: ${METALOG:=${DESTDIR}/METALOG}
-INSTALLFLAGS=
-if "$UNPRIV" ; then
- INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR:-/} -o root -g wheel"
-fi
-: ${LOCALBASE:=$(sysctl -n user.localbase)}
-: ${TRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/trusted:${DESTDIR}${LOCALBASE}/share/certs:${DESTDIR}${LOCALBASE}/etc/ssl/certs}
-: ${UNTRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/untrusted:${DESTDIR}${LOCALBASE}/etc/ssl/untrusted:${DESTDIR}${LOCALBASE}/etc/ssl/blacklisted}
-: ${CERTDESTDIR:=${DESTDIR}${DISTBASE}/etc/ssl/certs}
-: ${UNTRUSTDESTDIR:=${DESTDIR}${DISTBASE}/etc/ssl/untrusted}
-
-[ $# -gt 0 ] || usage
-case "$1" in
-list) cmd_list ;;
-rehash) cmd_rehash ;;
-blacklist) cmd_untrust "$@" ;;
-untrust) cmd_untrust "$@" ;;
-trust) cmd_trust "$@" ;;
-unblacklist) cmd_trust "$@" ;;
-untrusted) cmd_untrusted ;;
-blacklisted) cmd_untrusted ;;
-*) usage # NOTREACHED
-esac
-
-retval=$?
-if [ $ERRORS -gt 0 ] ; then
- info "Encountered $ERRORS errors"
-fi
-exit $retval
-
-################################################################################
-# END
-################################################################################
diff --git a/usr.sbin/certctl/tests/Makefile b/usr.sbin/certctl/tests/Makefile
new file mode 100644
index 000000000000..da301c3ded03
--- /dev/null
+++ b/usr.sbin/certctl/tests/Makefile
@@ -0,0 +1,5 @@
+PACKAGE= tests
+ATF_TESTS_SH= certctl_test
+${PACKAGE}FILES+= certctl.subr
+
+.include <bsd.test.mk>
diff --git a/usr.sbin/certctl/tests/certctl.subr b/usr.sbin/certctl/tests/certctl.subr
new file mode 100644
index 000000000000..841cc1781e69
--- /dev/null
+++ b/usr.sbin/certctl/tests/certctl.subr
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2025 Dag-Erling Smørgrav <des@FreeBSD.org>
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+
+# Generate a random name
+rand_name() {
+ local length=${1:-32}
+
+ jot -r -c -s '' ${length} A Z
+}
+
+# Generate a subject for a given name
+subject() {
+ local crtname=$1
+
+ echo "/CN=${crtname}/O=FreeBSD/OU=Test/"
+}
+
+# Generate a key
+gen_key() {
+ local keyname=$1
+
+ env -i PATH="${PATH}" OPENSSL_CONF=/dev/null \
+ openssl genrsa -out ${keyname}.key
+}
+
+# Generate a certificate for a given name, key, and serial number
+gen_crt() {
+ local crtname=$1
+ local keyname=${2:-${crtname}}
+ local serial=${3:-1}
+
+ if ! [ -f "${keyname}".key ]; then
+ gen_key "${keyname}"
+ fi
+ env -i PATH="${PATH}" OPENSSL_CONF=/dev/null \
+ openssl req -x509 -new \
+ -subj="$(subject ${crtname})" \
+ -set_serial ${serial} \
+ -key ${keyname}.key \
+ -out ${crtname}.crt
+}
diff --git a/usr.sbin/certctl/tests/certctl_test.sh b/usr.sbin/certctl/tests/certctl_test.sh
new file mode 100644
index 000000000000..f60bac6ffbb3
--- /dev/null
+++ b/usr.sbin/certctl/tests/certctl_test.sh
@@ -0,0 +1,332 @@
+#
+# Copyright (c) 2025 Dag-Erling Smørgrav <des@FreeBSD.org>
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+
+. $(atf_get_srcdir)/certctl.subr
+
+# Random sets of eight non-colliding names
+set1()
+{
+ cat <<EOF
+AVOYKJHSLFHWPVQMKBHENUAHJTEGMCCB 0ca83bbe
+UYSYXKDNNJTYOQPBGIKQDHRJYZHTDPKK 0d9a6512
+LODHGFXMZYKGOKAYGWTMMYQJYHDATDDM 4e6219f5
+NBBTQHJLHKBFFFWJTHHSNKOQYMGLHLPW 5dd76abc
+BJFAQZXZHYQLIDDPCAQFPDMNXICUXBXW ad68573d
+IOKNTHVEVVIJMNMYAVILMEMQQWLVRESN b577803d
+BHGMAJJGNJPIVMHMFCUTJLGFROJICEKN c98a6338
+HCRFQMGDQJALMLUQNXMPGLXFLLJRODJW f50c6379
+EOF
+}
+
+set2()
+{
+ cat <<EOF
+GOHKZTSKIPDSYNLMGYXGLROPTATELXIU 30789c88
+YOOTYHEGHZIYFXOBLNKENPSJUDGOPJJU 7fadbc13
+ETRINNYBGKIENAVGOKVJYFSSHFZIJZRH 8ed664af
+DBFGMFFMRNLPQLQPOLXOEUVLCRXLRSWT 8f34355e
+WFOPBQPLQFHDHZOUQFEIDGSYDUOTSNDQ ac0471df
+HMNETZMGNIWRGXQCVZXVZGWSGFBRRDQC b32f1472
+SHFYBXDVAUACBFPPAIGDAQIAGYOYGMQE baca75fa
+PCBGDNVPYCDGNRQSGRSLXFHYKXLAVLHW ddeeae01
+EOF
+}
+
+set3()
+{
+ cat <<EOF
+NJWIRLPWAIICVJBKXXHFHLCPAERZATRL 000aa2e5
+RJAENDPOCZQEVCPFUWOWDXPCSMYJPVYC 021b95a3
+PQUQDSWHBNVLBTNBGONYRLGZZVEFXVLO 071e8c50
+VZEXRKJUPZSFBDWBOLUZXOGLNTEAPCZM 3af7bb9b
+ZXOWOXQTXNZMAMZIWVFDZDJEWOOAGAOH 48d5c7cc
+KQSFQYVJMFTMADIHJIWGSQISWKSHRYQO 509f5ba1
+AIECYSLWZOIEPJWWUTWSQXCNCIHHZHYI 8cb0c503
+RFHWDJZEPOFLMPGXAHVEJFHCDODAPVEV 9ae4e049
+EOF
+}
+
+# Random set of three colliding names
+collhash=f2888ce3
+coll()
+{
+ cat <<EOF
+EJFTZEOANQLOYPEHWWXBWEWEFVKHMSNA $collhash
+LEMRWZAZLKZLPPSFLNLQZVGKKBEOFYWG $collhash
+ZWUPHYWKKTVEFBJOLLPDAIKGRDFVXZID $collhash
+EOF
+}
+
+sortfile() {
+ for filename; do
+ sort "${filename}" >"${filename}"-
+ mv "${filename}"- "${filename}"
+ done
+}
+
+certctl_setup()
+{
+ export DESTDIR="$PWD"
+
+ # Create input directories
+ mkdir -p ${DESTDIR}${DISTBASE}/usr/share/certs/trusted
+ mkdir -p ${DESTDIR}${DISTBASE}/usr/share/certs/untrusted
+ mkdir -p ${DESTDIR}/usr/local/share/certs
+
+ # Create output directories
+ mkdir -p ${DESTDIR}${DISTBASE}/etc/ssl/certs
+ mkdir -p ${DESTDIR}${DISTBASE}/etc/ssl/untrusted
+
+ # Generate a random key
+ keyname="testkey"
+ gen_key ${keyname}
+
+ # Generate certificates
+ :>metalog.expect
+ :>trusted.expect
+ :>untrusted.expect
+ metalog() {
+ echo ".${DISTBASE}$@ type=file" >>metalog.expect
+ }
+ trusted() {
+ local crtname=$1
+ local filename=$2
+ printf "%s\t%s\n" "${filename}" "${crtname}" >>trusted.expect
+ metalog "/etc/ssl/certs/${filename}"
+ }
+ untrusted() {
+ local crtname=$1
+ local filename=$2
+ printf "%s\t%s\n" "${filename}" "${crtname}" >>untrusted.expect
+ metalog "/etc/ssl/untrusted/${filename}"
+ }
+ set1 | while read crtname hash ; do
+ gen_crt ${crtname} ${keyname}
+ mv ${crtname}.crt ${DESTDIR}${DISTBASE}/usr/share/certs/trusted
+ trusted "${crtname}" "${hash}.0"
+ done
+ local c=0
+ coll | while read crtname hash ; do
+ gen_crt ${crtname} ${keyname}
+ mv ${crtname}.crt ${DESTDIR}${DISTBASE}/usr/share/certs/trusted
+ trusted "${crtname}" "${hash}.${c}"
+ c=$((c+1))
+ done
+ set2 | while read crtname hash ; do
+ gen_crt ${crtname} ${keyname}
+ openssl x509 -in ${crtname}.crt
+ rm ${crtname}.crt
+ trusted "${crtname}" "${hash}.0"
+ done >usr/local/share/certs/bundle.crt
+ set3 | while read crtname hash ; do
+ gen_crt ${crtname} ${keyname}
+ mv ${crtname}.crt ${DESTDIR}${DISTBASE}/usr/share/certs/untrusted
+ untrusted "${crtname}" "${hash}.0"
+ done
+ metalog "/etc/ssl/cert.pem"
+ unset -f untrusted
+ unset -f trusted
+ unset -f metalog
+ sortfile *.expect
+}
+
+check_trusted() {
+ local crtname=$1
+ local subject="$(subject ${crtname})"
+ local c=${2:-1}
+
+ atf_check -e ignore -o match:"found: ${c}\$" \
+ openssl storeutl -noout -subject "${subject}" \
+ ${DESTDIR}${DISTBASE}/etc/ssl/certs
+ atf_check -e ignore -o not-match:"found: [1-9]" \
+ openssl storeutl -noout -subject "${subject}" \
+ ${DESTDIR}${DISTBASE}/etc/ssl/untrusted
+}
+
+check_untrusted() {
+ local crtname=$1
+ local subject="$(subject ${crtname})"
+ local c=${2:-1}
+
+ atf_check -e ignore -o not-match:"found: [1-9]" \
+ openssl storeutl -noout -subject "${subject}" \
+ ${DESTDIR}/${DISTBASE}/etc/ssl/certs
+ atf_check -e ignore -o match:"found: ${c}\$" \
+ openssl storeutl -noout -subject "${subject}" \
+ ${DESTDIR}/${DISTBASE}/etc/ssl/untrusted
+}
+
+check_in_bundle() {
+ local b=${DISTBASE}${DISTBASE+/}
+ local crtfile=$1
+ local line
+
+ line=$(tail +5 "${crtfile}" | head -1)
+ atf_check grep -q "${line}" ${DESTDIR}${DISTBASE}/etc/ssl/cert.pem
+}
+
+check_not_in_bundle() {
+ local b=${DISTBASE}${DISTBASE+/}
+ local crtfile=$1
+ local line
+
+ line=$(tail +5 "${crtfile}" | head -1)
+ atf_check -s exit:1 grep -q "${line}" etc/ssl/cert.pem
+}
+
+atf_test_case rehash
+rehash_head()
+{
+ atf_set "descr" "Test the rehash command"
+}
+rehash_body()
+{
+ certctl_setup
+ atf_check certctl rehash
+
+ # Verify non-colliding trusted certificates
+ (set1; set2) >trusted
+ while read crtname hash ; do
+ check_trusted "${crtname}"
+ done <trusted
+
+ # Verify colliding trusted certificates
+ coll >coll
+ while read crtname hash ; do
+ check_trusted "${crtname}" $(wc -l <coll)
+ done <coll
+
+ # Verify untrusted certificates
+ set3 >untrusted
+ while read crtname hash ; do
+ check_untrusted "${crtname}"
+ done <untrusted
+
+ # Verify bundle
+ for f in etc/ssl/certs/*.? ; do
+ check_in_bundle "${f}"
+ done
+ for f in etc/ssl/untrusted/*.? ; do
+ check_not_in_bundle "${f}"
+ done
+}
+
+atf_test_case list
+list_head()
+{
+ atf_set "descr" "Test the list and untrusted commands"
+}
+list_body()
+{
+ certctl_setup
+ atf_check certctl rehash
+
+ atf_check -o save:trusted.out certctl list
+ sortfile trusted.out
+ # the ordering of the colliding certificates is partly
+ # determined by fields that change every time we regenerate
+ # them, so ignore them in the diff
+ atf_check diff -u \
+ --ignore-matching-lines $collhash \
+ trusted.expect trusted.out
+
+ atf_check -o save:untrusted.out certctl untrusted
+ sortfile untrusted.out
+ atf_check diff -u \
+ untrusted.expect untrusted.out
+}
+
+atf_test_case trust
+trust_head()
+{
+ atf_set "descr" "Test the trust command"
+}
+trust_body()
+{
+ certctl_setup
+ atf_check certctl rehash
+ crtname=$(set3 | (read crtname hash ; echo ${crtname}))
+ crtfile=usr/share/certs/untrusted/${crtname}.crt
+ check_untrusted ${crtname}
+ check_not_in_bundle ${crtfile}
+ atf_check -e match:"was previously untrusted" \
+ certctl trust ${crtfile}
+ check_trusted ${crtname}
+ check_in_bundle ${crtfile}
+}
+
+atf_test_case untrust
+untrust_head()
+{
+ atf_set "descr" "Test the untrust command"
+}
+untrust_body()
+{
+ certctl_setup
+ atf_check certctl rehash
+ crtname=$(set1 | (read crtname hash ; echo ${crtname}))
+ crtfile=usr/share/certs/trusted/${crtname}.crt
+ check_trusted "${crtname}"
+ check_in_bundle ${crtfile}
+ atf_check certctl untrust "${crtfile}"
+ check_untrusted "${crtname}"
+ check_not_in_bundle ${crtfile}
+}
+
+atf_test_case metalog
+metalog_head()
+{
+ atf_set "descr" "Verify the metalog"
+}
+metalog_body()
+{
+ export DISTBASE=/base
+ certctl_setup
+
+ # certctl gets DESTDIR and DISTBASE from environment
+ rm -f metalog.orig
+ atf_check certctl -U -M metalog.orig rehash
+ sed -E 's/(type=file) .*/\1/' metalog.orig | sort >metalog.short
+ atf_check diff -u metalog.expect metalog.short
+
+ # certctl gets DESTDIR and DISTBASE from command line
+ rm -f metalog.orig
+ atf_check env -uDESTDIR -uDISTBASE \
+ certctl -D ${DESTDIR} -d ${DISTBASE} -U -M metalog.orig rehash
+ sed -E 's/(type=file) .*/\1/' metalog.orig | sort >metalog.short
+ atf_check diff -u metalog.expect metalog.short
+
+ # as above, but intentionally add trailing slashes
+ rm -f metalog.orig
+ atf_check env -uDESTDIR -uDISTBASE \
+ certctl -D ${DESTDIR}// -d ${DISTBASE}/ -U -M metalog.orig rehash
+ sed -E 's/(type=file) .*/\1/' metalog.orig | sort >metalog.short
+ atf_check diff -u metalog.expect metalog.short
+}
+
+atf_test_case misc
+misc_head()
+{
+ atf_set "descr" "Test miscellaneous edge cases"
+}
+misc_body()
+{
+ # certctl rejects DISTBASE that does not begin with a slash
+ atf_check -s exit:1 -e match:"begin with a slash" \
+ certctl -d base -n rehash
+ atf_check -s exit:1 -e match:"begin with a slash" \
+ env DISTBASE=base certctl -n rehash
+}
+
+atf_init_test_cases()
+{
+ atf_add_test_case rehash
+ atf_add_test_case list
+ atf_add_test_case trust
+ atf_add_test_case untrust
+ atf_add_test_case metalog
+ atf_add_test_case misc
+}
diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8
index c72623ee05b3..5eae810b6732 100644
--- a/usr.sbin/pw/pw.8
+++ b/usr.sbin/pw/pw.8
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 29, 2024
+.Dd August 19, 2025
.Dt PW 8
.Os
.Sh NAME
@@ -191,7 +191,12 @@ utility handles updating the
.Xr master.passwd 5 ,
.Xr group 5
and the secure and insecure
-password database files, and must be run as root.
+password database files, and must be run as root
+.Po except when using
+.Fl R
+or
+.Fl V
+.Pc .
.Pp
The first one or two keywords provided to
.Nm
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c
index fc17f6dba022..a4c95258f3bb 100644
--- a/usr.sbin/pw/pw.c
+++ b/usr.sbin/pw/pw.c
@@ -162,6 +162,7 @@ main(int argc, char *argv[])
snprintf(conf.etcpath, sizeof(conf.etcpath),
"%s%s", optarg, arg == 'R' ?
_PATH_PWD : "");
+ conf.altroot = true;
} else
break;
}
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index d9fd8c77c13e..8a9a4342f5ef 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -238,6 +238,13 @@ perform_chgpwent(const char *name, struct passwd *pwd, char *nispasswd)
}
}
+static void
+pw_check_root(void)
+{
+ if (!conf.altroot && geteuid() != 0)
+ errx(EX_NOPERM, "you must be root");
+}
+
/*
* The M_LOCK and M_UNLOCK functions simply add or remove
* a "*LOCKED*" prefix from in front of the password to
@@ -256,8 +263,7 @@ pw_userlock(char *arg1, int mode)
bool locked = false;
uid_t id = (uid_t)-1;
- if (geteuid() != 0)
- errx(EX_NOPERM, "you must be root");
+ pw_check_root();
if (arg1 == NULL)
errx(EX_DATAERR, "username or id required");
@@ -1324,8 +1330,8 @@ pw_user_add(int argc, char **argv, char *arg1)
if (argc > 0)
usage();
- if (geteuid() != 0 && ! dryrun)
- errx(EX_NOPERM, "you must be root");
+ if (!dryrun)
+ pw_check_root();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
@@ -1641,8 +1647,8 @@ pw_user_mod(int argc, char **argv, char *arg1)
if (argc > 0)
usage();
- if (geteuid() != 0 && ! dryrun)
- errx(EX_NOPERM, "you must be root");
+ if (!dryrun)
+ pw_check_root();
if (quiet)
freopen(_PATH_DEVNULL, "w", stderr);
diff --git a/usr.sbin/pw/pwupd.h b/usr.sbin/pw/pwupd.h
index 262b044e07fc..a39a022ca309 100644
--- a/usr.sbin/pw/pwupd.h
+++ b/usr.sbin/pw/pwupd.h
@@ -78,6 +78,7 @@ struct pwconf {
char etcpath[MAXPATHLEN];
int fd;
int rootfd;
+ bool altroot;
bool checkduplicate;
};
diff --git a/usr.sbin/services_mkdb/services b/usr.sbin/services_mkdb/services
index 4a5b6863d92d..c5f950831767 100644
--- a/usr.sbin/services_mkdb/services
+++ b/usr.sbin/services_mkdb/services
@@ -893,7 +893,7 @@ biff 512/udp comsat #used by mail system to notify users
# processes on the same machine
login 513/tcp #remote login a la telnet;
# automatic authentication performed
-# based on priviledged port numbers
+# based on privileged port numbers
# and distributed data bases which
# identify "authentication domains"
who 513/udp whod #maintains data bases showing who's
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index fe7427130b78..81bbbbe66be8 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1830,15 +1830,14 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags)
case EHOSTUNREACH:
case EHOSTDOWN:
case EADDRNOTAVAIL:
+ case EAGAIN:
+ case ECONNREFUSED:
break;
/* case EBADF: */
/* case EACCES: */
/* case ENOTSOCK: */
/* case EFAULT: */
/* case EMSGSIZE: */
- /* case EAGAIN: */
- /* case ENOBUFS: */
- /* case ECONNREFUSED: */
default:
dprintf("removing entry: errno=%d\n", e);
f->f_type = F_UNUSED;
diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh
index d52534b46fa3..d57d74952fc7 100755
--- a/usr.sbin/unbound/setup/local-unbound-setup.sh
+++ b/usr.sbin/unbound/setup/local-unbound-setup.sh
@@ -259,7 +259,7 @@ gen_unbound_conf() {
echo " pidfile: ${pidfile}"
echo " auto-trust-anchor-file: ${anchor}"
if [ "${use_tls}" = "yes" ] ; then
- echo " tls-system-cert: yes"
+ echo " tls-cert-bundle: /etc/ssl/cert.pem"
fi
echo ""
if [ -f "${forward_conf}" ] ; then