Commit Graph

19175 Commits

Author SHA1 Message Date
Cy Schubert
733a832fb5 ntp: Revert "Disable stack gap for ntpd during build."
This reverts commit af949c590b because
889b56c8cd fixes the underlying problem.

MFC after:	1 month
2021-10-15 16:06:14 -07:00
Hans Petter Selasky
67829b6307 mixer(8): Print usage to standard error.
Differential Revision:	https://reviews.freebsd.org/D32507
Submitted by:	christos@
Sponsored by:	NVIDIA Networking
2021-10-15 15:56:37 +02:00
Hans Petter Selasky
63dcf7fda2 mixer(8): Fix mixer status line for /dev/dspX.vpY mixer devices.
In some cases when passing /dev/dspX.vpY as mixer devices, m->ci.longname and
m->ci.hw_info will be empty. Don't print any brackets and parentheses
in this case.

Differential Revision:	https://reviews.freebsd.org/D32500
Submitted by:	christos@
Sponsored by:	NVIDIA Networking
2021-10-15 11:13:29 +02:00
Corvin Köhne
1b0e2f0b60 bhyve: ignore low bits of CFGADR
Bhyve could emulate wrong PCI registers.
In the best case, the guest reads wrong registers and the device driver would
report some errors.
In the worst case, the guest writes to wrong PCI registers and could brick
hardware when using PCI passthrough.

According to Intels specification, low bits of CFGADR should be
ignored. Some OS like linux may rely on it. Otherwise, bhyve could
emulate a wrong PCI register.

E.g.
If linux would like to read 2 bytes from offset 0x02, following would
happen.
linux:
	outl 0x80000002 at CFGADR
	inw  at CFGDAT + 2
bhyve:
	cfgoff = 0x80000002 & 0xFF = 0x02
	coff   = cfgoff + (port - CFGDAT) = 0x02 + 0x02 = 0x04
Bhyve would emulate the register at offset 0x04 not 0x02.

Reviewed By: #bhyve, grehan
Differential Revision: https://reviews.freebsd.org/D31819
Sponsored by:	       Beckhoff Automation GmbH & Co. KG
2021-10-15 09:29:45 +02:00
Mateusz Piotrowski
f656df586a bhyve: Update usage and synopsis for the -k flag
Let's make it clear to users that -k is for configuration files.
Also, point to bhyve_config(5) in the paragraph describing the flag.

Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32467
2021-10-13 08:39:57 +02:00
Mateusz Piotrowski
775f6f4595 bhyve.8: Fix markup of the -G flag 2021-10-12 16:09:28 +02:00
Mark Johnston
7fa2335347 bhyve: Map the MSI-X table unconditionally for passthrough
It is possible for the PBA to reside in the same page as the MSI-X
table.  And, while devices are not supposed to do this, at least some
Intel wifi devices place registers in a page shared with the MSI-X
table.  To handle the first case we currently map the PBA page using
/dev/mem, and the second case is not handled.

Kill two birds with one stone: map the MSI-X table BAR using the
PCIOCBARMMAP ioctl instead of /dev/mem, and map the entire table so that
accesses beyond the bounds of the table can be emulated.  Regions of the
BAR not containing the table are left unmapped.

Reviewed by:	bz, grehan, jhb
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32359
2021-10-09 11:36:19 -04:00
Devin Teske
1c64959bff bsdconfig: Comments
My current style is to copy C for "/* NOTREACHED */" instead of spelling
out "Not reached". Make this one nominal change in this one file and the
others later.

While here, word-smith "Preload" into "Pre-load" as I believe that to
be more grammatically correct in this instance.

Also while here, fix a comment capitalization error.

Lastly, bump copyright for above changes.
2021-10-08 16:26:21 -07:00
Robert Wing
8ff2b52241 prometheus_sysctl_exporter(8): filter output using a regex
Add two options, -i and -e, for filtering prometheus metrics.

Each option takes a regular expression as an argument. The provided
regex will be tested against the prometheus metric name.

The -i option includes metrics matching the given regex.
The -e option excludes metrics matching the given regex.

Sponsored by:   Modirum MDPay
Sponsored by:   Klara Inc.
Reviewed by:	0mp, debdrup
Differential Revision:	https://reviews.freebsd.org/D32269
2021-10-07 17:02:57 -08:00
Martin Birgmeier
67bceb38f4 i2c(8): fix option handling
Recognize the '-o' option when processing command line arguments.

Fixes:  9c10d00bf8 ("i2c(8): Add interpreted mode for batch/scripted...")
PR:     258572
2021-10-06 21:56:20 -08:00
Elyes HAOUAS
da3278ded3 ntp.conf.5: Fix typos
"certian" --> "certain"
"compatability" --> "compatibility"
"noticable" --> "noticeable"
"limite" --> "limit"
"acutal" --> "actual"
"ba" --> "be"

MFC after:	1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/550
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-06 10:16:04 -04:00
David Bright
d18c9a9197 RPCBIND: skip ipv6 link local when request is not from link local address
RPCINFO on macOS behaves different compared to other linux clients and
doesn't provide request address in rpcb structure of the
RPCBPROC_GETADDRLIST call which doesn't seem to be forbidden.

In this case RPCBIND uses RPC call's source address and picks a
closest corresponding local address. If there are no addresses in the
same subnet as the source address, return of RPCBIND may vary
depending on the order of addresses returned in getifaddrs. If a link
local precedes global address it may be returned even if the request
comes from neither a link local nor from link local in a different
scope, which will prevent services like nfs from working in tpc6
scenario on macOS clients. Issue can be seen only on FreeBSD rpcbind
port due to changes in workflow of addrmerge call.

Submitted by:	Dmitry Ovsyannikov (Dmitry.Ovsyannikov@dell.com)
Reviewers:	dab
Differential Revision:	https://reviews.freebsd.org/D31491
Sponsored by:	Dell EMC
MFC to:	stable/12, stable/13
MFC after:	1 week
2021-10-04 10:45:26 -07:00
Warner Losh
d6dffbae96 lastcomm/sa: Remove sparc64 tests, they aren't needed.
These tests will run only on a sparc64 system, and so never run anymore.

Sponsored by:		Netflix
2021-10-04 10:51:15 -06:00
Baptiste Daroussin
19deec3b30 bsdinstall: reduce overlinking
both distextract and distfetch does not directly use ncurses,
or figpart, drop their direct link to those libs
2021-10-04 11:38:27 +02:00
Baptiste Daroussin
cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Faraz Vahedi
c76da1f010 freebsd-update(8): Add -j flag to support jails
Make freebsd-update(8) support jails by adding the -j flag which takes
a jail jid or name as an argument. This takes advantage of the recently
added -j support to freebsd-version(8) in order to get the version of
the installed userland.

Reviewed by:	dteske, kevans
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25711
2021-10-01 13:51:03 -05:00
Warner Losh
66d6299848 bluetooth: remove hcseriald
Without ng_h4 gone, there's no need for hcseriald.

Sponsored by:		Netflix
2021-09-29 21:18:17 -06:00
Jung-uk Kim
4fa690be2c bluetooth: Fix build after ng_h4 removal
It was caused by 79a100e28e.
2021-09-29 23:10:56 -04:00
jfranklin13
9589362bc9 syslogd: Fix bug that caused -N to drop SecureMode if specified after -s
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/541
2021-09-29 09:44:11 -04:00
Eugene Grosbein
3b4cc56e52 syslogd: undo regression after r326573
Restore ability for our syslogd to collect pre-RFC3164 formatted
messages from remote hosts that was broken with r326573.

For example, the line from Cisco SCE8000 splitted for readability:

1130: 03:37:57: %USER-6-PORT_OPERSTATUS_CHANGE_TRAP: CPU#000 trap:link
down EntityAdminState: 4  EntityAlarmStatus: 32

Such line was collected and stored before mentioned change
but silently dropped after that. Now syslogd saves it again.

Note that parsing of RFC5424 format not changed.

MFC after:	1 month
2021-09-27 14:25:21 +07:00
John Baldwin
7ecdfc8237 bhyve: Add an empty case for event types in mevent_kq_fflags().
This fixes a -Wswitch error raised by GCC 9.

Differential Revision:	https://reviews.freebsd.org/D31938
2021-09-25 11:25:25 -07:00
John Baldwin
48759c4ed7 bhyve_config.5: Document gdb.address. 2021-09-25 10:07:18 -07:00
John Baldwin
b70b050ab5 bhyve: Update the -G description in the SYNPOSIS.
It was missing both the 'w' flag and 'bind_address'.
2021-09-25 10:01:43 -07:00
Hans Petter Selasky
db6ba1e0c5 mixer(3) and mixer(8): Update manual pages.
- Use correct e-mail address.
- Set FreeBSD 14.0 as introduction for the updated mixer(8) utility.

Submitted by:	christos@
Differential Revision:	https://reviews.freebsd.org/D31636
Sponsored by:	NVIDIA Networking
2021-09-22 22:01:40 +02:00
Hans Petter Selasky
8fc722a572 mixer(8): Compile fix for when the "char" type is unsigned.
Differential Revision:	https://reviews.freebsd.org/D31636
Sponsored by:	NVIDIA Networking
2021-09-22 20:58:47 +02:00
Hans Petter Selasky
903873ce15 Implement and use new mixer(3) library for FreeBSD.
Wiki article: https://wiki.freebsd.org/SummerOfCode2021Projects/SoundMixerImprovements
This project was part of Google Summer of Code 2021.

Submitted by:	christos@
Differential Revision:	https://reviews.freebsd.org/D31636
Sponsored by:	NVIDIA Networking
2021-09-22 19:43:56 +02:00
Felix Guest
8678140127 syslog.conf.5: Fix the message priority order
PR:		219942
MFC after:	1 week
2021-09-21 12:07:39 -04:00
Xin LI
7ba7bf48d5 Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800.
MFC after:	3 days
2021-09-19 22:26:22 -07:00
Piotr Pawel Stefaniak
da0c0e0121 fstyp: bump WARNS to default and work around warnings
Differential Revision:	https://reviews.freebsd.org/D31588
2021-09-19 13:52:12 +02:00
John Baldwin
c6efcb1281 bhyve: Support setting the disk serial number for VirtIO block devices.
Reviewed by:	allanjude
Obtained from:	illumos
Differential Revision:	https://reviews.freebsd.org/D31983
2021-09-17 09:55:48 -07:00
John Baldwin
b14cd3a833 efitable: Don't pass NULL as a format string to xo_err().
This fixes a -Wformat error reported by GCC 9.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D31939
2021-09-15 09:03:17 -07:00
John Baldwin
3b5f95d7bd ctld: Disable TCP DDP for connection sockets.
cxgbei is not able to offload PDU processing for a socket using TCP
DDP offload.

Sponsored by:	Chelsio Communications
2021-09-13 09:57:54 -07:00
John Baldwin
91c62d626d iscsid: Disable TCP DDP for connection sockets.
cxgbei is not able to offload PDU processing for a socket using TCP
DDP offload.

Sponsored by:	Chelsio Communications
2021-09-13 09:57:54 -07:00
Ka Ho Ng
e31cc1d526 bhyve: Fix pci device node key in bhyve_config.5
PCI device node key in the manual page is wrong. It should be
pci.bus.slot.function.

MFC after:	3 days
2021-09-13 04:35:03 +08:00
Gleb Smirnoff
c96b4d87ba pkg: fix regression that breaks bootstrap from not a current directory.
Fixes:		40b9f924b1
Reviewed by:	kevans
2021-09-10 14:49:17 -07:00
Emmanuel Vadot
06cce53d56 pkgbase: Move back mlxcontrol in the default package
mlxcontrol(8) is a tool for mlx(4) raid card and isn't related to
Mellanox card.

Reported by:	jhb
2021-09-09 08:14:53 +02:00
Emmanuel Vadot
d8d41d3b84 pkgbase: Remove libefivar package and add a efi-tools one
Put all the efi related tools into FreeBSD-efi-tools.

Differential Revision:	https://reviews.freebsd.org/D31803
2021-09-07 10:24:21 +02:00
Emmanuel Vadot
a30235a4c3 pkgbase: Create a FreeBSD-kerberos package
This allows users to install or not kerberos related utilities
and libs.

Differential Revision:	https://reviews.freebsd.org/D31801
2021-09-07 10:23:14 +02:00
Emmanuel Vadot
80645e1ce5 pkgbase: Create a mlx-tools package
mlx* are only useful for users who have a Mellanox card.
Create a package for it so users that don't have this card can
avoid having this program.

Differential Revision:	https://reviews.freebsd.org/D31795
2021-09-07 10:20:16 +02:00
Emmanuel Vadot
b8876cac2d pkgbase: Create a cxgbe-tools package
cxgbetool is only useful for users who have a Chelsio card.
Create a package for it so users that don't have this card can
avoid having this program.

Differential Revision:	https://reviews.freebsd.org/D31793
2021-09-07 10:19:37 +02:00
Cy Schubert
bd452dcbed wpa: Enable RSN Preauthentication
RSN Preauthentication allows a station autnetnicate to an AP that
it is not associated with yet while associated with a different AP.
This allows athentication to multiple APs simulteneously.

Tested by:	philip
MFC after:	2 months
2021-09-03 06:14:59 -07:00
Cy Schubert
3968b47cd9 wpa: Enable MBO
Enable WiFi 6 MBO (Multi Band Operation). MBO is a prereq to 802.11ax.

MBO allows the efficient use of multiple frequency bands (channels).

To facilitate MBO, WNM (Wireless Network Monitoring) is a prerequisite.
It is required to build.

Tested by:	philip
MFC after:	2 months
2021-09-03 06:14:01 -07:00
Cy Schubert
c1d255d3ff wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff
Merge vendor commits 40c7ff83e7,
efec822389, and
2f6c3ea960.

Tested by:	philip
MFC after:	2 months
2021-09-03 06:08:41 -07:00
Ryan Stone
315bca194a Fix an early return in ctld UCL parser
If the UCL ctld parser encountered a port that used the CTL
ioctl device, it fell into a special case that had an erroneous
early return.  This caused all configuration in the target
following the port attribute to be skipped.  Fix this by replacing
the return with a continue so that the rest of the config is
parsed correctly.

Sponsored by: Dell EMC Isilon
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31703
Reviewed by: bapt
2021-08-30 22:59:33 -04:00
Cy Schubert
81b521d2c0 wpa: Include all wpa include file search directories
Though not all include file search directories are presently needed,
add them to the search list. This is required for the next update to
wpa.

No functional change intended.

MFC after:	1 week
2021-08-30 06:59:17 -07:00
Cy Schubert
a0f2aa9318 wpa: Correctly build the hostapd BSD driver
driver.bsd.c initializes itself differently when built for
hostapd than it does when built for wpa_supplicant.

MFC after:	1 week
2021-08-30 06:59:17 -07:00
Elliott Mitchell
e76c0e4f45 bhyve: Nuke double-semicolons
A distinct number of double-semicolons ended up in bhyve. Take a pass at
getting rid of many of these harmless typos.

MFC after:	3 days
2021-08-30 15:31:04 +08:00
Piotr Pawel Stefaniak
0939f965d8 Update a sysctl name to nbuffers_pcpu in hwpmc.4 and pmcstat.c
This change was missed in r333509 (e6b475e0af).

Differential Revision:	https://reviews.freebsd.org/D31704
Reviewed by:	mjg
2021-08-29 21:24:50 +02:00
Konstantin Belousov
ae7e8a02e6 msdosfs deget(): add locking flags argument
LK_EXCLUSIVE must be passed always, some consumers need the ability to
specify LK_NOWAIT

Reviewed by:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D31464
2021-08-27 18:39:45 +03:00
Mark Johnston
71fbc6faed bhyve: Fix vq_getchain() error handling bugs in various device models
Reviewed by:	grehan, khng
Approved by:	so
Security:	CVE-2021-29631
Security:	FreeBSD-SA-21:13.bhyve
2021-08-24 14:29:13 -04:00