]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 months agoMerge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
Dimitry Andric [Thu, 14 Jul 2022 18:58:48 +0000 (20:58 +0200)]
Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR: 265425
MFC after: 2 weeks

16 months agoMerge llvm-project main llvmorg-15-init-15358-g53dc0f10787
Dimitry Andric [Mon, 4 Jul 2022 19:20:19 +0000 (21:20 +0200)]
Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR: 265425
MFC after: 2 weeks

16 months agogeli: split the initalization of HMAC
Mariusz Zaborski [Wed, 8 Feb 2023 16:41:06 +0000 (08:41 -0800)]
geli: split the initalization of HMAC

GELI allows to read a user key from a standard input.
However if user initialize multiple providers at once, the standard
input will be empty for the second and next providers.
This caused GELI to encrypt a master key with an empty key file.

This commits initialize the HMAC with the key file, and then reuse the
finalized structure to generate different encryption keys for different
providers.

Reported by: Nathan Dorfman
Tested by: philip
Security: FreeBSD-SA-23:01.geli
Security: CVE-2023-0751

16 months agolua: Update to 5.4.4
Warner Losh [Tue, 7 Feb 2023 22:07:08 +0000 (15:07 -0700)]
lua: Update to 5.4.4

Merge commit '755d9301ca89f02956fd17858b9d4d821ab5c972' from the
vendor branch. This updates us from lua 5.4.2 to 5.4.4.

In addition, it switches around how we flavor liblua for the boot loader
and flua. This is done to reduce diffs with upstream and make it easier
to import new versions (the current method has too many conflicts to
resolve by hand): we include luaconf.local.h from luaconf.h (the only
change to this file is now that #include at the end). We then define
what we need to: for flua (which does very little) and one for stand
(which creates the new FLOAT type out of int64).

Sponsored by: Netflix

16 months agoiommu_gas: initialize start_gap as first node
Doug Moore [Wed, 8 Feb 2023 17:04:13 +0000 (11:04 -0600)]
iommu_gas: initialize start_gap as first node

In iommu_gas.c, domain->start_gap points to one of the nodes on either
side of the first free, unallocated range. In iommu_gas_init_domain,
it is initialized to point to the node after the single free
range. Change it to point to the node before that free range, so that,
when 'lowaddr' is within the initial free range, the first allocation
search for free space below 'lowaddr' does not begin and end at an
address above 'lowaddr'. This fixes problems on a machine with Intel
DMAR enabled.

Reported by: jah
Reviewed by: dougm
Tested by: jah
Obtained from: jah
Fixes: commit db151ca0c343531256b8839f938a4ecbd8b4fd7e iommu_gas: start space search from 1st free space
MFC after: 1 day

16 months agocp: Adjust the sparse file tests.
Dag-Erling Smørgrav [Wed, 8 Feb 2023 16:49:29 +0000 (16:49 +0000)]
cp: Adjust the sparse file tests.

* The sparsity check was ineffective: it compared the apparent size in bytes to the actual size in blocks.  Instead, write a tool that reliably detects sparseness.
* Some of the seq commands were missing an argument.
* Based on empirical evidence, 1 MB holes are not necessarily large enough to be preserved by the underlying filesystem.  Increase the hole size to 16 MB.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: cracauer
Differential Revision: https://reviews.freebsd.org/D38414

16 months agobpf: Add missing NOP stubs
Zhenlei Huang [Wed, 8 Feb 2023 04:35:02 +0000 (12:35 +0800)]
bpf: Add missing NOP stubs

This fixes kernel build with nodevice bpf [1].

[1] https://lists.freebsd.org/archives/freebsd-current/2023-February/003178.html

Reported by: Gary Jennejohn <garyj@gmx.de>
Reviewed by: jhibbits
Fixes: 950cc1f44fbd bpf: Add "_if" tap APIs
Differential Revision: https://reviews.freebsd.org/D38432

16 months agorc: syscons: Add UEFI special case
Emmanuel Vadot [Tue, 31 Jan 2023 10:26:36 +0000 (11:26 +0100)]
rc: syscons: Add UEFI special case

Changing cursor, screenmap and setting blanktime doesn't work when booted
with vt(4) and UEFI so add a special case for those depending on machdep.bootmethods.
I have no way to test if this can work with vt(4) and bios boot so just in case
keep calling those for this.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38293

16 months agoutx: Allow disabling user accounting
Emmanuel Vadot [Tue, 31 Jan 2023 09:05:32 +0000 (10:05 +0100)]
utx: Allow disabling user accounting

Make it possible to not run utx at boot.
Default to yes so this is a no-op for everyone.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38292

16 months agopkgbase: Create a FreeBSD-console-tools package
Emmanuel Vadot [Wed, 1 Feb 2023 09:35:56 +0000 (10:35 +0100)]
pkgbase: Create a FreeBSD-console-tools package

And put in it:
 - kbdcontrol
 - vidcontrol
 - moused
 - kbdmap

Those aren't useful in a jail or for a modern desktop.
While here, split the devd.conf part into some new files.

Reviewed by: bapt
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38321

16 months agodevd: Move power_profile part in devd/power_profile.conf
Emmanuel Vadot [Wed, 1 Feb 2023 07:49:18 +0000 (08:49 +0100)]
devd: Move power_profile part in devd/power_profile.conf

And make it part of the FreeBSD-acpi package.
This avoid calling service power_profile on an installation without it
installed.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38324

16 months agodevd: Move bluetooth part in devd/bluetooth.conf
Emmanuel Vadot [Wed, 1 Feb 2023 07:44:46 +0000 (08:44 +0100)]
devd: Move bluetooth part in devd/bluetooth.conf

And make it part of the FreeBSD-bluetooth package.
This avoid calling service bluetooth on an installation without it
installed.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38323

16 months agodevd: Move dhclient part in devd/dhclient.conf
Emmanuel Vadot [Wed, 1 Feb 2023 07:41:56 +0000 (08:41 +0100)]
devd: Move dhclient part in devd/dhclient.conf

And make it part of the FreeBSD-dhclient package.
This avoid calling dhclient on an installation without dhclient
installed.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38322

16 months agopkgbase: Put sendmail example in the sendmail package
Emmanuel Vadot [Tue, 31 Jan 2023 15:15:11 +0000 (16:15 +0100)]
pkgbase: Put sendmail example in the sendmail package

Reviewed by: bapt
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38297

16 months agopkgbase: Do not override packages for FILES
Emmanuel Vadot [Tue, 31 Jan 2023 15:14:27 +0000 (16:14 +0100)]
pkgbase: Do not override packages for FILES

Not all FILES entries should end up in FreeBSD-utilities

Reviewed by: bapt
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38296

16 months agopkgbase: Put libpanelw and libform in FreeBSD-clibs
Emmanuel Vadot [Fri, 27 Jan 2023 15:17:32 +0000 (16:17 +0100)]
pkgbase: Put libpanelw and libform in FreeBSD-clibs

Put them with the others ncurses libs.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38227

16 months agopkgbase: Put ftp-proxy in the FreeBSD-pf package
Emmanuel Vadot [Fri, 27 Jan 2023 14:57:56 +0000 (15:57 +0100)]
pkgbase: Put ftp-proxy in the FreeBSD-pf package

It belongs here.
Also this unbloat FreeBSD-utilities a bit and it will not depend
on the FreeBSD-libevent1 package now.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38226

16 months agopkgbase: Create a FreeBSD-netmap package
Emmanuel Vadot [Fri, 27 Jan 2023 14:45:44 +0000 (15:45 +0100)]
pkgbase: Create a FreeBSD-netmap package

This unbloat FreeBSD-utilities a bit and not everyone uses
valectl which is the only in-tree consumer of libnetmap

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38225

16 months agopkgbase: Create a FreeBSD-elftoolchain package
Emmanuel Vadot [Fri, 27 Jan 2023 14:26:06 +0000 (15:26 +0100)]
pkgbase: Create a FreeBSD-elftoolchain package

It contain all the binaries and libs from the elftoolchain contrib
project except for libelf which is used everywhere.
All of those tools are never used by the average user.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38224

16 months agopkgbase: Create a FreeBSD-ctf-tools package
Emmanuel Vadot [Fri, 27 Jan 2023 14:25:21 +0000 (15:25 +0100)]
pkgbase: Create a FreeBSD-ctf-tools package

It contains the ctf tools that most users will never use.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38223

16 months agopkgbase: Create a FreeBSD-inetd package
Emmanuel Vadot [Fri, 27 Jan 2023 09:48:11 +0000 (10:48 +0100)]
pkgbase: Create a FreeBSD-inetd package

And put inetd and its config file in it.
This unbloat a bit FreeBSD-utilities and some people might not
want inetd always installed.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38229

16 months agopkgbase: Create a FreeBSD-smbutils package
Emmanuel Vadot [Fri, 27 Jan 2023 09:45:21 +0000 (10:45 +0100)]
pkgbase: Create a FreeBSD-smbutils package

And put smb related programs and lib in it.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38228

16 months agolibc: base64: trim some bogus trailing whitespace
Kyle Evans [Wed, 8 Feb 2023 06:39:25 +0000 (00:39 -0600)]
libc: base64: trim some bogus trailing whitespace

No functional change, just a style fix.

Sponsored by: Klara, Inc.

16 months agotools: cleanup stale dependencies from recent config(8) change
Kyle Evans [Wed, 8 Feb 2023 06:05:58 +0000 (00:05 -0600)]
tools: cleanup stale dependencies from recent config(8) change

mkmakefile.c moved to mkmakefile.cc, let's preemptively handle it.

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D38275

16 months agoconfig: drop dependency on libnv
Kyle Evans [Wed, 8 Feb 2023 06:02:56 +0000 (00:02 -0600)]
config: drop dependency on libnv

Compile mkmakefile.c as C++ instead and use an std::unordered_map to
accomplish the same goal.

Reviewed by: imp
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D38275

16 months agoconfig: make changes to allow some parts to build as C++
Kyle Evans [Wed, 8 Feb 2023 06:02:56 +0000 (00:02 -0600)]
config: make changes to allow some parts to build as C++

Highlights:
- Avoid keywords (this, not) as variable names
- Move yyparse into config.h with other declarations
- All declarations in config.h are assumed guilty until proven innocent
- Some const-correctness
- Casting malloc/calloc returns

Note that we're not building any C++ here yet, this will be introduced
in other commits to replace some of the lib dependencies.  Reducing the
number of FreeBSD-specific dependencies we have reduces some friction
for building our bootstrap tools independently in other environments.

Reviewed by: imp
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D38274

16 months agoasmc: Add support for 10 byte light sensor payloads; MacBookAir6,1
Adrian Chadd [Wed, 8 Feb 2023 04:06:16 +0000 (04:06 +0000)]
asmc: Add support for 10 byte light sensor payloads; MacBookAir6,1

The later macbook models use a different packet payload for the light
sensors:

* There's only one, done in the camera
* It's a 4 byte sensor value, not a 2 byte value
* It's in a 10 byte payload.

So, this adds support for that and flips it on for the MacbookAir6,2.

It also adds support for MacBookAir6,1 as that now works fine here.

Tested - MacBookAir6,1 and 6,2

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38365

16 months agocommitters-ports.dot: add fuz
Robert Clausecker [Tue, 7 Feb 2023 14:00:04 +0000 (15:00 +0100)]
committers-ports.dot: add fuz

Onboard new ports committer Robert Clausecker (fuz)
in accordance with step 5 of sec. 7.1 committers guide.

Approved by: eduardo (mentor)
See also: D38416 (steps 1--4)
Differential Revision: https://reviews.freebsd.org/D38417

16 months agosysv: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:11:10 +0000 (00:11 +0000)]
sysv: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agoddb: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:09:23 +0000 (00:09 +0000)]
ddb: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agosk: ansify
Mateusz Guzik [Wed, 8 Feb 2023 00:05:03 +0000 (00:05 +0000)]
sk: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agosmbfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:35:11 +0000 (23:35 +0000)]
smbfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agoudf: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:24:24 +0000 (23:24 +0000)]
udf: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agonullfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:22:27 +0000 (23:22 +0000)]
nullfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agofifofs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:18:51 +0000 (23:18 +0000)]
fifofs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agovfs: ansify
Mateusz Guzik [Tue, 7 Feb 2023 23:03:20 +0000 (23:03 +0000)]
vfs: ansify

Reported by: clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agoamd64: ansify
Mateusz Guzik [Tue, 7 Feb 2023 22:52:06 +0000 (22:52 +0000)]
amd64: ansify

Reported by:    clang 15
Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agossh: add information on hostname canonicalization patch
Ed Maste [Tue, 7 Feb 2023 20:09:30 +0000 (15:09 -0500)]
ssh: add information on hostname canonicalization patch

We introduced hostname canonicalization in 2002, while upstream OpenSSH
added similar support in 2014.

It would be good to review our handling of CNAMEs in hostname
canonicalization.

Sponsored by: The FreeBSD Foundation

16 months agotcp: Remove a couple of always-false checks from syncache_socket()
Mark Johnston [Tue, 7 Feb 2023 20:12:10 +0000 (15:12 -0500)]
tcp: Remove a couple of always-false checks from syncache_socket()

syncache_socket() does some unnecessary work: before connecting the PCB,
it saves the local address on the stack and restores it before freeing
the PCB in case of an error.  However:
- There's no need to restore the old address in the error case.
- The PCB's local address will always be equal to that of the syncache
  entry anyway.

So just remove this unnecessary code, which appears to date from the
introduction of the syncache 20+ years ago.

No functional change intended.

Reviewed by: tuexen, glebius
Sponsored by: Klara, Inc.
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D38391

16 months agoLinuxKPI: 802.11: deal with stopped queues
Bjoern A. Zeeb [Tue, 7 Feb 2023 20:18:08 +0000 (20:18 +0000)]
LinuxKPI: 802.11: deal with stopped queues

Following 5a9a0d7803382321b5f9fff1deae5fb08463cf1a initialize the
queue values explicitly and deal with a stopped queue in
ieee80211_tx_dequeue().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

16 months agojail: Use atomic(9) instead of CK atomics
Mark Johnston [Tue, 7 Feb 2023 19:35:44 +0000 (14:35 -0500)]
jail: Use atomic(9) instead of CK atomics

There's no reason to use one over the other here, let's prefer the
interface that's used elsewhere in the kernel.

No functional change intended.

Reviewed by: mjg
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38360

16 months agobridge: Make the ioctl table local to if_bridge.c
Mark Johnston [Tue, 7 Feb 2023 19:34:37 +0000 (14:34 -0500)]
bridge: Make the ioctl table local to if_bridge.c

No functional change intended.

MFC after: 1 week
Sponsored by: Klara, Inc.

16 months agolibdwarf: Add some constants from DWARF 5
Mark Johnston [Tue, 7 Feb 2023 19:33:27 +0000 (14:33 -0500)]
libdwarf: Add some constants from DWARF 5

This is not exhaustive - DWARF 5 has some new enumeration types not
implemented here - but I think I caught all the ones that are extended
in DWARF 5, plus the new compilation unit type (DW_UT_*), needed when
parsing .debug_info headers.

These were useful when extending libdwarf/ctfconvert/readelf to handle
DWARF generated by gcc 12, which is version 5 by default.

Reviewed by: emaste
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38273

16 months agotcp_var.h: Fix spelling of independent in comment
John Baldwin [Tue, 7 Feb 2023 20:01:29 +0000 (12:01 -0800)]
tcp_var.h: Fix spelling of independent in comment

16 months agomvneta: add the missing include opt_mvneta.h
Mateusz Guzik [Tue, 7 Feb 2023 19:20:05 +0000 (19:20 +0000)]
mvneta: add the missing include opt_mvneta.h

Sponsored by: Rubicon Communications, LLC ("Netgate")

16 months agoMechanically convert vtbe(4) to IfAPI
Justin Hibbits [Fri, 19 Aug 2022 19:47:32 +0000 (15:47 -0400)]
Mechanically convert vtbe(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37844

16 months agoMechanically convert mana to IfAPI
Justin Hibbits [Fri, 19 Aug 2022 16:06:32 +0000 (12:06 -0400)]
Mechanically convert mana to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37835

16 months agoMechanically convert oce(4) to IfAPI
Justin Hibbits [Fri, 19 Aug 2022 15:51:49 +0000 (11:51 -0400)]
Mechanically convert oce(4) to IfAPI

Reviewed By: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37829

16 months agoMechanically convert liquidio(4) to IfAPI
Justin Hibbits [Wed, 17 Aug 2022 20:45:22 +0000 (16:45 -0400)]
Mechanically convert liquidio(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37828

16 months agoMechanically convert vnic to IfAPI
Justin Hibbits [Wed, 17 Aug 2022 20:42:35 +0000 (16:42 -0400)]
Mechanically convert vnic to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37827

16 months agoMechanically convert mlx4(4) to IfAPI
Justin Hibbits [Wed, 17 Aug 2022 20:30:39 +0000 (16:30 -0400)]
Mechanically convert mlx4(4) to IfAPI

Reviewed by: hselasky, zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37823

16 months agoMechanically convert sfxge(4) to IfAPI
Justin Hibbits [Wed, 17 Aug 2022 20:15:14 +0000 (16:15 -0400)]
Mechanically convert sfxge(4) to IfAPI

Reviewed by: arybchik, zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37817

16 months agoMechanically convert if_sume(4) to IfAPI
Justin Hibbits [Tue, 1 Mar 2022 19:54:34 +0000 (13:54 -0600)]
Mechanically convert if_sume(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37808

16 months agoMechanically convert stge(4) to IfAPI
Justin Hibbits [Tue, 1 Mar 2022 19:51:27 +0000 (13:51 -0600)]
Mechanically convert stge(4) to IfAPI

Reviewed By: zlei, melifaro
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37807

16 months agoMechanically convert usb_ethernet(4) to IfAPI
Justin Hibbits [Tue, 1 Mar 2022 19:19:18 +0000 (13:19 -0600)]
Mechanically convert usb_ethernet(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37802

16 months agoMechanically convert if_xae to IfAPI
Justin Hibbits [Tue, 1 Mar 2022 17:00:21 +0000 (11:00 -0600)]
Mechanically convert if_xae to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37797

16 months agoMechanically convert atse(4) to IfAPI
Justin Hibbits [Tue, 1 Mar 2022 16:28:01 +0000 (10:28 -0600)]
Mechanically convert atse(4) to IfAPI

Reviewed by: zlei
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37795

16 months agoOpenSSL: Regen manual pages for OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 19:01:15 +0000 (14:01 -0500)]
OpenSSL: Regen manual pages for OpenSSL 1.1.1t

16 months agoOpenSSL: Regen assembly files for OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:55:17 +0000 (13:55 -0500)]
OpenSSL: Regen assembly files for OpenSSL 1.1.1t

16 months agoOpenSSL: Merge OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:54:16 +0000 (13:54 -0500)]
OpenSSL: Merge OpenSSL 1.1.1t

16 months agoOpenSSL: Merge OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:51:38 +0000 (13:51 -0500)]
OpenSSL: Merge OpenSSL 1.1.1t
Merge commit '0d51f658515c605fcc4a8073cb5a8e0d7d904088'

16 months agotarfs: Silence warnings when no supported compression is enabled.
Dag-Erling Smørgrav [Tue, 7 Feb 2023 17:27:35 +0000 (18:27 +0100)]
tarfs: Silence warnings when no supported compression is enabled.

Some of the code in sys/fs/tarfs/tarfs_io.c is not specific to zstd, but is still only used when some form of decompression is enabled.  Put it behind #ifdef TARFS_ZIO to silence warnings.

Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D38415

16 months agoinpcb: immediately return matching pcb on lookup
Gleb Smirnoff [Tue, 7 Feb 2023 17:21:52 +0000 (09:21 -0800)]
inpcb: immediately return matching pcb on lookup

This saves a lot of CPU cycles if you got large connection table.

The code removed originates from 413628a7e3d, a very large changeset.
Discussed that with Bjoern, Jamie we can't recover why would we ever
have identical 4-tuples in the hash, even in the presence of jails.
Bjoern did a test that confirms that it is impossible to allocate an
identical connection from a jail to a host. Code review also confirms
that system shouldn't allow for such connections to exist.

With a lack of proper test suite we decided to take a risk and go
forward with removing that code.

Reviewed by: gallatin, bz, markj
Differential Revision: https://reviews.freebsd.org/D38015

16 months agotcp: use straight in_pcbconnect() in tcp_connect()
Gleb Smirnoff [Tue, 7 Feb 2023 17:21:52 +0000 (09:21 -0800)]
tcp: use straight in_pcbconnect() in tcp_connect()

This brings tcp_connect() par with tcp6_connect().  The code removed
now is a remnant of "truncating old TIME-WAIT" removed back in 2004
in c94c54e4df9a.

Reviewed by: markj, tuexen
Differential Revision: https://reviews.freebsd.org/D38405

16 months agoImport OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 17:05:11 +0000 (12:05 -0500)]
Import OpenSSL 1.1.1t

16 months agolocal-unbound-setup: Use default root certificates
Tijl Coosemans [Thu, 19 Jan 2023 17:13:35 +0000 (18:13 +0100)]
local-unbound-setup: Use default root certificates

Don't force /etc/ssl/cert.pem.  It does not exist by default, only if
security/ca_root_nss is installed.  Just use the default OpenSSL search
locations which are /etc/ssl/cert.pem and /etc/ssl/certs/.

The tls-system-cert option was added in Unbound 1.16.0.

Reviewed by: zlei
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38243

16 months agobsdlabel: Fix whitespace.
Dmitry Chagin [Tue, 7 Feb 2023 07:43:40 +0000 (10:43 +0300)]
bsdlabel: Fix whitespace.

MFC after: 1 week

16 months agobsdlabel: Remove a write-only variable.
Dmitry Chagin [Tue, 7 Feb 2023 07:43:18 +0000 (10:43 +0300)]
bsdlabel: Remove a write-only variable.

Since r149061 (2005) the total_size variable is write-only.

Differential Revision: https://reviews.freebsd.org/D38368
MFC after: 2 weeks

16 months agocxgbe T6 KTLS: Use intotcpcb().
John Baldwin [Tue, 7 Feb 2023 01:05:18 +0000 (17:05 -0800)]
cxgbe T6 KTLS: Use intotcpcb().

Fixes: e68b3792440c tcp: embed inpcb into tcpcb
Sponsored by: Chelsio Communications

16 months agossh: default X11Forwarding to no, following upstream
Ed Maste [Mon, 14 Nov 2022 20:24:54 +0000 (15:24 -0500)]
ssh: default X11Forwarding to no, following upstream

Administrators can enable it if required.

Reviewed by: bz, kevans
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37411

16 months agoSkip if_wg regression tests if module doesn't exist
Olivier Cochard [Mon, 6 Feb 2023 23:06:48 +0000 (00:06 +0100)]
Skip if_wg regression tests if module doesn't exist

Approved by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D38406

16 months agousr.sbin/kbdcontrol.c: Add backwards compatibility functions
Stefan Eßer [Mon, 6 Feb 2023 22:56:44 +0000 (23:56 +0100)]
usr.sbin/kbdcontrol.c: Add backwards compatibility functions

This commit allows a kbdcontrol binary built with a version of kbio.h
that supports Unicode characters in dead key maps to load and display
keymaps including the dead key tables on a kernel built with a
previous version of kbio.h (that only supported 8 bit characters in
the dead key map).

This commit is meant as a temporary compatibility shim that will be
reverted when it can be assumed that all relevant systems have been
upgraded to a kernel that uses the updated kbio.h.

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38388

16 months agoSupport Unicode characters in keymap dead key tables
Stefan Eßer [Mon, 6 Feb 2023 22:48:47 +0000 (23:48 +0100)]
Support Unicode characters in keymap dead key tables

Support for Unicode characters had been added to the keyboard code,
but there are keymaps that have accented characters accessed via dead
key combinations, and those were still restricted to 8 bit codes.

This update to kbd.c adds support for Unicode characters and
compatibility code that allows a kbdcontrol command built from kbio.h
without these patches to work on a new kernel.

Compatibility code that allows a new kbdcontrol binary running on an
old kernel to load and display the dead key map will be committed in a
separate commit.

Reviewed by: imp, brooks
Approved by: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D38381

16 months agoirdma(4): Add code for compilation on stable/13 branch
Bartosz Sobczak [Mon, 6 Feb 2023 22:37:39 +0000 (14:37 -0800)]
irdma(4): Add code for compilation on stable/13 branch

Current content of the irdma(4) driver consists only of code that is
compilable on current 14-CURRENT branch which makes it impossible to
merge into stable/13 branch because of missing dependencies in the ofed
tree.

This patch adds missing code that allows for merging into stable branch.
Once it is there, code relating only to version 14 or higher should be
removed.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
MFC after: 1 day
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38170

16 months agoem(4): Add IDs for new Intel(R) I219 devices
Piotr Kubaj [Mon, 6 Feb 2023 22:31:00 +0000 (14:31 -0800)]
em(4): Add IDs for new Intel(R) I219 devices

These include I219 (20) through I219 (23), which ends at Raptor Lake.

This also corrects a discrepancy where the (16) devices should be
mac type "e1000_pch_tgp" and not "e1000_pch_adp".

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
PR: 269224
Reviewed by: erj@
MFC after: 1 day
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38376

16 months agoamd64 pmap: patch up a comment in pmap_init_pv_table
Mateusz Guzik [Mon, 6 Feb 2023 22:33:28 +0000 (22:33 +0000)]
amd64 pmap: patch up a comment in pmap_init_pv_table

Requested by: jhb

16 months agoLinuxKPI: return an address string in pci_name()
Val Packett [Mon, 6 Feb 2023 21:50:13 +0000 (21:50 +0000)]
LinuxKPI: return an address string in pci_name()

amdgpu's virtual display feature uses pci_name() to match a module parameter
string, and the documentation shows an example of `0000:26:00.0` for the name.
In our case the name was just `drmn`, which is not actually unique across
devices.

The other consumers are wireless drivers, which will benefit from this
change.

Generate the expected string for pci_name() to return.

Related to: https://github.com/freebsd/drm-kmod/issues/134
Sponsored by: https://www.patreon.com/valpackett
Reviewed by: bz, hselasky, manu (earlier)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34248

16 months agossh: update to OpenSSH 9.2p1
Ed Maste [Mon, 6 Feb 2023 21:54:56 +0000 (16:54 -0500)]
ssh: update to OpenSSH 9.2p1

Release notes are available at https://www.openssh.com/txt/release-9.2

OpenSSH 9.2 contains fixes for two security problems and a memory safety
problem.  The memory safety problem is not believed to be exploitable.
These fixes have already been committed to OpenSSH 9.1 in FreeBSD.

Some other notable items from the release notes:

 * ssh(1): add a new EnableEscapeCommandline ssh_config(5) option that
   controls whether the client-side ~C escape sequence that provides a
   command-line is available. Among other things, the ~C command-line
   could be used to add additional port-forwards at runtime.

 * sshd(8): add support for channel inactivity timeouts via a new
   sshd_config(5) ChannelTimeout directive. This allows channels that
   have not seen traffic in a configurable interval to be
   automatically closed. Different timeouts may be applied to session,
   X11, agent and TCP forwarding channels.

 * sshd(8): add a sshd_config UnusedConnectionTimeout option to
   terminate client connections that have no open channels for a
   length of time. This complements the ChannelTimeout option above.

 * sshd(8): add a -V (version) option to sshd like the ssh client has.

 * scp(1), sftp(1): add a -X option to both scp(1) and sftp(1) to
   allow control over some SFTP protocol parameters: the copy buffer
   length and the number of in-flight requests, both of which are used
   during upload/download. Previously these could be controlled in
   sftp(1) only. This makes them available in both SFTP protocol
   clients using the same option character sequence.

 * ssh-keyscan(1): allow scanning of complete CIDR address ranges,
   e.g.  "ssh-keyscan 192.168.0.0/24". If a CIDR range is passed, then
   it will be expanded to all possible addresses in the range
   including the all-0s and all-1s addresses. bz#976

 * ssh(1): support dynamic remote port forwarding in escape
   command-line's -R processing. bz#3499

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

16 months agoccr,ccp: Fix argument order to sglist_append_vmpages.
John Baldwin [Mon, 6 Feb 2023 21:51:57 +0000 (13:51 -0800)]
ccr,ccp: Fix argument order to sglist_append_vmpages.

The offset comes before the byte count.

Reported by: br
Reviewed by: asomers, markj
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D38375

16 months agocontrib/bc: uodate to version 6.2.4
Stefan Eßer [Mon, 6 Feb 2023 21:33:56 +0000 (22:33 +0100)]
contrib/bc: uodate to version 6.2.4

This update contains only documentation changes (new main repository
URL and changed mail address of the program author) and changes to
the build system that do not affect the FreeBSD base system build.

MFC after: 3 days

16 months agoenic: convert to IfAPI
Doug Ambrisko [Mon, 6 Feb 2023 21:17:15 +0000 (13:17 -0800)]
enic: convert to IfAPI

Prompted by: jhibbits

16 months agoFix _REVISION to be always major.minor
Eugene M. Kim [Fri, 11 Mar 2022 04:32:00 +0000 (20:32 -0800)]
Fix _REVISION to be always major.minor

Introduced in commit 613fe53, _REVISION was redefined to be just the
major version (14) instead of major.minor (14.0) iff:

  - PKG_VERSION was not overridden (default), and
  - Branch was -CURRENT, -STABLE, or -PRERELEASE.

This introduced side effects in other parts of the code which expected
_REVISION to be major.minor:

  - make-pkg-package.sh target triple became amd64-portbld-freebsd14
    (should be amd64-portbld-freebsd14.0);
  - Versioned cross dev symlink name became amd64-freebsd14-<tool>
    (should be amd64-freebsd14.0-<tool>)

Also, compounded with commit ea9a92d (which was introduced afterward
and removed minor version from _REVISION incorrectly using :S with a
regex) this also caused pkgbase repo to use a wrong PKG_ABI with a minor
version (FreeBSD:14.0:amd64) when a custom PKG_VERSION was specified.
(Note, without a custom PKG_VERSION the bug was not triggered because in
that case _REVISION was already major-only.)

This commit fixes both problems by introducing and using MAJOR_REVISION
instead of redefining _REVISION.  Existing uses of _REVISION now see
major.minor again, except PKG_ABI (ex: FreeBSD:14:amd64, as described
above) and PKG_VERSION (ex: 14.snap20220311121531) need only the major
version and now use MAJOR_REVISION instead.

PR: 262600, 262601
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/592

16 months agomge(4): Fix build after IfAPI conversion
Justin Hibbits [Mon, 6 Feb 2023 20:45:02 +0000 (15:45 -0500)]
mge(4): Fix build after IfAPI conversion

Fixes: 98fe10c8fc08
Sponsored by: Juniper Networks, Inc.

16 months agosbni(4): Fix i386 build
Justin Hibbits [Mon, 6 Feb 2023 20:41:20 +0000 (15:41 -0500)]
sbni(4): Fix i386 build

Fixes: 3fba06ad
Sponsored by: Juniper Networks, Inc.

16 months agodb_printf: fix a typo
Maxim Konovalov [Mon, 6 Feb 2023 20:41:05 +0000 (20:41 +0000)]
db_printf: fix a typo

PR: 269377

16 months agomd5/tests: extend md5 test
Stefan Eßer [Mon, 6 Feb 2023 20:11:51 +0000 (21:11 +0100)]
md5/tests: extend md5 test

The testloop function is called with various parameters, but those
were ignored in the coreutils-c-test script. This was an oversight
and is fixed by passing the option to all invocations of the hash
functions in this test script.

Reported by: des
MFC after: 3 days

16 months agotsec(4): Fix the build from IfAPI conversion
Justin Hibbits [Mon, 6 Feb 2023 20:21:34 +0000 (15:21 -0500)]
tsec(4): Fix the build from IfAPI conversion

Fixes: 47842ecfe
Sponsored by: Juniper Networks, Inc.

16 months agolibdtrace: add riscv support
Mitchell Horne [Tue, 10 Jan 2023 15:50:00 +0000 (11:50 -0400)]
libdtrace: add riscv support

Largely untested, as we can't really do anything with user probes
without an implementation of fasttrap. However, this is enough to
generate an embedded dtrace program with `dtrace -G` and link the
generated ELF file.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38301

16 months agolibdtrace: drop remaining mips support
Mitchell Horne [Mon, 6 Feb 2023 18:20:45 +0000 (14:20 -0400)]
libdtrace: drop remaining mips support

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38300

16 months agodtrace: implement riscv dtrace_getustackdepth()
Mitchell Horne [Mon, 6 Feb 2023 18:23:42 +0000 (14:23 -0400)]
dtrace: implement riscv dtrace_getustackdepth()

Pretty trivial following other implementations. The existing
dtrace_getustack_common() does most of the work.

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38303

16 months agodtrace: Fix RISC-V user stack unwinder
Jessica Clarke [Mon, 6 Feb 2023 18:30:57 +0000 (14:30 -0400)]
dtrace: Fix RISC-V user stack unwinder

The unwind logic was copied from AArch64 which follows the peculiar
AACPS (where, unlike typical RISC architectures, its frame pointer
follows an x86/stack machine-like convention where the frame pointer
points at the bottom of the frame record, not the top). Delete the
pointless riscv_frame struct and fix this.

Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28054

16 months agodtrace: handle page faults in riscv dtrace_trap()
Mitchell Horne [Mon, 6 Feb 2023 18:08:35 +0000 (14:08 -0400)]
dtrace: handle page faults in riscv dtrace_trap()

We must detect the correct amount to increment sepc, as it may have been
a compressed instruction that triggered the fault.

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38299

16 months agodtrace_asm.S: properly enter/exit user access
Mitchell Horne [Mon, 6 Feb 2023 18:04:21 +0000 (14:04 -0400)]
dtrace_asm.S: properly enter/exit user access

In order to read or write userspace memory without generating an access
fault, we must first enable the SUM bit in the sstatus CSR.

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38298

16 months agoAllow sysctl hw.machine/hw.machine_arch in capability mode
Val Packett [Sun, 5 Feb 2023 20:52:50 +0000 (17:52 -0300)]
Allow sysctl hw.machine/hw.machine_arch in capability mode

There's no harm in reading strings like 'amd64'.

Reviewed by: emaste, manu
Sponsored by: https://www.patreon.com/valpackett
Differential Revision: https://reviews.freebsd.org/D28703

16 months agoRemove Doxyfiles for recently removed drivers.
Justin Hibbits [Mon, 6 Feb 2023 18:08:37 +0000 (13:08 -0500)]
Remove Doxyfiles for recently removed drivers.

16 months agoRemove gxemul drivers.
Justin Hibbits [Mon, 6 Feb 2023 18:06:25 +0000 (13:06 -0500)]
Remove gxemul drivers.

These were MIPS-only.

16 months agoMechanically convert mxge(4) to IfAPI
Justin Hibbits [Mon, 19 Sep 2022 20:41:35 +0000 (16:41 -0400)]
Mechanically convert mxge(4) to IfAPI

Reviewed by: gallatin
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37848

16 months agoMechanically convert sge(4) to IfAPI
Justin Hibbits [Wed, 17 Aug 2022 20:14:43 +0000 (16:14 -0400)]
Mechanically convert sge(4) to IfAPI

Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37816

16 months agoMechanically convert age(4), alc(4), and ale(4) to IfAPI
Justin Hibbits [Tue, 2 Nov 2021 14:17:56 +0000 (09:17 -0500)]
Mechanically convert age(4), alc(4), and ale(4) to IfAPI

Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37787

16 months agoMechanically convert al_eth(4) to IfAPI
Justin Hibbits [Fri, 19 Aug 2022 16:05:38 +0000 (12:05 -0400)]
Mechanically convert al_eth(4) to IfAPI

Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37834