Commit graph

19282 commits

Author SHA1 Message Date
Warner Losh
82a8b8f0cf lastcomm/sa: Remove sparc64 tests, they aren't needed.
Fix delete-old, since 22375931 MFC, annoy to delete them manually
every make delete-old.

These tests will run only on a sparc64 system, and so never run anymore.

Sponsored by:		Netflix

(cherry picked from commit d6dffbae96)
2022-07-13 14:17:40 +03:00
Mateusz Piotrowski
444a6c982f sesutil.8: Polish
- Use right mdoc macros
- Fix synopsis. Some of the optional command modifiers were not optional
  after all.
- Sort options

MFC after:	1 week

(cherry picked from commit 4e3dc91e4c)
2022-07-12 10:39:48 +02:00
Gordon Bergling
0a93e8e360 snmp_hostres(3): Fix a typo in a debug message
- s/atempt/attempt/

(cherry picked from commit c7b9006af5)
2022-07-08 04:25:18 +02:00
Mateusz Piotrowski
2eec1db116 pkg.7: Clean up mdoc
MFC after:	1 week

(cherry picked from commit 3beedc3840)
2022-07-07 11:56:18 +02:00
Cy Schubert
e80d2b5448 wpa: Enable WEP by default
As of hostap 2.10, WEP is disabled by default. This of course is not a
bad thing but requires some planning and an announcment to remove WEP
support by default. A possible src.conf knob or letting users know they
should use the port instead might different options.

(cherry picked from commit 7999a7f2a8)
2022-07-05 17:31:32 -07:00
Mateusz Piotrowski
2ff5f3e7d1 bhyve.8: Fix a typo
The Li macro is deprecated. Also, the Cm macro should be used here
instead for consistency with the rest of the manual and style.mdoc(5).

Fixes:		e47fe3183e bhyve: add ROM emulation
MFC after:	1 month

(cherry picked from commit 5e19a51853)
2022-06-29 10:23:19 +02:00
Mateusz Piotrowski
c49605d66f usbconfig.8: Sort flags according to style(9)
MFC after:	2 weeks

(cherry picked from commit 75a86e93e6)
2022-06-29 10:22:54 +02:00
Mateusz Piotrowski
6341ffcdeb usbconfig.8: Improve style and fix examples
- Use Ar macros for arguments
- Stylize the argument synopsis to the -d flag
- Change the width of the list to one of the actual tags in the list
- Stylize "ugen" and "/dev/ugen" with Cm as those are constant strings,
  which are usually treated as command modifiers.
- Break long lines to reduce the number of warnings from linters
- Fix examples; the -d flag is now required when specifying the unit and
  the address with the "dot notation".

MFC after:	2 weeks

(cherry picked from commit 5eafaf9e68)
2022-06-29 10:22:49 +02:00
Mateusz Piotrowski
49dc4b7d77 freebsd-update.8: Note availability of updates for ALPHA, BETA, and RC
While here, restructure the section about the binary updates
availability.

MFC after:	1 week

(cherry picked from commit 460ad988a9)
2022-06-29 10:22:00 +02:00
Mateusz Piotrowski
d33cf7a54f freebsd-update.8: Add --currently-running to synopsis
While here, sort flags in synopsis.

MFC after:	3 days

(cherry picked from commit f69f064483)
2022-06-29 10:21:54 +02:00
Cy Schubert
0fe8af4b2a wpa: Disable P2P in WPS
Disable P2P in WPS as it is not supported by FreeBSD. Also, it is not
enabled in wpa_supplicant so the WPS P2P code is redundant.

PR:		264238
Reported by:	adrian

(cherry picked from commit 3e8eb5c7f4)
2022-06-25 17:44:47 -07:00
Corvin Köhne
2131fdf0ba bhyve: use bhyve_config for SMBIOS strings
Some software uses SMBIOS entries to identify the system on which it's
running. In order to make it possible to use such software inside a VM,
SMBIOS entries should be configurable. Therefore, bhyve_config can be
used. While only a few SMBIOS entries might be of interest, it makes
sense that all SMBIOS entries are configurable. This way all SMBIOS
tables are build the same way and there's no special handling for some
tables.

Reviewed by:	jhb
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34465

(cherry picked from commit 8284799a23)
2022-06-20 17:05:36 +02:00
Ed Maste
e9f3e82446 pkg-bootstrap: use latest package set on arm64 stable branches
As with i386 and amd64, "latest" packages are available on stable
branches for arm64/aarch64.

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

(cherry picked from commit f92e0d6acd)
2022-06-20 09:19:52 -04:00
Alan Somers
1a2920e96a makefs: fix calculation of file sizes
When a new FS image is created we need to calculate how much space each
file is going to consume.
Fix two bugs in that logic:

1) Count the space needed for indirect blocks for large files.
1) Normally the trailing data of a file is written to a block of frag
   size, 4 kB by default.

However for files that use indirect blocks a full block is allocated,
32kB by default.  Take that into account.

Adjust size calculations to match what is done in ffs_mkfs routine:

* Depending on the UFS version the superblock is stored at a different
  offset. Take that into account.
* Add the cylinder group block size.
* All of the above has to be aligned to the block size.

Finally, Remove "ncg" variable. It's always 1 and it was used to
multiply stuff.

PR:		229929
Reviewed by:	mckusick
Sponsored by:	Semihalf
Submitted by:	Kornel Dulęba <mindal@semihalf.com>
Differential Revision:	https://reviews.freebsd.org/D35131
Differential Revision:	https://reviews.freebsd.org/D35132

(cherry picked from commit ecdc04d006)
2022-06-18 08:17:23 -06:00
Marc Fonvieille
3a0fcdb37d bsdinstall/scripts/docsinstall: Add Indonesian Documentation
Add Indonesian Documentation to docinstall menu.

Approved by:	doceng (implicit) re (gjb, implicit)
MFC after:	1 week

(cherry picked from commit 45ef6b4b5d)
2022-06-17 16:31:01 +02:00
Ed Maste
6678474be7 makefs: sort cd9660 sysid entries in man page
"efi" was added at the end of the sysid list rather than in alpha
order.  Move it as a diff reduction against NetBSD.

(cherry picked from commit ec3c01ae72)
2022-06-16 08:49:43 -04:00
Doug Rabson
2dfa77ed70 pkgbase: Move pw to the runtime package
This allows building a container image with enough functionality for
downloading and installing packages without having to include the
utilities package.

Reviewed by: manu
MFC after:   2 weeks

(cherry picked from commit 5e9c888a7a)
2022-06-13 11:03:52 +01:00
Gordon Bergling
95d4d86149 fstype(8): Fix two typos in source code comments
- s/auxillary/auxiliary/

(cherry picked from commit df4da2d6b7)
2022-06-10 14:32:48 +02:00
Gordon Bergling
ebc14d619c ac(8): Fix a typo in a source code comment
- s/chosing/choosing/

(cherry picked from commit 10924c4fc3)
2022-06-10 14:29:35 +02:00
Gordon Bergling
306c6832cb acpi(4): Fix a typo in a debug statement
- s/Efficency/tEfficiency/

Obtained from:	NetBSD

(cherry picked from commit 0b4302aa93)
2022-06-10 14:27:06 +02:00
Rick Macklem
9af6cedd27 rpc.tlsclntd: Add the -2 option to the man page
Since the KTLS now supports TLS1.3, the daemons default
to version 1.3, since the draft (to be an RFC someday)
requires TLS1.3.

However, since FreeBSD 13,0, 13,1 uses TLS1.2 for
NFS-over-TLS, the "-2" option is added to both daemons
for compatibility with FreeBSD 13.0, 13.1.

This patch updates the man pages for this.

This is a content change.

(cherry picked from commit 915fc1afe5)
2022-06-04 18:13:07 -07:00
Rick Macklem
365704ad71 rpc.tlsclntd: Update the man page for the -C option
Commit f5b40aa0de modifies the -C command line option
for rpc.tlsclntd to use the TLS 1.3 SSL_CTX_set_ciphersuites().

This patch updates the man page for this modified command
line option.

This is a content change.

(cherry picked from commit 0bf3f379e1)
2022-06-04 18:11:54 -07:00
Rick Macklem
721a597346 rpc.tlsservd: Add the -2 option to the man page
Since the KTLS now supports TLS1.3, the daemons default
to version 1.3, since the draft (to be an RFC someday)
requires TLS1.3.

However, since FreeBSD 13,0, 13,1 uses TLS1.2 for
NFS-over-TLS, the "-2" option is added to both daemons
for compatibility with FreeBSD 13.0, 13.1.

This patch updates the man pages for this.

This is a content change.

(cherry picked from commit e2c72fecfc)
2022-06-04 18:05:20 -07:00
Rick Macklem
be4e16e981 rpc.tlsservd: Update the man page for the -C option
Commit 712aac1389 adds a new -C command line option
to rpc.tlsservd.

This patch updates the man page for this new command
line option.

This is a content change.

(cherry picked from commit d94358e29d)
2022-06-04 18:04:13 -07:00
Rick Macklem
934aa8b5d0 rpc.tlsclntd: Add the -2 option to the usage line
Commit 72bf76d6b8 added the -2 option to use
TLS 1.2 NFS-over-TLS mounts.  It did not add -2
to the usage message.

This patch adds -2 to the usage message.

(cherry picked from commit b387a075d9)
2022-06-04 17:57:56 -07:00
Rick Macklem
927f75933b rpc.tlsclntd: Modify the -C option to use SSL_CTX_set_ciphersuites
Commit 0b4f2ab0e9 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
This patch replaces SSL_CTX_set_cipher_list() with
SSL_CTX_set_ciphersuites(), since that is the function
that is used for TLS1.3.

The man page will be updated in a separate commit.

(cherry picked from commit f5b40aa0de)
2022-06-04 17:56:51 -07:00
Rick Macklem
e080b609a8 rpc.tlsservd: Delete set but unused variable
(cherry picked from commit 350668eb09)
2022-06-04 17:51:46 -07:00
Rick Macklem
1384d18827 rpc.tlsservd: Add the -2 option to the usage line
Commit 0637b12b13 added the -2 option to allow
TLS 1.2 NFS-over-TLS mounts.  It did not add -2
to the usage message.

This patch adds -2 to the usage message.

(cherry picked from commit b4fa7fde15)
2022-06-04 17:47:07 -07:00
Rick Macklem
2c59ffb057 rpc.tlsservd: Modify the -C option to use SSL_CTX_set_ciphersuites
Commit 0b4f2ab0e9 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
This patch replaces SSL_CTX_set_cipher_list() with
SSL_CTX_set_ciphersuites(), since that is the function
that is used for TLS1.3.

(cherry picked from commit 8d098deda3)
2022-06-04 17:45:31 -07:00
Rick Macklem
45f0c52fa1 rpc.tlsclntd: Add an option to force use of TLS version 1.2
Commit 0b4f2ab0e9 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
Since FreeBSD 13.0, 13.1 use TLS version 1.2 for
NFS-over-TLS mounts, this command line option
may be used so that NFS-over-TLS mounts to 13.0, 13.1
servers will still work.

Without the command line option, NFS-over-TLS mounts
will use TLS version 1.3.

The man page update will be a separate commit.

(cherry picked from commit 72bf76d6b8)
2022-06-02 19:15:40 -07:00
Rick Macklem
81b2ab5113 rpc.tlsservd: Add an option to allow TLS version 1.2
Commit 0b4f2ab0e9 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
Since FreeBSD 13.0, 13.1 use TLS version 1.2 for
NFS-over-TLS mounts, this command line option
may be used so that mounts from 13.0, 13.1 will still work.

Without the command line option, only TLS version 1.3
mounts are permitted.

The man page update will be a separate commit.

(cherry picked from commit 0637b12b13)
2022-06-02 19:14:13 -07:00
Rick Macklem
79eb3b3d3f rpc.tlsclntd, rpc.tlsservd: Fix getopt_long argument
The "C" option in the argument to getopt_long() was
missing a ":" for both rpc.tlsclntd.c and rpc.tlsservd.c.
This patch fixes this.

(cherry picked from commit 15881823b9)
2022-06-02 19:10:58 -07:00
Rick Macklem
146e1dbbf6 rpc.tlsservd: Add a -C command line option for preferred_ciphers
rpc.tlsclntd has a -C command line option for setting
preferred_ciphers.  Testing at a recent IETF NFSv4 testing
event showed that setting preferred_ciphers is not normally
needed for the rpc.tlsservd.

This patch modifies rpc.tlsservd to not specify preferred_ciphers
by default, but provides the same -C option as rpc.tlsclntd to
set preferred_ciphers, in case it is needed.

The man page update will be done as a separate commit.

(cherry picked from commit 712aac1389)
2022-06-02 19:09:41 -07:00
Mark Johnston
e5b204542f makefs: Remove execute permission from in-tree test scripts
Let the build system set it as needed.  No functional change intended.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 21add93b58)
2022-05-26 09:42:39 -04:00
Mark Johnston
bee87a7381 makefs: Fix warnings and reset WARNS to the default
Leave -Wcast-align disabled, at least for now, since there are numerous
instances of that warning in places where buffer pointers are cast to
pointers to various filesystem structures.  Fixing this properly would
be too much work for too little gain.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit cc1a53bc1a)
2022-05-24 09:51:36 -04:00
Rick Macklem
74c4cb9cc3 rpc.tlsservd: Add logging of TLS version and cipher used
This patch adds logging of the version of TLS and cipher
negotiated successfully by the TLS handshake for each client,
if the "-v" command line option has been specified.

This information may be useful for monitoring and debugging
NFS-over-TLS mounts.

(cherry picked from commit d71c9f1468)
2022-05-23 18:02:18 -07:00
John Baldwin
263efa6c4a iscsid: Push #ifdef ICL_KERNEL_PROXY into cap_ioctl_limits list.
This reduces duplication in the two lists and makes it clearer which
ioctls are needed in the ICL_KERNEL_PROXY case.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34927

(cherry picked from commit f0df722733)
2022-05-17 14:15:13 -07:00
Corvin Köhne
95c6bc5a03 bsdinstall/script: umount before zpool export
When running zpool export first, boot/efi and dev is still mounted so
zpool export fails. By running bsdinstall umount first the pool can be
cleanly exported.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35114
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC After:		3 days

(cherry picked from commit 450b4ac23c)
2022-05-16 17:24:56 +02:00
Corvin Köhne
45eb93a964 bsdinstall: stop messing with file descriptors
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). By closing file descriptor 3 here, the
final f_dprintf "Installation Completed ... does not work anymore.

By putting the code into a subshell, file descriptors can be edited
without interference with the calling script.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35113
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC after:		3 days

(cherry picked from commit 1f7746d81f)
2022-05-16 17:24:56 +02:00
Corvin Köhne
8c119b3b71 bhyve: avoid uninitialized variable
Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34688
(cherry picked from commit 8ac8adda8d)
2022-05-16 17:24:33 +02:00
Corvin Köhne
1b3141c630 bhyve: avoid overflow of BAR index
At the moment, writes to BAR registers that aren't 4 byte aligned are
ignored. So, there's no overflow yet. Nevertheless, if this behaviour
changes in the future, it could unintentionally, introduce a buffer
overflow. Additionally, some compiler or tools will detect this
potential overflow and complain about it.

Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34689
(cherry picked from commit 45ddbf2112)
2022-05-16 17:24:33 +02:00
Corvin Köhne
469a4e669d bhyve: avoid an empty passthru config value
pci_parse_legacy_config splits the options string by comma characters.
strchr returns a pointer to the first occurence of a character. In that
case, it's a comma. So, pci_parse_legacy_config will stop at the first
character and creates a new config node with a name of NULL.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34600

(cherry picked from commit 3256b7ca36)
2022-05-16 17:24:33 +02:00
Alexander Motin
718cb64a1f mpsutil: Fix device speed reporting.
Report controller SAS phy speed only for directly attached devices.
For others try to read and report parent expander phy speed.

MFC after:	1 week

(cherry picked from commit bce02a0ea4)
2022-05-16 09:53:02 -04:00
Alexander Motin
9d06207226 mpsutil: fix set but not used warning
MFC after:	1 week

(cherry picked from commit 53c184cf06)
2022-05-16 09:53:02 -04:00
Scott Long
ef303790ef Fix formatting of the usage() output
(cherry picked from commit 638e2a132e)
2022-05-16 09:53:01 -04:00
Corvin Köhne
122f386053 bhyve/usage: memory size is not in MB
For backward compatibility, the memory size will be interpreted in MB if
it's smaller than1 MB and has no suffix. Nowadays, the -m switch accepts
more than just MB. Respect it in the usage message.

Differential Revision:	https://reviews.freebsd.org/D34506
Reviewed by:	grehan
Sponsored by:   Beckhoff Automation GmbH & Co. KG
MFC after:      1 month

(cherry picked from commit afd4f7fa25)
2022-05-16 14:41:14 +02:00
Corvin Köhne
346876412a bhyve: add ROM emulation
Some PCI devices especially GPUs require a ROM to work properly.
The ROM is executed by boot firmware to initialize the device.
To add a ROM to a device use the new ROM option for passthru device
(e.g. -s passthru,0/2/0,rom=<path>/<to>/<rom>).

It's necessary that the ROM is executed by the boot firmware.
It won't be executed by any OS.
Additionally, the boot firmware should be configured to execute the
ROM file.
For that reason, it's only possible to use a ROM when using
OVMF with enabled bus enumeration.

Differential Revision:	https://reviews.freebsd.org/D33129
Sponsored by:   Beckhoff Automation GmbH & Co. KG
MFC after:      1 month

(cherry picked from commit e47fe3183e)
2022-05-16 14:41:14 +02:00
Corvin Köhne
7c6d3eb009 bhyve: export funcs for read/write pci config
Export functions for reading and writing the pci config space from passthru
device to be used by other devices.
This is required for lpc devices to set their vendor/device ids to their
physical values.
Otherwise, GPU passthrough for integrated Intel GPUs won't work properly.

Differential Revision:	https://reviews.freebsd.org/D33769
Reviewed by:	markj
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	1 month

(cherry picked from commit 563fd2240e)
2022-05-16 14:41:14 +02:00
Alan Somers
f7896015fc ctlstat: add prometheus output
When invoked by inetd, ctlstat -P will now produce output suitable for
ingestion into Prometheus.

It's a drop-in replacement for https://github.com/Gandi/ctld_exporter,
except that it doesn't report the number of initiators per target, and
it does report time and dma_time.

Sponsored by:	Axcient
Relnotes:	yes
Reviewed by: 	bapt, bcr
Differential Revision: https://reviews.freebsd.org/D29901

(cherry picked from commit 1a7f22d9c2)
2022-05-12 14:43:01 -06:00
Alan Somers
e4f508d5a2 prometheus_sysctl_exporter: fix metric aliasing
When exporting sysctls to Prometheus, the exporter replaces "." with
"_".  This caused several metrics to alias, confusing the Prometheus
server.  Fix it by:

* Renaming the "tcp_log_bucket" UMA zone to "tcp_log_id_bucket".  Also,
  rename "tcp_log_node" to "tcp_log_id_node" for consistency.

* Not exporting sysctls with "(LEGACY)" in the description.  That is
  used by ZFS sysctls that have been replaced by others, many of which
  alias to the same Prometheus metric name (like "vfs.zfs.arc_max" and
  "vfs.zfs.arc.max").

PR:		259607
Reported by:	delphij
Sponsored by:	Axcient
Reviewed by:	delphij,rew,thj
Differential Revision: https://reviews.freebsd.org/D34952

(cherry picked from commit 8c47d8f538)
2022-05-12 14:40:05 -06:00