aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc12
-rw-r--r--Makefile.libcompat1
-rw-r--r--UPDATING16
-rw-r--r--contrib/lua/Makefile2
-rw-r--r--contrib/lua/README2
-rw-r--r--contrib/lua/doc/contents.html14
-rw-r--r--contrib/lua/doc/lua.16
-rw-r--r--contrib/lua/doc/lua.css1
-rw-r--r--contrib/lua/doc/manual.html50
-rw-r--r--contrib/lua/doc/readme.html48
-rw-r--r--contrib/lua/src/lapi.c6
-rw-r--r--contrib/lua/src/lauxlib.c28
-rw-r--r--contrib/lua/src/lcode.c38
-rw-r--r--contrib/lua/src/lcode.h3
-rw-r--r--contrib/lua/src/ldebug.c231
-rw-r--r--contrib/lua/src/ldebug.h1
-rw-r--r--contrib/lua/src/ldo.c27
-rw-r--r--contrib/lua/src/ldo.h2
-rw-r--r--contrib/lua/src/lgc.c20
-rw-r--r--contrib/lua/src/liolib.c27
-rw-r--r--contrib/lua/src/lmathlib.c31
-rw-r--r--contrib/lua/src/loadlib.c9
-rw-r--r--contrib/lua/src/lobject.c2
-rw-r--r--contrib/lua/src/lobject.h18
-rw-r--r--contrib/lua/src/lopcodes.h8
-rw-r--r--contrib/lua/src/loslib.c2
-rw-r--r--contrib/lua/src/lparser.c19
-rw-r--r--contrib/lua/src/lstate.c11
-rw-r--r--contrib/lua/src/lstate.h3
-rw-r--r--contrib/lua/src/lstring.c13
-rw-r--r--contrib/lua/src/ltable.c39
-rw-r--r--contrib/lua/src/ltable.h2
-rw-r--r--contrib/lua/src/ltm.h5
-rw-r--r--contrib/lua/src/lua.c28
-rw-r--r--contrib/lua/src/lua.h8
-rw-r--r--contrib/lua/src/luaconf.h9
-rw-r--r--contrib/lua/src/lundump.c4
-rw-r--r--contrib/lua/src/lundump.h3
-rw-r--r--contrib/lua/src/lvm.c81
-rw-r--r--contrib/tzcode/localtime.c341
-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.root.dist6
-rw-r--r--krb5/Makefile.inc1
-rw-r--r--krb5/include/Makefile2
-rw-r--r--krb5/include/Makefile.inc2
-rw-r--r--krb5/lib/Makefile.inc2
-rw-r--r--krb5/libexec/Makefile.inc2
-rw-r--r--krb5/usr.bin/Makefile.inc1
-rw-r--r--krb5/usr.sbin/gss-server/Makefile2
-rw-r--r--krb5/usr.sbin/sim_server/Makefile2
-rw-r--r--krb5/usr.sbin/sserver/Makefile2
-rw-r--r--krb5/util/Makefile.inc2
-rw-r--r--krb5/util/build-tools/Makefile3
-rw-r--r--krb5/util/compile_et/Makefile3
-rw-r--r--krb5/util/et/Makefile3
-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/libc/tests/stdtime/detect_tz_changes_test.c61
-rw-r--r--lib/libcrypt/Makefile2
-rw-r--r--lib/libelftc/Makefile1
-rw-r--r--lib/libifconfig/Makefile1
-rw-r--r--lib/libiscsiutil/Makefile1
-rw-r--r--lib/libnetbsd/Makefile1
-rw-r--r--lib/libnvmf/Makefile1
-rw-r--r--lib/libopenbsd/Makefile1
-rw-r--r--lib/libpfctl/Makefile1
-rw-r--r--lib/libpmcstat/Makefile1
-rw-r--r--lib/libsm/Makefile1
-rw-r--r--lib/libsmdb/Makefile1
-rw-r--r--lib/libsmutil/Makefile1
-rw-r--r--lib/libsys/copy_file_range.235
-rw-r--r--lib/libtelnet/Makefile1
-rw-r--r--libexec/nuageinit/nuage.lua20
-rwxr-xr-xlibexec/nuageinit/nuageinit238
-rw-r--r--libexec/nuageinit/nuageinit.7104
-rw-r--r--libexec/nuageinit/tests/Makefile1
-rw-r--r--libexec/nuageinit/tests/nuage.sh9
-rw-r--r--libexec/nuageinit/tests/nuageinit.sh4
-rw-r--r--libexec/nuageinit/tests/settimezone.lua5
-rw-r--r--libexec/rtld-elf/rtld.c14
-rwxr-xr-xrelease/packages/generate-ucl.lua7
-rwxr-xr-xrelease/packages/generate-ucl.sh3
-rw-r--r--release/packages/ucl/dma-all.ucl12
-rw-r--r--release/packages/ucl/kerberos-lib-all.ucl4
-rw-r--r--release/packages/ucl/libmilter-all.ucl9
-rw-r--r--release/packages/ucl/openssl-lib-all.ucl4
-rw-r--r--release/packages/ucl/sendmail-all.ucl15
-rw-r--r--secure/lib/libcrypto/Makefile1
-rw-r--r--secure/lib/libcrypto/Makefile.inc6
-rw-r--r--secure/lib/libcrypto/Makefile.version2
-rw-r--r--secure/lib/libcrypto/engines/Makefile.inc3
-rw-r--r--secure/lib/libcrypto/modules/Makefile.inc3
-rw-r--r--secure/lib/libssl/Makefile3
-rw-r--r--share/man/man4/ata.44
-rw-r--r--share/man/man4/tap.415
-rw-r--r--share/man/man4/tun.415
-rw-r--r--share/man/man4/umb.428
-rw-r--r--share/man/man4/vtnet.4142
-rw-r--r--share/mk/Makefile1
-rw-r--r--share/mk/bsd.README1
-rw-r--r--share/mk/bsd.compat.mk1
-rw-r--r--share/mk/bsd.debug.mk68
-rw-r--r--share/mk/bsd.lib.mk101
-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--stand/common/gfx_fb.c63
-rw-r--r--stand/common/gfx_fb.h1
-rw-r--r--stand/common/misc.c13
-rw-r--r--stand/common/modinfo.c2
-rw-r--r--stand/efi/libefi/efi_console.c23
-rw-r--r--stand/i386/libi386/vidconsole.c21
-rw-r--r--stand/libsa/environment.c17
-rw-r--r--stand/libsa/stand.h1
-rw-r--r--stand/libsa/ufs.c6
-rw-r--r--stand/libsa/ufsread.c7
-rw-r--r--sys/compat/linux/linux_netlink.c76
-rw-r--r--sys/compat/linuxkpi/common/include/linux/ieee80211.h22
-rw-r--r--sys/compat/linuxkpi/common/include/net/cfg80211.h49
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h21
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c148
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211_macops.c2
-rw-r--r--sys/conf/files1
-rw-r--r--sys/conf/files.amd644
-rw-r--r--sys/conf/kern.post.mk19
-rw-r--r--sys/conf/kmod.mk23
-rw-r--r--sys/conf/newvers.sh8
-rw-r--r--sys/conf/options5
-rw-r--r--sys/contrib/dev/acpica/changes.txt28
-rw-r--r--sys/contrib/dev/acpica/common/adisasm.c12
-rw-r--r--sys/contrib/dev/acpica/common/ahtable.c1
-rw-r--r--sys/contrib/dev/acpica/common/dmtable.c1
-rw-r--r--sys/contrib/dev/acpica/common/dmtbdump2.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmtbinfo2.c2
-rw-r--r--sys/contrib/dev/acpica/common/dmtbinfo3.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslanalyze.c16
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2s.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dttable2.c77
-rw-r--r--sys/contrib/dev/acpica/compiler/dttemplate.c24
-rw-r--r--sys/contrib/dev/acpica/compiler/dttemplate.h24
-rw-r--r--sys/contrib/dev/acpica/compiler/dtutils.c1
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c2
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmethod.c29
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c1
-rw-r--r--sys/contrib/dev/acpica/components/events/evglock.c5
-rw-r--r--sys/contrib/dev/acpica/components/executer/extrace.c66
-rw-r--r--sys/contrib/dev/acpica/components/parser/psopinfo.c8
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbprint.c8
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utnonansi.c2
-rw-r--r--sys/contrib/dev/acpica/include/acdebug.h2
-rw-r--r--sys/contrib/dev/acpica/include/acexcep.h9
-rw-r--r--sys/contrib/dev/acpica/include/acinterp.h4
-rw-r--r--sys/contrib/dev/acpica/include/acpixf.h8
-rw-r--r--sys/contrib/dev/acpica/include/actbl.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbl1.h2
-rw-r--r--sys/contrib/dev/acpica/include/actbl2.h25
-rw-r--r--sys/contrib/openzfs/cmd/zdb/zdb.c8
-rw-r--r--sys/dev/fdt/fdt_common.c2
-rw-r--r--sys/dev/fdt/fdt_common.h7
-rw-r--r--sys/dev/hid/hkbd.c19
-rw-r--r--sys/dev/netmap/if_ptnet.c6
-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/network/if_vtnet.c6
-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.c2
-rw-r--r--sys/fs/nfs/nfsport.h2
-rw-r--r--sys/fs/nfsclient/nfs_clport.c6
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c2
-rw-r--r--sys/kern/imgact_elf.c54
-rw-r--r--sys/kern/uipc_usrreq.c11
-rw-r--r--sys/kern/vfs_vnops.c2
-rw-r--r--sys/modules/e6000sw/Makefile2
-rw-r--r--sys/modules/etherswitch/Makefile2
-rw-r--r--sys/modules/evdev/Makefile2
-rw-r--r--sys/modules/gpio/gpioaei/Makefile2
-rw-r--r--sys/modules/gve/Makefile2
-rw-r--r--sys/modules/if_infiniband/Makefile3
-rw-r--r--sys/modules/if_vlan/Makefile2
-rw-r--r--sys/modules/linux64/Makefile1
-rw-r--r--sys/modules/md/Makefile2
-rw-r--r--sys/modules/miiproxy/Makefile2
-rw-r--r--sys/modules/mlx5/Makefile2
-rw-r--r--sys/modules/mlx5en/Makefile2
-rw-r--r--sys/modules/netgraph/ksocket/Makefile2
-rw-r--r--sys/modules/nvmf/nvmf/Makefile3
-rw-r--r--sys/modules/qlnx/qlnxev/Makefile1
-rw-r--r--sys/modules/rtw88/Makefile1
-rw-r--r--sys/modules/rtw89/Makefile1
-rw-r--r--sys/modules/uinput/Makefile2
-rw-r--r--sys/modules/usb/usie/Makefile2
-rw-r--r--sys/modules/usb/wmt/Makefile2
-rw-r--r--sys/net/if_bridgevar.h2
-rw-r--r--sys/net/if_clone.h2
-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/netlink/netlink_io.c13
-rw-r--r--sys/netlink/netlink_linux.h2
-rw-r--r--sys/netlink/route/iface.c1
-rw-r--r--sys/netlink/route/iface_drivers.c30
-rw-r--r--sys/netlink/route/route_var.h1
-rw-r--r--sys/security/mac_do/mac_do.c48
-rw-r--r--sys/tools/amd64_ia32_vdso.sh2
-rw-r--r--sys/tools/amd64_vdso.sh2
-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--usr.sbin/certctl/certctl.c32
-rw-r--r--usr.sbin/certctl/tests/certctl_test.sh6
-rw-r--r--usr.sbin/watch/watch.82
236 files changed, 3195 insertions, 3263 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index d65d1c86deac..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}
#
diff --git a/Makefile.libcompat b/Makefile.libcompat
index d165bba341c8..e132a9f8442f 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -56,6 +56,7 @@ build${libcompat}: .PHONY
-p ${WORLDTMP}/usr/lib/debug/usr >/dev/null
.endif
${_+_}cd ${.CURDIR}; \
+ PATH=${BPATH:Q}:${PATH:Q} \
WORLDTMP=${WORLDTMP} \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
${MAKE} -f Makefile.inc1 \
diff --git a/UPDATING b/UPDATING
index 575669b8bc64..ddb2e7603b2a 100644
--- a/UPDATING
+++ b/UPDATING
@@ -27,6 +27,22 @@ 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".)
+20250823:
+ The set of pkgbase packages for Kerberos and OpenSSL has changed.
+ After updating past 250e77d4f0a5, you should check 'pkg orphans'
+ and remove any orphaned packages, then examine the output of
+ 'pkg install -r base -g FreeBSD-openssl\* FreeBSD-kerberos\*'
+ and install any new packages you need.
+
+20250823:
+ To restore bridge(4)'s ABI compatibility with ifconfig from 14.x or
+ earlier, the size of struct ifbreq has changed, so you must update
+ the kernel and /sbin/ifconfig at the same time or you will not be
+ able to add interfaces to bridge. This is particularly important
+ if you require bridge for network access during boot, in which case
+ you should install the new kernel and the new /sbin/ifconfig prior
+ to rebooting.
+
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
diff --git a/contrib/lua/Makefile b/contrib/lua/Makefile
index 8efa2eb3fdd6..6e21588476df 100644
--- a/contrib/lua/Makefile
+++ b/contrib/lua/Makefile
@@ -46,7 +46,7 @@ TO_MAN= lua.1 luac.1
# Lua version and release.
V= 5.4
-R= $V.6
+R= $V.8
# Targets start here.
all: $(PLAT)
diff --git a/contrib/lua/README b/contrib/lua/README
index 1ae97165babe..b251d296f687 100644
--- a/contrib/lua/README
+++ b/contrib/lua/README
@@ -1,5 +1,5 @@
-This is Lua 5.4.6, released on 02 May 2023.
+This is Lua 5.4.8, released on 21 May 2025.
For installation instructions, license details, and
further information about Lua, see doc/readme.html.
diff --git a/contrib/lua/doc/contents.html b/contrib/lua/doc/contents.html
index 1231e6d2481d..18b677dbac8f 100644
--- a/contrib/lua/doc/contents.html
+++ b/contrib/lua/doc/contents.html
@@ -10,7 +10,7 @@
<BODY>
<H1>
-<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
+<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
Lua 5.4 Reference Manual
</H1>
@@ -18,7 +18,7 @@ Lua 5.4 Reference Manual
The reference manual is the official definition of the Lua language.
<BR>
For a complete introduction to Lua programming, see the book
-<A HREF="http://www.lua.org/pil/">Programming in Lua</A>.
+<A HREF="https://www.lua.org/pil/">Programming in Lua</A>.
<DIV CLASS="menubar">
<A HREF="manual.html">start</A>
@@ -27,14 +27,14 @@ For a complete introduction to Lua programming, see the book
&middot;
<A HREF="#index">index</A>
&middot;
-<A HREF="http://www.lua.org/manual/">other versions</A>
+<A HREF="https://www.lua.org/manual/">other versions</A>
</DIV>
<P>
<SMALL>
-Copyright &copy; 2020&ndash;2023 Lua.org, PUC-Rio.
+Copyright &copy; 2020&ndash;2025 Lua.org, PUC-Rio.
Freely available under the terms of the
-<A HREF="http://www.lua.org/license.html">Lua license</A>.
+<A HREF="https://www.lua.org/license.html">Lua license</A>.
</SMALL>
<H2><A NAME="contents">Contents</A></H2>
@@ -668,10 +668,10 @@ Freely available under the terms of the
<P CLASS="footer">
Last update:
-Sat Apr 1 17:57:05 UTC 2023
+Wed May 21 21:11:33 UTC 2025
</P>
<!--
-Last change: revised for Lua 5.4.5
+Last change: revised for Lua 5.4.8
-->
</BODY>
diff --git a/contrib/lua/doc/lua.1 b/contrib/lua/doc/lua.1
index 3f472fd81f62..3c9e000234e3 100644
--- a/contrib/lua/doc/lua.1
+++ b/contrib/lua/doc/lua.1
@@ -1,5 +1,5 @@
-.\" $Id: lua.man,v 1.14 2022/09/23 09:06:36 lhf Exp $
-.TH LUA 1 "$Date: 2022/09/23 09:06:36 $"
+.\" $Id: lua.man,v 1.14 2024/05/08 18:48:27 lhf Exp $
+.TH LUA 1 "$Date: 2024/05/08 18:48:27 $"
.SH NAME
lua \- Lua interpreter
.SH SYNOPSIS
@@ -123,7 +123,7 @@ and the version-neutral variants are ignored.
Code to be executed before command line options and scripts.
.TP
.B LUA_PATH, LUA_PATH_5_4
-Initial value of package.cpath,
+Initial value of package.path,
the path used by require to search for Lua loaders.
.TP
.B LUA_CPATH, LUA_CPATH_5_4
diff --git a/contrib/lua/doc/lua.css b/contrib/lua/doc/lua.css
index cbd0799d1525..9013b445c654 100644
--- a/contrib/lua/doc/lua.css
+++ b/contrib/lua/doc/lua.css
@@ -143,6 +143,7 @@ table.book td.cover {
table.book img {
border: solid #000080 1px ;
+ border-radius: 2px ;
}
table.book span {
diff --git a/contrib/lua/doc/manual.html b/contrib/lua/doc/manual.html
index 0af688b343c7..8239bc2a964f 100644
--- a/contrib/lua/doc/manual.html
+++ b/contrib/lua/doc/manual.html
@@ -10,7 +10,7 @@
<BODY>
<H1>
-<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
+<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
Lua 5.4 Reference Manual
</H1>
@@ -19,9 +19,9 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
<P>
<SMALL>
-Copyright &copy; 2020&ndash;2023 Lua.org, PUC-Rio.
+Copyright &copy; 2020&ndash;2025 Lua.org, PUC-Rio.
Freely available under the terms of the
-<a href="http://www.lua.org/license.html">Lua license</a>.
+<a href="https://www.lua.org/license.html">Lua license</a>.
</SMALL>
<DIV CLASS="menubar">
@@ -29,7 +29,7 @@ Freely available under the terms of the
&middot;
<A HREF="contents.html#index">index</A>
&middot;
-<A HREF="http://www.lua.org/manual/">other versions</A>
+<A HREF="https://www.lua.org/manual/">other versions</A>
</DIV>
<!-- ====================================================================== -->
@@ -391,7 +391,7 @@ Whenever there is an error,
an <em>error object</em>
is propagated with information about the error.
Lua itself only generates errors whose error object is a string,
-but programs may generate errors with
+but programs can generate errors with
any value as the error object.
It is up to the Lua program or its host to handle such error objects.
For historical reasons,
@@ -401,7 +401,7 @@ even though it does not have to be a string.
<p>
When you use <a href="#pdf-xpcall"><code>xpcall</code></a> (or <a href="#lua_pcall"><code>lua_pcall</code></a>, in C)
-you may give a <em>message handler</em>
+you can give a <em>message handler</em>
to be called in case of errors.
This function is called with the original error object
and returns a new error object.
@@ -453,7 +453,7 @@ which is then called a <em>metamethod</em>.
In the previous example, the key is the string "<code>__add</code>"
and the metamethod is the function that performs the addition.
Unless stated otherwise,
-a metamethod may in fact be any callable value,
+a metamethod can in fact be any callable value,
which is either a function or a value with a <code>__call</code> metamethod.
@@ -1725,7 +1725,7 @@ labels in Lua are considered statements too:
<p>
A label is visible in the entire block where it is defined,
except inside nested functions.
-A goto may jump to any visible label as long as it does not
+A goto can jump to any visible label as long as it does not
enter into the scope of a local variable.
A label should not be declared
where a label with the same name is visible,
@@ -5571,7 +5571,7 @@ otherwise, returns <code>NULL</code>.
<hr><h3><a name="lua_toclose"><code>lua_toclose</code></a></h3><p>
-<span class="apii">[-0, +0, <em>m</em>]</span>
+<span class="apii">[-0, +0, <em>v</em>]</span>
<pre>void lua_toclose (lua_State *L, int index);</pre>
<p>
@@ -5592,6 +5592,11 @@ unless previously deactivated by <a href="#lua_closeslot"><code>lua_closeslot</c
<p>
+This function raises an error if the value at the given slot
+neither has a <code>__close</code> metamethod nor is a false value.
+
+
+<p>
This function should not be called for an index
that is equal to or below an active to-be-closed slot.
@@ -5664,6 +5669,12 @@ after its last character (as in&nbsp;C),
but can contain other zeros in its body.
+<p>
+This function can raise memory errors only
+when converting a number to a string
+(as then it may create a new string).
+
+
@@ -11276,13 +11287,13 @@ The returned table can contain all the fields returned by <a href="#lua_getinfo"
with the string <code>what</code> describing which fields to fill in.
The default for <code>what</code> is to get all information available,
except the table of valid lines.
-If present,
-the option '<code>f</code>'
+The option '<code>f</code>'
adds a field named <code>func</code> with the function itself.
-If present,
-the option '<code>L</code>'
-adds a field named <code>activelines</code> with the table of
-valid lines.
+The option '<code>L</code>' adds a field named <code>activelines</code>
+with the table of valid lines,
+provided the function is a Lua function.
+If the function has no debug information,
+the table is empty.
<p>
@@ -11619,6 +11630,10 @@ Lua does not consult any environment variables.
In particular,
the values of <a href="#pdf-package.path"><code>package.path</code></a> and <a href="#pdf-package.cpath"><code>package.cpath</code></a>
are set with the default paths defined in <code>luaconf.h</code>.
+To signal to the libraries that this option is on,
+the stand-alone interpreter sets the field
+<code>"LUA_NOENV"</code> in the registry to a true value.
+Other libraries may consult this field for the same purpose.
<p>
@@ -12033,13 +12048,12 @@ and LiteralString, see <a href="#3.1">&sect;3.1</a>.)
-
<P CLASS="footer">
Last update:
-Tue May 2 20:09:38 UTC 2023
+Wed May 21 21:09:59 UTC 2025
</P>
<!--
-Last change: revised for Lua 5.4.6
+Last change: revised for Lua 5.4.8
-->
</body></html>
diff --git a/contrib/lua/doc/readme.html b/contrib/lua/doc/readme.html
index 918ec8ed9378..a4eb59dd38c6 100644
--- a/contrib/lua/doc/readme.html
+++ b/contrib/lua/doc/readme.html
@@ -29,7 +29,7 @@ tt, kbd, code {
<BODY>
<H1>
-<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
+<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
Welcome to Lua 5.4
</H1>
@@ -49,29 +49,31 @@ Welcome to Lua 5.4
<P>
Lua is a powerful, efficient, lightweight, embeddable scripting language
developed by a
-<A HREF="http://www.lua.org/authors.html">team</A>
+<A HREF="https://www.lua.org/authors.html">team</A>
at
-<A HREF="http://www.puc-rio.br/">PUC-Rio</A>,
+<A HREF="https://www.puc-rio.br/">PUC-Rio</A>,
the Pontifical Catholic University of Rio de Janeiro in Brazil.
Lua is
<A HREF="#license">free software</A>
used in
-<A HREF="http://www.lua.org/uses.html">many products and projects</A>
+<A HREF="https://www.lua.org/uses.html">many products and projects</A>
around the world.
<P>
Lua's
-<A HREF="http://www.lua.org/">official web site</A>
+<A HREF="https://www.lua.org/">official website</A>
provides complete information
about Lua,
including
an
-<A HREF="http://www.lua.org/about.html">executive summary</A>
+<A HREF="https://www.lua.org/about.html">executive summary</A>,
+tips on
+<A HREF="https://www.lua.org/start.html">getting started</A>,
and
updated
-<A HREF="http://www.lua.org/docs.html">documentation</A>,
+<A HREF="https://www.lua.org/docs.html">documentation</A>,
especially the
-<A HREF="http://www.lua.org/manual/5.4/">reference manual</A>,
+<A HREF="https://www.lua.org/manual/5.4/">reference manual</A>,
which may differ slightly from the
<A HREF="contents.html">local copy</A>
distributed in this package.
@@ -79,7 +81,7 @@ distributed in this package.
<H2><A NAME="install">Installing Lua</A></H2>
<P>
Lua is distributed in
-<A HREF="http://www.lua.org/ftp/">source</A>
+<A HREF="https://www.lua.org/ftp/">source</A>
form.
You need to build it before using it.
Building Lua should be straightforward
@@ -88,7 +90,7 @@ Lua is implemented in pure ANSI C and compiles unmodified in all known
platforms that have an ANSI C compiler.
Lua also compiles unmodified as C++.
The instructions given below for building Lua are for Unix-like platforms,
-such as Linux and Mac OS X.
+such as Linux and macOS.
See also
<A HREF="#other">instructions for other systems</A>
and
@@ -97,7 +99,7 @@ and
<P>
If you don't have the time or the inclination to compile Lua yourself,
get a binary from
-<A HREF="http://lua-users.org/wiki/LuaBinaries">LuaBinaries</A>.
+<A HREF="https://luabinaries.sourceforge.net">LuaBinaries</A>.
<H3>Building Lua</H3>
<P>
@@ -107,7 +109,7 @@ Here are the details.
<OL>
<LI>
Open a terminal window and move to
-the top-level directory, which is named <TT>lua-5.4.6</TT>.
+the top-level directory, which is named <TT>lua-5.4.8</TT>.
The <TT>Makefile</TT> there controls both the build process and the installation process.
<P>
<LI>
@@ -211,8 +213,8 @@ then try "<KBD>make linux-readline MYLIBS=-ltermcap</KBD>".
record the changes you've made.
<P>
- On the other hand, if you need to customize some Lua features, you'll need
- to edit <TT>src/luaconf.h</TT> before building and installing Lua.
+ On the other hand, if you need to customize some Lua features,
+ edit <TT>src/luaconf.h</TT> before building and installing Lua.
The edited file will be the one installed, and
it will be used by any Lua clients that you build, to ensure consistency.
Further customization is available to experts by editing the Lua sources.
@@ -241,7 +243,7 @@ compiler:
</DL>
<P>
- To use Lua as a library in your own programs, you'll need to know how to
+ To use Lua as a library in your own programs, you need to know how to
create and use libraries with your compiler. Moreover, to dynamically load
C libraries for Lua, you'll need to know how to create dynamic libraries
and you'll need to make sure that the Lua API functions are accessible to
@@ -284,11 +286,11 @@ lists the
<H2><A NAME="license">License</A></H2>
<P>
-<A HREF="http://www.opensource.org/docs/definition.php">
-<IMG SRC="osi-certified-72x60.png" ALIGN="right" ALT="[osi certified]" STYLE="padding-left: 30px ;">
+<A HREF="https://opensource.org/osd">
+<IMG SRC="OSIApproved_100X125.png" ALIGN="right" ALT="[Open Source Initiative Approved License]" STYLE="padding-left: 1em" WIDTH=50>
</A>
Lua is free software distributed under the terms of the
-<A HREF="http://www.opensource.org/licenses/mit-license.html">MIT license</A>
+<A HREF="https://opensource.org/license/mit">MIT license</A>
reproduced below;
it may be used for any purpose, including commercial purposes,
at absolutely no cost without having to ask us.
@@ -296,11 +298,11 @@ at absolutely no cost without having to ask us.
The only requirement is that if you do use Lua,
then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation.
-For details, see
-<A HREF="http://www.lua.org/license.html">this</A>.
+For details, see the
+<A HREF="https://www.lua.org/license.html">license page</A>.
<BLOCKQUOTE STYLE="padding-bottom: 0em">
-Copyright &copy; 1994&ndash;2023 Lua.org, PUC-Rio.
+Copyright &copy; 1994&ndash;2025 Lua.org, PUC-Rio.
<P>
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -327,10 +329,10 @@ THE SOFTWARE.
<P CLASS="footer">
Last update:
-Tue May 2 20:08:55 UTC 2023
+Wed May 21 21:12:01 UTC 2025
</P>
<!--
-Last change: revised for Lua 5.4.6
+Last change: revised for Lua 5.4.8
-->
</BODY>
diff --git a/contrib/lua/src/lapi.c b/contrib/lua/src/lapi.c
index 34e64af1428c..04e09cff7e0d 100644
--- a/contrib/lua/src/lapi.c
+++ b/contrib/lua/src/lapi.c
@@ -417,9 +417,9 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {
o = index2value(L, idx); /* previous call may reallocate the stack */
}
if (len != NULL)
- *len = vslen(o);
+ *len = tsslen(tsvalue(o));
lua_unlock(L);
- return svalue(o);
+ return getstr(tsvalue(o));
}
@@ -1343,7 +1343,7 @@ void lua_warning (lua_State *L, const char *msg, int tocont) {
LUA_API void *lua_newuserdatauv (lua_State *L, size_t size, int nuvalue) {
Udata *u;
lua_lock(L);
- api_check(L, 0 <= nuvalue && nuvalue < USHRT_MAX, "invalid value");
+ api_check(L, 0 <= nuvalue && nuvalue < SHRT_MAX, "invalid value");
u = luaS_newudata(L, size, nuvalue);
setuvalue(L, s2v(L->top.p), u);
api_incr_top(L);
diff --git a/contrib/lua/src/lauxlib.c b/contrib/lua/src/lauxlib.c
index 4ca6c6548899..923105ed3176 100644
--- a/contrib/lua/src/lauxlib.c
+++ b/contrib/lua/src/lauxlib.c
@@ -80,6 +80,7 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
int top = lua_gettop(L);
lua_getinfo(L, "f", ar); /* push function */
lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
+ luaL_checkstack(L, 6, "not enough stack"); /* slots for 'findfield' */
if (findfield(L, top + 1, 2)) {
const char *name = lua_tostring(L, -1);
if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */
@@ -249,11 +250,13 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
return 1;
}
else {
+ const char *msg;
luaL_pushfail(L);
+ msg = (en != 0) ? strerror(en) : "(no extra info)";
if (fname)
- lua_pushfstring(L, "%s: %s", fname, strerror(en));
+ lua_pushfstring(L, "%s: %s", fname, msg);
else
- lua_pushstring(L, strerror(en));
+ lua_pushstring(L, msg);
lua_pushinteger(L, en);
return 3;
}
@@ -732,9 +735,12 @@ static const char *getF (lua_State *L, void *ud, size_t *size) {
static int errfile (lua_State *L, const char *what, int fnameindex) {
- const char *serr = strerror(errno);
+ int err = errno;
const char *filename = lua_tostring(L, fnameindex) + 1;
- lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr);
+ if (err != 0)
+ lua_pushfstring(L, "cannot %s %s: %s", what, filename, strerror(err));
+ else
+ lua_pushfstring(L, "cannot %s %s", what, filename);
lua_remove(L, fnameindex);
return LUA_ERRFILE;
}
@@ -787,6 +793,7 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
}
else {
lua_pushfstring(L, "@%s", filename);
+ errno = 0;
lf.f = fopen(filename, "r");
if (lf.f == NULL) return errfile(L, "open", fnameindex);
}
@@ -796,6 +803,7 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
if (c == LUA_SIGNATURE[0]) { /* binary file? */
lf.n = 0; /* remove possible newline */
if (filename) { /* "real" file? */
+ errno = 0;
lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */
if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
skipcomment(lf.f, &c); /* re-read initial portion */
@@ -803,6 +811,7 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
}
if (c != EOF)
lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */
+ errno = 0;
status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);
readstatus = ferror(lf.f);
if (filename) fclose(lf.f); /* close file (even in case of errors) */
@@ -933,7 +942,7 @@ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
luaL_checkstack(L, nup, "too many upvalues");
for (; l->name != NULL; l++) { /* fill the table with given functions */
- if (l->func == NULL) /* place holder? */
+ if (l->func == NULL) /* placeholder? */
lua_pushboolean(L, 0);
else {
int i;
@@ -1025,9 +1034,14 @@ static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
}
+/*
+** Standard panic funcion just prints an error message. The test
+** with 'lua_type' avoids possible memory errors in 'lua_tostring'.
+*/
static int panic (lua_State *L) {
- const char *msg = lua_tostring(L, -1);
- if (msg == NULL) msg = "error object is not a string";
+ const char *msg = (lua_type(L, -1) == LUA_TSTRING)
+ ? lua_tostring(L, -1)
+ : "error object is not a string";
lua_writestringerror("PANIC: unprotected error in call to Lua API (%s)\n",
msg);
return 0; /* return to Lua to abort */
diff --git a/contrib/lua/src/lcode.c b/contrib/lua/src/lcode.c
index 8d6ce8c08bd2..85466a82ee1d 100644
--- a/contrib/lua/src/lcode.c
+++ b/contrib/lua/src/lcode.c
@@ -35,6 +35,7 @@
#define MAXREGS 255
+/* (note that expressions VJMP also have jumps.) */
#define hasjumps(e) ((e)->t != (e)->f)
@@ -415,7 +416,7 @@ int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) {
/*
** Format and emit an 'iAsBx' instruction.
*/
-int luaK_codeAsBx (FuncState *fs, OpCode o, int a, int bc) {
+static int codeAsBx (FuncState *fs, OpCode o, int a, int bc) {
unsigned int b = bc + OFFSET_sBx;
lua_assert(getOpMode(o) == iAsBx);
lua_assert(a <= MAXARG_A && b <= MAXARG_Bx);
@@ -678,7 +679,7 @@ static int fitsBx (lua_Integer i) {
void luaK_int (FuncState *fs, int reg, lua_Integer i) {
if (fitsBx(i))
- luaK_codeAsBx(fs, OP_LOADI, reg, cast_int(i));
+ codeAsBx(fs, OP_LOADI, reg, cast_int(i));
else
luaK_codek(fs, reg, luaK_intK(fs, i));
}
@@ -687,7 +688,7 @@ void luaK_int (FuncState *fs, int reg, lua_Integer i) {
static void luaK_float (FuncState *fs, int reg, lua_Number f) {
lua_Integer fi;
if (luaV_flttointeger(f, &fi, F2Ieq) && fitsBx(fi))
- luaK_codeAsBx(fs, OP_LOADF, reg, cast_int(fi));
+ codeAsBx(fs, OP_LOADF, reg, cast_int(fi));
else
luaK_codek(fs, reg, luaK_numberK(fs, f));
}
@@ -783,7 +784,8 @@ void luaK_dischargevars (FuncState *fs, expdesc *e) {
break;
}
case VLOCAL: { /* already in a register */
- e->u.info = e->u.var.ridx;
+ int temp = e->u.var.ridx;
+ e->u.info = temp; /* (can't do a direct assignment; values overlap) */
e->k = VNONRELOC; /* becomes a non-relocatable value */
break;
}
@@ -991,7 +993,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) {
** or it is a constant.
*/
void luaK_exp2val (FuncState *fs, expdesc *e) {
- if (hasjumps(e))
+ if (e->k == VJMP || hasjumps(e))
luaK_exp2anyreg(fs, e);
else
luaK_dischargevars(fs, e);
@@ -1032,7 +1034,7 @@ static int luaK_exp2K (FuncState *fs, expdesc *e) {
** in the range of R/K indices).
** Returns 1 iff expression is K.
*/
-int luaK_exp2RK (FuncState *fs, expdesc *e) {
+static int exp2RK (FuncState *fs, expdesc *e) {
if (luaK_exp2K(fs, e))
return 1;
else { /* not a constant in the right range: put it in a register */
@@ -1044,7 +1046,7 @@ int luaK_exp2RK (FuncState *fs, expdesc *e) {
static void codeABRK (FuncState *fs, OpCode o, int a, int b,
expdesc *ec) {
- int k = luaK_exp2RK(fs, ec);
+ int k = exp2RK(fs, ec);
luaK_codeABCk(fs, o, a, b, ec->u.info, k);
}
@@ -1222,7 +1224,7 @@ static void codenot (FuncState *fs, expdesc *e) {
/*
-** Check whether expression 'e' is a small literal string
+** Check whether expression 'e' is a short literal string
*/
static int isKstr (FuncState *fs, expdesc *e) {
return (e->k == VK && !hasjumps(e) && e->u.info <= MAXARG_B &&
@@ -1232,7 +1234,7 @@ static int isKstr (FuncState *fs, expdesc *e) {
/*
** Check whether expression 'e' is a literal integer.
*/
-int luaK_isKint (expdesc *e) {
+static int isKint (expdesc *e) {
return (e->k == VKINT && !hasjumps(e));
}
@@ -1242,7 +1244,7 @@ int luaK_isKint (expdesc *e) {
** proper range to fit in register C
*/
static int isCint (expdesc *e) {
- return luaK_isKint(e) && (l_castS2U(e->u.ival) <= l_castS2U(MAXARG_C));
+ return isKint(e) && (l_castS2U(e->u.ival) <= l_castS2U(MAXARG_C));
}
@@ -1251,7 +1253,7 @@ static int isCint (expdesc *e) {
** proper range to fit in register sC
*/
static int isSCint (expdesc *e) {
- return luaK_isKint(e) && fitsC(e->u.ival);
+ return isKint(e) && fitsC(e->u.ival);
}
@@ -1290,15 +1292,17 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
if (t->k == VUPVAL && !isKstr(fs, k)) /* upvalue indexed by non 'Kstr'? */
luaK_exp2anyreg(fs, t); /* put it in a register */
if (t->k == VUPVAL) {
- t->u.ind.t = t->u.info; /* upvalue index */
- t->u.ind.idx = k->u.info; /* literal string */
+ int temp = t->u.info; /* upvalue index */
+ lua_assert(isKstr(fs, k));
+ t->u.ind.t = temp; /* (can't do a direct assignment; values overlap) */
+ t->u.ind.idx = k->u.info; /* literal short string */
t->k = VINDEXUP;
}
else {
/* register index of the table */
t->u.ind.t = (t->k == VLOCAL) ? t->u.var.ridx: t->u.info;
if (isKstr(fs, k)) {
- t->u.ind.idx = k->u.info; /* literal string */
+ t->u.ind.idx = k->u.info; /* literal short string */
t->k = VINDEXSTR;
}
else if (isCint(k)) {
@@ -1466,7 +1470,7 @@ static void codebinK (FuncState *fs, BinOpr opr,
*/
static int finishbinexpneg (FuncState *fs, expdesc *e1, expdesc *e2,
OpCode op, int line, TMS event) {
- if (!luaK_isKint(e2))
+ if (!isKint(e2))
return 0; /* not an integer constant */
else {
lua_Integer i2 = e2->u.ival;
@@ -1599,7 +1603,7 @@ static void codeeq (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2) {
op = OP_EQI;
r2 = im; /* immediate operand */
}
- else if (luaK_exp2RK(fs, e2)) { /* 2nd expression is constant? */
+ else if (exp2RK(fs, e2)) { /* 2nd expression is constant? */
op = OP_EQK;
r2 = e2->u.info; /* constant index */
}
@@ -1665,7 +1669,7 @@ void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
}
case OPR_EQ: case OPR_NE: {
if (!tonumeral(v, NULL))
- luaK_exp2RK(fs, v);
+ exp2RK(fs, v);
/* else keep numeral, which may be an immediate operand */
break;
}
diff --git a/contrib/lua/src/lcode.h b/contrib/lua/src/lcode.h
index 326582445263..0b971fc4359b 100644
--- a/contrib/lua/src/lcode.h
+++ b/contrib/lua/src/lcode.h
@@ -61,10 +61,8 @@ typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
LUAI_FUNC int luaK_code (FuncState *fs, Instruction i);
LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
-LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx);
LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A,
int B, int C, int k);
-LUAI_FUNC int luaK_isKint (expdesc *e);
LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v);
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
@@ -76,7 +74,6 @@ LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e);
-LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);
LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);
LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);
diff --git a/contrib/lua/src/ldebug.c b/contrib/lua/src/ldebug.c
index 28b1caabf77e..7264fce8a55c 100644
--- a/contrib/lua/src/ldebug.c
+++ b/contrib/lua/src/ldebug.c
@@ -31,12 +31,15 @@
-#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_VCCL)
+#define LuaClosure(f) ((f) != NULL && (f)->c.tt == LUA_VLCL)
static const char *funcnamefromcall (lua_State *L, CallInfo *ci,
const char **name);
+static const char strlocal[] = "local";
+static const char strupval[] = "upvalue";
+
static int currentpc (CallInfo *ci) {
lua_assert(isLua(ci));
@@ -254,7 +257,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
static void funcinfo (lua_Debug *ar, Closure *cl) {
- if (noLuaClosure(cl)) {
+ if (!LuaClosure(cl)) {
ar->source = "=[C]";
ar->srclen = LL("=[C]");
ar->linedefined = -1;
@@ -288,29 +291,31 @@ static int nextline (const Proto *p, int currentline, int pc) {
static void collectvalidlines (lua_State *L, Closure *f) {
- if (noLuaClosure(f)) {
+ if (!LuaClosure(f)) {
setnilvalue(s2v(L->top.p));
api_incr_top(L);
}
else {
- int i;
- TValue v;
const Proto *p = f->l.p;
int currentline = p->linedefined;
Table *t = luaH_new(L); /* new table to store active lines */
sethvalue2s(L, L->top.p, t); /* push it on stack */
api_incr_top(L);
- setbtvalue(&v); /* boolean 'true' to be the value of all indices */
- if (!p->is_vararg) /* regular function? */
- i = 0; /* consider all instructions */
- else { /* vararg function */
- lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP);
- currentline = nextline(p, currentline, 0);
- i = 1; /* skip first instruction (OP_VARARGPREP) */
- }
- for (; i < p->sizelineinfo; i++) { /* for each instruction */
- currentline = nextline(p, currentline, i); /* get its line */
- luaH_setint(L, t, currentline, &v); /* table[line] = true */
+ if (p->lineinfo != NULL) { /* proto with debug information? */
+ int i;
+ TValue v;
+ setbtvalue(&v); /* boolean 'true' to be the value of all indices */
+ if (!p->is_vararg) /* regular function? */
+ i = 0; /* consider all instructions */
+ else { /* vararg function */
+ lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP);
+ currentline = nextline(p, currentline, 0);
+ i = 1; /* skip first instruction (OP_VARARGPREP) */
+ }
+ for (; i < p->sizelineinfo; i++) { /* for each instruction */
+ currentline = nextline(p, currentline, i); /* get its line */
+ luaH_setint(L, t, currentline, &v); /* table[line] = true */
+ }
}
}
}
@@ -339,7 +344,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,
}
case 'u': {
ar->nups = (f == NULL) ? 0 : f->c.nupvalues;
- if (noLuaClosure(f)) {
+ if (!LuaClosure(f)) {
ar->isvararg = 1;
ar->nparams = 0;
}
@@ -417,40 +422,6 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
** =======================================================
*/
-static const char *getobjname (const Proto *p, int lastpc, int reg,
- const char **name);
-
-
-/*
-** Find a "name" for the constant 'c'.
-*/
-static void kname (const Proto *p, int c, const char **name) {
- TValue *kvalue = &p->k[c];
- *name = (ttisstring(kvalue)) ? svalue(kvalue) : "?";
-}
-
-
-/*
-** Find a "name" for the register 'c'.
-*/
-static void rname (const Proto *p, int pc, int c, const char **name) {
- const char *what = getobjname(p, pc, c, name); /* search for 'c' */
- if (!(what && *what == 'c')) /* did not find a constant name? */
- *name = "?";
-}
-
-
-/*
-** Find a "name" for a 'C' value in an RK instruction.
-*/
-static void rkname (const Proto *p, int pc, Instruction i, const char **name) {
- int c = GETARG_C(i); /* key index */
- if (GETARG_k(i)) /* is 'c' a constant? */
- kname(p, c, name);
- else /* 'c' is a register */
- rname(p, pc, c, name);
-}
-
static int filterpc (int pc, int jmptarget) {
if (pc < jmptarget) /* is code conditional (inside a jump)? */
@@ -509,28 +480,29 @@ static int findsetreg (const Proto *p, int lastpc, int reg) {
/*
-** Check whether table being indexed by instruction 'i' is the
-** environment '_ENV'
+** Find a "name" for the constant 'c'.
*/
-static const char *gxf (const Proto *p, int pc, Instruction i, int isup) {
- int t = GETARG_B(i); /* table index */
- const char *name; /* name of indexed variable */
- if (isup) /* is an upvalue? */
- name = upvalname(p, t);
- else
- getobjname(p, pc, t, &name);
- return (name && strcmp(name, LUA_ENV) == 0) ? "global" : "field";
+static const char *kname (const Proto *p, int index, const char **name) {
+ TValue *kvalue = &p->k[index];
+ if (ttisstring(kvalue)) {
+ *name = getstr(tsvalue(kvalue));
+ return "constant";
+ }
+ else {
+ *name = "?";
+ return NULL;
+ }
}
-static const char *getobjname (const Proto *p, int lastpc, int reg,
- const char **name) {
- int pc;
- *name = luaF_getlocalname(p, reg + 1, lastpc);
+static const char *basicgetobjname (const Proto *p, int *ppc, int reg,
+ const char **name) {
+ int pc = *ppc;
+ *name = luaF_getlocalname(p, reg + 1, pc);
if (*name) /* is a local? */
- return "local";
+ return strlocal;
/* else try symbolic execution */
- pc = findsetreg(p, lastpc, reg);
+ *ppc = pc = findsetreg(p, pc, reg);
if (pc != -1) { /* could find instruction? */
Instruction i = p->code[pc];
OpCode op = GET_OPCODE(i);
@@ -538,18 +510,86 @@ static const char *getobjname (const Proto *p, int lastpc, int reg,
case OP_MOVE: {
int b = GETARG_B(i); /* move from 'b' to 'a' */
if (b < GETARG_A(i))
- return getobjname(p, pc, b, name); /* get name for 'b' */
+ return basicgetobjname(p, ppc, b, name); /* get name for 'b' */
break;
}
+ case OP_GETUPVAL: {
+ *name = upvalname(p, GETARG_B(i));
+ return strupval;
+ }
+ case OP_LOADK: return kname(p, GETARG_Bx(i), name);
+ case OP_LOADKX: return kname(p, GETARG_Ax(p->code[pc + 1]), name);
+ default: break;
+ }
+ }
+ return NULL; /* could not find reasonable name */
+}
+
+
+/*
+** Find a "name" for the register 'c'.
+*/
+static void rname (const Proto *p, int pc, int c, const char **name) {
+ const char *what = basicgetobjname(p, &pc, c, name); /* search for 'c' */
+ if (!(what && *what == 'c')) /* did not find a constant name? */
+ *name = "?";
+}
+
+
+/*
+** Find a "name" for a 'C' value in an RK instruction.
+*/
+static void rkname (const Proto *p, int pc, Instruction i, const char **name) {
+ int c = GETARG_C(i); /* key index */
+ if (GETARG_k(i)) /* is 'c' a constant? */
+ kname(p, c, name);
+ else /* 'c' is a register */
+ rname(p, pc, c, name);
+}
+
+
+/*
+** Check whether table being indexed by instruction 'i' is the
+** environment '_ENV'. If the table is an upvalue, get its name;
+** otherwise, find some "name" for the table and check whether
+** that name is the name of a local variable (and not, for instance,
+** a string). Then check that, if there is a name, it is '_ENV'.
+*/
+static const char *isEnv (const Proto *p, int pc, Instruction i, int isup) {
+ int t = GETARG_B(i); /* table index */
+ const char *name; /* name of indexed variable */
+ if (isup) /* is 't' an upvalue? */
+ name = upvalname(p, t);
+ else { /* 't' is a register */
+ const char *what = basicgetobjname(p, &pc, t, &name);
+ if (what != strlocal && what != strupval)
+ name = NULL; /* cannot be the variable _ENV */
+ }
+ return (name && strcmp(name, LUA_ENV) == 0) ? "global" : "field";
+}
+
+
+/*
+** Extend 'basicgetobjname' to handle table accesses
+*/
+static const char *getobjname (const Proto *p, int lastpc, int reg,
+ const char **name) {
+ const char *kind = basicgetobjname(p, &lastpc, reg, name);
+ if (kind != NULL)
+ return kind;
+ else if (lastpc != -1) { /* could find instruction? */
+ Instruction i = p->code[lastpc];
+ OpCode op = GET_OPCODE(i);
+ switch (op) {
case OP_GETTABUP: {
int k = GETARG_C(i); /* key index */
kname(p, k, name);
- return gxf(p, pc, i, 1);
+ return isEnv(p, lastpc, i, 1);
}
case OP_GETTABLE: {
int k = GETARG_C(i); /* key index */
- rname(p, pc, k, name);
- return gxf(p, pc, i, 0);
+ rname(p, lastpc, k, name);
+ return isEnv(p, lastpc, i, 0);
}
case OP_GETI: {
*name = "integer index";
@@ -558,24 +598,10 @@ static const char *getobjname (const Proto *p, int lastpc, int reg,
case OP_GETFIELD: {
int k = GETARG_C(i); /* key index */
kname(p, k, name);
- return gxf(p, pc, i, 0);
- }
- case OP_GETUPVAL: {
- *name = upvalname(p, GETARG_B(i));
- return "upvalue";
- }
- case OP_LOADK:
- case OP_LOADKX: {
- int b = (op == OP_LOADK) ? GETARG_Bx(i)
- : GETARG_Ax(p->code[pc + 1]);
- if (ttisstring(&p->k[b])) {
- *name = svalue(&p->k[b]);
- return "constant";
- }
- break;
+ return isEnv(p, lastpc, i, 0);
}
case OP_SELF: {
- rkname(p, pc, i, name);
+ rkname(p, lastpc, i, name);
return "method";
}
default: break; /* go through to return NULL */
@@ -627,7 +653,7 @@ static const char *funcnamefromcode (lua_State *L, const Proto *p,
default:
return NULL; /* cannot find a reasonable name */
}
- *name = getstr(G(L)->tmname[tm]) + 2;
+ *name = getshrstr(G(L)->tmname[tm]) + 2;
return "metamethod";
}
@@ -684,7 +710,7 @@ static const char *getupvalname (CallInfo *ci, const TValue *o,
for (i = 0; i < c->nupvalues; i++) {
if (c->upvals[i]->v.p == o) {
*name = upvalname(c->p, i);
- return "upvalue";
+ return strupval;
}
}
return NULL;
@@ -866,6 +892,28 @@ static int changedline (const Proto *p, int oldpc, int newpc) {
/*
+** Traces Lua calls. If code is running the first instruction of a function,
+** and function is not vararg, and it is not coming from an yield,
+** calls 'luaD_hookcall'. (Vararg functions will call 'luaD_hookcall'
+** after adjusting its variable arguments; otherwise, they could call
+** a line/count hook before the call hook. Functions coming from
+** an yield already called 'luaD_hookcall' before yielding.)
+*/
+int luaG_tracecall (lua_State *L) {
+ CallInfo *ci = L->ci;
+ Proto *p = ci_func(ci)->p;
+ ci->u.l.trap = 1; /* ensure hooks will be checked */
+ if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */
+ if (p->is_vararg)
+ return 0; /* hooks will start at VARARGPREP instruction */
+ else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yieded? */
+ luaD_hookcall(L, ci); /* check 'call' hook */
+ }
+ return 1; /* keep 'trap' on */
+}
+
+
+/*
** Traces the execution of a Lua function. Called before the execution
** of each opcode, when debug is on. 'L->oldpc' stores the last
** instruction traced, to detect line changes. When entering a new
@@ -888,12 +936,12 @@ int luaG_traceexec (lua_State *L, const Instruction *pc) {
}
pc++; /* reference is always next instruction */
ci->u.l.savedpc = pc; /* save 'pc' */
- counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
+ counthook = (mask & LUA_MASKCOUNT) && (--L->hookcount == 0);
if (counthook)
resethookcount(L); /* reset count */
else if (!(mask & LUA_MASKLINE))
return 1; /* no line hook and count != 0; nothing to be done now */
- if (ci->callstatus & CIST_HOOKYIELD) { /* called hook last time? */
+ if (ci->callstatus & CIST_HOOKYIELD) { /* hook yielded last time? */
ci->callstatus &= ~CIST_HOOKYIELD; /* erase mark */
return 1; /* do not call hook again (VM yielded, so it did not move) */
}
@@ -915,7 +963,6 @@ int luaG_traceexec (lua_State *L, const Instruction *pc) {
if (L->status == LUA_YIELD) { /* did hook yield? */
if (counthook)
L->hookcount = 1; /* undo decrement to zero */
- ci->u.l.savedpc--; /* undo increment (resume will increment it again) */
ci->callstatus |= CIST_HOOKYIELD; /* mark that it yielded */
luaD_throw(L, LUA_YIELD);
}
diff --git a/contrib/lua/src/ldebug.h b/contrib/lua/src/ldebug.h
index 2c3074c61b6f..2bfce3cb5e77 100644
--- a/contrib/lua/src/ldebug.h
+++ b/contrib/lua/src/ldebug.h
@@ -58,6 +58,7 @@ LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
TString *src, int line);
LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
LUAI_FUNC int luaG_traceexec (lua_State *L, const Instruction *pc);
+LUAI_FUNC int luaG_tracecall (lua_State *L);
#endif
diff --git a/contrib/lua/src/ldo.c b/contrib/lua/src/ldo.c
index 2a0017ca62a3..c92573d6e699 100644
--- a/contrib/lua/src/ldo.c
+++ b/contrib/lua/src/ldo.c
@@ -94,10 +94,6 @@ void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
break;
}
- case LUA_ERRERR: {
- setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
- break;
- }
case LUA_OK: { /* special case only for closing upvalues */
setnilvalue(s2v(oldtop)); /* no error message */
break;
@@ -120,6 +116,7 @@ l_noret luaD_throw (lua_State *L, int errcode) {
else { /* thread has no error handler */
global_State *g = G(L);
errcode = luaE_resetthread(L, errcode); /* close all upvalues */
+ L->status = errcode;
if (g->mainthread->errorJmp) { /* main thread has a handler? */
setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */
luaD_throw(g->mainthread, errcode); /* re-throw in main thread */
@@ -198,6 +195,16 @@ static void correctstack (lua_State *L) {
/* some space for error handling */
#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200)
+
+/* raise an error while running the message handler */
+l_noret luaD_errerr (lua_State *L) {
+ TString *msg = luaS_newliteral(L, "error in error handling");
+ setsvalue2s(L, L->top.p, msg);
+ L->top.p++; /* assume EXTRA_STACK */
+ luaD_throw(L, LUA_ERRERR);
+}
+
+
/*
** Reallocate the stack to a new size, correcting all pointers into it.
** In ISO C, any pointer use after the pointer has been deallocated is
@@ -247,7 +254,7 @@ int luaD_growstack (lua_State *L, int n, int raiseerror) {
a stack error; cannot grow further than that. */
lua_assert(stacksize(L) == ERRORSTACKSIZE);
if (raiseerror)
- luaD_throw(L, LUA_ERRERR); /* error inside message handler */
+ luaD_errerr(L); /* error inside message handler */
return 0; /* if not 'raiseerror', just signal it */
}
else if (n < LUAI_MAXSTACK) { /* avoids arithmetic overflows */
@@ -409,7 +416,7 @@ static void rethook (lua_State *L, CallInfo *ci, int nres) {
** stack, below original 'func', so that 'luaD_precall' can call it. Raise
** an error if there is no '__call' metafield.
*/
-StkId luaD_tryfuncTM (lua_State *L, StkId func) {
+static StkId tryfuncTM (lua_State *L, StkId func) {
const TValue *tm;
StkId p;
checkstackGCp(L, 1, func); /* space for metamethod */
@@ -568,7 +575,7 @@ int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func,
return -1;
}
default: { /* not a function */
- func = luaD_tryfuncTM(L, func); /* try to get '__call' metamethod */
+ func = tryfuncTM(L, func); /* try to get '__call' metamethod */
/* return luaD_pretailcall(L, ci, func, narg1 + 1, delta); */
narg1++;
goto retry; /* try again */
@@ -609,7 +616,7 @@ CallInfo *luaD_precall (lua_State *L, StkId func, int nresults) {
return ci;
}
default: { /* not a function */
- func = luaD_tryfuncTM(L, func); /* try to get '__call' metamethod */
+ func = tryfuncTM(L, func); /* try to get '__call' metamethod */
/* return luaD_precall(L, func, nresults); */
goto retry; /* try again with metamethod */
}
@@ -792,6 +799,10 @@ static void resume (lua_State *L, void *ud) {
lua_assert(L->status == LUA_YIELD);
L->status = LUA_OK; /* mark that it is running (again) */
if (isLua(ci)) { /* yielded inside a hook? */
+ /* undo increment made by 'luaG_traceexec': instruction was not
+ executed yet */
+ lua_assert(ci->callstatus & CIST_HOOKYIELD);
+ ci->u.l.savedpc--;
L->top.p = firstArg; /* discard arguments */
luaV_execute(L, ci); /* just continue running Lua code */
}
diff --git a/contrib/lua/src/ldo.h b/contrib/lua/src/ldo.h
index 1aa446ad09e9..4de9540ec807 100644
--- a/contrib/lua/src/ldo.h
+++ b/contrib/lua/src/ldo.h
@@ -60,6 +60,7 @@
/* type of protected functions, to be ran by 'runprotected' */
typedef void (*Pfunc) (lua_State *L, void *ud);
+LUAI_FUNC l_noret luaD_errerr (lua_State *L);
LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
const char *mode);
@@ -71,7 +72,6 @@ LUAI_FUNC int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func,
LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults);
LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults);
-LUAI_FUNC StkId luaD_tryfuncTM (lua_State *L, StkId func);
LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status);
LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
ptrdiff_t oldtop, ptrdiff_t ef);
diff --git a/contrib/lua/src/lgc.c b/contrib/lua/src/lgc.c
index a3094ff57126..5817f9eec35a 100644
--- a/contrib/lua/src/lgc.c
+++ b/contrib/lua/src/lgc.c
@@ -542,10 +542,12 @@ static void traversestrongtable (global_State *g, Table *h) {
static lu_mem traversetable (global_State *g, Table *h) {
const char *weakkey, *weakvalue;
const TValue *mode = gfasttm(g, h->metatable, TM_MODE);
+ TString *smode;
markobjectN(g, h->metatable);
- if (mode && ttisstring(mode) && /* is there a weak mode? */
- (cast_void(weakkey = strchr(svalue(mode), 'k')),
- cast_void(weakvalue = strchr(svalue(mode), 'v')),
+ if (mode && ttisshrstring(mode) && /* is there a weak mode? */
+ (cast_void(smode = tsvalue(mode)),
+ cast_void(weakkey = strchr(getshrstr(smode), 'k')),
+ cast_void(weakvalue = strchr(getshrstr(smode), 'v')),
(weakkey || weakvalue))) { /* is really weak? */
if (!weakkey) /* strong keys? */
traverseweakvalue(g, h);
@@ -638,7 +640,9 @@ static int traversethread (global_State *g, lua_State *th) {
for (uv = th->openupval; uv != NULL; uv = uv->u.open.next)
markobject(g, uv); /* open upvalues cannot be collected */
if (g->gcstate == GCSatomic) { /* final traversal? */
- for (; o < th->stack_last.p + EXTRA_STACK; o++)
+ if (!g->gcemergency)
+ luaD_shrinkstack(th); /* do not change stack in emergency cycle */
+ for (o = th->top.p; o < th->stack_last.p + EXTRA_STACK; o++)
setnilvalue(s2v(o)); /* clear dead stack slice */
/* 'remarkupvals' may have removed thread from 'twups' list */
if (!isintwups(th) && th->openupval != NULL) {
@@ -646,8 +650,6 @@ static int traversethread (global_State *g, lua_State *th) {
g->twups = th;
}
}
- else if (!g->gcemergency)
- luaD_shrinkstack(th); /* do not change stack in emergency cycle */
return 1 + stacksize(th);
}
@@ -1409,7 +1411,7 @@ static void stepgenfull (lua_State *L, global_State *g) {
setminordebt(g);
}
else { /* another bad collection; stay in incremental mode */
- g->GCestimate = gettotalbytes(g); /* first estimate */;
+ g->GCestimate = gettotalbytes(g); /* first estimate */
entersweep(L);
luaC_runtilstate(L, bitmask(GCSpause)); /* finish collection */
setpause(g);
@@ -1604,7 +1606,7 @@ static lu_mem singlestep (lua_State *L) {
case GCSenteratomic: {
work = atomic(L); /* work is what was traversed by 'atomic' */
entersweep(L);
- g->GCestimate = gettotalbytes(g); /* first estimate */;
+ g->GCestimate = gettotalbytes(g); /* first estimate */
break;
}
case GCSswpallgc: { /* sweep "regular" objects */
@@ -1710,6 +1712,8 @@ static void fullinc (lua_State *L, global_State *g) {
entersweep(L); /* sweep everything to turn them back to white */
/* finish any pending sweep phase to start a new cycle */
luaC_runtilstate(L, bitmask(GCSpause));
+ luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
+ g->gcstate = GCSenteratomic; /* go straight to atomic phase */
luaC_runtilstate(L, bitmask(GCScallfin)); /* run up to finalizers */
/* estimate must be correct after a full GC cycle */
lua_assert(g->GCestimate == gettotalbytes(g));
diff --git a/contrib/lua/src/liolib.c b/contrib/lua/src/liolib.c
index b08397da45da..c5075f3e78a9 100644
--- a/contrib/lua/src/liolib.c
+++ b/contrib/lua/src/liolib.c
@@ -245,8 +245,8 @@ static int f_gc (lua_State *L) {
*/
static int io_fclose (lua_State *L) {
LStream *p = tolstream(L);
- int res = fclose(p->f);
- return luaL_fileresult(L, (res == 0), NULL);
+ errno = 0;
+ return luaL_fileresult(L, (fclose(p->f) == 0), NULL);
}
@@ -272,6 +272,7 @@ static int io_open (lua_State *L) {
LStream *p = newfile(L);
const char *md = mode; /* to traverse/check mode */
luaL_argcheck(L, l_checkmode(md), 2, "invalid mode");
+ errno = 0;
p->f = fopen(filename, mode);
return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;
}
@@ -292,6 +293,7 @@ static int io_popen (lua_State *L) {
const char *mode = luaL_optstring(L, 2, "r");
LStream *p = newprefile(L);
luaL_argcheck(L, l_checkmodep(mode), 2, "invalid mode");
+ errno = 0;
p->f = l_popen(L, filename, mode);
p->closef = &io_pclose;
return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;
@@ -300,6 +302,7 @@ static int io_popen (lua_State *L) {
static int io_tmpfile (lua_State *L) {
LStream *p = newfile(L);
+ errno = 0;
p->f = tmpfile();
return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1;
}
@@ -567,6 +570,7 @@ static int g_read (lua_State *L, FILE *f, int first) {
int nargs = lua_gettop(L) - 1;
int n, success;
clearerr(f);
+ errno = 0;
if (nargs == 0) { /* no arguments? */
success = read_line(L, f, 1);
n = first + 1; /* to return 1 result */
@@ -660,6 +664,7 @@ static int io_readline (lua_State *L) {
static int g_write (lua_State *L, FILE *f, int arg) {
int nargs = lua_gettop(L) - arg;
int status = 1;
+ errno = 0;
for (; nargs--; arg++) {
if (lua_type(L, arg) == LUA_TNUMBER) {
/* optimization: could be done exactly as for strings */
@@ -678,7 +683,8 @@ static int g_write (lua_State *L, FILE *f, int arg) {
}
if (l_likely(status))
return 1; /* file handle already on stack top */
- else return luaL_fileresult(L, status, NULL);
+ else
+ return luaL_fileresult(L, status, NULL);
}
@@ -703,6 +709,7 @@ static int f_seek (lua_State *L) {
l_seeknum offset = (l_seeknum)p3;
luaL_argcheck(L, (lua_Integer)offset == p3, 3,
"not an integer in proper range");
+ errno = 0;
op = l_fseek(f, offset, mode[op]);
if (l_unlikely(op))
return luaL_fileresult(L, 0, NULL); /* error */
@@ -719,19 +726,25 @@ static int f_setvbuf (lua_State *L) {
FILE *f = tofile(L);
int op = luaL_checkoption(L, 2, NULL, modenames);
lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE);
- int res = setvbuf(f, NULL, mode[op], (size_t)sz);
+ int res;
+ errno = 0;
+ res = setvbuf(f, NULL, mode[op], (size_t)sz);
return luaL_fileresult(L, res == 0, NULL);
}
static int io_flush (lua_State *L) {
- return luaL_fileresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);
+ FILE *f = getiofile(L, IO_OUTPUT);
+ errno = 0;
+ return luaL_fileresult(L, fflush(f) == 0, NULL);
}
static int f_flush (lua_State *L) {
- return luaL_fileresult(L, fflush(tofile(L)) == 0, NULL);
+ FILE *f = tofile(L);
+ errno = 0;
+ return luaL_fileresult(L, fflush(f) == 0, NULL);
}
@@ -773,7 +786,7 @@ static const luaL_Reg meth[] = {
** metamethods for file handles
*/
static const luaL_Reg metameth[] = {
- {"__index", NULL}, /* place holder */
+ {"__index", NULL}, /* placeholder */
{"__gc", f_gc},
{"__close", f_gc},
{"__tostring", f_tostring},
diff --git a/contrib/lua/src/lmathlib.c b/contrib/lua/src/lmathlib.c
index d0b1e1e5d6f5..438106348084 100644
--- a/contrib/lua/src/lmathlib.c
+++ b/contrib/lua/src/lmathlib.c
@@ -249,6 +249,15 @@ static int math_type (lua_State *L) {
** ===================================================================
*/
+/*
+** This code uses lots of shifts. ANSI C does not allow shifts greater
+** than or equal to the width of the type being shifted, so some shifts
+** are written in convoluted ways to match that restriction. For
+** preprocessor tests, it assumes a width of 32 bits, so the maximum
+** shift there is 31 bits.
+*/
+
+
/* number of binary digits in the mantissa of a float */
#define FIGS l_floatatt(MANT_DIG)
@@ -271,16 +280,19 @@ static int math_type (lua_State *L) {
/* 'long' has at least 64 bits */
#define Rand64 unsigned long
+#define SRand64 long
#elif !defined(LUA_USE_C89) && defined(LLONG_MAX)
/* there is a 'long long' type (which must have at least 64 bits) */
#define Rand64 unsigned long long
+#define SRand64 long long
#elif ((LUA_MAXUNSIGNED >> 31) >> 31) >= 3
/* 'lua_Unsigned' has at least 64 bits */
#define Rand64 lua_Unsigned
+#define SRand64 lua_Integer
#endif
@@ -319,23 +331,30 @@ static Rand64 nextrand (Rand64 *state) {
}
-/* must take care to not shift stuff by more than 63 slots */
-
-
/*
** Convert bits from a random integer into a float in the
** interval [0,1), getting the higher FIG bits from the
** random unsigned integer and converting that to a float.
+** Some old Microsoft compilers cannot cast an unsigned long
+** to a floating-point number, so we use a signed long as an
+** intermediary. When lua_Number is float or double, the shift ensures
+** that 'sx' is non negative; in that case, a good compiler will remove
+** the correction.
*/
/* must throw out the extra (64 - FIGS) bits */
#define shift64_FIG (64 - FIGS)
-/* to scale to [0, 1), multiply by scaleFIG = 2^(-FIGS) */
+/* 2^(-FIGS) == 2^-1 / 2^(FIGS-1) */
#define scaleFIG (l_mathop(0.5) / ((Rand64)1 << (FIGS - 1)))
static lua_Number I2d (Rand64 x) {
- return (lua_Number)(trim64(x) >> shift64_FIG) * scaleFIG;
+ SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG);
+ lua_Number res = (lua_Number)(sx) * scaleFIG;
+ if (sx < 0)
+ res += l_mathop(1.0); /* correct the two's complement if negative */
+ lua_assert(0 <= res && res < 1);
+ return res;
}
/* convert a 'Rand64' to a 'lua_Unsigned' */
@@ -471,8 +490,6 @@ static lua_Number I2d (Rand64 x) {
#else /* 32 < FIGS <= 64 */
-/* must take care to not shift stuff by more than 31 slots */
-
/* 2^(-FIGS) = 1.0 / 2^30 / 2^3 / 2^(FIGS-33) */
#define scaleFIG \
(l_mathop(1.0) / (UONE << 30) / l_mathop(8.0) / (UONE << (FIGS - 33)))
diff --git a/contrib/lua/src/loadlib.c b/contrib/lua/src/loadlib.c
index d792dffaa03b..6d289fcebb8c 100644
--- a/contrib/lua/src/loadlib.c
+++ b/contrib/lua/src/loadlib.c
@@ -25,15 +25,6 @@
/*
-** LUA_IGMARK is a mark to ignore all before it when building the
-** luaopen_ function name.
-*/
-#if !defined (LUA_IGMARK)
-#define LUA_IGMARK "-"
-#endif
-
-
-/*
** LUA_CSUBSEP is the character that replaces dots in submodule names
** when searching for a C loader.
** LUA_LSUBSEP is the character that replaces dots in submodule names
diff --git a/contrib/lua/src/lobject.c b/contrib/lua/src/lobject.c
index f73ffc6d92bd..9cfa5227eb46 100644
--- a/contrib/lua/src/lobject.c
+++ b/contrib/lua/src/lobject.c
@@ -542,7 +542,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
addstr2buff(&buff, fmt, strlen(fmt)); /* rest of 'fmt' */
clearbuff(&buff); /* empty buffer into the stack */
lua_assert(buff.pushed == 1);
- return svalue(s2v(L->top.p - 1));
+ return getstr(tsvalue(s2v(L->top.p - 1)));
}
diff --git a/contrib/lua/src/lobject.h b/contrib/lua/src/lobject.h
index 556608e4aa21..980e42f8c27a 100644
--- a/contrib/lua/src/lobject.h
+++ b/contrib/lua/src/lobject.h
@@ -386,7 +386,7 @@ typedef struct GCObject {
typedef struct TString {
CommonHeader;
lu_byte extra; /* reserved words for short strings; "has hash" for longs */
- lu_byte shrlen; /* length for short strings */
+ lu_byte shrlen; /* length for short strings, 0xFF for long strings */
unsigned int hash;
union {
size_t lnglen; /* length for long strings */
@@ -398,19 +398,17 @@ typedef struct TString {
/*
-** Get the actual string (array of bytes) from a 'TString'.
+** Get the actual string (array of bytes) from a 'TString'. (Generic
+** version and specialized versions for long and short strings.)
*/
-#define getstr(ts) ((ts)->contents)
+#define getstr(ts) ((ts)->contents)
+#define getlngstr(ts) check_exp((ts)->shrlen == 0xFF, (ts)->contents)
+#define getshrstr(ts) check_exp((ts)->shrlen != 0xFF, (ts)->contents)
-/* get the actual string (array of bytes) from a Lua value */
-#define svalue(o) getstr(tsvalue(o))
-
/* get string length from 'TString *s' */
-#define tsslen(s) ((s)->tt == LUA_VSHRSTR ? (s)->shrlen : (s)->u.lnglen)
-
-/* get string length from 'TValue *o' */
-#define vslen(o) tsslen(tsvalue(o))
+#define tsslen(s) \
+ ((s)->shrlen != 0xFF ? (s)->shrlen : (s)->u.lnglen)
/* }================================================================== */
diff --git a/contrib/lua/src/lopcodes.h b/contrib/lua/src/lopcodes.h
index 4c55145399ff..46911cac14e0 100644
--- a/contrib/lua/src/lopcodes.h
+++ b/contrib/lua/src/lopcodes.h
@@ -210,15 +210,15 @@ OP_LOADNIL,/* A B R[A], R[A+1], ..., R[A+B] := nil */
OP_GETUPVAL,/* A B R[A] := UpValue[B] */
OP_SETUPVAL,/* A B UpValue[B] := R[A] */
-OP_GETTABUP,/* A B C R[A] := UpValue[B][K[C]:string] */
+OP_GETTABUP,/* A B C R[A] := UpValue[B][K[C]:shortstring] */
OP_GETTABLE,/* A B C R[A] := R[B][R[C]] */
OP_GETI,/* A B C R[A] := R[B][C] */
-OP_GETFIELD,/* A B C R[A] := R[B][K[C]:string] */
+OP_GETFIELD,/* A B C R[A] := R[B][K[C]:shortstring] */
-OP_SETTABUP,/* A B C UpValue[A][K[B]:string] := RK(C) */
+OP_SETTABUP,/* A B C UpValue[A][K[B]:shortstring] := RK(C) */
OP_SETTABLE,/* A B C R[A][R[B]] := RK(C) */
OP_SETI,/* A B C R[A][B] := RK(C) */
-OP_SETFIELD,/* A B C R[A][K[B]:string] := RK(C) */
+OP_SETFIELD,/* A B C R[A][K[B]:shortstring] := RK(C) */
OP_NEWTABLE,/* A B C k R[A] := {} */
diff --git a/contrib/lua/src/loslib.c b/contrib/lua/src/loslib.c
index ad5a92768852..ba80d72c4575 100644
--- a/contrib/lua/src/loslib.c
+++ b/contrib/lua/src/loslib.c
@@ -155,6 +155,7 @@ static int os_execute (lua_State *L) {
static int os_remove (lua_State *L) {
const char *filename = luaL_checkstring(L, 1);
+ errno = 0;
return luaL_fileresult(L, remove(filename) == 0, filename);
}
@@ -162,6 +163,7 @@ static int os_remove (lua_State *L) {
static int os_rename (lua_State *L) {
const char *fromname = luaL_checkstring(L, 1);
const char *toname = luaL_checkstring(L, 2);
+ errno = 0;
return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
}
diff --git a/contrib/lua/src/lparser.c b/contrib/lua/src/lparser.c
index b745f236f068..1ac82990e0c3 100644
--- a/contrib/lua/src/lparser.c
+++ b/contrib/lua/src/lparser.c
@@ -198,7 +198,7 @@ static int new_localvar (LexState *ls, TString *name) {
checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal,
MAXVARS, "local variables");
luaM_growvector(L, dyd->actvar.arr, dyd->actvar.n + 1,
- dyd->actvar.size, Vardesc, USHRT_MAX, "local variables");
+ dyd->actvar.size, Vardesc, SHRT_MAX, "local variables");
var = &dyd->actvar.arr[dyd->actvar.n++];
var->vd.kind = VDKREG; /* default */
var->vd.name = name;
@@ -849,12 +849,11 @@ static void recfield (LexState *ls, ConsControl *cc) {
FuncState *fs = ls->fs;
int reg = ls->fs->freereg;
expdesc tab, key, val;
- if (ls->t.token == TK_NAME) {
- checklimit(fs, cc->nh, MAX_INT, "items in a constructor");
+ if (ls->t.token == TK_NAME)
codename(ls, &key);
- }
else /* ls->t.token == '[' */
yindex(ls, &key);
+ checklimit(fs, cc->nh, MAX_INT, "items in a constructor");
cc->nh++;
checknext(ls, '=');
tab = *cc->t;
@@ -1022,10 +1021,11 @@ static int explist (LexState *ls, expdesc *v) {
}
-static void funcargs (LexState *ls, expdesc *f, int line) {
+static void funcargs (LexState *ls, expdesc *f) {
FuncState *fs = ls->fs;
expdesc args;
int base, nparams;
+ int line = ls->linenumber;
switch (ls->t.token) {
case '(': { /* funcargs -> '(' [ explist ] ')' */
luaX_next(ls);
@@ -1063,8 +1063,8 @@ static void funcargs (LexState *ls, expdesc *f, int line) {
}
init_exp(f, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams+1, 2));
luaK_fixline(fs, line);
- fs->freereg = base+1; /* call remove function and arguments and leaves
- (unless changed) one result */
+ fs->freereg = base+1; /* call removes function and arguments and leaves
+ one result (unless changed later) */
}
@@ -1103,7 +1103,6 @@ static void suffixedexp (LexState *ls, expdesc *v) {
/* suffixedexp ->
primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */
FuncState *fs = ls->fs;
- int line = ls->linenumber;
primaryexp(ls, v);
for (;;) {
switch (ls->t.token) {
@@ -1123,12 +1122,12 @@ static void suffixedexp (LexState *ls, expdesc *v) {
luaX_next(ls);
codename(ls, &key);
luaK_self(fs, v, &key);
- funcargs(ls, v, line);
+ funcargs(ls, v);
break;
}
case '(': case TK_STRING: case '{': { /* funcargs */
luaK_exp2nextreg(fs, v);
- funcargs(ls, v, line);
+ funcargs(ls, v);
break;
}
default: return;
diff --git a/contrib/lua/src/lstate.c b/contrib/lua/src/lstate.c
index 1e925e5ad4cb..f3f2ccfdd5fb 100644
--- a/contrib/lua/src/lstate.c
+++ b/contrib/lua/src/lstate.c
@@ -119,7 +119,7 @@ CallInfo *luaE_extendCI (lua_State *L) {
/*
** free all CallInfo structures not in use by a thread
*/
-void luaE_freeCI (lua_State *L) {
+static void freeCI (lua_State *L) {
CallInfo *ci = L->ci;
CallInfo *next = ci->next;
ci->next = NULL;
@@ -166,7 +166,7 @@ void luaE_checkcstack (lua_State *L) {
if (getCcalls(L) == LUAI_MAXCCALLS)
luaG_runerror(L, "C stack overflow");
else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11))
- luaD_throw(L, LUA_ERRERR); /* error while handling stack error */
+ luaD_errerr(L); /* error while handling stack error */
}
@@ -204,7 +204,7 @@ static void freestack (lua_State *L) {
if (L->stack.p == NULL)
return; /* stack not completely built yet */
L->ci = &L->base_ci; /* free the entire 'ci' list */
- luaE_freeCI(L);
+ freeCI(L);
lua_assert(L->nci == 0);
luaM_freearray(L, L->stack.p, stacksize(L) + EXTRA_STACK); /* free stack */
}
@@ -272,7 +272,9 @@ static void close_state (lua_State *L) {
luaC_freeallobjects(L); /* just collect its objects */
else { /* closing a fully built state */
L->ci = &L->base_ci; /* unwind CallInfo list */
+ L->errfunc = 0; /* stack unwind can "throw away" the error function */
luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */
+ L->top.p = L->stack.p + 1; /* empty the stack to run finalizers */
luaC_freeallobjects(L); /* collect all objects */
luai_userstateclose(L);
}
@@ -328,6 +330,7 @@ int luaE_resetthread (lua_State *L, int status) {
if (status == LUA_YIELD)
status = LUA_OK;
L->status = LUA_OK; /* so it can run __close metamethods */
+ L->errfunc = 0; /* stack unwind can "throw away" the error function */
status = luaD_closeprotected(L, 1, status);
if (status != LUA_OK) /* errors? */
luaD_seterrorobj(L, status, L->stack.p + 1);
@@ -433,7 +436,7 @@ void luaE_warning (lua_State *L, const char *msg, int tocont) {
void luaE_warnerror (lua_State *L, const char *where) {
TValue *errobj = s2v(L->top.p - 1); /* error object */
const char *msg = (ttisstring(errobj))
- ? svalue(errobj)
+ ? getstr(tsvalue(errobj))
: "error object is not a string";
/* produce warning "error in %s (%s)" (where, msg) */
luaE_warning(L, "error in ", 1);
diff --git a/contrib/lua/src/lstate.h b/contrib/lua/src/lstate.h
index 8bf6600e3441..007704c826be 100644
--- a/contrib/lua/src/lstate.h
+++ b/contrib/lua/src/lstate.h
@@ -181,7 +181,7 @@ struct CallInfo {
union {
struct { /* only for Lua functions */
const Instruction *savedpc;
- volatile l_signalT trap;
+ volatile l_signalT trap; /* function is tracing lines/counts */
int nextraargs; /* # of extra arguments in vararg functions */
} l;
struct { /* only for C functions */
@@ -396,7 +396,6 @@ union GCUnion {
LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt);
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);
LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L);
-LUAI_FUNC void luaE_freeCI (lua_State *L);
LUAI_FUNC void luaE_shrinkCI (lua_State *L);
LUAI_FUNC void luaE_checkcstack (lua_State *L);
LUAI_FUNC void luaE_incCstack (lua_State *L);
diff --git a/contrib/lua/src/lstring.c b/contrib/lua/src/lstring.c
index 13dcaf4259bc..97757355c0b6 100644
--- a/contrib/lua/src/lstring.c
+++ b/contrib/lua/src/lstring.c
@@ -36,7 +36,7 @@ int luaS_eqlngstr (TString *a, TString *b) {
lua_assert(a->tt == LUA_VLNGSTR && b->tt == LUA_VLNGSTR);
return (a == b) || /* same instance or... */
((len == b->u.lnglen) && /* equal length and ... */
- (memcmp(getstr(a), getstr(b), len) == 0)); /* equal contents */
+ (memcmp(getlngstr(a), getlngstr(b), len) == 0)); /* equal contents */
}
@@ -52,7 +52,7 @@ unsigned int luaS_hashlongstr (TString *ts) {
lua_assert(ts->tt == LUA_VLNGSTR);
if (ts->extra == 0) { /* no hash? */
size_t len = ts->u.lnglen;
- ts->hash = luaS_hash(getstr(ts), len, ts->hash);
+ ts->hash = luaS_hash(getlngstr(ts), len, ts->hash);
ts->extra = 1; /* now it has its hash */
}
return ts->hash;
@@ -157,6 +157,7 @@ static TString *createstrobj (lua_State *L, size_t l, int tag, unsigned int h) {
TString *luaS_createlngstrobj (lua_State *L, size_t l) {
TString *ts = createstrobj(L, l, LUA_VLNGSTR, G(L)->seed);
ts->u.lnglen = l;
+ ts->shrlen = 0xFF; /* signals that it is a long string */
return ts;
}
@@ -193,7 +194,7 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) {
TString **list = &tb->hash[lmod(h, tb->size)];
lua_assert(str != NULL); /* otherwise 'memcmp'/'memcpy' are undefined */
for (ts = *list; ts != NULL; ts = ts->u.hnext) {
- if (l == ts->shrlen && (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) {
+ if (l == ts->shrlen && (memcmp(str, getshrstr(ts), l * sizeof(char)) == 0)) {
/* found! */
if (isdead(g, ts)) /* dead (but not collected yet)? */
changewhite(ts); /* resurrect it */
@@ -206,8 +207,8 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) {
list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */
}
ts = createstrobj(L, l, LUA_VSHRSTR, h);
- memcpy(getstr(ts), str, l * sizeof(char));
ts->shrlen = cast_byte(l);
+ memcpy(getshrstr(ts), str, l * sizeof(char));
ts->u.hnext = *list;
*list = ts;
tb->nuse++;
@@ -223,10 +224,10 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
return internshrstr(L, str, l);
else {
TString *ts;
- if (l_unlikely(l >= (MAX_SIZE - sizeof(TString))/sizeof(char)))
+ if (l_unlikely(l * sizeof(char) >= (MAX_SIZE - sizeof(TString))))
luaM_toobig(L);
ts = luaS_createlngstrobj(L, l);
- memcpy(getstr(ts), str, l * sizeof(char));
+ memcpy(getlngstr(ts), str, l * sizeof(char));
return ts;
}
}
diff --git a/contrib/lua/src/ltable.c b/contrib/lua/src/ltable.c
index 3c690c5f1751..3353c047939a 100644
--- a/contrib/lua/src/ltable.c
+++ b/contrib/lua/src/ltable.c
@@ -252,7 +252,7 @@ LUAI_FUNC unsigned int luaH_realasize (const Table *t) {
return t->alimit; /* this is the size */
else {
unsigned int size = t->alimit;
- /* compute the smallest power of 2 not smaller than 'n' */
+ /* compute the smallest power of 2 not smaller than 'size' */
size |= (size >> 1);
size |= (size >> 2);
size |= (size >> 4);
@@ -662,7 +662,8 @@ static Node *getfreepos (Table *t) {
** put new key in its main position; otherwise (colliding node is in its main
** position), new key goes to an empty position.
*/
-void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) {
+static void luaH_newkey (lua_State *L, Table *t, const TValue *key,
+ TValue *value) {
Node *mp;
TValue aux;
if (l_unlikely(ttisnil(key)))
@@ -721,22 +722,36 @@ void luaH_newkey (lua_State *L, Table *t, const TValue *key, TValue *value) {
/*
** Search function for integers. If integer is inside 'alimit', get it
-** directly from the array part. Otherwise, if 'alimit' is not equal to
-** the real size of the array, key still can be in the array part. In
-** this case, try to avoid a call to 'luaH_realasize' when key is just
-** one more than the limit (so that it can be incremented without
-** changing the real size of the array).
+** directly from the array part. Otherwise, if 'alimit' is not
+** the real size of the array, the key still can be in the array part.
+** In this case, do the "Xmilia trick" to check whether 'key-1' is
+** smaller than the real size.
+** The trick works as follow: let 'p' be an integer such that
+** '2^(p+1) >= alimit > 2^p', or '2^(p+1) > alimit-1 >= 2^p'.
+** That is, 2^(p+1) is the real size of the array, and 'p' is the highest
+** bit on in 'alimit-1'. What we have to check becomes 'key-1 < 2^(p+1)'.
+** We compute '(key-1) & ~(alimit-1)', which we call 'res'; it will
+** have the 'p' bit cleared. If the key is outside the array, that is,
+** 'key-1 >= 2^(p+1)', then 'res' will have some bit on higher than 'p',
+** therefore it will be larger or equal to 'alimit', and the check
+** will fail. If 'key-1 < 2^(p+1)', then 'res' has no bit on higher than
+** 'p', and as the bit 'p' itself was cleared, 'res' will be smaller
+** than 2^p, therefore smaller than 'alimit', and the check succeeds.
+** As special cases, when 'alimit' is 0 the condition is trivially false,
+** and when 'alimit' is 1 the condition simplifies to 'key-1 < alimit'.
+** If key is 0 or negative, 'res' will have its higher bit on, so that
+** if cannot be smaller than alimit.
*/
const TValue *luaH_getint (Table *t, lua_Integer key) {
- if (l_castS2U(key) - 1u < t->alimit) /* 'key' in [1, t->alimit]? */
+ lua_Unsigned alimit = t->alimit;
+ if (l_castS2U(key) - 1u < alimit) /* 'key' in [1, t->alimit]? */
return &t->array[key - 1];
- else if (!limitequalsasize(t) && /* key still may be in the array part? */
- (l_castS2U(key) == t->alimit + 1 ||
- l_castS2U(key) - 1u < luaH_realasize(t))) {
+ else if (!isrealasize(t) && /* key still may be in the array part? */
+ (((l_castS2U(key) - 1u) & ~(alimit - 1u)) < alimit)) {
t->alimit = cast_uint(key); /* probably '#t' is here now */
return &t->array[key - 1];
}
- else {
+ else { /* key is not in the array part; check the hash */
Node *n = hashint(t, key);
for (;;) { /* check whether 'key' is somewhere in the chain */
if (keyisinteger(n) && keyival(n) == key)
diff --git a/contrib/lua/src/ltable.h b/contrib/lua/src/ltable.h
index 75dd9e26e015..8e6890342348 100644
--- a/contrib/lua/src/ltable.h
+++ b/contrib/lua/src/ltable.h
@@ -41,8 +41,6 @@ LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
LUAI_FUNC const TValue *luaH_getshortstr (Table *t, TString *key);
LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);
LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);
-LUAI_FUNC void luaH_newkey (lua_State *L, Table *t, const TValue *key,
- TValue *value);
LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key,
TValue *value);
LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
diff --git a/contrib/lua/src/ltm.h b/contrib/lua/src/ltm.h
index c309e2ae10e3..73b833c605da 100644
--- a/contrib/lua/src/ltm.h
+++ b/contrib/lua/src/ltm.h
@@ -9,7 +9,6 @@
#include "lobject.h"
-#include "lstate.h"
/*
@@ -96,8 +95,8 @@ LUAI_FUNC int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2,
int inv, int isfloat, TMS event);
LUAI_FUNC void luaT_adjustvarargs (lua_State *L, int nfixparams,
- CallInfo *ci, const Proto *p);
-LUAI_FUNC void luaT_getvarargs (lua_State *L, CallInfo *ci,
+ struct CallInfo *ci, const Proto *p);
+LUAI_FUNC void luaT_getvarargs (lua_State *L, struct CallInfo *ci,
StkId where, int wanted);
diff --git a/contrib/lua/src/lua.c b/contrib/lua/src/lua.c
index 0ff884545304..4a90e55dd94b 100644
--- a/contrib/lua/src/lua.c
+++ b/contrib/lua/src/lua.c
@@ -115,12 +115,13 @@ static void l_message (const char *pname, const char *msg) {
/*
** Check whether 'status' is not OK and, if so, prints the error
-** message on the top of the stack. It assumes that the error object
-** is a string, as it was either generated by Lua or by 'msghandler'.
+** message on the top of the stack.
*/
static int report (lua_State *L, int status) {
if (status != LUA_OK) {
const char *msg = lua_tostring(L, -1);
+ if (msg == NULL)
+ msg = "(error message not a string)";
l_message(progname, msg);
lua_pop(L, 1); /* remove message */
}
@@ -210,12 +211,17 @@ static int dostring (lua_State *L, const char *s, const char *name) {
/*
** Receives 'globname[=modname]' and runs 'globname = require(modname)'.
+** If there is no explicit modname and globname contains a '-', cut
+** the suffix after '-' (the "version") to make the global name.
*/
static int dolibrary (lua_State *L, char *globname) {
int status;
+ char *suffix = NULL;
char *modname = strchr(globname, '=');
- if (modname == NULL) /* no explicit name? */
+ if (modname == NULL) { /* no explicit name? */
modname = globname; /* module name is equal to global name */
+ suffix = strchr(modname, *LUA_IGMARK); /* look for a suffix mark */
+ }
else {
*modname = '\0'; /* global name ends here */
modname++; /* module name starts after the '=' */
@@ -223,8 +229,11 @@ static int dolibrary (lua_State *L, char *globname) {
lua_getglobal(L, "require");
lua_pushstring(L, modname);
status = docall(L, 1, 1); /* call 'require(modname)' */
- if (status == LUA_OK)
+ if (status == LUA_OK) {
+ if (suffix != NULL) /* is there a suffix mark? */
+ *suffix = '\0'; /* remove suffix from global name */
lua_setglobal(L, globname); /* globname = require(modname) */
+ }
return report(L, status);
}
@@ -481,10 +490,8 @@ static int incomplete (lua_State *L, int status) {
if (status == LUA_ERRSYNTAX) {
size_t lmsg;
const char *msg = lua_tolstring(L, -1, &lmsg);
- if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) {
- lua_pop(L, 1);
+ if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0)
return 1;
- }
}
return 0; /* else... */
}
@@ -499,9 +506,9 @@ static int pushline (lua_State *L, int firstline) {
size_t l;
const char *prmt = get_prompt(L, firstline);
int readstatus = lua_readline(L, b, prmt);
- if (readstatus == 0)
- return 0; /* no input (prompt will be popped by caller) */
lua_pop(L, 1); /* remove prompt */
+ if (readstatus == 0)
+ return 0; /* no input */
l = strlen(b);
if (l > 0 && b[l-1] == '\n') /* line ends with newline? */
b[--l] = '\0'; /* remove it */
@@ -543,8 +550,9 @@ static int multiline (lua_State *L) {
int status = luaL_loadbuffer(L, line, len, "=stdin"); /* try it */
if (!incomplete(L, status) || !pushline(L, 0)) {
lua_saveline(L, line); /* keep history */
- return status; /* cannot or should not try to add continuation line */
+ return status; /* should not or cannot try to add continuation line */
}
+ lua_remove(L, -2); /* remove error message (from incomplete line) */
lua_pushliteral(L, "\n"); /* add newline... */
lua_insert(L, -2); /* ...between the two lines */
lua_concat(L, 3); /* join them */
diff --git a/contrib/lua/src/lua.h b/contrib/lua/src/lua.h
index fd16cf8050b8..f3ea590d9cd6 100644
--- a/contrib/lua/src/lua.h
+++ b/contrib/lua/src/lua.h
@@ -18,14 +18,14 @@
#define LUA_VERSION_MAJOR "5"
#define LUA_VERSION_MINOR "4"
-#define LUA_VERSION_RELEASE "6"
+#define LUA_VERSION_RELEASE "8"
#define LUA_VERSION_NUM 504
-#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 6)
+#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 8)
#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
-#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2023 Lua.org, PUC-Rio"
+#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2025 Lua.org, PUC-Rio"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
@@ -497,7 +497,7 @@ struct lua_Debug {
/******************************************************************************
-* Copyright (C) 1994-2023 Lua.org, PUC-Rio.
+* Copyright (C) 1994-2025 Lua.org, PUC-Rio.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
diff --git a/contrib/lua/src/luaconf.h b/contrib/lua/src/luaconf.h
index e517fb4d2e75..c7ca969e321f 100644
--- a/contrib/lua/src/luaconf.h
+++ b/contrib/lua/src/luaconf.h
@@ -257,6 +257,15 @@
#endif
+
+/*
+** LUA_IGMARK is a mark to ignore all after it when building the
+** module name (e.g., used to build the luaopen_ function name).
+** Typically, the suffix after the mark is the module version,
+** as in "mod-v1.2.so".
+*/
+#define LUA_IGMARK "-"
+
/* }================================================================== */
diff --git a/contrib/lua/src/lundump.c b/contrib/lua/src/lundump.c
index 02aed64fb622..e8d92a8534ff 100644
--- a/contrib/lua/src/lundump.c
+++ b/contrib/lua/src/lundump.c
@@ -81,7 +81,7 @@ static size_t loadUnsigned (LoadState *S, size_t limit) {
static size_t loadSize (LoadState *S) {
- return loadUnsigned(S, ~(size_t)0);
+ return loadUnsigned(S, MAX_SIZET);
}
@@ -122,7 +122,7 @@ static TString *loadStringN (LoadState *S, Proto *p) {
ts = luaS_createlngstrobj(L, size); /* create string */
setsvalue2s(L, L->top.p, ts); /* anchor it ('loadVector' can GC) */
luaD_inctop(L);
- loadVector(S, getstr(ts), size); /* load directly in final place */
+ loadVector(S, getlngstr(ts), size); /* load directly in final place */
L->top.p--; /* pop string */
}
luaC_objbarrier(L, p, ts);
diff --git a/contrib/lua/src/lundump.h b/contrib/lua/src/lundump.h
index f3748a998075..a97676ca1852 100644
--- a/contrib/lua/src/lundump.h
+++ b/contrib/lua/src/lundump.h
@@ -21,8 +21,7 @@
/*
** Encode major-minor version in one byte, one nibble for each
*/
-#define MYINT(s) (s[0]-'0') /* assume one-digit numerals */
-#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
+#define LUAC_VERSION (((LUA_VERSION_NUM / 100) * 16) + LUA_VERSION_NUM % 100)
#define LUAC_FORMAT 0 /* this is the official format */
diff --git a/contrib/lua/src/lvm.c b/contrib/lua/src/lvm.c
index 9d1bdfb0bd6e..45b47e7c8793 100644
--- a/contrib/lua/src/lvm.c
+++ b/contrib/lua/src/lvm.c
@@ -95,8 +95,10 @@ static int l_strton (const TValue *obj, TValue *result) {
lua_assert(obj != result);
if (!cvt2num(obj)) /* is object not a string? */
return 0;
- else
- return (luaO_str2num(svalue(obj), result) == vslen(obj) + 1);
+ else {
+ TString *st = tsvalue(obj);
+ return (luaO_str2num(getstr(st), result) == tsslen(st) + 1);
+ }
}
@@ -341,7 +343,10 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
lua_assert(isempty(slot)); /* slot must be empty */
tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */
if (tm == NULL) { /* no metamethod? */
+ sethvalue2s(L, L->top.p, h); /* anchor 't' */
+ L->top.p++; /* assume EXTRA_STACK */
luaH_finishset(L, h, key, slot, val); /* set new value */
+ L->top.p--;
invalidateTMcache(h);
luaC_barrierback(L, obj2gco(h), val);
return;
@@ -370,30 +375,32 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
/*
-** Compare two strings 'ls' x 'rs', returning an integer less-equal-
-** -greater than zero if 'ls' is less-equal-greater than 'rs'.
+** Compare two strings 'ts1' x 'ts2', returning an integer less-equal-
+** -greater than zero if 'ts1' is less-equal-greater than 'ts2'.
** The code is a little tricky because it allows '\0' in the strings
-** and it uses 'strcoll' (to respect locales) for each segments
-** of the strings.
+** and it uses 'strcoll' (to respect locales) for each segment
+** of the strings. Note that segments can compare equal but still
+** have different lengths.
*/
-static int l_strcmp (const TString *ls, const TString *rs) {
- const char *l = getstr(ls);
- size_t ll = tsslen(ls);
- const char *r = getstr(rs);
- size_t lr = tsslen(rs);
+static int l_strcmp (const TString *ts1, const TString *ts2) {
+ const char *s1 = getstr(ts1);
+ size_t rl1 = tsslen(ts1); /* real length */
+ const char *s2 = getstr(ts2);
+ size_t rl2 = tsslen(ts2);
for (;;) { /* for each segment */
- int temp = strcoll(l, r);
+ int temp = strcoll(s1, s2);
if (temp != 0) /* not equal? */
return temp; /* done */
else { /* strings are equal up to a '\0' */
- size_t len = strlen(l); /* index of first '\0' in both strings */
- if (len == lr) /* 'rs' is finished? */
- return (len == ll) ? 0 : 1; /* check 'ls' */
- else if (len == ll) /* 'ls' is finished? */
- return -1; /* 'ls' is less than 'rs' ('rs' is not finished) */
- /* both strings longer than 'len'; go on comparing after the '\0' */
- len++;
- l += len; ll -= len; r += len; lr -= len;
+ size_t zl1 = strlen(s1); /* index of first '\0' in 's1' */
+ size_t zl2 = strlen(s2); /* index of first '\0' in 's2' */
+ if (zl2 == rl2) /* 's2' is finished? */
+ return (zl1 == rl1) ? 0 : 1; /* check 's1' */
+ else if (zl1 == rl1) /* 's1' is finished? */
+ return -1; /* 's1' is less than 's2' ('s2' is not finished) */
+ /* both strings longer than 'zl'; go on comparing after the '\0' */
+ zl1++; zl2++;
+ s1 += zl1; rl1 -= zl1; s2 += zl2; rl2 -= zl2;
}
}
}
@@ -628,8 +635,9 @@ int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) {
static void copy2buff (StkId top, int n, char *buff) {
size_t tl = 0; /* size already copied */
do {
- size_t l = vslen(s2v(top - n)); /* length of string being copied */
- memcpy(buff + tl, svalue(s2v(top - n)), l * sizeof(char));
+ TString *st = tsvalue(s2v(top - n));
+ size_t l = tsslen(st); /* length of string being copied */
+ memcpy(buff + tl, getstr(st), l * sizeof(char));
tl += l;
} while (--n > 0);
}
@@ -655,12 +663,12 @@ void luaV_concat (lua_State *L, int total) {
}
else {
/* at least two non-empty string values; get as many as possible */
- size_t tl = vslen(s2v(top - 1));
+ size_t tl = tsslen(tsvalue(s2v(top - 1)));
TString *ts;
/* collect total length and number of strings */
for (n = 1; n < total && tostring(L, s2v(top - n - 1)); n++) {
- size_t l = vslen(s2v(top - n - 1));
- if (l_unlikely(l >= (MAX_SIZE/sizeof(char)) - tl)) {
+ size_t l = tsslen(tsvalue(s2v(top - n - 1)));
+ if (l_unlikely(l >= MAX_SIZE - sizeof(TString) - tl)) {
L->top.p = top - total; /* pop strings to avoid wasting stack */
luaG_runerror(L, "string length overflow");
}
@@ -673,7 +681,7 @@ void luaV_concat (lua_State *L, int total) {
}
else { /* long string; copy strings directly to final result */
ts = luaS_createlngstrobj(L, tl);
- copy2buff(top, n, getstr(ts));
+ copy2buff(top, n, getlngstr(ts));
}
setsvalue2s(L, top - n, ts); /* create result */
}
@@ -1159,18 +1167,11 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
startfunc:
trap = L->hookmask;
returning: /* trap already set */
- cl = clLvalue(s2v(ci->func.p));
+ cl = ci_func(ci);
k = cl->p->k;
pc = ci->u.l.savedpc;
- if (l_unlikely(trap)) {
- if (pc == cl->p->code) { /* first instruction (not resuming)? */
- if (cl->p->is_vararg)
- trap = 0; /* hooks will start after VARARGPREP instruction */
- else /* check 'call' hook */
- luaD_hookcall(L, ci);
- }
- ci->u.l.trap = 1; /* assume trap is on, for now */
- }
+ if (l_unlikely(trap))
+ trap = luaG_tracecall(L);
base = ci->func.p + 1;
/* main loop of interpreter */
for (;;) {
@@ -1257,7 +1258,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
const TValue *slot;
TValue *upval = cl->upvals[GETARG_B(i)]->v.p;
TValue *rc = KC(i);
- TString *key = tsvalue(rc); /* key must be a string */
+ TString *key = tsvalue(rc); /* key must be a short string */
if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) {
setobj2s(L, ra, slot);
}
@@ -1300,7 +1301,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
const TValue *slot;
TValue *rb = vRB(i);
TValue *rc = KC(i);
- TString *key = tsvalue(rc); /* key must be a string */
+ TString *key = tsvalue(rc); /* key must be a short string */
if (luaV_fastget(L, rb, key, slot, luaH_getshortstr)) {
setobj2s(L, ra, slot);
}
@@ -1313,7 +1314,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
TValue *upval = cl->upvals[GETARG_A(i)]->v.p;
TValue *rb = KB(i);
TValue *rc = RKC(i);
- TString *key = tsvalue(rb); /* key must be a string */
+ TString *key = tsvalue(rb); /* key must be a short string */
if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) {
luaV_finishfastset(L, upval, slot, rc);
}
@@ -1356,7 +1357,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
const TValue *slot;
TValue *rb = KB(i);
TValue *rc = RKC(i);
- TString *key = tsvalue(rb); /* key must be a string */
+ TString *key = tsvalue(rb); /* key must be a short string */
if (luaV_fastget(L, s2v(ra), key, slot, luaH_getshortstr)) {
luaV_finishfastset(L, s2v(ra), slot, rc);
}
diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c
index a6ec3d8e4e21..0fe7f1ed3f64 100644
--- a/contrib/tzcode/localtime.c
+++ b/contrib/tzcode/localtime.c
@@ -13,37 +13,36 @@
/*LINTLIBRARY*/
#define LOCALTIME_IMPLEMENTATION
+#ifdef __FreeBSD__
#include "namespace.h"
+#include <pthread.h>
+#endif /* __FreeBSD__ */
#ifdef DETECT_TZ_CHANGES
-#ifndef DETECT_TZ_CHANGES_INTERVAL
-#define DETECT_TZ_CHANGES_INTERVAL 61
-#endif
+# ifndef DETECT_TZ_CHANGES_INTERVAL
+# define DETECT_TZ_CHANGES_INTERVAL 61
+# endif
int __tz_change_interval = DETECT_TZ_CHANGES_INTERVAL;
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-#if THREAD_SAFE
-#include <pthread.h>
-#endif
+# include <sys/stat.h>
+#endif /* DETECT_TZ_CHANGES */
#include "private.h"
-#include "un-namespace.h"
#include "tzdir.h"
#include "tzfile.h"
-
+#include <fcntl.h>
+#ifdef __FreeBSD__
#include "libc_private.h"
+#include "un-namespace.h"
+#endif /* __FreeBSD__ */
#if defined THREAD_SAFE && THREAD_SAFE
+# include <pthread.h>
+#ifdef __FreeBSD__
+# define pthread_mutex_lock(l) (__isthreaded ? _pthread_mutex_lock(l) : 0)
+# define pthread_mutex_unlock(l) (__isthreaded ? _pthread_mutex_unlock(l) : 0)
+#endif /* __FreeBSD__ */
static pthread_mutex_t locallock = PTHREAD_MUTEX_INITIALIZER;
-static int lock(void) {
- if (__isthreaded)
- return _pthread_mutex_lock(&locallock);
- return 0;
-}
-static void unlock(void) {
- if (__isthreaded)
- _pthread_mutex_unlock(&locallock);
-}
+static int lock(void) { return pthread_mutex_lock(&locallock); }
+static void unlock(void) { pthread_mutex_unlock(&locallock); }
#else
static int lock(void) { return 0; }
static void unlock(void) { }
@@ -166,6 +165,9 @@ struct rule {
int_fast32_t r_time; /* transition time of rule */
};
+#ifdef __FreeBSD__
+static void tzset_unlocked_name(char const *);
+#endif /* __FreeBSD__ */
static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t,
struct tm *);
static bool increment_overflow(int *, int);
@@ -194,7 +196,7 @@ static struct state *const gmtptr = &gmtmem;
static char lcl_TZname[TZ_STRLEN_MAX + 1];
static int lcl_is_set;
-
+#ifdef __FreeBSD__
static pthread_once_t gmt_once = PTHREAD_ONCE_INIT;
static pthread_once_t gmtime_once = PTHREAD_ONCE_INIT;
static pthread_key_t gmtime_key;
@@ -205,6 +207,7 @@ static int offtime_key_error;
static pthread_once_t localtime_once = PTHREAD_ONCE_INIT;
static pthread_key_t localtime_key;
static int localtime_key_error;
+#endif /* __FreeBSD__ */
/*
** Section 4.12.3 of X3.159-1989 requires that
@@ -398,19 +401,20 @@ scrub_abbrs(struct state *sp)
#ifdef DETECT_TZ_CHANGES
/*
- * Determine if there's a change in the timezone since the last time we checked.
+ * Check whether either the time zone name or the file it refers to has
+ * changed since the last time we checked.
* Returns: -1 on error
- * 0 if the timezone has not changed
- * 1 if the timezone has changed
+ * 0 if the time zone has not changed
+ * 1 if the time zone has changed
*/
static int
-change_in_tz(const char *name)
+tzfile_changed(const char *name, int fd)
{
static char old_name[PATH_MAX];
static struct stat old_sb;
struct stat sb;
- if (stat(name, &sb) != 0)
+ if (_fstat(fd, &sb) != 0)
return -1;
if (strcmp(name, old_name) != 0) {
@@ -429,9 +433,7 @@ change_in_tz(const char *name)
return 0;
}
-#else /* !DETECT_TZ_CHANGES */
-#define change_in_tz(X) 1
-#endif /* !DETECT_TZ_CHANGES */
+#endif /* DETECT_TZ_CHANGES */
/* Input buffer for data read from a compiled tz file. */
union input_buffer {
@@ -444,8 +446,10 @@ union input_buffer {
+ 4 * TZ_MAX_TIMES];
};
+#ifndef __FreeBSD__
/* TZDIR with a trailing '/' rather than a trailing '\0'. */
static char const tzdirslash[sizeof TZDIR] = TZDIR "/";
+#endif /* !__FreeBSD__ */
/* Local storage needed for 'tzloadbody'. */
union local_storage {
@@ -458,6 +462,7 @@ union local_storage {
struct state st;
} u;
+#ifndef __FreeBSD__
/* The name of the file to be opened. Ideally this would have no
size limits, to support arbitrarily long Zone names.
Limiting Zone names to 1024 bytes should suffice for practical use.
@@ -465,6 +470,7 @@ union local_storage {
file_analysis as that struct is allocated anyway, as the other
union member. */
char fullname[max(sizeof(struct file_analysis), sizeof tzdirslash + 1024)];
+#endif /* !__FreeBSD__ */
};
/* Load tz data from the file named NAME into *SP. Read extended
@@ -478,6 +484,11 @@ tzloadbody(char const *name, struct state *sp, bool doextend,
register int fid;
register int stored;
register ssize_t nread;
+#ifdef __FreeBSD__
+ int serrno;
+#else /* !__FreeBSD__ */
+ register bool doaccess;
+#endif /* !__FreeBSD__ */
register union input_buffer *up = &lsp->u.u;
register int tzheadsize = sizeof(struct tzhead);
@@ -491,7 +502,16 @@ tzloadbody(char const *name, struct state *sp, bool doextend,
if (name[0] == ':')
++name;
- if (name[0] != '/') {
+#ifndef __FreeBSD__
+#ifdef SUPPRESS_TZDIR
+ /* Do not prepend TZDIR. This is intended for specialized
+ applications only, due to its security implications. */
+ doaccess = true;
+#else
+ doaccess = name[0] == '/';
+#endif
+ if (!doaccess) {
+ char const *dot;
if (sizeof lsp->fullname - sizeof tzdirslash <= strlen(name))
return ENAMETOOLONG;
@@ -501,27 +521,59 @@ tzloadbody(char const *name, struct state *sp, bool doextend,
memcpy(lsp->fullname, tzdirslash, sizeof tzdirslash);
strcpy(lsp->fullname + sizeof tzdirslash, name);
+ /* Set doaccess if NAME contains a ".." file name
+ component, as such a name could read a file outside
+ the TZDIR virtual subtree. */
+ for (dot = name; (dot = strchr(dot, '.')); dot++)
+ if ((dot == name || dot[-1] == '/') && dot[1] == '.'
+ && (dot[2] == '/' || !dot[2])) {
+ doaccess = true;
+ break;
+ }
+
name = lsp->fullname;
}
- if (doextend) {
- /*
- * Detect if the timezone file has changed. Check
- * 'doextend' to ignore TZDEFRULES; the change_in_tz()
- * function can only keep state for a single file.
- */
- switch (change_in_tz(name)) {
- case -1:
- return errno;
- case 0:
- return 0;
- case 1:
- break;
- }
- }
+ if (doaccess && access(name, R_OK) != 0)
+ return errno;
fid = _open(name, O_RDONLY | O_BINARY);
+#else /* __FreeBSD__ */
+ {
+ const char *relname = name;
+ if (strncmp(relname, TZDIR "/", strlen(TZDIR) + 1) == 0)
+ relname += strlen(TZDIR) + 1;
+ int dd = _open(TZDIR, O_DIRECTORY | O_RDONLY);
+ if (dd < 0)
+ return errno;
+ fid = _openat(dd, relname, O_RDONLY | O_BINARY,
+ issetugid() ? AT_RESOLVE_BENEATH : 0);
+ serrno = errno;
+ _close(dd);
+ errno = serrno;
+ }
+#endif /* __FreeBSD__ */
if (fid < 0)
return errno;
+#ifdef DETECT_TZ_CHANGES
+ if (doextend) {
+ /*
+ * Detect if the timezone file has changed. Check 'doextend' to
+ * ignore TZDEFRULES; the tzfile_changed() function can only
+ * keep state for a single file.
+ */
+ switch (tzfile_changed(name, fid)) {
+ case -1:
+ serrno = errno;
+ _close(fid);
+ return serrno;
+ case 0:
+ _close(fid);
+ return 0;
+ case 1:
+ break;
+ }
+ }
+#endif /* DETECT_TZ_CHANGES */
nread = _read(fid, up->buf, sizeof up->buf);
if (nread < tzheadsize) {
int err = nread < 0 ? errno : EINVAL;
@@ -1370,8 +1422,11 @@ gmtload(struct state *const sp)
}
#ifdef DETECT_TZ_CHANGES
+/*
+ * Check if the time zone data we have is still fresh.
+ */
static int
-recheck_tzdata()
+tzdata_is_fresh(void)
{
static time_t last_checked;
struct timespec now;
@@ -1387,9 +1442,7 @@ recheck_tzdata()
return 0;
}
-#else /* !DETECT_TZ_CHANGES */
-#define recheck_tzdata() 0
-#endif /* !DETECT_TZ_CHANGES */
+#endif /* DETECT_TZ_CHANGES */
/* Initialize *SP to a value appropriate for the TZ setting NAME.
Return 0 on success, an errno value on failure. */
@@ -1419,15 +1472,26 @@ zoneinit(struct state *sp, char const *name)
}
static void
+tzset_unlocked(void)
+{
+#ifdef __FreeBSD__
+ tzset_unlocked_name(getenv("TZ"));
+}
+static void
tzset_unlocked_name(char const *name)
{
+#else
+ char const *name = getenv("TZ");
+#endif
struct state *sp = lclptr;
int lcl = name ? strlen(name) < sizeof lcl_TZname : -1;
if (lcl < 0
? lcl_is_set < 0
: 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0)
- if (recheck_tzdata() == 0)
- return;
+#ifdef DETECT_TZ_CHANGES
+ if (tzdata_is_fresh() == 0)
+#endif /* DETECT_TZ_CHANGES */
+ return;
#ifdef ALL_STATE
if (! sp)
lclptr = sp = malloc(sizeof *lclptr);
@@ -1442,12 +1506,6 @@ tzset_unlocked_name(char const *name)
lcl_is_set = lcl;
}
-static void
-tzset_unlocked(void)
-{
- tzset_unlocked_name(getenv("TZ"));
-}
-
void
tzset(void)
{
@@ -1457,6 +1515,7 @@ tzset(void)
unlock();
}
+#ifdef __FreeBSD__
void
freebsd13_tzsetwall(void)
{
@@ -1468,7 +1527,7 @@ freebsd13_tzsetwall(void)
__sym_compat(tzsetwall, freebsd13_tzsetwall, FBSD_1.0);
__warn_references(tzsetwall,
"warning: tzsetwall() is deprecated, use tzset() instead.");
-
+#endif /* __FreeBSD__ */
static void
gmtcheck(void)
{
@@ -1485,6 +1544,9 @@ gmtcheck(void)
}
unlock();
}
+#ifdef __FreeBSD__
+#define gmtcheck() _once(&gmt_once, gmtcheck)
+#endif
#if NETBSD_INSPIRED
@@ -1652,45 +1714,47 @@ localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
}
#ifndef DETECT_TZ_CHANGES
if (setname || !lcl_is_set)
-#endif
+#endif /* DETECT_TZ_CHANGES */
tzset_unlocked();
tmp = localsub(lclptr, timep, setname, tmp);
unlock();
return tmp;
}
+#ifdef __FreeBSD__
static void
localtime_key_init(void)
{
-
- localtime_key_error = _pthread_key_create(&localtime_key, free);
+ localtime_key_error = _pthread_key_create(&localtime_key, free);
}
-
+#endif /* __FreeBSD__ */
struct tm *
localtime(const time_t *timep)
{
#if !SUPPORT_C89
- static struct tm tm;
+ static struct tm tm;
#endif
- struct tm *p_tm = &tm;
-
- if (__isthreaded != 0) {
- _pthread_once(&localtime_once, localtime_key_init);
- if (localtime_key_error != 0) {
- errno = localtime_key_error;
- return (NULL);
- }
- if ((p_tm = _pthread_getspecific(localtime_key)) == NULL) {
- if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
- return (NULL);
- }
- if (_pthread_setspecific(localtime_key, p_tm) != 0) {
- free(p_tm);
- return (NULL);
- }
- }
- }
- return localtime_tzset(timep, p_tm, true);
+#ifdef __FreeBSD__
+ struct tm *p_tm = &tm;
+
+ if (__isthreaded != 0) {
+ _pthread_once(&localtime_once, localtime_key_init);
+ if (localtime_key_error != 0) {
+ errno = localtime_key_error;
+ return (NULL);
+ }
+ if ((p_tm = _pthread_getspecific(localtime_key)) == NULL) {
+ if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
+ return (NULL);
+ }
+ if (_pthread_setspecific(localtime_key, p_tm) != 0) {
+ free(p_tm);
+ return (NULL);
+ }
+ }
+ }
+#endif /* __FreeBSD__ */
+ return localtime_tzset(timep, p_tm, true);
}
struct tm *
@@ -1729,42 +1793,44 @@ gmtsub(ATTRIBUTE_MAYBE_UNUSED struct state const *sp, time_t const *timep,
struct tm *
gmtime_r(time_t const *restrict timep, struct tm *restrict tmp)
{
- _once(&gmt_once, gmtcheck);
- return gmtsub(gmtptr, timep, 0, tmp);
+ gmtcheck();
+ return gmtsub(gmtptr, timep, 0, tmp);
}
+#ifdef __FreeBSD__
static void
gmtime_key_init(void)
{
-
- gmtime_key_error = _pthread_key_create(&gmtime_key, free);
+ gmtime_key_error = _pthread_key_create(&gmtime_key, free);
}
-
+#endif /* __FreeBSD__ */
struct tm *
gmtime(const time_t *timep)
{
#if !SUPPORT_C89
- static struct tm tm;
+ static struct tm tm;
#endif
- struct tm *p_tm = &tm;
-
- if (__isthreaded != 0) {
- _pthread_once(&gmtime_once, gmtime_key_init);
- if (gmtime_key_error != 0) {
- errno = gmtime_key_error;
- return (NULL);
- }
- if ((p_tm = _pthread_getspecific(gmtime_key)) == NULL) {
- if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
- return (NULL);
- }
- if (_pthread_setspecific(gmtime_key, p_tm) != 0) {
- free(p_tm);
- return (NULL);
- }
- }
- }
- return gmtime_r(timep, p_tm);
+#ifdef __FreeBSD__
+ struct tm *p_tm = &tm;
+
+ if (__isthreaded != 0) {
+ _pthread_once(&gmtime_once, gmtime_key_init);
+ if (gmtime_key_error != 0) {
+ errno = gmtime_key_error;
+ return (NULL);
+ }
+ if ((p_tm = _pthread_getspecific(gmtime_key)) == NULL) {
+ if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
+ return (NULL);
+ }
+ if (_pthread_setspecific(gmtime_key, p_tm) != 0) {
+ free(p_tm);
+ return (NULL);
+ }
+ }
+ }
+#endif /* __FreeBSD__ */
+ return gmtime_r(timep, p_tm);
}
#if STD_INSPIRED
@@ -1775,42 +1841,44 @@ gmtime(const time_t *timep)
struct tm *
offtime_r(time_t const *restrict timep, long offset, struct tm *restrict tmp)
{
- _once(&gmt_once, gmtcheck);
- return gmtsub(gmtptr, timep, offset, tmp);
+ gmtcheck();
+ return gmtsub(gmtptr, timep, offset, tmp);
}
+#ifdef __FreeBSD__
static void
offtime_key_init(void)
{
-
- offtime_key_error = _pthread_key_create(&offtime_key, free);
+ offtime_key_error = _pthread_key_create(&offtime_key, free);
}
-
+#endif /* __FreeBSD__ */
struct tm *
offtime(const time_t *timep, long offset)
{
#if !SUPPORT_C89
- static struct tm tm;
+ static struct tm tm;
#endif
- struct tm *p_tm = &tm;
-
- if (__isthreaded != 0) {
- _pthread_once(&offtime_once, offtime_key_init);
- if (offtime_key_error != 0) {
- errno = offtime_key_error;
- return (NULL);
- }
- if ((p_tm = _pthread_getspecific(offtime_key)) == NULL) {
- if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
- return (NULL);
- }
- if (_pthread_setspecific(offtime_key, p_tm) != 0) {
- free(p_tm);
- return (NULL);
- }
- }
- }
- return offtime_r(timep, offset, p_tm);
+#ifdef __FreeBSD__
+ struct tm *p_tm = &tm;
+
+ if (__isthreaded != 0) {
+ _pthread_once(&offtime_once, offtime_key_init);
+ if (offtime_key_error != 0) {
+ errno = offtime_key_error;
+ return (NULL);
+ }
+ if ((p_tm = _pthread_getspecific(offtime_key)) == NULL) {
+ if ((p_tm = malloc(sizeof(*p_tm))) == NULL) {
+ return (NULL);
+ }
+ if (_pthread_setspecific(offtime_key, p_tm) != 0) {
+ free(p_tm);
+ return (NULL);
+ }
+ }
+ }
+#endif
+ return offtime_r(timep, offset, p_tm);
}
#endif
@@ -2323,7 +2391,6 @@ time1(struct tm *const tmp,
errno = EINVAL;
return WRONG;
}
-
if (tmp->tm_isdst > 1)
tmp->tm_isdst = 1;
t = time2(tmp, funcp, sp, offset, &okay);
@@ -2382,7 +2449,7 @@ mktime_tzname(struct state *sp, struct tm *tmp, bool setname)
if (sp)
return time1(tmp, localsub, sp, setname);
else {
- _once(&gmt_once, gmtcheck);
+ gmtcheck();
return time1(tmp, gmtsub, gmtptr, 0);
}
}
@@ -2438,7 +2505,7 @@ timeoff(struct tm *tmp, long offset)
{
if (tmp)
tmp->tm_isdst = 0;
- _once(&gmt_once, gmtcheck);
+ gmtcheck();
return time1(tmp, gmtsub, gmtptr, offset);
}
@@ -2508,7 +2575,7 @@ time2posix(time_t t)
}
#ifndef DETECT_TZ_CHANGES
if (!lcl_is_set)
-#endif
+#endif /* DETECT_TZ_CHANGES */
tzset_unlocked();
if (lclptr)
t = time2posix_z(lclptr, t);
@@ -2555,7 +2622,7 @@ posix2time(time_t t)
}
#ifndef DETECT_TZ_CHANGES
if (!lcl_is_set)
-#endif
+#endif /* DETECT_TZ_CHANGES */
tzset_unlocked();
if (lclptr)
t = posix2time_z(lclptr, t);
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.root.dist b/etc/mtree/BSD.root.dist
index 1312251cdd9e..5ea99ccbdb89 100644
--- a/etc/mtree/BSD.root.dist
+++ b/etc/mtree/BSD.root.dist
@@ -98,16 +98,16 @@
ssh
..
ssl
- certs
+ certs tags=package=caroot
..
- untrusted
+ untrusted tags=package=caroot
..
..
sysctl.kld.d
..
syslog.d
..
- zfs
+ zfs tags=package=zfs
compatibility.d
..
..
diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc
index 6db4e8d964aa..512d153126e8 100644
--- a/krb5/Makefile.inc
+++ b/krb5/Makefile.inc
@@ -9,6 +9,7 @@
.include <src.opts.mk>
+PACKAGE?= kerberos
KRB5_VERSION= 1.22-final
# MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR.
diff --git a/krb5/include/Makefile b/krb5/include/Makefile
index 759c81685da9..8ce743e95d95 100644
--- a/krb5/include/Makefile
+++ b/krb5/include/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
diff --git a/krb5/include/Makefile.inc b/krb5/include/Makefile.inc
index 5c21860b6157..8005a7b99e37 100644
--- a/krb5/include/Makefile.inc
+++ b/krb5/include/Makefile.inc
@@ -7,6 +7,4 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include "../Makefile.inc"
diff --git a/krb5/lib/Makefile.inc b/krb5/lib/Makefile.inc
index 50cacb9492ac..7fc36229a864 100644
--- a/krb5/lib/Makefile.inc
+++ b/krb5/lib/Makefile.inc
@@ -9,7 +9,7 @@
.include "../Makefile.inc"
-PACKAGE?= kerberos-lib
+LIB_PACKAGE=
KRB5_KRB5LIBDIR= ${KRB5_SRCLIBDIR}/krb5
KRB5_K5CRYPTODIR= ${KRB5_SRCLIBDIR}/crypto
diff --git a/krb5/libexec/Makefile.inc b/krb5/libexec/Makefile.inc
index 9bec75eba9cb..b40d1999f23f 100644
--- a/krb5/libexec/Makefile.inc
+++ b/krb5/libexec/Makefile.inc
@@ -9,5 +9,5 @@
.include "../Makefile.inc"
-PACKAGE?= kerberos-kdc
+PACKAGE= kerberos-kdc
BINDIR?= /usr/libexec
diff --git a/krb5/usr.bin/Makefile.inc b/krb5/usr.bin/Makefile.inc
index edd734628950..55e21f80936c 100644
--- a/krb5/usr.bin/Makefile.inc
+++ b/krb5/usr.bin/Makefile.inc
@@ -9,5 +9,4 @@
.include "../Makefile.inc"
-PACKAGE?= kerberos
BINDIR?= /usr/bin
diff --git a/krb5/usr.sbin/gss-server/Makefile b/krb5/usr.sbin/gss-server/Makefile
index 67a51edb45b3..6b56e11f0ac4 100644
--- a/krb5/usr.sbin/gss-server/Makefile
+++ b/krb5/usr.sbin/gss-server/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos
-
PROG= gss-server
LIBADD= gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support sys
diff --git a/krb5/usr.sbin/sim_server/Makefile b/krb5/usr.sbin/sim_server/Makefile
index d46942e0cb91..ddeff682466f 100644
--- a/krb5/usr.sbin/sim_server/Makefile
+++ b/krb5/usr.sbin/sim_server/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos
-
PROG= sim_server
LIBADD= krb5 k5crypto com_err krb5profile krb5support sys
diff --git a/krb5/usr.sbin/sserver/Makefile b/krb5/usr.sbin/sserver/Makefile
index 67cdf9777742..ae5e120848ff 100644
--- a/krb5/usr.sbin/sserver/Makefile
+++ b/krb5/usr.sbin/sserver/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos
-
PROG= sserver
LIBADD= krb5 k5crypto com_err krb5profile krb5support sys
diff --git a/krb5/util/Makefile.inc b/krb5/util/Makefile.inc
index e9357fa4cc66..f1e61f498a4c 100644
--- a/krb5/util/Makefile.inc
+++ b/krb5/util/Makefile.inc
@@ -9,5 +9,7 @@
.include "../Makefile.inc"
+LIB_PACKAGE=
+
SHLIBDIR?= /usr/lib
SHLIB_MAJOR?= 122
diff --git a/krb5/util/build-tools/Makefile b/krb5/util/build-tools/Makefile
index 53de0be92fd2..8bafbb777c07 100644
--- a/krb5/util/build-tools/Makefile
+++ b/krb5/util/build-tools/Makefile
@@ -7,12 +7,11 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include "../Makefile.inc"
SCRIPTS= krb5-config.sh
BINDIR?= /usr/bin
+TAGS= dev
MAN= krb5-config.1
diff --git a/krb5/util/compile_et/Makefile b/krb5/util/compile_et/Makefile
index 015ef088d90f..fb87de3dd9c6 100644
--- a/krb5/util/compile_et/Makefile
+++ b/krb5/util/compile_et/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos
-
.include "../Makefile.inc"
SRC_ETDIR= ${KRB5_DIR}/util/et
@@ -18,6 +16,7 @@ SCRIPTS= compile_et
BINDIR?= /usr/bin
MAN= compile_et.1
CLEANFILES= compile_et
+TAGS+= dev
compile_et: compile_et.sh
sh ${SRC_ETDIR}/config_script ${SRC_ETDIR}/compile_et.sh \
diff --git a/krb5/util/et/Makefile b/krb5/util/et/Makefile
index 0d474efa1e8e..35ac601629d7 100644
--- a/krb5/util/et/Makefile
+++ b/krb5/util/et/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
@@ -44,6 +42,7 @@ ETSCRIPTS= et_c.awk \
ETSCRIPTSDIR= ${KRB5_ETDIR}
ETSCRIPTSMODE= 0444
+ETSCRIPTSTAGS= dev
.include <bsd.lib.mk>
diff --git a/krb5/util/profile/Makefile b/krb5/util/profile/Makefile
index 751d648fa58e..e62d66636161 100644
--- a/krb5/util/profile/Makefile
+++ b/krb5/util/profile/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
diff --git a/krb5/util/ss/Makefile b/krb5/util/ss/Makefile
index ac01f683ff67..2c48ccf56573 100644
--- a/krb5/util/ss/Makefile
+++ b/krb5/util/ss/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
diff --git a/krb5/util/support/Makefile b/krb5/util/support/Makefile
index f73f5d31990a..e2e677fee89d 100644
--- a/krb5/util/support/Makefile
+++ b/krb5/util/support/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
diff --git a/krb5/util/verto/Makefile b/krb5/util/verto/Makefile
index 66d9d8ef4e0b..3ae9da9df20b 100644
--- a/krb5/util/verto/Makefile
+++ b/krb5/util/verto/Makefile
@@ -7,8 +7,6 @@
# under sponsorship from the FreeBSD Foundation.
#
-PACKAGE= kerberos-lib
-
.include <src.opts.mk>
.include "../Makefile.inc"
diff --git a/lib/libc/tests/stdtime/detect_tz_changes_test.c b/lib/libc/tests/stdtime/detect_tz_changes_test.c
index 9722546747fd..75f55bdede04 100644
--- a/lib/libc/tests/stdtime/detect_tz_changes_test.c
+++ b/lib/libc/tests/stdtime/detect_tz_changes_test.c
@@ -20,6 +20,26 @@
#include <atf-c.h>
+static const struct tzcase {
+ const char *tzfn;
+ const char *expect;
+} tzcases[] = {
+ /*
+ * A handful of time zones and the expected result of
+ * strftime("%z (%Z)", tm) when that time zone is active
+ * and tm represents a date in the summer of 2025.
+ */
+ { "America/Vancouver", "-0700 (PDT)" },
+ { "America/New_York", "-0400 (EDT)" },
+ { "Europe/London", "+0100 (BST)" },
+ { "Europe/Paris", "+0200 (CEST)" },
+ { "Asia/Kolkata", "+0530 (IST)" },
+ { "Asia/Tokyo", "+0900 (JST)" },
+ { "Australia/Canberra", "+1000 (AEST)" },
+ { "UTC", "+0000 (UTC)" },
+ { 0 },
+};
+
static const time_t then = 1751328000; /* 2025-07-01 00:00:00 UTC */
static const char *tz_change_interval_sym = "__tz_change_interval";
static int *tz_change_interval_p;
@@ -91,25 +111,6 @@ ATF_TC_HEAD(detect_tz_changes, tc)
}
ATF_TC_BODY(detect_tz_changes, tc)
{
- static const struct tzcase {
- const char *tzfn;
- const char *expect;
- } tzcases[] = {
- /*
- * A handful of time zones and the expected result of
- * strftime("%z (%Z)", tm) when that time zone is active
- * and tm represents a date in the summer of 2025.
- */
- { "America/Vancouver", "-0700 (PDT)" },
- { "America/New_York", "-0400 (EDT)" },
- { "Europe/London", "+0100 (BST)" },
- { "Europe/Paris", "+0200 (CEST)" },
- { "Asia/Kolkata", "+0530 (IST)" },
- { "Asia/Tokyo", "+0900 (JST)" },
- { "Australia/Canberra", "+1000 (AEST)" },
- { "UTC", "+0000 (UTC)" },
- { 0 },
- };
char obuf[1024] = "";
char ebuf[1024] = "";
struct pollfd fds[3];
@@ -272,10 +273,32 @@ ATF_TC_BODY(detect_tz_changes, tc)
ATF_REQUIRE_EQ(0, WEXITSTATUS(status));
}
+ATF_TC(tz_env);
+ATF_TC_HEAD(tz_env, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Test TZ environment variable");
+}
+ATF_TC_BODY(tz_env, tc)
+{
+ char buf[128];
+ const struct tzcase *tzcase = NULL;
+ struct tm *tm;
+ size_t len;
+
+ for (tzcase = tzcases; tzcase->tzfn != NULL; tzcase++) {
+ setenv("TZ", tzcase->tzfn, 1);
+ ATF_REQUIRE((tm = localtime(&then)) != NULL);
+ len = strftime(buf, sizeof(buf), "%z (%Z)", tm);
+ ATF_REQUIRE(len > 0);
+ ATF_REQUIRE_STREQ(tzcase->expect, buf);
+ }
+}
+
ATF_TP_ADD_TCS(tp)
{
debugging = !getenv("__RUNNING_INSIDE_ATF_RUN") &&
isatty(STDERR_FILENO);
ATF_TP_ADD_TC(tp, detect_tz_changes);
+ ATF_TP_ADD_TC(tp, tz_env);
return (atf_no_error());
}
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index e939bae1bc25..2580c398155e 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -45,7 +45,7 @@ libcrypt.ald: ${.CURDIR}/${STATIC_LDSCRIPT}
all: ${STATIC_LDSCRIPT} libcrypt.ald
install-libcrypt.a: libcrypt.ald
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${DEV_TAG_ARGS} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} libcrypt.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a
realinstall: install-libcrypt.a
diff --git a/lib/libelftc/Makefile b/lib/libelftc/Makefile
index a932b0c4b2a4..a6079b817d87 100644
--- a/lib/libelftc/Makefile
+++ b/lib/libelftc/Makefile
@@ -1,5 +1,6 @@
.include <bsd.own.mk>
+PACKAGE= toolchain
INTERNALLIB=
ELFTCDIR= ${SRCTOP}/contrib/elftoolchain
diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile
index e8e0651dc0d6..fb7c659e068c 100644
--- a/lib/libifconfig/Makefile
+++ b/lib/libifconfig/Makefile
@@ -1,4 +1,3 @@
-PACKAGE= lib${LIB}
LIB= ifconfig
INTERNALLIB= true
diff --git a/lib/libiscsiutil/Makefile b/lib/libiscsiutil/Makefile
index c99fb6366536..d9762302fd40 100644
--- a/lib/libiscsiutil/Makefile
+++ b/lib/libiscsiutil/Makefile
@@ -1,6 +1,5 @@
LIB= iscsiutil
INTERNALLIB=
-PACKAGE= iscsi
INCS= libiscsiutil.h
diff --git a/lib/libnetbsd/Makefile b/lib/libnetbsd/Makefile
index 1639caf20d6b..4088c2b57176 100644
--- a/lib/libnetbsd/Makefile
+++ b/lib/libnetbsd/Makefile
@@ -1,6 +1,5 @@
.include <bsd.own.mk>
-PACKAGE=lib${LIB}
LIB= netbsd
CFLAGS+= -I${.CURDIR}
diff --git a/lib/libnvmf/Makefile b/lib/libnvmf/Makefile
index b01f5ab82cac..945c31a2986c 100644
--- a/lib/libnvmf/Makefile
+++ b/lib/libnvmf/Makefile
@@ -3,7 +3,6 @@
LIB= nvmf
INTERNALLIB=
-PACKAGE= nvmf
INCS= libnvmf.h
diff --git a/lib/libopenbsd/Makefile b/lib/libopenbsd/Makefile
index dca1c08b0aed..53bd0200934f 100644
--- a/lib/libopenbsd/Makefile
+++ b/lib/libopenbsd/Makefile
@@ -1,4 +1,3 @@
-PACKAGE=lib${LIB}
LIB= openbsd
SRCS= imsg-buffer.c \
imsg.c \
diff --git a/lib/libpfctl/Makefile b/lib/libpfctl/Makefile
index d301d7850b44..4b16d81181a3 100644
--- a/lib/libpfctl/Makefile
+++ b/lib/libpfctl/Makefile
@@ -1,4 +1,3 @@
-PACKAGE= lib${LIB}
LIB= pfctl
INTERNALLIB= true
diff --git a/lib/libpmcstat/Makefile b/lib/libpmcstat/Makefile
index d1d23cdd57c7..7ca93329e20f 100644
--- a/lib/libpmcstat/Makefile
+++ b/lib/libpmcstat/Makefile
@@ -1,4 +1,3 @@
-PACKAGE=lib${LIB}
LIB= pmcstat
INTERNALLIB=
diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile
index 448abad59192..538407754f6a 100644
--- a/lib/libsm/Makefile
+++ b/lib/libsm/Makefile
@@ -1,6 +1,5 @@
.include <src.opts.mk>
-PACKAGE=sendmail
SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/libsm
diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile
index 898af78d6101..e82deda57615 100644
--- a/lib/libsmdb/Makefile
+++ b/lib/libsmdb/Makefile
@@ -1,4 +1,3 @@
-PACKAGE=lib${LIB}
SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/libsmdb
diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile
index ef526ff8656d..37ad71e84f58 100644
--- a/lib/libsmutil/Makefile
+++ b/lib/libsmutil/Makefile
@@ -1,6 +1,5 @@
.include <src.opts.mk>
-PACKAGE=lib${LIB}
SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
.PATH: ${SENDMAIL_DIR}/libsmutil
diff --git a/lib/libsys/copy_file_range.2 b/lib/libsys/copy_file_range.2
index bcd9170842d5..829a5a5d3c13 100644
--- a/lib/libsys/copy_file_range.2
+++ b/lib/libsys/copy_file_range.2
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 28, 2023
+.Dd August 16, 2025
.Dt COPY_FILE_RANGE 2
.Os
.Sh NAME
@@ -74,6 +74,7 @@ argument must be opened for reading and the
.Fa outfd
argument must be opened for writing, but not
.Dv O_APPEND .
+.Pp
If
.Fa inoffp
or
@@ -101,9 +102,29 @@ respectively will be used/updated and the file offset for
or
.Fa outfd
respectively will not be affected.
-The
+.Pp
+The only
+.Fa flags
+argument currently defined is
+.Dv COPY_FILE_RANGE_CLONE .
+When this flag is set,
+.Fn copy_file_range
+will return
+.Er EOPNOTSUPP
+if the copy cannot be done via
+block cloning.
+When
.Fa flags
-argument must be 0.
+is 0, a file system may do the copy via block cloning
+or by data copying.
+Block cloning is only possible when the offsets (plus
+.Fa len
+if not to EOF on the input file) are block
+aligned.
+The correct block alignment can normally be acquired via the
+.Dv _PC_CLONE_BLKSIZE
+query for
+.Xr pathconf 2 .
.Pp
This system call attempts to maintain holes in the output file for
the byte range being copied.
@@ -203,9 +224,15 @@ refers to a directory.
File system that stores
.Fa outfd
is full.
+.It Bq Er EOPNOTSUPP
+Cannot do the copy via block cloning and the
+.Dv COPY_FILE_RANGE_CLONE
+.Fa flags
+argument is specified.
.El
.Sh SEE ALSO
-.Xr lseek 2
+.Xr lseek 2 ,
+.Xr pathconf 2
.Sh STANDARDS
The
.Fn copy_file_range
diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile
index 6bc2f5a51de0..2eeac2d44f98 100644
--- a/lib/libtelnet/Makefile
+++ b/lib/libtelnet/Makefile
@@ -1,6 +1,5 @@
.include <src.opts.mk>
-PACKAGE=lib${LIB}
TELNETDIR= ${SRCTOP}/contrib/telnet
.PATH: ${TELNETDIR}/libtelnet
diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index 493ae11d6ca7..48f54b120615 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -451,6 +451,23 @@ local function chpasswd(obj)
end
end
+local function settimezone(timezone)
+ if timezone == nil then
+ return
+ end
+ local root = os.getenv("NUAGE_FAKE_ROOTDIR")
+ if not root then
+ root = "/"
+ end
+
+ f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone)
+
+ if not f then
+ warnmsg("Impossible to configure time zone ( rc = " .. rc .. " )")
+ return
+ end
+end
+
local function pkg_bootstrap()
if os.getenv("NUAGE_RUN_TESTS") then
return true
@@ -480,7 +497,7 @@ local function install_package(package)
end
local function run_pkg_cmd(subcmd)
- local cmd = "pkg " .. subcmd .. " -y"
+ local cmd = "env ASSUME_ALWAYS_YES=yes pkg " .. subcmd
if os.getenv("NUAGE_RUN_TESTS") then
print(cmd)
return true
@@ -556,6 +573,7 @@ local n = {
dirname = dirname,
mkdir_p = mkdir_p,
sethostname = sethostname,
+ settimezone = settimezone,
adduser = adduser,
addgroup = addgroup,
addsshkey = addsshkey,
diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit
index 0fcdc7274db3..70b27cb33d87 100755
--- a/libexec/nuageinit/nuageinit
+++ b/libexec/nuageinit/nuageinit
@@ -46,7 +46,15 @@ local function open_config(name)
return openat("/etc/rc.conf.d", name)
end
-local function get_ifaces()
+local function open_resolv_conf()
+ return openat("/etc", "resolv.conf")
+end
+
+local function open_resolvconf_conf()
+ return openat("/etc", "resolvconf.conf")
+end
+
+local function get_ifaces_by_mac()
local parser = ucl.parser()
-- grab ifaces
local ns = io.popen("netstat -i --libxo json")
@@ -77,6 +85,10 @@ local function sethostname(obj)
end
end
+local function settimezone(obj)
+ nuage.settimezone(obj.timezone)
+end
+
local function groups(obj)
if obj.groups == nil then return end
@@ -171,6 +183,59 @@ local function ssh_authorized_keys(obj)
end
end
+local function nameservers(interface, obj)
+ local resolvconf_conf_handler = open_resolvconf_conf()
+
+ if obj.search then
+ local with_space = false
+
+ resolvconf_conf_handler:write('search_domains="')
+
+ for _, d in ipairs(obj.search) do
+ if with_space then
+ resolvconf_conf_handler:write(" " .. d)
+ else
+ resolvconf_conf_handler:write(d)
+ with_space = true
+ end
+ end
+
+ resolvconf_conf_handler:write('"\n')
+ end
+
+ if obj.addresses then
+ local with_space = false
+
+ resolvconf_conf_handler:write('name_servers="')
+
+ for _, a in ipairs(obj.addresses) do
+ if with_space then
+ resolvconf_conf_handler:write(" " .. a)
+ else
+ resolvconf_conf_handler:write(a)
+ with_space = true
+ end
+ end
+
+ resolvconf_conf_handler:write('"\n')
+ end
+
+ resolvconf_conf_handler:close()
+
+ local resolv_conf = root .. "/etc/resolv.conf"
+
+ resolv_conf_attr = lfs.attributes(resolv_conf)
+
+ if resolv_conf_attr == nil then
+ resolv_conf_handler = open_resolv_conf()
+ resolv_conf_handler:close()
+ end
+
+ if not os.execute("resolvconf -a " .. interface .. " < " .. resolv_conf) then
+ nuage.warn("Failed to execute resolvconf(8)")
+ end
+end
+
local function install_packages(packages)
if not nuage.pkg_bootstrap() then
nuage.warn("Failed to bootstrap pkg, skip installing packages")
@@ -187,6 +252,85 @@ local function install_packages(packages)
end
end
+local function list_ifaces()
+ local proc = io.popen("ifconfig -l")
+ local raw_ifaces = proc:read("*a")
+ proc:close()
+ local ifaces = {}
+ for i in raw_ifaces:gmatch("[^%s]+") do
+ table.insert(ifaces, i)
+ end
+ return ifaces
+end
+
+local function get_ifaces_by_driver()
+ local proc = io.popen("ifconfig -D")
+ local drivers = {}
+ local last_interface = nil
+ for line in proc:lines() do
+ local interface = line:match("^([%S]+): ")
+
+ if interface then
+ last_interface = interface
+ end
+
+ local driver = line:match("^[%s]+drivername: ([%S]+)$")
+
+ if driver then
+ drivers[driver] = last_interface
+ end
+ end
+ proc:close()
+
+ return drivers
+end
+
+local function match_rules(rules)
+ -- To comply with the cloud-init specification, all rules must match and a table
+ -- with the matching interfaces must be returned. This changes the way we initially
+ -- thought about our implementation, since at first we only needed one interface,
+ -- but cloud-init performs actions on a group of matching interfaces.
+ local interfaces = {}
+ if rules.macaddress then
+ local ifaces = get_ifaces_by_mac()
+ local interface = ifaces[rules.macaddress]
+ if not interface then
+ nuage.warn("not interface matching by MAC address: " .. rules.macaddress)
+ return
+ end
+ interfaces[interface] = 1
+ end
+ if rules.name then
+ local match = false
+ for _, i in pairs(list_ifaces()) do
+ if i:match(rules.name) then
+ match = true
+ interfaces[i] = 1
+ end
+ end
+ if not match then
+ nuage.warn("not interface matching by name: " .. rules.name)
+ return
+ end
+ end
+ if rules.driver then
+ local match = false
+ local drivers = get_ifaces_by_driver()
+ for d in pairs(drivers) do
+ if d:match(rules.driver) then
+ match = true
+ interface = drivers[d]
+ interfaces[interface] = 1
+ end
+ end
+ if not match then
+ nuage.warn("not interface matching by driver: " .. rules.driver)
+ return
+ end
+ end
+ return interfaces
+end
+
local function write_files(files, defer)
if not files then
return
@@ -210,41 +354,76 @@ end
local function network_config(obj)
if obj.network == nil then return end
- local ifaces = get_ifaces()
local network = open_config("network")
local routing = open_config("routing")
local ipv6 = {}
- for _, v in pairs(obj.network.ethernets) do
- if not v.match then
- goto next
+ local set_defaultrouter = true
+ local set_defaultrouter6 = true
+ local set_nameservers = true
+ for i, v in pairs(obj.network.ethernets) do
+ local interfaces = {}
+ if v.match then
+ interfaces = match_rules(v.match)
+
+ if next(interfaces) == nil then
+ goto next
+ end
+ else
+ interfaces[i] = 1
end
- if not v.match.macaddress then
- goto next
+ local extra_opts = ""
+ if v.wakeonlan then
+ extra_opts = extra_opts .. " wol"
end
- if not ifaces[v.match.macaddress] then
- nuage.warn("not interface matching: " .. v.match.macaddress)
- goto next
+ if v.mtu then
+ if type(v.mtu) == "number" then
+ mtu = tostring(v.mtu)
+ else
+ mtu = v.mtu
+ end
+ if mtu:match("%d") then
+ extra_opts = extra_opts .. " mtu " .. mtu
+ else
+ nuage.warn("MTU is not set because the specified value is invalid: " .. mtu)
+ end
end
- local interface = ifaces[v.match.macaddress]
- if v.dhcp4 then
- network:write("ifconfig_" .. interface .. '="DHCP"\n')
- elseif v.addresses then
- for _, a in pairs(v.addresses) do
- if a:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)") then
- network:write("ifconfig_" .. interface .. '="inet ' .. a .. '"\n')
- else
- network:write("ifconfig_" .. interface .. '_ipv6="inet6 ' .. a .. '"\n')
- ipv6[#ipv6 + 1] = interface
+ for interface in pairs(interfaces) do
+ if v.match and v.match.macaddress and v["set-name"] then
+ local ifaces = get_ifaces_by_mac()
+ local matched = ifaces[v.match.macaddress]
+ if matched and matched == interface then
+ network:write("ifconfig_" .. interface .. '_name=' .. v["set-name"] .. '\n')
+ interface = v["set-name"]
+ end
+ end
+ if v.dhcp4 then
+ network:write("ifconfig_" .. interface .. '="DHCP"' .. extra_opts .. '\n')
+ elseif v.addresses then
+ for _, a in pairs(v.addresses) do
+ if a:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)") then
+ network:write("ifconfig_" .. interface .. '="inet ' .. a .. extra_opts .. '"\n')
+ else
+ network:write("ifconfig_" .. interface .. '_ipv6="inet6 ' .. a .. extra_opts .. '"\n')
+ ipv6[#ipv6 + 1] = interface
+ end
+ end
+ if set_nameservers and v.nameservers then
+ set_nameservers = false
+ nameservers(interface, v.nameservers)
+ end
+ if set_defaultrouter and v.gateway4 then
+ set_defaultrouter = false
+ routing:write('defaultrouter="' .. v.gateway4 .. '"\n')
+ end
+ if v.gateway6 then
+ if set_defaultrouter6 then
+ set_defaultrouter6 = false
+ routing:write('ipv6_defaultrouter="' .. v.gateway6 .. '"\n')
+ end
+ routing:write("ipv6_route_" .. interface .. '="' .. v.gateway6)
+ routing:write(" -prefixlen 128 -interface " .. interface .. '"\n')
end
end
- end
- if v.gateway4 then
- routing:write('defaultrouter="' .. v.gateway4 .. '"\n')
- end
- if v.gateway6 then
- routing:write('ipv6_defaultrouter="' .. v.gateway6 .. '"\n')
- routing:write("ipv6_route_" .. interface .. '="' .. v.gateway6)
- routing:write(" -prefixlen 128 -interface " .. interface .. '"\n')
end
::next::
end
@@ -316,7 +495,7 @@ local function config2_network(p)
end
local obj = parser:get_object()
- local ifaces = get_ifaces()
+ local ifaces = get_ifaces_by_mac()
if not ifaces then
nuage.warn("no network interfaces found")
return
@@ -468,6 +647,7 @@ f:close()
if line == "#cloud-config" then
local pre_network_calls = {
sethostname,
+ settimezone,
groups,
create_default_user,
ssh_keys,
diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7
index 327ce160e151..f27b8bc06042 100644
--- a/libexec/nuageinit/nuageinit.7
+++ b/libexec/nuageinit/nuageinit.7
@@ -143,6 +143,11 @@ Specify a fully qualified domain name for the instance.
Specify the hostname of the instance if
.Qq Ic fqdn
is not set.
+.It Ic timezone
+Sets the system timezone based on the value provided.
+.Pp
+See also
+.Xr tzfile 3 Ns .
.It Ic groups
An array of strings or objects to be created:
.Bl -bullet
@@ -176,6 +181,89 @@ boolean which determines the value of the
configuration in
.Pa /etc/ssh/sshd_config
.It Ic network
+Network configuration parameters.
+.Bl -tag -width "ethernets"
+.It Ic ethernets
+Mapping representing a generic configuration for existing network interfaces.
+.Pp
+Each key is an interface name that is only used when no
+.Sy match
+rule is specified.
+If
+.Sy match
+rules are specified, an arbitrary name can be used
+.Po e.g.: id0 Pc Ns .
+.Bl -tag -width "nameservers"
+.It Ic match
+This selects a subset of available physical devices by various hardware properties.
+The following configuration will then apply to all matching devices, as soon as
+they appear.
+All specified properties must match.
+The following properties for
+creating matches are supported:
+.Bl -tag -width "macaddress"
+.It Ic macaddress
+.No Device's MAC address in the form Sy xx:xx:xx:xx:xx:xx Ns .
+Letters should be lowercase.
+.It Ic name
+Current interface name.
+Lua pattern-matching expressions are supported.
+.It Ic driver
+Interface driver name and unit number of the interface.
+Lua pattern-natching expressions
+are supported.
+.El
+.It Ic set-name
+When matching on unique properties such as MAC, match rules can be written so that they
+match only one device.
+Then this property can be used to give that device a more
+specific/desirable/nicer name than the default.
+.Pp
+While multiple properties can be used in a match,
+.Sy macaddress
+is required for nuageinit to perform the rename.
+.It Ic mtu
+The MTU key represents a device's Maximum Transmission Unit, the largest size packet
+or frame.
+.It Ic wakeonlan
+Enable wake on LAN.
+Off by default.
+.It Ic dhcp4
+Configure the interface to use DHCP.
+.Pp
+This takes precedence over
+.Sy addresses
+when both are specified.
+.It Ic addresses
+List of strings representing IPv4 or IPv6 addresses.
+.It Ic gateway4
+Set default gateway for IPv4, for manual address configuration.
+This requires setting
+.Sy addresses
+too.
+.Pp
+Since only one default router can be configured at a time, this parameter is applied
+when processing the first entry, and any others are silently ignored.
+.It Ic gateway6
+Set default gateway for IPv6, for manual address configuration.
+This requires setting
+.Sy addresses
+too.
+.Pp
+Since only one default router can be configured at a time, this parameter is applied
+when processing the first entry, and any others are silently ignored.
+.It Ic nameservers
+Set DNS servers and search domains, for manual address configuration.
+.Pp
+There are two supported fields:
+.Bl -tag -width "addresses"
+.It Ic search
+Search list for host-name lookup.
+.It Ic addresses
+List of IPv4 or IPv6 name server addresses that the resolver should query.
+.El
+.El
+.El
.It Ic runcmd
An array of commands to be run at the end of the boot process
.It Ic packages
@@ -186,7 +274,7 @@ Update the remote package metadata.
Upgrade the packages installed to their latest version.
.It Ic users
Specify a list of users to be created:
-.Bl -tag -width "plain_text_passwd"
+.Bl -tag -width "ssh_authorized_keys"
.It Ic name
Name of the user.
.It Ic gecos
@@ -201,6 +289,8 @@ The list of other groups the user should belong to.
A boolean which determines if the home directory should be created or not.
.It Ic shell
The shell that should be used for the user.
+.It Ic ssh_authorized_keys
+List of SSH keys for the user.
.It Ic passwd
The encrypted password for the user.
.It Ic plain_text_passwd
@@ -211,7 +301,7 @@ The list of other groups the user should belong to.
.It Ic locked
Boolean to determine if the user account should be locked.
.It Ic sudo
-A string or an array of strings which which should be appended to
+A string or an array of strings which should be appended to
.Pa /usr/local/etc/sudoers.d/90-nuageinit-users
.El
.Pp
@@ -251,7 +341,7 @@ It accepts the following keys for each objects:
The content to be written to the file.
If this key is not existing then an empty file will be created.
.It Ic encoding
-Specifiy the encoding used for content.
+Specify the encoding used for content.
If not specified, then plain text is considered.
Only
.Ar b64
@@ -287,7 +377,7 @@ users:
- name: user
gecos: Foo B. Bar
sudo: ALL=(ALL) NOPASSWD:ALL
- ssh-authorized-keys:
+ ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAr...
packages:
- neovim
@@ -303,6 +393,12 @@ ssh_keys:
...
-----END OPENSSH PRIVATE KEY-----
ed25519_public: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK+MH4E8KO32N5CXRvXVqvyZVl0+6ue4DobdhU0FqFd+
+network:
+ ethernets:
+ vtnet0:
+ addresses:
+ - 192.168.8.2/24
+ gateway4: 192.168.8.1
.Ed
.Sh SEE ALSO
.Xr kenv 2 ,
diff --git a/libexec/nuageinit/tests/Makefile b/libexec/nuageinit/tests/Makefile
index c69bc28a4c86..dc8997717b59 100644
--- a/libexec/nuageinit/tests/Makefile
+++ b/libexec/nuageinit/tests/Makefile
@@ -15,6 +15,7 @@ ${PACKAGE}FILES+= adduser_passwd.lua
${PACKAGE}FILES+= dirname.lua
${PACKAGE}FILES+= err.lua
${PACKAGE}FILES+= sethostname.lua
+${PACKAGE}FILES+= settimezone.lua
${PACKAGE}FILES+= warn.lua
${PACKAGE}FILES+= addfile.lua
diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh
index 56651c8c5bb7..b709d25532ff 100644
--- a/libexec/nuageinit/tests/nuage.sh
+++ b/libexec/nuageinit/tests/nuage.sh
@@ -7,12 +7,21 @@
export NUAGE_FAKE_ROOTDIR="$PWD"
atf_test_case sethostname
+atf_test_case settimezone
atf_test_case addsshkey
atf_test_case adduser
atf_test_case adduser_passwd
atf_test_case addgroup
atf_test_case addfile
+settimezone_body()
+{
+ atf_check /usr/libexec/flua $(atf_get_srcdir)/settimezone.lua
+ if [ ! -f etc/localtime ]; then
+ atf_fail "localtime not written"
+ fi
+}
+
sethostname_body()
{
atf_check /usr/libexec/flua $(atf_get_srcdir)/sethostname.lua
diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh
index 849f1c258b62..98593f7d75b0 100644
--- a/libexec/nuageinit/tests/nuageinit.sh
+++ b/libexec/nuageinit/tests/nuageinit.sh
@@ -815,7 +815,7 @@ config2_userdata_update_packages_body()
package_update: true
EOF
chmod 755 "${PWD}"/media/nuageinit/user_data
- atf_check -o inline:"pkg update -y\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
+ atf_check -o inline:"env ASSUME_ALWAYS_YES=yes pkg update\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
}
config2_userdata_upgrade_packages_body()
@@ -829,7 +829,7 @@ config2_userdata_upgrade_packages_body()
package_upgrade: true
EOF
chmod 755 "${PWD}"/media/nuageinit/user_data
- atf_check -o inline:"pkg upgrade -y\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
+ atf_check -o inline:"env ASSUME_ALWAYS_YES=yes pkg upgrade\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit postnet
}
config2_userdata_shebang_body()
diff --git a/libexec/nuageinit/tests/settimezone.lua b/libexec/nuageinit/tests/settimezone.lua
new file mode 100644
index 000000000000..a8cacf09f4e7
--- /dev/null
+++ b/libexec/nuageinit/tests/settimezone.lua
@@ -0,0 +1,5 @@
+#!/usr/libexec/flua
+
+local n = require("nuage")
+
+n.settimezone("UTC")
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 8977d5947010..d27af520c21d 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -859,6 +859,10 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
linkmap_add(obj_main);
linkmap_add(&obj_rtld);
+ LD_UTRACE(UTRACE_LOAD_OBJECT, obj_main, obj_main->mapbase,
+ obj_main->mapsize, 0, obj_main->path);
+ LD_UTRACE(UTRACE_LOAD_OBJECT, &obj_rtld, obj_rtld.mapbase,
+ obj_rtld.mapsize, 0, obj_rtld.path);
/* Link the main program into the list of objects. */
TAILQ_INSERT_HEAD(&obj_list, obj_main, next);
@@ -2437,11 +2441,21 @@ parse_rtld_phdr(Obj_Entry *obj)
{
const Elf_Phdr *ph;
Elf_Addr note_start, note_end;
+ bool first_seg;
+ first_seg = true;
obj->stack_flags = PF_X | PF_R | PF_W;
for (ph = obj->phdr;
(const char *)ph < (const char *)obj->phdr + obj->phsize; ph++) {
switch (ph->p_type) {
+ case PT_LOAD:
+ if (first_seg) {
+ obj->vaddrbase = rtld_trunc_page(ph->p_vaddr);
+ first_seg = false;
+ }
+ obj->mapsize = rtld_round_page(ph->p_vaddr +
+ ph->p_memsz) - obj->vaddrbase;
+ break;
case PT_GNU_STACK:
obj->stack_flags = ph->p_flags;
break;
diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua
index a243c6ea7ad0..5637bbd3ad99 100755
--- a/release/packages/generate-ucl.lua
+++ b/release/packages/generate-ucl.lua
@@ -39,6 +39,10 @@ pkg_suffixes = {
"applications on a 64-bit host.",
},
{
+ "%-lib$", "(libraries)",
+ "This package contains runtime shared libraries.",
+ },
+ {
"%-dev$", "(development files)",
"This package contains development files for "..
"compiling applications."
@@ -98,6 +102,9 @@ function add_gen_dep(pkgname, pkggenname)
if no_gen_deps[pkgname] ~= nil then
return false
end
+ if pkgname:match("%-lib$") ~= nil then
+ return false
+ end
if pkggenname == "kernel" then
return false
end
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index 3078185a3c4e..a08840d5b321 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -49,6 +49,9 @@ main() {
*-lib32)
outname="${outname%%-lib32}"
;;
+ *-lib)
+ outname="${outname%%-lib}"
+ ;;
*-man)
outname="${outname%%-man}"
;;
diff --git a/release/packages/ucl/dma-all.ucl b/release/packages/ucl/dma-all.ucl
index e8824acf7a36..63d6c86b0be4 100644
--- a/release/packages/ucl/dma-all.ucl
+++ b/release/packages/ucl/dma-all.ucl
@@ -1,4 +1,12 @@
-comment = "DMA Mail Agent Utilities"
+comment = "DragonFly Mail Agent"
desc = <<EOD
-DMA Mail Agent Utilities
+The DragonFly Mail Agent (dma) is a lightweight mail transport agent intended
+for home and office use. dma can accept mail from local users and deliver it
+either locally or remotely (via SMTP). dma can be configured to route remote
+mail via an SMTP smart host, optionally using STARTTLS and/or authentication.
+
+dma does not implement an SMTP server and cannot receive mail from remote
+systems, nor act as a mail exchanger for other hosts. If an SMTP server
+is required, or when more advanced mail routing is needed, consider using
+the $PKG_NAME_PREFIX-sendmail package instead.
EOD
diff --git a/release/packages/ucl/kerberos-lib-all.ucl b/release/packages/ucl/kerberos-lib-all.ucl
deleted file mode 100644
index b524563a976d..000000000000
--- a/release/packages/ucl/kerberos-lib-all.ucl
+++ /dev/null
@@ -1,4 +0,0 @@
-comment = "Kerberos libraries"
-desc = <<EOD
-Libraries requires to run programs that use Kerberos.
-EOD
diff --git a/release/packages/ucl/libmilter-all.ucl b/release/packages/ucl/libmilter-all.ucl
index 70764a3f0f8b..5c0e4925a9c2 100644
--- a/release/packages/ucl/libmilter-all.ucl
+++ b/release/packages/ucl/libmilter-all.ucl
@@ -1,6 +1,7 @@
-comment = "Sendmail mail filter (milter) library"
+comment = "sendmail Mail Filter API library"
desc = <<EOD
-The Sendmail milter interface allows a mail transport agent to filter mail
-through a separate process, called a milter. libmilter provides support
-for applications implementing the milter interface.
+The sendmail Mail Filter API (Milter) is designed to allow third-party
+programs access to mail messages as they are being processed in order
+to filter meta-information and content. libmilter provides support for
+applications implementing the milter interface.
EOD
diff --git a/release/packages/ucl/openssl-lib-all.ucl b/release/packages/ucl/openssl-lib-all.ucl
deleted file mode 100644
index c81dd44855cd..000000000000
--- a/release/packages/ucl/openssl-lib-all.ucl
+++ /dev/null
@@ -1,4 +0,0 @@
-comment = "OpenSSL Libraries"
-desc = <<EOD
-OpenSSL Libraries
-EOD
diff --git a/release/packages/ucl/sendmail-all.ucl b/release/packages/ucl/sendmail-all.ucl
index 2711e33a31a8..38f697da24fc 100644
--- a/release/packages/ucl/sendmail-all.ucl
+++ b/release/packages/ucl/sendmail-all.ucl
@@ -1,4 +1,15 @@
-comment = "Sendmail Utilities"
+comment = "sendmail mail transport agent"
desc = <<EOD
-Sendmail Utilities
+The sendmail mail transport agent allows the system to send and receive mail
+for both local and remote users. sendmail can also act as a mail exchanger
+for other hosts, and has a flexible configuration format that can be used to
+rewrite, filter or otherwise process mail before delivering it.
+
+sendmail supports multiple mail transport protocols, including Internet SMTP,
+LMTP, UUCP and DECnet. Support for protocols other than SMTP and LMTP needs
+third-party software not shipped with the base system.
+
+When the full functionality of sendmail is not required, consider using the
+$PKG_NAME_PREFIX-dma package instead, a lightweight MTA which can send (but
+not receive) mail over SMTP.
EOD
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 7e2350fb33ea..f8f8d291ee9e 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -9,7 +9,6 @@ CFLAGS+= -DOPENSSL_NO_SCTP
.include <bsd.own.mk>
.include <src.opts.mk>
-PACKAGE= openssl-lib
LIB= crypto
SHLIB_MAJOR= 35
VERSION_MAP= ${.CURDIR}/Version.map
diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc
index 55e1687b58cf..4d5e9c68a1fe 100644
--- a/secure/lib/libcrypto/Makefile.inc
+++ b/secure/lib/libcrypto/Makefile.inc
@@ -1,8 +1,10 @@
.include <bsd.own.mk>
+PACKAGE= openssl
+LIB_PACKAGE=
+
# 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/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc
index 777193ba3f9a..146c2f794eb6 100644
--- a/secure/lib/libcrypto/engines/Makefile.inc
+++ b/secure/lib/libcrypto/engines/Makefile.inc
@@ -1,4 +1,5 @@
-PACKAGE?= openssl-lib
+PACKAGE?= openssl
+LIB_PACKAGE=
SHLIBDIR= ${LIBDIR}/engines-3
diff --git a/secure/lib/libcrypto/modules/Makefile.inc b/secure/lib/libcrypto/modules/Makefile.inc
index 363b7f4bc766..4b3d9fc512ce 100644
--- a/secure/lib/libcrypto/modules/Makefile.inc
+++ b/secure/lib/libcrypto/modules/Makefile.inc
@@ -1,4 +1,5 @@
-PACKAGE?= openssl-lib
+PACKAGE?= openssl
+LIB_PACKAGE=
SHLIBDIR= ${LIBDIR}/ossl-modules
LCRYPTO_SRC= ${SRCTOP}/crypto/openssl
diff --git a/secure/lib/libssl/Makefile b/secure/lib/libssl/Makefile
index 45f23c9e9ca2..acb63549c1c8 100644
--- a/secure/lib/libssl/Makefile
+++ b/secure/lib/libssl/Makefile
@@ -3,7 +3,6 @@
LIB= ssl
SHLIB_MAJOR= 35
VERSION_MAP= ${.CURDIR}/Version.map
-PACKAGE= openssl-lib
NO_LINT=
@@ -73,6 +72,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/share/man/man4/ata.4 b/share/man/man4/ata.4
index feea1dd3cc85..29b6bbef6838 100644
--- a/share/man/man4/ata.4
+++ b/share/man/man4/ata.4
@@ -155,7 +155,9 @@ The
.Va hw.ata.ata_dma_check_80pin
tunable can be set to 0 to disable this check.
.Sh HARDWARE
-The currently supported ATA/SATA controller chips are:
+The
+.Nm
+driver supports the IDE interface on the following ATA/SATA controllers:
.Pp
.Bl -tag -width "Silicon Image:" -compact
.It Acard:
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/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/man4/vtnet.4 b/share/man/man4/vtnet.4
index 8b99cd9f17b9..b6f10ddd87cb 100644
--- a/share/man/man4/vtnet.4
+++ b/share/man/man4/vtnet.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd July 29, 2025
+.Dd August 21, 2025
.Dt VTNET 4
.Os
.Sh NAME
@@ -68,20 +68,29 @@ prompt before booting the kernel or stored in
.Bl -tag -width "xxxxxx"
.It Va hw.vtnet.csum_disable
.It Va hw.vtnet. Ns Ar X Ns Va .csum_disable
-This tunable disables receive and send checksum offload.
+This tunable disables receive and transmit checksum offloading for TCP and
+UDP.
+This also implies that TCP segmentation offloading and large receive offload
+are disabled.
The default value is 0.
.It Va hw.vtnet.fixup_needs_csum
.It Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum
-This tunable enforces the calculation of a valid checksum for NEEDS_CSUM
-packets.
+This tunable enforces the calculation of a valid TCP or UDP checksum for
+packets received with
+.Dv VIRTIO_NET_HDR_F_NEEDS_CSUM
+being set in the
+.Va flags
+field of the structure
+.Vt struct virtio_net_hdr .
+It also marks the checksum as being correct in the mbuf packet header.
The default value is 0.
.It Va hw.vtnet.tso_disable
.It Va hw.vtnet. Ns Ar X Ns Va .tso_disable
-This tunable disables TSO.
+This tunable disables TCP segmentation offloading.
The default value is 0.
.It Va hw.vtnet.lro_disable
.It Va hw.vtnet. Ns Ar X Ns Va .lro_disable
-This tunable disables LRO.
+This tunable disables large receive offload.
The default value is 0.
.It Va hw.vtnet.mq_disable
.It Va hw.vtnet. Ns Ar X Ns Va .mq_disable
@@ -117,6 +126,127 @@ This tunable disables ALTQ support, allowing the use of multiqueue instead.
This option applies to all interfaces.
The default value is 0.
.El
+.Sh TRANSMIT QUEUE STATISTICS
+.Bl -tag -width "xxxxxx"
+For each transmit queue of each interface the following read-only statistics
+are provided:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled
+The number of times the transmit interrupt handler was rescheduled.
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso
+The number of times TCP segment offloading was performed.
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum
+The number of times transmit checksum offloading for UDP or TCP was
+performed.
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .omcasts
+The number of multicast packets that were transmitted.
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .obytes
+The number of bytes that were transmitted (based on Ethernet frames).
+.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .opackets
+The number of packets that were transmitted (Ethernet frames).
+.El
+.Sh RECEIVE QUEUE STATISTICS
+For each receive queue of each interface the following read-only statistics
+are provided:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled
+The number of times the receive interrupt handler was rescheduled.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .host_lro
+The number of times TCP large receive offload was performed.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed
+Currently not used.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum
+The number of times receive checksum offloading for UDP or TCP was performed.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ierrors
+The number of times an error occurred during input processing.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .iqdrops
+The number of times a packet was dropped during input processing.
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ibytes
+The number of bytes that were received (based on Ethernet frames).
+.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ipackets
+The number of packets that were received (Ethernet frames).
+.El
+.Sh INTERFACE TRANSMIT STATISTICS
+For each interface the following read-only transmit statistics are provided:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_task_rescheduled
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled
+over all transmit queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_offloaded
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso
+over all transmit queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_offloaded
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum
+over all transmit queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_defrag_failed
+The number of times an attempt to defragment an mbuf chain failed during a
+transmit operation.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_defragged
+The number of times an mbuf chain was defragmented during a transmit operation.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_without_csum
+The number of times TCP segment offloading was attempted without transmit
+checksum offloading.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_not_tcp
+The number of times TCP segment offloading was attempted for a non-TCP packet.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_proto_mismatch
+The number of times the IP protocol version of the transmit checksum
+offloading request did not match the IP protocol version of the packet.
+.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_unknown_ethtype
+The number of times a transmit offload operation was requested for an
+ethernet frame for which the EtherType was neither IPv4 nor IPv6
+(considering simple VLAN tagging).
+.El
+.Sh INTERFACE RECEIVE STATISTICS
+For each interface the following read-only receive statistics are provided:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_task_rescheduled
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled
+over all receive queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_offloaded
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum
+over all receive queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_failed
+The sum of
+.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed
+over all receive queues of the interface.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_proto
+Currently unused.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_offset
+Currently unused.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ipproto
+Currently unused.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ethtype
+The number of times fixing the checksum required by
+.Va hw.vtnet.fixup_needs_csum
+or
+.Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum
+was attempted for a packet with an EtherType other than IPv4 or IPv6.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_mergeable_failed
+The number of times receiving a mergable buffer failed.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_enq_replacement_failed
+The number of times the enqueuing the replacement receive mbuf chain failed.
+.It Va dev.vtnet. Ns Ar X Ns Va .rx_frame_too_large
+The number of times the frame was loger than the mbuf chain during large
+receive offload without mergeable buffers.
+.It Va dev.vtnet. Ns Ar X Ns Va .mbuf_alloc_failed
+The number of times an mbuf cluster allocation for the receive buffer failed.
+.El
+.Sh INTERFACE CONFIGURATION PARAMETER
+For each interface the following read-only configuration parameters are
+provided:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vtnet. Ns Ar X Ns Va .act_vq_pairs
+The number of active virtqueue pairs.
+.It Va dev.vtnet. Ns Ar X Ns Va .req_vq_pairs
+The number of requested virtqueue pairs.
+.It Va dev.vtnet. Ns Ar X Ns Va .max_vq_pairs
+The maximum number of supported virtqueue pairs.
+.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netintro 4 ,
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.compat.mk b/share/mk/bsd.compat.mk
index 6fa732fd730b..bad68d1ebd8e 100644
--- a/share/mk/bsd.compat.mk
+++ b/share/mk/bsd.compat.mk
@@ -74,6 +74,7 @@ LIB32WMAKEFLAGS= \
LIB32WMAKEFLAGS+= NM="${XNM}"
LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}"
+LIB32WMAKEFLAGS+= STRIPBIN="${XSTRIPBIN}"
LIB32DTRACE= ${DTRACE} -32
LIB32_MACHINE_ABI= ${MACHINE_ABI:N*64} long32 ptr32
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.lib.mk b/share/mk/bsd.lib.mk
index 3013f32c2b36..6caad8956c14 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}
@@ -70,11 +52,31 @@ TAGS+= lib${_libcompat}
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
-TAGS+= package=${PACKAGE:Uutilities}
+TAGS+= package=${PACKAGE:Uutilities}
.endif
-TAG_ARGS= -T ${TAGS:ts,:[*]}
+
+# By default, if PACKAGE=foo, then the native runtime libraries will go into
+# the FreeBSD-foo package, and subpackages will be created for -dev, -lib32,
+# and so on. If LIB_PACKAGE is set, then we also create a subpackage for
+# runtime libraries with a -lib suffix. This is used when a package has
+# libraries and some other content (e.g., executables) to allow consumers to
+# depend on the libraries.
+.if defined(LIB_PACKAGE) && ! ${TAGS:Mlib*}
+.if !defined(PACKAGE)
+.error LIB_PACKAGE cannot be used without PACKAGE
+.endif
+
+LIB_TAG_ARGS= ${TAG_ARGS},lib
+.else
+LIB_TAG_ARGS= ${TAG_ARGS}
.endif
+TAG_ARGS= -T ${TAGS:ts,:[*]}
+
+DBG_TAG_ARGS= ${TAG_ARGS},dbg
+DEV_TAG_ARGS= ${TAG_ARGS},dev
+.endif # !defined(NO_ROOT)
+
# ELF hardening knobs
.if ${MK_BIND_NOW} != "no"
LDFLAGS+= -Wl,-znow
@@ -130,18 +132,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 +146,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 +263,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)
@@ -384,7 +375,7 @@ _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}}
installpcfiles: installpcfiles-${pcfile}
installpcfiles-${pcfile}: ${pcfile}
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} \
${.ALLSRC} ${DESTDIR}${LIBDATADIR}/pkgconfig/
.endfor
@@ -392,49 +383,42 @@ 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} \
+ ${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(SHLIB_NAME)
- ${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${LIB_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} \
+ ${INSTALL} ${DEV_TAG_ARGS} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS}
- ${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} ${SHLIB_LINK} \
- ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
+ ${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
+ ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
.endfor
.else
.if ${_SHLIBDIR} == ${_LIBDIR}
.if ${SHLIB_LINK:Mlib*}
- ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},dev} \
+ ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.else
- ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
+ ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
+ ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.endif
.else
.if ${SHLIB_LINK:Mlib*}
- ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},dev} \
+ ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.else
- ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} \
+ ${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
.endif
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
@@ -446,7 +430,7 @@ _libinstall:
.endif # SHLIB_LINK
.endif # SHIB_NAME
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
- ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
.endif
.endif # !defined(INTERNALLIB)
@@ -466,7 +450,7 @@ LINKGRP?= ${LIBGRP}
LINKMODE?= ${LIBMODE}
SYMLINKOWN?= ${LIBOWN}
SYMLINKGRP?= ${LIBGRP}
-LINKTAGS= dev
+LINKTAGS= dev${_COMPAT_TAG}
.include <bsd.links.mk>
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
@@ -501,6 +485,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/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
index af72ab1a4c99..659bf8540422 100644
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -232,6 +232,69 @@ gfx_parse_mode_str(char *str, int *x, int *y, int *depth)
return (true);
}
+/*
+ * Returns true if we set the color from pre-existing environment, false if
+ * just used existing defaults.
+ */
+static bool
+gfx_fb_evalcolor(const char *envname, teken_color_t *cattr,
+ ev_sethook_t sethook, ev_unsethook_t unsethook)
+{
+ const char *ptr;
+ char env[10];
+ int eflags = EV_VOLATILE | EV_NOKENV;
+ bool from_env = false;
+
+ ptr = getenv(envname);
+ if (ptr != NULL) {
+ *cattr = strtol(ptr, NULL, 10);
+
+ /*
+ * If we can't unset the value, then it's probably hooked
+ * properly and we can just carry on. Otherwise, we want to
+ * reinitialize it so that we can hook it for the console that
+ * we're resetting defaults for.
+ */
+ if (unsetenv(envname) != 0)
+ return (true);
+ from_env = true;
+
+ /*
+ * If we're carrying over an existing value, we *do* want that
+ * to propagate to the kenv.
+ */
+ eflags &= ~EV_NOKENV;
+ }
+
+ snprintf(env, sizeof(env), "%d", *cattr);
+ env_setenv(envname, eflags, env, sethook, unsethook);
+
+ return (from_env);
+}
+
+void
+gfx_fb_setcolors(teken_attr_t *attr, ev_sethook_t sethook,
+ ev_unsethook_t unsethook)
+{
+ const char *ptr;
+ bool need_setattr = false;
+
+ /*
+ * On first run, we setup an environment hook to process any color
+ * changes. If the env is already set, we pick up fg and bg color
+ * values from the environment.
+ */
+ if (gfx_fb_evalcolor("teken.fg_color", &attr->ta_fgcolor,
+ sethook, unsethook))
+ need_setattr = true;
+ if (gfx_fb_evalcolor("teken.bg_color", &attr->ta_bgcolor,
+ sethook, unsethook))
+ need_setattr = true;
+
+ if (need_setattr)
+ teken_set_defattr(&gfx_state.tg_teken, attr);
+}
+
static uint32_t
rgb_color_map(uint8_t index, uint32_t rmax, int roffset,
uint32_t gmax, int goffset, uint32_t bmax, int boffset)
diff --git a/stand/common/gfx_fb.h b/stand/common/gfx_fb.h
index 17e419d8ffd3..d12bcd76b7fa 100644
--- a/stand/common/gfx_fb.h
+++ b/stand/common/gfx_fb.h
@@ -277,6 +277,7 @@ void gfx_fb_bezier(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t,
int gfx_fb_putimage(png_t *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
bool gfx_parse_mode_str(char *, int *, int *, int *);
+void gfx_fb_setcolors(teken_attr_t *, ev_sethook_t, ev_unsethook_t);
void term_image_display(teken_gfx_t *, const teken_rect_t *);
void reset_font_flags(void);
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/common/modinfo.c b/stand/common/modinfo.c
index 313469d32f35..1e39bd858cc2 100644
--- a/stand/common/modinfo.c
+++ b/stand/common/modinfo.c
@@ -172,6 +172,8 @@ md_copyenv(vm_offset_t start)
/* Traverse the environment. */
for (ep = environ; ep != NULL; ep = ep->ev_next) {
+ if ((ep->ev_flags & EV_NOKENV) != 0)
+ continue;
len = strlen(ep->ev_name);
if ((size_t)archsw.arch_copyin(ep->ev_name, addr, len) != len)
break;
diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c
index cbb4dd01d1fb..46a3c957f151 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -1041,28 +1041,7 @@ cons_update_mode(bool use_gfx_mode)
a = teken_get_defattr(&gfx_state.tg_teken);
attr = *a;
- /*
- * On first run, we set up the efi_set_colors()
- * callback. If the env is already set, we
- * pick up fg and bg color values from the environment.
- */
- ptr = getenv("teken.fg_color");
- if (ptr != NULL) {
- attr.ta_fgcolor = strtol(ptr, NULL, 10);
- ptr = getenv("teken.bg_color");
- attr.ta_bgcolor = strtol(ptr, NULL, 10);
-
- teken_set_defattr(&gfx_state.tg_teken, &attr);
- } else {
- snprintf(env, sizeof(env), "%d",
- attr.ta_fgcolor);
- env_setenv("teken.fg_color", EV_VOLATILE, env,
- efi_set_colors, env_nounset);
- snprintf(env, sizeof(env), "%d",
- attr.ta_bgcolor);
- env_setenv("teken.bg_color", EV_VOLATILE, env,
- efi_set_colors, env_nounset);
- }
+ gfx_fb_setcolors(&attr, efi_set_colors, env_nounset);
}
}
diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c
index 414803e9af3d..3938bd7822ea 100644
--- a/stand/i386/libi386/vidconsole.c
+++ b/stand/i386/libi386/vidconsole.c
@@ -956,26 +956,7 @@ cons_update_mode(bool use_gfx_mode)
a = teken_get_defattr(&gfx_state.tg_teken);
attr = *a;
- /*
- * On first run, we set up the vidc_set_colors()
- * callback. If the env is already set, we
- * pick up fg and bg color values from the environment.
- */
- ptr = getenv("teken.fg_color");
- if (ptr != NULL) {
- attr.ta_fgcolor = strtol(ptr, NULL, 10);
- ptr = getenv("teken.bg_color");
- attr.ta_bgcolor = strtol(ptr, NULL, 10);
-
- teken_set_defattr(&gfx_state.tg_teken, &attr);
- } else {
- snprintf(env, sizeof(env), "%d", attr.ta_fgcolor);
- env_setenv("teken.fg_color", EV_VOLATILE, env,
- vidc_set_colors, env_nounset);
- snprintf(env, sizeof(env), "%d", attr.ta_bgcolor);
- env_setenv("teken.bg_color", EV_VOLATILE, env,
- vidc_set_colors, env_nounset);
- }
+ gfx_fb_setcolors(&attr, vidc_set_colors, env_nounset);
/* Improve visibility */
if (attr.ta_bgcolor == TC_WHITE)
diff --git a/stand/libsa/environment.c b/stand/libsa/environment.c
index 95ee1718f8d4..d139249a8e84 100644
--- a/stand/libsa/environment.c
+++ b/stand/libsa/environment.c
@@ -66,6 +66,17 @@ env_setenv(const char *name, int flags, const void *value,
if ((ev = env_getenv(name)) != NULL) {
/*
+ * If the new value doesn't have NOKENV set, we'll drop the flag
+ * if it's set on the entry so that the override propagates
+ * correctly. We do this *before* sending it to the hook in
+ * case the hook declines to operate on it (e.g., because the
+ * value matches what was already set) -- we would still want
+ * the explicitly set value to propagate.
+ */
+ if (!(flags & EV_NOKENV))
+ ev->ev_flags &= ~EV_NOKENV;
+
+ /*
* If there's a set hook, let it do the work
* (unless we are working for one already).
*/
@@ -77,7 +88,6 @@ env_setenv(const char *name, int flags, const void *value,
free(ev->ev_value);
ev->ev_value = NULL;
ev->ev_flags &= ~EV_DYNAMIC;
-
} else {
/*
@@ -123,12 +133,13 @@ env_setenv(const char *name, int flags, const void *value,
/* If we have a new value, use it */
if (flags & EV_VOLATILE) {
ev->ev_value = strdup(value);
- ev->ev_flags |= EV_DYNAMIC;
+ flags |= EV_DYNAMIC;
} else {
ev->ev_value = (char *)value;
- ev->ev_flags |= flags & EV_DYNAMIC;
}
+ ev->ev_flags |= flags & (EV_DYNAMIC | EV_NOKENV);
+
return (0);
}
diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h
index 233d11ab3ecb..aaba0aa7fb39 100644
--- a/stand/libsa/stand.h
+++ b/stand/libsa/stand.h
@@ -352,6 +352,7 @@ extern int pager_file(const char *fname);
#define EV_DYNAMIC (1<<0) /* value was dynamically allocated, free if changed/unset */
#define EV_VOLATILE (1<<1) /* value is volatile, make a copy of it */
#define EV_NOHOOK (1<<2) /* don't call hook when setting */
+#define EV_NOKENV (1<<3) /* don't add to kenv (loader-only) */
struct env_var;
typedef char *(ev_format_t)(struct env_var *ev);
diff --git a/stand/libsa/ufs.c b/stand/libsa/ufs.c
index 86cd3be9a27a..868e8d47dbbd 100644
--- a/stand/libsa/ufs.c
+++ b/stand/libsa/ufs.c
@@ -891,6 +891,12 @@ ufs_readdir(struct open_file *f, struct dirent *d)
if (error)
return (error);
dp = (struct direct *)buf;
+ /*
+ * Check for corrupt directory entry and bail out rather
+ * than spin forever hoping that the user has other options.
+ */
+ if (dp->d_reclen == 0)
+ return (0);
fp->f_seekp += dp->d_reclen;
} while (dp->d_ino == (ino_t)0);
diff --git a/stand/libsa/ufsread.c b/stand/libsa/ufsread.c
index 0f9b9bb4e2fb..86ac8fbbbab7 100644
--- a/stand/libsa/ufsread.c
+++ b/stand/libsa/ufsread.c
@@ -108,6 +108,13 @@ fsfind(const char *name, ufs_ino_t * ino)
*ino = d.d_ino;
return d.d_type;
}
+ /*
+ * Check for corrupt directory entry and bail out
+ * rather than spin forever hoping that the user
+ * has other options.
+ */
+ if (d.d_reclen == 0)
+ return 0;
s += d.d_reclen;
}
if (n != -1 && ls)
diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c
index f51838ee00d7..927f3689e2b6 100644
--- a/sys/compat/linux/linux_netlink.c
+++ b/sys/compat/linux/linux_netlink.c
@@ -242,24 +242,9 @@ nlmsg_copy_nla(const struct nlattr *nla_orig, struct nl_writer *nw)
}
/*
- * Translate a FreeBSD interface name to a Linux interface name.
- */
-static bool
-nlmsg_translate_ifname_nla(struct nlattr *nla, struct nl_writer *nw)
-{
- char ifname[LINUX_IFNAMSIZ];
-
- if (ifname_bsd_to_linux_name((char *)(nla + 1), ifname,
- sizeof(ifname)) <= 0)
- return (false);
- return (nlattr_add_string(nw, IFLA_IFNAME, ifname));
-}
-
-#define LINUX_NLA_UNHANDLED -1
-/*
* Translate a FreeBSD attribute to a Linux attribute.
- * Returns LINUX_NLA_UNHANDLED when the attribute is not processed
- * and the caller must take care of it, otherwise the result is returned.
+ * Returns false when the attribute is not processed and the caller must take
+ * care of it.
*/
static int
nlmsg_translate_all_nla(struct nlmsghdr *hdr, struct nlattr *nla,
@@ -271,22 +256,27 @@ nlmsg_translate_all_nla(struct nlmsghdr *hdr, struct nlattr *nla,
case NL_RTM_DELLINK:
case NL_RTM_GETLINK:
switch (nla->nla_type) {
- case IFLA_IFNAME:
- return (nlmsg_translate_ifname_nla(nla, nw));
+ case IFLA_IFNAME: {
+ char ifname[LINUX_IFNAMSIZ];
+
+ if (ifname_bsd_to_linux_name((char *)(nla + 1), ifname,
+ sizeof(ifname)) > 0)
+ return (true);
+ break;
+ }
default:
break;
}
default:
break;
}
- return (LINUX_NLA_UNHANDLED);
+ return (false);
}
static bool
nlmsg_copy_all_nla(struct nlmsghdr *hdr, int raw_hdrlen, struct nl_writer *nw)
{
struct nlattr *nla;
- int ret;
int hdrlen = NETLINK_ALIGN(raw_hdrlen);
int attrs_len = hdr->nlmsg_len - sizeof(struct nlmsghdr) - hdrlen;
@@ -297,15 +287,12 @@ nlmsg_copy_all_nla(struct nlmsghdr *hdr, int raw_hdrlen, struct nl_writer *nw)
if (nla->nla_len < sizeof(struct nlattr)) {
return (false);
}
- ret = nlmsg_translate_all_nla(hdr, nla, nw);
- if (ret == LINUX_NLA_UNHANDLED)
- ret = nlmsg_copy_nla(nla, nw);
- if (!ret)
+ if (!nlmsg_translate_all_nla(hdr, nla, nw) &&
+ !nlmsg_copy_nla(nla, nw))
return (false);
}
return (true);
}
-#undef LINUX_NLA_UNHANDLED
static unsigned int
rtnl_if_flags_to_linux(unsigned int if_flags)
@@ -563,22 +550,15 @@ nlmsg_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_writer *nw)
}
}
-static bool
-nlmsgs_to_linux(struct nl_writer *nw, struct nlpcb *nlp)
+static struct nl_buf *
+nlmsgs_to_linux(struct nl_buf *orig, struct nlpcb *nlp)
{
- struct nl_buf *nb, *orig;
- u_int offset, msglen, orig_messages;
+ struct nl_writer nw;
+ u_int offset, msglen;
- RT_LOG(LOG_DEBUG3, "%p: in %u bytes %u messages", __func__,
- nw->buf->datalen, nw->num_messages);
-
- orig = nw->buf;
- nb = nl_buf_alloc(orig->datalen + SCRATCH_BUFFER_SIZE, M_NOWAIT);
- if (__predict_false(nb == NULL))
- return (false);
- nw->buf = nb;
- orig_messages = nw->num_messages;
- nw->num_messages = 0;
+ if (__predict_false(!nl_writer_unicast(&nw,
+ orig->datalen + SCRATCH_BUFFER_SIZE, nlp, false)))
+ return (NULL);
/* Assume correct headers. Buffer IS mutable */
for (offset = 0;
@@ -587,22 +567,18 @@ nlmsgs_to_linux(struct nl_writer *nw, struct nlpcb *nlp)
struct nlmsghdr *hdr = (struct nlmsghdr *)&orig->data[offset];
msglen = NLMSG_ALIGN(hdr->nlmsg_len);
- if (!nlmsg_to_linux(hdr, nlp, nw)) {
+ if (!nlmsg_to_linux(hdr, nlp, &nw)) {
RT_LOG(LOG_DEBUG, "failed to process msg type %d",
hdr->nlmsg_type);
- nl_buf_free(nb);
- nw->buf = orig;
- nw->num_messages = orig_messages;
- return (false);
+ nl_buf_free(nw.buf);
+ return (NULL);
}
}
- MPASS(nw->num_messages == orig_messages);
- MPASS(nw->buf == nb);
- nl_buf_free(orig);
- RT_LOG(LOG_DEBUG3, "%p: out %u bytes", __func__, offset);
+ RT_LOG(LOG_DEBUG3, "%p: in %u bytes %u messages", __func__,
+ nw.buf->datalen, nw.num_messages);
- return (true);
+ return (nw.buf);
}
static struct linux_netlink_provider linux_netlink_v1 = {
diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 3644ef80861b..b9161c586d07 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
@@ -133,9 +147,9 @@ enum ieee80211_rate_control_changed_flags {
enum wlan_ht_cap_sm_ps {
WLAN_HT_CAP_SM_PS_STATIC = 0,
- WLAN_HT_CAP_SM_PS_DYNAMIC,
- WLAN_HT_CAP_SM_PS_INVALID,
- WLAN_HT_CAP_SM_PS_DISABLED,
+ WLAN_HT_CAP_SM_PS_DYNAMIC = 1,
+ WLAN_HT_CAP_SM_PS_INVALID = 2,
+ WLAN_HT_CAP_SM_PS_DISABLED = 3
};
#define WLAN_MAX_KEY_LEN 32
diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index 18b34f0e90ec..239b4a5ae7b8 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>
@@ -56,8 +57,8 @@ extern int linuxkpi_debug_80211;
#endif
#define TODO(fmt, ...) if (linuxkpi_debug_80211 & D80211_TODO) \
printf("%s:%d: XXX LKPI80211 TODO " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
-#define IMPROVE(...) if (linuxkpi_debug_80211 & D80211_IMPROVE) \
- printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
+#define IMPROVE(fmt, ...) if (linuxkpi_debug_80211 & D80211_IMPROVE) \
+ printf("%s:%d: XXX LKPI80211 IMPROVE " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
enum rfkill_hard_block_reasons {
RFKILL_HARD_BLOCK_NOT_OWNER = BIT(0),
@@ -127,19 +128,24 @@ struct ieee80211_txrx_stypes {
uint16_t rx;
};
-/* XXX net80211 has an ieee80211_channel as well. */
+/*
+ * net80211 has an ieee80211_channel as well; we use the linuxkpi_ version
+ * interally in LinuxKPI and re-define ieee80211_channel for the drivers
+ * at the end of the file.
+ */
struct linuxkpi_ieee80211_channel {
- /* TODO FIXME */
- uint32_t hw_value; /* ic_ieee */
- uint32_t center_freq; /* ic_freq */
- enum ieee80211_channel_flags flags; /* ic_flags */
+ uint32_t center_freq;
+ uint16_t hw_value;
+ enum ieee80211_channel_flags flags;
enum nl80211_band band;
- int8_t max_power; /* ic_maxpower */
bool beacon_found;
- int max_antenna_gain, max_reg_power;
- int orig_flags;
- int dfs_cac_ms, dfs_state;
- int orig_mpwr;
+ enum nl80211_dfs_state dfs_state;
+ unsigned int dfs_cac_ms;
+ int max_antenna_gain;
+ int max_power;
+ int max_reg_power;
+ uint32_t orig_flags;
+ int orig_mpwr;
};
struct cfg80211_bitrate_mask {
@@ -722,8 +728,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)
@@ -1296,10 +1304,9 @@ reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
struct ieee80211_reg_rule *rule)
{
- /* ETSI has special rules. FreeBSD regdb needs to learn about them. */
- TODO();
+ IMPROVE("regdomain.xml needs to grow wmm information for at least ETSI");
- return (-ENXIO);
+ return (-ENODATA);
}
static __inline const u8 *
@@ -2065,6 +2072,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..19f7bcff29dc 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1135,7 +1135,7 @@ extern const struct cfg80211_ops linuxkpi_mac80211cfgops;
struct ieee80211_hw *linuxkpi_ieee80211_alloc_hw(size_t,
const struct ieee80211_ops *);
void linuxkpi_ieee80211_iffree(struct ieee80211_hw *);
-void linuxkpi_set_ieee80211_dev(struct ieee80211_hw *, char *);
+void linuxkpi_set_ieee80211_dev(struct ieee80211_hw *);
int linuxkpi_ieee80211_ifattach(struct ieee80211_hw *);
void linuxkpi_ieee80211_ifdetach(struct ieee80211_hw *);
void linuxkpi_ieee80211_unregister_hw(struct ieee80211_hw *);
@@ -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 *);
@@ -1255,7 +1255,7 @@ SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev)
{
set_wiphy_dev(hw->wiphy, dev);
- linuxkpi_set_ieee80211_dev(hw, dev_name(dev));
+ linuxkpi_set_ieee80211_dev(hw);
IMPROVE();
}
@@ -1741,12 +1741,15 @@ ieee80211_request_smps(struct ieee80211_vif *vif, u_int link_id,
"SMPS_STATIC",
"SMPS_DYNAMIC",
"SMPS_AUTOMATIC",
- "SMPS_NUM_MODES"
};
- if (linuxkpi_debug_80211 & D80211_TODO)
- printf("%s:%d: XXX LKPI80211 TODO smps %d %s\n",
- __func__, __LINE__, smps, smps_mode_name[smps]);
+ if (vif->type != NL80211_IFTYPE_STATION)
+ return;
+
+ if (smps >= nitems(smps_mode_name))
+ panic("%s: unsupported smps value: %d\n", __func__, smps);
+
+ IMPROVE("XXX LKPI80211 TODO smps %d %s\n", smps, smps_mode_name[smps]);
}
static __inline void
@@ -2161,8 +2164,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..500c1c1d52eb 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -274,48 +274,40 @@ lkpi_nl80211_sta_info_to_str(struct sbuf *s, const char *prefix,
sbuf_printf(s, "\n");
}
-static int
-lkpi_80211_dump_stas(SYSCTL_HANDLER_ARGS)
+static void
+lkpi_80211_dump_lvif_stas(struct lkpi_vif *lvif, struct sbuf *s)
{
struct lkpi_hw *lhw;
struct ieee80211_hw *hw;
struct ieee80211vap *vap;
- struct lkpi_vif *lvif;
struct ieee80211_vif *vif;
struct lkpi_sta *lsta;
struct ieee80211_sta *sta;
struct station_info sinfo;
- struct sbuf s;
int error;
- if (req->newptr)
- return (EPERM);
-
- lvif = (struct lkpi_vif *)arg1;
vif = LVIF_TO_VIF(lvif);
vap = LVIF_TO_VAP(lvif);
lhw = vap->iv_ic->ic_softc;
hw = LHW_TO_HW(lhw);
- sbuf_new_for_sysctl(&s, NULL, 1024, req);
-
wiphy_lock(hw->wiphy);
list_for_each_entry(lsta, &lvif->lsta_list, lsta_list) {
sta = LSTA_TO_STA(lsta);
- sbuf_putc(&s, '\n');
- sbuf_printf(&s, "lsta %p sta %p added_to_drv %d\n", lsta, sta, lsta->added_to_drv);
+ sbuf_putc(s, '\n');
+ sbuf_printf(s, "lsta %p sta %p added_to_drv %d\n", lsta, sta, lsta->added_to_drv);
memset(&sinfo, 0, sizeof(sinfo));
error = lkpi_80211_mo_sta_statistics(hw, vif, sta, &sinfo);
if (error == EEXIST) /* Not added to driver. */
continue;
if (error == ENOTSUPP) {
- sbuf_printf(&s, " sta_statistics not supported\n");
+ sbuf_printf(s, " sta_statistics not supported\n");
continue;
}
if (error != 0) {
- sbuf_printf(&s, " sta_statistics failed: %d\n", error);
+ sbuf_printf(s, " sta_statistics failed: %d\n", error);
continue;
}
@@ -325,51 +317,76 @@ lkpi_80211_dump_stas(SYSCTL_HANDLER_ARGS)
memcpy(&sinfo.rxrate, &lsta->sinfo.rxrate, sizeof(sinfo.rxrate));
sinfo.filled |= BIT_ULL(NL80211_STA_INFO_RX_BITRATE);
}
+ /* If no CHAIN_SIGNAL is reported, try to fill it in from the lsta sinfo. */
+ if ((sinfo.filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL)) == 0 &&
+ (lsta->sinfo.filled & BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL)) != 0) {
+ sinfo.chains = lsta->sinfo.chains;
+ memcpy(sinfo.chain_signal, lsta->sinfo.chain_signal,
+ sizeof(sinfo.chain_signal));
+ sinfo.filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL);
+ }
- lkpi_nl80211_sta_info_to_str(&s, " nl80211_sta_info (valid fields)", sinfo.filled);
- sbuf_printf(&s, " connected_time %u inactive_time %u\n",
+ lkpi_nl80211_sta_info_to_str(s, " nl80211_sta_info (valid fields)", sinfo.filled);
+ sbuf_printf(s, " connected_time %u inactive_time %u\n",
sinfo.connected_time, sinfo.inactive_time);
- sbuf_printf(&s, " rx_bytes %ju rx_packets %u rx_dropped_misc %u\n",
+ sbuf_printf(s, " rx_bytes %ju rx_packets %u rx_dropped_misc %u\n",
(uintmax_t)sinfo.rx_bytes, sinfo.rx_packets, sinfo.rx_dropped_misc);
- sbuf_printf(&s, " rx_duration %ju rx_beacon %u rx_beacon_signal_avg %d\n",
+ sbuf_printf(s, " rx_duration %ju rx_beacon %u rx_beacon_signal_avg %d\n",
(uintmax_t)sinfo.rx_duration, sinfo.rx_beacon, (int8_t)sinfo.rx_beacon_signal_avg);
- sbuf_printf(&s, " tx_bytes %ju tx_packets %u tx_failed %u\n",
+ sbuf_printf(s, " tx_bytes %ju tx_packets %u tx_failed %u\n",
(uintmax_t)sinfo.tx_bytes, sinfo.tx_packets, sinfo.tx_failed);
- sbuf_printf(&s, " tx_duration %ju tx_retries %u\n",
+ sbuf_printf(s, " tx_duration %ju tx_retries %u\n",
(uintmax_t)sinfo.tx_duration, sinfo.tx_retries);
- sbuf_printf(&s, " signal %d signal_avg %d ack_signal %d avg_ack_signal %d\n",
+ sbuf_printf(s, " signal %d signal_avg %d ack_signal %d avg_ack_signal %d\n",
sinfo.signal, sinfo.signal_avg, sinfo.ack_signal, sinfo.avg_ack_signal);
-
- sbuf_printf(&s, " generation %d assoc_req_ies_len %zu chains %d\n",
+ sbuf_printf(s, " generation %d assoc_req_ies_len %zu chains %#04x\n",
sinfo.generation, sinfo.assoc_req_ies_len, sinfo.chains);
- for (int i = 0; i < sinfo.chains && i < IEEE80211_MAX_CHAINS; i++) {
- sbuf_printf(&s, " chain[%d] signal %d signal_avg %d\n",
+ for (int i = 0; i < nitems(sinfo.chain_signal) && i < IEEE80211_MAX_CHAINS; i++) {
+ if (!(sinfo.chains & BIT(i)))
+ continue;
+ sbuf_printf(s, " chain[%d] signal %d signal_avg %d\n",
i, (int8_t)sinfo.chain_signal[i], (int8_t)sinfo.chain_signal_avg[i]);
}
/* assoc_req_ies, bss_param, sta_flags */
- sbuf_printf(&s, " rxrate: flags %b bw %u(%s) legacy %u kbit/s mcs %u nss %u\n",
+ sbuf_printf(s, " rxrate: flags %b bw %u(%s) legacy %u kbit/s mcs %u nss %u\n",
sinfo.rxrate.flags, CFG80211_RATE_INFO_FLAGS_BITS,
sinfo.rxrate.bw, lkpi_rate_info_bw_to_str(sinfo.rxrate.bw),
sinfo.rxrate.legacy * 100,
sinfo.rxrate.mcs, sinfo.rxrate.nss);
- sbuf_printf(&s, " he_dcm %u he_gi %u he_ru_alloc %u eht_gi %u\n",
+ sbuf_printf(s, " he_dcm %u he_gi %u he_ru_alloc %u eht_gi %u\n",
sinfo.rxrate.he_dcm, sinfo.rxrate.he_gi, sinfo.rxrate.he_ru_alloc,
sinfo.rxrate.eht_gi);
- sbuf_printf(&s, " txrate: flags %b bw %u(%s) legacy %u kbit/s mcs %u nss %u\n",
+ sbuf_printf(s, " txrate: flags %b bw %u(%s) legacy %u kbit/s mcs %u nss %u\n",
sinfo.txrate.flags, CFG80211_RATE_INFO_FLAGS_BITS,
sinfo.txrate.bw, lkpi_rate_info_bw_to_str(sinfo.txrate.bw),
sinfo.txrate.legacy * 100,
sinfo.txrate.mcs, sinfo.txrate.nss);
- sbuf_printf(&s, " he_dcm %u he_gi %u he_ru_alloc %u eht_gi %u\n",
+ sbuf_printf(s, " he_dcm %u he_gi %u he_ru_alloc %u eht_gi %u\n",
sinfo.txrate.he_dcm, sinfo.txrate.he_gi, sinfo.txrate.he_ru_alloc,
sinfo.txrate.eht_gi);
}
wiphy_unlock(hw->wiphy);
+}
+
+static int
+lkpi_80211_dump_stas(SYSCTL_HANDLER_ARGS)
+{
+ struct lkpi_vif *lvif;
+ struct sbuf s;
+
+ if (req->newptr)
+ return (EPERM);
+
+ lvif = (struct lkpi_vif *)arg1;
+
+ sbuf_new_for_sysctl(&s, NULL, 1024, req);
+
+ lkpi_80211_dump_lvif_stas(lvif, &s);
sbuf_finish(&s);
sbuf_delete(&s);
@@ -3826,8 +3843,10 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
IMPROVE();
+ wiphy_lock(hw->wiphy);
error = lkpi_80211_mo_start(hw);
if (error != 0) {
+ wiphy_unlock(hw->wiphy);
ic_printf(ic, "%s: failed to start hw: %d\n", __func__, error);
mtx_destroy(&lvif->mtx);
free(lvif, M_80211_VAP);
@@ -3837,11 +3856,13 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
error = lkpi_80211_mo_add_interface(hw, vif);
if (error != 0) {
IMPROVE(); /* XXX-BZ mo_stop()? */
+ wiphy_unlock(hw->wiphy);
ic_printf(ic, "%s: failed to add interface: %d\n", __func__, error);
mtx_destroy(&lvif->mtx);
free(lvif, M_80211_VAP);
return (NULL);
}
+ wiphy_unlock(hw->wiphy);
LKPI_80211_LHW_LVIF_LOCK(lhw);
TAILQ_INSERT_TAIL(&lhw->lvif_head, lvif, lvif_entry);
@@ -3873,10 +3894,12 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
/* Force MC init. */
lkpi_update_mcast_filter(ic, true);
- IMPROVE();
-
ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid);
+ /* Now we have a valid vap->iv_ifp. Any checksum offloading goes below. */
+
+ IMPROVE();
+
/* Override with LinuxKPI method so we can drive mac80211/cfg80211. */
lvif->iv_newstate = vap->iv_newstate;
vap->iv_newstate = lkpi_iv_newstate;
@@ -5571,6 +5594,12 @@ lkpi_ic_ampdu_rx_start(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap
return (-ENXIO);
}
+ if (lsta->state != IEEE80211_STA_AUTHORIZED) {
+ ic_printf(ic, "%s: lsta %p ni %p vap %p, sta %p state %d not AUTHORIZED\n",
+ __func__, lsta, ni, vap, sta, lsta->state);
+ return (-ENXIO);
+ }
+
params.sta = sta;
params.action = IEEE80211_AMPDU_RX_START;
params.buf_size = _IEEE80211_MASKSHIFT(le16toh(baparamset), IEEE80211_BAPS_BUFSIZ);
@@ -5647,13 +5676,35 @@ lkpi_ic_ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap)
lvif = VAP_TO_LVIF(vap);
vif = LVIF_TO_VIF(lvif);
lsta = ni->ni_drv_data;
+ if (lsta == NULL) {
+ ic_printf(ic, "%s: lsta %p ni %p vap %p, lsta is NULL\n",
+ __func__, lsta, ni, vap);
+ goto net80211_only;
+ }
sta = LSTA_TO_STA(lsta);
+ if (!lsta->added_to_drv) {
+ ic_printf(ic, "%s: lsta %p ni %p vap %p, sta %p not added to firmware\n",
+ __func__, lsta, ni, vap, sta);
+ goto net80211_only;
+ }
+
+ if (lsta->state != IEEE80211_STA_AUTHORIZED) {
+ ic_printf(ic, "%s: lsta %p ni %p vap %p, sta %p state %d not AUTHORIZED\n",
+ __func__, lsta, ni, vap, sta, lsta->state);
+ goto net80211_only;
+ }
+
IMPROVE_HT("This really should be passed from ht_recv_action_ba_delba.");
for (tid = 0; tid < WME_NUM_TID; tid++) {
if (&ni->ni_rx_ampdu[tid] == rap)
break;
}
+ if (tid == WME_NUM_TID) {
+ ic_printf(ic, "%s: lsta %p ni %p vap %p, sta %p TID not found\n",
+ __func__, lsta, ni, vap, sta);
+ goto net80211_only;
+ }
params.sta = sta;
params.action = IEEE80211_AMPDU_RX_STOP;
@@ -6014,17 +6065,30 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw)
}
void
-linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw, char *name)
+linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw)
{
struct lkpi_hw *lhw;
struct ieee80211com *ic;
+ struct device *dev;
lhw = HW_TO_LHW(hw);
ic = lhw->ic;
- /* Now set a proper name before ieee80211_ifattach(). */
+ /* Save the backpointer from net80211 to LinuxKPI. */
ic->ic_softc = lhw;
- ic->ic_name = name;
+
+ /*
+ * Set a proper name before ieee80211_ifattach() if dev is set.
+ * ath1xk also unset the dev so we need to check.
+ */
+ dev = wiphy_dev(hw->wiphy);
+ if (dev != NULL) {
+ ic->ic_name = dev_name(dev);
+ } else {
+ TODO("adjust arguments to still have the old dev or go through "
+ "the hoops of getting the bsddev from hw and detach; "
+ "or do in XXX; check ath1kx drivers");
+ }
/* XXX-BZ do we also need to set wiphy name? */
}
@@ -6332,8 +6396,10 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
hw->wiphy->max_scan_ie_len -= lhw->scan_ie_len;
}
- if (bootverbose)
+ if (bootverbose) {
+ ic_printf(ic, "netdev_features %b\n", hw->netdev_features, NETIF_F_BITS);
ieee80211_announce(ic);
+ }
return (0);
err:
@@ -6832,9 +6898,17 @@ lkpi_convert_rx_status(struct ieee80211_hw *hw, struct lkpi_sta *lsta,
rx_stats->c_pktflags |= IEEE80211_RX_F_FAIL_FCSCRC;
#endif
+ /* Fill in some sinfo bits to fill gaps not reported byt the driver. */
if (lsta != NULL) {
memcpy(&lsta->sinfo.rxrate, &rxrate, sizeof(rxrate));
lsta->sinfo.filled |= BIT_ULL(NL80211_STA_INFO_RX_BITRATE);
+
+ if (rx_status->chains != 0) {
+ lsta->sinfo.chains = rx_status->chains;
+ memcpy(lsta->sinfo.chain_signal, rx_status->chain_signal,
+ sizeof(lsta->sinfo.chain_signal));
+ lsta->sinfo.filled |= BIT_ULL(NL80211_STA_INFO_CHAIN_SIGNAL);
+ }
}
}
@@ -7668,8 +7742,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/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
index 78b2120f2d8c..1046b753574f 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
@@ -53,6 +53,8 @@ lkpi_80211_mo_start(struct ieee80211_hw *hw)
struct lkpi_hw *lhw;
int error;
+ lockdep_assert_wiphy(hw->wiphy);
+
lhw = HW_TO_LHW(hw);
if (lhw->ops->start == NULL) {
error = EOPNOTSUPP;
diff --git a/sys/conf/files b/sys/conf/files
index 8bb14bd3d953..d89813c70355 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -3451,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 9b6ba03b78df..c12ab9db030a 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -13,14 +13,14 @@ include "conf/files.x86"
#
elf-vdso.so.o standard \
dependency "$S/amd64/amd64/sigtramp.S assym.inc $S/conf/vdso_amd64.ldscript $S/tools/amd64_vdso.sh" \
- compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \
+ compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \
no-ctfconvert \
no-implicit-rule before-depend \
clean "elf-vdso.so.o elf-vdso.so.1 vdso_offsets.h sigtramp.pico"
#
elf-vdso32.so.o optional compat_freebsd32 \
dependency "$S/amd64/ia32/ia32_sigtramp.S ia32_assym.h $S/conf/vdso_amd64_ia32.ldscript $S/tools/amd64_ia32_vdso.sh" \
- compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \
+ compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \
no-ctfconvert \
no-implicit-rule before-depend \
clean "elf-vdso32.so.o elf-vdso32.so.1 vdso_ia32_offsets.h ia32_sigtramp.pico"
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/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 bb3d08e88e21..4009ba2b4843 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -235,11 +235,6 @@ TCP_REQUEST_TRK opt_global.h
TCP_ACCOUNTING opt_global.h
TCP_BBR opt_inet.h
TCP_RACK opt_inet.h
-#
-# TCP SaD Detection is an experimental Sack attack Detection (SaD)
-# algorithm that uses "normal" behaviour with SACK's to detect
-# a possible attack. It is strictly experimental at this point.
-#
TURNSTILE_PROFILING
UMTX_PROFILING
UMTX_CHAINS opt_global.h
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 435540b254f1..4e3cf4f2f41c 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,11 +1,29 @@
----------------------------------------
+7 August 2025. Summary of changes for version 20250807:
+
+Major changes:
+
+Added option to skip the global lock for SMM - Huacai Chen
+
+Fixed non-NUL terminated string implementations - Ahmed Salem
+
+Fixed CCEL and CDAT templates - Ahmed Salem
+
+Fixed a major Linux kernel bug (UAF) that was triggered by unequal number of method parameters (definition) vs arguments (invocation) in different places - Peter Williams, Hans de Goede, Rafael Wysocki
+
+Define distinct D3 states (D3Hot and D3Cold) that help clarify the device behavior support - Aymeric Wibo
+
+A few cleanups, improvements to existing table supports, small fixes, spelling corrections etc.
+
+
+----------------------------------------
4 April 2025. Summary of changes for version 20250404:
Major changes:
Update all the copyright continuation year to 2025 in the license header of all files
-Add complete support for 3 new ACPI tables ? MRRM,ERDT and RIMT (Tony Luck & V L Sunil)
+Add complete support for 3 new ACPI tables - MRRM,ERDT and RIMT (Tony Luck & V L Sunil)
Add a license file to the project which is a great improvement (Dionna Glaze)
@@ -21,11 +39,11 @@ Major changes:
Fix 2 critical CVE addressing memory leaks - Seunghun Han
-EINJ V2 updates ? Zaid Alali (Ampere Computing)
+EINJ V2 updates - Zaid Alali (Ampere Computing)
-CDAT updates ? Ira Weiny (Intel Corporation)
+CDAT updates - Ira Weiny (Intel Corporation)
-Fix mutex handling, don?t release ones that were never acquired ? Daniil Tatianin
+Fix mutex handling, do not release ones that were never acquired - Daniil Tatianin
Experiment with new tag name format Ryyyy_mm_dd to solve chronological sorting problems
@@ -39,7 +57,7 @@ Fix the acpixf.h file which caused issues for the last release (before this) 202
Fix the pointer offset for the SLIC table
-Verify the local environment and GitHub commits are all in sync which was a problem with the second from last release (before this)20240322 (aka 20240323 – date issue)
+Verify the local environment and GitHub commits are all in sync which was a problem with the second from last release (before this)20240322 (aka 20240323 - date issue)
diff --git a/sys/contrib/dev/acpica/common/adisasm.c b/sys/contrib/dev/acpica/common/adisasm.c
index 96cd6c7f5d3c..83125098cbd1 100644
--- a/sys/contrib/dev/acpica/common/adisasm.c
+++ b/sys/contrib/dev/acpica/common/adisasm.c
@@ -481,12 +481,12 @@ AdDisassembleOneTable (
"FieldName : FieldValue (in hex)\n */\n\n");
AcpiDmDumpDataTable (Table);
- fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n",
+ fprintf (stdout, "Acpi Data Table [%4.4s] decoded\n",
AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature);
if (File)
{
- fprintf (stderr, "Formatted output: %s - %u bytes\n",
+ fprintf (stdout, "Formatted output: %s - %u bytes\n",
DisasmFilename, CmGetFileSize (File));
}
@@ -584,16 +584,16 @@ AdDisassembleOneTable (
AcpiDmDumpDataTable (Table);
- fprintf (stderr, "Disassembly completed\n");
+ fprintf (stdout, "Disassembly completed\n");
if (File)
{
- fprintf (stderr, "ASL Output: %s - %u bytes\n",
+ fprintf (stdout, "ASL Output: %s - %u bytes\n",
DisasmFilename, CmGetFileSize (File));
}
if (AslGbl_MapfileFlag)
{
- fprintf (stderr, "%14s %s - %u bytes\n",
+ fprintf (stdout, "%14s %s - %u bytes\n",
AslGbl_FileDescs[ASL_FILE_MAP_OUTPUT].ShortDescription,
AslGbl_Files[ASL_FILE_MAP_OUTPUT].Filename,
FlGetFileSize (ASL_FILE_MAP_OUTPUT));
@@ -630,7 +630,7 @@ AdReparseOneTable (
ACPI_COMMENT_ADDR_NODE *AddrListHead;
- fprintf (stderr,
+ fprintf (stdout,
"\nFound %u external control methods, "
"reparsing with new information\n",
AcpiDmGetUnresolvedExternalMethodCount ());
diff --git a/sys/contrib/dev/acpica/common/ahtable.c b/sys/contrib/dev/acpica/common/ahtable.c
index 898b2d09f609..587bf61016f0 100644
--- a/sys/contrib/dev/acpica/common/ahtable.c
+++ b/sys/contrib/dev/acpica/common/ahtable.c
@@ -265,6 +265,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] =
{ACPI_SIG_SSDT, "Secondary System Description Table (AML table)"},
{ACPI_SIG_STAO, "Status Override Table"},
{ACPI_SIG_SVKL, "Storage Volume Key Location Table"},
+ {ACPI_SIG_SWFT, "SoundWire File Table"},
{ACPI_SIG_TCPA, "Trusted Computing Platform Alliance Table"},
{ACPI_SIG_TDEL, "TD-Event Log Table"},
{ACPI_SIG_TPM2, "Trusted Platform Module hardware interface Table"},
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index fcff97a304ae..702f4f7965e4 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -721,6 +721,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
{ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
{ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
+ {ACPI_SIG_SWFT, NULL, NULL, NULL, NULL},
{ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
{ACPI_SIG_TDEL, AcpiDmTableInfoTdel, NULL, NULL, TemplateTdel},
{ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
diff --git a/sys/contrib/dev/acpica/common/dmtbdump2.c b/sys/contrib/dev/acpica/common/dmtbdump2.c
index 822920d2ea94..d29a60be0f67 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump2.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump2.c
@@ -2637,7 +2637,7 @@ AcpiDmDumpRhct (
RhctIsaString, RhctIsaString->IsaLength, AcpiDmTableInfoRhctIsa1);
if (Subtable->Length > IsaPadOffset)
{
- Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
+ Status = AcpiDmDumpTable (Table->Length, Offset + IsaPadOffset,
ACPI_ADD_PTR (UINT8, Subtable, IsaPadOffset),
(Subtable->Length - IsaPadOffset), AcpiDmTableInfoRhctIsaPad);
}
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo2.c b/sys/contrib/dev/acpica/common/dmtbinfo2.c
index 9ecf877fcfb0..b7c6d3b8d536 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo2.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo2.c
@@ -2180,7 +2180,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoRhct[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoRhctNodeHdr[] =
{
{ACPI_DMT_RHCT, ACPI_RHCTH_OFFSET (Type), "Subtable Type", 0},
- {ACPI_DMT_UINT16, ACPI_RHCTH_OFFSET (Length), "Length", 0},
+ {ACPI_DMT_UINT16, ACPI_RHCTH_OFFSET (Length), "Length", DT_LENGTH},
{ACPI_DMT_UINT16, ACPI_RHCTH_OFFSET (Revision), "Revision", 0},
ACPI_DMT_TERMINATOR
};
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo3.c b/sys/contrib/dev/acpica/common/dmtbinfo3.c
index 75b580e0d890..0935fc86aff9 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo3.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo3.c
@@ -200,7 +200,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[] =
{
{ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCType), "CC Type", 0},
{ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCSubType), "CC Sub Type", 0},
- {ACPI_DMT_UINT32, ACPI_CCEL_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_CCEL_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaMinimumLength), "Log Area Minimum Length", 0},
{ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaStartAddress), "Log Area Start Address", 0},
ACPI_DMT_TERMINATOR
diff --git a/sys/contrib/dev/acpica/compiler/aslanalyze.c b/sys/contrib/dev/acpica/compiler/aslanalyze.c
index 17e2674817a9..625611a630de 100644
--- a/sys/contrib/dev/acpica/compiler/aslanalyze.c
+++ b/sys/contrib/dev/acpica/compiler/aslanalyze.c
@@ -572,10 +572,22 @@ ApCheckForGpeNameConflict (
ACPI_PARSE_OBJECT *NextOp;
UINT32 GpeNumber;
char Name[ACPI_NAMESEG_SIZE + 1];
- char Target[ACPI_NAMESEG_SIZE];
+ char Target[ACPI_NAMESEG_SIZE] ACPI_NONSTRING;
- /* Need a null-terminated string version of NameSeg */
+ /**
+ * Need a null-terminated string version of NameSeg
+ *
+ * NOTE: during a review on Name[ACPI_NAMESEG_SIZE + 1] having an extra
+ * byte[1], compiler testing exhibited a difference in behavior between
+ * GCC and Clang[2] (at least; MSVC may also exhibit the same) in
+ * how optimization is done. The extra byte is needed to ensure
+ * the signature does not get mangled, subsequently avoiding
+ * GpeNumber being a completely different return value from strtoul.
+ *
+ * [1] https://github.com/acpica/acpica/pull/1019#discussion_r2058687704
+ * [2] https://github.com/acpica/acpica/pull/1019#discussion_r2061953039
+ */
ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
Name[ACPI_NAMESEG_SIZE] = 0;
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2s.c b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
index 096862290384..f47402d4e025 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2s.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
@@ -1469,7 +1469,7 @@ RsDoCsi2SerialBusDescriptor (
case 2: /* Local Port Instance [Integer] (_PRT) */
- RsSetFlagBits16 ((UINT16 *) &Descriptor->Csi2SerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
+ RsSetFlagBits16 ((UINT16 *) &Descriptor->Csi2SerialBus.TypeSpecificFlags, InitializerOp, 2, 0);
RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_LOCALPORT,
CurrentByteOffset + ASL_RESDESC_OFFSET (Csi2SerialBus.TypeSpecificFlags), 2, 6);
break;
diff --git a/sys/contrib/dev/acpica/compiler/dttable2.c b/sys/contrib/dev/acpica/compiler/dttable2.c
index 6203a382ad62..754880346299 100644
--- a/sys/contrib/dev/acpica/compiler/dttable2.c
+++ b/sys/contrib/dev/acpica/compiler/dttable2.c
@@ -1929,24 +1929,30 @@ DtCompileRhct (
{
ACPI_STATUS Status;
ACPI_RHCT_NODE_HEADER *RhctHeader;
- ACPI_RHCT_HART_INFO *RhctHartInfo = NULL;
+ ACPI_RHCT_HART_INFO *RhctHartInfo;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
ACPI_DMTABLE_INFO *InfoTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
DT_FIELD *SubtableStart;
+ ACPI_TABLE_RHCT *Table;
+ BOOLEAN FirstNode = TRUE;
/* Compile the main table */
+ ParentTable = DtPeekSubtable ();
Status = DtCompileTable (PFieldList, AcpiDmTableInfoRhct,
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
+ DtInsertSubtable (ParentTable, Subtable);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_RHCT, ParentTable->Buffer);
+ Table->NodeCount = 0;
+ Table->NodeOffset = sizeof (ACPI_TABLE_RHCT);
- ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
SubtableStart = *PFieldList;
@@ -1961,7 +1967,10 @@ DtCompileRhct (
}
DtInsertSubtable (ParentTable, Subtable);
RhctHeader = ACPI_CAST_PTR (ACPI_RHCT_NODE_HEADER, Subtable->Buffer);
- RhctHeader->Length = (UINT16)(Subtable->Length);
+
+ DtPushSubtable (Subtable);
+ ParentTable = DtPeekSubtable ();
+ Table->NodeCount++;
switch (RhctHeader->Type)
{
@@ -1999,37 +2008,54 @@ DtCompileRhct (
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
- RhctHeader->Length += (UINT16)(Subtable->Length);
+ if (FirstNode)
+ {
+ Table->NodeOffset = ACPI_PTR_DIFF(ParentTable->Buffer, Table);
+ FirstNode = FALSE;
+ }
/* Compile RHCT subtable additionals */
switch (RhctHeader->Type)
{
- case ACPI_RHCT_NODE_TYPE_HART_INFO:
+ case ACPI_RHCT_NODE_TYPE_ISA_STRING:
- RhctHartInfo = ACPI_SUB_PTR (ACPI_RHCT_HART_INFO,
- Subtable->Buffer, sizeof (ACPI_RHCT_NODE_HEADER));
- if (RhctHartInfo)
+ /*
+ * Padding - Variable-length data
+ * Optionally allows the padding of the ISA string to be used
+ * for filling this field.
+ */
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoRhctIsaPad,
+ &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ if (Subtable)
{
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+ break;
- RhctHartInfo->NumOffsets = 0;
- while (*PFieldList)
- {
- Status = DtCompileTable (PFieldList,
- AcpiDmTableInfoRhctHartInfo2, &Subtable);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- if (!Subtable)
- {
- break;
- }
+ case ACPI_RHCT_NODE_TYPE_HART_INFO:
- DtInsertSubtable (ParentTable, Subtable);
- RhctHeader->Length += (UINT16)(Subtable->Length);
- RhctHartInfo->NumOffsets++;
+ RhctHartInfo = ACPI_CAST_PTR (ACPI_RHCT_HART_INFO,
+ Subtable->Buffer);
+ RhctHartInfo->NumOffsets = 0;
+ while (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList,
+ AcpiDmTableInfoRhctHartInfo2, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
}
+ if (!Subtable)
+ {
+ break;
+ }
+ DtInsertSubtable (ParentTable, Subtable);
+ RhctHartInfo->NumOffsets++;
}
break;
@@ -2037,6 +2063,9 @@ DtCompileRhct (
break;
}
+
+ DtPopSubtable ();
+ ParentTable = DtPeekSubtable ();
}
return (AE_OK);
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.c b/sys/contrib/dev/acpica/compiler/dttemplate.c
index 67b13bb82d1b..d7140712d4e6 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.c
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.c
@@ -255,7 +255,7 @@ DtCreateTemplates (
if (AcpiGbl_Optind < 3)
{
- fprintf (stderr, "Creating default template: [DSDT]\n");
+ fprintf (stdout, "Creating default template: [DSDT]\n");
Status = DtCreateOneTemplateFile (ACPI_SIG_DSDT, 0);
goto Exit;
}
@@ -411,7 +411,7 @@ DtCreateAllTemplates (
ACPI_STATUS Status;
- fprintf (stderr, "Creating all supported Template files\n");
+ fprintf (stdout, "Creating all supported Template files\n");
/* Walk entire ACPI table data structure */
@@ -421,8 +421,13 @@ DtCreateAllTemplates (
if (TableData->Template)
{
- Status = DtCreateOneTemplate (TableData->Signature,
- 0, TableData);
+ if (ACPI_COMPARE_NAMESEG (TableData->Signature, ACPI_SIG_CDAT))
+ /* Special handling of CDAT */
+ Status = DtCreateOneTemplate (TableData->Signature,
+ 0, NULL);
+ else
+ Status = DtCreateOneTemplate (TableData->Signature,
+ 0, TableData);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -563,7 +568,7 @@ DtCreateOneTemplate (
}
else
{
- /* Special ACPI tables - DSDT, SSDT, OSDT, FACS, RSDP */
+ /* Special ACPI tables - DSDT, SSDT, OSDT, FACS, RSDP, CDAT */
AcpiOsPrintf (" (AML byte code table)\n");
AcpiOsPrintf (" */\n");
@@ -621,6 +626,11 @@ DtCreateOneTemplate (
AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
TemplateRsdp));
}
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_CDAT))
+ {
+ AcpiDmDumpCdat (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+ TemplateCdat));
+ }
else
{
fprintf (stderr,
@@ -632,14 +642,14 @@ DtCreateOneTemplate (
if (TableCount == 0)
{
- fprintf (stderr,
+ fprintf (stdout,
"Created ACPI table template for [%4.4s], "
"written to \"%s\"\n",
Signature, DisasmFilename);
}
else
{
- fprintf (stderr,
+ fprintf (stdout,
"Created ACPI table templates for [%4.4s] "
"and %u [SSDT] in same file, written to \"%s\"\n",
Signature, TableCount, DisasmFilename);
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.h b/sys/contrib/dev/acpica/compiler/dttemplate.h
index 0fdd90f73a23..51a34be5c36b 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.h
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.h
@@ -389,7 +389,7 @@ const unsigned char TemplateBoot[] =
const unsigned char TemplateCcel[] =
{
0x43,0x43,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "CCEL8..." */
- 0x04,0x1C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x04,0x2E,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x30,0x09,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "0.! ...." */
@@ -1951,25 +1951,25 @@ const unsigned char TemplateRgrt[] =
const unsigned char TemplateRhct[] =
{
- 0x52,0x48,0x43,0x54,0x96,0x00,0x00,0x00, /* 00000000 "RHCT|..." */
- 0x01,0x24,0x4F,0x45,0x4D,0x43,0x41,0x00, /* 00000008 "..OEMCA." */
+ 0x52,0x48,0x43,0x54,0x96,0x00,0x00,0x00, /* 00000000 "RHCT...." */
+ 0x01,0x6D,0x4F,0x45,0x4D,0x43,0x41,0x00, /* 00000008 ".mOEMCA." */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x28,0x09,0x22,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x04,0x04,0x25,0x20,0x00,0x00,0x00,0x00, /* 00000020 "..% ...." */
0x80,0x96,0x98,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x02,0x00,0x00,0x00,0x38,0x00,0x00,0x00, /* 00000030 "....8..." */
- 0x00,0x00,0x34,0x00,0x01,0x00,0x2B,0x00, /* 00000038 "..4...*." */
+ 0x04,0x00,0x00,0x00,0x38,0x00,0x00,0x00, /* 00000030 "....8..." */
+ 0x00,0x00,0x34,0x00,0x01,0x00,0x2B,0x00, /* 00000038 "..4...+." */
0x72,0x76,0x36,0x34,0x69,0x6D,0x61,0x66, /* 00000040 "rv64imaf" */
0x64,0x63,0x68,0x5F,0x7A,0x69,0x63,0x73, /* 00000048 "dch_zics" */
0x72,0x5F,0x7A,0x69,0x66,0x65,0x6E,0x63, /* 00000050 "r_zifenc" */
0x65,0x69,0x5F,0x7A,0x62,0x61,0x5F,0x7A, /* 00000058 "ei_zba_z" */
0x62,0x62,0x5F,0x7A,0x62,0x63,0x5F,0x7A, /* 00000060 "bb_zbc_z" */
- 0x62,0x73,0x00,0x00,0xFF,0xFF,0x18,0x00, /* 00000068 "bs......" */
- 0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00, /* 00000070 "........" */
- 0x38,0x00,0x00,0x00,0x7c,0x00,0x00,0x00, /* 00000078 "........" */
- 0x8E,0x00,0x00,0x00,0x01,0x00,0x0A,0x00, /* 00000080 "........" */
- 0x01,0x00,0x00,0x06,0x06,0x06,0x02,0x00, /* 00000088 "........" */
- 0x08,0x00,0x01,0x00,0x00,0x02 /* 00000090 "........" */
+ 0x62,0x73,0x00,0x00,0x01,0x00,0x0A,0x00, /* 00000068 "bs......" */
+ 0x01,0x00,0x00,0x06,0x06,0x06,0x02,0x00, /* 00000070 "........" */
+ 0x08,0x00,0x01,0x00,0x00,0x02,0xFF,0xFF, /* 00000078 "........" */
+ 0x18,0x00,0x01,0x00,0x03,0x00,0x00,0x00, /* 00000080 "........" */
+ 0x00,0x00,0x3B,0x00,0x00,0x00,0x6C,0x00, /* 00000088 "..;...l." */
+ 0x00,0x00,0x76,0x00,0x00,0x00 /* 00000090 "..v..." */
};
const unsigned char TemplateRimt[] =
diff --git a/sys/contrib/dev/acpica/compiler/dtutils.c b/sys/contrib/dev/acpica/compiler/dtutils.c
index f2463f74b8fc..18ea18cefdd6 100644
--- a/sys/contrib/dev/acpica/compiler/dtutils.c
+++ b/sys/contrib/dev/acpica/compiler/dtutils.c
@@ -623,6 +623,7 @@ DtGetFieldLength (
case ACPI_DMT_NFIT:
case ACPI_DMT_PCI_PATH:
case ACPI_DMT_PHAT:
+ case ACPI_DMT_RHCT:
ByteLength = 2;
break;
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
index dd8cf4889885..551cf8178d94 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
@@ -778,7 +778,7 @@ AcpiDmCsi2SerialBusDescriptor (
AcpiOsPrintf (" 0x%2.2X, 0x%2.2X,\n",
Resource->Csi2SerialBus.TypeSpecificFlags & 0x03,
- Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC);
+ (Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC) >> 2);
/* ResourceSource is a required field */
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
index 8b6efc070b1b..becdb95f8b83 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
@@ -646,8 +646,6 @@ AcpiDsCallControlMethod (
ACPI_WALK_STATE *NextWalkState = NULL;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_EVALUATE_INFO *Info;
- UINT32 i;
-
ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);
@@ -670,6 +668,23 @@ AcpiDsCallControlMethod (
return_ACPI_STATUS (AE_NULL_OBJECT);
}
+ if (ThisWalkState->NumOperands < ObjDesc->Method.ParamCount)
+ {
+ ACPI_ERROR ((AE_INFO, "Missing argument(s) for method [%4.4s]",
+ AcpiUtGetNodeName (MethodNode)));
+
+ return_ACPI_STATUS (AE_AML_TOO_FEW_ARGUMENTS);
+ }
+
+ else if (ThisWalkState->NumOperands > ObjDesc->Method.ParamCount)
+ {
+ ACPI_ERROR ((AE_INFO, "Too many arguments for method [%4.4s]",
+ AcpiUtGetNodeName (MethodNode)));
+
+ return_ACPI_STATUS (AE_AML_TOO_MANY_ARGUMENTS);
+ }
+
+
/* Init for new method, possibly wait on method mutex */
Status = AcpiDsBeginMethodExecution (
@@ -726,15 +741,7 @@ AcpiDsCallControlMethod (
* Delete the operands on the previous walkstate operand stack
* (they were copied to new objects)
*/
- for (i = 0; i < ObjDesc->Method.ParamCount; i++)
- {
- AcpiUtRemoveReference (ThisWalkState->Operands [i]);
- ThisWalkState->Operands [i] = NULL;
- }
-
- /* Clear the operand stack */
-
- ThisWalkState->NumOperands = 0;
+ AcpiDsClearOperands (ThisWalkState);
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
index 42e1aa505d02..2c45e8c91f57 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
@@ -357,6 +357,7 @@ AcpiDsMethodDataInitArgs (
Index++;
}
+ AcpiExTraceArgs(Params, Index);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%u args passed to method\n", Index));
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/components/events/evglock.c b/sys/contrib/dev/acpica/components/events/evglock.c
index 872e7b499a8f..395ca14fb315 100644
--- a/sys/contrib/dev/acpica/components/events/evglock.c
+++ b/sys/contrib/dev/acpica/components/events/evglock.c
@@ -195,6 +195,11 @@ AcpiEvInitGlobalLockHandler (
return_ACPI_STATUS (AE_OK);
}
+ if (!AcpiGbl_UseGlobalLock)
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
/* Attempt installation of the global lock handler */
Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL,
diff --git a/sys/contrib/dev/acpica/components/executer/extrace.c b/sys/contrib/dev/acpica/components/executer/extrace.c
index 0eceb0ffccb1..d54d4908ca65 100644
--- a/sys/contrib/dev/acpica/components/executer/extrace.c
+++ b/sys/contrib/dev/acpica/components/executer/extrace.c
@@ -269,6 +269,68 @@ AcpiExGetTraceEventName (
#endif
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExTraceArgs
+ *
+ * PARAMETERS: Params - AML method arguments
+ * Count - numer of method arguments
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Trace any arguments
+ *
+ ******************************************************************************/
+
+void
+AcpiExTraceArgs(ACPI_OPERAND_OBJECT **Params, UINT32 Count)
+{
+ UINT32 i;
+
+ ACPI_FUNCTION_NAME(ExTraceArgs);
+
+ for (i = 0; i < Count; i++)
+ {
+ ACPI_OPERAND_OBJECT *obj_desc = Params[i];
+
+ if (!i)
+ {
+ ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT, " "));
+ }
+
+ switch (obj_desc->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+ ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "%lx", obj_desc->Integer.Value));
+ break;
+
+ case ACPI_TYPE_STRING:
+ if (!obj_desc->String.Length)
+ {
+ ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "NULL"));
+ break;
+ }
+ if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_TRACE_POINT, _COMPONENT))
+ {
+ AcpiUtPrintString(obj_desc->String.Pointer, ACPI_UINT8_MAX);
+ }
+ break;
+
+ default:
+ ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "Unknown"));
+ break;
+ }
+
+ if ((i + 1) == Count)
+ {
+ ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "\n"));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, ", "));
+ }
+ }
+}
/*******************************************************************************
*
@@ -299,9 +361,9 @@ AcpiExTracePoint (
if (Pathname)
{
ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT,
- "%s %s [0x%p:%s] execution.\n",
+ "%s %s [%s] execution.\n",
AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End",
- Aml, Pathname));
+ Pathname));
}
else
{
diff --git a/sys/contrib/dev/acpica/components/parser/psopinfo.c b/sys/contrib/dev/acpica/components/parser/psopinfo.c
index 21c2b831ef24..1db32f4e8246 100644
--- a/sys/contrib/dev/acpica/components/parser/psopinfo.c
+++ b/sys/contrib/dev/acpica/components/parser/psopinfo.c
@@ -180,8 +180,8 @@ const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode)
{
-#ifdef ACPI_DEBUG_OUTPUT
- const char *OpcodeName = "Unknown AML opcode";
+#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
+ const char *OpcodeName = "Unknown AML opcode";
#endif
ACPI_FUNCTION_NAME (PsGetOpcodeInfo);
@@ -207,7 +207,7 @@ AcpiPsGetOpcodeInfo (
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
#include <contrib/dev/acpica/compiler/asldefine.h>
-
+
switch (Opcode)
{
case AML_RAW_DATA_BYTE:
@@ -249,12 +249,12 @@ AcpiPsGetOpcodeInfo (
default:
break;
}
-#endif
/* Unknown AML opcode */
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"%s [%4.4X]\n", OpcodeName, Opcode));
+#endif
return (&AcpiGbl_AmlOpInfo [_UNK]);
}
diff --git a/sys/contrib/dev/acpica/components/tables/tbprint.c b/sys/contrib/dev/acpica/components/tables/tbprint.c
index 7211673c42a2..8b812a890a07 100644
--- a/sys/contrib/dev/acpica/components/tables/tbprint.c
+++ b/sys/contrib/dev/acpica/components/tables/tbprint.c
@@ -279,6 +279,14 @@ AcpiTbPrintTableHeader (
ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision,
LocalHeader.OemId));
}
+ else if (AcpiGbl_CDAT && !AcpiUtValidNameseg (Header->Signature))
+ {
+ /* CDAT does not use the common ACPI table header */
+
+ ACPI_INFO (("%-4.4s 0x%8.8X%8.8X %06X",
+ ACPI_SIG_CDAT, ACPI_FORMAT_UINT64 (Address),
+ ACPI_CAST_PTR (ACPI_TABLE_CDAT, Header)->Length));
+ }
else
{
/* Standard ACPI table with full common header */
diff --git a/sys/contrib/dev/acpica/components/utilities/utnonansi.c b/sys/contrib/dev/acpica/components/utilities/utnonansi.c
index bfbe1194ceae..f8b3a29e3283 100644
--- a/sys/contrib/dev/acpica/components/utilities/utnonansi.c
+++ b/sys/contrib/dev/acpica/components/utilities/utnonansi.c
@@ -353,7 +353,7 @@ AcpiUtSafeStrncpy (
{
/* Always terminate destination string */
- memcpy (Dest, Source, DestSize);
+ strncpy (Dest, Source, DestSize);
Dest[DestSize - 1] = 0;
}
diff --git a/sys/contrib/dev/acpica/include/acdebug.h b/sys/contrib/dev/acpica/include/acdebug.h
index e335752148b9..63f39051a8ac 100644
--- a/sys/contrib/dev/acpica/include/acdebug.h
+++ b/sys/contrib/dev/acpica/include/acdebug.h
@@ -187,7 +187,7 @@ typedef struct acpi_db_execute_walk
{
UINT32 Count;
UINT32 MaxCount;
- char NameSeg[ACPI_NAMESEG_SIZE + 1] ACPI_NONSTRING;
+ char NameSeg[ACPI_NAMESEG_SIZE + 1];
} ACPI_DB_EXECUTE_WALK;
diff --git a/sys/contrib/dev/acpica/include/acexcep.h b/sys/contrib/dev/acpica/include/acexcep.h
index 57f98ab4540f..7216e0d49148 100644
--- a/sys/contrib/dev/acpica/include/acexcep.h
+++ b/sys/contrib/dev/acpica/include/acexcep.h
@@ -322,8 +322,11 @@ typedef struct acpi_exception_info
#define AE_AML_TARGET_TYPE EXCEP_AML (0x0023)
#define AE_AML_PROTOCOL EXCEP_AML (0x0024)
#define AE_AML_BUFFER_LENGTH EXCEP_AML (0x0025)
+#define AE_AML_TOO_FEW_ARGUMENTS EXCEP_AML (0x0026)
+#define AE_AML_TOO_MANY_ARGUMENTS EXCEP_AML (0x0027)
-#define AE_CODE_AML_MAX 0x0025
+
+#define AE_CODE_AML_MAX 0x0027
/*
@@ -456,7 +459,9 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] =
EXCEP_TXT ("AE_AML_UNINITIALIZED_NODE", "A namespace node is uninitialized or unresolved"),
EXCEP_TXT ("AE_AML_TARGET_TYPE", "A target operand of an incorrect type was encountered"),
EXCEP_TXT ("AE_AML_PROTOCOL", "Violation of a fixed ACPI protocol"),
- EXCEP_TXT ("AE_AML_BUFFER_LENGTH", "The length of the buffer is invalid/incorrect")
+ EXCEP_TXT ("AE_AML_BUFFER_LENGTH", "The length of the buffer is invalid/incorrect"),
+ EXCEP_TXT ("AE_AML_TOO_FEW_ARGUMENTS", "There are fewer than expected method arguments"),
+ EXCEP_TXT ("AE_AML_TOO_MANY_ARGUMENTS", "There are too many arguments for this method")
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/sys/contrib/dev/acpica/include/acinterp.h b/sys/contrib/dev/acpica/include/acinterp.h
index 74166384f172..b7f9e8f615e4 100644
--- a/sys/contrib/dev/acpica/include/acinterp.h
+++ b/sys/contrib/dev/acpica/include/acinterp.h
@@ -280,6 +280,10 @@ AcpiExTracePoint (
UINT8 *Aml,
char *Pathname);
+void
+AcpiExTraceArgs(
+ ACPI_OPERAND_OBJECT **Params,
+ UINT32 Count);
/*
* exfield - ACPI AML (p-code) execution - field manipulation
diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h
index 193b0e6a70dc..b5961e21bb9b 100644
--- a/sys/contrib/dev/acpica/include/acpixf.h
+++ b/sys/contrib/dev/acpica/include/acpixf.h
@@ -154,7 +154,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20250404
+#define ACPI_CA_VERSION 0x20250807
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>
@@ -358,6 +358,12 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
/*
+ * ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
+ * (such as LoongArch) may not have and not use Global Lock.
+ */
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_UseGlobalLock, TRUE);
+
+/*
* Maximum timeout for While() loop iterations before forced method abort.
* This mechanism is intended to prevent infinite loops during interpreter
* execution within a host kernel.
diff --git a/sys/contrib/dev/acpica/include/actbl.h b/sys/contrib/dev/acpica/include/actbl.h
index eafd5d8a0f8b..ae52bd452c90 100644
--- a/sys/contrib/dev/acpica/include/actbl.h
+++ b/sys/contrib/dev/acpica/include/actbl.h
@@ -220,7 +220,7 @@ typedef struct acpi_table_header
char OemId[ACPI_OEM_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM identification */
char OemTableId[ACPI_OEM_TABLE_ID_SIZE] ACPI_NONSTRING; /* ASCII OEM table identification */
UINT32 OemRevision; /* OEM revision number */
- char AslCompilerId[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */
+ char AslCompilerId[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; /* ASCII ASL compiler vendor ID */
UINT32 AslCompilerRevision; /* ASL compiler version */
} ACPI_TABLE_HEADER;
diff --git a/sys/contrib/dev/acpica/include/actbl1.h b/sys/contrib/dev/acpica/include/actbl1.h
index 876b721068c6..ec04f0a0ab9f 100644
--- a/sys/contrib/dev/acpica/include/actbl1.h
+++ b/sys/contrib/dev/acpica/include/actbl1.h
@@ -262,7 +262,7 @@ typedef struct acpi_whea_header
/* Larger subtable header (when Length can exceed 255) */
-typedef struct acpi_subtable_header_16
+typedef struct acpi_subtbl_hdr_16
{
UINT16 Type;
UINT16 Length;
diff --git a/sys/contrib/dev/acpica/include/actbl2.h b/sys/contrib/dev/acpica/include/actbl2.h
index 4899929b2d45..a74b6d555a3a 100644
--- a/sys/contrib/dev/acpica/include/actbl2.h
+++ b/sys/contrib/dev/acpica/include/actbl2.h
@@ -201,6 +201,7 @@
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
+#define ACPI_SIG_SWFT "SWFT" /* SoundWire File Table */
#define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
@@ -4094,6 +4095,30 @@ enum acpi_svkl_format
ACPI_SVKL_FORMAT_RESERVED = 1 /* 1 and greater are reserved */
};
+/*******************************************************************************
+ *
+ * SWFT - SoundWire File Table
+ * as described in Discovery and Configuration (DisCo) Specification
+ * for SoundWire®
+ * Version 1
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_swft
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_SWFT;
+
+typedef struct acpi_swft_file
+{
+ UINT16 VendorID;
+ UINT32 FileID;
+ UINT16 FileVersion;
+ UINT16 FileLength;
+ UINT8 FileData[];
+
+} ACPI_SWFT_FILE;
/*******************************************************************************
*
diff --git a/sys/contrib/openzfs/cmd/zdb/zdb.c b/sys/contrib/openzfs/cmd/zdb/zdb.c
index 957e6c67dd12..a5f23be2aaaf 100644
--- a/sys/contrib/openzfs/cmd/zdb/zdb.c
+++ b/sys/contrib/openzfs/cmd/zdb/zdb.c
@@ -2627,8 +2627,8 @@ print_indirect(spa_t *spa, blkptr_t *bp, const zbookmark_phys_t *zb,
}
if (BP_GET_LEVEL(bp) != zb->zb_level) {
(void) printf(" (ERROR: Block pointer level "
- "(%llu) does not match bookmark level (%ld))",
- BP_GET_LEVEL(bp), zb->zb_level);
+ "(%llu) does not match bookmark level (%lld))",
+ BP_GET_LEVEL(bp), (u_longlong_t)zb->zb_level);
corruption_found = B_TRUE;
}
}
@@ -2681,8 +2681,8 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
if (fill != BP_GET_FILL(bp)) {
(void) printf("%16llx: Block pointer "
"fill (%llu) does not match calculated "
- "value (%lu)\n", offset, BP_GET_FILL(bp),
- fill);
+ "value (%llu)\n", offset, BP_GET_FILL(bp),
+ (u_longlong_t)fill);
corruption_found = B_TRUE;
}
}
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/hid/hkbd.c b/sys/dev/hid/hkbd.c
index 5eff7557bc42..6255c42d3b62 100644
--- a/sys/dev/hid/hkbd.c
+++ b/sys/dev/hid/hkbd.c
@@ -95,14 +95,16 @@
#ifdef HID_DEBUG
static int hkbd_debug = 0;
+#endif
static int hkbd_no_leds = 0;
static SYSCTL_NODE(_hw_hid, OID_AUTO, hkbd, CTLFLAG_RW, 0, "USB keyboard");
+#ifdef HID_DEBUG
SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, debug, CTLFLAG_RWTUN,
&hkbd_debug, 0, "Debug level");
+#endif
SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, no_leds, CTLFLAG_RWTUN,
&hkbd_no_leds, 0, "Disables setting of keyboard leds");
-#endif
#define INPUT_EPOCH global_epoch_preempt
@@ -1596,8 +1598,16 @@ hkbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg)
sc->sc_state &= ~LOCK_MASK;
sc->sc_state |= *(int *)arg;
- /* set LEDs and quit */
- return (hkbd_ioctl_locked(kbd, KDSETLED, arg));
+ /*
+ * Attempt to set the keyboard LEDs; ignore the return value
+ * intentionally. Note: Some hypervisors/emulators (e.g., QEMU,
+ * Parallels—at least as of the time of writing) may fail when
+ * setting LEDs. This can prevent kbdmux from attaching the
+ * keyboard, which in turn may block the console from accessing
+ * it.
+ */
+ (void)hkbd_ioctl_locked(kbd, KDSETLED, arg);
+ return (0);
case KDSETREPEAT: /* set keyboard repeat rate (new
* interface) */
@@ -1766,10 +1776,8 @@ hkbd_set_leds(struct hkbd_softc *sc, uint8_t leds)
SYSCONS_LOCK_ASSERT();
DPRINTF("leds=0x%02x\n", leds);
-#ifdef HID_DEBUG
if (hkbd_no_leds)
return (0);
-#endif
memset(sc->sc_buffer, 0, HKBD_BUFFER_SIZE);
@@ -1820,6 +1828,7 @@ hkbd_set_leds(struct hkbd_softc *sc, uint8_t leds)
SYSCONS_UNLOCK();
error = hid_write(sc->sc_dev, buf, len);
SYSCONS_LOCK();
+ DPRINTF("error %d", error);
return (error);
}
diff --git a/sys/dev/netmap/if_ptnet.c b/sys/dev/netmap/if_ptnet.c
index bf14bfdb73ea..9c06f7fec530 100644
--- a/sys/dev/netmap/if_ptnet.c
+++ b/sys/dev/netmap/if_ptnet.c
@@ -27,8 +27,9 @@
/* Driver for ptnet paravirtualized network device. */
#include <sys/cdefs.h>
+#include "opt_inet.h"
+#include "opt_inet6.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -75,9 +76,6 @@
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
-#include "opt_inet.h"
-#include "opt_inet6.h"
-
#include <sys/selinfo.h>
#include <net/netmap.h>
#include <dev/netmap/netmap_kern.h>
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/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 2ff9be9680b8..ecb3dbb370e5 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -28,6 +28,9 @@
/* Driver for VirtIO network devices. */
+#include "opt_inet.h"
+#include "opt_inet6.h"
+
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/systm.h>
@@ -82,9 +85,6 @@
#include <dev/virtio/network/if_vtnetvar.h>
#include "virtio_if.h"
-#include "opt_inet.h"
-#include "opt_inet6.h"
-
#if defined(INET) || defined(INET6)
#include <machine/in_cksum.h>
#endif
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 a496b41fcf6e..4a2b80a7ccdd 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -191,7 +191,7 @@ cd9660_getattr(struct vop_getattr_args *ap)
vap->va_atime = ip->inode.iso_atime;
vap->va_mtime = ip->inode.iso_mtime;
vap->va_ctime = ip->inode.iso_ctime;
- vap->va_rdev = ip->inode.iso_rdev;
+ vap->va_rdev = VN_ISDEV(vp) ? ip->inode.iso_rdev : NODEV;
vap->va_size = (u_quad_t) ip->i_size;
if (ip->i_size == 0 && (vap->va_mode & S_IFMT) == S_IFLNK) {
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 5a019b4989cf..4e9aae70da6f 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -1017,7 +1017,7 @@ MALLOC_DECLARE(M_NEWNFSDSESSION);
int nfscl_loadattrcache(struct vnode **, struct nfsvattr *, void *, int, int);
int newnfs_realign(struct mbuf **, int);
bool ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep);
-void ncl_copy_vattr(struct vattr *dst, struct vattr *src);
+void ncl_copy_vattr(struct vnode *vp, struct vattr *dst, struct vattr *src);
/*
* If the port runs on an SMP box that can enforce Atomic ops with low
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index 704aeeeabdf2..e9f1dc23ddbe 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -412,7 +412,7 @@ nfscl_warn_fileid(struct nfsmount *nmp, struct nfsvattr *oldnap,
}
void
-ncl_copy_vattr(struct vattr *dst, struct vattr *src)
+ncl_copy_vattr(struct vnode *vp, struct vattr *dst, struct vattr *src)
{
dst->va_type = src->va_type;
dst->va_mode = src->va_mode;
@@ -429,7 +429,7 @@ ncl_copy_vattr(struct vattr *dst, struct vattr *src)
dst->va_birthtime = src->va_birthtime;
dst->va_gen = src->va_gen;
dst->va_flags = src->va_flags;
- dst->va_rdev = src->va_rdev;
+ dst->va_rdev = VN_ISDEV(vp) ? src->va_rdev : NODEV;
dst->va_bytes = src->va_bytes;
dst->va_filerev = src->va_filerev;
}
@@ -595,7 +595,7 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvattr *nap, void *nvaper,
KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp);
}
if (vaper != NULL) {
- ncl_copy_vattr(vaper, vap);
+ ncl_copy_vattr(vp, vaper, vap);
if (np->n_flag & NCHG) {
if (np->n_flag & NACC)
vaper->va_atime = np->n_atim;
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 52f72dc43c3f..a8b06fdb261b 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1026,7 +1026,7 @@ nfs_getattr(struct vop_getattr_args *ap)
* cached attributes should be ignored.
*/
if (nmp->nm_fhsize > 0 && ncl_getattrcache(vp, &vattr) == 0) {
- ncl_copy_vattr(vap, &vattr);
+ ncl_copy_vattr(vp, vap, &vattr);
/*
* Get the local modify time for the case of a write
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 2690ad3b2679..5a53fac50f2c 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -84,6 +84,13 @@
#define ELF_NOTE_ROUNDSIZE 4
#define OLD_EI_BRAND 8
+/*
+ * ELF_ABI_NAME is a string name of the ELF ABI. ELF_ABI_ID is used
+ * to build variable names.
+ */
+#define ELF_ABI_NAME __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
+#define ELF_ABI_ID __CONCAT(elf, __ELF_WORD_SIZE)
+
static int __elfN(check_header)(const Elf_Ehdr *hdr);
static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp,
const char *interp, int32_t *osrel, uint32_t *fctl0);
@@ -104,14 +111,15 @@ static Elf_Word __elfN(untrans_prot)(vm_prot_t);
static size_t __elfN(prepare_register_notes)(struct thread *td,
struct note_info_list *list, struct thread *target_td);
-SYSCTL_NODE(_kern, OID_AUTO, __CONCAT(elf, __ELF_WORD_SIZE),
- CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+SYSCTL_NODE(_kern, OID_AUTO, ELF_ABI_ID, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"");
+#define ELF_NODE_OID __CONCAT(_kern_, ELF_ABI_ID)
+
int __elfN(fallback_brand) = -1;
-SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
+SYSCTL_INT(ELF_NODE_OID, OID_AUTO,
fallback_brand, CTLFLAG_RWTUN, &__elfN(fallback_brand), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) " brand of last resort");
+ ELF_ABI_NAME " brand of last resort");
static int elf_legacy_coredump = 0;
SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,
@@ -126,22 +134,22 @@ int __elfN(nxstack) =
#else
0;
#endif
-SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
+SYSCTL_INT(ELF_NODE_OID, OID_AUTO,
nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": support PT_GNU_STACK for non-executable stack control");
+ ELF_ABI_NAME ": support PT_GNU_STACK for non-executable stack control");
#if defined(__amd64__)
static int __elfN(vdso) = 1;
-SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
+SYSCTL_INT(ELF_NODE_OID, OID_AUTO,
vdso, CTLFLAG_RWTUN, &__elfN(vdso), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable vdso preloading");
+ ELF_ABI_NAME ": enable vdso preloading");
#else
static int __elfN(vdso) = 0;
#endif
#if __ELF_WORD_SIZE == 32 && (defined(__amd64__) || defined(__i386__))
int i386_read_exec = 0;
-SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec, 0,
+SYSCTL_INT(ELF_NODE_OID, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec, 0,
"enable execution from readable segments");
#endif
@@ -161,15 +169,15 @@ sysctl_pie_base(SYSCTL_HANDLER_ARGS)
__elfN(pie_base) = val;
return (0);
}
-SYSCTL_PROC(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, pie_base,
+SYSCTL_PROC(ELF_NODE_OID, OID_AUTO, pie_base,
CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0,
sysctl_pie_base, "LU",
"PIE load base without randomization");
-SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr,
+SYSCTL_NODE(ELF_NODE_OID, OID_AUTO, aslr,
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"");
-#define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr)
+#define ASLR_NODE_OID __CONCAT(ELF_NODE_OID, _aslr)
/*
* Enable ASLR by default for 64-bit non-PIE binaries. 32-bit architectures
@@ -179,8 +187,7 @@ SYSCTL_NODE(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr,
static int __elfN(aslr_enabled) = __ELF_WORD_SIZE == 64;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN,
&__elfN(aslr_enabled), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
- ": enable address map randomization");
+ ELF_ABI_NAME ": enable address map randomization");
/*
* Enable ASLR by default for 64-bit PIE binaries.
@@ -188,8 +195,7 @@ SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN,
static int __elfN(pie_aslr_enabled) = __ELF_WORD_SIZE == 64;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN,
&__elfN(pie_aslr_enabled), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
- ": enable address map randomization for PIE binaries");
+ ELF_ABI_NAME ": enable address map randomization for PIE binaries");
/*
* Sbrk is deprecated and it can be assumed that in most cases it will not be
@@ -199,27 +205,25 @@ SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN,
static int __elfN(aslr_honor_sbrk) = 0;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW,
&__elfN(aslr_honor_sbrk), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used");
+ ELF_ABI_NAME ": assume sbrk is used");
static int __elfN(aslr_stack) = __ELF_WORD_SIZE == 64;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, stack, CTLFLAG_RWTUN,
&__elfN(aslr_stack), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
- ": enable stack address randomization");
+ ELF_ABI_NAME ": enable stack address randomization");
static int __elfN(aslr_shared_page) = __ELF_WORD_SIZE == 64;
SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, shared_page, CTLFLAG_RWTUN,
&__elfN(aslr_shared_page), 0,
- __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
- ": enable shared page address randomization");
+ ELF_ABI_NAME ": enable shared page address randomization");
static int __elfN(sigfastblock) = 1;
-SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, sigfastblock,
+SYSCTL_INT(ELF_NODE_OID, OID_AUTO, sigfastblock,
CTLFLAG_RWTUN, &__elfN(sigfastblock), 0,
"enable sigfastblock for new processes");
static bool __elfN(allow_wx) = true;
-SYSCTL_BOOL(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, allow_wx,
+SYSCTL_BOOL(ELF_NODE_OID, OID_AUTO, allow_wx,
CTLFLAG_RWTUN, &__elfN(allow_wx), 0,
"Allow pages to be mapped simultaneously writable and executable");
@@ -2951,9 +2955,9 @@ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote,
*/
static struct execsw __elfN(execsw) = {
.ex_imgact = __CONCAT(exec_, __elfN(imgact)),
- .ex_name = __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))
+ .ex_name = ELF_ABI_NAME
};
-EXEC_SET(__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw));
+EXEC_SET(ELF_ABI_ID, __elfN(execsw));
static vm_prot_t
__elfN(trans_prot)(Elf_Word flags)
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 0056dac65c7d..19870e989437 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -154,15 +154,12 @@ static struct task unp_defer_task;
* and don't really want to reserve the sendspace. Their recvspace should be
* large enough for at least one max-size datagram plus address.
*/
-#ifndef PIPSIZ
-#define PIPSIZ 8192
-#endif
-static u_long unpst_sendspace = PIPSIZ;
-static u_long unpst_recvspace = PIPSIZ;
+static u_long unpst_sendspace = 64*1024;
+static u_long unpst_recvspace = 64*1024;
static u_long unpdg_maxdgram = 8*1024; /* support 8KB syslog msgs */
static u_long unpdg_recvspace = 16*1024;
-static u_long unpsp_sendspace = PIPSIZ;
-static u_long unpsp_recvspace = PIPSIZ;
+static u_long unpsp_sendspace = 64*1024;
+static u_long unpsp_recvspace = 64*1024;
static SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Local domain");
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 93f87ddae4de..a4f41192f684 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -3444,7 +3444,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp,
dat = NULL;
if ((flags & COPY_FILE_RANGE_CLONE) != 0) {
- error = ENOSYS;
+ error = EOPNOTSUPP;
goto out;
}
diff --git a/sys/modules/e6000sw/Makefile b/sys/modules/e6000sw/Makefile
index da08f80b0a29..73cbaea801f0 100644
--- a/sys/modules/e6000sw/Makefile
+++ b/sys/modules/e6000sw/Makefile
@@ -3,6 +3,6 @@
KMOD= e6000sw
SRCS= e6000sw.c
-SRCS+= bus_if.h etherswitch_if.h mdio_if.h miibus_if.h ofw_bus_if.h opt_platform.h
+SRCS+= bus_if.h device_if.h etherswitch_if.h mdio_if.h miibus_if.h ofw_bus_if.h opt_platform.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/etherswitch/Makefile b/sys/modules/etherswitch/Makefile
index 087231545cd4..0b16a19e5117 100644
--- a/sys/modules/etherswitch/Makefile
+++ b/sys/modules/etherswitch/Makefile
@@ -3,7 +3,7 @@
KMOD = etherswitch
SRCS= etherswitch.c
-SRCS+= mdio_if.h miibus_if.h etherswitch_if.h etherswitch_if.c
+SRCS+= bus_if.h device_if.h mdio_if.h miibus_if.h etherswitch_if.h etherswitch_if.c
CFLAGS+= -I${SRCTOP}/sys/dev/etherswitch
.include <bsd.kmod.mk>
diff --git a/sys/modules/evdev/Makefile b/sys/modules/evdev/Makefile
index bd66013885db..20813b73f6dd 100644
--- a/sys/modules/evdev/Makefile
+++ b/sys/modules/evdev/Makefile
@@ -2,7 +2,7 @@
KMOD= evdev
SRCS= cdev.c evdev.c evdev_mt.c evdev_utils.c
-SRCS+= opt_evdev.h bus_if.h device_if.h
+SRCS+= opt_evdev.h opt_kbd.h bus_if.h device_if.h
EXPORT_SYMS= YES
diff --git a/sys/modules/gpio/gpioaei/Makefile b/sys/modules/gpio/gpioaei/Makefile
index 8f856af48eb7..1f0f1d0e53a6 100644
--- a/sys/modules/gpio/gpioaei/Makefile
+++ b/sys/modules/gpio/gpioaei/Makefile
@@ -10,6 +10,8 @@ SRCS+= \
gpio_if.h \
gpiobus_if.h
+SRCS+= opt_acpi.h opt_platform.h
+
CFLAGS+= -I. -I${SRCTOP}/sys/dev/gpio/
.include <bsd.kmod.mk>
diff --git a/sys/modules/gve/Makefile b/sys/modules/gve/Makefile
index 08b26a994e36..ece275485df7 100644
--- a/sys/modules/gve/Makefile
+++ b/sys/modules/gve/Makefile
@@ -40,5 +40,5 @@ SRCS= gve_main.c \
gve_tx_dqo.c \
gve_sysctl.c
SRCS+= device_if.h bus_if.h pci_if.h
-
+SRCS+= opt_inet6.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/if_infiniband/Makefile b/sys/modules/if_infiniband/Makefile
index 01e3164b1271..7ec343999da1 100644
--- a/sys/modules/if_infiniband/Makefile
+++ b/sys/modules/if_infiniband/Makefile
@@ -3,7 +3,8 @@
KMOD= if_infiniband
SRCS= if_infiniband.c \
opt_inet.h \
- opt_inet6.h
+ opt_inet6.h \
+ opt_kbd.h
EXPORT_SYMS= YES
diff --git a/sys/modules/if_vlan/Makefile b/sys/modules/if_vlan/Makefile
index 3077f4289d5a..0cdab3f7653a 100644
--- a/sys/modules/if_vlan/Makefile
+++ b/sys/modules/if_vlan/Makefile
@@ -2,6 +2,6 @@
KMOD= if_vlan
SRCS= if_vlan.c
-SRCS+= opt_inet.h opt_inet6.h opt_kern_tls.h opt_vlan.h opt_ratelimit.h
+SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h opt_kern_tls.h opt_vlan.h opt_ratelimit.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index b23891a65a4f..327da11afdaf 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -31,6 +31,7 @@ SRCS= linux_dummy_machdep.c \
opt_ktrace.h \
opt_inet6.h \
opt_posix.h \
+ opt_usb.h \
bus_if.h \
device_if.h \
vnode_if.h \
diff --git a/sys/modules/md/Makefile b/sys/modules/md/Makefile
index 2b0586c44717..3f16e04860a1 100644
--- a/sys/modules/md/Makefile
+++ b/sys/modules/md/Makefile
@@ -1,6 +1,6 @@
.PATH: ${SRCTOP}/sys/dev/md
KMOD= geom_md
-SRCS= md.c opt_md.h opt_geom.h opt_rootdevname.h vnode_if.h
+SRCS= bus_if.h device_if.h md.c opt_md.h opt_geom.h opt_rootdevname.h vnode_if.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/miiproxy/Makefile b/sys/modules/miiproxy/Makefile
index 5173358989da..730bef4220cd 100644
--- a/sys/modules/miiproxy/Makefile
+++ b/sys/modules/miiproxy/Makefile
@@ -3,7 +3,7 @@
KMOD = miiproxy
SRCS= miiproxy.c
-SRCS+= mdio_if.h miibus_if.h
+SRCS+= bus_if.h mdio_if.h miibus_if.h opt_platform.h
CFLAGS+= -I${SRCTOP}/sys/dev/etherswitch
.include <bsd.kmod.mk>
diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile
index 506c045ab0ce..65341fdfb8aa 100644
--- a/sys/modules/mlx5/Makefile
+++ b/sys/modules/mlx5/Makefile
@@ -46,7 +46,7 @@ mlx5_ipsec_offload.c \
mlx5_ipsec.c \
mlx5_ipsec_rxtx.c
SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h
+SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h opt_rss.h opt_ratelimit.h
CFLAGS+= -I${SRCTOP}/sys/ofed/include
CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi
diff --git a/sys/modules/mlx5en/Makefile b/sys/modules/mlx5en/Makefile
index 03bf174e33b0..3697fa65dc83 100644
--- a/sys/modules/mlx5en/Makefile
+++ b/sys/modules/mlx5en/Makefile
@@ -15,7 +15,7 @@ mlx5_en_rl.c \
mlx5_en_txrx.c \
mlx5_en_port_buffer.c
SRCS+= ${LINUXKPI_GENSRCS}
-SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h opt_kern_tls.h
+SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h opt_rss.h opt_ratelimit.h opt_kern_tls.h
.if defined(HAVE_PER_CQ_EVENT_PACKET)
CFLAGS+= -DHAVE_PER_CQ_EVENT_PACKET
diff --git a/sys/modules/netgraph/ksocket/Makefile b/sys/modules/netgraph/ksocket/Makefile
index 395fdbd7b3e3..7099648f6219 100644
--- a/sys/modules/netgraph/ksocket/Makefile
+++ b/sys/modules/netgraph/ksocket/Makefile
@@ -1,4 +1,6 @@
KMOD= ng_ksocket
SRCS= ng_ksocket.c
+SRCS+= opt_inet6.h
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/nvmf/nvmf/Makefile b/sys/modules/nvmf/nvmf/Makefile
index 7ebe614998bd..21d73d363d2f 100644
--- a/sys/modules/nvmf/nvmf/Makefile
+++ b/sys/modules/nvmf/nvmf/Makefile
@@ -10,4 +10,7 @@ SRCS= nvmf.c \
nvmf_qpair.c \
nvmf_sim.c
+SRCS+= bus_if.h device_if.h
+SRCS+= opt_cam.h
+
.include <bsd.kmod.mk>
diff --git a/sys/modules/qlnx/qlnxev/Makefile b/sys/modules/qlnx/qlnxev/Makefile
index ed62f1f1dd40..766a5a950032 100644
--- a/sys/modules/qlnx/qlnxev/Makefile
+++ b/sys/modules/qlnx/qlnxev/Makefile
@@ -49,6 +49,7 @@ SRCS+=ecore_vf.c
SRCS+=qlnx_ioctl.c
SRCS+=qlnx_os.c
+SRCS+=opt_inet.h
SRCS+= ${LINUXKPI_GENSRCS}
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/uinput/Makefile b/sys/modules/uinput/Makefile
index 66ade2a5bb33..a9e2ec867b91 100644
--- a/sys/modules/uinput/Makefile
+++ b/sys/modules/uinput/Makefile
@@ -2,6 +2,6 @@
KMOD= uinput
SRCS= uinput.c
-SRCS+= opt_evdev.h
+SRCS+= opt_evdev.h opt_kbd.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/usb/usie/Makefile b/sys/modules/usb/usie/Makefile
index 6a5f79248ff8..9edeed082f8d 100644
--- a/sys/modules/usb/usie/Makefile
+++ b/sys/modules/usb/usie/Makefile
@@ -29,6 +29,6 @@
KMOD = usie
SRCS = if_usie.c
SRCS += opt_bus.h opt_usb.h device_if.h bus_if.h \
- usb_if.h usbdevs.h opt_inet.h
+ usb_if.h usbdevs.h opt_inet.h opt_inet6.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/usb/wmt/Makefile b/sys/modules/usb/wmt/Makefile
index 72cf1d814908..8cb5abd7383e 100644
--- a/sys/modules/usb/wmt/Makefile
+++ b/sys/modules/usb/wmt/Makefile
@@ -3,6 +3,6 @@ S= ${SRCTOP}/sys
.PATH: $S/dev/usb/input
KMOD= wmt
-SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h wmt.c
+SRCS= opt_bus.h opt_kbd.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h wmt.c
.include <bsd.kmod.mk>
diff --git a/sys/net/if_bridgevar.h b/sys/net/if_bridgevar.h
index b0f579f688ac..5ed8c19f3128 100644
--- a/sys/net/if_bridgevar.h
+++ b/sys/net/if_bridgevar.h
@@ -159,7 +159,7 @@ struct ifbreq {
uint32_t ifbr_addrexceeded; /* member if addr violations */
ether_vlanid_t ifbr_pvid; /* member if PVID */
uint16_t ifbr_vlanproto; /* member if VLAN protocol */
- uint8_t pad[32];
+ uint8_t pad[28];
};
/* BRDGGIFFLAGS, BRDGSIFFLAGS */
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_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/netlink/netlink_io.c b/sys/netlink/netlink_io.c
index e7908d6f3a44..2391d8ea752c 100644
--- a/sys/netlink/netlink_io.c
+++ b/sys/netlink/netlink_io.c
@@ -216,16 +216,17 @@ nl_send(struct nl_writer *nw, struct nlpcb *nlp)
hdr->nlmsg_len);
}
- if (nlp->nl_linux && linux_netlink_p != NULL &&
- __predict_false(!linux_netlink_p->msgs_to_linux(nw, nlp))) {
+ if (nlp->nl_linux && linux_netlink_p != NULL) {
+ nb = linux_netlink_p->msgs_to_linux(nw->buf, nlp);
nl_buf_free(nw->buf);
nw->buf = NULL;
- return (false);
+ if (nb == NULL)
+ return (false);
+ } else {
+ nb = nw->buf;
+ nw->buf = NULL;
}
- nb = nw->buf;
- nw->buf = NULL;
-
SOCK_RECVBUF_LOCK(so);
if (!nw->ignore_limit && __predict_false(sb->sb_hiwat <= sb->sb_ccc)) {
SOCK_RECVBUF_UNLOCK(so);
diff --git a/sys/netlink/netlink_linux.h b/sys/netlink/netlink_linux.h
index d4c451d470b2..794065692901 100644
--- a/sys/netlink/netlink_linux.h
+++ b/sys/netlink/netlink_linux.h
@@ -37,7 +37,7 @@ struct nlpcb;
struct nl_pstate;
struct nl_writer;
-typedef bool msgs_to_linux_cb_t(struct nl_writer *nw, struct nlpcb *nlp);
+typedef struct nl_buf * msgs_to_linux_cb_t(struct nl_buf *, struct nlpcb *);
typedef int msg_from_linux_cb_t(int netlink_family, struct nlmsghdr **hdr,
struct nl_pstate *npt);
diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
index 8b871576d0b2..9beb80792af4 100644
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -403,6 +403,7 @@ static const struct nlattr_parser nla_p_linfo[] = {
NL_DECLARE_ATTR_PARSER(linfo_parser, nla_p_linfo);
static const struct nlattr_parser nla_p_if[] = {
+ { .type = IFLA_ADDRESS, .off = _OUT(ifla_address), .cb = nlattr_get_nla },
{ .type = IFLA_IFNAME, .off = _OUT(ifla_ifname), .cb = nlattr_get_string },
{ .type = IFLA_MTU, .off = _OUT(ifla_mtu), .cb = nlattr_get_uint32 },
{ .type = IFLA_LINK, .off = _OUT(ifla_link), .cb = nlattr_get_uint32 },
diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c
index 5f605b05f7b8..21db3017df18 100644
--- a/sys/netlink/route/iface_drivers.c
+++ b/sys/netlink/route/iface_drivers.c
@@ -82,12 +82,9 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
}
}
- 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->ifi_change & IFF_UP) && (lattrs->ifi_flags & IFF_UP) == 0) {
+ /* Request to down the interface */
+ if_down(ifp);
}
if (lattrs->ifla_mtu > 0) {
@@ -100,8 +97,7 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
}
}
- if ((lattrs->ifi_change & IFF_PROMISC) != 0 ||
- lattrs->ifi_change == 0) {
+ if (lattrs->ifi_change & IFF_PROMISC) {
error = ifpromisc(ifp, lattrs->ifi_flags & IFF_PROMISC);
if (error != 0) {
nlmsg_report_err_msg(npt, "unable to set promisc");
@@ -109,6 +105,24 @@ _nl_modify_ifp_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
}
}
+ if (lattrs->ifla_address != NULL) {
+ if (nlp_has_priv(npt->nlp, PRIV_NET_SETIFMAC)) {
+ error = if_setlladdr(ifp,
+ NLA_DATA(lattrs->ifla_address),
+ NLA_DATA_LEN(lattrs->ifla_address));
+ if (error != 0) {
+ nlmsg_report_err_msg(npt,
+ "setting IFLA_ADDRESS failed with error code: %d",
+ error);
+ return (error);
+ }
+ } else {
+ nlmsg_report_err_msg(npt,
+ "Not enough privileges to set IFLA_ADDRESS");
+ return (EPERM);
+ }
+ }
+
return (0);
}
diff --git a/sys/netlink/route/route_var.h b/sys/netlink/route/route_var.h
index b84b34461e35..41f110038b54 100644
--- a/sys/netlink/route/route_var.h
+++ b/sys/netlink/route/route_var.h
@@ -69,6 +69,7 @@ struct nl_parsed_link {
char *ifla_cloner;
char *ifla_ifalias;
struct nlattr *ifla_idata;
+ struct nlattr *ifla_address;
unsigned short ifi_type;
int ifi_index;
uint32_t ifla_link;
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/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh
index 85d2299b45d0..e5865639d398 100644
--- a/sys/tools/amd64_ia32_vdso.sh
+++ b/sys/tools/amd64_ia32_vdso.sh
@@ -58,7 +58,7 @@ then
exit 1
fi
-${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
+${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
-o elf-vdso32.so.o -I. -I"${S}" -include opt_global.h \
-DVDSO_NAME=elf_vdso32_so_1 -DVDSO_FILE=\"elf-vdso32.so.1\" \
"${S}"/tools/vdso_wrap.S
diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh
index 2a83ae874ab7..ed91ddc8abb5 100644
--- a/sys/tools/amd64_vdso.sh
+++ b/sys/tools/amd64_vdso.sh
@@ -67,7 +67,7 @@ then
exit 1
fi
-${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
+${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
-o elf-vdso.so.o -I. -I"${S}" -include opt_global.h \
-DVDSO_NAME=elf_vdso_so_1 -DVDSO_FILE=\"elf-vdso.so.1\" \
"${S}"/tools/vdso_wrap.S
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/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c
index ed7f05126ca7..3601f6929fc4 100644
--- a/usr.sbin/certctl/certctl.c
+++ b/usr.sbin/certctl/certctl.c
@@ -101,6 +101,28 @@ static char *bundle_dest;
static FILE *mlf;
/*
+ * Create a directory and its parents as needed.
+ */
+static void
+mkdirp(const char *dir)
+{
+ struct stat sb;
+ const char *sep;
+ char *parent;
+
+ if (stat(dir, &sb) == 0)
+ return;
+ if ((sep = strrchr(dir, '/')) != NULL) {
+ parent = xasprintf("%.*s", (int)(sep - dir), dir);
+ mkdirp(parent);
+ free(parent);
+ }
+ info("creating %s", dir);
+ if (mkdir(dir, 0755) != 0)
+ err(1, "mkdir %s", dir);
+}
+
+/*
* Remove duplicate and trailing slashes from a path.
*/
static char *
@@ -685,7 +707,7 @@ save_trusted(void)
{
int ret;
- /* save untrusted certs */
+ mkdirp(trusted_dest);
ret = write_certs(trusted_dest, &trusted);
return (ret);
}
@@ -700,6 +722,7 @@ save_untrusted(void)
{
int ret;
+ mkdirp(untrusted_dest);
ret = write_certs(untrusted_dest, &untrusted);
return (ret);
}
@@ -721,6 +744,7 @@ save_bundle(void)
} else {
dir = xasprintf("%.*s", (int)(sep - bundle_dest), bundle_dest);
file = sep + 1;
+ mkdirp(dir);
}
ret = write_bundle(dir, file, &trusted);
free(dir);
@@ -995,17 +1019,17 @@ set_defaults(void)
if ((value = getenv("TRUSTDESTDIR")) != NULL ||
(value = getenv("CERTDESTDIR")) != NULL)
- trusted_dest = xstrdup(value);
+ trusted_dest = normalize_path(value);
else
trusted_dest = expand_path(TRUSTED_PATH);
if ((value = getenv("UNTRUSTDESTDIR")) != NULL)
- untrusted_dest = xstrdup(value);
+ untrusted_dest = normalize_path(value);
else
untrusted_dest = expand_path(UNTRUSTED_PATH);
if ((value = getenv("BUNDLE")) != NULL)
- bundle_dest = xstrdup(value);
+ bundle_dest = normalize_path(value);
else
bundle_dest = expand_path(BUNDLE_PATH);
diff --git a/usr.sbin/certctl/tests/certctl_test.sh b/usr.sbin/certctl/tests/certctl_test.sh
index f60bac6ffbb3..74749db0b3f5 100644
--- a/usr.sbin/certctl/tests/certctl_test.sh
+++ b/usr.sbin/certctl/tests/certctl_test.sh
@@ -76,9 +76,9 @@ certctl_setup()
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
+ # Do not create output directories; certctl will take care of it
+ #mkdir -p ${DESTDIR}${DISTBASE}/etc/ssl/certs
+ #mkdir -p ${DESTDIR}${DISTBASE}/etc/ssl/untrusted
# Generate a random key
keyname="testkey"
diff --git a/usr.sbin/watch/watch.8 b/usr.sbin/watch/watch.8
index 7acd79df8710..3cc72267f207 100644
--- a/usr.sbin/watch/watch.8
+++ b/usr.sbin/watch/watch.8
@@ -28,7 +28,7 @@ The
utility writes to standard output.
.Pp
The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width "-f snpdev"
.It Fl c
Reconnect on close.
If the tty observed by