Commit Graph

19639 Commits

Author SHA1 Message Date
John Baldwin
c41b161812 ypldap: Fix mismatch in array bounds for ldapclient().
Reviewed by:	emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36807
2022-10-03 16:10:41 -07:00
Jessica Clarke
e571b0f8f8 etcupdate: Fix -N support for build command
Whilst febca0e643 added -N for both build and extract, it only fully
worked for extract; build would perform the actual tree build with
-DNO_ROOT and construct the intended METALOG, but the subsequent tarball
creation did not take this into account and just tarred up the the
directory as-is rather than using the METALOG. This resulted in the
permissions and ownership not being correct, as well as there being a
stray METALOG file in the tarball's root.

Reported by:	avg
Reviewed by:	avg, jhb, imp
Tested by:	avg
Fixes:		febca0e643 ("etcupdate: Add a -N flag to perform a NO_ROOT build")
Differential Revision:	https://reviews.freebsd.org/D36845
2022-10-03 17:16:19 +01:00
Jessica Clarke
a09af1b7fd bsdinstall release: Start installer on multiple consoles
Currently the installer is only started on the primary ("high level")
console. For systems where this is the video console and serial consoles
aren't of interest, and headless systems with just a serial console,
this works just fine, but for systems where both video and serial
consoles are present and meaningful this requires the user to select the
right primary console in loader, with the poor user experience of the
system appearing to hang if they leave the wrong one selected. This
notably differs from our multi-user behaviour of spawning getty on every
console, where the only issue with selecting the wrong primary console
is a quieter boot process until the login prompt appears (or the system
crashes).

Instead, use the newly-added runconsoles helper to run the installer on
every console (except for ttyv*, where only ttyv0 will be used). For
interactive installations, any of the consoles can be used, though only
one should be used at a time as no effort is made to avoid multiple
installations running at the same time clobbering each other. If the
Live CD option is selected, the other installers (which should, if the
user is well-behaved, be sitting at the welcome screen) will be killed.
If an automated install is in use, the primary console will be used to
display its output, and the others will direct the user to the primary
console.

Reviewed by:	brooks, gjb
Differential Revision:	https://reviews.freebsd.org/D36805
2022-10-03 17:09:17 +01:00
Jessica Clarke
d577d6178b bsdinstall release: Move code to a new startbsdinstall wrapper
This separates out the install media-specific environment (creating
bsdinstall_etc) from actually running the installer on a given console.
This will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, gjb
Differential Revision:	https://reviews.freebsd.org/D36803
2022-10-03 17:09:16 +01:00
Jessica Clarke
a2464ee127 bsdinstall: Add a new runconsoles helper binary
This helper binary will run a given command on every on console, as
defined by /etc/ttys (except for ttyv*, where only ttyv0 will be used).
If one of the command processes exits, the rest will be killed. This
will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, imp, gjb
Differential Revision:	https://reviews.freebsd.org/D36804
2022-10-03 17:09:16 +01:00
Brad Davis
03d66186f6 bsdinstall: add hooks to allow for easier customizing the install
Approved by:	allanjude
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36459
2022-10-03 09:50:42 -06:00
Dag-Erling Smørgrav
0aa2700123 Put OPIE to rest.
Differential Revision: https://reviews.freebsd.org/D36592
2022-10-02 03:37:29 +02:00
Cy Schubert
35d60ac2e5 unbound: Adjust version string
Sync version string with contrib.

Reported by:	"Herbert J. Skuhra" <herbert@gojira.at>
Fixes:		4f5c8956cf
MFC after:	3 days
2022-10-01 06:51:30 -07:00
Michael Tuexen
a779bb4d94 tcp_sso: add support for TCP_MAXUNACKTIME
Reported by:		rscheff@
Reviewed by:		rscheff@
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D36802
2022-09-29 02:02:11 +02:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
Brooks Davis
edb5226248 inetd.conf: update telnetd paths
Follow the example of rsh and point to /usr/local.

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36783
2022-09-29 17:56:41 +01:00
Mark Johnston
65b8109b4e bhyve: Address some warnings in bhyverun.c
- Add const and __unused qualifiers where appropriate.
- Localize some global variables.
- Consistently spell vmexit state as "vme" in vmexit handlers, to avoid
  shadowing the global vm_exit state array.
- Similarly, avoid shadowing "optarg".

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
6cb261620d bhyve: Use designated initializers for virtio_consts tables
This is easier to read and addresses some compiler warnings.

One might expect these tables to be read-only but it seems that the
snapshot/restore code may modify them.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
ee83710bc4 bhyve: Address compiler warnings in audio.c
- Avoid arithmetic on void pointers.
- Avoid a signed/unsigned comparison in loops which write or fill audio
  data buffers.

Convert while loops to for loops while here.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
57d96d8df9 bhyve: Address -Wno-unused warnings in atkbd.c
MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Mark Johnston
889cec66d3 bhyve: Make smbios tables local to smbiostbl.c
Also flag them as const.

MFC after:	2 weeks
2022-09-29 12:36:44 -04:00
Vinícius Zavam
c153a35bfd
bsdinstall: replace ntpdate by ntpd_sync_on_start
* change current NTP services offered by the FreeBSD Installer;
  * no longer offer ntpdate to be enabled and started on boot;
  * start offering the option to make ntpd set the date and time on boot itself.

The motivation for this change comes from the ntpdate(8) manpage:

  Note: The functionality of this program is now available in the ntpd(8)
  program. See the -q command line option in the ntpd(8) page. After a
  suitable period of mourning, the ntpdate utility is to be retired from
  this distribution.

Approved by:		cy (src), dteske (src)
Differential Revision:	https://reviews.freebsd.org/D36206
2022-09-27 09:04:20 +00:00
Rick Macklem
7652321b79 rpc.tlsclntd.8: Fix the RFC number now that it exists
The RFC for this finally got published and, therefore,
now has a number.  This patch puts this RFC number
in the man page.

This is a content change.

MFC after:	1 week
2022-09-23 16:59:29 -07:00
Rick Macklem
423387bee2 rpc.tlsservd.8: Fix the RFC number now that it exists
The RFC for this finally got published and, therefore,
now has a number.  This patch puts this RFC number
in the man page.

This is a content change.

MFC after:	1 week
2022-09-23 16:53:36 -07:00
Ed Maste
06a400d76b makefs: whitespace cleanup (remove space before tab)
MFC after:	1 week
2022-09-20 10:26:24 -04:00
Jens Schweikhardt
e9e615c88a Fix dead references (wrong section) to sysctl(8). 2022-09-16 20:00:49 +02:00
Gordon Bergling
8f98a937ed uname.1: Clarify the -r option
It is some times hard to understand the difference between
kernel version and userland version. So clarify the -r option
of uname(1) in terms of a printed kernel version.

While here, add some cross references:

- cross reference freebsd-version(1) in uname(1)
- cross reference freebsd-version(1) and uname(1) in freebsd-update(8)

PR:		265594
Reported by:	rwatson
Reviewed by:	gbe, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36516
2022-09-16 13:27:54 +02:00
Gordon Bergling
59f7c7ff51 cxgbetool(8): Fix a typo in a source code comment
- s/paramter/parameter/

MFC after:	3 days
2022-09-15 10:29:54 +02:00
Brad Davis
2913e785f0 bsdinstall: fix a couple stragglers in whitelabeling the scripts
PR:		265797
Reviewed by:	allanjude, asiciliano
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36235
2022-09-14 11:06:11 -06:00
Jens Schweikhardt
b94e192660 Capitalize title like in all other titles. 2022-09-14 13:42:43 +02:00
Filipe da Silva Santos
10c6af3441 bhyve: Fix build when BHYVE_SNAPSHOT is set
Fixes:		9cc9abf409 ("bhyve: create all vcpus on startup")
Sponsored by:	Beckhoff Automation GmbH & Co. KG
X-MFC-With:	9cc9abf409
2022-09-13 08:32:09 +02:00
Emmanuel Vadot
3fc174845c Revert "vmm: permit some IPIs to be handled by userspace"
This reverts commit a5a918b7a9.

This cause some problem with vm using bhyveload.

Reported by:	pho, kp
2022-09-09 15:55:01 +02:00
Corvin Köhne
a5a918b7a9 vmm: permit some IPIs to be handled by userspace
Add VM_EXITCODE_IPI to permit returning unhandled IPIs to userland.
INIT and Startup IPIs are now returned to userland. Due to backward
compatibility reasons, a new capability is added for enabling
VM_EXITCODE_IPI.

MFC after:              2 weeks
Differential Revision:  https://reviews.freebsd.org/D35623
Sponsored by:           Beckhoff Automation GmbH & Co. KG
2022-09-07 09:07:03 +02:00
Corvin Köhne
9cc9abf409 bhyve: create all vcpus on startup
vcpus could be restarted by the guest by sending an INIT SIPI SIPI
sequence to a vcpu. That's not supported by bhyve yet but it will be
supported in a future commit. So, create the vcpu threads only once on
startup to make restarting a vcpu easier.

MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D35621
Sponsored by:		Beckhoff Automation GmbH & Co. KG
2022-09-07 09:05:36 +02:00
Gordon Bergling
5f285d5537 cd9660(5): Correct a typo in a source code comment
- s/byes/bytes/

MFC after:	3 days
2022-09-04 18:20:09 +02:00
Gordon Bergling
990878b07f pkg(8): Remove a double word in a source code comment
- s/that that/that/

MFC after:	3 days
2022-09-04 17:28:16 +02:00
Gordon Bergling
886ce99dea bhyve(4): Remove a double word in a source code comment
- s/the the/the/

MFC after:	3 days
2022-09-04 13:57:00 +02:00
Alfonso S. Siciliano
5f3ec44e7e
bsdinstall(8) hostname: Update for bsddialog 0.3
* Delete --hline info. bsddialog(1) 0.3 closes an --inputbox pressing
   only Enter (restoring the previous LGPL-dialog behavior).
 * Add dynamic width auto-sizing.
2022-09-03 22:15:12 +02:00
Gordon Bergling
b82cbe4651 cron(8): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 15:00:29 +02:00
Gleb Smirnoff
f70a2e2948 ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT 2022-08-30 16:24:37 -07:00
John Baldwin
bb31aee26b bhyve virtio-scsi: Avoid out of bounds accesses to guest requests.
- Ignore I/O requests with insufficiently sized input or output
  buffers (those not containing compete request headers).

- Ignore control requests with improperly sized buffers.

- While here, explicitly zero the output header of an I/O request to
  avoid leaking malloc garbage from the host if the header is not
  fully populated.

PR:		264521
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	mav, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36271
2022-08-29 15:37:27 -07:00
John Baldwin
62806a7f31 bhyve virtio-scsi: Tidy warning and debug prints.
Use a consistent prefix ("virtio-scsi: ") similar to the e1000 device
model.

Reviewed by:	mav, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36270
2022-08-29 15:37:15 -07:00
John Baldwin
7afe342dcb bhyve e1000: Sanitize transmit ring indices.
When preparing to transmit pending packets, ensure that the head (TDH)
and tail (TDT) indices are in bounds.  Note that validating values
when they are written is not sufficient along as the transmit length
(TDLEN) could be changed turning a value that was valid when written
into an out of bounds value.

While here, add further restrictions to the head register (TDH).  The
manual states that writing to this value while transmit is enabled can
cause unexpected behavior and that it should only be written after a
reset.  As such, ignore attempts to write while transmit is active,
and also ignore writes of non-zero values.  Later e1000 chipsets have
this register as read-only.

Also ignore any attempts to transmit packets if the transmit ring's
size is zero.

PR:		264567
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36269
2022-08-29 15:36:57 -07:00
Mark Johnston
09a2fce092 makefs tests: Do not run ZFS tests in parallel
makefs-created pools always have the same GUID and thus cannot be
imported simultaneously.

Reported by:	olivier
2022-08-29 12:54:25 -04:00
Mark Johnston
a3b6b3ac4d makefs tests: Do not install ZFS tests if WITHOUT_ZFS is defined 2022-08-29 12:50:51 -04:00
Mark Johnston
575ca2c265 makefs: Remove some redundant initializations
No functional change intended.
2022-08-29 12:50:51 -04:00
Baptiste Daroussin
5876499023 tzsetup: remove left overs from libbsddialog conversion
PR:	265954
2022-08-26 11:54:17 +02:00
Dag-Erling Smørgrav
0a9b374ecc chown: see also chmod.
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-08-24 20:21:39 +02:00
Brooks Davis
e9ad2964f5 pkg: Add limited --debug/-d support
Add an internal debug level global:
 - Level 1 (-d) currently does nothing.

 - Level 2 (-d -d) enables libfetch debugging (quite verbose) so it's
   possible to see what pkg is attempting to download without having
   to sniff traffic.

Reviewed by:	debdrup, bapt
Differential Revision:	https://reviews.freebsd.org/D35756
2022-08-24 18:32:09 +01:00
Navdeep Parhar
f6cc21e8e1 cxgbetool: remove unnecessary vertical whitespace.
No functional change.

MFC after:	3 days
2022-08-19 15:38:13 -07:00
John Baldwin
baf753cc19 bhyve: Support other schemes for naming pass-through devices.
Permit naming pass through devices using the syntax accepted by
pciconf (pci[<domain>:]<bus>:<slot>:<func>) as well as by device name
(e.g. "ppt0").

While here, fix an error in the manpage that had the bus and slot
arguments for the original /-delimited scheme swapped.

Reviewed by:	imp, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36147
2022-08-19 14:58:55 -07:00
Alexander Motin
3b7935f33b Decode couple arrays in NFIT table.
MFC after:	1 week
2022-08-18 21:30:38 -04:00
Jessica Clarke
c6890399fc makefs: Fix issues building as a cross-tool on non-FreeBSD
This adds missing includes, uses the standard dirent.h rather than the
BSD-specific sys/dirent.h subset (which works on macOS but not Linux)
and works around Linux's lack of st_birthtim.

This allows usr.sbin/makefs to be added to LOCAL_XTOOL_DIRS again on
macOS and Linux so that disk images can be cross-built.

Reviewed by:	markj
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36135
2022-08-18 02:46:28 +01:00
Jessica Clarke
b0ce7dfc5e makefs: Fix 32-bit issues in ZFS time attributes setting
Currently the code copies a struct timespec's raw bits as a pair of
uint64_t. On 64-bit systems this has the same representation, but on
32-bit issues there are two issues:

1. tv_sec is a time_t which is 32-bit on i386 specifically
2. tv_nsec is a long not a 64-bit integer

On i386, this means the assertion should fire as the size doesn't match.
On other 32-bit systems there are 4 bytes of padding after tv_nsec,
which in practice are probably 0, as this data is ultimately coming from
the kernel, so it's deterministic (though the padding bytes are not
required to be preserved by the compiler, so are strictly unspecified).
However, on 32-bit big-endian systems, the padding bytes are in the
wrong half to be harmless, resulting in the nanoseconds being multiplied
by 2^32.

Fix this all by marshalling via a real uint64_t pair like is done by the
real ZFS_TIME_ENCODE.

Reviewed by:	markj
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36131
2022-08-18 02:46:27 +01:00
Mark Johnston
8502144d7a makefs tests: Add test cases for handling of multiple staging dirs
Sponsored by:	The FreeBSD Foundation
2022-08-17 17:28:01 -04:00