BSD DOM REP
Buen Dia
Bitcoin Exchange CEX.IO

Actualizaciones de FreeBSD

Base/Head · Ports/Head · Doc/Head · Fecha/Hora en UTC

Secuencia
RevisiĆ³n
Repositorio/Grupo
Autor
Detalle
16/02/2019
4:16 am
base/head
jhibbits
head/sys/powerpc/booke
Modificado:
head/sys/powerpc/booke/pmap.c
Log:
powerpc/booke: Use DMAP where possible for page copy and zeroing

This avoids several locks and pmap_kenter()'s, improving performance
marginally.

MFC after: 2 weeks
16/02/2019
4:47 am
base/head
jhibbits
head/sys/powerpc/booke
Modificado:
head/sys/powerpc/booke/pmap.c
Log:
powerpc/booke: Fix 32-bit build

MFC after: 2 weeks
MFC with: 344202
16/02/2019
3:49 am
base/head
avos
head/tools/build/mk
Modificado:
head/tools/build/mk/OptionalObsoleteFiles.inc
Log:
Remove vi(1)-related files via 'make delete-old' when WITHOUT_VI=1 is set.

MFC after: 5 days
16/02/2019
1:48 am
base/head
avos
in head/sys: conf dev/ata
Modificado:
head/sys/conf/NOTES
head/sys/dev/ata/ata-all.h
Log:
GC ATA_REQUEST_TIMEOUT option remnants

It was removed from code in r249083 and from sys/conf/options in r249213.

PR: 222170
MFC after: 3 days
16/02/2019
12:15 am
base/head
sef
in head: libexec/rc/rc.d usr.sbin/nfsd
Modificado:
head/libexec/rc/rc.d/nfsd
head/usr.sbin/nfsd/nfsd.8
head/usr.sbin/nfsd/nfsd.c
Log:
Add support for a virtual hostname to nfsd

Specifically, this allows (via "-V vhostname") telling nfsd what principal
to use, instead of the hostname. This is used at iXsystems for fail-over in
HA systems.

Reviewed by: macklem
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D19191
16/02/2019
12:15 am
base/head
imp
head/sbin/nvmecontrol
Modificado:
head/sbin/nvmecontrol/firmware.c
Log:
Remove write-only s_flag.
15/02/2019
11:46 pm
base/head
glebius
head/lib/libc/sys
Modificado:
head/lib/libc/sys/sendfile.2
Log:
Imaginary cat jumped my keyboard!
15/02/2019
11:41 pm
base/head
cem
head/share/mk
Modificado:
head/share/mk/bsd.prog.mk
Log:
Fixup bsd.prog.mk after r344182

Reported by: tinderbox
Sponsored by: Dell EMC Isilon
15/02/2019
11:36 pm
base/head
glebius
in head: lib/libc/sys sys/vm
Modificado:
head/lib/libc/sys/sendfile.2
head/sys/vm/vnode_pager.c
Log:
For 32-bit machines rollback the default number of vnode pager pbufs
back to the lever before r343030. For 64-bit machines reduce it slightly,
too. Together with r343030 I bumped the limit up to the value we use at
Netflix to serve 100 Gbit/s of sendfile traffic, and it probably isn't a
good default.

Provide a loader tunable to change vnode pager pbufs count. Document it.
15/02/2019
10:55 pm
base/head
cem
head/sys/fs/fuse
Modificado:
head/sys/fs/fuse/fuse_vnops.c
Log:
FUSE: Refresh cached file size when it changes (lookup)

The cached fvdat->filesize is indepedent of the (mostly unused)
cached_attrs, and we failed to update it when a cached (but perhaps
inactive) vnode was found during VOP_LOOKUP to have a different size than
cached.

As noted in the code comment, this can occur in distributed filesystems or
with other kinds of irregular file behavior (anything is possible in FUSE).

We do something similar in fuse_vnop_getattr already.

PR: 230258 (as reported in description; other issues explored in
comments are not all resolved)
Reported by: MooseFS FreeBSD Team
Submitted by: Jakub Kruszona-Zawadzki (earlier version)
15/02/2019
10:52 pm
base/head
cem
head/sys/fs/fuse
Modificado:
head/sys/fs/fuse/fuse_io.c
head/sys/fs/fuse/fuse_ipc.h
head/sys/fs/fuse/fuse_node.c
Log:
FUSE: The FUSE design expects writethrough caching

At least prior to 7.23 (which adds FUSE_WRITEBACK_CACHE), the FUSE protocol
specifies only clean data to be cached.

Prior to this change, we implement and default to writeback caching. This
is ok enough for local only filesystems without hardlinks, but violates the
general design contract with FUSE and breaks distributed filesystems or
concurrent access to hardlinks of the same inode.

In this change, add cache mode as an extension of cache enable/disable. The
new modes are UC (was: cache disabled), WT (default), and WB (was: cache
enabled).

For now, WT caching is implemented as write-around, which meets the goal of
only caching clean data. WT can be better than WA for workloads that
frequently read data that was recently written, but WA is trivial to
implement. Note that this has no effect on O_WRONLY-opened files, which
were already coerced to write-around.

Refs:
* https://sourceforge.net/p/fuse/mailman/message/8902254/
* https://github.com/vgough/encfs/issues/315

PR: 230258 (inspired by)
15/02/2019
10:51 pm
base/head
cem
head/sys/fs/fuse
Modificado:
head/sys/fs/fuse/fuse_io.c
head/sys/fs/fuse/fuse_node.c
head/sys/fs/fuse/fuse_vnops.c
Log:
FUSE: Only "dirty" cached file size when data is dirty

Most users of fuse_vnode_setsize() set the cached fvdat->filesize and update
the buf cache bounds as a result of either a read from the underlying FUSE
filesystem, or as part of a write-through type operation (like truncate =>
VOP_SETATTR). In these cases, do not set the FN_SIZECHANGE flag, which
indicates that an inode's data is dirty (in particular, that the local buf
cache and fvdat->filesize have dirty extended data).

PR: 230258 (related)
15/02/2019
10:50 pm
base/head
cem
head/sys/fs/fuse
Modificado:
head/sys/fs/fuse/fuse_internal.c
head/sys/fs/fuse/fuse_node.c
head/sys/fs/fuse/fuse_node.h
head/sys/fs/fuse/fuse_vfsops.c
head/sys/fs/fuse/fuse_vnops.c
Log:
FUSE: Respect userspace FS "do-not-cache" of path components

The FUSE protocol demands that kernel implementations cache user filesystem
path components (lookup/cnp data) for a maximum period of time in the range
of [0, ULONG_MAX] seconds. In practice, typical requests are for 0, 1, or
10 seconds; or "a long time" to represent indefinite caching.

Historically, FreeBSD FUSE has ignored this client directive entirely. This
works fine for local-only filesystems, but causes consistency issues with
multi-writer network filesystems.

For now, respect 0 second cache TTLs and do not cache such metadata.
Non-zero metadata caching TTLs in the range [0.000000001, ULONG_MAX] seconds
are still cached indefinitely, because it is unclear how a userspace
filesystem could do anything sensible with those semantics even if
implemented.

Pass fuse_entry_out to fuse_vnode_get when available and only cache lookup
if the user filesystem did not set a zero second TTL.

PR: 230258 (inspired by; does not fix)
15/02/2019
10:49 pm
base/head
cem
head/sys/fs/fuse
Modificado:
head/sys/fs/fuse/fuse_internal.c
head/sys/fs/fuse/fuse_internal.h
head/sys/fs/fuse/fuse_io.c
head/sys/fs/fuse/fuse_node.c
head/sys/fs/fuse/fuse_node.h
head/sys/fs/fuse/fuse_vnops.c
Log:
FUSE: Respect userspace FS "do-not-cache" of file attributes

The FUSE protocol demands that kernel implementations cache user filesystem
file attributes (vattr data) for a maximum period of time in the range of
[0, ULONG_MAX] seconds. In practice, typical requests are for 0, 1, or 10
seconds; or "a long time" to represent indefinite caching.

Historically, FreeBSD FUSE has ignored this client directive entirely. This
works fine for local-only filesystems, but causes consistency issues with
multi-writer network filesystems.

For now, respect 0 second cache TTLs and do not cache such metadata.
Non-zero metadata caching TTLs in the range [0.000000001, ULONG_MAX] seconds
are still cached indefinitely, because it is unclear how a userspace
filesystem could do anything sensible with those semantics even if
implemented.

In the future, as an optimization, we should implement notify_inval_entry,
etc, which provide userspace filesystems a way of evicting the kernel cache.

One potentially bogus access to invalid cached attribute data was left in
fuse_io_strategy. It is restricted behind the undocumented and non-default
"vfs.fuse.fix_broken_io" sysctl or "brokenio" mount option; maybe these are
deadcode and can be eliminated?

Some minor APIs changed to facilitate this:

1. Attribute cache validity is tracked in FUSE inodes ("fuse_vnode_data").

2. cache_attrs() respects the provided TTL and only caches in the FUSE
inode if TTL > 0. It also grows an "out" argument, which, if non-NULL,
stores the translated fuse_attr (even if not suitable for caching).

3. FUSE VTOVA(vp) returns NULL if the vnode's cache is invalid, to help
avoid programming mistakes.

4. A VOP_LINK check for potential nlink overflow prior to invoking the FUSE
link op was weakened (only performed when we have a valid attr cache). The
check is racy in a multi-writer network filesystem anyway -- classic TOCTOU.
We have to trust any userspace filesystem that rejects local caching to
account for it correctly.

PR: 230258 (inspired by; does not fix)
15/02/2019
10:48 pm
base/head
emaste
head/share/mk
Modificado:
head/share/mk/bsd.prog.mk
head/share/mk/src.libnames.mk
Log:
Use make's :tl instead of checking "no" and "NO"

Suggested by: kevans
Reviewed by: kevans
15/02/2019
10:30 pm
base/head
emaste
head/share/mk
Modificado:
head/share/mk/bsd.prog.mk
Log:
Fix Makefile conditional after r344179
15/02/2019
10:28 pm
base/head
emaste
head/share/man/man5
Modificado:
head/share/man/man5/src.conf.5
Log:
Regen src.conf.5 after r344179
15/02/2019
10:22 pm
base/head
emaste
in head: kerberos5/tools/asn1_compile kerberos5/tools/slc
Adicional:
head/tools/build/options/WITHOUT_PIE (contents, props changed)
head/tools/build/options/WITH_PIE (contents, props changed)
Modificado:
head/kerberos5/tools/asn1_compile/Makefile
head/kerberos5/tools/slc/Makefile
head/lib/clang/Makefile.inc
head/libexec/rtld-elf/Makefile
head/share/mk/bsd.lib.mk
head/share/mk/bsd.opts.mk
head/share/mk/bsd.prog.mk
head/share/mk/src.libnames.mk
head/stand/i386/Makefile.inc
head/usr.bin/clang/Makefile.inc
head/usr.bin/svn/Makefile.inc
Log:
Add WITH_PIE knob to build Position Independent Executables

Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles. These can
be addressed on an individual basis later. MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

Discussed with: dim
Reviewed by: kib
MFC after: 1 month
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18423
15/02/2019
6:51 pm
base/head
shurd
head/sys/net
Modificado:
head/sys/net/iflib.c
Log:
iflib: Improve return values of interrupt handlers.

iflib was returning FILTER_HANDLED, in cases where FILTER_STRAY was more
correct. This potentially caused issues with shared legacy interrupts.

Driver filters returning FILTER_STRAY are now properly handled.

Submitted by: Augustin Cavalier
Reviewed by: marius, gallatin
Obtained from: Haiku (a84bb9, 4947d1)
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D19201
15/02/2019
6:28 pm
base/head
kevans
head/stand/common
Modificado:
head/stand/common/dev_net.c
Log:
stand: dev_net: correct net_open's interpretation of params

net_open previously casted the first vararg to a char * and this was
half-OK: at first, it is passed to netif_open, which would cast it back to
the struct devdesc * that it really is and use it properly. It is then
strdup()d and used as the netdev_name, which is objectively wrong.

Correct it so that the first vararg is properly casted to a struct devdesc *
and the netdev_name gets set properly to make it more clear at a glance that
it's not doing something horribly wrong.

Reported by: mmel
Reviewed by: imp, mmel, tsoome
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19206
15/02/2019
4:48 pm
base/head
rgrimes
head/usr.sbin/bhyve
Modificado:
head/usr.sbin/bhyve/pci_xhci.c
Log:
In r340044 an attempt to quiet coverity warning cid 1357336
was incorrectly implemented leading to a possible double free.

It is possible for both the conditional free,
and the unconditional free added in r340044 to be done,
fix that by initializing uopt to NULL,
removing the conditional free,
and only using the unconditional free at the end.

Reported by: Patrick Mooney (patrick.mooney@joyent.com)
Reviewed by: jhb (maintainer), Patrick Mooney (joyent/illumos)
Approved by: bde (mentor)
CID: 1357336
MFC after: 3 days
MFC with: 340044
Differential Revision: https://reviews.freebsd.org/D19202
15/02/2019
4:20 pm
base/head
rgrimes
head/usr.sbin/bhyve
Modificado:
head/usr.sbin/bhyve/block_if.c
Log:
In r340042 an attempt to quiet coverity warning cid 1305412 was overdone.
nopt is the only allocated space,
xopt and cp are aliases into that allocated space.
Remove the 2 unneeded free's

Reported by: Patrick Mooney (@pmooney_pfmooney.com)
Reviewed by: jhb (maintainer), Patrick Mooney (joyent/illumos)
Approved by: bde (mentor)
CID: 1305412
MFC after: 3 days
MFC with: 340042
Differential Revision: https://reviews.freebsd.org/D19200
15/02/2019
10:40 am
base/head
mw
head/sys/dev/ena
Modificado:
head/sys/dev/ena/ena.c
head/sys/dev/ena/ena.h
Log:
Do not use ntc for obtaining buffer on Rx in the ENA

In out of order mode Rx buffer are accesses by req_id.
Accessing and validating mbuf using ntc is causing false error.

Increase driver revision after latest RX OOO completion fixes.

Submitted by: Rafal Kozik
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
MFC after: 1 week
15/02/2019
10:34 am
base/head
mw
head/sys/dev/ena
Modificado:
head/sys/dev/ena/ena.c
Log:
Fix validation of the Rx OOO completion in the ENA

Requested ID should be validated when the packet is received and not
when the driver is repopulating the mbufs.

Submitted by: Michal Krawczyk
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
MFC after: 1 week
15/02/2019
9:45 am
base/head
tuexen
head/sys/netinet
Modificado:
head/sys/netinet/tcp_timewait.c
Log:
Fix a byte ordering issue for the advertised receiver window in ACK
segments sent in TIMEWAIT state, which I introduced in r336937.

MFC after: 3 days
Sponsored by: Netflix, Inc.
15/02/2019
4:15 am
base/head
sef
head/sys/opencrypto
Modificado:
head/sys/opencrypto/cbc_mac.c
Log:
Fix another issue from r344141, having to do with size of a shift amount.
This did not show up in my testing.

Differential Revision: https://reviews.freebsd.org/D18592
15/02/2019
4:02 am
base/head
sef
head/sys/opencrypto
Modificado:
head/sys/opencrypto/cbc_mac.c
Log:
Pasting in a source control line missed the last quote. Fixed.
15/02/2019
3:53 am
base/head
sef
in head: sys/opencrypto tools/tools/crypto
Modificado:
head/sys/opencrypto/cryptodev.c
head/sys/opencrypto/cryptodev.h
head/sys/opencrypto/cryptosoft.c
head/sys/opencrypto/xform_aes_icm.c
head/sys/opencrypto/xform_auth.h
head/sys/opencrypto/xform_enc.h
head/tools/tools/crypto/cryptocheck.c
Log:
Add AES-CCM encryption, and plumb into OCF.

This commit essentially has three parts:

* Add the AES-CCM encryption hooks. This is in and of itself fairly small,
as there is only a small difference between CCM and the other ICM-based
algorithms.
* Hook the code into the OpenCrypto framework. This is the bulk of the
changes, as the algorithm type has to be checked for, and the differences
between it and GCM dealt with.
* Update the cryptocheck tool to be aware of it. This is invaluable for
confirming that the code works.

This is a software-only implementation, meaning that the performance is very
low.

Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D19090
15/02/2019
3:46 am
base/head
sef
in head/sys: conf modules/crypto opencrypto
Adicional:
head/sys/opencrypto/cbc_mac.c (contents, props changed)
head/sys/opencrypto/cbc_mac.h (contents, props changed)
head/sys/opencrypto/xform_cbc_mac.c (contents, props changed)
Modificado:
head/sys/conf/files
head/sys/modules/crypto/Makefile
head/sys/opencrypto/cryptodev.h
Log:
Add CBC-MAC authentication.

This adds the CBC-MAC code to the kernel, but does not hook it up to
anything (that comes in the next commit).

https://tools.ietf.org/html/rfc3610 describes the algorithm.

Note that this is a software-only implementation, which means it is
fairly slow.

Sponsored by: iXsystems Inc
Differential Revision: https://reviews.freebsd.org/D18592
14/02/2019
7:07 pm
base/head
bde
head/sys/kern
Modificado:
head/sys/kern/kern_resource.c
Log:
Finish the fix for overflow in calcru1().

The previous fix was unnecessarily very slow up to 105 hours where the
simple formula used previously worked, and unnecessarily slow by a factor
of about 5/3 up to 388 days, and didn't work above 388 days. 388 days is
not a long time, since it is a reasonable uptime, and for processes the
times being calculated are aggregated over all threads, so with N CPUs
running the same thread a runtime of 388 days is reachable after only
388 / N physical days.

The PRs document overflow at 388 days, but don't try to fix it.

Use the simple formula up to 76 hours. Then use a complicated general
method that reduces to the simple formula up to a bit less than 105
hours, then reduces to the previous method without its extra work up
to almost 388 days, then does more complicated reductions, usually
many bits at a time so that this is not slow. This works up to half
of maximum representable time (292271 years), with accumulated rounding
errors of at most 32 usec.

amd64 can do all this with no avoidable rounding errors in an inline
asm with 2 instructions, but this is too special to use. __uint128_t
can do the same with 100's of instructions on 64-bit arches. Long
doubles with at least 64 bits of precision are the easiest method to
use on i386 userland, but are hard to use in the kernel.

PR: 76972 and duplicates
Reviewed by: kib
14/02/2019
6:02 pm
base/head
erj
head/sys/dev/ixl
Modificado:
head/sys/dev/ixl/if_ixl.c
head/sys/dev/ixl/ixl_pf.h
Log:
ixl: Fix panic caused by bug exposed by r344062

Don't use a struct if_irq for IFLIB_INTR_IOV type interrupts since that results
in get_core_offset() being called on them, and get_core_offset() doesn't
handle IFLIB_INTR_IOV type interrupts, which results in an assert() being triggered
in iflib_irq_set_affinity().

PR: 235730
Reported by: Jeffrey Pieper
MFC after: 1 day
Sponsored by: Intel Corporation
14/02/2019
5:04 pm
base/head
imp
head
Modificado:
head/UPDATING
Log:
Fix small typo.

Differential Review: https://reviews.freebsd.org/D19193
14/02/2019
3:45 pm
base/head
kib
head/sys/vm
Modificado:
head/sys/vm/vm_map.c
Log:
Make anon clustering more compatible.

Make the clustering enabling knob more fine-grained by providing a
setting where the allocation with hint is not clustered. This is aimed
to be somewhat more compatible with e.g. go 1.4 which expects that
hinted mmap without MAP_FIXED does not change the allocation address.

Now the vm.cluster_anon can be set to 1 to only cluster when no hints,
and to 2 to always cluster. Default value is 1.

Requested by: peter
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D19194
14/02/2019
3:15 pm
base/head
luporl
head/sys/powerpc/powerpc
Modificado:
head/sys/powerpc/powerpc/exec_machdep.c
Log:
[PPC64] Fix mismatch between thread flags and MSR

When sigreturn() restored a thread's context, SRR1 was being restored
to its previous value, but pcb_flags was not being touched.

This could cause a mismatch between the thread's MSR and its pcb_flags.
For instance, when the thread used the FPU for the first time inside
the signal handler, sigreturn() would clear SRR1, but not pcb_flags.
Then, the thread would return with the FPU bit cleared in MSR and,
the next time it tried to use the FPU, it would fail on a KASSERT
that checked if the FPU was disabled.

This change clears the FPU bit in both pcb_flags and frame->srr1,
as the code that restores the context expects to use the FPU trap
to re-enable it.

PR: 234539
Reported by: sbruno
Reviewed by: jhibbits, sbruno
Differential Revision: https://reviews.freebsd.org/D19166
14/02/2019
2:44 pm
base/head
kib
in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc
Modificado:
head/sys/arm/arm/elf_machdep.c
head/sys/arm64/arm64/elf_machdep.c
head/sys/mips/mips/elf_machdep.c
head/sys/powerpc/powerpc/elf32_machdep.c
head/sys/powerpc/powerpc/elf64_machdep.c
head/sys/riscv/riscv/elf_machdep.c
head/sys/sparc64/sparc64/elf_machdep.c
Log:
Enable enabling ASLR on non-x86 architectures.

Discussed with: emaste
Sponsored by: The FreeBSD Foundation
14/02/2019
2:02 pm
base/head
kib
in head/lib/libc: . amd64/gen i386/gen x86/gen
Adicional:
head/lib/libc/x86/gen/
head/lib/libc/x86/gen/Makefile.inc (contents, props changed)
head/lib/libc/x86/gen/getcontextx.c
- copied, changed from r344117, head/lib/libc/amd64/gen/getcontextx.c
Eliminado:
head/lib/libc/amd64/gen/getcontextx.c
head/lib/libc/i386/gen/getcontextx.c
Modificado:
head/lib/libc/Makefile
head/lib/libc/amd64/gen/Makefile.inc
head/lib/libc/i386/gen/Makefile.inc
Log:
Unify i386 and amd64 getcontextx.c, and use ifuncs while there.

In particular, use ifuncs for __getcontextx_size(), also calculate the
size of the extended save area in resolver. Same for __fillcontextx2().

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
14/02/2019
1:59 pm
base/head
kib
head/lib/libc/x86/sys
Modificado:
head/lib/libc/x86/sys/__vdso_gettc.c
Log:
x86 __vdso_gettc(): use machine/cpufunc.h function for CPUID.

Based on the discussion with: jkim
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
14/02/2019
1:53 pm
base/head
kib
head/sys/i386/include
Modificado:
head/sys/i386/include/cpufunc.h
Log:
Provide userspace versions of do_cpuid() and cpuid_count() on i386.

Some older compilers, when generating PIC code, cannot handle inline
asm that clobbers %ebx (because %ebx is used as the GOT offset
register). Userspace versions avoid clobbering %ebx by saving it to
stack before executing the CPUID instruction.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
14/02/2019
9:21 am
base/head
avos
head
Modificado:
head/UPDATING
Log:
Add UPDATING entry for IEEE80211_AMPDU_AGE and AH_SUPPORT_AR5416 options
removal

Notified by: ian
13/02/2019
8:13 pm
base/head
dim
head/contrib/llvm/lib/MC
Modificado:
head/contrib/llvm/lib/MC/ELFObjectWriter.cpp
Log:
Pull in r353907 from upstream llvm trunk (by Reid Kleckner):

[MC] Make symbol version errors non-fatal

We stil don't have a source location, which is pretty lame, but at
least we won't tell the user to file a clang bug report anymore.

Fixes PR40712

This will make errors for symbols with @@ versions that are not defined
non-fatal. For example:

void f(void)
{
__asm__(".symver foo,bar@@baz");
}

will now result in:

error: versioned symbol bar@@baz must be defined

instead of clang crashing with a diagnostic report.

PR: 234671
Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=40712
MFC after: 3 days
13/02/2019
6:28 pm
base/head
luporl
head/lib/libthr/arch/powerpc/include
Modificado:
head/lib/libthr/arch/powerpc/include/pthread_md.h
Log:
silence cast-align warnings from clang on powerpc64

silence the following warning when compiling libthr with clang 8
for powerpc64 architecture:

usr/src/lib/libthr/arch/powerpc/include/pthread_md.h:82:10: error:
cast from 'uint8_t *' (aka 'unsigned char *') to 'struct tcb *'
increases required alignment from 1 to 8 [-Werror,-Wcast-align]
82: return ((struct tcb *)(_tp - TP_OFFSET));

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: git_bdragon.rtk0.net, emaste, kib, jhibbits, luporl
Differential Revision: https://reviews.freebsd.org/D18807
13/02/2019
5:50 pm
base/head
markj
in head/sys/riscv: include riscv
Modificado:
head/sys/riscv/include/pcb.h
head/sys/riscv/include/pcpu.h
head/sys/riscv/include/pmap.h
head/sys/riscv/riscv/genassym.c
head/sys/riscv/riscv/machdep.c
head/sys/riscv/riscv/mp_machdep.c
head/sys/riscv/riscv/pmap.c
head/sys/riscv/riscv/swtch.S
head/sys/riscv/riscv/vm_machdep.c
Log:
Implement per-CPU pmap activation tracking for RISC-V.

This reduces the overhead of TLB invalidations by ensuring that we
only interrupt CPUs which are using the given pmap. Tracking is
performed in pmap_activate(), which gets called during context switches:
from cpu_throw(), if a thread is exiting or an AP is starting, or
cpu_switch() for a regular context switch.

For now, pmap_sync_icache() still must interrupt all CPUs.

Reviewed by: kib (earlier version), jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18874
13/02/2019
5:38 pm
base/head
markj
head/sys/riscv/riscv
Modificado:
head/sys/riscv/riscv/pmap.c
Log:
Implement pmap_clear_modify() for RISC-V.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18875
13/02/2019
5:19 pm
base/head
markj
in head/sys: riscv/include riscv/riscv vm
Modificado:
head/sys/riscv/include/param.h
head/sys/riscv/include/pmap.h
head/sys/riscv/include/pte.h
head/sys/riscv/include/vmparam.h
head/sys/riscv/riscv/pmap.c
head/sys/vm/vm_fault.c
Log:
Implement transparent 2MB superpage promotion for RISC-V.

This includes support for pmap_enter(..., psind=1) as described in the
commit log message for r321378.

The changes are largely modelled after amd64. arm64 has more stringent
requirements around superpage creation to avoid the possibility of TLB
conflict aborts, and these requirements do not apply to RISC-V, which
like amd64 permits simultaneous caching of 4KB and 2MB translations for
a given page. RISC-V's PTE format includes only two software bits, and
as these are already consumed we do not have an analogue for amd64's
PG_PROMOTED. Instead, pmap_remove_l2() always invalidates the entire
2MB address range.

pmap_ts_referenced() is modified to clear PTE_A, now that we support
both hardware- and software-managed reference and dirty bits. Also
fix pmap_fault_fixup() so that it does not set PTE_A or PTE_D on kernel
mappings.

Reviewed by: kib (earlier version)
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18863
Differential Revision: https://reviews.freebsd.org/D18864
Differential Revision: https://reviews.freebsd.org/D18865
Differential Revision: https://reviews.freebsd.org/D18866
Differential Revision: https://reviews.freebsd.org/D18867
Differential Revision: https://reviews.freebsd.org/D18868
13/02/2019
3:46 pm
base/head
ae
head/sys/netinet
Modificado:
head/sys/netinet/in_pcb.c
Log:
In r335015 PCB destroing was made deferred using epoch_call().

But ipsec_delete_pcbpolicy() uses some VNET-virtualized variables,
and thus it needs VNET context, that is missing during gtaskqueue
executing. Use inp_vnet context to set curvnet in in_pcbfree_deferred().

PR: 235684
MFC after: 1 week
13/02/2019
2:57 pm
base/head
rrs
head/sys/net
Modificado:
head/sys/net/if_lagg.c
head/sys/net/if_vlan.c
Log:
This commit adds the missing release mechanism for the
ratelimiting code. The two modules (lagg and vlan) did have
allocation routines, and even though they are indirect (and
vector down to the underlying interfaces) they both need to
have a free routine (that also vectors down to the actual interface).

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D19032
13/02/2019
7:37 am
base/head
mm
head/contrib/libarchive/libarchive
Modificado:
head/contrib/libarchive/libarchive/archive_read_disk_posix.c
Directory Properties:
head/contrib/libarchive/ (props changed)
Log:
MFV r344088 (libarchive):
archive_read_disk_posix.c: initialize delayed_errno

MFC after: 2 weeks
13/02/2019
4:52 am
base/head
obrien
head/lib/libc/gen
Modificado:
head/lib/libc/gen/readpassphrase.3
Log:
Note that readpassphrase() came into FreeBSD's libc at 4.6.
13/02/2019
4:19 am
base/head
kevans
head/lib/libbe
Modificado:
head/lib/libbe/be.c
head/lib/libbe/be.h
head/lib/libbe/be_error.c
head/lib/libbe/libbe.3
Log:
libbe(3): Fix be_destroy behavior w.r.t. deep BE snapshots and -o

be_destroy is documented to recursively destroy a boot environment. In the
case of snapshots, one would take this to mean that these are also
recursively destroyed. However, this was previously not the case.
be_destroy would descend into the be_destroy callback and attempt to
zfs_iter_children on the top-level snapshot, which is bogus.

Our alternative approach is to take note of the snapshot name and iterate
through all of fs children of the BE to try destruction in the children.

The -o option is also fixed to work properly with deep BEs. If the BE was
created with `bectl create -e otherDeepBE newDeepBE`, for instance, then a
recursive snapshot of otherDeepBE would have been taken for construction of
newDeepBE but a subsequent destroy with BE_DESTROY_ORIGIN set would only
clean up the snapshot at the root of otherDeepBE: ${BEROOT}/otherDeepBE@...

The most recent iteration instead pretends not to know how these things
work, verifies that the origin is another BE and then passes that back
through be_destroy to DTRT when snapshots and deep BEs may be in play.

MFC after: 1 week
13/02/2019
3:11 am
base/head
jhibbits
head/sys/powerpc/booke
Modificado:
head/sys/powerpc/booke/pmap.c
Log:
powerpc/booke: Use the 'tlbilx' instruction on newer cores

Newer cores have the 'tlbilx' instruction, which doesn't broadcast over
CoreNet. This is significantly faster than walking the TLB to invalidate
the PID mappings. tlbilx with the arguments given takes 131 clock cycles to
complete, as opposed to 512 iterations through the loop plus tlbre/tlbwe at
each iteration.

MFC after: 3 weeks
13/02/2019
12:10 am
base/head
imp
head/sys/cam
Modificado:
head/sys/cam/cam_xpt.c
Log:
Fix panic message.

The panic message lead people to believe some userland CAM request had
caused a problem when in reallity it was for a kernel request (eg the
USER bit was cleared). Reword message. Also, improve a couple of
comments to reflect that the periph shouldn't be completely torn down
before we get here (so the path and sim pointers should be valid, but
aren't and the code is designed to be robust enough in the face of
that to give a specific panic message).
12/02/2019
11:39 pm
base/head
marius
head/sys/modules/hwpmc
Modificado:
head/sys/modules/hwpmc/Makefile
Log:
With r344062 in place, hwpmc_mod.c generally needs bus_if.h and
device_if.h.
12/02/2019
11:35 pm
base/head
ngie
head/sbin/bectl/tests
Modificado:
head/sbin/bectl/tests/bectl_test.sh
Log:
Fix up concurrent test zpool setup and teardown

Set up zpools with a more unique name, stash the zpool name away in a file pointed
to by `$ZPOOL_NAME_FILE` (which is relative to a per-testcase generated temporary
directory), then remove the file based on `$ZPOOL_NAME_FILE` in the cleanup
routines.

This is a more concurrency-safe solution and will allow the testcases to be safely
executed in parallel.

Reviewed by: kevans, jtl
Approved by: jtl (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19024
12/02/2019
11:33 pm
base/head
ngie
head/share/man/man8
Modificado:
head/share/man/man8/Makefile
Log:
Add rc.resume(8) alias for rc(8) to fix the manpage cross references

This issue was noticed when running `make manlint` as part of MFCing r342597 to
^/stable/11:
```
$ make -C share/man/man8 rc.8lint
mandoc -Tascii -Tlint rc.8
mandoc: rc.8:548:6: STYLE: referenced manual not found: Xr rc.resume 8
$
```

This is a followup commit to r339818.

Reviewed by: eugen
Approved by: jtl (mentor)
MFC after: 1 week
MFC to: ^/stable/12
Differential Revision: https://reviews.freebsd.org/D19158
12/02/2019
11:24 pm
base/head
mm
in head: contrib/libarchive/cpio/test
Adicional:
head/contrib/libarchive/libarchive/archive_ppmd8.c
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/archive_ppmd8.c
head/contrib/libarchive/libarchive/archive_ppmd8_private.h
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/archive_ppmd8_private.h
head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_bzip2.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
head/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
- copied unchanged from r344063, vendor/libarchive/dist/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
Eliminado:
head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c
head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
Modificado:
head/contrib/libarchive/cpio/test/test_option_t.c
head/contrib/libarchive/libarchive/archive_acl.c
head/contrib/libarchive/libarchive/archive_entry.c
head/contrib/libarchive/libarchive/archive_pack_dev.c
head/contrib/libarchive/libarchive/archive_read_disk_posix.c
head/contrib/libarchive/libarchive/archive_read_open_file.c
head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
head/contrib/libarchive/libarchive/archive_read_support_format_ar.c
head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c
head/contrib/libarchive/libarchive/archive_read_support_format_xar.c
head/contrib/libarchive/libarchive/archive_read_support_format_zip.c
head/contrib/libarchive/libarchive/archive_write_disk_posix.c
head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
head/contrib/libarchive/libarchive/archive_write_set_format_ar.c
head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
head/contrib/libarchive/libarchive/archive_write_set_format_shar.c
head/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
head/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c
head/contrib/libarchive/libarchive/archive_write_set_format_zip.c
head/contrib/libarchive/libarchive/test/test_read_format_zip.c
head/contrib/libarchive/test_utils/test_main.c
head/lib/libarchive/Makefile
head/lib/libarchive/tests/Makefile
Directory Properties:
head/contrib/libarchive/ (props changed)
Log:
MFV r344063:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1085: Fix a null pointer dereference bug in zip writer
PR #1110: ZIP reader added support for XZ, LZMA, PPMD8 and BZIP2
decopmpression
PR #1116: Add support for 64-bit ar format
PR #1120: Fix a 7zip crash [1] and a ISO9660 infinite loop [2]
PR #1125: RAR5 reader - fix an invalid read and a memory leak
PR #1131: POSIX reader - do not fail when tree_current_lstat() fails
due to ENOENT [3]
PR #1134: Delete unnecessary null pointer checks before calls of free()
OSS-Fuzz 10843: Force intermediate to uint64_t to make UBSAN happy.
OSS-Fuzz 11011: Avoid buffer overflow in rar5 reader

PR: 233006 [3]
Security: CVE-2019-1000019 [1], CVE-2019-1000020 [2]
MFC after: 2 weeks
12/02/2019
10:33 pm
base/head
marius
head/sys/net
Modificado:
head/sys/net/iflib.c
Log:
Fix the build with ALTQ after r344060.
12/02/2019
9:23 pm
base/head
marius
in head/sys: compat/linuxkpi/common/src kern net sys
Modificado:
head/sys/compat/linuxkpi/common/src/linux_tasklet.c
head/sys/kern/subr_epoch.c
head/sys/kern/subr_gtaskqueue.c
head/sys/net/iflib.c
head/sys/sys/_task.h
head/sys/sys/gtaskqueue.h
head/sys/sys/param.h
Log:
Make taskqgroup_attach{,_cpu}(9) work across architectures

So far, intr_{g,s}etaffinity(9) take a single int for identifying
a device interrupt. This approach doesn't work on all architectures
supported, as a single int isn't sufficient to globally specify a
device interrupt. In particular, with multiple interrupt controllers
in one system as found on e. g. arm and arm64 machines, an interrupt
number as returned by rman_get_start(9) may be only unique relative
to the bus and, thus, interrupt controller, a certain device hangs
off from.
In turn, this makes taskqgroup_attach{,_cpu}(9) and - internal to
the gtaskqueue implementation - taskqgroup_attach_deferred{,_cpu}()
not work across architectures. Yet in turn, iflib(4) as gtaskqueue
consumer so far doesn't fit architectures where interrupt numbers
aren't globally unique.
However, at least for intr_setaffinity(..., CPU_WHICH_IRQ, ...) as
employed by the gtaskqueue implementation to bind an interrupt to a
particular CPU, using bus_bind_intr(9) instead is equivalent from
a functional point of view, with bus_bind_intr(9) taking the device
and interrupt resource arguments required for uniquely specifying a
device interrupt.
Thus, change the gtaskqueue implementation to employ bus_bind_intr(9)
instead and intr_{g,s}etaffinity(9) to take the device and interrupt
resource arguments required respectively. This change also moves
struct grouptask from to and wraps
struct gtask along with the gtask_fn_t typedef into #ifdef _KERNEL
as userland likes to include or indirectly drags it
in - for better or worse also with _KERNEL defined -, which with
device_t and struct resource dependencies otherwise is no longer
as easily possible now.
The userland inclusion problem probably can be improved a bit by
introducing a _WANT_TASK (as well as a _WANT_MOUNT) akin to the
existing _WANT_PRISON etc., which is orthogonal to this change,
though, and likely needs an exp-run.

While at it:
- Change the gt_cpu member in the grouptask structure to be of type
int as used elswhere for specifying CPUs (an int16_t may be too
narrow sooner or later),
- move the gtaskqueue_enqueue_fn typedef from to
the gtaskqueue implementation as it's only used and needed there,
- change the GTASK_INIT macro to use "gtask" rather than "task" as
argument given that it actually operates on a struct gtask rather
than a struct task, and
- let subr_gtaskqueue.c consistently use __func__ to print functions
names.

Reported by: mmel
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D19139
12/02/2019
9:22 pm
base/head
kp
head/sys/netinet
Modificado:
head/sys/netinet/if_ether.c
Log:
garp: Fix vnet related panic for gratuitous arp

Gratuitous ARP packets are sent from a timer, which means we don't have a vnet
context set. As a result we panic trying to send the packet.

Set the vnet context based on the interface associated with the interface
address.

To reproduce:
sysctl net.link.ether.inet.garp_rexmit_count=2
ifconfig vtnet1 10.0.0.1/24 up

PR: 235699
Reviewed by: vangyzen@
MFC after: 1 week
12/02/2019
9:08 pm
base/head
marius
head/sys/net
Modificado:
head/sys/net/iflib.c
Log:
Further correct and optimize the bus_dma(9) usage of iflib(4):
o Correct the obvious bugs in the netmap(4) parts:
- No longer check for the existence of DMA maps as bus_dma(9)
is used unconditionally in iflib(4) since r341095.
- Supply the correct DMA tag and map pairs to bus_dma(9)
functions (see also the commit message of r343753).
- In iflib_netmap_timer_adjust(), add synchronization of the
TX descriptors before calling the ift_txd_credits_update
method as the latter evaluates the TX descriptors possibly
updated by the MAC.
- In _task_fn_tx(), wrap the netmap(4)-specific bits in
#ifdef DEV_NETMAP just as done in _task_fn_admin() and
_task_fn_rx() respectively.
o In iflib_fast_intr_rxtx(), synchronize the TX rather than
the RX descriptors before calling the ift_txd_credits_update
method (see also above).
o There's no need to synchronize an RX buffer that is going to
be recycled in iflib_rxd_pkt_get(), yet; it's sufficient to
do that as late as passing RX buffers to the MAC via the
ift_rxd_refill method. Hence, combine that synchronization
with the synchronization of new buffers into a common spot
in _iflib_fl_refill().
o There's no need to synchronize the RX descriptors of a free
list in preparation of the MAC updating their statuses with
every invocation of rxd_frag_to_sd(); it's enough to do this
once before handing control over to the MAC, i. e. before
calling ift_rxd_flush method in _iflib_fl_refill(), which
already performs the necessary synchronization.
o Given that the ift_rxd_available method evaluates the RX
descriptors which possibly have been altered by the MAC,
synchronize as appropriate beforehand. Most notably this
is now done in iflib_rxd_avail(), which in turn means that
we don't need to issue the same synchronization yet again
before calling the ift_rxd_pkt_get method in iflib_rxeof().
o In iflib_txd_db_check(), synchronize the TX descriptors
before handing them over to the MAC for transmission via
the ift_txd_flush method.
o In iflib_encap(), move the TX buffer synchronization after
the invocation of the ift_txd_encap() method. If the MAC
driver fails to encapsulate the packet and we retry with
a defragmented mbuf chain or finally fail, the cycles for
TX buffer synchronization have been wasted. Synchronizing
afterwards matches what non-iflib(4) drivers typically do
and is sufficient as the MAC will not actually start with
the transmission before - in this case - the ift_txd_flush
method is called.
Moreover, for the latter reason the synchronization of the
TX descriptors in iflib_encap() can go as it's enough to
synchronize them before passing control over to the MAC by
issuing the ift_txd_flush() method (see above).
o In iflib_txq_can_drain(), only synchronize TX descriptors
if the ift_txd_credits_update method accessing these is
actually called.

Differential Revision: https://reviews.freebsd.org/D19081
12/02/2019
9:06 pm
base/head
phk
head/share/man/man4
Modificado:
head/share/man/man4/numa.4
Log:
Point people to SMP(4) for CPU<->domain mapping.
12/02/2019
7:05 pm
base/head
imp
head/usr.sbin/bhyve
Modificado:
head/usr.sbin/bhyve/uart_emul.c
Log:
Revert r343077 until the license issues surrounding it can be resolved.

Approved by: core@
12/02/2019
6:32 pm
base/head
dim
in head/contrib/llvm: include/llvm/CodeGen
Modificado:
head/contrib/llvm/include/llvm/CodeGen/TargetLowering.h
head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h
head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h
Log:
Pull in r339734 from upstream llvm trunk (by Eli Friedman):

[ARM] Make PerformSHLSimplify add nodes to the DAG worklist correctly.

Intentionally excluding nodes from the DAGCombine worklist is likely
to lead to weird optimizations and infinite loops, so it's generally
a bad idea.

To avoid the infinite loops, fix DAGCombine to use the
isDesirableToCommuteWithShift target hook before performing the
transforms in question, and implement the target hook in the ARM
backend disable the transforms in question.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38530 . (I don't have a
reduced testcase for that bug. But we should have sufficient test
coverage for PerformSHLSimplify given that we're not playing weird
tricks with the worklist. I can try to bugpoint it if necessary,
though.)

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

This should fix a possible hang when compiling sys/dev/nxge/if_nxge.c
(which exists now only in the stable/11 branch) for arm.
12/02/2019
1:01 pm
base/head
trasz
head/share/man/man7
Modificado:
head/share/man/man7/ports.7
Log:
Fix markup - use .Pa for the directory component, not .Fa.

Reported by: 0mp
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
12/02/2019
11:29 am
base/head
luporl
head/sys/powerpc/aim
Modificado:
head/sys/powerpc/aim/mmu_oea64.c
Log:
[ppc64] prevent infinite loop on icache sync

At moea64_sync_icache(), when the 'va' argument has page size
alignment, round_page() will return the same value as 'va'.
This would cause 'len' to be 0 and thus an infinite loop.

With this change, 'lim' will always point to the next page boundary.

This issue occurred especially during debugging sessions, when a breakpoint
was placed on an exact page-aligned offset, for instance.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D19149
12/02/2019
10:17 am
base/head
tuexen
head/sys/netinet
Modificado:
head/sys/netinet/raw_ip.c
Log:
Improve input validation for raw IPv4 socket using the IP_HDRINCL
option.

This issue was found by running syzkaller on OpenBSD.
Greg Steuck made me aware that the problem might also exist on FreeBSD.

Reported by: Greg Steuck
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D18834
12/02/2019
8:16 am
base/head
lwhsu
head/sys/contrib/dev/iwm
Eliminado:
head/sys/contrib/dev/iwm/iwm-3160-9.fw.uu
head/sys/contrib/dev/iwm/iwm-7260-9.fw.uu
head/sys/contrib/dev/iwm/iwm-7265-9.fw.uu
Log:
Remove empty files

Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
12/02/2019
5:15 am
base/head
bwidawsk
head/share/termcap
Modificado:
head/share/termcap/termcap
Log:
termcap: Add an entry for kitty

The project is here:
https://github.com/kovidgoyal/kitty/

I created a port (which now needs updating):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233010

If only we could use terminfo :(

MFC after: 5 days
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D19060
12/02/2019
4:33 am
base/head
pfg
head/sys/vm
Modificado:
head/sys/vm/uma_core.c
head/sys/vm/uma_int.h
Log:
UMA: unsign some variables related to allocation in hash_alloc().

As a followup to r343673, unsign some variables related to allocation
since the hashsize cannot be negative. This gives a bit more space to
handle bigger allocations and avoid some implicit casting.

While here also unsign uh_hashmask, it makes little sense to keep that
signed.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19148
12/02/2019
3:32 am
base/head
ngie
head/sys/sys
Modificado:
head/sys/sys/param.h
Log:
Bump `__FreeBSD_version__` for r343891

This will allow upstream consumers, e.g., capsicum-test and third-party
packages (via ports(7)), to test for a specific `__FreeBSD_version__` and
expect `renameat(2)` to be functional.

PR: 222258
Approved by: emaste (mentor)
Reviewed by: emaste
MFC with: r343891
Differential Revision: https://reviews.freebsd.org/D19154
12/02/2019
2:55 am
base/head
kevlo
head/sys/dev/usb
Modificado:
head/sys/dev/usb/usbdevs
Log:
Remove entry for Intenso product.
12/02/2019
2:48 am
base/head
kevlo
in head/sys/dev/usb: . quirk
Modificado:
head/sys/dev/usb/quirk/usb_quirk.c
head/sys/dev/usb/usbdevs
Log:
Remove duplicate vendor id in r334650. Intenso doesn't have a USB VID.
12/02/2019
2:16 am
base/head
kevans
head/lib/libbe
Modificado:
head/lib/libbe/libbe.3
Log:
libbe(3): Belatedly note the BE_DESTROY_ORIGIN option added in r343977

X-MFC-With: r343977
11/02/2019
10:58 pm
base/head
pkelsey
head/sbin/pfctl
Modificado:
head/sbin/pfctl/pfctl_altq.c
Log:
Fix the fix added in r343287 for spurious HFSC bandwidth check errors

The logic added in r343287 to avoid false-positive
sum-of-child-bandwidth check errors for HFSC queues has a bug in it
that causes the upperlimit service curve of an HFSC queue to be pulled
down to its parent's linkshare service curve if it happens to be above
it.

Upon further inspection/reflection, this generic
sum-of-child-bandwidths check does not need to be fixed for HFSC - it
needs to be skipped. For HFSC, the equivalent check is to ensure the
sum of child linkshare service curves are at or below the parent's
linkshare service curve, and this check is already being performed by
eval_pfqueue_hfsc().

This commit reverts the affected parts of r343287 and adds new logic
to skip the generic sum-of-child-bandwidths check for HFSC.

MFC after: 1 day
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D19124
11/02/2019
10:09 pm
base/head
dab
head/sys/cam/scsi
Modificado:
head/sys/cam/scsi/scsi_xpt.c
Log:
CID 1009492: Logically dead code in sys/cam/scsi/scsi_xpt.c

In `probedone()`, for the `PROBE_REPORT_LUNS` case, all paths that
fall to the bottom of the case set `lp` to `NULL`, so the test for a
non-NULL value of `lp` and call to `free()` if true is dead code as
the test can never be true. Fix by eliminating the whole if
statement. To guard against a possible future change that accidentally
violates this assumption, use a `KASSERT()` to catch if `lp` is
non-NULL.

Reviewed by: cem
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D19109
11/02/2019
9:31 pm
base/head
brooks
head/sbin/mdmfs
Modificado:
head/sbin/mdmfs/mdmfs.c
Log:
mdmfs: Fix many bugs in automatic md(4) creation.

This code allocated a correctly sized buffer, read past the end of the
source buffer, writing off the end of the target buffer, and then writing
a '\0' terminator past the end of the target buffer (in the wrong place).
It then leaked the buffer.

Switch to a statically sized buffer on the stack and update the source
pointer and
length before use so the correct things are copied.

Fix a logic error in the checks that the format of the line is as
expected and move on out of an assert.

Remove an unneeded close(). fclose() closes the descriptor.

Found with: CheriABI
Obtained from: CheriBSD
Reviewed by: kib, jhb, markj
Differential Revision: https://reviews.freebsd.org/D19122
11/02/2019
8:47 pm
base/head
jhb
head/sys/dev/pci
Modificado:
head/sys/dev/pci/pci.c
Log:
Enable PCI BAR reallocation by default.

When pci_realloc_bars was first added, the intention was to eventually
enable it by default, but it was left disabled to preserve existing
behavior. The setting is pretty conservative in that it does not
attempt to allocate resources for BARs that the BIOS/firmware leaves
disabled. It only attempts to reallocate resources for a BAR that the
firmware programmed during boot but that conflicts with another
resource during the kernel's device scan.

PR 221350 is an example of a machine that this knob fixes.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D18965
11/02/2019
8:46 pm
base/head
trasz
head/share/man/man7
Modificado:
head/share/man/man7/ports.7
Log:
Add explanation of branches to the ports(7) man page.

Reviewed by: matthew@, freebsd@mhka.no
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D19146
11/02/2019
6:10 pm
base/head
ae
head/sys/netpfil/ipfw
Modificado:
head/sys/netpfil/ipfw/ip_fw_dynamic.c
Log:
Remove `set' field from state structure and use set from parent rule.

Initially it was introduced because parent rule pointer could be freed,
and rule's information could become inaccessible. In r341471 this was
changed. And now we don't need this information, and also it can become
stale. E.g. rule can be moved from one set to another. This can lead
to parent's set and state's set will not match. In this case it is
possible that static rule will be freed, but dynamic state will not.
This can happen when `ipfw delete set N` command is used to delete
rules, that were moved to another set.
To fix the problem we will use the set number from parent rule.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC
11/02/2019
4:31 pm
base/head
cracauer
head/usr.sbin/mountd
Modificado:
head/usr.sbin/mountd/exports.5
Log:
Bump .Dd for today's edit.

Thank you Enji Cooper
11/02/2019
3:51 pm
base/head
cracauer
head/usr.sbin/mountd
Modificado:
head/usr.sbin/mountd/exports.5
Log:
Clarify NFSv4 /etc/exports semantics, with working example.
The existing wording has been confusing users for years.
11/02/2019
3:38 pm
base/head
tuexen
head/sys/conf
Modificado:
head/sys/conf/files
Log:
Fix flags used when compiling kern_kcov.c and subr_coverage.c.

Without this fix, the usage of kernel coverage would lockup the system.
Thanks to Andrew for suggesting the final form of the fix.

PR: 235611
Reviewed by: andrew@, emaste@
Differential Revision: https://reviews.freebsd.org/D19135
11/02/2019
2:31 pm
base/head
ganbold
head/sys/arm/allwinner
Modificado:
head/sys/arm/allwinner/axp81x.c
Log:
Add sensors support for AXP803/AXP813. Sensor values such as
battery charging, charge state, voltage, charging current, discharging current,
battery capacity etc. can be obtained via sysctl.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D19145
11/02/2019
7:42 am
base/head
gonzo
head/sys/dev/beri/virtio
Modificado:
head/sys/dev/beri/virtio/virtio_block.c
Log:
Fix off-by-one error in BERI virtio driver

The hardcoded ident is exactly 20 bytes long but sprintf adds terminating zero,
so there is one byte written out of array bounds.As a fix use strncpy it
appends \0 only if space allows and its behavior matches virtio spec:

When VIRTIO_BLK_T_GET_ID is issued, the device identifier, up to 20 bytes, is
written to the buffer. The identifier should be interpreted as an ascii string.
It is terminated with \0, unless it is exactly 20 bytes long.

PR: 202298
Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18852
11/02/2019
5:39 am
base/head
pkelsey
head/sys/netpfil/pf
Modificado:
head/sys/netpfil/pf/pf_ioctl.c
Log:
Place pf_altq_get_nth_active() under the ALTQ ifdef

MFC after: 1 week
11/02/2019
5:17 am
base/head
pkelsey
in head/sys: net net/altq netpfil/pf
Modificado:
head/sys/net/altq/altq_cbq.c
head/sys/net/altq/altq_codel.c
head/sys/net/altq/altq_fairq.c
head/sys/net/altq/altq_hfsc.c
head/sys/net/altq/altq_hfsc.h
head/sys/net/altq/altq_priq.c
head/sys/net/altq/altq_subr.c
head/sys/net/altq/altq_var.h
head/sys/net/pfvar.h
head/sys/netpfil/pf/pf.c
head/sys/netpfil/pf/pf_ioctl.c
Log:
Reduce the time it takes the kernel to install a new PF config containing a large number of queues

In general, the time savings come from separating the active and
inactive queues lists into separate interface and non-interface queue
lists, and changing the rule and queue tag management from list-based
to hash-bashed.

In HFSC, a linear scan of the class table during each queue destroy
was also eliminated.

There are now two new tunables to control the hash size used for each
tag set (default for each is 128):

net.pf.queue_tag_hashsize
net.pf.rule_tag_hashsize

Reviewed by: kp
MFC after: 1 week
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D19131
11/02/2019
4:00 am
base/head
kevans
head/sbin/bectl
Modificado:
head/sbin/bectl/bectl.8
head/sbin/bectl/bectl.c
Log:
bectl(8): Add -o flag to destroy to clean up the origin snapshot of BE

We can't predict when destruction of origin is needed, and currently we have
a precedent for not prompting for things. Leave the decision up to the user
of bectl(8) if they want the origin snapshot to be destroyed or not.

Emits a warning when -o isn't used and an origin snapshot is left to be
cleaned up, for the time being. This is handy when one drops the -o flag but
really did want to clean up the origin.

A couple of -e ignore's have been sprinkled around the test suite for places
that we don't care that the origin's not been cleaned up. -o functionality
tests will be added in the future, but are omitted for now to reduce
conflicts with work in flight to fix bits of the tests.

Reported by: Shawn Webb
MFC after: 1 week
11/02/2019
4:00 am
base/head
kevans
head/sbin/bectl/tests
Modificado:
head/sbin/bectl/tests/bectl_test.sh
Log:
bectl(8): commit missing test modifications from r343993

X-MFC-With: r343993
11/02/2019
12:11 am
base/head
cem
head/sbin/gbde
Modificado:
head/sbin/gbde/gbde.c
Log:
gbde(8) - simplify randomisation with arc4random_buf

Submitted by: David CARLIER
Differential Revision: https://reviews.freebsd.org/D18678
10/02/2019
11:58 pm
base/head
avos
in head/sys: dev/malo dev/mwl dev/usb/wlan net80211
Modificado:
head/sys/dev/malo/if_malo.c
head/sys/dev/mwl/if_mwl.c
head/sys/dev/usb/wlan/if_run.c
head/sys/net80211/ieee80211_adhoc.c
head/sys/net80211/ieee80211_hostap.c
head/sys/net80211/ieee80211_ht.c
head/sys/net80211/ieee80211_mesh.c
head/sys/net80211/ieee80211_output.c
head/sys/net80211/ieee80211_proto.h
head/sys/net80211/ieee80211_sta.c
head/sys/net80211/ieee80211_wds.c
Log:
net80211(4): hide casts for 'i_seq' field offset calculation inside
ieee80211_getqos() and reuse it in various places.

Checked with RTL8188EE, HOSTAP mode + RTL8188CUS, STA mode.

MFC after: 2 weeks
10/02/2019
11:30 pm
base/head
oshogbo
head/sys/contrib/libnv
Modificado:
head/sys/contrib/libnv/nvpair.c
Log:
libnv: fix memory leaks

Free the data array for NV_TYPE_DESCRIPTOR_ARRAY case.

MFC after: 2 weeks
10/02/2019
11:28 pm
base/head
oshogbo
in head: lib/libnv/tests sys/contrib/libnv
Modificado:
head/lib/libnv/tests/nvlist_send_recv_test.c
head/sys/contrib/libnv/nv_impl.h
head/sys/contrib/libnv/nvlist.c
head/sys/contrib/libnv/nvpair.c
Log:
libnv: fix memory leaks

nvpair_create_stringv: free the temporary string; this fix affects
nvlist_add_stringf() and nvlist_add_stringv().

nvpair_remove_nvlist_array (NV_TYPE_NVLIST_ARRAY case): free the chain
of nvpairs (as resetting it prevents nvlist_destroy() from freeing it).
Note: freeing the chain in nvlist_destroy() is not sufficient, because
it would still leak through nvlist_take_nvlist_array(). This affects
all nvlist_*_nvlist_array() use

Submitted by: Mindaugas Rasiukevicius
Reported by: clang/gcc ASAN
MFC after: 2 weeks
10/02/2019
11:07 pm
base/head
cem
head/sys/kern
Modificado:
head/sys/kern/kern_resource.c
Log:
Prevent overflow for usertime/systime in caclru1

PR: 76972 and duplicates
Reported by: Dr. Christopher Landauer ,
Steinar Haug
Submitted by: Andrey Zonov (earlier version)
MFC after: 2 weeks
10/02/2019
10:23 pm
base/head
jilles
in head/bin/sh: . tests/expansion
Adicional:
head/bin/sh/tests/expansion/arith16.0 (contents, props changed)
head/bin/sh/tests/expansion/arith17.0 (contents, props changed)
Modificado:
head/bin/sh/arith_yacc.c
head/bin/sh/arith_yacc.h
head/bin/sh/arith_yylex.c
head/bin/sh/shell.h
head/bin/sh/tests/expansion/Makefile
Log:
sh: Restore $((x)) error checking after fix for $((-9223372036854775808))

SVN r342880 was designed to fix $((-9223372036854775808)) and things like
$((0x8000000000000000)) but also broke error detection for values of
variables without dollar sign ($((x))).

For compatibility, overflow in plain literals continues to be ignored and
the value is clamped to the boundary (except 9223372036854775808 which is
changed to -9223372036854775808).

Reviewed by: se (although he would like error checking to be removed)
MFC after: 2 weeks
X-MFC-with: r342880
Differential Revision: https://reviews.freebsd.org/D18926
10/02/2019
9:32 pm
base/head
avos
head/sbin/ifconfig
Modificado:
head/sbin/ifconfig/ifieee80211.c
Log:
ifconfig(8): display 802.11n rates correctly for 'roam:rate' parameter

MFC after: 5 days
10/02/2019
9:27 pm
base/head
marius
head/sys/opencrypto
Modificado:
head/sys/opencrypto/cryptodev.h
Log:
As struct cryptop is wrapped in #ifdef _KERNEL, userland doesn't
need to drag in either.
10/02/2019
9:22 pm
base/head
kp
head/sbin/pfctl
Modificado:
head/sbin/pfctl/pfctl_parser.c
Log:
pfctl: Fix ifa_grouplookup()

Setting the length of the request got lost in r343287, which means SIOCGIFGMEMB
gives us the required length, but does not copy the names of the group members.
As a result we don't get a correct list of group members, and 'set skip on
' broke.

This produced all sorts of very unexpected results, because we would end up
applying 'set skip' to unexpected interfaces.

X-MFC-with: r343287
10/02/2019
9:19 pm
base/head
kevans
head/lib/libbe
Modificado:
head/lib/libbe/be.c
head/lib/libbe/be.h
Log:
libbe(3): Add a destroy option for removing the origin

Currently origin snapshots are left behind when a BE is destroyed, whether
it was an auto-created snapshot or explicitly specified via, for example,
`bectl create -e be@mysnap ...`.

Removing it automatically could be argued as a POLA violation in some
circumstances, so provide a flag to be_destroy for it. An accompanying
option will be added to bectl(8) to utilize this.

Some minor style/consistency nits in the affected areas also addressed.

Reported by: Shawn Webb
MFC after: 1 week
10/02/2019
8:21 pm
base/head
jhibbits
head/sys/powerpc/conf
Modificado:
head/sys/powerpc/conf/MPC85XXSPE
Log:
powerpc: Clamp MAXCPU for MPC85XXSPE kernel to 2

SoCs with e500v2 chips only have at most 2 cores, and there are no plans to
release any more e500v2-based SoCs. Clamping MAXCPU down to 2 saves 5MB of
data, and 1.5MB bss.
10/02/2019
8:13 pm
base/head
nwhitehorn
head/sys/mips/cavium/octe
Modificado:
head/sys/mips/cavium/octe/ethernet-defines.h
head/sys/mips/cavium/octe/ethernet-rx.c
head/sys/mips/cavium/octe/ethernet.c
Log:
Performance improvements for octe(4):
- Distribute RX load across multiple cores, if present. This reverts
r217212, which is no longer relevant (I think because of the newer
SDK).
- Use newer APIs for pinning taskqueue entries to specific cores.
- Deepen RX buffers.

This more than doubles NAT forwarding throughput on my EdgeRouter Lite from,
with typical packet mixture, 90 Mbps to over 200 Mbps. The result matches
forwarding throughput in Linux without the UBNT hardware offload on the same
hardware, and thus likely reflects hardware limits.

Reviewed by: jhibbits
10/02/2019
7:20 pm
base/head
np
head/sys/dev/cxgbe/common
Modificado:
head/sys/dev/cxgbe/common/t4_hw.c
Log:
cxgbe(4): Ignore unused interrupts.

Sponsored by: Chelsio Communications

Open in new window