Commit Graph

19573 Commits

Author SHA1 Message Date
Rick Macklem
72bf76d6b8 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.

MFC after: 	2 weeks
2022-05-20 14:57:42 -07:00
Rick Macklem
0637b12b13 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.

MFC after: 	2 weeks
2022-05-20 14:47:36 -07:00
Mark Johnston
21add93b58 makefs: Remove execute permission from in-tree test scripts
Let the build system set it as needed.  No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-05-19 11:46:02 -04:00
Gleb Popov
7eb6a92e3f jexec man: Explain how PATH is adjusted.
Add a sentence that explains that PATH is set to `/bin:/usr/bin`.
I had to dive into `jexec.c` to find this out.

Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D35251
2022-05-19 16:58:32 +03:00
Andrew Turner
190abf86bb Fix the name of Makefile.aarch64
Makefile.arm64 relies on being included via Makefile.${MACHINE}. This
only works when arm64 is the only aarch64 architecture. Switch to
Makefile.aarch64 so downstream CheriBSD can use the file when building
for Morello which uses a differen ${MACHINE} value.

Sponsored by:	Innovate UK
2022-05-19 11:30:21 +01:00
Ed Maste
ec3c01ae72 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.
2022-05-18 15:42:12 -04:00
Alan Somers
ecdc04d006 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
MFC after:	2 weeks
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
2022-05-16 16:32:10 -06:00
Brad Davis
147585b489 bsdinstall: allow whitelabeling the installer
Override OSNAME to change the name of the OS in the installer.

This is a first step, the shell changes will be separate.

Reviewed by:		allanjude
Approved by:		allanjude
Differential Revision:	https://reviews.freebsd.org/D34878
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2022-05-13 10:35:43 -06:00
Brad Davis
2c4499dcd7 bsdinstall: add missing init of fd variable
Missed breaking this commit into smaller pieces

Approved by:		kp
2022-05-13 09:06:02 -06:00
Brad Davis
964ad27f1e bsdinstall: Filter out devices that cannot be opened
Devices that cannot be opened are most likely the install media and
should not be listed as destinations.

Reviewed by:		allanjude
Approved by:		allanjude
Differential Revision:	https://reviews.freebsd.org/D34879
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2022-05-13 08:33:21 -06:00
Mark Johnston
cc1a53bc1a 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.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2022-05-10 17:38:23 -04:00
Alexander Motin
bce02a0ea4 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
2022-05-09 18:03:24 -04:00
Alexander Motin
53c184cf06 mpsutil: fix set but not used warning
MFC after:	1 week
2022-05-09 18:03:24 -04:00
Rick Macklem
d71c9f1468 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.

MFC after:	2 weeks
2022-05-06 14:03:43 -07:00
Yan Ka Chiu
3cdfaefa4b bhyve: Fix virtio-console legacy configuration parsing
virtio-console is currently missing .pe_legacy_config, which prevents any
portN configuration from being parsed, and therefore no sockets will be
created.

Reviewed by:	khng
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D35142
2022-05-06 15:34:17 -04:00
Rick Macklem
15881823b9 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.

MFC after:	2 weeks
2022-05-05 16:22:12 -07:00
Rick Macklem
712aac1389 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.

MFC after:	2 weeks
2022-05-05 15:54:14 -07:00
Corvin Köhne
450b4ac23c 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
2022-05-03 16:02:39 +02:00
Corvin Köhne
1f7746d81f 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
2022-05-03 16:02:27 +02:00
Ed Maste
6cd1bc5316 freebsd-update: restart sshd after upgrade
Sometimes the parent-child sshd protocol changes during an upgrade, and
when this happens sshd will not accept new connections until it is
restarted.

PR:		263489
Reviewed by:	kevans, gjb
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35109
2022-05-02 14:38:19 -04:00
Alfonso S. Siciliano
1ad9134e11
bsdinstall netconfig_ipv4: Fix resolv.conf rebuild
After an installation restart (for error or choice) dhclient does not
rebuild resolv.conf so `dialog --mixedform' of "Resolver Configuration"
in bsdinstall/scripts/netconfig draws empty forms. It causes a bad UX,
to see PR262262. Fixed resetting the interface before to run dhclient.

PR:			262262
Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35094
2022-04-30 17:34:53 +02:00
Alfonso S. Siciliano
9b4c606b96
bsdinstall/partedit: Fix UFS auto partitioning
Fix bsdinstall "Auto (UFS) Guided Disk Setup" and sade(8) "Auto".
The problem is a string comparison failure, it arose during the
dialog(3)/bsddialog(3) form conversion:

 * dialog uses only form.text while bsdialog differentiates between
   form.init and form.value.
 * dialog always allocates memory for form values while bsddialog only
   when a button is pressed.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35033
2022-04-30 01:24:23 +02:00
Robert Wing
690b7ea081 bhyve/snapshot: ..back to SOCK_STREAM
Now that nvlist_send()/nvlist_recv() are being used, ditch the datagram
socket.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34863
2022-04-28 07:43:01 -08:00
Rick Macklem
350668eb09 rpc.tlsservd: Delete set but unused variable 2022-04-26 19:29:01 -07:00
Mateusz Piotrowski
460ad988a9 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
2022-04-22 14:37:14 +02:00
Mateusz Piotrowski
f69f064483 freebsd-update.8: Add --currently-running to synopsis
While here, sort flags in synopsis.

MFC after:	3 days
2022-04-22 13:57:11 +02:00
Alan Somers
1a7f22d9c2 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.

MFC after:	2 weeks
Sponsored by:	Axcient
Relnotes:	yes
Reviewed by: 	bapt, bcr
Differential Revision: https://reviews.freebsd.org/D29901
2022-04-20 15:18:41 -06:00
Stefan Eßer
7a60e798fb rrenumd: remove a set-but-not-used variable 2022-04-20 17:02:24 +02:00
Gordon Bergling
b92667b302 inetd(8): Fix a typo in the manual page
- s/similarily/similarly/

MFC after:	3 days
2022-04-19 16:49:07 +02:00
Alan Somers
8c47d8f538 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
MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	delphij,rew,thj
Differential Revision: https://reviews.freebsd.org/D34952
2022-04-19 06:56:39 -06:00
John Baldwin
7b02c1e8c6 iscsi: Fetch limits based on a socket rather than assuming global limits.
cxgbei needs the ability to return different limits based on the
connection (e.g. if the connection is over a T5 adapter or a T6
adapter as well as factoring in the MTU).

This change plumbs through the changes in the ioctls without changing
any of the backends.  The limits callback passed to icl_register now
accepts a second socket argument which holds the integer file
descriptor.  To support ABI compatiblity for old binaries, the
callback should return "global" values if the socket fd is zero.

The CTL_ISCSI_LIMITS argument used with CTL_ISCSI by ctld(8) now
accepts the socket fd in a field that was previously part of a
reserved spare field.  Old binaries zero this request which results in
passing a socket fd of 0 to the limits callback.

The ISCSIDREQUEST ioctl no longer returns limits.  Instead, iscsid(8)
invokes a new ISCSIDLIMITS ioctl after establishing the connection via
connect(2).  For ABI compat, if the old ISCSIDREQUEST is invoked, the
global limits are still fetched (with a socket fd of 0) and returned.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34928
2022-04-18 12:53:28 -07:00
John Baldwin
f0df722733 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
2022-04-18 12:53:15 -07:00
Brooks Davis
a812a5cacb lpr: remove a.out binary detection
Since the first unattributed commit in 1981, lpr has attempted to
prevent users from printing executables (and in earlier versions
archives). Archive detection was lost in 1992 when lpr gained a
dependency on a.out.h. No corresponding support was added for ELF files
with the full transiation to ELF in 1998, but a.out support has been
dragged forward to and contaminated platforms that never supported
a.out.

While this feature isn't unuseful, preventing the printing of
a single file format we stopped producing ~20 years ago isn't worth
the costs (however minimal).

Reviewed by:	gad, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34901
2022-04-15 20:04:41 +01:00
Navdeep Parhar
811a82d53a cxgbetool(8): User interface to round-robin queue selection via COP.
Queue "roundrobin" in a COP rule means the driver should select queues
for new tids in a round-robin manner.

Reviewed by:	jhb@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34922
2022-04-14 15:54:13 -07:00
Cy Schubert
145330347f wpa: Remove extraneous slash (/)
Remove the trailing slash (/), indiciating continuation, from the last
line of SRCS. The next line is blank; this is a NOP.

MFC after:	3 days
2022-04-13 15:27:30 -07:00
Tom Jones
016bfb0a97 etcupdate: remove redundant diff3 flag
-A and -m select different output modes output modes for diff3. When
both flags are present gnu diff3 prefers -m, drop the extra -A flag in
etcupdate.

Reviewed by:	pstef, 0mp
MFC after:	3 days
Sponsored by:	Klara Inc
Differential Revision:	<https://reviews.freebsd.org/D###>
2022-04-13 16:05:32 +01:00
Alfonso S. Siciliano
94cb21cda6
tzsetup(8): Refactoring to delete dialog(3) code
Little refactoring to complete the conversion to bsddialog(3),
not functional changes:

 * Delete: remaining code for autosizing using BSDDIALOG_AUTOSIZE.
 * Add: constants to delete magical numbers and to avoid unclear
   returned values.
 * Delete: redundant 'conf.button.default_cancel=false', performed by
   bsddialog_initconf().
 * Add: a new function message_zoneinfo_file() to merge features.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34862
2022-04-12 00:38:40 +02:00
Brad Davis
be0d16b0b0 bsdinstall: filter out disks that are unavailable from the list of options in ZFS
Reviewed by:	allanjude, rew
Differential Revision:	https://reviews.freebsd.org/D34167
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-04-10 15:09:14 -06:00
Robert Wing
c79331a42c bhyve: use linker set for ipc commands
Reviewed by:	markj, jhb
Differential Revision:	https://reviews.freebsd.org/D34760
2022-04-09 18:46:00 -08:00
Gordon Bergling
c254580cc2 fstyp(8): Fix a typo in a source code comment
- s/Miscellanious/Miscellaneous/

MFC after:	3 days
2022-04-09 09:27:23 +02:00
Christian Weisgerber
81d1214e8a man pages: Fix typo
s/the the/the/

Approved by:	ygy (doc)
2022-04-07 14:58:13 +02:00
Ed Maste
c71ae91f19 vidcontrol: disable p, P, and H when vt(4) is in use
These options use the CONS_SCRSHOT ioctl to capture the contents of the
current console, which is not yet supported by vt(4).  Disable the
options when vt(4) is in use rather than emitting a possibly confusing
error message.

This change should be reverted if CONS_SCRSHOT is implemented for vt(4).

PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 20:26:43 -04:00
Ed Maste
1f4442f71f vidcontrol: be explicit that -p and -P are sc(4) only
PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 19:39:19 -04:00
Mark Johnston
b0aa20bec5 bhyve: validate e82545 checksum offset field
Reported by:	Mehdi Talbi, Synacktiv
2022-04-05 22:58:28 +00:00
Alfonso S. Siciliano
50e244964e
bsdinstall/partedit: Replace libdialog with libbsddialog
bsdinstall/partedit: Replace (LGPL) libdialog with (BSD-2-Clause)
libbsddialog. Rewrite diskeditor.c and rename diskmenu.c because
it uses an API for menu totally incompatible with libbsddialog.
This is a User Interface change everything else is unchanged.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34639
2022-04-04 02:05:00 +02:00
Mateusz Piotrowski
84733f2e96 pw.8: Do not specify full path to shell in examples
Providing a full path to a shell is discouraged in the description of
the -s flag. Let's follow the best practices in the examples.

MFC after:	1 week
2022-04-03 14:52:08 +02:00
Mateusz Piotrowski
5fce57dd12 efibootmgr: Use the hier(7) ESP mount point in examples
MFC after:	1 week
2022-04-03 14:52:07 +02:00
Jose Luis Duran
1a0bd2665a sysrc.8: Mention it requires chroot(8)
Option -R uses chroot(8). Mention it in the corresponding section.

MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D34630
2022-04-03 13:54:11 +02:00
Mateusz Piotrowski
5243e560f6 pw.8: Fix synopsis of NIS flags
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
a0177bd56a pw.8: Sorty synopsis flag
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
feb04c7b7c pw.8: Improve argument names
Arguments passed to flags like -d and -k had ambiguous names like "dir".
Change that to more descriptive names like "homedir".

Also, clarify that -u min,max is for UIDs and -i min,max for GIDs.

MFC after:	1 week
2022-04-03 13:54:09 +02:00
Alfonso S. Siciliano
6833ac673d
bsdinstall netconfig: Replace dialog(1) with bsddialog(1)
Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1).

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34682
2022-04-02 21:33:40 +02:00
Gordon Bergling
3b31bf26b4 cron(8): Fix a typo in the documentation
- s/commmand/command/

MFC after:	3 days
2022-04-02 15:16:33 +02:00
Gordon Bergling
a16977209b pnfsserver(4): Fix a typo in the manual page
- s/commmand/command/

MFC after:	3 days
2022-04-02 15:12:51 +02:00
Gordon Bergling
cf226430bb efivar(8): Fix a typo in a source code comment
- s/differnt/different/

MFC after:	3 days
2022-04-02 13:34:46 +02:00
Mateusz Piotrowski
39245a7d45 pw.8: Sort flags in synopsis
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
77fd0356ef pw.8: Use more appropriate mdoc macros
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
61e11ed9bd pw.8: Improve use of mdoc macros in description section
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Mateusz Piotrowski
5392b4fbb7 pw.8: Use Cm and Ar correctly in synopsis
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Corvin Köhne
3256b7ca36 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
2022-04-01 11:13:16 +02:00
Corvin Köhne
8ac8adda8d 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
2022-04-01 11:13:16 +02:00
Corvin Köhne
45ddbf2112 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
2022-04-01 11:13:16 +02:00
Ed Maste
27c2f016b8 fstyp: Correct comment: Raspberry Pi Pico, not Nano
Fixes:		868c1b8431 ("fstyp: detect Raspberry Pi Pico boot...")
2022-03-30 13:04:11 -04:00
Ed Maste
868c1b8431 fstyp: detect Raspberry Pi Pico boot filesystem as FAT
fstyp looks for a 0x55 0xAA signature at offset 510, but this is not
required by specifications and is not proivded by the Raspberry Pi Nano
bootloader.

We should really remove the signature check and implement a more
comprehensive BPB validation instead, but it will require more
investigation and testing.  For now just add a special case for the
Raspberry Pi Nano bootloader, to avoid introducing regressions or new
false positives.

PR:		262896
Reviewed by:	delphij
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34699
2022-03-29 17:33:15 -04:00
Jens Schweikhardt
e50daba0e4 Remove extraneous semicolons trailing break and continue statements. 2022-03-29 19:48:11 +02:00
Alfonso S. Siciliano
2617d4df52
bsdinstall mount: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34651
2022-03-29 16:54:51 +02:00
Alfonso S. Siciliano
48af6ad902
bsdinstall fetchmissingdists: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34654
2022-03-29 16:43:01 +02:00
Alfonso S. Siciliano
230811a883
bsdinstall/distfetch: Remove duplicate header
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34685
2022-03-29 16:19:57 +02:00
Mateusz Piotrowski
075999d3f1 Cross-reference nextboot(8) and freebsd-update(8)
MFC after:	1 week
2022-03-29 15:15:35 +02:00
Mateusz Piotrowski
15647a7106 freebsd-update.8: Fix use of mdoc(8) macros
- Use Ar for arguments.
- Use Cm for freebsd-update commands like "upgrade".
- Reference other manuals with Xr when possible.

MFC after:	1 week
2022-03-29 14:39:15 +02:00
Gordon Bergling
4e12c7c510 fstyp(8): Fix a few typos in source code comments
- s/mmaping/mapping/
- s/filesytem/filesystem/

MFC after:	3 days
2022-03-28 19:35:18 +02:00
Gordon Bergling
28a6b24729 cxgbetool(8): Fix a typo in the man page
- s/begining/beginning/

MFC after:	3 days
2022-03-28 19:33:44 +02:00
Gordon Bergling
8bcffb86c7 ypbind(8): Fix a typo in the man page
- s/ot/or/

MFC after:	3 days
2022-03-27 20:42:24 +02:00
Jamie Gritton
8f1543785f jail: handle jailsys parameters in modification permission test
Avoid a null dereference when a value-less jailsys parameter is passed
to "jail -m".  There was already code to handle boolean parameters,
but in reality any parameter could be passed without a value.
2022-03-25 19:16:51 -07:00
Alfonso S. Siciliano
0868f62176
bsdinstall checksum: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34660
2022-03-26 01:37:59 +01:00
Alfonso S. Siciliano
bbddd8888a
bsdinstall mirrorselect: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34582
2022-03-26 01:16:03 +01:00
Alfonso S. Siciliano
268c47b9ac
bsdinstall time: Revert dialog title
Revert dialog title like before dialog(1) replacement
0e5c72c3cc.

Reported by:		jrtc27
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34647
2022-03-26 00:52:21 +01:00
Alfonso S. Siciliano
852d975ccf
bsdinstall services: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34640
2022-03-26 00:22:10 +01:00
Farhan Khan
4b1e2c2f77 bsdinstall(8): Usage example of tar doesn't work
The order of arguments in the example does not work, because tar thinks
the directory is named -C, which does not exist and reports:
tar: Error opening archive: Failed to open '-C'

Approved by:	rpokala@ (src) on IRC
Differential Revision:	https://reviews.freebsd.org/D34649
2022-03-23 21:59:53 +01:00
Alfonso S. Siciliano
0e5c72c3cc
bsdinstall time: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility,
'dialog --calendar' is replaced by 'bsddialog --datebox' with same
features but different User Interface.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34583
2022-03-23 16:56:37 +01:00
Alfonso S. Siciliano
4d1ba6febf
bsdinstall hardening: Replace dialog with bsddialog
bsdinstall/scripts/hardening: Replace (LGPL) dialog utility with
(BSD-2-CLAUSE) dialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34102
2022-03-23 00:58:48 +01:00
Jens Schweikhardt
8422d54f40 Correct a handful of typos and grammos. 2022-03-22 21:12:42 +01:00
Hans Petter Selasky
95e96c00fd mixer.8: Document shorthand syntax for volume setting.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34614
Sponsored by:		NVIDIA Networking
2022-03-20 20:21:07 +01:00
Hans Petter Selasky
bde8460272 mixer.4 and mixer.8: Fix mandoc -Tlint errors.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34603
Sponsored by:		NVIDIA Networking
2022-03-20 20:21:03 +01:00
Hans Petter Selasky
f250ff5ff3 mixer(8): Improve shorthand volume parsing.
The initial patch had a bug where the full volume syntax, floating point values,
:, + and -, wasn't accepted.

While at it move some defines to enum's.

Fixes:			da3d4469ef
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34617
Sponsored by:		NVIDIA Networking
2022-03-20 20:19:16 +01:00
Hans Petter Selasky
da3d4469ef mixer(8): Add shorthand syntax for setting the volume.
dev.volume=X[.X] can now also be written as dev=X[.X] .

Requested by:		hselasky@ and bsduck (FreeBSD forums)
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34612
Sponsored by:		NVIDIA Networking
2022-03-20 17:32:46 +01:00
Hans Petter Selasky
60bdfe9869 mixer(8): Remove [.volume] string from default printout.
Submitted by:		christos@
Differential Revision:	https://reviews.freebsd.org/D34591
Sponsored by:		NVIDIA Networking
2022-03-20 17:32:43 +01:00
Robert Wing
3ebe110934 bhyve: sweep MAX_VMNAME
MAX_VMNAME is no longer used.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34292
2022-03-17 21:55:52 -08:00
Robert Wing
961e6a12ef bhyve/snapshot: limit snapshot filename to NAME_MAX
NAME_MAX is a better fit since strcat_extension() constructs the
filename of the snapshot file.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34291
2022-03-17 21:51:31 -08:00
Robert Wing
3efc45f34e libvmm: constify vm_get_name()
Allows callers of vm_get_name() to retrieve the vm name without having
to allocate a buffer.

While in the vicinity, do minor cleanup in vm_snapshot_basic_metadata().

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34290
2022-03-17 21:38:21 -08:00
Robert Wing
ee0ebaa420 bhyvectl: drop vm_get_name()
Grab the vm name from bhyvectl's --vm flag instead.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34399
2022-03-17 21:22:43 -08:00
Ed Maste
4f75af31a8 wpa_supplicant.conf.5: add note about scan_ssid=1 eavesdropping
When scan_ssid=1 the list of configured SSIDs is available to
eavesdroppers.  Note this in the man page.

PR:		194122
Reviewed by:	debdrup, Pau Amma
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34576
2022-03-16 19:33:16 -04:00
Andy Fiddaman
f6f357efb1 bhyve: missing mutex initializations
Explicitly initialize the mutex that a PCI virtio module passes back to
virtio.

It so happens that these mutexes were being initialized regardless, no
functional change intended.

Reviewed by:    chuck, jhb
Differential Revision:  https://reviews.freebsd.org/D34372
2022-03-15 19:54:16 -08:00
Alfonso S. Siciliano
8cdecdecb4
spkrtest(8): Replace dialog with bsddialog
Replace (LGPL) dialog with (BSD-2-Clause) bsddialog and update manual.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34459
2022-03-16 01:48:53 +01:00
Alfonso S. Siciliano
f27c6a3e87
bsdinstall/distfetch: Replace libdialog with libbsddialog
Replace (LGPL) libdialog with (BSD-2-Clause) libbsddialog,
while here diversify error messages to find quickly the exact point
of failure.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34464
2022-03-16 00:27:36 +01:00
Xin LI
1d33307434 Update leap-seconds to leap-seconds.3676924800
Obtained from:	ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2022-03-13 23:37:56 -07:00
Mateusz Piotrowski
c36d04222d mixer .8: Clean up the manual page
- Use correct macros (e.g., Pa for paths, Ar for arguments, Cm for
  command modifiers).
- Pet igor and mandoc -Tlint (e.g., start sentences after a newline).
- Use Ta instead of a tab character in tables.
- Stylize all table headers with Sy consistency.
- Add a missing "vol" variant to the synopsis of "dev.volume".
- Sort dev.recsrc command modifiers consistency.
- Use "Bd -literal" for code blocks in the examples. "Bl -tag" is not
  the right macro for that.

Fixes:	903873ce15 Implement and use new mixer(3) library for FreeBSD.
2022-03-13 13:40:51 +01:00
Matteo Riondato
a33ead9c9c pfdenied: match actual variable name to the documented one
PR:		262446
Reviewed by:	kp
2022-03-12 23:59:25 +01:00
Jens Schweikhardt
54b75edd9e Correct minor typos/grammos and break long lines to fit in 80 chars. 2022-03-12 10:43:39 +01:00
Ed Maste
2d015cffc7 fwcontrol: eliminate set but not used warning
The variable was used in an #if 0 block; just move the variable
definition and setting into the same block since Firewire is mainly of
historical interest and is unlikely to see ongoing development in
FreeBSD.

Sponsored by:	The FreeBSD Foundation
2022-03-10 15:51:27 -05:00
Mateusz Piotrowski
5e19a51853 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
2022-03-10 17:46:43 +01:00
Matteo Riondato
0784121c96 pfdenied: support reporting on additional anchors
The security/520-pfdenied script only reports blocked packets from the
main ruleset or any blocklistd(8) anchor.

Add an option to periodic.conf(5) to make it possible to specify
additional anchors to report.

PR:		262446
Reviewed by:	kp
2022-03-10 12:08:59 +01:00
Corvin Köhne
afd4f7fa25 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
2022-03-10 12:31:00 +01:00
Corvin Köhne
e47fe3183e 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
2022-03-10 12:30:37 +01:00
Corvin Köhne
563fd2240e 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
2022-03-10 12:30:02 +01:00
John Baldwin
c76e4b89d9 bhyve: Use vm_get_topology to query kernel's maximum vCPU count.
Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D34493
2022-03-09 15:39:23 -08:00
John Baldwin
fd6f92946f bhyve: Don't force an upper bound on vCPUs when parsing pinning.
Even today it is possible to specify pinning for a vCPU higher than
the configured number of CPUs but lower than VM_MAXCPU without raising
an error.

Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D34492
2022-03-09 15:39:16 -08:00
John Baldwin
7261f82156 bhyve: Allocate dynamic arrays to hold per-VCPU state.
This avoids hardcoding VM_MAXCPU in userspace.

Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D34491
2022-03-09 15:39:08 -08:00
John Baldwin
340a293f91 bhyve: Make the MADT dynamically sized.
Use basl_ncpu instead of VM_MAXCPU in MADT_SIZE.  Since several of the
offsets are no longer compile time constants, unroll the loop
generating ACPI tables.

Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D34490
2022-03-09 15:38:58 -08:00
John Baldwin
730510dc1a bhyve: Allocate mmio_hint array based on number of guest CPUs.
This avoids an instance of hardcoding VM_MAXCPU in userspace.

Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D34489
2022-03-09 15:38:49 -08:00
Nils Johannsen
901c52f13c periodic: remove obsolete news.expire
With the initial import of 386BSD 0.1 in 1993, the daily execution of
/etc/news.expire was introduced (see commit 1bf9d5d951).

In 1997, this was brought into periodic resulting in daily/330.news
(see commit 28dce04d19). But as far as I see, /etc/news.expire has
never existed.

PR:         256238
MFC after:  1 week
Differential Revision:	https://reviews.freebsd.org/D30631
2022-03-07 19:37:42 -09:00
Alexander Motin
2117cdd4b4 GEOM: Introduce gctl_add_param() API.
Make gctl_add_param() API public, allowing more precise control over
parameter flags.  Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after:	1 month
2022-03-07 11:12:25 -05:00
Corvin Köhne
87f6367f10 bhyve: add varfile option to nvlist of lpc device
Use seperate nvlist entries for the romfile and the varfile.

While here, don't leak varfd in bootrom_loadrom().

Reviewed by:    jhb, markj
Differential Revision:  https://reviews.freebsd.org/D33433
2022-03-02 22:50:24 -09:00
Alfonso S. Siciliano
912df915c2
wlanconfig: allow to enter WiFi details if no networks found
Improve the installer: wlanconfig allows user to enter WiFi details
if no networks found, useful to connect to a hidden SSID.

PR:			246192
Reported by:		emaste
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34149
2022-03-02 00:04:57 +01:00
Warner Losh
f5366026ad devctl: add getpath command
Retrieves that path for a device. Different methods to enumerat the path
are supported, called locators.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D32747
2022-03-01 08:06:41 -07:00
Jessica Clarke
b58ea3e1f7 Fix hand-rolled METALOG entries for installconfig during distributeworld
During distributeworld we call distribute on subdirectories, which in
turn calls installconfig. However, this recursive installconfig call
appends the distribution name (in these cases, "base") to DESTDIR. For
install(1) this works fine as its -D argument comes from the top-level
Makefile.inc1, which passes the original DESTDIR, thereby resulting in
the METALOG entry having the distribution name as a prefix representing
its true installed path relative to the root, but for the hand-rolled
entries they do not use install(1) and thus do not have access to what
the original DESTDIR was, resulting in the METALOG missing this prefix.

Thus, pass down the name of the distribution via a new variable DISTBASE
(chosen as Makefile.inc1 already uses that to convey this exact same
information to etc's distrib-dirs during distributeworld) and prepend
this to the handful of manually-generated METALOG entries. For the
installworld case this variable will be empty and so this behaves as
before.

Note that we need to be careful to avoid double slashes in the METALOG;
distributeworld uses find | awk to split the single METALOG up into
multiple dist.meta files, and this relies on the paths in the METALOG
having the exact prefix ./dist (or ./dist/usr/lib/debug).

Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D33997
2022-02-28 22:36:39 +00:00
Ed Maste
1ffe6d7909 ntp: disable format string warnings in libopts
libopts uses generated format string tables that contain embedded NULs.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34386
2022-02-27 16:31:01 -05:00
Jose Luis Duran
cd46006588 ofwdump.8: Remove references to eeprom(8)
Somehow missed in bc4fc770af

Pull Request: https://github.com/freebsd/freebsd-src/pull/582
2022-02-27 09:03:42 -07:00
Richard Scheffenegger
407c34e735 iscsi: retrieve global login timeout from sysctlbyname() as integer
The OID "kern.iscsi.login_timeout" references an integer and
not a string.

Sponsored by:        NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D34380
2022-02-25 20:57:05 +01:00
Eric van Gyzen
d0f4e583bf efivar: handle error when reading --fromfile
The result of read() was stored in an unsigned variable, so the
test for a negative value would never work.

While I'm here, print a better error message for an empty file,
omitting the misleading errno message.

Reported by:	Coverity
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2022-02-25 09:30:29 -06:00
Eric van Gyzen
331b84b5db rtsold: fix memory leak in script execution
Since commit 04e9edb544, rtsold has leaked the memory for the
argument vector of every script it runs.

Reported by:	Coverity
Reviewed by:	markj
Fixes:		04e9edb544
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34355
2022-02-25 09:30:29 -06:00
Eric van Gyzen
a2a8efb4f6 rtsold: Use correct error in llflags_get()
Set errno to EINVAL if the name overflows the buffer, as was done
before commit ecce515d54.

Reviewed by:	dab, markj
Fixes:		ecce515d54
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D34354
2022-02-25 09:30:29 -06:00
Richard Scheffenegger
bd6bb49397 iscsi: per-session timeouts and rapid teardown of session on reconnect
Add per-Session configurable ping (SCSI NOP) and login timeouts.

Remove the torn down, old iSCSI session quickly, when performing a reconnect.

Reviewed By: trasz
Sponsored by:        NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D34198
2022-02-25 10:35:47 +01:00
Andy Fiddaman
ad3da82996 bhyve: plug memory leak in topology_parse()
Reviewed by:    jhb, rew
Differential Revision:  https://reviews.freebsd.org/D34301
2022-02-24 08:38:53 -09:00
Chuck Tuffli
e0ac9dc2b0 bhyve nvme: Advertise Namespace changed AEN
Advertise Namespace Attribute Notices events in the Optional
Asynchronous Events Supported (OAES) field of the Identify Controller
data structure. Additionally, rename the enums and macros to clarify
these are AEN's related to Notices and not generic information.

Reported by: andy@omniosce.org

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D34331
2022-02-23 09:15:45 -08:00
Alfonso S. Siciliano
55af0f96d0
bsdinstall/distfetch: fix main bar percentage with errors
UI fix not related to the real fetching process, use 'nfiles'
(instead of 'total files size') to compute main bar percentage
if an error occurs:

 - fix: main bar greater than 100%, if an error occurs before fetching
 - fix: main bar less than 100%, if an error occurs during fetching
 - add: last mixedgauge, at least one dialog if a total failure occurs

PR:		164094, 169748
Approved by:	bapt (mentor)
Review:		https://reviews.freebsd.org/D33978
2022-02-23 01:54:51 +01:00
Mitchell Horne
13ec1e3155 boottrace(8): small wrapper utility
This is a small program that when invoked will create start and stop
boottrace entries via sysctl, and execute the desired command. Having
this as an executable -- as opposed to some shell script invoking
sysctl(8) -- allows the total resource usage recorded by the trace
entries to include the child process.

Reviewed by:	0mp, trasz (older version)
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31929
2022-02-21 20:16:12 -04:00
Chuck Tuffli
c2318cf80a nvme: fix spelling of Namespace
Fix spelling of a macro definition.

Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D34330
2022-02-21 10:34:46 -08:00
Robert Wing
4379c1da56 bhyve/snapshot: use a string for cmd element in the nvlist
The nvlist for a checkpoint request will now look like:

    { cmd="checkpoint", suspend="true/false", filename="afilename" }

Reviewed by:	jhb
Suggested by:   jhb
Differential Revision:	https://reviews.freebsd.org/D34237
2022-02-15 08:12:15 -09:00
Kyle Evans
e01e8f911b freebsd-update: improve BE creation feature
This addresses one nit and one bug in the BE creation feature of
freebsd-update:

The nit addressed is that it currently only names the BEs after the
userland version, but the kernel version may be higher.  After this
change, we request both and pass them through sort(1) to choose the
highest.  This is especially helpful if a freebsd-update patch touched
one but not the other.

The bug fixed is that roots updated that are not located at '/', e.g.,
by using -b or -j, will no longer create boot environments
automatically.  There's a very low chance these will actually change the
BE in any meaningful way, anyways.  It could make sense in the future
to allow an argument-override to create the BE anyways if someone comes
up with a non-standard setup, e.g., where a jail is an important part of
their boot environment on an appliance or some such setup.

Half of this patch is submitted by delphij@, the other half kevans@.

PR:		261446
MFC after:	3 days
Reviewed by:	delphij, emaste, Dave Fullard <dave_fullard.ca>
Differential Revision:	https://reviews.freebsd.org/D34257
2022-02-12 15:36:24 -06:00
Alfredo Dal'Ava Junior
79f5d19890 kldxref: add R_PPC_ADDR32 handler
Implements R_PPC_ADDR32 handler for kldxref, addressing
"kldxref: unhandled relocation type 1" when running
"kldxref /boot/kernel" on powerpc 32 bits.

Reviewed by:	luporl
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D33745
2022-02-10 12:15:47 -03:00
Gordon Bergling
80212a36a3 tcpsso.8: Add a history section to the manpage
Mention that the tcpsso command first appeard in FreeBSD 14.
2022-02-10 09:27:42 +01:00
Alexander Motin
c04506fd4c pciconf: Fix PCIS_CRYPTO_ENTERTAIN copy/paste.
Submitted by:   Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2022-02-09 15:56:30 -05:00
Michael Tuexen
d24e064aaf tcpsso: fix typo in man page
Reported by:	maxim
Sponsored by:	Netflix, Inc.
2022-02-09 21:16:42 +01:00
Fangrui Song
ec81497cc7 crunchgen: remove -dc from linker invocation
In GNU ld and ld.lld, -dc is used with -r to allocate space to COMMON
symbols.  It is presumably to work around legacy code which cannot
handle COMMON symbols in relocatable output.  ld.lld may remove -dc or
make it a no-op for the 15.0.0 release.

As of 7420b323a0 crunch/crunchide does not require -dc, as the symbol
hiding technique no longer relied on making symbols local.

In addition -fno-common is now the default in Clang and GCC, so -dc
serves no purpose as the compiler does not generate COMMON symbols
anyway.

See https://maskray.me/blog/2022-02-06-all-about-common-symbols for more
detail on common symbols.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34215
2022-02-09 13:54:35 -05:00
Michael Tuexen
d73d40c17f usr.sbin: add tcpsso to Makefile 2022-02-09 19:22:18 +01:00
Michael Tuexen
881631a2a3 usr.sbin: add tcpsso
tcpsso is a command line tool to apply a socket option to an
existing TCP endpoint, which is identified by the inp_gencnt.
tcpsso can be used, for example, to switch the congestion control
module or the TCP stack.

Reviewed by:		rrs, rscheff, debdrup, pau amma
Relnotes:		yes
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D34139
2022-02-09 19:14:25 +01:00
Robert Wing
edfb339d38 bhyve/snapshot: switch to nvlist for snapshot requests
Switch to using an nvlist with nvlist_send()/nvlist_recv() to
communicate from bhyvectl(8) to bhyve(8).

The idea is that a bhyve process receives a command with with a set of
arguments. The nvlist here is structured to reflect that premise.

For example, to snapshot the vm, the expected nvlist looks like:

    { cmd=START_CHECKPOINT, filename="filename" }

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D33977
2022-02-09 08:11:57 -09:00
Mateusz Piotrowski
ca77b6ff31 cron.8: Add periodic(8) to See Also 2022-02-09 11:50:01 +01:00
Mark Johnston
927aa5fefd bhyve: Fix getaddrinfo() error handling
- Use errx() since errno will not be set.
- Print the message returned by gai_strerror().

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-02-08 12:40:41 -05:00
Dimitry Andric
e17fede8ff Fix too small sscanf output buffers in kbdmap
This fixes the following warnings from clang 14:

usr.sbin/kbdmap/kbdmap.c:241:16: error: 'sscanf' may overflow; destination buffer in argument 5 has size 20, but the corresponding specifier may require size 21 [-Werror,-Wfortify-source]
                            &a, &b, buf);
                                    ^
usr.sbin/kbdmap/kbdmap.c:615:8: error: 'sscanf' may overflow; destination buffer in argument 3 has size 64, but the corresponding specifier may require size 65 [-Werror,-Wfortify-source]
                            keym, lng, desc);
                            ^
usr.sbin/kbdmap/kbdmap.c:615:14: error: 'sscanf' may overflow; destination buffer in argument 4 has size 64, but the corresponding specifier may require size 65 [-Werror,-Wfortify-source]
                            keym, lng, desc);
                                  ^
usr.sbin/kbdmap/kbdmap.c:615:19: error: 'sscanf' may overflow; destination buffer in argument 5 has size 256, but the corresponding specifier may require size 257 [-Werror,-Wfortify-source]
                            keym, lng, desc);
                                       ^

In each case, the buffer being sscanf'd into is one byte too small.

MFC after:	 3 days
2022-02-06 16:25:25 +01:00
Dimitry Andric
d310bf3867 Fix too small hostname buffer in bootparamd
This fixes the following warning from clang 14:

usr.sbin/bootparamd/bootparamd/bootparamd.c:204:32: error: 'fscanf' may
overflow; destination buffer in argument 3 has size 255, but the
corresponding specifier may require size 256 [-Werror,-Wfortify-source]

The MAX_MACHINE_NAME macro indicates the maximum number of bytes in a
machine name, but it does not include the NUL terminator required for
scanf.

MFC after:	 3 days
2022-02-06 15:25:49 +01:00
Gordon Bergling
64b3bcc6bd moused(8): Fix a common typo in source code comments
- s/comatible/compatible/

Obtained from:	NetBSD
MFC after:	3 days
2022-02-06 13:47:25 +01:00
Gordon Bergling
164fa411b9 makefs(8): Fix a few typos in source code comments
- s/concearned/concerned/
- s/quadradically/quadratically/

Obtained from:	NetBSD
MFC after:	3 days
2022-02-06 13:46:38 +01:00
Wolfram Schneider
a0e33bbdc5 update URL 2022-02-05 17:35:24 +00:00
Andrew Turner
c363da4ae8 Add the Arm SPE interrupt to acpidump
To support the Arm Statistical Profiling Extension (SPE) ACPI 6.3 added
a place to hold the SPE interrupt. Add to acpidump to show when printing
the Arm Generic Interrupt data.

Sponsored by:	The FreeBSD Foundation
2022-02-01 11:43:13 +00:00
John Baldwin
58862c0bea fstyp: Remove __packed from struct exfat_de_label.
This fixes a -Waddress-of-packed-member warning about a possibly
unaligned pointer from GCC 9 when calling convert_label().

__packed has to be removed from struct exfat_dirent as well to fix an
alignment warning when casting from a struct exfat_dirent pointer to a
struct exfat_de_label pointer.

Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D32144
2022-01-31 17:33:31 -08:00
Robert Wing
b4cc5d63b6 bhyve/virtio: use correct device id for virtio-scsi
Section 4.1.2.1 of the virtio spec states that the transitional PCI
device id for a scsi device is 0x1004.

Fix suggested by reporter.

PR:             259961
Reported by:    me@nanaya.pro
Reviewed by:	imp, jhb
Fixes:  f9c005a17f ("Add bhyve virtio-scsi storage backend support.")
Differential Revision:	https://reviews.freebsd.org/D34103
2022-01-31 09:44:47 -09:00
Chuck Tuffli
ac678b4aaf bhyve nvme: Fix Identify Namespace, NSID=ffffffff
If the NVMe Controller doesn't support Namespace Management, it should
return "Invalid Namespace or Format" when the Host request Identify
Namespace with the global NSID value.

Fixes UNH IOL 16.0 Test 9.1, Case 6

Reviewed by:	imp, allanjude
Tested by:      jason@tubnor.net
MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33578
2022-01-29 23:11:14 -08:00
Chuck Tuffli
fa263c532b bhyve nvme: Fix Set Features, AEN
NVMe Controllers which do not support Endurance Groups must return an
error when the Endurance Group Event Aggregate Log Change Notices bit is
set in Set Features, Asynchronous Event Configuration.

Fixes UNH IOL Test 3.12, Case 8

Tested by:      jason@tubnor.net
MFC after:      1 month
Differential Revision:	https://reviews.freebsd.org/D33577
2022-01-29 23:10:59 -08:00