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
22/03/2019
9:11 am
base/head
avg
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Modificado:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
Log:
ZFS vdev_file: use correct value for waitfor parameter of VOP_FSYNC

PR: 236475
Reported by: asomers
MFC after: 2 weeks
22/03/2019
7:39 am
base/head
kp
head/tests/sys/netpfil/pf
Adicional:
head/tests/sys/netpfil/pf/CVE-2019-5598.py (contents, props changed)
head/tests/sys/netpfil/pf/icmp.sh (contents, props changed)
Modificado:
head/tests/sys/netpfil/pf/Makefile
Log:
pf tests: Test CVE-2019-5598

Verify that pf correctly drops inconsistent ICMP packets (i.e. where the
IP src/dst do not match the IP src/dst in the ICMP packet.
22/03/2019
6:36 am
base/head
cperciva
head/sys/arm64/conf
Modificado:
head/sys/arm64/conf/GENERIC
Log:
Add nvme support to the arm64 GENERIC kernel.

Submitted by: Greg V
Differential Revision: https://reviews.freebsd.org/D19657
22/03/2019
6:33 am
base/head
cperciva
head/sys/modules
Modificado:
head/sys/modules/Makefile
Log:
Build if_ena.ko on arm64.

This module provides support for the Amazon Elastic Network Adapter; it
was previously only built on x86 architectures, but Amazon EC2 now also
has ARM64 instances with this hardware.

Submitted by: Greg V
22/03/2019
6:28 am
base/head
cperciva
head/sys/dev/uart
Modificado:
head/sys/dev/uart/uart_cpu_arm64.c
Log:
Initialize uart_bus_space_mem.

This value was being used uninitialized, resulting in predictable issues
on systems with memory-mapped UART registers.

A case could be made that memmap_bus should be declared in a header
rather than being declared in each .c file which needs to refer to it,
but that's a broader style question.

This commit unbreaks hw.uart.console="mm:..." on ARM64.

Submitted by: Greg V
22/03/2019
6:21 am
base/head
cperciva
head/sys/dev/uart
Modificado:
head/sys/dev/uart/uart_cpu_arm64.c
Log:
Obey SPCR AccessWidth parameter.

The "access width" value was hard-coded as 2, indicating 32-bit accesses;
instead, use the value specified in the SPCR table.

This unbreaks the console on EC2 "A1" family instances.

Submitted by: Greg V
22/03/2019
1:43 am
base/head
cy
head/tools/build/mk
Modificado:
head/tools/build/mk/OptionalObsoleteFiles.inc
Log:
From r345400, remove the ippool rc script when ipfilter is not wanted
by the user.

PR: 218433
MFC after: 2 weeks
X-MFC with: r345400
22/03/2019
1:43 am
base/head
jhibbits
head/sys/powerpc/aim
Modificado:
head/sys/powerpc/aim/isa3_hashtb.c
head/sys/powerpc/aim/moea64_native.c
Log:
powerpc64: Handle the modern (2.05+) implementaiton of tlbie

By happenstance gcc4 puts 'vpn' into r0 in all uses of TLBIE(), but modern
gcc does not. Also, the single-argument form of tlbie zeros all unused
arguments, making the modern tlbie instruction use r0 as the RS field
(LPID).

The vpn argument has the bottom 12 bits cleared (the input having been
left-shifted by 12 bits), which just so happens, on the POWER9 and previous
incarnations, to be the number of LPID bits supported. With those bits
being zero, the instruction:

tlbie r0, r0

will invalidate the VPN in r0, in LPAR 0 (ignoring the upper bits of r0 for
the RS field). One build with gcc8 yields:

tlbie r9, r0

with r0 having arbitrary contents, not equal to r9. This leads to strange
crashes, behaviors, and panics, due to the requested TLB entry not actually
being invalidated.

As the moea64_native must work on both old and new, we explicitly zero out
r0 so that it can work with only the single argument, built with base gcc
and modern gcc. isa3_hashtb takes a different approach, encoding the
two-argument form, soas not to explicitly clobber r0, and instead let the
compiler decide.

Reported by: Brandon Bergren
Tested by: Brandon Bergren
MFC after: 1 week
22/03/2019
1:42 am
base/head
cy
head/libexec/rc/rc.d
Modificado:
head/libexec/rc/rc.d/Makefile
Log:
From r345400, connect ippool to the build/install.

PR: 218433
MFC after: 2 weeks
X-MFC with: r345400
22/03/2019
1:30 am
base/head
cy
in head/libexec/rc: . rc.d
Adicional:
head/libexec/rc/rc.d/ippool (contents, props changed)
Modificado:
head/libexec/rc/rc.conf
Log:
Add rc.d support for ippool(8).

I've been using ippool at my site for approximately two years. It's
about time this was committed.

PR: 218433
MFC after: 2 weeks
21/03/2019
9:45 pm
base/head
jkim
in head/share: examples/etc mk
Modificado:
head/share/examples/etc/make.conf
head/share/mk/bsd.cpu.mk
Log:
Catch up with Clang 8.0.
21/03/2019
9:43 pm
base/head
jkim
in head/share: examples/etc mk
Modificado:
head/share/examples/etc/make.conf
head/share/mk/bsd.cpu.mk
Log:
Catch up with Clang 7.0.

MFC after: 3 days
21/03/2019
9:14 pm
base/head
trasz
head/sys/dev/smartpqi
Modificado:
head/sys/dev/smartpqi/smartpqi_mem.c
Log:
Fix smartpqi(4) malloc tag and description to match the driver name.
No functional changes.

Reviewed by: sbruno
MFC after: 2 weeks
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D19625
21/03/2019
8:07 pm
base/head
markj
in head/sys/cddl/dev/dtrace: amd64 i386
Modificado:
head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Log:
Use an explicit comparison with VM_GUEST_NO.

Reported by: jhb
MFC with: r345359
Sponsored by: The FreeBSD Foundation
21/03/2019
7:52 pm
base/head
markj
in head/sys: amd64/amd64 i386/i386 vm
Modificado:
head/sys/amd64/amd64/pmap.c
head/sys/i386/i386/pmap.c
head/sys/vm/vm_fault.c
Log:
Disallow preemptive creation of wired superpage mappings.

There are some unusual cases where a process may cause an mlock()ed
range of memory to be unmapped. If the application subsequently
faults on that region, the handler may attempt to create a superpage
mapping backed by the resident, wired pages. However, the pmap code
responsible for creating such a mapping (pmap_enter_pde() on i386
and amd64) does not ensure that a leaf page table page is available
if the superpage is later demoted; the demotion operation must therefore
perform a non-blocking page allocation and must unmap the entire
superpage if the allocation fails. The pmap layer ensures that this
can never happen for wired mappings, and so the case described above
breaks that invariant.

For now, simply ensure that the MI fault handler never attempts to
create a wired superpage except via promotion.

Reviewed by: kib
Reported by: syzbot+292d3b0416c27c131505@syzkaller.appspotmail.com
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19670
21/03/2019
4:15 pm
base/head
glebius
head/sys/netpfil/ipfw
Modificado:
head/sys/netpfil/ipfw/ip_fw2.c
head/sys/netpfil/ipfw/ip_fw_pfil.c
head/sys/netpfil/ipfw/ip_fw_private.h
Log:
Always create ipfw(4) hooks as long as module is loaded.

Now enabling ipfw(4) with sysctls controls only linkage of hooks to default
heads. When module is loaded fetch sysctls as tunables, to make it possible
to boot with ipfw(4) in kernel, but not linked to any pfil(9) hooks.
21/03/2019
2:45 pm
base/head
cem
head/lib/libc/gen
Modificado:
head/lib/libc/gen/arc4random.3
Log:
arc4random: Adjust example code to use uniform() API

PR: 236678
Reported by: Andras Farkas
21/03/2019
2:17 pm
base/head
gjb
head/release/arm64
Modificado:
head/release/arm64/PINE64-LTS.conf
head/release/arm64/PINE64.conf
head/release/arm64/PINEBOOK.conf
head/release/arm64/RPI3.conf
Log:
Bump the IMAGE_SIZE for arm64 SoC images to prevent failures due
to full filesystem. This makes the size of the arm64 SoC images
consistent with armv6 and armv7.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
21/03/2019
1:30 pm
base/head
kib
head/sys/fs/nullfs
Modificado:
head/sys/fs/nullfs/null_vfsops.c
Log:
nullfs: fix unmounts when filesystem is active.

If vflush() did not completely flushed the mount vnodes queue, either
retry for forced unmounts, or give up for non-forced. This situation
can occur when new vnodes are instantiated while vflush() worked.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
21/03/2019
10:51 am
base/head
mw
head/sys/arm64/arm64
Modificado:
head/sys/arm64/arm64/nexus.c
Log:
Add bus_release_resource() method to nexus on arm64

The nexus module was missing method for releasing bus resources. As a
result, it couldn't be released and the bus_release_resource() call would
return ENXIO.

Next call to bus_alloc_resource() for the same resource was returning
error, because it wasn't released previously and it was still busy.

The implementation of the nexus_release_resource() is the same as for
arm architecture.

Submitted by: Michal Krawczyk
Reported-by: Greg V
Tested-by: cperciva, Greg V
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Differential revision: https://reviews.freebsd.org/D19641
21/03/2019
10:50 am
base/head
bz
head/sys/dev/sdhci
Modificado:
head/sys/dev/sdhci/sdhci.c
Log:
Whitespace cleanup in sdhci.c

No functional changes. Replace whitespace by tabs, indent with 4 spaces,
coalesce multi-line shorter than 80 characters,

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
21/03/2019
10:46 am
base/head
mw
head/sys/dev/ena
Modificado:
head/sys/dev/ena/ena.c
head/sys/dev/ena/ena.h
Log:
Prevent double activation of admin interrupt in ENA

The resource is already being activated in the bus_alloc_resource(),
because the flag RF_ACTIVE is being passed.

Double activation on arm64 is causing kernel panic.

Version of the driver was upgraded to 0.8.4.

Submitted by: Michal Krawczyk
Reported-by: Greg V
Tested-by: cperciva, Greg V
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Differential revision: https://reviews.freebsd.org/D19655
21/03/2019
10:23 am
base/head
bz
head/sys/dev/sdhci
Modificado:
head/sys/dev/sdhci/sdhci.h
Log:
Align struct sdhci_slot MMCCAM members.

Whitespace only, no functional change.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
21/03/2019
8:54 am
base/head
cperciva
head/sys/dev/uart
Modificado:
head/sys/dev/uart/uart_bus_pci.c
Log:
Recognize the Amazon PCI serial device found in a1.* EC2 instances
as an NS8250 UART.

This is the same as the UART found in EC2 "bare metal" instances,
except that the card vendor shows up as 0x0000 rather than 0x1d0f.
This seems like a bug in the EC2 firmware; but we might as well support
it anyway.

Reported by: Greg V
21/03/2019
8:51 am
base/head
trasz
head/share/man/man4
Modificado:
head/share/man/man4/Makefile
Log:
Attach the vmci(4) man page to the build. Looks like it's been
missed by mistake.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
21/03/2019
8:15 am
base/head
kp
head/tests/sys/netpfil/pf
Adicional:
head/tests/sys/netpfil/pf/sniffer.py (contents, props changed)
Modificado:
head/tests/sys/netpfil/pf/Makefile
head/tests/sys/netpfil/pf/pft_ping.py
Log:
pf tests: Move Sniffer to its own file

Make it easier to re-use the sniffer class in other test support
scripts.
21/03/2019
8:09 am
base/head
kp
head/sys/netpfil/pf
Modificado:
head/sys/netpfil/pf/pf.c
Log:
pf: Ensure that IP addresses match in ICMP error packets

States in pf(4) let ICMP and ICMP6 packets pass if they have a
packet in their payload that matches an exiting connection. It was
not checked whether the outer ICMP packet has the same destination
IP as the source IP of the inner protocol packet. Enforce that
these addresses match, to prevent ICMP packets that do not make
sense.

Reported by: Nicolas Collignon, Corentin Bayet, Eloi Vanderbeken, Luca Moro at Synacktiv
Obtained from: OpenBSD
Security: CVE-2019-5598
21/03/2019
6:47 am
base/head
imp
head/bin/date
Modificado:
head/bin/date/date.1
head/bin/date/date.c
Log:
Remove -n flag, fix setting date / time

r342139 bork setting the date. This fixes it by simply removing the -n
flag.

Differential Revision: https://reviews.freebsd.org/D19668
21/03/2019
6:31 am
base/head
oshogbo
head/contrib/elftoolchain/strings
Modificado:
head/contrib/elftoolchain/strings/strings.c
Log:
In case of ENCODING_8BIT the EOF code will be pass to putchar.
EOF check should be done before (uint8_t)c > 127 test.

Reported by: cem
21/03/2019
6:27 am
base/head
imp
head/sbin/camcontrol
Modificado:
head/sbin/camcontrol/fwdownload.c
Log:
Make WD and WDC aliases for HGST.

HGST was bought by WDC. Over the years, it has sold different drives
branded as HGST, WD or WDC. All of them need the HGST workaround of
sending 4k-sized packets (or multiples of 4k). And the ones that don't
really need this aren't broken by this change. Submitter is the vendor
who has tested these changes on a number of drives. I've simplified it
slightly, since we don't need additional vendors for this at this
time.

Submitted by: JacobBurley via github on behalf of WDC
Pull Request: https://github.com/freebsd/freebsd/pull/391
21/03/2019
6:20 am
base/head
oshogbo
head/contrib/elftoolchain/strings
Modificado:
head/contrib/elftoolchain/strings/strings.c
Log:
Fix powerpc and arm builds after r345361.

Reported by: jenkins
21/03/2019
5:24 am
base/head
oshogbo
head/contrib/elftoolchain/strings
Modificado:
head/contrib/elftoolchain/strings/strings.c
Log:
strings: do not continue if getc or getcharacter returns EOF

Reported by: cem
21/03/2019
5:00 am
base/head
oshogbo
head/contrib/elftoolchain/strings
Modificado:
head/contrib/elftoolchain/strings/strings.c
Log:
strings: do not depend on stdin

Instead of depending on one stdin FILE structure and use freopen(3), pass to
the functions appropriate FILE structure.

Reviewed by: cem
Discussed with: emaste
Differential Revision: https://reviews.freebsd.org/D18037
21/03/2019
2:52 am
base/head
markj
in head/sys/cddl/dev/dtrace: amd64 i386
Modificado:
head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
head/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Log:
Don't attempt to measure TSC skew when running as a VM guest.

It simply doesn't work in general since VCPUs may migrate between
physical cores. The approach used to measure skew also doesn't
make much sense in a VM.

PR: 218452
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
20/03/2019
11:35 pm
base/head
markj
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall
Modificado:
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c
Log:
Ensure that we use a 64-bit value for the last mmap() argument.

When using __syscall(2), the offset argument is passed on the stack on
amd64. Previously only 32 bits were written, so the upper 32 bits were
garbage and could cause the test to fail.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
20/03/2019
11:15 pm
base/head
asomers
in head: contrib/googletest/googletest
Adicional:
head/contrib/googletest/googletest/test/gtest_skip_test.cc
- copied unchanged from r345331, projects/fuse2/contrib/googletest/googletest/test/gtest_skip_test.cc
Modificado:
head/contrib/googletest/googletest/CMakeLists.txt
head/contrib/googletest/googletest/include/gtest/gtest-test-part.h
head/contrib/googletest/googletest/include/gtest/gtest.h
head/contrib/googletest/googletest/include/gtest/internal/gtest-internal.h
head/contrib/googletest/googletest/src/gtest-internal-inl.h
head/contrib/googletest/googletest/src/gtest-test-part.cc
head/contrib/googletest/googletest/src/gtest.cc
head/contrib/googletest/googletest/test/googletest-test-part-test.cc
head/contrib/googletest/googletest/test/gtest_all_test.cc
head/lib/googletest/gtest_main/tests/Makefile
Directory Properties:
head/ (props changed)
Log:
googletest: backport GTEST_SKIP to googletest 1.8.1

This commit backports revisions 00938b2b228f3b70d3d9e51f29a1505bdad43f1e and
59f90a338bce2376b540ee239cf4e269bf6d68ad from googletest's master branch to
our included version of googletest, which is based on 1.8.1. It adds the
GTEST_SKIP feature, which is very useful for a project like FreeBSD where
some tests depend on particular system configurations.

Reviewed by: ngie
Obtained from: github.com/google/googletest
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/rS345331
20/03/2019
11:11 pm
base/head
mckusick
head/sys/ufs/ffs
Modificado:
head/sys/ufs/ffs/ffs_softdep.c
Log:
This is an additional and hopefully final fix for bug report 230962.
This bug was introduced with the change to use softdep_bp_to_mp()
in January 2018 changes -r327723 and -r327821. The softdep_bp_to_mp()
function failed to include VSOCK as one of the valid cases.

Although local-domain sockets do not allocate blocks in the filesystem,
they will allocate blocks if they use extended attributes (such as
ACLs). Thus, softdep_bp_to_mp() needs to return a non-NULL mount
pointer when presented with a socket vnode so that the soft updates
write complete will properly process the soft updates structures
associated with the extended attribute blocks. It was the failure
to process these soft updates structures, thus leaving them hanging
off the buffer, which lead to the "panic: softdep_deallocate_dependencies:
dangling deps" when trying to clean up the buffer after it was written.

PR: 230962
Reported by: 2t8mr7kx9f@protonmail.com
Reviewed by: kib
Tested by: Peter Holm
MFC after: 1 week
Sponsored by: Netflix
20/03/2019
10:49 pm
base/head
bdrewery
head/sys/conf
Modificado:
head/sys/conf/kern.post.mk
Log:
Build common kernel dependencies before modules.

This ensures files like genassym.o and awk/mfiles are generated before
descending into the modules build. It may also allow some module builds
to not recreate files that are already present in the KERNBUILDDIR.

This fixes a rare build race where genassym.o is missing and assym.inc
is empty.

More work is planned around this to reduce some redundant dependency
generation in modules.

PR: 233339
MFC after: 2 weeks
Reported by: markj
20/03/2019
9:48 pm
base/head
asomers
in head: . lib/libjail sbin/mount_fusefs sys/conf
Adicional:
head/sys/modules/fusefs/
- copied from r345349, head/sys/modules/fuse/
Eliminado:
head/sys/modules/fuse/
Modificado:
head/UPDATING
head/lib/libjail/jail.c
head/sbin/mount_fusefs/mount_fusefs.c
head/sys/conf/NOTES
head/sys/conf/files
head/sys/conf/options
head/sys/fs/fuse/fuse.h
head/sys/fs/fuse/fuse_file.c
head/sys/fs/fuse/fuse_ipc.c
head/sys/fs/fuse/fuse_main.c
head/sys/fs/fuse/fuse_node.c
head/sys/fs/fuse/fuse_vfsops.c
head/sys/fs/fuse/fuse_vnops.c
head/sys/modules/Makefile
head/sys/modules/fusefs/Makefile
Log:
Rename fuse(4) to fusefs(4)

This makes it more consistent with other filesystems, which all end in "fs",
and more consistent with its mount helper, which is already named
"mount_fusefs".

Reviewed by: cem, rgrimes
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19649
20/03/2019
8:57 pm
base/head
dim
in head: contrib/llvm/tools/lld/ELF
Modificado:
head/contrib/llvm/tools/lld/ELF/Config.h
head/contrib/llvm/tools/lld/ELF/Driver.cpp
head/contrib/llvm/tools/lld/ELF/InputFiles.cpp
head/contrib/llvm/tools/lld/ELF/InputFiles.h
head/contrib/llvm/tools/lld/ELF/Options.td
head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp
head/contrib/llvm/tools/lld/ELF/SymbolTable.h
head/contrib/llvm/tools/lld/ELF/Writer.cpp
head/contrib/llvm/tools/lld/docs/ld.lld.1
head/lib/clang/include/lld/Common/Version.inc
Log:
Pull in r352826 from upstream lld trunk (by Fangrui Song):

[ELF] Support --{,no-}allow-shlib-undefined

Summary:
In ld.bfd/gold, --no-allow-shlib-undefined is the default when
linking an executable. This patch implements a check to error on
undefined symbols in a shared object, if all of its DT_NEEDED entries
are seen.

Our approach resembles the one used in gold, achieves a good balance
to be useful but not too smart (ld.bfd traces all DSOs and emulates
the behavior of a dynamic linker to catch more cases).

The error is issued based on the symbol table, different from
undefined reference errors issued for relocations. It is most
effective when there are DSOs that were not linked with -z defs (e.g.
when static sanitizers runtime is used).

gold has a comment that some system libraries on GNU/Linux may have
spurious undefined references and thus system libraries should be
excluded (https://sourceware.org/bugzilla/show_bug.cgi?id=6811). The
story may have changed now but we make --allow-shlib-undefined the
default for now. Its interaction with -shared can be discussed in the
future.

Reviewers: ruiu, grimar, pcc, espindola

Reviewed By: ruiu

Subscribers: joerg, emaste, arichardson, llvm-commits

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

Pull in r352943 from upstream lld trunk (by Fangrui Song):

[ELF] Default to --no-allow-shlib-undefined for executables

Summary:
This follows the ld.bfd/gold behavior.

The error check is useful as it captures a common type of ld.so
undefined symbol errors as link-time errors:

// a.cc => a.so (not linked with -z defs)
void f(); // f is undefined
void g() { f(); }

// b.cc => executable with a DT_NEEDED entry on a.so
void g();
int main() { g(); }

// ld.so errors when g() is executed (lazy binding) or when the program is started (-z now)
// symbol lookup error: ... undefined symbol: f

Reviewers: ruiu, grimar, pcc, espindola

Reviewed By: ruiu

Subscribers: llvm-commits, emaste, arichardson

Tags: #llvm

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

Together, these add support for --no-allow-shlib-undefined, and make it
the default for executables, so they will fail to link if any symbols
from needed shared libraries are undefined.

Reported by: jbeich
PR: 236062, 236141
MFC after: 1 month
X-MFC-With: r344779
20/03/2019
8:42 pm
base/head
markj
head/sys/conf
Modificado:
head/sys/conf/kern.post.mk
head/sys/conf/kmod.mk
Log:
Use -fdebug-prefix-map to map auto-generated kernel build paths.

The kernel build uses symlinks to make MD #includes like
work. Debug info ends up referencing these symlinks in a relative path,
so debuggers generally don't know how to find the corresponding headers.
Address this by using -fdebug-prefix-map to map relative paths through
the symlinks to their absolute paths in the source tree. This is
consistent with how regular source file paths are defined in the
kernel's debug info.

Also map the current directory to an absolute path to the object
directory. This gives debuggers a chance to find auto-generated files
like vnode_if.c if the object directory is available.

Reviewed by: emaste, jhb (previous version)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19633
20/03/2019
7:18 pm
base/head
dim
in head: contrib/llvm/tools/clang/lib/Basic
Modified: head/lib/clang/include/clang/Basic/Version.inc
20/03/2019
5:27 pm
base/head
np
in head/sys/dev/cxgbe: . common firmware tom
Modificado:
head/sys/dev/cxgbe/adapter.h
head/sys/dev/cxgbe/common/common.h
head/sys/dev/cxgbe/common/t4_hw.c
head/sys/dev/cxgbe/firmware/t4fw_interface.h
head/sys/dev/cxgbe/t4_main.c
head/sys/dev/cxgbe/t4_sched.c
head/sys/dev/cxgbe/t4_sge.c
head/sys/dev/cxgbe/tom/t4_cpl_io.c
head/sys/dev/cxgbe/tom/t4_listen.c
head/sys/dev/cxgbe/tom/t4_tom.c
Log:
cxgbe(4): Treat the viid as an opaque identifier.

Recent firmwares prefer to use a different format for viid internally
and this change allows them to do so.

MFC after: 1 week
Sponsored by: Chelsio Communications
20/03/2019
5:27 pm
base/head
mav
in head/sys/dev: ahci ichsmb
Modificado:
head/sys/dev/ahci/ahci_pci.c
head/sys/dev/ichsmb/ichsmb_pci.c
Log:
Add some Cannon Lake chipset IDs.

Submitted by: Dmitry Luhtionov
MFC after: 2 weeks
20/03/2019
5:21 pm
base/head
mav
head/sys/dev/sound/pci/hda
Modificado:
head/sys/dev/sound/pci/hda/hdac.c
head/sys/dev/sound/pci/hda/hdacc.c
Log:
Tune chipset naming.

Submitted by: Dmitry Luhtionov
MFC after: 2 weeks
20/03/2019
4:24 pm
base/head
emaste
head/stand/common
Modificado:
head/stand/common/load_elf.c
Log:
loader: fix loading of kernels with . in path

The loader indended to search the kernel file name (only) for . but
instead searched the entire path, so paths like
"boot/test.elfv2/kernel" would not work.

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: kevans
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19658
20/03/2019
1:07 pm
base/head
kib
head/sys/vm
Modificado:
head/sys/vm/vm_fault.c
Log:
vm_fault_copy_entry: accept invalid source pages.

Either msync(MS_INVALIDATE) or the object unlock during vnode
truncation can expose invalid pages backing wired entries. Accept
them, but do not install them into destrination pmap. We must create
copied pages in the copy case, because e.g. vm_object_unwire() expects
that the entry is fully backed.

Reported by: syzkaller, via emaste
Reported by: syzbot+514d40ce757a3f8b15bc@syzkaller.appspotmail.com
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19615
20/03/2019
10:36 am
base/head
vmaffione
head/tests/sys/netmap
Modificado:
head/tests/sys/netmap/ctrl-api-test.c
Log:
netmap: update unit tests

Revision r345269 introduced changes that triggered a regression on netmap
unit tests (tests/sys/netmap/ctrl-api-test.c).
This change updates the unit tests to remove the regression.

Reported by: lwhsu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19639
20/03/2019
10:11 am
base/head
ae
head/sys/netpfil/ipfw/nat64
Modificado:
head/sys/netpfil/ipfw/nat64/nat64lsn.c
Log:
Do not enter epoch section recursively.

A pfil hook is already invoked in NET_EPOCH section.
20/03/2019
10:06 am
base/head
ae
head/sys/netpfil/ipfw/nat64
Modificado:
head/sys/netpfil/ipfw/nat64/nat64lsn.c
Log:
Use NET_EPOCH instead of allocating separate one.

MFC after: 1 month
20/03/2019
7:40 am
base/head
avos
head/usr.bin/lockf
Modificado:
head/usr.bin/lockf/lockf.c
Log:
lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not
exist

Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.

Checked with a command from PR 210770:
lockf -n /tmp/doesnotexist echo; echo $?

PR: 210770
MFC after: 1 week
20/03/2019
7:24 am
base/head
cperciva
head/release/tools
Modificado:
head/release/tools/ec2.conf
Log:
Only install amazon-ssm-agent into amd64 AMIs.

This package does not exist on aarch64 at present.
20/03/2019
7:19 am
base/head
cperciva
head/release
Modificado:
head/release/Makefile.ec2
Log:
Pass --arm64 to bsdec2-image-upload when building ARM64 AMIs.

Future commits will allow the resulting EC2 AMIs to actually boot and
be usable.
19/03/2019
11:44 pm
base/head
erj
in head: share/man/man9 sys/net sys/sys
Modificado:
head/share/man/man9/sysctl.9
head/sys/net/iflib.c
head/sys/net/iflib.h
head/sys/sys/sysctl.h
Log:
iflib: mark isc_driver_version as constant

From Jake:
The iflib core never modifies the isc_driver_version string. Allow
drivers to safely assign pointers to constant buffers by marking this
parameter const.

Submitted by: Jacob Keller
Reviewed by: erj@, gallatin@, jhb@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19577
19/03/2019
9:46 pm
base/head
imp
head/sys/dev/pci
Modificado:
head/sys/dev/pci/pcivar.h
Log:
Fix two typos: an -> and; the the -> the

And justify the paragraph after the change (and set fill column to 80
instead of 70).

Noticed by: rpokala@, vangyzen@
19/03/2019
7:58 pm
base/head
wosch
head
Modificado:
head/Makefile.inc1
Log:
Improve english grammar for kernel built time

PR: 224433
Approved by: jhb
Differential Revision: https://reviews.freebsd.org/D19636
19/03/2019
7:11 pm
base/head
np
head/sys/dev/cxgbe/iw_cxgbe
Modificado:
head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
Log:
iw_cxgbe: Remove unused smac_idx from the ep structure.

Submitted by: Krishnamraju Eraparaju @ Chelsio
19/03/2019
6:07 pm
base/head
erj
head/sys/dev/ixgbe
Modificado:
head/sys/dev/ixgbe/if_ixv.c
Log:
ixv(4): Add missing IFLIB_IS_VF flag in iflib shared ctx

From Krzysztof:
The driver built as KLD cannot be unloaded, if this flag is not set.

Submitted by: Krzysztof Galazka
Reviewed by: shurd@, erj@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19402
19/03/2019
5:59 pm
base/head
erj
in head/sys: dev/e1000 dev/ixgbe dev/ixl net sys
Modificado:
head/sys/dev/e1000/if_em.c
head/sys/dev/ixgbe/if_ix.c
head/sys/dev/ixgbe/if_ixv.c
head/sys/dev/ixl/if_iavf.c
head/sys/dev/ixl/ixl_pf_main.c
head/sys/net/iflib.c
head/sys/net/iflib.h
head/sys/sys/param.h
Log:
iflib: expose the Rx mbuf buffer size to drivers

From Jake:
iflib_fl_setup calculates a suitable buffer size for the Rx mbufs based
on the isc_max_frame_size value that drivers setup. This calculation is
repeated by drivers when programming their hardware with the size of
each Rx buffer.

This can lead to a mismatch where the iflib mbuf size is different from
the expected size of the buffer as programmed by the hardware. This can
lead to unexpected results.

If iflib ever wants to support mbuf sizes larger than one page, every
driver must be updated to account for the new possible buffer sizes.

Fix this by calculating the mbuf size prior to calling IFDI_INIT, and
adding the iflib_get_rx_mbuf_sz function which will expose this value to
drivers, so that they do not repeat the same calculation.

Submitted by: Jacob Keller
Reviewed by: shurd@, erj@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19489
19/03/2019
5:49 pm
base/head
erj
head/sys/net
Modificado:
head/sys/net/iflib.c
Log:
iflib: prevent possible infinite loop in iflib_encap

From Jake:
iflib_encap calls bus_dmamap_load_mbuf_sg. Upon it returning EFBIG, an
m_collapse and an m_defrag are attempted to shrink the mbuf cluster to
fit within the DMA segment limitations.

However, if we call m_defrag, and then bus_dmamap_load_mbuf_sg returns
EFBIG on the now defragmented mbuf, we will continuously re-call
bus_dmamap_load_mbuf_sg over and over.

This happens because m_head isn't NULL, and remap is >1, so we don't try
to m_collapse or m_defrag again. The only way we exit the loop is if
m_head is NULL. However, m_head can't be modified by the call to
bus_dmamap_load_mbuf_sg, because we don't pass it as a double pointer.

I believe this will be an incredibly rare occurrence, because it is
unlikely that bus_dmamap_load_mbuf_sg will actually fail on the second
defragment with an EFBIG error. However, it still seems like
a possibility that we should account for.

Fix the exit check to ensure that if remap is >1, we will also exit,
even if m_head is not NULL.

Submitted by: Jacob Keller
Reviewed by: shurd@, gallatin@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19468
19/03/2019
5:38 pm
base/head
kevans
head/sbin/bectl
Modificado:
head/sbin/bectl/bectl_jail.c
Log:
bectl(8): change jail command to execute jail(8)

The jail(8) command provides a variety of jail pseudo-parameters that are
useful to consumers of bectl, mount.devfs being the most-often-requested
paramater by bectl users.

command, exec.start, nopersist, and persist may not be specified via -o to
bectl. The command/exec.start remains passed as it always has at the end of
bectl, and persistence is dictated by -b/-U bectl jail arguments.

Submitted by: Wes Maag
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19282
19/03/2019
3:42 pm
base/head
mmel
head/sys/dev/psci
Modificado:
head/sys/dev/psci/psci.c
head/sys/dev/psci/psci.h
Log:
PSCI: Don't take missing implementation of psci get_version() as fatal.
Minimalistic PSCI implementation in U-Boot doesn't implement get_version()
method for some SoC. In this case, use PSCI version declared by 'psci' node
in DT as fallback.

MFC after: 2 weeks
19/03/2019
3:03 pm
base/head
imp
head/sys/dev/pci
Modificado:
head/sys/dev/pci/pcivar.h
Log:
Add comment about why we bother to use endian macros here, and why we
must use bitfields.
19/03/2019
2:34 pm
base/head
mmel
head/sys/dev/cpufreq
Modificado:
head/sys/dev/cpufreq/cpufreq_dt.c
Log:
Improve cpufreq_dt.
- older DT can use 'cpu0-supply' property for power supply binding.
- don't expect that actual CPU frequency is contained in CPU
operational point table, but read current CPU voltage directly from
reguator. Typically, u-boot can set starting CPU frequency to any
value.

MFC after: 2 weeks
19/03/2019
2:32 pm
base/head
mmel
head/sys/arm/include
Modificado:
head/sys/arm/include/platformvar.h
Log:
Use named field's initializer when constructing _platform structure.
In current code, the delay argument in FDT_PLATFORM_DEF(2) improperly
initialize refs field from kobj_class structure instead of delay_count
field.
This causes not working DELAY() function (due to never initialized
delay_count) in earlier boot stages, until the first timer was attached.

MFC after: 2 weeks
19/03/2019
2:30 pm
base/head
mmel
in head/sys/dev/extres: phy regulator syscon
Modificado:
head/sys/dev/extres/phy/phy.c
head/sys/dev/extres/regulator/regulator.c
head/sys/dev/extres/syscon/syscon.c
Log:
extres: Unify error codes for _get_by_ofw_property() methods.
Return:
- ENOENT if requested property doesn't exist
- ENODEV if producer device is not (yet) attached
- ENXIO otherwise

MFC after: 2 weeks
19/03/2019
11:16 am
base/head
ae
head/sbin/ipfw
Modificado:
head/sbin/ipfw/nat64lsn.c
Log:
Remove extra spaces.

MFC after: 1 month
19/03/2019
10:29 am
base/head
ae
head/sys/net
Modificado:
head/sys/net/bpf.c
Log:
Convert allocation of bpf_if in bpfattach2 from M_NOWAIT to M_WAITOK
and remove possible panic condition.

It is already allowed to sleep in bpfattach[2], since BPF_LOCK was
converted to SX lock in r332388. Also move KASSERT() to the top of
function and make full initialization before bpf_if will be linked
to BPF's list of interfaces.

MFC after: 2 weeks
19/03/2019
6:58 am
base/head
dim
head/share/mk
Modificado:
head/share/mk/src.opts.mk
Log:
Turn on MK_OPENMP for i386 by default, now that it can build.

Noticed by: jbeich
PR: 236062, 236582
MFC after: 1 month
X-MFC-With: r344779
19/03/2019
2:45 am
base/head
mw
head/stand/common
Modificado:
head/stand/common/interp_forth.c
Log:
Add missing boot.4th verification

During initialization of the forth interpreter
the loader looks for "/boot/boot.4th"
and executes any code found there.
That file was loaded bypassing verification.
Add a call to verify_file to change that.

Submitted by: Kornel Duleba
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
19/03/2019
2:33 am
base/head
mw
head/sys/amd64/sgx
Modificado:
head/sys/amd64/sgx/sgx.c
Log:
Prevent loading SGX with incorrect EPC data

It may happen on some machines, that even if SGX is disabled
in firmware, the driver would still attach despite EPC base and
size equal zero. Such behaviour causes a kernel panic when the
module is unloaded. Add a simple check to make sure we
only attach when these values are correctly set.

Submitted by: Kornel Duleba
Reviewed by: br
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19595
19/03/2019
12:07 am
base/head
adrian
head/sys/contrib/dev/ath/ath_hal/ar9300
Modificado:
head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c
Log:
[ath_hal_ar9300] Add some comments around the AR9300 ANI code.

I'm refamiliarising myself with the behaviour of the ANI code and I thought
I'd drop some comments to remind myself.
18/03/2019
9:04 pm
base/head
dim
in head: contrib/openmp/runtime/src lib
Modificado:
head/contrib/openmp/runtime/src/kmp.h
head/contrib/openmp/runtime/src/kmp_runtime.cpp
head/lib/Makefile
Log:
Enable building libomp.so for 32-bit x86. This is done by selectively
enabling the functions that save and restore MXCSR, since access to this
register requires SSE support.

Note that you may run into other issues with OpenMP on i386, since this
*not* yet supported upstream, and certainly not extensively tested.

PR: 236062, 236582
MFC after: 1 month
X-MFC-With: r344779
18/03/2019
7:56 pm
base/head
dim
head/lib/libomp
Modificado:
head/lib/libomp/Makefile
Log:
Remove --as-needed from the linker flags for libomp.so, as these
actually prevent the transitive dependency on libm.

Reported by: jbeich
PR: 236062, 236581
MFC after: 1 month
X-MFC-With: r344779
18/03/2019
7:26 pm
base/head
emaste
in head/usr.sbin/makefs: . tests
Modificado:
head/usr.sbin/makefs/mtree.c
head/usr.sbin/makefs/tests/makefs_tests_common.sh
Log:
makefs: Fix "time" mtree attribute handling

When processing mtree(5) MANIFEST files, makefs(8) previously threw an
error if it encountered an entry whose "time" attribute contained a
non-zero subsecond component (e.g. time=1551620152.987220000).

Update the handling logic to properly assign the subsecond component if
built with nanosecond support, or silently discard it otherwise.

Also, re-enable the time attribute for the kyua tests.

PR: 194703
Submitted by: Mitchell Horne
Differential Revision: https://reviews.freebsd.org/D19627
18/03/2019
7:23 pm
base/head
emaste
head/sys/sys
Modificado:
head/sys/sys/stat.h
Log:
sys/stat.h: Improve timespec compatibility with other BSDs

OpenBSD and NetBSD provide macros to directly reference the underlying
struct timespec's tv_nsec member. While FreeBSD has such macros for
tv_sec, the others are missing. Add the following macros:

st->st_atimensec
st->st_mtimensec
st->st_ctimensec
st->st_birthtimensec

Adding these fields will provide programs which reference them better
portability to FreeBSD. An example of such a program is makefs(8),
which has unused support for subseconds that it has inherited from
NetBSD.

Submitted by: Mitchell Horne
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D19626
18/03/2019
7:11 pm
base/head
dim
head/lib/libomp
Modificado:
head/lib/libomp/Makefile
Log:
Also explicitly link libomp.so against -lm, as it transitively depends
on scalbn and a few other math functions, via libcompiler-rt. This
should allow OpenMP programs to link with BFD linkers too.

Reported by: jbeich
PR: 236062, 236581
MFC after: 1 month
X-MFC-With: r344779
18/03/2019
3:45 pm
base/head
lidl
head/contrib/blacklist/bin
Modificado:
head/contrib/blacklist/bin/blacklistd.c
Log:
Fixup syslog() call that should have used logging function pointer

PR: 236614
Submitted by: Helge Oldach
18/03/2019
2:00 pm
base/head
ae
in head: sbin/ipfw sys/conf sys/modules/ipfw_nat64
Modificado:
head/sbin/ipfw/ipfw.8
head/sbin/ipfw/ipfw2.h
head/sbin/ipfw/nat64lsn.c
head/sys/conf/files
head/sys/modules/ipfw_nat64/Makefile
head/sys/netinet6/ip_fw_nat64.h
head/sys/netpfil/ipfw/nat64/nat64lsn.c
head/sys/netpfil/ipfw/nat64/nat64lsn.h
head/sys/netpfil/ipfw/nat64/nat64lsn_control.c
Log:
Revert r345274. It appears that not all 32-bit architectures have
necessary CK primitives.
18/03/2019
12:41 pm
base/head
gallatin
head/sys/kern
Modificado:
head/sys/kern/kern_resource.c
Log:
Fix a typo introduced in r344133

The line was misedited to change tt to st instead of
changing ut to st.

The use of st as the denominator in mul64_by_fraction() will lead
to an integer divide fault in the intr proc (the process holding
ithreads) where st will be 0. This divide by 0 happens after
the total runtime for all ithreads exceeds 76 hours.

Submitted by: bde
18/03/2019
12:22 pm
base/head
vmaffione
in head/sys: dev/netmap net
Modificado:
head/sys/dev/netmap/netmap.c
head/sys/dev/netmap/netmap_legacy.c
head/sys/dev/netmap/netmap_mem2.c
head/sys/net/netmap.h
head/sys/net/netmap_legacy.h
head/sys/net/netmap_user.h
Log:
netmap: add support for multiple host rings

Some applications forward from/to host rings most or all the
traffic received or sent on a physical interface. In this
cases it is desirable to have more than a pair of RX/TX host
rings, and use multiple threads to speed up forwarding.
This change adds support for multiple host rings. On registering
a netmap port, the user can specify the number of desired receive
and transmit host rings in the nr_host_tx_rings and nr_host_rx_rings
fields of the nmreq_register structure.

MFC after: 2 weeks
18/03/2019
10:50 am
base/head
ae
in head: sbin/ipfw sys/netinet6 sys/netpfil/ipfw/nat64
Modificado:
head/sbin/ipfw/nat64lsn.c
head/sbin/ipfw/nat64stl.c
head/sys/netinet6/ip_fw_nat64.h
head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c
head/sys/netpfil/ipfw/nat64/ip_fw_nat64.h
head/sys/netpfil/ipfw/nat64/nat64_translate.c
head/sys/netpfil/ipfw/nat64/nat64_translate.h
head/sys/netpfil/ipfw/nat64/nat64lsn.c
head/sys/netpfil/ipfw/nat64/nat64lsn.h
head/sys/netpfil/ipfw/nat64/nat64lsn_control.c
head/sys/netpfil/ipfw/nat64/nat64stl.c
head/sys/netpfil/ipfw/nat64/nat64stl.h
head/sys/netpfil/ipfw/nat64/nat64stl_control.c
Log:
Add SPDX-License-Identifier and update year in copyright.

MFC after: 1 month
18/03/2019
10:39 am
base/head
ae
in head: sbin/ipfw sys/netinet6 sys/netpfil/ipfw
Modificado:
head/sbin/ipfw/ipfw.8
head/sbin/ipfw/ipfw2.h
head/sbin/ipfw/nat64lsn.c
head/sbin/ipfw/nat64stl.c
head/sys/netinet6/ip_fw_nat64.h
head/sys/netpfil/ipfw/ip_fw_pfil.c
head/sys/netpfil/ipfw/nat64/ip_fw_nat64.c
head/sys/netpfil/ipfw/nat64/ip_fw_nat64.h
head/sys/netpfil/ipfw/nat64/nat64_translate.c
head/sys/netpfil/ipfw/nat64/nat64_translate.h
head/sys/netpfil/ipfw/nat64/nat64lsn.c
head/sys/netpfil/ipfw/nat64/nat64lsn.h
head/sys/netpfil/ipfw/nat64/nat64lsn_control.c
head/sys/netpfil/ipfw/nat64/nat64stl.c
head/sys/netpfil/ipfw/nat64/nat64stl.h
head/sys/netpfil/ipfw/nat64/nat64stl_control.c
Log:
Modify struct nat64_config.

Add second IPv6 prefix to generic config structure and rename another
fields to conform to RFC6877. Now it contains two prefixes and length:
PLAT is provider-side translator that translates N:1 global IPv6 addresses
to global IPv4 addresses. CLAT is customer-side translator (XLAT) that
algorithmically translates 1:1 IPv4 addresses to global IPv6 addresses.
Use PLAT prefix in stateless (nat64stl) and stateful (nat64lsn)
translators.

Modify nat64_extract_ip4() and nat64_embed_ip4() functions to accept
prefix length and use plat_plen to specify prefix length.

Retire net.inet.ip.fw.nat64_allow_private sysctl variable.
Add NAT64_ALLOW_PRIVATE flag and use "allow_private" config option to
configure this ability separately for each NAT64 instance.

Obtained from: Yandex LLC
MFC after: 1 month
Sponsored by: Yandex LLC
18/03/2019
5:03 am
base/head
markj
head/sys/ufs/ufs
Modificado:
head/sys/ufs/ufs/ufs_bmap.c
head/sys/ufs/ufs/ufs_extern.h
head/sys/ufs/ufs/ufs_vnops.c
Log:
Revert r345244 for now.

The code which advances the block number is simplistic and is not
correct when the starting offset is non-zero. Revert the change until
this is fixed.
18/03/2019
2:40 am
base/head
avos
head/sys/net80211
Modificado:
head/sys/net80211/ieee80211_ht.c
Log:
net80211: correct check for SMPS node flags updates

Update node flags when driver supports SMPS, not when it is disabled or
in dynamic mode ((iv_htcaps & HTCAP_SMPS) != 0).

Checked with RTL8188EE (1T1R), STA mode - 'smps' word should disappear
from 'ifconfig wlan0' output.

MFC after: 2 weeks
17/03/2019
10:26 pm
base/head
grog
head/usr.bin/calendar/calendars
Modificado:
head/usr.bin/calendar/calendars/calendar.australia
Log:
Change date of Canberra Day, now on second Monday in March.
https://en.wikipedia.org/wiki/Canberra_Day
17/03/2019
6:31 pm
base/head
kib
head/sys/i386/i386
Modificado:
head/sys/i386/i386/exception.s
Log:
i386: improve detection of the fast page fault assist.

In particular, check that we are assisting the page fault from kernel mode.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
17/03/2019
6:06 pm
base/head
markj
head/sys/ufs/ufs
Modificado:
head/sys/ufs/ufs/ufs_bmap.c
Log:
Fix the gcc build (-Wstrict-prototypes) after r345244.

Reported by: jenkins
MFC with: r345244
17/03/2019
5:34 pm
base/head
markj
head/sys/ufs/ufs
Modificado:
head/sys/ufs/ufs/ufs_bmap.c
head/sys/ufs/ufs/ufs_extern.h
head/sys/ufs/ufs/ufs_vnops.c
Log:
Optimize lseek(SEEK_DATA) on UFS.

The old implementation, at the VFS layer, would map the entire range of
logical blocks between the starting offset and the first data block
following that offset. With large sparse files this is very
inefficient. The VFS currently doesn't provide an interface to improve
upon the current implementation in a generic way.

Add ufs_bmap_seekdata(), which uses the obvious algorithm of scanning
indirect blocks to look for data blocks. Use it instead of
vn_bmap_seekhole() to implement SEEK_DATA.

Reviewed by: kib, mckusick
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19598
17/03/2019
11:27 am
base/head
dim
head/lib/libomp
Modificado:
head/lib/libomp/Makefile
Log:
Explicitly link libomp.so against -lpthread, as it depends on pthread
functionality. This should make example OpenMP programs work out of the
box.

Reported by: jbeich
PR: 236062, 236581
MFC after: 1 month
X-MFC-With: r344779
17/03/2019
9:31 am
base/head
bz
head/libexec/rc
Modificado:
head/libexec/rc/network.subr
Log:
Fix legacy IP autoconfiguration.

It seems my subconcious plan in r345088 to not only prefer IPv6 autoconf
but to also slowly deteriorate legacy IP auto-configuration was uncovered
way too early.

In case IPv6 is a thing yet ipv6_autoconfif was not true, we would not
bring up the interface yet tell the follow-up DHCPv4 configuration in
ifconfig_up() that we did. So unless you were doing SYNCDHCP or IPv6
you would not get legacy-IP DHCPv4 configuration.

I see multiple problems here: (a) people not yet using IPv6 (obviously a
problem), and (b) the dhclient startup script not running dhclient in
that case despite configured to do so (needs to be investigated seperately).

Reported by: Pawel Biernacki (pawel.biernacki gmail.com)
Tested by: Pawel Biernacki
Differential Revision: https://reviews.freebsd.org/D19488
Pointyhat to: bz (not sure if it is for breaking or
for letting them notice it so easily)
17/03/2019
4:33 am
base/head
jhibbits
head/sys/dev/fdt
Modificado:
head/sys/dev/fdt/fdt_slicer.c
Log:
fdt: Explicitly mark fdt_slicer as dependent on geom_flashmap

Without this dependency relationship, the linker doesn't find the
flash_register_slicer() function, so kldload fails to load fdt_slicer.ko.

Discussed with: ian@
16/03/2019
8:02 pm
base/head
wosch
head
Modificado:
head/Makefile.inc1
Log:
`make buildkernel' should display the build time in seconds

PR: 224433
Approved by: cem
Differential Revision: https://reviews.freebsd.org/D13910
16/03/2019
5:55 pm
base/head
dim
head/lib
Modificado:
head/lib/Makefile
Log:
Disable lib/libomp build for the 32-bit part of amd64 buildworld, as it
is not supported for that target.

Reported by: Michael Butler
PR: 236062
MFC after: 1 month
X-MFC-With: r344779
16/03/2019
1:42 pm
base/head
dim
head/contrib/openmp
Directory Properties:
head/contrib/openmp/ (props changed)
Log:
Bootstrap svn:mergeinfo on contrib/openmp.

PR: 236062
MFC after: 1 month
X-MFC-With: r344779
16/03/2019
3:45 pm
base/head
dim
in head: gnu/lib lib share/man/man5 share/mk sys/sys
Adicional:
head/tools/build/options/WITHOUT_OPENMP (contents, props changed)
head/tools/build/options/WITH_OPENMP (contents, props changed)
Modificado:
head/gnu/lib/Makefile
head/lib/Makefile
head/share/man/man5/src.conf.5
head/share/mk/src.opts.mk
head/sys/sys/param.h
head/tools/build/mk/OptionalObsoleteFiles.inc
Log:
Connect lib/libomp to the build.

* Set MK_OPENMP to yes by default only on amd64, for now.
* Bump __FreeBSD_version to signal this addition.
* Ensure gcc's conflicting omp.h is not installed if MK_OPENMP is yes.
* Update OptionalObsoleteFiles.inc to cope with the conflicting omp.h.
* Regenerate src.conf(5) with new WITH/WITHOUT fragments.

Relnotes: yes
PR: 236062
MFC after: 1 month
X-MFC-With: r344779
16/03/2019
11:46 am
base/head
kib
head/usr.bin/proccontrol
Modificado:
head/usr.bin/proccontrol/proccontrol.c
Log:
proccontrol(1): Add kpti control mode.

Requested by: jhb
Reviewed by: jhb, markj (previous version)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19514
16/03/2019
11:31 am
base/head
kib
in head/sys: amd64/amd64 amd64/include arm/arm arm64/arm64
Modificado:
head/sys/amd64/amd64/pmap.c
head/sys/amd64/amd64/vm_machdep.c
head/sys/amd64/include/proc.h
head/sys/arm/arm/vm_machdep.c
head/sys/arm64/arm64/vm_machdep.c
head/sys/i386/i386/vm_machdep.c
head/sys/kern/kern_exec.c
head/sys/kern/kern_thread.c
head/sys/mips/mips/vm_machdep.c
head/sys/powerpc/powerpc/vm_machdep.c
head/sys/riscv/riscv/vm_machdep.c
head/sys/sparc64/sparc64/vm_machdep.c
head/sys/sys/proc.h
Log:
amd64: Add md process flags and first P_MD_PTI flag.

PTI mode for the process pmap on exec is activated iff P_MD_PTI is set.

On exec, the existing vmspace can be reused only if pti mode of the
pmap matches the P_MD_PTI flag of the process. Add MD
cpu_exec_vmspace_reuse() callback for exec_new_vmspace() which can
vetoed reuse of the existing vmspace.

MFC note: md_flags change struct proc KBI.

Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19514
16/03/2019
11:16 am
base/head
kib
head/sys/amd64/amd64
Modificado:
head/sys/amd64/amd64/pmap.c
Log:
amd64: fix switching to the pmap with pti disabled.

When the pmap with pti disabled (i.e. pm_ucr3 == PMAP_NO_CR3) is
activated, tss.rsp0 was not updated. Any interrupt that happen before
next context switch would use pti trampoline stack for hardware frame
but fault and interrupt handlers are not prepared to this. Correctly
update tss.rsp0 for both PMAP_NO_CR3 and pti pmaps.

Note that this case, pti = 1 but pmap->pm_ucr3 == PMAP_NO_CR3 is not
used at the moment.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19514
16/03/2019
11:12 am
base/head
kib
head/sys/amd64/amd64
Modificado:
head/sys/amd64/amd64/cpu_switch.S
Log:
amd64: rewrite cpu_switch.S fragment to reload tss.rsp0 on context switch.

New code avoids jumps.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19514

Open in new window