HardenedBSD/hardenedbsd a906febsys/vm vm_unix.c

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
+0-51 files

HardenedBSD/hardenedbsd 887d9e4lib/libcasper/services/cap_sysctl cap_sysctl.c cap_sysctl.3, lib/libcasper/services/cap_sysctl/tests sysctl_test.c

Merge remote-tracking branch 'origin/freebsd/current/master' into hardened/current/master

        sys/vm/vm_unix.c (unresolved)

LLVM/llvm 369271lld/trunk/ELF Relocations.cpp, lld/trunk/test/ELF x86-64-dyn-rel-error.s

[ELF] Simplify processRelocAux and allow a corner-case error

After D66007/r369262, if the control flow reaches `if (sym.isUndefined())`, we know:

* The relocation is not a link-time constant => symbol is preemptable => Undefined or 
* Not an undef weak.
* -no-pie.
* The symbol type is neither STT_OBJECT nor STT_FUNC.

ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o can satisfy
these conditions. Delete the isUndefined() test so that we error
`symbol '...' has no type`, because we don't know the type to make the
decision to create copy relocation/canonical PLT.

LLVM/llvm 369270libcxx/trunk/include memory

[libc++] reverts commit a5f5aad568bb7a91ceee47641f3076ac339ef8c7.

The commit being reverted caused segfaults when building
with libc++ and GCC (and possibly other configurations).

Differential Revision: https://reviews.llvm.org/D62868
+260-1101 files

LLVM/llvm 369269llvm/trunk/lib/Support/Windows Path.inc, llvm/trunk/unittests/Support Path.cpp

Filesystem/Windows: fix inconsistency in readNativeFileSlice API

The windows version implementation of readNativeFileSlice, was trying to
match the POSIX behavior of not treating EOF as an error, but it was
only handling the case of reading from a pipe. Attempting to read past
the end of a regular file returns a slightly different error code, which
needs to be handled too. This patch adds ERROR_HANDLE_EOF to the list of
error codes to be treated as an end of file, and adds some unit tests
for the API.

This issue was found while attempting to land D66224, which caused a bunch of
lldb tests to start failing on windows.

Reviewers: rnk, aganea

Subscribers: kristina, llvm-commits

Tags: #llvm

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

FreeBSD/ports 509291head/databases/postgis25 pkg-plist distinfo

- Update to 2.5.3
- Whitespace fix
- Fix incorrect substitutions and sorting in plist

PR:            239908
Submitted by:   amdmi3
Approved by:    lbartoletti at tuxfamily.org (maintainer)

FreeBSD/ports 509290head/devel/boost-docs pkg-plist distinfo, head/devel/boost-jam Makefile

devel/boost-*: update to 1.71.0

Changes:        http://www.boost.org/users/history/version_1_71_0.html
PR:            238827
Exp-run by:     antoine
Differential Revision:  https://reviews.freebsd.org/D20774

Illumos/gate 4c63bf6usr/src/lib/libzfs/common libzfs_pool.c

11558 libzfs: allow device removal feature for root pool
Reviewed by: Andy Fiddaman <andy at omniosce.org>
Reviewed by: Jerry Jelinek <jerry.jelinek at joyent.com>
Approved by: Dan McDonald <danmcd at joyent.com>

Illumos/gate 4c52839usr/src/boot/lib/libstand printf.c

11565 loader: this statement may fall through
Reviewed by: Andrew Stormont <andyjstormont at gmail.com>
Reviewed by: Robert Mustacchi <robert.mustacchi at joyent.com>
Approved by: Dan McDonald <danmcd at joyent.com>

Illumos/gate 05876afusr/src/common/bzip2 bzlib.c

11566 bzip2: unused parameter 'opaque'
Reviewed by: Robert Mustacchi <rm at joyent.com>
Approved by: Dan McDonald <danmcd at joyent.com>

OpenBSD/ports WeHp70zwww/apache-httpd Makefile, www/apache-httpd/patches patch-server_mpm_unix_c patch-docs_conf_httpd_conf_in

   MFC update to apache-httpd 2.4.41;

   CVE-2019-10081: mod_http2, memory corruption on early pushes
   CVE-2019-10082: mod_http2, read-after-free in h2 connection shutdown
   CVE-2019-10092: Limited cross-site scripting in mod_proxy
   CVE-2019-10097: mod_remoteip stack buffer overflow and NULL pointer dereference
   CVE-2019-10098: mod_rewrite configurations vulnerable to open redirect
   CVE-2019-9517: mod_http2, DoS attack by exhausting h2 workers

Illumos/gate db8c8c3usr/src/boot/sys/boot/libficl Makefile.com

11567 loader: ficl vm.o volatile argument warning
Reviewed by: Andrew Stormont <andyjstormont at gmail.com>
Approved by: Dan McDonald <danmcd at joyent.com>

OpenBSD/ports zcpKHqFtextproc/p5-PDF-API2 distinfo Makefile

   update to p5-PDF-API2-2.035

OpenBSD/ports tqIWoxynet/icinga/web2 Makefile distinfo, net/icinga/web2/pkg PLIST

   update to icinga-web2 2.7.1

OpenBSD/ports P1krMXidevel/ccache Makefile distinfo

   update to ccache-3.7.3
+4-42 files

LLVM/llvm 369268llvm/trunk/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/trunk/test/CodeGen/X86 srem-seteq-vec-nonsplat.ll

[TargetLowering] x s% C == 0 fold: vector divisor with INT_MIN handling

The general fold is only valid for positive divisors.
Which effectively means, it is invalid for `INT_MIN` divisors,
and we currently bailout if we see them.

But that is too strict, we can just fix-up the results.
For that, let's do a second computation 'in parallel':
Name: srem -> and
Pre: isPowerOf2(C)
%o = srem i8 %X, C
%r = icmp eq %o, 0
%n = and i8 %X, C-1
%r = icmp eq %n, 0

And then just blend results: if the divisor was `INT_MIN`,
pick the value we got via bit-test,
else pick the value from general fold.

There's interesting observation - `ISD::ROTR` is set to

    [14 lines not shown]

DragonFlyBSD/src fb9bceesbin/hammer2 hammer2.8

sbin/hammer2: Minor fix in man

Correct d371ccd28ada846c26eb398d4f4798fd4a74d47d.

LLVM/llvm 369267lldb/trunk/unittests/Utility CompletionRequestTest.cpp

[lldb][NFC] Stop using GetNumberOfMatches in CompletionRequest test

This function is just a wrapper for GetNumberOfResults and will
be removed soon. This patch just changes all calls to GetNumberOfResults
where possible (which is currently just the unit test).

LLVM/llvm 369266llvm/trunk/lib/Target/AArch64 AArch64InstructionSelector.cpp

[nfc] Silent gcc warning

OpenBSD/ports WKEKvvcmail/kopano/core Makefile, mail/kopano/core/patches patch-Makefile_in

   do not explicitly link libstdc++

   found by naddy@

FreeBSD/ports 509289head/ports-mgmt/portfmt Makefile distinfo

ports-mgmt/portfmt: Update to latest commit


DragonFlyBSD/src 157f2a2lib/libdmsg dmsg.h msg.c

lib/libdmsg: Fix compile warning on Linux distros

Appeared since 030e3428e0c23c47cef4dfab51f988a8fa665d19.

msg.c:202: warning: pointer targets in passing argument 1 of 'atomic_set_int' differ in 
atomic.h:129: note: expected 'volatile u_int *' but argument is of type 'int *'

NetBSD/pkgsrc-wip 5981af9cannonball distinfo Makefile, cannonball/files cannonball.6

cannonball: Updates to the latest github commit.

Upstream merged local patches, they have been removed and version
has been updated.

LLVM/llvm 369265llvm/trunk/tools/llvm-objdump COFFDump.cpp

[llvm-objdump] - Restore lost comment.

It was removed by mistake in r369263 (D66417).

LLVM/llvm 369264llvm/trunk/test/CodeGen/X86 avx512-intel-ocl.ll avx512-nontemporal.ll

Automatically generate AVX512 test cases. NFC

FreeBSD/src 351218head/sys/arm/ti ti_sdhci.c

ti: sdhci: Correct voltage caps

ti,dual-volt property say that the eMMC support 1.8V and 3.3V not 3.0V
Use the correct caps for the mmc stack.
Note that the MMCHS_SD_CAPA register can only be written once after bootup
so if one is using a u-boot compiled with eMMC support (this is the default)
this code is a no-op but just in case someone have u-boot compiled without
eMMC support this make eMMC works when the kernel is booted.

MFC after:      1 week

LLVM/llvm 369263llvm/trunk/include/llvm/Object COFF.h, llvm/trunk/lib/Object COFFObjectFile.cpp

[Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI.

There are 4 methods that return std::error_code now,
though they do not have to because they are always succeed.
I refactored them.

This allows to simplify the code in tools a bit.

NetBSD/src lM9zBnrdoc CHANGES-8.2

   Tickets #1339 and #1340
+13-11 files

LLVM/llvm 369262lld/trunk/ELF Relocations.cpp, lld/trunk/test/ELF copy-rel-pie-error.s copy-rel-pie2.s

[ELF] Move (copy relocation/canonical PLT) before error checking

In processRelocAux(), we handle errors before copy relocation/canonical PLT.
This makes error checking a bit complex because we have to check for
conditions that will be allowed by copy relocation/canonical PLT.

Instead, move copy relocation/canonical PLT before error checking. This
simplifies the previous clumsy error checking code

`config->shared || (config->pie && expr == R_ABS && type != target->symbolicRel)`

to the simple `config->isPic`. Some diagnostics can be reported in
different ways. The code motion changes diagnostics for some contrived
test cases:

* copy-rel-pie-error.s -> copy-rel-pie2.s:
  It was rejected before but accepted now. ld.bfd also accepts the case.
* copy-errors.s: "cannot preempt symbol" changes to "symbol 'bar' has no type"
* got32{,x}-i386.s: the suggestion changes from "-fPIC or -Wl,-z,notext" to "-fPIE"
* x86-64-dyn-rel-error5.s: one diagnostic changes for -pie case

Reviewed By: peter.smith

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

FreeBSD/src 351217head/sys/arm/mv a37x0_gpio.c

arm64: a37x0_gpio: Use syscon instead of MMIO region

The fdt node for this driver is a simple-mfd and syscon compatible one
meaning that simplemfd will be the driver attached for it. The gpio driver
is attached to the 'gpio' subnode so use syscon_get_handle_default to
obtain the handle of the syscon from the parent device and use this
to read/write to the memory region.

MFC after:      1 week

NetBSD/src MQr41i2sys/netinet6 nd6.c

   Pull up following revision(s) (requested by ozaki-r in ticket #1340):

        sys/netinet6/nd6.c: revision 1.257

   Add missing IFNET_LOCK for regen_tmpaddr
   Reported by ryo@
+7-31 files

NetBSD/src FjMpO4ysys/net if.c, tests/net/if t_ifconfig.sh

   Pull up following revision(s) (requested by ozaki-r in ticket #1339):

        sys/net/if.c: revision 1.458
        tests/net/if/t_ifconfig.sh: revision 1.21

   Restore if_ioctl on error of ifc_destroy

   Otherwise subsequence ioctls won't work.

   Patch from Harold Gutch on PR kern/54434 (tweaked a bit by me)
   tests: check if ifconfig (ioctl) works after a failure of ifconfig destroy

   This is a test for PR kern/54434.
+21-42 files

FreeBSD/src 351216head/sbin/ping6 ping6.c

ping6: revert r350857

Some socket options require root privileges to set.  The old code did indeed
drop privileges at the earliest opportunity.

Submitted by:   Ján Sučan <sucanjan at gmail.com>
MFC after:      Never
Sponsored by:   Google, Inc. (Google Summer of Code 2019)
Differential Revision:  https://reviews.freebsd.org/D21319

LLVM/llvm 369261llvm/trunk/lib/CodeGen PeepholeOptimizer.cpp, llvm/trunk/lib/Target/PowerPC PPCInstrVSX.td

[PeepholeOptimizer] Don't assume bitcast def always has input

If we have a MI marked with bitcast bits, but without input operands,
PeepholeOptimizer might crash with assert.

If we apply the changes in PPCInstrVSX.td as in this patch:

[(set v4i32:$XT, (bitconvert (v16i8 immAllOnesV)))]>;

We will get assert in PeepholeOptimizer.

llvm-lit llvm-project/llvm/test/CodeGen/PowerPC/build-vector-tests.ll -v

llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:417: const
llvm::MachineOperand &llvm::MachineInstr::getOperand(unsigned int)
const: Assertion `i < getNumOperands() && "getOperand() out of range!"'

The fix is to abort if we found out of bound access.

Reviewers: qcolombet, MatzeB, hfinkel, arsenm

    [9 lines not shown]

FreeBSD/src 351215head/sys/kern vfs_mount.c

vfs: fix up r351193 ("stop always overwriting ->mnt_stat in VFS_STATFS")

fs-specific part of vfs_statfs routines only fill in small portion of the
structure. Previous code was always copying everything at a higher layer to
acoomodate it and this patch does the same.

'df' (no arguments) worked fine because the caller uses mnt_stat itself as the
target buffer, making all the copying a no-op for its own case.
'df /' and similar use a different consumer which passes its own buffer and
this is where you can run into trouble.

Reported by:    cy
Fixes: r351193
Sponsored by:   The FreeBSD Foundation

NetBSD/src Nr6GIjOsys/ufs/ufs ufs_extattr.c

   - KNF more
   - print the full path in error messages
+19-201 files

LLVM/llvm 369260lld/trunk/ELF/Arch Hexagon.cpp

[ELF][Hexagon] Improve error message for unknown relocations

Like rLLD354040

Previously, for unknown relocation types, in -no-pie/-pie mode, we got something like:

    foo.o: unrecognized relocation ...

In -shared mode:

    error: can't create dynamic relocation ... against symbol: yyy in readonly segment

Delete the default case from Hexagon::getRelExpr and add the error there. We will get 
consistent error message like `error: unknown relocation (1024) against symbol foo`

Reviewed By: sidneym

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

DragonFlyBSD/src 7b6e314sbin/hammer2 cmd_debug.c

sbin/hammer2: Fix compile warning on Linux distros

cmd_debug.c: In function 'show_bref':
cmd_debug.c:812: warning: pointer targets in passing argument 2 of 'CountFreeBlocks' 
differ in signedness
cmd_debug.c:42: note: expected 'hammer2_off_t *' but argument is of type 'int64_t *'
cmd_debug.c:812: warning: pointer targets in passing argument 3 of 'CountFreeBlocks' 
differ in signedness
cmd_debug.c:42: note: expected 'hammer2_off_t *' but argument is of type 'int64_t *'

cmd_debug.c: In function 'cmd_hash':
cmd_debug.c:890: warning: pointer targets in passing argument 1 of 'dirhash' differ in 

FreeNAS/freenas 2e6c8f4src/middlewared/middlewared main.py, src/middlewared/middlewared/etc_files/local nslcd.conf

Merge branch 'master' into freenas/12-devel

FreeBSD/ports 509288head/Mk bsd.sites.mk

Mk/bsd.sites.mk: Fix fetch with GL_TUPLE site:account:project:commit:group style entries

Something like


fails to fetch because GL_SITE_calculate still has the colon left after parsing:

=> Attempting to fetch 
parse error

$ make -V GL_SITE_calculate

Changing the already complex regular expressions to correct this
would make them even more complex.  Instead we correct the :: that
appears in GL_SITE after parsing GL_TUPLE.

Approved by:    portmgr (mat)
Differential Revision:  https://reviews.freebsd.org/D21171

DragonFlyBSD/src abe1090usr.sbin/fstyp hammer2.c

usr.sbin/fstyp: Fix compile warning on Linux distros

Ondisk inode's filename[] is of unsigned char.

hammer2.c: In function '__read_label':
hammer2.c:123: warning: pointer targets in passing argument 2 of 'strncpy' differ in 

FreeBSD/ports 509287head/devel/elixir-excoveralls distinfo Makefile

Update to 0.11.2.

OpenBSD/src qmX4e4jlib/libcrypto/man X509_INFO_new.3 X509_new.3

OpenBSD/src JGyJCvqetc/signify openbsd-67-syspatch.pub

   add 6.7 syspatch key

OpenBSD/ports jZzz3Lywww/nginx Makefile

   enable the http dav module;

   from Mark Patruck
+4-11 files

LLVM/llvm 369259cfe/trunk/lib/CodeGen CGLoopInfo.cpp CGLoopInfo.h, cfe/trunk/test/CodeGen loop-info-asan.c

Don't keep stale pointers to LoopInfos.

CGLoopInfo was keeping pointers to parent loop LoopInfos, but when the loop info vector 
grew, it reallocated the storage and invalidated all of the parent pointers, causing 
use-after-free. Manage the lifetimes of the LoopInfos separately so that the pointers 
aren't stale.

Patch by Bevin Hansson.

FreeBSD/ports 509286head/devel/pecl-swoole distinfo Makefile

Update to 4.4.4.

OpenBSD/ports pMh3qr0net/zabbix/patches patch-src_libs_zbxcrypto_tls_c patch-src_libs_zbxsysinfo_openbsd_net_c, net/zabbix/pkg PLIST-web

   update to 4.0.11

   from Mark Patruck; thanks

NetBSD/pkgsrc FOOatT3devel/SDL2 buildlink3.mk

   SDL2: handle wayland properly in buildlink3
+7-11 files

LLVM/llvm 369258lld/trunk/ELF/Arch Hexagon.cpp, lld/trunk/test/ELF hexagon-gotrel.s

[lld][Hexagon] Add GOTREL relocations.

Add GOTREL relocation support. (S + A - GOT)

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