Commit Graph

19512 Commits

Author SHA1 Message Date
Vitaliy Gusev
a85bbbea91 bhyve: Enable suspend/resume support for virtio-blk.
Reviewed by:	jhb
Sponsored by:	vStack
Differential Revision: https://reviews.freebsd.org/D26267
2022-06-23 11:46:06 -07:00
Vitaliy Gusev
cd9618bdb2 bhyve: Snapshot impovements for 'blockif' backend
When pausing a block I/O device model as part of suspending a VM, wait
for all active block I/O requests to finish before saving snapshot
data.  This avoids having to save information about in-flight requests
both in the block_if layer and in storage device models.

For the AHCI device model, the queues are now guaranteed to be idle
when taking a snapshot, so remove the code to save queue state and
rely on the initial state in a resumed VM having all queues already
idle.

This will also simplify adding NVMe snapshot support in the future.

Reviewed by:	jhb
Sponsored by:	vStack
Differential Revision: https://reviews.freebsd.org/D26267
2022-06-23 11:46:06 -07:00
Brad Davis
a320e9dd51 bsdinstall: improve zfsboots ability to handle datasets under a BE
Currently we only set canmount=noauto on the root of the BE, this
change makes it so we set it on all datasets under the BE as well.

Reviewed by:	allanjude
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35422
2022-06-23 09:21:08 -06:00
Cy Schubert
3e8eb5c7f4 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
MFC after:	3 days
2022-06-22 20:57:27 -07:00
Kyle Evans
4014365e42 mixer: remove volume backwards compat, add % interpretation
The current situation is fairly confusing, where an integer is interpreted
as a percent until you slap a decimal on it and magically it becomes an
absolute value.

Let's have a flag day in 14.0 and remove this shim entirely.  Setting with
percent can still be useful, so allow a trailing '%' to indicate as such.
As a side effect, we tighten down the format allowed in the volume a little
bit by ensuring there's no trailing garbage after the value once it's
separated into left and right components.

Reviewed by:	christos, hselasky, pauamma_gundo.com (manpages)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D35101
2022-06-17 22:50:58 -05:00
James Mintram
e16b709e2d bhyve: Report an error for invalid UUIDs.
Reviewed by:	rgrimes, grehan, jhb
Differential Revision:	https://reviews.freebsd.org/D30050
2022-06-16 13:18:01 -07:00
John Baldwin
73702c3980 pmcannotate: Don't increment end address passed to objdump -d.
libpmc already returns an end address that is after the end of the
last instruction of a function (on both amd64 and arm64) as the end
address written to the annotate map file is computed as the start
address of the symbol plus the size.

Adding one could result in a curious failure where an entire
function's contents in assembly was reduced instead to only the first
instruction.  The reason is that when the end instruction is bumped by
one, objdump -d can append the first instruction of the next function
in its output.  However, since pmcannotate concatenates all of the
objdump -d output from various functions into a single file which it
then searches to find the assembly for a given file, if this
additional trailer was earlier in the file than the full function, the
trailer was chosen to represent the entire function resulting in the
truncated listing of the function.

Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D35399
2022-06-14 10:52:54 -07:00
Mitchell Horne
ec1a13df03 Remove mips-specific Makefiles for /sbin and /usr/sbin
They are no longer needed, but were likely missed simply because they
don't show up in a grep for 'mips'.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D35475
2022-06-14 10:15:03 -03:00
Alan Somers
6a02539959 bsdinstall: allow an install script to access packages on the DVD
If installing from the DVD, mount its packages in the chroot at
/dist/packages.  That way they'll be accessible to an install script.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	gjb
Differential Revision: https://reviews.freebsd.org/D35330
2022-06-13 13:27:51 -06:00
Ed Maste
f92e0d6acd 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
2022-06-13 14:57:10 -04:00
Dmitry Ovsyannikov
9f48eea366 rpcbind: get contact addr from xprt members
Addition to D31491 in order to actually resolve the top root cause.

Currently rpcbind gets contact address from connectionless xprt->xp_p2
member of a transport and will fail to get it when working over
connection oriented transport, leading to a guess game in terms of
contact address on rpcinfo requests like RPCBPROC_GETVERSADDR or
RPCBPROC_GETADDRLIST and poor returns which may influence a user
of a call and specifically reported on OSX clients, which tend to
not provide address hint from rpcinfo request to a server.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D35220
2022-06-13 08:54:08 -05:00
Baptiste Daroussin
0a9541d9f3 pw: reinitialize struct tm before every call to strptime
This prevents corrupted result due to leftover of previous failed
call to strptime
2022-06-07 22:32:35 +02:00
Marc Fonvieille
45ef6b4b5d bsdinstall/scripts/docsinstall: Add Indonesian Documentation
Add Indonesian Documentation to docinstall menu.

Approved by:	doceng (implicit) re (gjb, implicit)
MFC after:	1 week
2022-06-06 13:44:43 +02:00
Brad Davis
3bcd261265 bsdinstall: allow overriding DISTRIBUTIONS in the normal auto mode
Reviewed by:	dteske
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35355
2022-06-05 19:04:04 -06:00
Gordon Bergling
0b4302aa93 acpi(4): Fix a typo in a debug statement
- s/Efficency/tEfficiency/

Obtained from:	NetBSD
MFC after:	3 days
2022-06-04 15:17:09 +02:00
Gordon Bergling
10924c4fc3 ac(8): Fix a typo in a source code comment
- s/chosing/choosing/

MFC after:	3 days
2022-06-04 12:41:20 +02:00
Gordon Bergling
df4da2d6b7 fstype(8): Fix two typos in source code comments
- s/auxillary/auxiliary/

MFC after:	3 days
2022-06-04 10:38:48 +02:00
Doug Rabson
5e9c888a7a 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
2022-05-30 15:23:00 +01:00
Corvin Köhne
8284799a23 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
2022-05-30 10:03:43 +02:00
Alan Somers
77d678b7a4 Fix a memory leak from caf73e5857
Don't shadow an already-local variable with another local declaration.

Reported by:	dteske
MFC after:	13 days
MFC with:	caf73e5857
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D35331
2022-05-28 13:17:37 -06:00
Alan Somers
caf73e5857 bsdinstall: fix prepopulating the ZFS disk menu with ZFSBOOT_DISKS
If the ZFSBOOT_DISKS variable is set to one or more disk names, then
those disks should be preselected in the disk menu.  However, the code
wasn't correctly setting the variable, leaving all disks unselected.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	dteske
Differential Revision: https://reviews.freebsd.org/D35331
2022-05-27 09:09:33 -06:00
John Baldwin
f8287caae4 etcupdate: Preserve permissions when installing a resolved file.
Similar to the change in 1a04446f08, use
cat to overwrite the contents of the existing file rather than cp so
that metadata of the existing file such as permissions and ownership
is preserved.

PR:		255514
Reported by:	uqs
MFC after:	1 week
2022-05-25 14:20:40 -07:00
John Baldwin
431944fb5f etcupdate: Don't rotate trees for a dry run.
When performing a dry run, remove the temporary tree created rather
than rotating the trees.  Rotating the trees meant that etcupdate
thought the latest changes were already merged and would not merge
them on the next real run.

PR:		260281
Reported by:	Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Fixes:		0611aec3cf etcupdate: Always extract to a temporary tree.
MFC after:	1 week
2022-05-25 14:02:51 -07:00
Alan Somers
7919c76dbd bsdinstall: use gpt/efiboot0 label in /etc/fstab
Otherwise, boot will hang if the numbering of disks has changed since
initial install.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	brd
Differential Revision: https://reviews.freebsd.org/D35309
2022-05-24 13:17:10 -06:00
Brad Davis
cc42ef5328 bsdinstall: allow whitelabeling the scripts
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35197
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2022-05-24 09:49:06 -06:00
Brad Davis
33005c89c6 bsdinstall: break list of scripts out to one per line to make adding/removing entries easier
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35249
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2022-05-24 09:30:31 -06:00
Alfonso S. Siciliano
6368dcb292
bsdinstall hostname: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.
Add --hline info because bsddialog requires TAB to switch the focus on
buttons for an inputbox, dialog differs.
Delete f_dialog_inputbox_size() using libbsddialog autosizing.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35285
2022-05-24 14:20:22 +02:00
Rick Macklem
b387a075d9 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.

MFC after:	2 weeks
2022-05-22 14:41:20 -07:00
Rick Macklem
b4fa7fde15 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.

MFC after:	2 weeks
2022-05-22 14:36:20 -07:00
Rick Macklem
915fc1afe5 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.

Reviewed by:	pauamma_gundo.com
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35290
2022-05-22 14:20:14 -07:00
Rick Macklem
e2c72fecfc 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.

Reviewed by:	pauamma_gundo.com
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35290
2022-05-22 14:17:06 -07:00
Rick Macklem
0bf3f379e1 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.

Reviewed by:	jhb, pauamma_gundo.com (same change for rpc.tlsservd.8)
MFC after:	2 weeks
2022-05-22 13:58:59 -07:00
Rick Macklem
f5b40aa0de 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.

MFC after: 	2 weeks
2022-05-22 13:49:08 -07:00
Rick Macklem
8d098deda3 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.

The man page has already been updated.

MFC after: 	2 weeks
2022-05-22 13:44:31 -07:00
Rick Macklem
d94358e29d 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.

Reviewed by:	jhb, pauamma_gundo.com
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35136
2022-05-21 15:44:29 -07:00
Alfonso S. Siciliano
58c63d5e37
bsdinstall netconfig_ipv6: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35270
2022-05-21 18:04:28 +02:00
Alfonso S. Siciliano
90943fbfeb
bsdinstall netconfig_ipv4: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35267
2022-05-21 17:40:34 +02:00
Alfonso S. Siciliano
4effc38819
bsdinstall jail: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35274
2022-05-21 17:14:03 +02:00
Alfonso S. Siciliano
8cfbeb56aa
bsdinstall services: Improve mouse configuration
bsdinstall(8) has an option to enable moused support.
However, if it is not selected, moused is still started
through the configuration of nondefault devices.
So, automatically add the moused_nondefault_enable="NO"
setting to rc.conf unless moused support is selected.

PR:			227999
Reported by:		bcran
Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35193
2022-05-21 16:42:23 +02:00
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