]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoexit requires stdlib.h to be included to use.
imp [Wed, 23 Oct 2019 19:23:31 +0000 (19:23 +0000)]
exit requires stdlib.h to be included to use.

FreeBSD 10.3 requires this, and dtc is a bootstrap tool so it needs to compile
there.

4 years agoamd64 pmap: per-domain pv chunk list
mjg [Wed, 23 Oct 2019 19:17:10 +0000 (19:17 +0000)]
amd64 pmap: per-domain pv chunk list

This significantly reduces contention since chunks get created and removed
all the time. See the review for sample results.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21976

4 years agoamd64: Add CFI directives for libc syscall stubs
cem [Wed, 23 Oct 2019 19:03:03 +0000 (19:03 +0000)]
amd64: Add CFI directives for libc syscall stubs

No functional change (in program code).  Additional DWARF metadata is
generated in the .eh_frame section.  Also, it is now a compile-time
requirement that machine/asm.h ENTRY() and END() macros are paired.  (This
is subject to ongoing discussion and may change.)

This DWARF metadata allows llvm-libunwind to unwind program stacks when the
program is executing the function.  The goal is to collect accurate
userspace stacktraces when programs have entered syscalls.

(The motivation for "Call Frame Information," or CFI for short -- not to be
confused with Control Flow Integrity -- is to sufficiently annotate assembly
functions such that stack unwinders can unwind out of the local frame
without the requirement of a dedicated framepointer register; i.e.,
-fomit-frame-pointer.  This is necessary for C++ exception handling or
collecting backtraces.)

For the curious, a more thorough description of the metadata and some
examples may be found at [1] and documentation at [2].  You can also look at
'cc -S -o - foo.c | less' and search for '.cfi_' to see the CFI directives
generated by your C compiler.

[1]: https://www.imperialviolet.org/2017/01/18/cfi.html
[2]: https://sourceware.org/binutils/docs/as/CFI-directives.html

Reviewed by: emaste, kib (with reservations)
Differential Revision: https://reviews.freebsd.org/D22122

4 years agolibthr: Add missing END() directive for umtx_op_err (amd64)
cem [Wed, 23 Oct 2019 18:27:30 +0000 (18:27 +0000)]
libthr: Add missing END() directive for umtx_op_err (amd64)

Like r353929, related to D22122.  No functional change.

Reviewed by: emaste, kib (earlier version both)

4 years agoCheck for bogus_page in vnode_pager_generic_getpages_done().
markj [Wed, 23 Oct 2019 18:00:22 +0000 (18:00 +0000)]
Check for bogus_page in vnode_pager_generic_getpages_done().

We now assert that a page is busy when updating its validity-tracking
state, but bogus_page is not busied during a getpages operation.

Reported by: syzkaller
Reviewed by: alc, kib
Discussed with: jeff
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22124

4 years agoVerify identity after checking for WAITFAIL in vm_page_busy_acquire().
markj [Wed, 23 Oct 2019 17:58:19 +0000 (17:58 +0000)]
Verify identity after checking for WAITFAIL in vm_page_busy_acquire().

A caller that does not guarantee that a page's identity won't change
while sleeping for a busy lock must specify either NOWAIT or WAITFAIL.

Reported by: syzkaller
Reviewed by: alc, kib
Discussed with: jeff
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22124

4 years agoAdd missing M_NOWAIT flag
rstone [Wed, 23 Oct 2019 17:20:20 +0000 (17:20 +0000)]
Add missing M_NOWAIT flag

The LinuxKPI linux_dma code calls PCTRIE_INSERT with a
mutex held, but does not set M_NOWAIT when allocating
nodes, leading to a potential panic.  All of this code
can handle an allocation failure here, so prefer an
allocation failure to sleeping on memory.

Also fix a related case where NOWAIT/WAITOK was not
specified.  In this case it's not clear whether sleeping
is allowed so be conservative and assume not.  There are
a lot of other paths in this code that can fail due to
a lack of memory anyway.

Differential Revision: https://reviews.freebsd.org/D22127
Reviewed by: imp
Sponsored by: Dell EMC Isilon
MFC After: 1 week

4 years agoBuild toolchain components as dynamically linked executables by default
dim [Wed, 23 Oct 2019 17:02:45 +0000 (17:02 +0000)]
Build toolchain components as dynamically linked executables by default

Summary:
Historically, we have built toolchain components such as cc, ld, etc as
statically linked executables.  One of the reasons being that you could
sometimes save yourself from botched upgrades, by e.g. recompiling a
"known good" libc and reinstalling it.

In this day and age, we have boot environments, virtual machine
snapshots, cloud backups, and other much more reliable methods to
restore systems to working order.  So I think the time is ripe to flip
this default, and link the toolchain components dynamically, just like
almost all other executables on FreeBSD.

Maybe at some point they can even become PIE executables by default! :)

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D22061

4 years agoBump clang's default target CPU for the i386 architecture (aka "x86") to
dim [Wed, 23 Oct 2019 16:57:11 +0000 (16:57 +0000)]
Bump clang's default target CPU for the i386 architecture (aka "x86") to
i686, as per the discussion on the freebsd-arch mailing list.  Earlier
in r352030, I had already bumped it to i586, to work around missing
atomic 64 bit functions for the i386 architecture.

Relnotes: yes

4 years agoSet OBJ_NOSPLIT on the ksyms(4) VM object.
markj [Wed, 23 Oct 2019 16:53:37 +0000 (16:53 +0000)]
Set OBJ_NOSPLIT on the ksyms(4) VM object.

The object does not provide anonymous memory.

Reported by: kib
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22123

4 years agoPrevent a panic when a driver provides bogus debugnet parameters
cem [Wed, 23 Oct 2019 16:48:22 +0000 (16:48 +0000)]
Prevent a panic when a driver provides bogus debugnet parameters

This is just a bandaid; we should fix the driver(s) too.  Introduced in
r353685.

PR: 241403
X-MFC-With: r353685
Reported by: np and others

4 years agoSlightly expand description of WITH_SHARED_TOOLCHAIN, add a
dim [Wed, 23 Oct 2019 16:48:17 +0000 (16:48 +0000)]
Slightly expand description of WITH_SHARED_TOOLCHAIN, add a
corresponding WITHOUT_SHARED_TOOLCHAIN description, and regenerate
src.conf(5).

MFC after:  3 days

4 years agoStrip "sf" suffix when generating a target triple.
jhb [Wed, 23 Oct 2019 16:43:51 +0000 (16:43 +0000)]
Strip "sf" suffix when generating a target triple.

This fixes the target triple used when compiling riscv64sf with clang.

Discussed with: mhorne
MFC after: 2 weeks
Sponsored by: DARPA

4 years agoFix atomic_*cmpset32 on riscv64 with clang.
jhb [Wed, 23 Oct 2019 16:41:31 +0000 (16:41 +0000)]
Fix atomic_*cmpset32 on riscv64 with clang.

The lr.w instruction used to read the value from memory sign-extends
the value read from memory.  GCC sign-extends the 32-bit comparison
value passed in whereas clang currently does not.  As a result, if the
value being compared has the MSB set, the comparison fails for
matching 32-bit values when compiled with clang.

Use a cast to explicitly sign-extend the unsigned comparison value.
This works with both GCC and clang.

There is commentary in the RISC-V spec that suggests that GCC's
approach is more correct, but it is not clear if the commentary in the
RISC-V spec is binding.

Reviewed by: mhorne
Obtained from: Axiado
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D22084

4 years agoFix undefined behavior.
kib [Wed, 23 Oct 2019 16:06:47 +0000 (16:06 +0000)]
Fix undefined behavior.

Create a sequence point by ending a full expression for call to
vspace() and use of the globals which are modified by vspace().

Reported and reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D22126

4 years agolibm: Add missing END() directives for amd64 routines
cem [Wed, 23 Oct 2019 16:05:52 +0000 (16:05 +0000)]
libm: Add missing END() directives for amd64 routines

No functional change.  Related to D22122.

Reviewed by: emaste, kib (earlier version both)

4 years agovn_printf(): Decode VI_TEXT_REF.
kib [Wed, 23 Oct 2019 15:51:26 +0000 (15:51 +0000)]
vn_printf(): Decode VI_TEXT_REF.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

4 years agoStop enabling interrupts when reentering kdb on arm64
andrew [Wed, 23 Oct 2019 13:21:15 +0000 (13:21 +0000)]
Stop enabling interrupts when reentering kdb on arm64

When we raise a data abort from the kernel we need to enable interrupts,
however we shouldn't be doing this when in the kernel debugger. In this
case interrupts can lead to a further panic as they don't expect to be
run from such a context.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL

4 years agoregulator: Add a regnode_set_constraint function
manu [Wed, 23 Oct 2019 09:56:53 +0000 (09:56 +0000)]
regulator: Add a regnode_set_constraint function

This method check that boot_on or always_on is set to 1 and if it
is it will try to enable the regulator.
The binding docs aren't clear on what to do but Linux enable the regulator
if any of those properties is set so we want to do the same.
The function first check the status to see if the regulator is
already enabled it then get the voltage to check if it is in a acceptable
range and then enables it.
This will be either called from the regnode_init method (if it's needed by the platform)
or by a SYSINIT at SI_SUB_LAST

Reviewed by: mmel
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22106

4 years agoaxp81x: Use the default regnode_init method
manu [Wed, 23 Oct 2019 09:54:50 +0000 (09:54 +0000)]
axp81x: Use the default regnode_init method

MFC after: 1 week

4 years agoregulator: Add a regnode_method_init
manu [Wed, 23 Oct 2019 09:54:12 +0000 (09:54 +0000)]
regulator: Add a regnode_method_init

This is a default init method for regulator that don't really
need one.

MFC after: 1 week

4 years agoAssert that vm_fault_lock_vnode() returns locked saved vnode.
kib [Wed, 23 Oct 2019 07:36:26 +0000 (07:36 +0000)]
Assert that vm_fault_lock_vnode() returns locked saved vnode.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D22113

4 years agocap_sysctl: correct typo from r347534-ish
kevans [Wed, 23 Oct 2019 03:23:14 +0000 (03:23 +0000)]
cap_sysctl: correct typo from r347534-ish

operation & ~limit where limit is a bool is clearly not what was intended,
given the line prior. Correct it to use the calculated mask for validation.

The cap_sysctl tests should now be functional again.

4 years agotuntap(4): Fix NOINET build after r353741
kevans [Wed, 23 Oct 2019 02:15:15 +0000 (02:15 +0000)]
tuntap(4): Fix NOINET build after r353741

Shuffle headers around to more appropriate #ifdef OPTION blocks (INET vs.
INET6) -- double checked LINT-{NOINET,NOINET6,NOIP}, all seem good.

Reported by: cem

4 years agolibcasper/services: include <src.opts.mk> to hook tests to build
kevans [Wed, 23 Oct 2019 01:50:41 +0000 (01:50 +0000)]
libcasper/services: include <src.opts.mk> to hook tests to build

Note that the cap_sysctl tests are currently failing and need some
attention.

4 years agoCorrect spelling, apply appropriate respect.
grog [Wed, 23 Oct 2019 01:11:25 +0000 (01:11 +0000)]
Correct spelling, apply appropriate respect.

4 years agopowerpc/booke: Fix Book-E boot post-minidump
jhibbits [Wed, 23 Oct 2019 00:31:19 +0000 (00:31 +0000)]
powerpc/booke: Fix Book-E boot post-minidump

r353489 added minidump support for powerpc64, but it added a dependency on
the dump_avail array.  Leaving it uninitialized caused breakage in late
boot.  Initialize dump_avail, even though the 64-bit booke pmap doesn't yet
support minidumps, but will in the future.

4 years agoBelatedly remove stale debug symbols after r339270.
jkim [Wed, 23 Oct 2019 00:05:29 +0000 (00:05 +0000)]
Belatedly remove stale debug symbols after r339270.

Reported by: danfe
MFC after: 3 days

4 years agoamd64 pmap: conditionalize per-superpage locks on NUMA
mjg [Tue, 22 Oct 2019 22:55:46 +0000 (22:55 +0000)]
amd64 pmap: conditionalize per-superpage locks on NUMA

Instead of superpages use. The current code employs superpage-wide locking
regardless and the better locking granularity is welcome with NUMA enabled
even when superpage support is not used.

Requested by: alc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21982

4 years agoamd64 pmap: fixup invlgen lookup for fictitious mappings
mjg [Tue, 22 Oct 2019 22:54:41 +0000 (22:54 +0000)]
amd64 pmap: fixup invlgen lookup for fictitious mappings

Similarly to r353438, use dummy entry.

Reported and tested by: Neel Chauhan
Sponsored by: The FreeBSD Foundation

4 years agopseudofs: hashed vncache
mjg [Tue, 22 Oct 2019 22:52:53 +0000 (22:52 +0000)]
pseudofs: hashed vncache

Vast majority of uses the cache are just checking if there is an entry
present on process exit (and evicting it if so). Both checking and
eviction process are very expensive and put the lock protecting it high
up on the profile during poudriere -j 104.

Convert the linked list into a hash. This allows to almost always avoid
taking the lock in the first place (and consequently almost removes it
from the profile). Note only one lock is preserved as a split did not
meaningfully impact contention.

Should the cache be used for something it will still run into contention
issues. The code needs a rewrite, but should someone want to tidy it up
further the following can be done:

1) per-chain locks (or at least an array)
2) hashing by something else than just pid

Sponsored by: The FreeBSD Foundation

4 years agoReplace an uninitialized variable with the correct element from the
mckusick [Tue, 22 Oct 2019 22:23:59 +0000 (22:23 +0000)]
Replace an uninitialized variable with the correct element from the
superblock when doing recovery with journalled soft updates.

Reported by:  Chuck Silvers
MFC after:    3 days
Sponsored by: Netflix

4 years agoarm: correct kernelstack allocation size
kevans [Tue, 22 Oct 2019 21:46:03 +0000 (21:46 +0000)]
arm: correct kernelstack allocation size

This appears to be a copy-pasto from previous lines that propagated to v6
over the years. Indeed, nothing references kernelstack beyond
USPACE_SVC_STACK_TOP and it would be odd if anything did.

Noticed by: markj

4 years agoSplit Chelsio send tags into a generic base tag and a ratelimit tag.
jhb [Tue, 22 Oct 2019 20:41:54 +0000 (20:41 +0000)]
Split Chelsio send tags into a generic base tag and a ratelimit tag.

NIC KTLS will add a new TLS send tag type in cxgbe(4) that is a
distinct tag from a ratelimit tag.  To support this, refactor
cxgbe_snd_tag to be a simple send tag with a type and convert the
existing ratelimit tag to a new cxgbe_rate_tag structure.

Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D22072

4 years agoAlways allocate the atid table during attach.
jhb [Tue, 22 Oct 2019 20:01:47 +0000 (20:01 +0000)]
Always allocate the atid table during attach.

Previously the table was allocated on first use by TOE and the
ratelimit code.  The forthcoming NIC KTLS code also uses this table.
Allocate it unconditionally during attach to simplify consumers.

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D22028

4 years agoblacklistd: remove reference to NetBSD npfctl
emaste [Tue, 22 Oct 2019 18:30:51 +0000 (18:30 +0000)]
blacklistd: remove reference to NetBSD npfctl

Xr pfctl instead.

PR: 221069
Submitted by: "fml"
MFC after: 3 days

4 years ago[PPC] Avoid underflows in NUMA domains
luporl [Tue, 22 Oct 2019 18:28:58 +0000 (18:28 +0000)]
[PPC] Avoid underflows in NUMA domains

On POWER8 systems with only one memory domain, the "ibm,associativity"
number that corresponds to it is 0, unlike POWER9 systems with two
or more domains, in which the minimum value is 1.

In POWER8 case, subtracting 1 causes an underflow on the unsigned domain
variable and a subsequent index out-of-bounds access.

Reviewed by: jhibbits
Tested by: bdragon, luporl

4 years agoAllow epoch tracker to use the very last byte of the stack. Not sure
glebius [Tue, 22 Oct 2019 18:05:15 +0000 (18:05 +0000)]
Allow epoch tracker to use the very last byte of the stack.  Not sure
this will help to avoid panic in this function, since it will also use
some stack, but makes code more strict.

Submitted by: hselasky

4 years agoApply r353893 to arm64.
markj [Tue, 22 Oct 2019 17:22:10 +0000 (17:22 +0000)]
Apply r353893 to arm64.

Reported by: Jenkins (hardware CI lab)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoInitialize thread0.td_kstack_pages on arm.
markj [Tue, 22 Oct 2019 17:21:23 +0000 (17:21 +0000)]
Initialize thread0.td_kstack_pages on arm.

Fix style on the line below.

Reported by: Jenkins (hardware CI lab)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoFix thread0 kernel stack initialization on riscv.
markj [Tue, 22 Oct 2019 16:52:56 +0000 (16:52 +0000)]
Fix thread0 kernel stack initialization on riscv.

- td_kstack_pages was not being initialized.
- td_kstack is supposed to be the base address of the stack region,
  not the top.

The arm ports seem to have similar problems and will be fixed next.

Reported by: Jenkins via lwhsu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoAssert that vnode_pager_setsize() is called with the vnode exclusively locked
kib [Tue, 22 Oct 2019 16:21:24 +0000 (16:21 +0000)]
Assert that vnode_pager_setsize() is called with the vnode exclusively locked

except for filesystems that set the MNTK_VMSETSIZE_BUG,  Set the flag for ZFS.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D21883

4 years agoFix interface between nfsclient and vnode pager.
kib [Tue, 22 Oct 2019 16:17:38 +0000 (16:17 +0000)]
Fix interface between nfsclient and vnode pager.

Make the nfsclient always call vnode_pager_setsize() with the vnode
exclusively locked.  This ensures that page fault always can find the
backing page if the object size check succeeded.  Set VV_VMSIZEVNLOCK
flag on NFS nodes.

The main offender breaking the interface in nfsclient is
nfs_loadattrcache(), which is used whenever server responded with
updated attributes, which can happen on non-changing operations as
well.  Also, iod threads only have buffers locked (and even that is
LK_KERNPROC), but they still may call nfs_loadattrcache() on RPC
response.

Instead of immediately calling vnode_pager_setsize() if server
response indicated changed file size, but the vnode is not exclusively
locked, set a new node flag NVNSETSZSKIP.  When the vnode exclusively
locked, or when we can temporary upgrade the lock to exclusive, call
vnode_pager_setsize(), by providing the nfsclient VOP_LOCK() implementation.

Tested by: pho
Discussed with: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D21883

4 years agoAdd VV_VMSIZEVNLOCK flag.
kib [Tue, 22 Oct 2019 16:09:25 +0000 (16:09 +0000)]
Add VV_VMSIZEVNLOCK flag.

The flag specifies that vm_fault() handler should check the vnode'
vm_object size under the vnode lock.  It is converted into the object'
OBJ_SIZEVNLOCK flag in vnode_pager_alloc().

Tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D21883

4 years agoExecute nd6_dad_timer() in the network epoch, since nd6_dad_duplicated()
glebius [Tue, 22 Oct 2019 16:06:33 +0000 (16:06 +0000)]
Execute nd6_dad_timer() in the network epoch, since nd6_dad_duplicated()
requires it.
Make nd6_dad_starttimer() require network epoch.  Two calls out of three
happen from nd6_dad_timer().  Enter epoch in the remaining one.

4 years agovm_fault(): extract code to lock the vnode into a helper vn_fault_lock_vnode().
kib [Tue, 22 Oct 2019 15:59:16 +0000 (15:59 +0000)]
vm_fault(): extract code to lock the vnode into a helper vn_fault_lock_vnode().

Tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D21883

4 years agonctgpio: improve performance (latency) of operation
avg [Tue, 22 Oct 2019 14:20:35 +0000 (14:20 +0000)]
nctgpio: improve performance (latency) of operation

This change consists of two parts.

First, nctgpio now supports hardware access via an I/O port window if
it's configured by firmware.  For instance, PC Engines firmware
v4.10.0.2 does that.  This is faster than going through the Super I/O
configuration registers.

Second, nctgpio now caches values of bits that it controls.  For
example, the driver does not need to access the hardware to determine if
a pin is an output or an input, or a state of an output.  Also, the
driver makes use of the fact that the hardware preserves an output state
of a pin accross a switch to the input mode and back.

With this change I am able to use the 1-Wire bus over nctgpio whereas
previously the driver introduced too much latency to be compliant with
the relatively strict protocol timings.

superio0: <Nuvoton NCT5104D/NCT6102D/NCT6106D (rev. B+)> at port 0x2e-0x2f on isa0
gpio1: <Nuvoton GPIO controller> at GPIO ldn 0x07 on superio0
pcib0: allocated type 4 (0x220-0x226) for rid 0 of gpio1
gpiobus1: <GPIO bus> on gpio1
owc0: <GPIO attached one-wire bus> at pin 4 on gpiobus1
ow0: <1 Wire Bus> on owc0
ow0: romid 28:b2:9e:45:92:10:02:34: no driver
ow_temp0: <Advanced One Wire Temperature> romid 28:b2:9e:45:92:10:02:34 on ow0

MFC after: 4 weeks

4 years agoAvoid reloading bucket pointers in uma_vm_zone_stats().
markj [Tue, 22 Oct 2019 14:20:06 +0000 (14:20 +0000)]
Avoid reloading bucket pointers in uma_vm_zone_stats().

The correctness of per-CPU cache accounting in that function is
dependent on reading per-CPU pointers exactly once.  Ensure that
the compiler does not emit multiple loads of those pointers.

Reported and tested by: pho
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22081

4 years agotuntap(4): properly declare if_tun and if_tap modules
kevans [Tue, 22 Oct 2019 00:18:16 +0000 (00:18 +0000)]
tuntap(4): properly declare if_tun and if_tap modules

Simply adding MODULE_VERSION does not do the trick, because the modules
haven't been declared. This should actually fix modfind/kldstat, which
r351229 aimed and failed to do.

This should make vm-bhyve do the right thing again when using the ports
version, rather than the latest version not in ports.

MFC after: 3 days

4 years agoAssert that any epoch tracker belongs to the thread stack.
glebius [Mon, 21 Oct 2019 23:12:14 +0000 (23:12 +0000)]
Assert that any epoch tracker belongs to the thread stack.

Reviewed by: kib

4 years agoUpdate tcsh to git revision 83c5be0 bringing in a number of bug fixes.
brooks [Mon, 21 Oct 2019 21:21:34 +0000 (21:21 +0000)]
Update tcsh to git revision 83c5be0 bringing in a number of bug fixes.

Reported by: sobomax
MFC after: 3 days
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22099

4 years agoif_tuntap: remove if_{tun,tap}.ko -> if_tuntap.ko links
kevans [Mon, 21 Oct 2019 20:28:38 +0000 (20:28 +0000)]
if_tuntap: remove if_{tun,tap}.ko -> if_tuntap.ko links

These drivers have been merged into a single if_tuntap in 13.0. The
compatibility links existed only for the interim and will be MFC'd along
with the if_tuntap merge shortly.

MFC after: never

4 years agolualoader: fix setting of loader_color=NO in loader.conf(5)
kevans [Mon, 21 Oct 2019 20:17:31 +0000 (20:17 +0000)]
lualoader: fix setting of loader_color=NO in loader.conf(5)

Previously color.disabled would be calculated at color module load time,
then never touched again. We can detect serial boots beyond just what we're
told by loader.conf(5) so this works out in many cases, but we must
re-evaluate the situation after the config is loaded to make sure we're not
supposed to be forcing it enabled/disabled.

Discovered while trying to test r353872.

4 years agolualoader: don't botch disabling of color
kevans [Mon, 21 Oct 2019 20:09:43 +0000 (20:09 +0000)]
lualoader: don't botch disabling of color

When colors are disabled, color.escape{fg,bg} would return the passed in
color rather than the proper ANSI sequence for the color.
color.escape{fg,bg} would be wrong.

Instead return '', as the associated reset* functions will also return ''.
This should get rid of the funky '2' and '4' in the kernel selector if
you're booting serial.

Reported by: npn

4 years agoAdditional fix for -DNO_CLEAN build across r353340 and r353381
emaste [Mon, 21 Oct 2019 18:40:03 +0000 (18:40 +0000)]
Additional fix for -DNO_CLEAN build across r353340 and r353381

opensolaris_atomic.S is now only used on i386 with opensolaris_atomic.c
used on other platforms.  After r353381 it doesn't exist on those
platforms so the stale dependency would result in a build error.

r353408 addressed this issue for cddl/lib/libzpool, but it persisted
with the opensolaris and zfs modules.

4 years agoRemove epoch tracker from struct thread. It was an ugly crutch to emulate
glebius [Mon, 21 Oct 2019 18:19:32 +0000 (18:19 +0000)]
Remove epoch tracker from struct thread.  It was an ugly crutch to emulate
locking semantics for if_addr_rlock() and if_maddr_rlock().

4 years agoRemove obsoleted KPIs that were used to access interface address lists.
glebius [Mon, 21 Oct 2019 18:17:03 +0000 (18:17 +0000)]
Remove obsoleted KPIs that were used to access interface address lists.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:37 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:33 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:28 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:24 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:19 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:13:14 +0000 (18:13 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:58 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:40 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:36 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:31 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:26 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:21 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:17 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:12 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:07 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:12:02 +0000 (18:12 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:58 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:54 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:48 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:43 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:38 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:32 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:28 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:24 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:19 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:15 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:11 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:08 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:11:02 +0000 (18:11 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:10:58 +0000 (18:10 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:10:52 +0000 (18:10 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:10:46 +0000 (18:10 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:08:25 +0000 (18:08 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:08:20 +0000 (18:08 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:08:16 +0000 (18:08 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:08:12 +0000 (18:08 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:08:03 +0000 (18:08 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:56 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:53 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:49 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:44 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:40 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 21 Oct 2019 18:07:35 +0000 (18:07 +0000)]
Convert to if_foreach_llmaddr() KPI.