Commit Graph

9404 Commits

Author SHA1 Message Date
Andrey V. Elsukov
30fe2bbfae Add a few features to rcorder:
o Enhance dependency loop logging: print full chain instead of the
  last link competing the loop;
o Add -g option to generate dependency graph suitable for GraphViz
  visualization, loops and other graph generation issues are highlighted
  automatically;
o Add -p option that enables grouping items that can be processed in
  parallel.

Submitted by:	Boris Lytochkin <lytboris at gmail>
Reviewed by:	melifaro
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25389
2020-09-08 10:36:11 +00:00
Li-Wen Hsu
d8bdfeb653 Call atf_skip function in cleanup procedure as it also triggers zfs.ko loading
PR:		249055
Sponsored by:	The FreeBSD Foundation
2020-09-07 18:15:58 +00:00
Li-Wen Hsu
7c570021c8 Temporarily skip sbin.bectl.bectl_test.* i386 kernel in CI
kldload zfs.ko on i386 hangs in CI

Sponsored by:	The FreeBSD Foundation
2020-09-03 08:16:57 +00:00
Brooks Davis
a449e81e00 Remove risky compatability with old kernels
The badsys() handler for SIGSYS was added as a transtion aid for kernels
lacking sysctl() in 1993.  It is unsafe and unsound so remove it rather
than running the risk of a privilege-dropping system call being silently
omitted.

This partially reverts SCCSID 6.12 (Berkeley) 03/03/93 "add code to
change the system security level".

Reviewed by:	mckusick, imp, kevans
Obtained from:	CheriBSD
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26289
2020-09-02 21:14:36 +00:00
Li-Wen Hsu
0932ee9fa0 Temporarily skip tests panic i386 kernel in CI
lib.libbe.be_create.libbe_create
sbin.bectl.bectl_test.bectl_create

PR:		249055
Sponsored by:	The FreeBSD Foundation
2020-09-02 19:18:27 +00:00
Mark Johnston
a0efcf6400 Add sysctl(8) formatting for hw.pagesizes.
- Change the type of hw.pagesizes to OPAQUE, since it returns an array.
- Modify the handler to only truncate the returned length if the caller
  supplied an output buffer.  This allows use of the trick of passing a
  NULL output buffer to fetch the output size, while preserving
  compatibility if MAXPAGESIZES is increased.
- Add a "S,pagesize" formatter to sysctl(8).

Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26239
2020-09-02 18:17:08 +00:00
Fernando Apesteguía
2825bf5b2a kldstat(8): Add EXAMPLES to the man page
Add EXAMPLES for all the flags

Approved by:	manpages (bcr@)
Differential Revision: https://reviews.freebsd.org/D26283
2020-09-02 18:15:57 +00:00
Chuck Silvers
e83370448f Move all of the error prints in readsb() from stderr to stdout.
The only output from fsck that should go to stderr is the usage message.
if setup() fails then exit with EEXIT rather than 0.

Reviewed by:	mckusick
Sponsored by:	Netflix
2020-09-01 18:50:26 +00:00
Stefan Eßer
0fa427fe19 Change printf format string to include the extra blank
This is a follow up change to r364321 after a discussion about the style.
All near by places use extra blanks in format strings, and while use of the
format string to provide the extra blank may need more cycles than adding 1
to twidth, it generates shorter code and is clearer in the opinion of some
reviewers of the previous change.

Not objected to by:	emaste
MFC after:		3 days
2020-09-01 09:02:43 +00:00
Warner Losh
7daa93c454 Sort IFNET alphabetically 2020-08-31 23:48:27 +00:00
Warner Losh
b87de06445 Add documentation for ETHERNET events. 2020-08-31 23:48:23 +00:00
Mark Johnston
0a01415e6e ggated(8): Avoid doubly opening the requested disk device.
- Initialize the disk device fd field in connection_new().
- Close the disk device after handing the connection over
  to a child worker.
- Avoid re-opening a disk device for each connection from
  the same client, avoiding an fd leak.

PR:		132845
Submitted by:	Yoshihiro Ota <ota@j.email.ne.jp>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D26168
2020-08-31 15:59:17 +00:00
Ed Maste
57b278f886 dhclient: improve error handling parsing option 119
Reported by:	Shlomi Oberman, JSOF
Submitted by:	delphij
Reviewed by:	markj
Tested by:	markj
2020-08-31 15:55:29 +00:00
Alex Richardson
6424881cc8 Fix makefs bootstrap on macOS after D25563
The macOS assert.h header does not define static_assert when compiling in
C99 mode. To fix this compile with -std=c11.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D25928
2020-08-25 13:30:24 +00:00
Matt Macy
9e5787d228 Merge OpenZFS support in to HEAD.
The primary benefit is maintaining a completely shared
code base with the community allowing FreeBSD to receive
new features sooner and with less effort.

I would advise against doing 'zpool upgrade'
or creating indispensable pools using new
features until this change has had a month+
to soak.

Work on merging FreeBSD support in to what was
at the time "ZFS on Linux" began in August 2018.
I first publicly proposed transitioning FreeBSD
to (new) OpenZFS on December 18th, 2018. FreeBSD
support in OpenZFS was finally completed in December
2019. A CFT for downstreaming OpenZFS support in
to FreeBSD was first issued on July 8th. All issues
that were reported have been addressed or, for
a couple of less critical matters there are
pull requests in progress with OpenZFS. iXsystems
has tested and dogfooded extensively internally.
The TrueNAS 12 release is based on OpenZFS with
some additional features that have not yet made
it upstream.

Improvements include:
  project quotas, encrypted datasets,
  allocation classes, vectorized raidz,
  vectorized checksums, various command line
  improvements, zstd compression.

Thanks to those who have helped along the way:
Ryan Moeller, Allan Jude, Zack Welch, and many
others.

Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D25872
2020-08-25 02:21:27 +00:00
Warner Losh
f87655ec76 Change the resume notification event from 'kern' to 'kernel'
We have both a system of 'kern' and of 'kernel'. Prefer the latter and
convert this notification to use 'kernel' instead of 'kern'. As a
transition period, continue to also generate the 'kern' notification
until sometime after FreeBSD 13 is branched.

MFC After: 3 days
2020-08-24 19:35:15 +00:00
Fernando Apesteguía
0ad4bfaef1 sysctl(8): clarify -n flag
-n omits the name of the variable regardless of the type of information that is
requested. Rephrase to clarify this point.

PR:	242191
Submitted by:	stilezy@gmail.com
Approved by:	emaste@
Differential Revision:	https://reviews.freebsd.org/D26149
2020-08-22 11:59:14 +00:00
Fernando Apesteguía
71230912a7 ipfw(8): Fix typo in man page
s/exmaple/example

Approved by:	manpages (gbe@)
Differential Revision:	https://reviews.freebsd.org/D26147
2020-08-21 17:45:17 +00:00
Warner Losh
350711aa85 Document the VFS FS events
MOUNT notifies when a filesystem is mounted
REMOUNT notifies when a filesystem is mounted again
UNMOUNT notifies when a filesystem is unmounted

These events are asynchronous to the actual state of the event (though the data
is recorded at a time when it is stable). The mount event is reported after the
filesystem is mounted. However, in the interim it may be unmounted by another
agent. Likewise, umount is called just before the mountpoint is finished tearing
down. It may be remounted (or maybe if the process scheduling is wonky and devd
gets to run before the last few steps are complete).

Sponsored by: Netflix
Diffential Revision: https://reviews.freebsd.org/D25969
2020-08-19 17:10:09 +00:00
Warner Losh
08b242aeee Move the mount name to bit mapping into sys/mount.h so it can be shared with the
kernel.

Discussed with: kib@
Reviewed by: kirk@ (prior version)
Sponsored by: Netflix
Diffential Revision: https://reviews.freebsd.org/D25969
2020-08-19 17:09:58 +00:00
Warner Losh
346da45741 Three typos:
Amiga is a proper noun
Condition is traditionally spelled starting with 'c'
Some, but not all, of the over/under-voltage instances were hyphenated.
Since they are all adverb phrases, they all need to be hyphenated.

Pointy hat: imp
2020-08-19 02:18:11 +00:00
Robert Wing
deaff65313 bectl(8): Fix output of bectl list for the 'Mountpoint' column.
Currently, the output of `bectl list` doesn't align the 'Mountpoint' column
correctly when the 'mounted' property of a boot environment dataset is longer
than the default column width.

Set the 'Mountpoint' column width to the boot environment dataset with the
longest 'mounted' property or to the default width, whichever is greater.

PR:             241064
Reported by:	vermaden@interia.pl
Reviewed by:    kevans (mentor)
Approved by:    kevans (mentor)
MFC after:      1 week
Differential Revision:	https://reviews.freebsd.org/D26048
2020-08-19 00:09:39 +00:00
Warner Losh
d7e357f85c Fix two typos.
Submitted by: rpokala@
MFC After: 3 days
2020-08-18 21:42:02 +00:00
Warner Losh
97f744901f Document the ZFS events as best I can. These are not well documented.
MFC After: 3 days
2020-08-18 21:26:58 +00:00
Warner Losh
77f4a8090c Document the AEON subsystem for the Amiga's power button.
MFC After: 3 days
2020-08-18 21:26:54 +00:00
Warner Losh
428668cca4 Document the PMU system
The pmu(4) and adb(4) drivers on powerpc generate PMU events. Document them.

The allwinner power modules also generate these events. Document those as well.

MFC After: 3 days
2020-08-18 21:26:50 +00:00
Warner Losh
17910c7f6d GEOM::rotation_rate changes are also signaled via devctl.
MFC After: 3 days
2020-08-18 21:26:45 +00:00
Warner Losh
e3c77e3197 Move the possible event types into a column table to make it easier to read.
Sort system type alphabetically.
Remove some commas that aren't in the devd notification messages.

MFC After: 3 days
Reviewed by: 0mp (earlier versions), jhb (useful feedback on earlier versions)
Differential Revision: https://reviews.freebsd.org/D26105
2020-08-18 21:26:39 +00:00
Warner Losh
31178c8a9e Modernize a bit.
Remove PC Card specific information. It's of little value these days and on
the way out after most of its drivers have been removed.
Use iwn instead of wi device.
2020-08-18 06:07:34 +00:00
Ed Maste
c1b355d378 ipfw: line up ipfw -t list with and without timestamp
From the PR:
    When I run `ipfw -t list` on release/12 or current, I get misaligned
    output between lines that do and do not have a last match timestamp,
    like so:

    00100 Tue Aug 11 03:03:26 2020 allow ip from any to any via lo0
    00200                         deny ip from any to 127.0.0.0/8

    (specifically, the "allow" and "deny" strings do not line up)

PR:		248608
Submitted by:	Taylor Stearns
MFC after:	3 days
2020-08-17 18:53:23 +00:00
Bjoern A. Zeeb
4b1c248795 80211: consistently order 160 and 80+80
For flags and checks the order goes VHT160 and then VHT80P80 unless
checks are in reverse order ("more comes first") in which case we
deal with VHT80P80 first.
The one reverse order to pick out is where we check channel
prefernences.  While it may seem that VHT160 is better, finding
two "free" channels (VHT 80+80) is more likely so we do prefer that.

While dealing with VHT160 and VHT80P80 add extra clauses previously
missing or marked TODO in a few places.

Reviewed by:	adrian, gnn
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision:	https://reviews.freebsd.org/D26002
2020-08-17 13:04:18 +00:00
Bjoern A. Zeeb
fd6eb8fec7 80211: consistently spell 80P80
The standard uses 80+80 and 80p80 but nowhere 80_80.
Switch the latter to 80P80 for all the macros and comments refering
to #defined flags which I could find.
The only place we leave as 80p80 is the ifconfig command line arguments
as we spell them all in lower case.
Ideally we would use 80+80 for any interactions with the user and
80P80 for anything internal but let us not confuse parsers and
hence avoid the '+' in either case.

Reviewed by:	adrian, gnn
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision:	https://reviews.freebsd.org/D26001
2020-08-17 12:52:57 +00:00
Bjoern A. Zeeb
96811be22f net80211 / ifconfig: cleanup the use of IEEE80211_FVHT_USEVHT*
Rather then using magic numbers duplicate IEEE80211_FVHT_VHT* in
ifconfig (cleanup of these and other flags used and not exposed by
net80211 should happen later) and use those.
In the kernel this simplifies one ioctl path (the other one currently
relies on individual bit flags being passed in).
We also re-order the 80P80 and 160 flag for 160 to come before 80+80
and more clearly leave the flags as TODO in one of the 160/80+80 cases.

Reviewed by:	adrian
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision:	https://reviews.freebsd.org/D26000
2020-08-17 12:43:07 +00:00
Mateusz Piotrowski
d61057562a Comment out TODO notes from bectl(8) manual page
MFC after:	2 days
2020-08-17 08:43:36 +00:00
Mateusz Piotrowski
55b954c628 Remove an unnecessary macro
MFC after:	2 days
2020-08-17 08:24:50 +00:00
Kirk McKusick
f644caad88 Use the sbput() function to write alternate superblocks so that
they get a checkhash.

PR:           246983
Sponsored by: Netflix
2020-08-15 21:40:36 +00:00
Eugene Grosbein
cf51899564 ifconfig(8): plug memory leak after r361790 by me.
MFC after:	3 days
2020-08-13 06:32:39 +00:00
Gleb Smirnoff
825398f946 ipfw: make the "frag" keyword accept additional options "mf",
"df", "rf" and "offset".  This allows to match on specific
bits of ip_off field.

For compatibility reasons lack of keyword means "offset".

Reviewed by:	ae
Differential Revision:	https://reviews.freebsd.org/D26021
2020-08-11 15:46:22 +00:00
Ryan Moeller
94cba8034b Move ifconfig SFP status functionality into libifconfig
libifconfig_sfp.h provides an API in libifconfig for querying SFP module
properties, operational status, and vendor strings, as well as descriptions
of the various fields, string conversions, and other useful helpers for
implementing user interfaces.

SFP module status is obtained by reading registers via an I2C interface.
Descriptions of these registers and the values therein have been collected
in a Lua table which is used to generate all the boilerplace C headers and
source files for accessing these values, their names, and descriptions.
The generated code is fully commented and readable.

This is the first use of libifconfig in ifconfig itself.  For now, the
scope remains very limited.  Over time, more of ifconfig will be replaced
with libifconfig.

Some minor changes to the formatting of ifconfig output have been made:
- Module memory hex dumps are indented one extra space as a result of using
hexdump(3) instead of a bespoke hex dump function.
- Media descriptions have an added two-character short-name in parenthesis.
- QSFP modules were incorrectly displaying TX bias current as power.  Now
  TX channels display bias current, and this change has been made for both
  SFP and QSFP modules for consistency.

A Lua binding for libifconfig including this functionality is implemented
but has not been included in this commit.  The plan is for it to be
committed after dynamic module loading has been enabled in flua.

Reviewed by:	kp, melifaro
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D25494
2020-08-09 16:27:28 +00:00
Bjoern A. Zeeb
7d1d4407f5 net80211/ifconfig: print hardware device name for wlan interfaces
Add IEEE80211_IOC_IC_NAME to query the ic_name field and in ifconfig
to print the parent interface again. This functionality was lost
around r287197. It helps in case of multiple wlan interfaces and
multiple underlying hardware devices to keep track which wlan
interface belongs to which physical device.

Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Reviewed by:	adrian, Idwer Vollering
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25832
2020-08-07 12:24:23 +00:00
Emmanuel Vadot
4323354324 pkgbase: We can't easily have a package with either a - or a _
Rename iscsi_legacy to iscsilegacy, having - or _ in a package name cause
problems when we process them and generate the ucl.
2020-08-07 12:19:21 +00:00
Warner Losh
57d4cc2c58 All the other printf() calls cast to (void) here, do the two newer ones for
consistency.
2020-08-07 02:48:19 +00:00
Andrey V. Elsukov
2403d47744 Fix SIGSEGV in ipfw(8) when NAT64 prefix length is omitted.
Submitted by:	Evgeniy Khramtsov <evgeniy at khramtsov org>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25734
2020-08-05 11:26:49 +00:00
Olivier Cochard
784d8d8db0 Skip sbin/route tests if jail not installed (WITHOUT_JAIL).
Approved by:	kp
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D25935
2020-08-04 21:34:13 +00:00
Yoshihiro Takahashi
8f11c99715 - Cleanups related to sparc64 removal.
- Remove remains of sparc64 files.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D25831
2020-07-28 10:58:37 +00:00
Ilya Bakulin
badc50c270 Make it possible to get/set MMC frequency from camcontrol
Enhance camcontrol(8) so that it's possible to manually set frequency for SD/MMC cards.
While here, display more information about the current controller, such as
supported operating modes and VCCQ voltages, as well as current VCCQ voltage.

Reviewed by:	manu
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D25795
2020-07-24 21:14:59 +00:00
Ed Maste
af9de844c4 md5: return non-zero if built-in tests (-x) fail
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-07-23 20:06:24 +00:00
Alexander Motin
81614d236f Add missing newlines.
MFC after:	3 days
2020-07-23 14:33:25 +00:00
Tom Jones
3b01bf881c Add tests for "add", "change" and "delete" functionality of /sbin/route.
Add tests to cover "add", "change" and "delete" functionality of /sbin/route
for ipv4 and ipv6. These tests for the existing route tool are the first step
towards creating libroute.

Submitted by:   Ahsan Barkati
Sponsored by:   Google, Inc. (GSoC 2020)
Reviewed by:    kp, thj
Approved by:    bz (mentor)
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D25220
2020-07-22 13:49:54 +00:00
Simon J. Gerraty
f2be828f97 Revert that! 2020-07-19 23:56:19 +00:00