Commit Graph

257113 Commits

Author SHA1 Message Date
Robert Wing
b7fd9c4e5e bhyve/snapshot: rename checkpoint_opcodes to be more generic
Generalize the naming here since the domain socket that uses these codes
might be used for purposes other than the save/restore feature.

- rename checkpoint_opcodes to ipc_opcode

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D28877
2021-02-27 12:03:03 -09:00
Robert Watson
a9f1135503 Add Xrefs to the new VOP_SETLABEL(9) from mac(9) and vnode(9).
MFC after:	3 days
2021-02-27 16:53:53 +00:00
Robert Watson
7bfd84444e Provide a man page for VOP_SETLABEL(9).
MFC after:	3 days
2021-02-27 16:51:13 +00:00
Robert Watson
a92c6b24c0 Add a comment on why the call to mac_vnode_relabel() might be in the wrong
place -- in the VOP rather than vn_setexttr() -- and that it is for historic
reasons.  We might wish to relocate it in due course, but this way at least
we document the asymmetry.
2021-02-27 16:25:26 +00:00
Alexander Motin
9d9fd8b79f Micro-optimize OOA queue processing.
- Move ctl_get_cmd_entry() calls from every OOA traversal to when
  the requests first inserted, storing seridx in struct ctl_scsiio.
- Move some checks out of the loop in ctl_check_ooa().
- Replace checks for errors that can not happen with asserts.
- Transpose ctl_serialize_table, so that any OOA traversal accessed
  only one row (cache line).  Compact it from enum to uint8_t.
- Optimize static branch predictions in hottest places.

Due to O(n) nature on deep LUN queues this can be the hottest code
path in CTL, and additional 20% of IOPS I see in some 4KB I/O tests
are good to have in reserve.  About 50% of CPU time here according
to the profiles is now spent in two memory accesses per traversed
request in OOA.

Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2021-02-27 10:40:24 -05:00
Toomas Soome
becaac3972 loader: use display pixel density for font autoselection
Calculate font size from 16 density independent pixels (dp) by using:
size = 16 * ppi/160 * display_factor

We are specifying font size 16dp, and assuming 1dp = 160ppi.
Also apply scaling factor 2 (display_factor).

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28849
2021-02-27 11:26:02 +02:00
Warner Losh
c01da939b0 cardbus: Be sure to acquire Giant when calling into newbus
Acquire Giant in cardbus_detach_card. This used to be done above us, but no
more.

Tested by: kargl@
MFC After: 3 days
2021-02-27 01:23:09 -07:00
Martin Matuska
c170aa9f37 zfs: add missing checks for unsupported features
After the merge of OpenZFS master-9312e0fd1 it has become possible to
import ZFS pools witn an active org.illumos:edonr feature on FreeBSD,
leading to a panic.

In addition, "zpool status" reported all pools without edonr as upgradable
and "zpool upgrade -v" lists edonr in the list of upgradable features.

This is an accepted but not yet included bugfix by upstream.

Obtained from:		https://github.com/openzfs/zfs/pull/11653
Differential Revision:	https://reviews.freebsd.org/D28935
Reported by:		garga (on freebsd-current@)
Reviewed by:		freqlabs
X-MFC-with:		ba27dd8be8
2021-02-27 00:05:50 +01:00
Richard Scheffenegger
9e83a6a556 Include new data sent in PRR calculation
Reviewed By:	#transport, kbowling
MFC after:	3 days
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D28941
2021-02-26 22:31:58 +01:00
Daniel Ebdrup Jensen
bc3bba70d8 inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf

This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.

As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.

The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.

The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).

While here, remove two examples for which compatible daemons could not
be found in ports.

Submitted by:	David Yeske <dyeske at gmail.com> (in part, prev ver)
PR:		122037
Reviewed by:	kevans, brueffer, lwhsu, yuripv
Differential Revision:	https://reviews.freebsd.org/D28882
2021-02-26 20:07:03 +01:00
Warner Losh
34d6961108 cam: add new ASC and ASCQ values related to drive depopulation
Add 04/25 Depopulation restoration in progress, 31/04 Depopulation failed, and
31/05 Depopulation restoration failed.

These are defined in SPC-6r2 (though 31/4 was added in an earlier draft). They
relate to different aspects of in-progress or failed depopulation removal and
restoration commands.
2021-02-26 11:45:06 -07:00
dankm
888ae57252 nvi: fix catalog generation
Upstream broke catalog generation with some over-eagre style cleanups.
This brings in my pull request.

Obtained from:	https://github.com/lichray/nvi2/pull/88
Differential Revision: https://reviews.freebsd.org/D28594
2021-02-26 16:32:01 +01:00
Alan Somers
60a632f047 fortune: add a tip about gstat
MFC after:	3 weeks
2021-02-26 08:06:07 -07:00
ceri
1bf86687c2 etc/shells: Add a reference to the ftpd manpage
While here, also fix incorrect capitalizaiton
2021-02-26 14:09:19 +01:00
Baptiste Daroussin
172f2fc11c dialog: guard macros definition to avoid redifinition
This unbreaks building libdpv
2021-02-26 11:13:43 +01:00
Baptiste Daroussin
ec74116ace dialog: finish update to 1.3-20210117
patch dialog.c which requires stddef for the usage of offsetof
catchup on the config header
2021-02-26 10:17:19 +01:00
Baptiste Daroussin
a96ef45019 dialog: import dialog 1.3-20210117 2021-02-26 10:16:49 +01:00
Baptiste Daroussin
01b7bcd408 dialog: vendor import version 1.3-20210117 2021-02-26 10:05:35 +01:00
Navdeep Parhar
dfff1de729 cxgbe(4): Read the rx 'c' channel for a port and make it available.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-02-25 23:46:14 -08:00
Cy Schubert
763db58932 rc: save and restore $IFS
Fix another bug in 77e1ccbee3. $IFS
should be fully restored for its other users.

PR:		249192
Reported by:	jkim
MFC after:	3 weeks
X-MFC with:	77e1ccbee3
2021-02-25 22:03:38 -08:00
Jamie Gritton
589e4c1df4 jail: Add safety around prison_deref() flags.
do_jail_attach() now only uses the PD_XXX flags that refer to lock
status, so make sure that something else like PD_KILL doesn't slip
through.

Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse.
2021-02-25 20:10:42 -08:00
Jamie Gritton
108a9384e9 jail: Fix locking on an early jail_set error.
I had locked allprison_lock without immediately setting PD_LIST_LOCKED.
2021-02-25 19:52:58 -08:00
Mitchell Horne
1fc928770b Remove stale references to opt_sio.h
The sio(4) driver was removed entirely in 2019, commit 71f0077631.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D28929
2021-02-25 21:43:12 -04:00
Alexander Motin
a9bd22814f Remove pointless lun->be_lun checks.
There is no such thing as LUN without backend, at least for years.

MFC after:	1 week
2021-02-25 19:48:03 -05:00
Mark Johnston
aac25e2225 pmap: Fix largemap restart checks in the kernel_maps sysctl handler
The purpose of these checks is to ensure that the address of the
next-level page table page is valid, since nothing is synchronizing with
a concurrent update of the large map and large map PTPs are freed to the
system.  However, if PG_PS is set, there is no next level.

Reported by:	rpokala
Reviewed by:	kib
Tested by:	rpokala
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28922
2021-02-25 18:49:47 -05:00
John Baldwin
90972f0402 ktls: Use COUNTER_U64_DEFINE_EARLY for the ktls_toe_chacha20 counter.
I missed updating this counter when rebasing the changes in
9c64fc4029 after the switch to
COUNTER_U64_DEFINE_EARLY in 1755b2b989.

Fixes:		9c64fc4029 Add Chacha20-Poly1305 as a KTLS cipher suite.
Sponsored by:	Netflix
2021-02-25 15:00:13 -08:00
Kristof Provost
5f1b1f184b pf: Fix incorrect fragment handling
A sequence of overlapping IPv4 fragments could crash the kernel in
pf due to an assertion.

Reported by:	Alexander Bluhm
Obtained from:	OpenBSD
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-02-25 21:51:08 +01:00
Baptiste Daroussin
d2eb5dbd7d ncurses: fix generation of term.h
All variable were not properly expanded

Submitted by:	cy (initial version)
2021-02-25 22:49:20 +01:00
Baptiste Daroussin
e6b8135227 ncurses: fix patch date
Submitted by:	cy
2021-02-25 22:47:44 +01:00
Adrian Chadd
547739cc00 [ar71xx] Fix routerstation / routerstation pro redboot FIS probing
Some changes back in ye olde times somewhere has changed the default
block size the flash device exposes.  So, the default geom redboot
FIS probing (to find the partition table structure in flash!)
is no longer finding it.

So, force it to probe at the last 64k of flash regardless of the
underlying flash block size.

Tested:

* Ubiquiti Routerstation pro, boots -HEAD MIPS
2021-02-25 13:14:55 -08:00
Brandon Bergren
5001c579ba [PowerPC64LE] pseries: Fix input buffering logic.
In uart_phyp_get(), when the internal buffer is empty, we make a
hypercall to retrieve up to 16 bytes of input data from the
hypervisor. As this is specified to be returned in BE format, we need
to do a 64-bit byte swap on the first and second half of the data.

If the buffer being passed in was insufficient to return the fetched
data, we store the remainder in the internal buffer and use it to
satisfy the following calls to uart_phyp_get() until it is drained.

However, in this case, we were accidentally byteswapping the internal
buffer again.

Move the byteswapping code to just after the hypercall so it only gets
swapped when we're filling the buffer.

Fixes arrow keys in qemu on pseries, among other console oddities.

Sponsored by:	Tag1 Consulting, Inc.
MFC after:	3 days
2021-02-25 14:50:13 -06:00
Ryan Libby
d7671ad8d6 Close races in vm object chain traversal for unlock
We were unlocking the vm object before reading the backing_object field.
In the meantime, the object could be freed and reused.  This could cause
us to go off the rails in the object chain traversal, failing to unlock
the rest of the objects in the original chain and corrupting the lock
state of the victim chain.

Reviewed by:	bdrewery, kib, markj, vangyzen
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D28926
2021-02-25 12:11:19 -08:00
Cy Schubert
f1ab799927 rc: fix rc script parsing
77e1ccbee3 introduced a bug whereby
rc scripts in etc/rc.d and $local_startup failed to parse output
from called commands because IFS was set to " " instead of the
default " \t\n". This caused parsing of output that contains any
whitespace character, such as tabs and newlines, not matching just a
space to fail.

PR:		249192
MFC after:	3 weeks
X-MFC with:	77e1ccbee3
2021-02-25 11:47:56 -08:00
Ryan Moeller
2ae79aa362 Install links for zpool feature compat aliases
The alias links were missed when this feature was introduced to the
FreeBSD build system in 10f57cb98f.

Reviewed by:	mm
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D28925
2021-02-25 14:16:09 -05:00
Ryan Moeller
b7109c3cfd libifconfig: Add missing symbols to map
Regenerate the list of generated symbols for libifconfig:

```
grep -hr ^ifconfig_sfp_ /usr/obj/usr/src/amd64.amd64/lib/libifconfig \
| sed 's/(.*/;/' | sort -u
```

Spotted by build failures caused by a missing symbol while working on
upgrading libifconfig from internal to private.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D28927
2021-02-25 13:58:33 -05:00
Edward Tomasz Napierala
e7a5b3bd05 Modify lock_delay() to increase the delay time after spinning
Modify lock_delay() to increase the delay time after spinning,
not before.  Previously we would spin at least twice instead of once.
In NetApp's benchmarks this fixes a performance regression compared
to FreeBSD 10, which called cpu_spinwait() directly.

Reviewed By:	mjg
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27331
2021-02-25 18:55:26 +00:00
Edward Tomasz Napierala
22267215d6 camcontrol(8): remove unnecessary CCB zeroing
After 3e404b8c53, cam_getccb(3) clears the returned CCB, making
a number of calls to CCB_CLEAR_ALL_EXCEPT_HDR(3) unnecessary.

Reviewed By:	imp
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27812
2021-02-25 18:45:21 +00:00
Edward Tomasz Napierala
f848d08e45 camcontrol: stop pretending cam_cmd is a bitmask
Cleanup only, no functional changes.

Reviewed By:	imp
Sponsored By:	NetApp, Inc.
Sponsored By:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27813
2021-02-25 18:40:07 +00:00
Baptiste Daroussin
304bc76605 ncurses: update configuration header after update 2021-02-25 19:28:31 +01:00
Baptiste Daroussin
705d726338 ncurses: ensure we prefer the generated ncurses_dll.h 2021-02-25 19:27:29 +01:00
Baptiste Daroussin
7a65641922 ncurses: import version 6.2-20210220 2021-02-25 19:26:56 +01:00
Renato Botelho
220c6d922a ncurses: Silence MKuserdefs.sh call
Remove -x flag from sh used to execute MKuserdefs.sh during ncurses
build and stop polluting make -s output

Reviewed by:		bapt, manu
Approved by:		bapt
Differential Revision:	https://reviews.freebsd.org/D28885
2021-02-25 15:22:17 -03:00
Richard Scheffenegger
2593f858d7 A TCP server has to take into consideration, if TCP_NOOPT is preventing
the negotiation of TCP features. This affects most TCP options but
adherance to RFC7323 with the timestamp option will prevent a session
from getting established.

PR:	253576
Reviewed By:	tuexen, #transport
MFC after:	3 days
Sponsored by:	NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28652
2021-02-25 19:12:20 +01:00
Richard Scheffenegger
31d7a27c6e PRR: Avoid accounting left-edge twice in partial ACK.
Reviewed By:	#transport, kbowling
MFC after:	3 days
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D28819
2021-02-25 18:37:47 +01:00
Richard Scheffenegger
48396dc779 Address two incorrect calculations and enhance readability of PRR code
- address second instance of cwnd potentially becoming zero
- fix sublte bug due to implicit int to uint typecase in max()
- fix bug due to typo in hand-coded CEILING() function by using howmany() macro
- use int instead of long, and add a missing long typecast
- replace if conditionals with easier to read imax/imin (as in pseudocode)

Reviewed By: #transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28813
2021-02-25 18:32:04 +01:00
Baptiste Daroussin
bf0ab54638 Vendor import ncurses 6.2-20210220 2021-02-25 18:22:00 +01:00
Emmanuel Vadot
8f3c71c85e mkimg: Add support for offset if the source is an image
This allow us to create image with the following format:
mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G

Which will add a efi partition at a 1M offset on the image with its content
coming from the esp_aarch64.img file.

MFC after:	3 days
2021-02-25 18:11:50 +01:00
Li-Wen Hsu
655fa04406
Add if_wg.4 MLINK 2021-02-26 00:43:15 +08:00
Ed Maste
ba7ede0b9b Add UPDATING entry for PIE default
As of commit 9a227a2fd6 PIE is on by default for 64-bit architectures.

Relnotes:	yes
2021-02-25 11:02:09 -05:00
Emmanuel Vadot
3b6268bb9e mkimg: We always want the last block of the last inserted partition
Even with an absolute offset we want to know the last block the partition
otherwise we endup with an image the size of the metadata.
This allow to create image with the ESP placed at a specific position which
is useful on arm/arm64 where u-boot have always a hard time to read the ESP
if it's not aligned on 512k.
mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G
now works.

MFC after:	3 days
2021-02-25 16:34:28 +01:00