]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 14 Oct 2019 20:29:14 +0000 (20:29 +0000)]
Convert to if_foreach_llmaddr() KPI.

Reviewed by: hselasky

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 14 Oct 2019 20:26:53 +0000 (20:26 +0000)]
Convert to if_foreach_llmaddr() KPI.

Reviewed by: hselasky

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 14 Oct 2019 20:26:17 +0000 (20:26 +0000)]
Convert to if_foreach_llmaddr() KPI.

Reviewed by: hselasky

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 14 Oct 2019 20:23:16 +0000 (20:23 +0000)]
Convert to if_foreach_llmaddr() KPI.

Reviewed by: hselasky

4 years agoConvert to if_foreach_llmaddr() KPI.
glebius [Mon, 14 Oct 2019 20:22:25 +0000 (20:22 +0000)]
Convert to if_foreach_llmaddr() KPI.

Reviewed by: hselasky

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

Reviewed by: erj

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

Reviewed by: gallatin

4 years agoFix powerpc/powerpcspe builds
luporl [Mon, 14 Oct 2019 19:06:17 +0000 (19:06 +0000)]
Fix powerpc/powerpcspe builds

Revision 353489 introduced some new function calls in common powerpc code,
but these must be called only on powerpc64.

4 years agoRemove the aarch64 libclang_rt.profile library from llvm 8.0.1.
jhb [Mon, 14 Oct 2019 18:31:11 +0000 (18:31 +0000)]
Remove the aarch64 libclang_rt.profile library from llvm 8.0.1.

Reported by: np

4 years agoRemove an unused parameter from get_new_keyid().
jhb [Mon, 14 Oct 2019 18:02:56 +0000 (18:02 +0000)]
Remove an unused parameter from get_new_keyid().

4 years agoCorrect a transcription error that broke GENERIC introduced in r353496.
dougm [Mon, 14 Oct 2019 17:51:57 +0000 (17:51 +0000)]
Correct a transcription error that broke GENERIC introduced in r353496.

4 years agoMove the definition of _vm_map_assert_consistent so that it can use
dougm [Mon, 14 Oct 2019 17:15:42 +0000 (17:15 +0000)]
Move the definition of _vm_map_assert_consistent so that it can use
vm_map_free_{left,right} rather than re-implementing them.  Use the
VM_MAP_FOREACH macro where applicable.  Fix some indentation.

Suggested by: kib (in a comment on D21964)
Tested by: pho (as part of D21964)
Differential Revision: https://reviews.freebsd.org/D22011

4 years agoUse epoch(9) directly instead of obsoleted KPI.
glebius [Mon, 14 Oct 2019 16:37:41 +0000 (16:37 +0000)]
Use epoch(9) directly instead of obsoleted KPI.

4 years agoipfw(4) rule matching always happens in network epoch.
glebius [Mon, 14 Oct 2019 16:37:00 +0000 (16:37 +0000)]
ipfw(4) rule matching always happens in network epoch.

4 years agoFix the driver attachment in cases when the external resource devices
br [Mon, 14 Oct 2019 15:52:59 +0000 (15:52 +0000)]
Fix the driver attachment in cases when the external resource devices
(resets, regulators, clocks) are not available.

Rely on a system initialization done by a bootloader in that cases.

This fixes operation on Terasic DE10-Pro (an Intel Stratix 10
development kit).

Sponsored by: DARPA, AFRL

4 years agoin6ifa_llaonifp() is never called from fast path, so do not require
glebius [Mon, 14 Oct 2019 15:33:53 +0000 (15:33 +0000)]
in6ifa_llaonifp() is never called from fast path, so do not require
epoch being entered.

4 years agoAdd missing port to the list of needed tools in the README file
eugen [Mon, 14 Oct 2019 14:31:21 +0000 (14:31 +0000)]
Add missing port to the list of needed tools in the README file
describing locale rebuild process:

devel/apache-ant

4 years agoif_hw_tsomaxsegsize needs to be initialized to zero, just
rrs [Mon, 14 Oct 2019 13:10:29 +0000 (13:10 +0000)]
if_hw_tsomaxsegsize needs to be initialized to zero, just
like in bbr.c and tcp_output.c

4 years ago[PPC64] Initial kernel minidump implementation
luporl [Mon, 14 Oct 2019 13:04:04 +0000 (13:04 +0000)]
[PPC64] Initial kernel minidump implementation

Based on POWER9BSD implementation, with all POWER9 specific code removed and
addition of new methods in PPC64 MMU interface, to isolate platform specific
code. Currently, the new methods are implemented on pseries and PowerNV
(D21643).

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D21551

4 years agoRename sctp_dtrace_declare.h to sctp_kdtrace.h for consistentcy.
tuexen [Mon, 14 Oct 2019 13:02:49 +0000 (13:02 +0000)]
Rename sctp_dtrace_declare.h to sctp_kdtrace.h for consistentcy.

MFC after: 3 days

4 years agoSort the id_aa64*_fields arrays to be in alphanumerical order.
andrew [Mon, 14 Oct 2019 09:29:56 +0000 (09:29 +0000)]
Sort the id_aa64*_fields arrays to be in alphanumerical order.

Sponsored by: DARPA, AFRL

4 years agoFix some "RB_" -> "ARB_" copy and paste nits for text sourced from tree(3).
lstewart [Mon, 14 Oct 2019 05:26:42 +0000 (05:26 +0000)]
Fix some "RB_" -> "ARB_" copy and paste nits for text sourced from tree(3).

4 years agoSince EPOCH_TRACE had been moved to opt_global.h, we don't need to waste
glebius [Mon, 14 Oct 2019 04:17:56 +0000 (04:17 +0000)]
Since EPOCH_TRACE had been moved to opt_global.h, we don't need to waste
extra space in struct thread.

4 years agoRevert r353313. It is not needed with r353357 and is actually incorrect.
glebius [Mon, 14 Oct 2019 04:10:00 +0000 (04:10 +0000)]
Revert r353313. It is not needed with r353357 and is actually incorrect.

4 years agoFix sample check in hwpmc
mmacy [Sun, 13 Oct 2019 22:26:55 +0000 (22:26 +0000)]
Fix sample check in hwpmc

Don't drop samples with callchain pending

Tested by: mjg@

Submitted by: Rajeeb Barman at amd.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D17011

4 years agoAdd missing include which breaks builds without VIMAGE.
tuexen [Sun, 13 Oct 2019 19:58:37 +0000 (19:58 +0000)]
Add missing include which breaks builds without VIMAGE.
The bug was introduced by me in r353480.

Reported by: Michael Butler
MFC after: 3 days

4 years agopowerpc/pmap: Tighten condition for removing tracked pages in Book-E pmap
jhibbits [Sun, 13 Oct 2019 19:33:00 +0000 (19:33 +0000)]
powerpc/pmap: Tighten condition for removing tracked pages in Book-E pmap

There are cases where there's no vm_page_t structure for a given physical
address, such as the CCSR.  In this case, trying to obtain the
md.page_tracked struct member would lead to a NULL dereference, and panic.
Tighten this up by checking for kernel_pmap AND that the page structure
actually exists before dereferencing.  The flag can only be set when it's
tracked in the kernel pmap anyway.

MFC after: 3 weeks

4 years agoUse an event handler to notify the SCTP about IP address changes
tuexen [Sun, 13 Oct 2019 18:17:08 +0000 (18:17 +0000)]
Use an event handler to notify the SCTP about IP address changes
instead of calling an SCTP specific function from the IP code.
This is a requirement of supporting SCTP as a kernel loadable module.
This patch was developed by markj@, I tweaked a bit the SCTP related
code.

Submitted by: markj@
MFC after: 3 days

4 years agoAdd myself (samm) to calendar.freebsd
samm [Sun, 13 Oct 2019 18:03:23 +0000 (18:03 +0000)]
Add myself (samm) to calendar.freebsd

Approved by:    araujo (mentor), krion (mentor)
Differential Revision:  https://reviews.freebsd.org/D21985

4 years agoMove SCTP DTrace probe definitions into a .c file.
markj [Sun, 13 Oct 2019 16:14:04 +0000 (16:14 +0000)]
Move SCTP DTrace probe definitions into a .c file.

Previously they were defined in a header which was included exactly
once.  Change this to follow the usual practice of putting definitions
in C files.  No functional change intended.

Discussed with: tuexen
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agotmpfs: use MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:42:41 +0000 (15:42 +0000)]
tmpfs: use MNTK_NOMSYNC

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

4 years agopseudofs: use MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:42:25 +0000 (15:42 +0000)]
pseudofs: use MNTK_NOMSYNC

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

4 years agonullfs: use MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:42:04 +0000 (15:42 +0000)]
nullfs: use MNTK_NOMSYNC

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

4 years agodevfs: use MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:41:47 +0000 (15:41 +0000)]
devfs: use MNTK_NOMSYNC

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

4 years agozfs: use MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:41:30 +0000 (15:41 +0000)]
zfs: use MNTK_NOMSYNC

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

4 years agovfs: add MNTK_NOMSYNC
mjg [Sun, 13 Oct 2019 15:40:34 +0000 (15:40 +0000)]
vfs: add MNTK_NOMSYNC

On many filesystems the traversal is effectively a no-op. Add a way to avoid
the overhead.

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

4 years agovfs: return free vnode batches in sync instead of vfs_msync
mjg [Sun, 13 Oct 2019 15:39:11 +0000 (15:39 +0000)]
vfs: return free vnode batches in sync instead of vfs_msync

It is a more natural fit. vfs_msync only deals with active vnodes.

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

4 years agovlan_config() isn't always called in epoch context.
glebius [Sun, 13 Oct 2019 15:15:09 +0000 (15:15 +0000)]
vlan_config() isn't always called in epoch context.

Reported by: kp

4 years agoRemove line not needed.
tuexen [Sun, 13 Oct 2019 09:35:03 +0000 (09:35 +0000)]
Remove line not needed.

Submitted by: markj@
MFC after: 3 days

4 years agoRestore nofaulting operations after r352807
kib [Sun, 13 Oct 2019 06:56:45 +0000 (06:56 +0000)]
Restore nofaulting operations after r352807

The TDP_NOFAULTING flag should be checked in vm_fault(), not in
vm_fault_trap().  Otherwise kernel accesses to userspace, like
vn_io_fault(), enter vm locking when it should not.

Reported and tested by: pho
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D21992

4 years agoFix the botched field ordering in the last commit. While here, fix
scottl [Sun, 13 Oct 2019 05:11:53 +0000 (05:11 +0000)]
Fix the botched field ordering in the last commit.  While here, fix
whitespace, and also reorder the fields so they are easier to read on
an 80 column display (the lines wrapped even before these changes).
Also fix non-standard nomenclature in the Caps code, and update the
man page.

Reported by: rpokala

4 years agoDon't cover in6_ifattach() with network epoch, as it may call into
glebius [Sun, 13 Oct 2019 04:25:16 +0000 (04:25 +0000)]
Don't cover in6_ifattach() with network epoch, as it may call into
network drivers ioctls, that may sleep.

PR: 241223

4 years agoFix the build after r353458.
markj [Sun, 13 Oct 2019 00:08:17 +0000 (00:08 +0000)]
Fix the build after r353458.

MFC with: r353458
Sponsored by: The FreeBSD Foundation

4 years agoFix read past end of struct in ncsw glue code.
bdragon [Sat, 12 Oct 2019 23:16:17 +0000 (23:16 +0000)]
Fix read past end of struct in ncsw glue code.

The logic in XX_IsPortalIntr() was reading past the end of XX_PInfo.
This was causing it to erroneously return 1 instead of 0 in some
circumstances, causing a panic on the AmigaOne X5000 due to mixing
exclusive and nonexclusive interrupts on the same interrupt line.

Since this code is only called a couple of times during startup, use
a simple double loop instead of the complex read-ahead single loop.

This also fixes a bug where it would never check cpu=0 on type=1.

Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D21988

4 years agoAdd a missing include of opt_sctp.h.
markj [Sat, 12 Oct 2019 23:01:16 +0000 (23:01 +0000)]
Add a missing include of opt_sctp.h.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoAdd a missing include of opt_sctp.h.
markj [Sat, 12 Oct 2019 22:58:33 +0000 (22:58 +0000)]
Add a missing include of opt_sctp.h.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoChange from the non-standard nomenclature of "chip" and "card" to the
scottl [Sat, 12 Oct 2019 22:27:57 +0000 (22:27 +0000)]
Change from the non-standard nomenclature of "chip" and "card" to the
standard nomenclature of "device" and "vendor" with the "sub" variants.
This changes the printed format, so anything that scrapes and parses
this will need to be adapted.  No compatibility shims are provided,
but this will not be MFC'd.

Reviewed by: jhb, emaste, gtetlow
Approved by: jhb, emaste, gtetlow

4 years ago[PowerPC] force applications linked with lib CSU to have .got
jhibbits [Sat, 12 Oct 2019 20:53:40 +0000 (20:53 +0000)]
[PowerPC] force applications linked with lib CSU to have .got

Summary:
This forces applications linked with lib CSU to have a .got, fixing binaries
linked with LLD9 after secure-plt was enabled on FreeBSD.

Submitted by: Alfredo Dal'Ava Junior (alfredo.junior_eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D21476

4 years agoAllocate device softc from the device domain.
mav [Sat, 12 Oct 2019 19:03:07 +0000 (19:03 +0000)]
Allocate device softc from the device domain.

Since we are trying to bind device interrupt threads to the device domain,
it should have sense to make memory often accessed by them local. If domain
is not known, fall back to round-robin.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

4 years agoA comment in subr_devmap.c mentions that devmap_print_table() should
philip [Sat, 12 Oct 2019 18:18:11 +0000 (18:18 +0000)]
A comment in subr_devmap.c mentions that devmap_print_table() should
be called on bootverbose.  Do so on RISV-V too.

Submitted by: Nicholas O'Brien <nickisobrien_gmail.com>
Reviewed by: imp, kp
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D21998

4 years agoEnsure that local variables are reset to their initial value when
tuexen [Sat, 12 Oct 2019 17:57:03 +0000 (17:57 +0000)]
Ensure that local variables are reset to their initial value when
dealing with error cases in a loop over all remote addresses.
This issue was found and reported by OSS_Fuzz in:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18080
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18086
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18121
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18163

MFC after: 3 days

4 years agoCentralize adding OBJCOPY=${XOBJCOPY} to LIB32WMAKEFLAGS.
brooks [Fri, 11 Oct 2019 21:28:02 +0000 (21:28 +0000)]
Centralize adding OBJCOPY=${XOBJCOPY} to LIB32WMAKEFLAGS.

Reviewed by: emaste, imp
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21983

4 years agocoredump_phnum_test: handle full file system gracefully
vangyzen [Fri, 11 Oct 2019 21:23:46 +0000 (21:23 +0000)]
coredump_phnum_test: handle full file system gracefully

Skip the test if the file system is full.  That's out of scope
of this test.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

4 years agodevfs_vptocnp(): correct the component name when node is not at top.
kib [Fri, 11 Oct 2019 18:41:24 +0000 (18:41 +0000)]
devfs_vptocnp(): correct the component name when node is not at top.

Node' cdp.si_name is the full path as provided by make_dev(9), it
should not be returned by VOP_VPTOCNP() when only the last component
is requested.  Use the dirent entry instead.

With this note, handling of VDIR and VCHR nodes only differs in
handling of root vnode, which simplifies and unifies the logic.

Reported by: Li, Zhichao1 <Zhichao_Li1@Dell.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoPlug the rest of undef behavior places that were missed in r337456.
kib [Fri, 11 Oct 2019 18:37:02 +0000 (18:37 +0000)]
Plug the rest of undef behavior places that were missed in r337456.

There are three more places in msdosfs_fat.c which might shift one
into the sign bit.  While there, fix formatting of KASSERTs.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoRemove an unneeded include of opt_sctp.h.
markj [Fri, 11 Oct 2019 17:23:23 +0000 (17:23 +0000)]
Remove an unneeded include of opt_sctp.h.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agomountroot: run statfs after mounting devfs
kp [Fri, 11 Oct 2019 17:04:38 +0000 (17:04 +0000)]
mountroot: run statfs after mounting devfs

The usual flow for mounting a file system is to VFS_MOUNT() and then
immediately VFS_STATFS().

That's not done in vfs_mountroot_devfs(), which means the
mp->mnt_stat.f_iosize field is not correctly populated, which in turn
causes us to mark valid aio operations as unsafe (because the io size is
set to 0), ultimately causing the aio_test:md_waitcomplete test to fail.

Reviewed by: mckusick
MFC after: 1 week
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D21897

4 years agofix up r353340, don't assume that fcmpset has strong semantics
avg [Fri, 11 Oct 2019 17:01:02 +0000 (17:01 +0000)]
fix up r353340, don't assume that fcmpset has strong semantics

fcmpset can have two kinds of semantics, weak and strong.
For practical purposes, strong semantics means that if fcmpset fails
then the reported current value is always different from the expected
value.  Weak semantics means that the reported current value may be the
same as the expected value even though fcmpset failed.  That's a so
called "sporadic" failure.

I originally implemented atomic_cas expecting strong semantics, but many
platforms actually have weak one.

Reported by: pkubaj (not confirmed if same issue)
Discussed with: kib, mjg
MFC after: 19 days
X-MFC with: r353340

4 years agoCall devmap_bootstrap in RISC-V machine dependent code to actually create
philip [Fri, 11 Oct 2019 16:28:46 +0000 (16:28 +0000)]
Call devmap_bootstrap in RISC-V machine dependent code to actually create
the static device mappings.

While RISC-V support was added to subr_devmap.c in r298631, it was never
actually initialised in the machine dependent code.

Submitted by: Nicholas O'Brien <nickisobrien_gmail.com>
Reviewed by: br, kp
Sponsored by: Axiado
Differential Revision: https://reviews.freebsd.org/D21975

4 years agoIncrease the default VMSIZE for raw, qcow2, vhd, and vmdk virtual
gjb [Fri, 11 Oct 2019 16:01:30 +0000 (16:01 +0000)]
Increase the default VMSIZE for raw, qcow2, vhd, and vmdk virtual
machine images due to 'filesystem full' failures.

Sponsored by: Rubicon Communications, LLC (Netgate)

4 years agoMFZol: Fix performance of "zfs recv" with many deletions
asomers [Fri, 11 Oct 2019 14:59:28 +0000 (14:59 +0000)]
MFZol: Fix performance of "zfs recv" with many deletions

This patch fixes 2 issues with the DMU free throttle implemented
in dmu_free_long_range(). The first issue is that get_next_chunk()
was calculating the number of L1 blocks the free would dirty
incorrectly. In some cases involving extremely large files, this
code would greatly overestimate the number of affected L1 blocks,
causing excessive calls to txg_wait_open(). This patch corrects
the calculation.

The second issue is that the free throttle uses the total number
of free'd blocks in all (open, quiescing, and syncing) txgs to
determine whether to throttle. This causes large frees (such as
those created by the first issue) to cause 4 txg syncs before
any further frees were allowed to proceed. This patch ensures
that the accounting is done entirely in a per-txg fashion, so
that frees from a given txg don't affect those that immediately
follow it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
zfsonlinux/zfs@f4c594da94d856c422512a54e48070f890b2685b

Freeing throttle should account for holes

Deletion throttle currently does not account for holes in a file.
This means that it can activate when it shouldn't.
To fix it we switch the throttle to be based on the number of
L1 blocks we will have to dirty when freeing

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alek Pinchuk <apinchuk@datto.com>
zfsonlinux/zfs@65282ee9e06b130f1f0169baf5d9bf0dd8fc1ef9

Submitted by: Alek Pinchuk <pinchuk.alek@gmail.com>
Reviewed by: allanjude
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D21895

4 years agoamd64 pmap: handle fictitious mappigns with addresses beyond pv_table
mjg [Fri, 11 Oct 2019 14:57:47 +0000 (14:57 +0000)]
amd64 pmap: handle fictitious mappigns with addresses beyond pv_table

There are provisions to do it already with pv_dummy, but new locking code
did not account for it. Previous one did not have the problem because
it hashed the address into the lock array.

While here annotate common vars with __read_mostly and __exclusive_cache_line.

Reported by: Thomas Laus
Tesetd by: jkim, Thomas Laus
Fixes: r353149 ("amd64 pmap: implement per-superpage locks")
Sponsored by: The FreeBSD Foundation

4 years agogcore: Add powerpc64 32-bit gcore support
jhibbits [Fri, 11 Oct 2019 14:17:31 +0000 (14:17 +0000)]
gcore: Add powerpc64 32-bit gcore support

Summary: Add the necessary bits for taking 32-bit gcore coredumps on powerpc64.

Reviewed by: luporl
Differential Revision: https://reviews.freebsd.org/D21954

4 years agogcore: Add aarch64 32-bit core support
jhibbits [Fri, 11 Oct 2019 14:15:50 +0000 (14:15 +0000)]
gcore: Add aarch64 32-bit core support

Summary: Add trivial 32-bit arm cores on aarch64 support for gcore.  This
doesn't handle fpregs.

Reviewed by: #arm, andrew
Sponsored by: Juniper Networks, Inc
Differential Revision: https://reviews.freebsd.org/D21947

4 years agoDocument that aarch64 can now run armv6/armv7 binaries, but won't however
cognet [Fri, 11 Oct 2019 13:34:09 +0000 (13:34 +0000)]
Document that aarch64 can now run armv6/armv7 binaries, but won't however
run armv5 binaries.

4 years agoman4/Makefile: fix sorting for a number of entries starting with 'v'
avg [Fri, 11 Oct 2019 12:04:38 +0000 (12:04 +0000)]
man4/Makefile: fix sorting for a number of entries starting with 'v'

MFC after:  1 week

4 years agofix a typo in superio.4
avg [Fri, 11 Oct 2019 11:31:45 +0000 (11:31 +0000)]
fix a typo in superio.4

Reported by: bjk
MFC after: 2 weeks
X-MFC with: r353432

4 years agoadd superio.4 and superio.9 manual pages
avg [Fri, 11 Oct 2019 11:13:47 +0000 (11:13 +0000)]
add superio.4 and superio.9  manual pages

This adds basic documentation on what the superio driver is and how
other drivers can interact with it.  I decided to also document
superio's ivar accessors.

Reviewed by: bcr, brueffer (both manual contents only)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D21958

4 years agoInstall the libopencsd version header (other headers now depend on it).
br [Fri, 11 Oct 2019 09:18:45 +0000 (09:18 +0000)]
Install the libopencsd version header (other headers now depend on it).

Sponsored by: DARPA, AFRL

4 years agoFix braino in r353429
cem [Fri, 11 Oct 2019 06:02:03 +0000 (06:02 +0000)]
Fix braino in r353429

cy@ points out that I got parameter order backwards between definition and
invocation of the helper function.  He is totally correct.  The earlier
version of this patch predated the XFree column so this is one I introduced,
rather than the original author.

Submitted by: cy
Reported by: cy
X-MFC-With: r353429

4 years agoddb: Add CSV option, sorting to 'show (malloc|uma)'
cem [Fri, 11 Oct 2019 01:31:31 +0000 (01:31 +0000)]
ddb: Add CSV option, sorting to 'show (malloc|uma)'

Add /i option for machine-parseable CSV output.  This allows ready copy/
pasting into more sophisticated tooling outside of DDB.

Add total zone size ("Memory Use") as a new column for UMA.

For both, sort the displayed list on size (print the largest zones/types
first).  This is handy for quickly diagnosing "where has my memory gone?" at
a high level.

Submitted by: Emily Pettigrew <Emily.Pettigrew AT isilon.com> (earlier version)
Sponsored by: Dell EMC Isilon

4 years agoDon't use if_maddr_rlock() in 802.11, use epoch(9) directly instead.
glebius [Thu, 10 Oct 2019 23:55:33 +0000 (23:55 +0000)]
Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead.

4 years agoDon't use if_maddr_rlock() in sppp(4), use epoch(9) directly instead.
glebius [Thu, 10 Oct 2019 23:54:37 +0000 (23:54 +0000)]
Don't use if_maddr_rlock() in sppp(4), use epoch(9) directly instead.

4 years agoDon't use if_maddr_rlock() in tuntap(4), use epoch(9) directly instead.
glebius [Thu, 10 Oct 2019 23:51:14 +0000 (23:51 +0000)]
Don't use if_maddr_rlock() in tuntap(4), use epoch(9) directly instead.

4 years agoInterface output method must be executed in network epoch, so if_addr_rlock()
glebius [Thu, 10 Oct 2019 23:50:32 +0000 (23:50 +0000)]
Interface output method must be executed in network epoch, so if_addr_rlock()
isn't needed here.

4 years agoDon't use if_maddr_rlock() in ng_eiface(4), use epoch(9) directly instead.
glebius [Thu, 10 Oct 2019 23:49:19 +0000 (23:49 +0000)]
Don't use if_maddr_rlock() in ng_eiface(4), use epoch(9) directly instead.

4 years agoThe divert(4) module must always be running in network epoch, thus
glebius [Thu, 10 Oct 2019 23:48:42 +0000 (23:48 +0000)]
The divert(4) module must always be running in network epoch, thus
call to if_addr_rlock() isn't needed.

4 years agoDon't use if_maddr_rlock() in ng_ether(4), use epoch(9) directly instead.
glebius [Thu, 10 Oct 2019 23:47:14 +0000 (23:47 +0000)]
Don't use if_maddr_rlock() in ng_ether(4), use epoch(9) directly instead.

4 years agoAdd two extra functions that basically give count of addresses
glebius [Thu, 10 Oct 2019 23:44:56 +0000 (23:44 +0000)]
Add two extra functions that basically give count of addresses
on interface.  Such function could been implemented on top of
the if_foreach_llm?addr(), but several drivers need counting,
so avoid copy-n-paste inside the drivers.

4 years agoProvide new KPI for network drivers to access lists of interface
glebius [Thu, 10 Oct 2019 23:42:55 +0000 (23:42 +0000)]
Provide new KPI for network drivers to access lists of interface
addresses.  The KPI doesn't reveal neither how addresses are stored,
how the access to them is synchronized, neither reveal struct ifaddr
and struct ifmaddr.

Reviewed by: gallatin, erj, hselasky, philip, stevek
Differential Revision: https://reviews.freebsd.org/D21943

4 years agonvdimm(4): Calculate and save memattr once; it never changes
cem [Thu, 10 Oct 2019 22:49:45 +0000 (22:49 +0000)]
nvdimm(4): Calculate and save memattr once; it never changes

Refactor nvdimm_spa_memattr() routine and callers to just save the value at
initialization and use the value directly.  The reference value from NFIT,
MemoryMapping, is read only once, so the associated memattr could never
change.

No functional change.

Sponsored by: Dell EMC Isilon

4 years agoPull in r374444 from upstream lldb trunk (by me):
dim [Thu, 10 Oct 2019 20:33:55 +0000 (20:33 +0000)]
Pull in r374444 from upstream lldb trunk (by me):

  Fix process launch failure on FreeBSD after r365761

  Summary:
  After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS`
  enabled, launching any process on FreeBSD crashes lldb with:

  ```
  Expected<T> must be checked before access or destruction.
  Expected<T> value was in success state. (Note: Expected<T> values in
  success mode must still be checked prior to being destroyed).
  ```

  This is because `m_operation_thread` and `m_monitor_thread` were
  wrapped in `llvm::Expected<>`, but this requires the objects to be
  correctly initialized before accessing them.

  To fix the crashes, use `llvm::Optional<>` for the members (as
  indicated by labath), and use local variables to store the return
  values of `LaunchThread` and `StartMonitoringChildProcess`.  Then,
  only assign to the member variables after checking if the return
  values indicated success.

  Reviewers: devnexen, emaste, MaskRay, mgorny

  Reviewed By: devnexen

  Subscribers: jfb, labath, krytarowski, lldb-commits

  Differential Revision: https://reviews.llvm.org/D68723

PR: 241137
MFC after: 1 month
X-MFC-With: r353358

4 years agoRevert r353363 in preparation for applying upstream fix:
dim [Thu, 10 Oct 2019 20:30:54 +0000 (20:30 +0000)]
Revert r353363 in preparation for applying upstream fix:

Put in a band-aid fix for lldb 9 exiting with "Expected<T> must be
checked before access or destruction" when launching executables, while
we sort this out with upstream.

PR: 241137
MFC after: 1 month
X-MFC-With: r353358

4 years agoTypo out->in.
kib [Thu, 10 Oct 2019 18:52:24 +0000 (18:52 +0000)]
Typo out->in.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

4 years agoFix -DNO_CLEAN build across r353340 and r353381
brooks [Thu, 10 Oct 2019 16:29:13 +0000 (16:29 +0000)]
Fix -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.

4 years agoRemove a stale file left after merging.
br [Thu, 10 Oct 2019 13:44:12 +0000 (13:44 +0000)]
Remove a stale file left after merging.

Sponsored by: DARPA, AFRL

4 years agoUpdate ARM CoreSight trace decoder library.
br [Thu, 10 Oct 2019 13:30:13 +0000 (13:30 +0000)]
Update ARM CoreSight trace decoder library.

Its latest version merged from:
^/vendor/opencsd/a1961c91b02a92f3c6ed8b145c636ac4c5565aca

Sponsored by: DARPA, AFRL

4 years agoUpdate Intel Processor Trace decoder library.
br [Thu, 10 Oct 2019 12:46:34 +0000 (12:46 +0000)]
Update Intel Processor Trace decoder library.

Its latest version merged from:
^/vendor/processor-trace/892e12c5a27bda5806d1e63269986bb4171b5a8b

Sponsored by: DARPA, AFRL

4 years agoremove unrelated files accidentally committed in r353381
avg [Thu, 10 Oct 2019 07:41:42 +0000 (07:41 +0000)]
remove unrelated files accidentally committed in r353381

4 years agoemulate illumos membar_producer with atomic_thread_fence_rel
avg [Thu, 10 Oct 2019 07:39:41 +0000 (07:39 +0000)]
emulate illumos membar_producer with atomic_thread_fence_rel

membar_producer is supposed to be a store-store barrier.
Also, in the code that FreeBSD has ported from illumos membar_producer
is used only with regular stores to regular memory (with respect to
caching).

We do not have an MI primitive for the store-store barrier, so
atomic_thread_fence_rel is the closest we have as it provides
(load | store) -> store barrier.

Previously, membar_producer was an empty function call on all 32-bit
arm-s, 32-bit powerpc, riscv and all mips variants.  I think that it was
inadequate.
On other platforms, such as amd64, arm64, i386, powerpc64, sparc64,
membar_producer was implemented using stronger primitives than required
for a store-store barrier with respect to regular memory access.
For example, it used sfence on amd64 and lock-ed nop in i386 (despite TSO).
On powerpc64 we now use recommended lwsync instead of eieio.
On sparc64 FreeBSD uses TSO mode.
On arm64/aarch64 we now use dmb sy instead of dmb ish.  Not sure if this
is an improvement, actually.

After this change we can drop opensolaris_atomic.S for aarch64, amd64,
powerpc64 and sparc64 as all required atomic operations have either
direct or light-weight mapping to FreeBSD native atomic operations.

Discussed with: kib
MFC after: 4 weeks

4 years agoThis driver attaches to the Intel VMD drive and connects a new PCI domain
ambrisko [Thu, 10 Oct 2019 03:12:17 +0000 (03:12 +0000)]
This driver attaches to the Intel VMD drive and connects a new PCI domain
starting at the max. domain, and then work down.  Then existing FreeBSD
drivers will attach.  Interrupt routing from the VMD MSI-X to the NVME
drive is not well known, so any interrupt is sent to all children that
register.

VROC used Intel meta data so graid(8) works with it. However, graid(8)
supports RAID 0,1,10 for read and write. I have some early code to
support writes with RAID 5.  Note that RAID 5 can have life issues
with SSDs since it can cause write amplification from updating the parity
data.

Hot plug support needs a change to skip the following check to work:
if (pcib_request_feature(dev, PCI_FEATURE_HP) != 0) {
in sys/dev/pci/pci_pci.c.

Looked at by: imp, rpokala, bcr
Differential Revision: https://reviews.freebsd.org/D21383

4 years agozfs: multiple improvements to the zpool_add tests
asomers [Thu, 10 Oct 2019 02:17:45 +0000 (02:17 +0000)]
zfs: multiple improvements to the zpool_add tests

* Don't partition a disk if too few are available.  Just rely on Kyua to
  ensure that the tests aren't run with insufficient disks.

* Remove redundant cleanup steps

* In zpool_add_003_pos, store the temporary file in $PWD so Kyua will
  automatically clean it up.

* Update zpool_add_005_pos to use dumpon instead of dumpadm.  This test had
  never been ported to FreeBSD.

* In zpool_add_005_pos, don't format the dump disk with UFS.  That was
  pointless.

MFC after: 2 weeks
Sponsored by: Axcient

4 years agoAdd opt_kern_tls.h to the sources from t4_tom.ko.
jhb [Wed, 9 Oct 2019 23:35:42 +0000 (23:35 +0000)]
Add opt_kern_tls.h to the sources from t4_tom.ko.

Missed in r353328.

Sponsored by: Chelsio Communications

4 years agodocument how to apply altq to vlan interfaces w/ pf.
jmg [Wed, 9 Oct 2019 21:48:00 +0000 (21:48 +0000)]
document how to apply altq to vlan interfaces w/ pf.

Thanks to jhb for pointing out that this might possibly work.

PR: 94182

4 years agoAdd note about universe changes to arch and the need to add
imp [Wed, 9 Oct 2019 21:45:40 +0000 (21:45 +0000)]
Add note about universe changes to arch and the need to add
MAKE_OBSOLETE_GCC to get old behavior on universe.

4 years agoAdd UPDATING entry for universe changes
imp [Wed, 9 Oct 2019 21:45:34 +0000 (21:45 +0000)]
Add UPDATING entry for universe changes

Suggested by: emaste@

4 years agoDon't free the cursor boundary tag during vmem_destroy().
jhb [Wed, 9 Oct 2019 21:20:39 +0000 (21:20 +0000)]
Don't free the cursor boundary tag during vmem_destroy().

The cursor boundary tag is statically allocated in the vmem instead of
from the vmem_bt_zone.  Explicitly remove it from the vmem's segment
list in vmem_destroy before freeing all the segments from the vmem.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D21953

4 years agoWordsmith and simplify
imp [Wed, 9 Oct 2019 21:18:46 +0000 (21:18 +0000)]
Wordsmith and simplify

Simplify expressions as suggested by jhb. The extra indirection made
sense in earlier versions of this patch, but not the final one.

While here, apply suggestion from emaste for wording of universe.
Also wordsmith awkwardly worded comment about when we effectively
neuter the universe build for an architecture.

Once llvm 9.0 has been vetted for mips and powerpc, I'll take them out
of these lists.

4 years agoRemove adapters from t4_list earlier during detach.
jhb [Wed, 9 Oct 2019 21:08:51 +0000 (21:08 +0000)]
Remove adapters from t4_list earlier during detach.

This ensures the clip task won't race with t4_destroy_clip_table.

While here, make some mutex destroys unconditional since attach always
initializes them.

Reviewed by: np
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D21952

4 years agoFix casting error from newer gcc
imp [Wed, 9 Oct 2019 21:02:06 +0000 (21:02 +0000)]
Fix casting error from newer gcc

Cast the pointers to (uintptr_t) before assigning to type
uint64_t. This eliminates an error from gcc when we cast the pointer
to a larger integer type.