Commit Graph

19085 Commits

Author SHA1 Message Date
Emmanuel Vadot
af5e40770e pkgbase: Put the mibs and defs in the bnsmp package
Differential Revision:	https://reviews.freebsd.org/D30756
Sponsored by:	Diablotin Systems
2021-06-19 17:50:03 +02:00
Emmanuel Vadot
c42e9af5f1 pkgbase: Move ctld/ctladm to iscsi package
While here only compile both of them if WITH_ISCSI is set (this is the default).

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30755
Sponsored by:	Diablotin Systems
2021-06-19 17:49:57 +02:00
Emmanuel Vadot
081fb64492 pkgbase: Create a FreeBSD-nfs package
And move all the nfs related commands there.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D30754
Sponsored by:	Diablotin Systems
2021-06-19 17:49:50 +02:00
Jamie Gritton
5bf6dca2c6 jail: Don't allow substitution of valueless jail parameters.
PR:		256544
Reported by:	cryptogranny at gmail.com
2021-06-18 09:44:37 -07:00
Alan Somers
fcf2227a55 periodic: by default, skip 221.backup-gpart in jails
It can still be enabled as usual in /etc/periodic.conf

PR:		256253
Reported by:	delphij
Submitted by:	Miroslav Lachman <000.fbsd@quip.cz>
MFC after:	2 weeks
2021-06-18 08:36:09 -06:00
Ceri Davies
64e6e1e463 secure/caroot, certctl: Rename secure/caroot/blacklisted
Old certctl commands still work for compatability, but are deprecated.

Approved by:	secteam (gordon)
Differential Revision: https://reviews.freebsd.org/D30807
2021-06-18 13:38:07 +01:00
Warner Losh
6a836ea741 config(8): Remove obsolete 'config' directive.
The "config" line in config files has been obsolete since FreeBSD 4.x
when we moved to having the boot loader pass in the root device. Remove
it.

MFC After:		1 week
Sponsored by:		Netflix
2021-06-17 15:17:18 -06:00
Philip Paeps
7daa45becf bsdinstall: add a new mirror in Bulgaria
Provided by Telepoint Mirror Service.

Reported by:	Valentin Nikolov <mirror@telepoint.bg>
MFC after:	3 days
2021-06-17 21:07:37 +08:00
Philip Paeps
1c9605fe1e bsdconfig: add a new mirror in Bulgaria
Provided by Telepoint Mirror Service.

Reported by:	Valentin Nikolov <mirror@telepoint.bg>
MFC after:	3 days
2021-06-17 21:07:37 +08:00
Kristof Provost
67cef6d411 bsnmp: Fix incorrect use of libpfctl
When we introduced libpfctl in bnsmpd this was done incorrectly, and a
GETRULE call was replaced by pfctl_add_rule().
Change it to pfctl_get_rule().

Reviewed by:	donner
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-06-17 10:53:40 +02:00
Chuck Tuffli
3a4ab18377 bhyve: Fix cli regression with NVMe ram
The configuration management refactoring inadvertently removed support
for a RAM-backed NVMe Namespace (i.e. -s X,nvme,ram=16384). This adds it
back.

Reported by:	andy@omniosce.org
Reviewed by:	jhb, andy@omniosce.org
Fixes:		621b509048
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30717
2021-06-16 14:19:01 -07:00
Nathaniel Filardo
7ef082733b makefs: Cast daddr_t to off_t before multiplication
Apparently some large-file systems out there, such as my powerpc64le
Linux box, define daddr_t as a 32-bit type, which is sad and stymies
cross-building disk images.  Cast daddr_t to off_t before doing
arithmetic that overflows.

Reviewed by:	arichardson, jrtc27, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27458
2021-06-15 01:22:04 +01:00
Dan Nelson
87799c5f85 cpucontrol: fix extended signature matching code to avoid fallthough
PR:		256502
MFC after:	1 week
2021-06-14 17:34:07 -04:00
Cy Schubert
dc9d54b5c1 wpa: The ap library is not needed by wpa_supplicant or wpa_cli
The ap library is not needed by wpa_supplicant or wpa_cli. It is only
used by hostapd.

MFC after:	2 months
2021-06-13 22:55:07 -07:00
Robert Crowston
efec757b20 bhyve: enhance debug info for memory range clash
Explain what the two clashing regions are.

Reivewed by:		grehan, jhb
Differential Revision:	https://reviews.freebsd.org/D29696
Pull Request:		https://github.com/freebsd/freebsd-src/pull/463
2021-06-13 16:41:45 -06:00
Artem Khramov
f06fa6f887 syslogd: fix WITHOUT_INET builds
Since 2d82b47 syslogd can't be built with `WITHOUT_INET` or
`WITHOUT_INET6` build variables set, because `iovlist_truncate` is not
defined but used.

This change wraps the problematic `iovlist_truncate` call within ifdef
directive.  It's compiled out in this situation...

Pull Request:	https://github.com/freebsd/freebsd-src/pull/475
Reviewed by:	imp@ (commit message slightly tweaked)
2021-06-12 22:25:35 -06:00
John Baldwin
2349cda44f bhyve vtblk: Inform guests of disk resize events.
Register a resize callback with the blockif interface.  When the
callback fires, update the size of the disk and notify the guest via a
configuration change interrupt.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30506
2021-06-11 18:00:25 -07:00
John Baldwin
c06676bee3 bhyve: Split out a lower-level helper for VirtIO interrupts.
This allows device models to assert VirtIO interrupts for reasons
other than publishing changes to a VirtIO ring such as configuration
changes.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30505
2021-06-11 18:00:25 -07:00
John Baldwin
8794846a91 bhyve: Add support for handling disk resize events to block_if.
Allow clients of blockif to register a resize callback handler.  When
a callback is registered, register an EVFILT_VNODE kevent watching the
backing store for a change in the file's attributes.  If the size has
changed when the kevent fires, invoke the clients' callback.

Currently resize detection is limited to backing stores that support
EVFILT_VNODE kevents such as regular files.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30504
2021-06-11 18:00:24 -07:00
John Baldwin
67d60dcce6 bhyve: Add support for EVFILT_VNODE mevents.
This allows registering an event to watch for changes to a file's
attributes.  This is a bit imperfect as it would be nice to have a way
to determine if an fd can use EVFILT_VNODE successfully.  mevent's
current structure does not permit that and a failure to register a
single kevent impacts several other kevents.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30503
2021-06-11 18:00:24 -07:00
John Baldwin
e8424e2947 bhyve: Register new kevents synchronously.
Change mevent_add*() to synchronously add the new kevent.  This
permits reporting event registration failures to the caller and avoids
failing the registration of other, unrelated events queued up in the
same batch.

Reviewed by:	grehan, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D30502
2021-06-11 18:00:24 -07:00
eoli3n
6f4c1456b5 bsdinstall: Allow automation in jails
Set SCRIPT=/path/to/script env var to be able to automate bsdinstall to
a jail.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/473
Reviewed by:	allanjude
2021-06-11 13:53:17 -06:00
Emmanuel Vadot
d865da5edf ancontrol: Remove an(4) utility
Last an(4) devices have been End Of Life and End Of Sale in 2007.
Time to remove this driver.

Differential Revision:	https://reviews.freebsd.org/D30680
Reviewed by:		imp (earlier version), emaste (earlier version)
Sponsored by:		Diablotin Systems
2021-06-11 21:18:21 +02:00
Corvin Köhne
054accac71 Add a virtio-input device emulation.
This will be used to inject keyboard/mouse input events into a guest.
The command line syntax is:
   -s <slot>,virtio-input,/dev/input/eventX

Reviewed by:	jhb (bhyve), grehan
Obtained from:	Corvin Köhne <C.Koehne@beckhoff.com>
MFC after:	3 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D30020
2021-06-08 19:05:09 +10:00
Poul-Henning Kamp
aaa28628a3 fifolog: Rename yyparse() to getdate_yyparse().
Remove config file for obsolete static analyzer FlexeLint
2021-06-07 06:31:50 +00:00
Warner Losh
1b5bc3a54b usbdump: style: Sort case statements alphabetically
Switch case statement for getopt args should be sorted alphabetically.

Sponsored by:		Netflix
2021-06-04 16:47:28 -06:00
Cy Schubert
6815008894 wpa: Fix GCC 6 build
GCC 6 searches serially to resolve external references.

MFC after:	2 months
X-MFC with:	25ecdc7d52
2021-06-03 21:13:00 -07:00
Kenneth Camann
5deb350025 uefisign: fix SizeOfHeaders sanity check.
This check was too aggressive: it is fine if SizeOfHeaders is exactly
equal to the size of the DOS stub + PE header + section table. Despite
being wrong this code typically worked for most EFI binaries because
SizeOfHeaders is rounded up to a multiple of FileAlignment, which is
often large (e.g., 512 bytes for the FreeBSD loader) so most binaries
made it through.

Reviewed by:	imp@
Sponsored by:	Netflix
Pull Request:	https://github.com/freebsd/freebsd-src/pull/445
2021-06-03 15:22:14 -06:00
Navdeep Parhar
5104dfbeff bsdinstall: Fix typo (Instalation -> Installation). 2021-06-02 21:44:11 -07:00
Cy Schubert
9a0f822853 wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offload
Incorrectly linked built-in wpa functions resulted in overwriting
sm->ctx->set_rekey_offload with garbage. It was initialized correctly
however it changed after wpa_supplicant became a daemon.

No SIGBUS violations reported by dhw@ were experienced during testing
of the original commit by msyelf or philip@.

Reported by:	dhw
Tested by:	dhw
MFC after:	2 months
X-MFC with:	25ecdc7d52
2021-06-02 17:25:37 -07:00
John Ko
7ef92163ab Allows user to specify an optional ZFSBOOT_POOL_SIZE for their zroot
The default is to create a zroot that consumes the whole disk because if
used with geli(8) this makes sense.

Without geli(8), I like to keep my data pool separate from my system
pool.

This is different than ZFSBOOT_BOOT_POOL_SIZE which is named bootpool.

Reviewed by:		allenjude
Pull Request:		https://github.com/freebsd/freebsd-src/pull/53
Differential Revision:	https://reviews.freebsd.org/D30588
2021-06-02 11:12:14 -06:00
Ceri Davies
774bb1c256 periodic: add support for .xz and .zcat compressed logs
Also improve temporary file usage in 200.accounting, add an xref to
zstd(1) to newsyslog.conf.5, and clarify in periodic.conf that
"daily accounting" means process accounting and "monthly accounting"
is login accounting.

PR:		253868
Reviewed by:	allanjude
Approved by:	blackend (mentor)
Differential Revision:	https://reviews.freebsd.org/D29267
2021-06-02 17:28:28 +01:00
Math Ieu
847b7d5054
Fix test case header function name
This restores the expected behavior (skip) when running with non-root user

MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D30584
2021-06-02 12:13:57 +08:00
David Bright
2f176a2b20 pciconf: Fix up pciconf -lc output
The pciconf command fails to emit newlines when particular ecap field
values are seen. Fix them up. This has been seen on several systems at
$JOB. The documentation for PCI capabilities says that capability
type 0 should not be used once the spec for PCI capabilities was
published, but that seems more wishful-thinking than reality. pciconf
also chooses not to print fields related to field values that are
zero, but it seems several of these fields are zero on actual
hardware.

Reviewed by:	vangyzen, imp, Bret Ketchum (Bret.Ketchum@dell.com)
Sponsored by:	Dell EMC Isilon
Submitted by:	Robert Herndon (Robert.Herndon@dell.com)
Differential Revision: https://reviews.freebsd.org/D30441
2021-06-01 10:55:44 -05:00
Li-Wen Hsu
315674fb6a
Add freeze/thaw description to devctl(8)
This is a follow-up to 5fa2979791 .

PR:		256311
Reviewed by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29867
2021-06-01 12:33:12 +08:00
Cy Schubert
25ecdc7d52 wpa: Restructure wpa build
The current WPA build assumes a flat namespace. However the latest sources
from w1.fi now have a duplicate config.c, in two separate subdirectories.
The flat namespace will overwrite config.o with the output from the most
recently modified config.c, of which there are two of them.

This commit resolves this problem by building each component in
wpa's src subdirectory tree into its own .a archive, just as the w1.fi
upstream build as used by the port does. The advantages of this approach
are:

1. Duplicate source file names, i.e. config.c in the wpa_supplicant
   direcory and another config.c in src/utils in the next wpa
   will result in both compiles writing to the same .o file.

2. This restructure simplifies maintanence. A develper needs only to add
   new files as identified by git status in the vendor branch to the
   appropriate Makefile within the usr.sbin/wpa tree. This also reduces
   time required to prepare a new import and should reduce error.

3. The new wpa build structure more closely represents the build as
   performed by the upstream tarball.

This is in preparation for the next wpa update from w1.fi.

Reviewed by:	philip
Tested by:	philip
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D30372
2021-05-31 19:39:16 -07:00
Mitchell Horne
ec66cc955b libpmc: eliminate pmc_pmu_stat_mode()
There is a single consumer, the pmc utility, that clearly has knowledge
of which counters it is expecting. Remove this function and have it
use common counter aliases instead.

Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30528
2021-05-31 17:39:05 -03:00
Mitchell Horne
167cdaa7e3 pmccontrol: improve -L with pmu-events
Check if the pmu utils are supported rather than carrying a
machine-dependent #ifdef.

Reviewed by:	gnn, ray, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30526
2021-05-31 17:39:05 -03:00
Vladimir Kondratyev
da93a73f83 iwmbtfw(8): Improve Intel 7260/7265 adaptors handling
- Allow firmware downloading for hw_variant #8;
- Enter manufacturer mode for setting of event mask;
- Handle multi-event response on HCI commands for 7260;
  This allows to remove kludge with skipping of 0xfc2f opcode.
- Disable patch and exit manufacturer mode on downloading failure;
- Use default firmware if correct firmware file is not found;

Reviewed by:	Philippe Michaud-Boudreault <pitwuu_AT_gmail_DOT_com>
MFC after:	1 week
Tested by:	arrowd
Differential revision:	https://reviews.freebsd.org/D30543
2021-05-31 22:32:08 +03:00
Nathan Whitehorn
40923b0c81 Fix scripted installation from media without local distfiles.
The bsdinstall script target did not have the infrastructure to fetch
distfiles from a remote server the way the interactive installer does
on e.g. bootonly media. Solve this by factoring out the parts of the
installer that deal with fetching missing distributions into a new
install stage called 'fetchmissingdists', which is called by both the
interactive and scripted installer frontends.

In the course of these changes, cleaned up a few other issues with
the fetching of missing distribution files and added a warning if
fetching the MANIFEST file, which is used to verify the integrity of
the distribution files. We should at some point add cryptographic
signatures to MANIFEST so that it can be fetched safely if not present
on the install media (which it is for bootonly media).

Initial patch by: Vinícius Zavam
PR:		255659, 250928
Reviewed by:	dteske
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D27121
2021-05-28 10:01:27 -04:00
Navdeep Parhar
ac02945f7e cxgbetool(8): add a 'clip' subcommand to deal with the CLIP table.
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2021-05-23 16:28:31 -07:00
Robert Wing
fdbc86cf79 bhyve/snapshot: split up mutex/cond initialization from socket creation
Move initialization of the mutex/condition variables required by the
save/restore feature to their own function.

The unix domain socket that facilitates communication between bhyvectl
and bhyve doesn't rely on these variables in order to be functional.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D30281
2021-05-21 11:23:06 -08:00
Marcin Wojtas
af949c590b Disable stack gap for ntpd during build.
When starting, ntpd calls setrlimit(2) to limit maximum size of its
stack. The stack limit chosen by ntpd is 200K, so when stack gap
is enabled, the stack gap is larger than this limit, which results
in ntpd crashing.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: cy, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29553
2021-05-21 15:33:06 +02:00
Konstantin Belousov
d7751071bc kldxref: do not error out if specified path is not directory, for -d mode
kldxref(8) is the only tool that can dump FreeBSD kernel module
metadata, with the -d option. But the command line requirements for that
are inconvenient, since parser requires that argv[1] is a directory
containing whole set of modules to generate xref file.

For -d, allow argv[0] to be a regular file, now it is possible to do e.g.
   $ kldxref -d /boot/kernel/ufs.ko
to see only ufs.ko metadata.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D30368
2021-05-20 22:40:01 +03:00
Ceri Davies
c1a148873d sys/*/conf/*, docs: fix links to handbook
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.

PR:             255026
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Reviewed by:    dbaio
Approved by:    blackend (mentor), re (gjb)
MFC after:      10 days
Differential Revision: https://reviews.freebsd.org/D30265
2021-05-20 09:27:10 +01:00
Poul-Henning Kamp
9c10d00bf8 i2c(8): Add interpreted mode for batch/scripted i2c operations 2021-05-19 18:56:59 +00:00
Poul-Henning Kamp
e32b2bcff0 i2c(8): Change default mode to "transfer", which should work everywhere¹
¹ According to @ian
2021-05-19 18:48:28 +00:00
Poul-Henning Kamp
f4583ebabc i2c(8): Polish: sort switches, dont confuse address & offset 2021-05-19 18:47:32 +00:00
Robert Wing
91f251b2ab fstyp(8): define HAVE_ZFS macro when built with zfs
The HAVE_ZFS macro was dropped from the Makefile during the OpenZFS
merge, bring it back.

While here, drop unused WARNS setting.

PR:             255616
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Submitted by:   Michael Büker <freebsd@michael-bueker.de>
Fixes:          9e5787d228
Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D30221
2021-05-14 13:00:24 -08:00
Hans Petter Selasky
c904e20cc9 Implement own command line option for the frequently used -i usbusX -f Y syntax,
-d ugenX.Y, similar to what usbconfig(8) does.

MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-05-14 17:15:07 +02:00