Commit Graph

254666 Commits

Author SHA1 Message Date
Eitan Adler
1906ce9ca7 arcconfig: add callsign again
Problem

When using git-svn or other non-pure-svn tooling the original subversion
URL is not present. This causes arcanist/phabricator to be unable to
determine which repository is being modified.

Solution

Restore callsign to .arcconfig to enable exact repository matching even
with git-svn.

Reported By:	jhb
2020-11-23 04:39:29 +00:00
Kyle Evans
dac521ebcf cpuset_setproc: use the appropriate parent for new anonymous sets
As far as I can tell, this has been the case since initially committed in
2008.  cpuset_setproc is the executor of cpuset reassignment; note this
excerpt from the description:

* 1) Set is non-null.  This reparents all anonymous sets to the provided
*    set and replaces all non-anonymous td_cpusets with the provided set.

However, reviewing cpuset_setproc_setthread() for some jail related work
unearthed the error: if tdset was not anonymous, we were replacing it with
`set`. If it was anonymous, then we'd rebase it onto `set` (i.e. copy the
thread's mask over and AND it with `set`) but give the new anonymous set
the original tdset as the parent (i.e. the base of the set we're supposed to
be leaving behind).

The primary visible consequences were that:

1.) cpuset_getid() following such assignment returns the wrong result, the
    setid that we left behind rather than the one we joined.
2.) When a process attached to the jail, the base set of any anonymous
    threads was a set outside of the jail.

This was initially bundled in D27298, but it's a minor fix that's fairly
easy to verify the correctness of.

A test is included in D27307 ("badparent"), which demonstrates the issue
with, effectively:

osetid = cpuset_getid()
newsetid = cpuset()
cpuset_setaffinity(thread)
cpuset_setid(osetid)
cpuset_getid(thread) -> observe that it matches newsetid instead of osetid.

MFC after:	1 week
2020-11-23 02:49:53 +00:00
Kyle Evans
60e60e73fd freebsd32: take the _umtx_op struct definitions back
Providing these in freebsd32.h facilitates local testing/measuring of the
structs rather than forcing one to locally recreate them. Sanity checking
offsets/sizes remains in kern_umtx.c where these are typically used.
2020-11-23 00:58:14 +00:00
Kyle Evans
f96078b8fe kern: dup: do not assume oldfde is valid
oldfde may be invalidated if the table has grown due to the operation that
we're performing, either via fdalloc() or a direct fdgrowtable_exp().

This was technically OK before rS367927 because the old table remained valid
until the filedesc became unused, but now it may be freed immediately if
it's an unshared table in a single-threaded process, so it is no longer a
good assumption to make.

This fixes dup/dup2 invocations that grow the file table; in the initial
report, it manifested as a kernel panic in devel/gmake's configure script.

Reported by:	Guy Yur <guyyur gmail com>
Reviewed by:	rew
Differential Revision:	https://reviews.freebsd.org/D27319
2020-11-23 00:33:06 +00:00
Alexander V. Chernikov
7511a63825 Refactor rib iterator functions.
* Make rib_walk() order of arguments consistent with the rest of RIB api
* Add rib_walk_ext() allowing to exec callback before/after iteration.
* Rename rt_foreach_fib_walk_del -> rib_foreach_table_walk_del
* Rename rt_forach_fib_walk -> rib_foreach_table_walk
* Move rib_foreach_table_walk{_del} to route/route_helpers.c
* Slightly refactor rib_foreach_table_walk{_del} to make the implementation
 consistent and prepare for upcoming iterator optimizations.

Differential Revision:	https://reviews.freebsd.org/D27219
2020-11-22 20:21:10 +00:00
Emmanuel Vadot
5e38d9e483 if_dwc: Correctly configure the DMA engine based on the fdt properties
Do not hardcode what we setup for the DMA engine configuration but
lookup the fdt properties and configuring accordingly.
Use a default value of 8 for the burst dma length for both TX and
RX, this is what we used for TX before.
2020-11-22 20:16:46 +00:00
Emmanuel Vadot
5321a88409 release: rpi3: Copy the bcm2710 variant of the rpi2
This is the dtb intented to be used for booting RPI2 v1.2 in aarch64.
2020-11-22 18:42:08 +00:00
Alexander Motin
3037002e33 Fix debug build after 367926. 2020-11-22 16:13:09 +00:00
Vincenzo Maffione
7ebc0ac4c9 netmap: bridge: improve readability
Multiple cosmetic changes, plus a fix to a verbose print
(indicating wrong net->host/host->net direction).

MFC after:	3 days
2020-11-22 13:39:21 +00:00
Vincenzo Maffione
9fd3f663da netmap: valectl: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

MFC after:      3 days
2020-11-22 10:02:56 +00:00
Vincenzo Maffione
91c60ce828 netmap: nmreplay: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

MFC after:      3 days
2020-11-22 09:38:01 +00:00
Vincenzo Maffione
73b2e3e56b netmap: lb: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h

MFC after:	3 days
2020-11-22 09:28:50 +00:00
Vincenzo Maffione
4bfe1a4fe2 netmap: pkt-gen: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h
2020-11-22 09:20:08 +00:00
Vincenzo Maffione
ecfd9756ce netmap: bridge: switch to libnetmap
Use the newer libnetmap (included in base) rather than the older
nm_open()/nm_close() defined in netmap_user.h
2020-11-22 09:10:12 +00:00
Kyle Evans
e0cb5b2a77 [2/2] _umtx_op: introduce 32-bit/i386 flags for operations
This patch takes advantage of the consolidation that happened to provide two
flags that can be used with the native _umtx_op(2): UMTX_OP___32BIT and
UMTX_OP__I386.

UMTX_OP__32BIT iindicates that we are being provided with 32-bit structures.
Note that this flag alone indicates a 64bit time_t, since this is the
majority case.

UMTX_OP__I386 has been provided so that we can emulate i386 as well,
regardless of whether the host is amd64 or not.

Both imply a different set of copyops in sysumtx_op. freebsd32__umtx_op
simply ignores the flags, since it's already doing a 32-bit operation and
it's unlikely we'll be running an emulator under compat32. Future work
could consider it, but the author sees little benefit.

This will be used by qemu-bsd-user to pass on all _umtx_op calls to the
native interface as long as the host/target endianness matches, effectively
eliminating most if not all of the remaining unresolved deadlocks for most.

This version changed a fair amount from what was under review, mostly in
response to refactoring of the prereq reorganization and battle-testing
it with qemu-bsd-user.  The main changes are as follows:

1.) The i386 flag got renamed to omit '32BIT' since this is redundant.
2.) The flags are now properly handled on 32-bit platforms to emulate other
    32-bit platforms.
3.) Robust list handling was fixed, and the 32-bit functionality that was
    previously gated by COMPAT_FREEBSD32 is now unconditional.
4.) Robust list handling was also improved, including the error reported
    when a process has already registered 32-bit ABI lists and also
    detecting if native robust lists have already been registered. Both
    scenarios now return EBUSY rather than EINVAL, because the input is
    technically valid but we're too busy with another ABI's lists.

libsysdecode/kdump/truss support will go into review soon-ish, along with
the associated manpage update.

Reviewed by:	kib (earlier version)
MFC after:	3 weeks
2020-11-22 05:47:45 +00:00
Alexander Motin
cbf33b3654 Fix build after 367926.
Option ISP_TARGET_MODE is evil.
2020-11-22 05:42:52 +00:00
Kyle Evans
15eaec6a5c _umtx_op: move compat32 definitions back in
These are reasonably compact, and a future commit will blur the compat32
lines by supporting 32-bit operations with the native _umtx_op.
2020-11-22 05:34:51 +00:00
Robert Wing
3c85ca21d1 fd: free old file descriptor tables when not shared
During the life of a process, new file descriptor tables may be allocated. When
a new table is allocated, the old table is placed in a free list and held onto
until all processes referencing them exit.

When a new file descriptor table is allocated, the old file descriptor table
can be freed when the current process has a single-thread and the file
descriptor table is not being shared with any other processes.

Reviewed by:    kevans
Approved by:    kevans (mentor)
Differential Revision:  https://reviews.freebsd.org/D18617
2020-11-22 05:00:28 +00:00
Alexander Motin
0b19f90a43 Make handlers and atpds overflows unlikely.
- Allocate 256 handlers more than payload commands for management purposes.
 - Increase maximum number of handlers from 8K to 16K by tuning the format.
 - Just to be safe limit the number of payload commands to 16K - 256.
 - Limit number of target exchanges in mixed mode to the number of atpds.
 - If we still somehow get out of atpds -- return BUSY, since we really are.
2020-11-22 04:29:55 +00:00
Alexander Motin
254c652b6d Do not parent all busdma tags to the payload tag.
There is not much to inherit any more, may create more problems than solve.
Instead parent them all directly to upstream.

While there, add missed payload tag and tune scratch tag destructions.
2020-11-22 04:10:13 +00:00
Alexander Motin
c515717a02 Remove remnants of execthrottle and maxalloc parameters.
The first was obsolete since 26xx, not used on 25xx and not needed on 24xx.
The second seems never worked on 24xx and up.
2020-11-22 02:51:30 +00:00
Konstantin Belousov
e68c619144 Stop using eventhandlers for itimers subsystem exec and exit hooks.
While there, do some minor cleanup for kclocks.  They are only
registered from kern_time.c, make registration function static.
Remove event hooks, they are not used by both registered kclocks.
Add some consts.

Perhaps we can stop registering kclocks at all and statically
initialize them.

Reviewed by:	mjg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D27305
2020-11-21 21:43:36 +00:00
Michael Reifenberger
2717b998b2 Improve number reading by rounding up to a next unit earlier for memory display.
Submitted by:	ota@j.email.ne.jp
Differential Revision:	https://reviews.freebsd.org/D26503
2020-11-21 19:14:11 +00:00
Vincenzo Maffione
f234252d16 netmap: bridge, pkt-gen: fix man page typo
Reported by:	ian
MFC after:	3 days
2020-11-21 18:47:13 +00:00
Vincenzo Maffione
792d05c2c8 netmap: bridge: update man page with more information
Update the man page to describe how it is necessary to
enable promiscuous mode and/or disable offloads.
2020-11-21 18:20:21 +00:00
Konstantin Belousov
5a2a4551f5 Remove unused prototype.
Missed part of r367918.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2020-11-21 10:58:19 +00:00
Konstantin Belousov
74a093eb98 Stop using eventhandler to invoke umtx_exec hook.
There is no point in dynamic registration, umtx hook is there always.

Reviewed by:	mjg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D27303
2020-11-21 10:32:40 +00:00
Navdeep Parhar
b3718e2d7e cxgbe(4): Catch up with in-flight netmap rx before destroying queues.
The netmap application using the driver is responsible for replenishing
the receive freelists and they may be totally depleted when the
application exits.  Packets in flight, if any, might block the pipeline
in case there aren't enough buffers left in the freelist.  Avoid this by
filling up the freelists with a driver allocated buffer.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-11-21 03:27:32 +00:00
Alexander Motin
9a201fad1d Unlucky change...
MFC after:	3 days
2020-11-21 00:53:31 +00:00
Alexander Motin
69df0af073 Fix stupid math mistake in r366922.
MFC after:	3 days
2020-11-21 00:51:39 +00:00
Rick Macklem
04914a2195 Document the new "tls" NFS mount option.
Recent commits to head have added support for NFS over TLS
to the FreeBSD kernel.
To enable use of this for an NFS mount, the "tls" mount_nfs
option has been added.

Once the IETF has assigned an RFC number, I will replace "NNNN"
with the number.

This is a content change.

Reviewed by:	gbe
Differential Revision:	https://reviews.freebsd.org/D26262
2020-11-20 22:29:38 +00:00
Rick Macklem
9acc400b6e Update man page for new TLS export options.
NFS over TLS uses three new export options, added by r364979.
This patch updates the exports.5 man page for these new options.
Once assigned by IETF, "NNNN" will be replaced with the RFC number.

This is a content change.

Reviewed by:	gbe
Differential Revision:	https://review.freebsd.org/D26241
2020-11-20 22:14:51 +00:00
Kirk McKusick
e75f0f2b48 Only attempt a VOP_UNLOCK() when the vn_lock() has been successful.
No MFC as this code is not present in 12-stable.

Reported by:  Peter Holm
Reviewed by:  Mateusz Guzik
Tested by:    Peter Holm
Sponsored by: Netflix
2020-11-20 20:22:01 +00:00
Bryan Drewery
80cedb809f Add lists for customizing legacy and bootstrap-tools.
Reviewed by:	arichardson
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27200
2020-11-20 20:11:59 +00:00
Alexander Motin
b8e2395ec5 Increase queue depths from 1024/256 to 8192/1024 IOCBs.
Qlogic chips store S/G lists in the same queue as requests themselves.  In
the worst case 1MB I/O may require up to 52 IOCBs, that means queue of 1024
IOCBs can store only 19 of such requests.  The increase reduces chances of
overflow, while we should be able to afford additional 512KB of RAM per HBA.
The Linux driver uses comparable numbers.

While there, decouple ATIO queue size from response queue size.  There is
no reason for them to be equal.
2020-11-20 19:36:34 +00:00
Alfredo Dal'Ava Junior
e63daed1b8 [POWERPC] print uprintf_signal 'type' field in hex
Print 'type' field in hex to improve readability

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D27294
2020-11-20 18:52:37 +00:00
Alfredo Dal'Ava Junior
4ae78e70f7 [POWERPC64LE,POWEPCSPE] set default kernel config for powerpc64le and powerpcspe variants
Default KERNCONF for powerpc64le should be GENERIC64, and powerpcspe should
select MPC85XXSPE

Reviewed by:	bdragon,emaste
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D27257
2020-11-20 18:42:01 +00:00
Alexander Motin
f6854a0cd5 Cleanup DMA handling.
- Make isp_start() to set all the IOCB fields aside of S/G list, removing
extra information from isp_send_cmd(), now only doing S/G lists and sending.
 - Turn DMA setup/free from being card and PCI-specific into OS-specific,
instead add new card-specific method for isp_send_cmd().  Previously this
function was a monster handling all the cards.
 - Remove double error code translation.
2020-11-20 18:02:04 +00:00
Jonathan T. Looney
96fbe51956 When copying types from one CTF container to another, ensure that we
encode 0-length (i.e. "") structure and union member names as offset 0.
This ensures that we don't confuse other parts of the CTF code which
expect this encoding.

This resolves a Dtrace error resolving members of anonymous structs/unions
within the (struct mbuf) type which some users were seeing after r366908.

While here, update the code in ctf_add_generic() to encode 0-length type
names as offset 0.

Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D27246
2020-11-20 17:26:02 +00:00
Gordon Bergling
d84134ba1c hostapd.conf(5): Add missing 'l'
In r367901 I accidentally deleted the 'l' while fixing a few
mandoc erros.

Spotted by: Yuri Pankov
2020-11-20 17:13:13 +00:00
Gordon Bergling
35a521b6bc moused(8): Fix a few mandoc warnings
- new sentence, new line
2020-11-20 17:04:49 +00:00
Gordon Bergling
26762c66e4 crashinfo(8): Fix a few mandoc warnings
- new sentence, new line
2020-11-20 16:59:51 +00:00
Gordon Bergling
7424766d75 hostapd.conf(5): Fix a mandoc warning
- new sentence, new line
2020-11-20 16:57:06 +00:00
Gordon Bergling
cbf541311c syslog.conf(5): Fix a few mandoc warnings
- new sentence, new line
- skipping paragraph macro: Pp at the end of Sh
2020-11-20 16:50:52 +00:00
Gordon Bergling
dbac569b41 snmp_wlan(3): Fix mandoc warnings
- new sentence, new line
2020-11-20 16:46:51 +00:00
Gordon Bergling
69109a4fbd iscsi.conf(5): Fix a mandoc warning
- new sentence, new line
2020-11-20 16:41:32 +00:00
Gordon Bergling
919c763a49 devmatch(8): Fix section ordering
- sections out of conventional order: Sh HISTORY
2020-11-20 16:34:01 +00:00
Mitchell Horne
08241f9192 riscv: always initialize the static kernel environment
Ensure we initialize the static environment when not booting via
loader(8), and provide a static buffer if this is the case. This fixes
two issues.

First, performing the initialization ensures that kenv variables set in
the kernel's config file are honored. Previously, any new or overridden
values were ignored.

Second, providing the static buffer allows variables to be set in the
device tree's bootargs property of the chosen node. This can be set by
u-boot or by QEMU's '-append' flag. Attempting to this prior to this
change resulted in an early panic, since the static environment had no
buffer backing it.

Submitted by:	syrinx (earlier version)
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D25034
2020-11-20 15:21:10 +00:00
Konstantin Belousov
6936779347 msdosfs: suspend around unmount or remount rw->ro.
This also eliminates unsafe use of VFS_SYNC(MNT_WAIT).

Requested by:	mckusick
Discussed with:	imp
Tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D27269
2020-11-20 15:19:30 +00:00
Mitchell Horne
70af7ce99a Make net/ifq.h C++ friendly
Don't use "new" as an identifier, and add explicit casts from void *.

As a general policy, FreeBSD doesn't make any C++ compatibility
guarantees for kernel headers like it does for userland, but it is a
small effort to do so in this case, to the benefit of a downstream
consumer (NetApp).

Reviewed by:	rscheff
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D27286
2020-11-20 14:45:45 +00:00