aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* MF11 r361465:Dimitry Andric2020-05-263-4/+10
| | | | | | | | | | | | | | | | | | | Regenerate llvm config headers to correctly enable zlib support During the initial upgrade to 10.0.0 in r357120, I generated these headers once, but they were missing zlib-related settings at that time. These should have been regenerated again during the merge of the final 10.0.0 release. Direct commit to stable/{11,12}, since head has gotten 10.0.1 in the mean time, with up-to-date generated headers. Approved by: re (gjb) Reported by: hyama99@gmail.com PR: 246244 Notes: svn path=/releng/11.4/; revision=361531
* MFS r361469: Fix bug in PR-SCTPMichael Tuexen2020-05-265-7/+19
| | | | | | | | | | | | | | | | | | | | | Only drop DATA chunk with lower priorities as specified in RFC 7496. This issue was found by looking at a reproducer generated by syzkaller. MFS r361472: Improve SCTP iterator Ensure that the SCTP iterator runs with an stcb and inp, which belong to each other. MFS r361473: Improve stcb handling during teardown Ensure that an stcb is not dereferenced when it is about to be freed. This issue was found by SYZKALLER. MFS r361476: Improve ASCONF handling Avoid an integer underflow. Approved by: re(gjb) Notes: svn path=/releng/11.4/; revision=361522
* MFC r361276, r361276:Konstantin Belousov2020-05-233-1/+29
| | | | | | | | | | mlx5_core: add new port module event types to decode. Sponsored by: Mellanox Technologies Approved by: re (delphij) Notes: svn path=/releng/11.4/; revision=361420
* MFS r361354: MFC r361260: Update leap-seconds to leap-seconds.3676924800.Xin LI2020-05-221-4/+4
| | | | | | | Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361396
* MFS11 r361305 (dteske): bsdinstall: fix wpa_supplicant.conf indentationEd Maste2020-05-221-50/+49
| | | | | | | Approved by: re (delphij) Notes: svn path=/releng/11.4/; revision=361378
* Update releng/11.4 to RC1 as part of the 11.4-RELEASE cycle.Glen Barber2020-05-221-1/+1
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=361351
* Revert r360395: MFC r353095, r355376: add root bundleKyle Evans2020-05-21150-15768/+0
| | | | | | | | | | | | | | | | | | | | | certctl(8) demonstrably has some logistics issues that still need to be worked out, as pointed out in at least PR 228913, 246614. I do not feel comfortable with proceeding with my original plan for the impending release without resolving at least PR 246614 and being able to get the release(7) scripts into a state where they're producing VM images that more closesly resemble a bsdinstall-produced install. 11.4 will still maintain the current version of certctl(8) that works well for most cases, and it still includes the caroot infrastructure. I do not currently intend to revert this in stable/11, as I would still like folks along stable/11 to be able to participate in Q/A'ing this feature. Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361341
* MFS r361310: MFC r361022-361023, 361148: certctl(8) fixesKyle Evans2020-05-211-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r361022: certctl(8): don't completely nuke $CERTDESTDIR It's been reported/noted that a well-timed `certctl rehash` will completely obliterate $CERTDESTDIR, which may get used by ports or system administrators. While we can't guarantee the certctl semantics when other non-certctl-controlled bits live here, we should make some amount of effort to play nice. Pruning all existing links, which we'll subsequently rebuild as needed, is sufficient for our needs. This can still be destructive, but it's perhaps less likely to cause issues. I also note that we should probably be pruning /etc/ssl/blacklisted upon rehash as well. r361023: certctl: follow-up to r361022, prune blacklist as well Otherwise, removals from the blacklist may not get processed as they should. While we're here, restructure these to not bother with mkdir(1) if we've already tested them to exist. r361148: certctl: don't fall over flat with relative DESTDIR Up until now, all of our DESTDIR use has been with absolute paths. It turned out that the cd in/out dance we do here breaks us down later on, as the relative path no longer resolves. Convert EXTENSIONS to an ERE that we'll use to grep ls -1 of the dir we're inspecting, rather than cd'ing into it and globbing it up. Approved by: re (kib) Notes: svn path=/releng/11.4/; revision=361339
* MFC r361037, r361056:Konstantin Belousov2020-05-211-3/+13
| | | | | | | | | Fix spurious ENOTCONN from closed unix domain socket other' side. Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361329
* MFS r361069: MFC r360952: Generate zlib.pc from source.Xin LI2020-05-182-14/+11
| | | | | | | Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361219
* MF11 r361088:Dimitry Andric2020-05-186-148/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge changes that enable DTrace-using ports to link correctly with lld 10, avoiding "unknown relocation 8" and other errors. MFC r312658 (by markj): Remove the DTRACEHIOC_ADD ioctl. This ioctl has been considered legacy by upstream since the DTrace code was first imported, and is unused. The removal also allows some simplification of dtrace_helper_slurp(). Also remove a bogus copyout in the DTRACEHIOC_ADDDOF handler. Due to a bug, it would overwrite an in-memory copy of the DOF header rather than the passed-in DOF helper. Moreover, DTRACEHIOC_ADDDOF already copies the helper back out automatically since its argument has the IOC_OUT attribute. MFC r313262 (by markj): Use PC-relative relocations for USDT probe sites on i386 and amd64. When recording probe site addresses in the output DOF file, dtrace -G needs to emit relocations for the .SUNW_dof section in order to obtain the addresses of functions containing probe sites. DTrace expects the addresses to be relative to the base address of the final ELF file, and the amd64 USDT implementation was relying on some unspecified and incorrect behaviour in the base system GNU ld to achieve this. This change reimplements the probe site relocation handling to allow USDT to be used with lld and newer GNU binutils. Specifically, it makes use of R_X86_64_PC64/R_386_PC32 relocations to obtain the probe site address relative to the DOF file address, and adds and uses a new DOF relocation type which computes the final probe site address using these relative offsets. Approved by: re (gjb) Reported by and discussed with: Rafael Esp?ndola Differential Revision: https://reviews.freebsd.org/D9374 Notes: svn path=/releng/11.4/; revision=361217
* MFS r361132Peter Grehan2020-05-182-0/+13
| | | | | | | | | Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest Approved by: re (kib), bz (mentor) Notes: svn path=/releng/11.4/; revision=361151
* MF11 r360876: Merge commit 21e5e1724b75 from llvm git:Ed Maste2020-05-171-7/+2
| | | | | | | | | | | | | | | | | | | getMainExecutable: Fix hand-rolled AT_EXECPATH for older FreeBSD Once we hit AT_NULL, we need to bail out of the loop; not just the enclosing switch. This fixes basic usage (e.g. `cc --version`) when AT_EXECPATH isn't present on older branches (e.g. under qemu-user-static, at the moment), where we would previously run off the end of ::environ. Patch By: kevans Reviewed By: arichardson Approved by: re (kib) Notes: svn path=/releng/11.4/; revision=361142
* Update releng/11.4 to BETA2 as part of the 11.4-RELEASE cycle.Glen Barber2020-05-151-1/+1
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=361067
* MF11 r361051:Dimitry Andric2020-05-141-2/+0
| | | | | | | | | | | | | | MFC r357929: Remove /usr/include/ssp from BSD.include.dist after r356356 This avoids having to delete it every time with "make delete-old". Approved by: re (gjb) PR: 242950 Notes: svn path=/releng/11.4/; revision=361052
* MF11 r361047:Dimitry Andric2020-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | MFC r360915: Use -fno-asynchronous-unwind-tables to compile lib/csu Summary: In r209294 kib added -fno-asynchronous-unwind-tables to the compile flags for the GNU C startup components. This was done to work around a BFD ld assertion, "no .eh_frame_hdr table will be created", which is produced because of the layout of the startup objects. Add the same flag to lib/csu too, for the same reason. And similarly to r209294, also add -fno-omit-frame-pointer. This is primarily meant to quickly MFC to stable/11, so it can end up in the 11.4 release, as a fix for https://bugs.freebsd.org/246322. Approved by: re (gjb) PR: 246322 Differential Revision: https://reviews.freebsd.org/D24797 Notes: svn path=/releng/11.4/; revision=361050
* MF11 361044,361048: Deprecate ubsec(4) for FreeBSD 13.0.John Baldwin2020-05-142-1/+11
| | | | | | | | | | | | | | | | | | With the removal of in-tree consumers of DES, Triple DES, and MD5-HMAC, the only algorithm this driver still supports is SHA1-HMAC. This is not very useful as a standalone algorithm (IPsec AH-only with SHA1 would be the only user). This driver has also not been kept up to date with the original driver in OpenBSD which supports a few more cards and AES-CBC on newer cards. The newest card currently supported by this driver was released in 2005. Approved by: re (gjb) Relnotes: yes Notes: svn path=/releng/11.4/; revision=361049
* MF11 361041:John Baldwin2020-05-141-18/+18
| | | | | | | | | | | | | | | | | | | | Update the cached MSI state when any MSI capability register is written. bhyve uses cached copies of the MSI capability registers to generate MSI interrupts for device models. Previously, these cached fields were only set when the MSI capability control register was updated. The Linux kernel recently adopted a change to deal with races in MSI interrupt delivery that writes to the MSI capability address and data registers to alter the destination of MSI interrupts without writing to the MSI capability control register. bhyve was not updating its cached registers for these writes and continued to send interrupts with the old data value to the old address. Fix this by recomputing the cached values for every write to any MSI capability register. Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361045
* MF11 361038,361040: Don't dereference various user pointers.John Baldwin2020-05-144-16/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 360171: Don't access a user buffer directly from the kernel. The handle_string callback for the ENCIOC_SETSTRING ioctl was passing a user pointer to memcpy(). Fix by using copyin() instead. For ENCIOC_GETSTRING ioctls, the handler was storing the user pointer in a CCB's data_ptr field where it was indirected by other code. Fix this by allocating a temporary buffer (which ENCIOC_SETSTRING already did) and copying the result out to the user buffer after the CCB has been processed. 360179: Don't pass a user buffer pointer as the data pointer in a CCB. Allocate a temporary buffer in the kernel to serve as the CCB data pointer for a pass-through transaction and use copyin/copyout to shuffle the data to/from the user buffer. 360285: Don't indirect user pointers directly in two 802.11s ioctls. IEEE80211_MESH_RTCMD_ADD was invoking memcmp() to validate the supplied address directly on the user pointer rather than first doing a copyin() and validating the copied value. IEEE80211_MESH_RTCMD_DELETE was passing the user pointer directly to ieee80211_mesh_rt_del() rather than copying the user buffer into a temporary kernel buffer. 360388: Don't run strcmp() against strings stored in user memory. Instead, copy the strings into a temporary buffer on the stack and run strcmp on the copies. 360818: Fix a memory leak for ENCIOC_GETSTRING I introduced in r360171. Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=361042
* MF11 361020: Deprecate procfs-based process debugging.John Baldwin2020-05-144-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | 359047: Mark procfs-based process debugging as deprecated for FreeBSD 13. Attempting to use ioctls on /proc/<pid>/mem to control a process will trigger warnings on the console. The <sys/pioctl.h> include file will also now emit a compile-time warning when used from userland. 359054: Fix the workaround to ignore the #warning for GCC. clang and gcc use different warning flags for #warning preprocessor directives. For both 12 and 11, adjust the GCC warning flags to only be added in 4.7 and later since 4.2.1 does not support -Wno-cpp. For 11, add the needed warning suppression to procctl's build. procctl was removed in 12.0. Approved by: re (gjb, kib) Notes: svn path=/releng/11.4/; revision=361035
* Release notes documentation:Glen Barber2020-05-121-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | - r350801: camcontrol(8) AMA support. - r351582: camcontrol(8) 'modepage' block descriptor support. - r351843: usbconfig(8) detach_kernel_driver command. - r351873: jot(1) '-r 0 start end' fix. - r352758: freebsd-update(8) 'updatesready' and 'showconfig' commands. - r353134: crontab(5)/cron(8) '-n' and '-q' flags. - r353759: zfs(8) bookmark renaming support. - r356290: OpenSSL 1.0.2u. - r356401: usbconfig(8) dump_stats command. - r356905: fsck_ffs(8) recovery information fix with 64k sectors. - r357082: certctl(8) added. - r357791: env(1) -L/-U user/class options. - r359554: ZFS ZIL max block size tunable. - r359696: libalias(3)/ipfw(4) RFC-6598 support. - r359740: syslogd(8) property-based filters. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360989
* Release notes documentation:Glen Barber2020-05-121-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | - r351007: bzip2(1) 1.0.8. - r351611: WPA 2.9. - r354195: tcsh(1) 6.21.0. - r355504: less(1) 551. - r355604: libbsdxml(3) 2.2.9. - r356341: pcap(3) 1.9.1. - r356341: tcpdump(1) 4.9.3. - r356345: unbound 1.9.6. - r356533: mtree(8) various fixes. - r358088: libarchive(3) 3.4.2. - r358659: ntpd(8) 4.2.8p14. - r360362: tzdata 2020a. - r360521: file(1) 5.38. - r360523: xz(1) 5.2.5. - r360822: clang (and friends) 10.0.0. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360988
* Document EN-20:08 through EN-20:09, and SA-20:12 through SA-20:16.Glen Barber2020-05-121-0/+15
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360987
* MF11 360965:John Baldwin2020-05-121-1/+2
| | | | | | | | | | | | Use stream_read() to read all 12 bytes of the RFB client version. read() can return a short read, whereas stream_read() waits until the full version string is read. Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=360981
* Add UPDATING entries and bump version.Gordon Tetlow2020-05-122-1/+8
| | | | | | | | Approved by: so Approved by: re (implicit) Notes: svn path=/releng/11.4/; revision=360978
* Fix memory disclosure vulnerability in libalias.Gordon Tetlow2020-05-121-1/+2
| | | | | | | | | | Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-20:13.libalias Security: CVE-2020-7455 Notes: svn path=/releng/11.4/; revision=360974
* Fix insufficient packet length validation in libalias.Gordon Tetlow2020-05-121-3/+34
| | | | | | | | | | Approved by: so Approved by: re (implicit) Security: FreeBSD-SA-20:12.libalias Security: CVE-2020-7454 Notes: svn path=/releng/11.4/; revision=360972
* Uncomment the installation SUBDIR entry.Glen Barber2020-05-111-1/+1
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360913
* Fix a mailing list reference.Glen Barber2020-05-111-1/+3
| | | | | | | | | | Bump copyright year while here. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360912
* Prune open issues and late-breaking news sections from the errata page.Glen Barber2020-05-111-54/+3
| | | | | | | | | | Note that the errata page will be maintained until 11.4 reaches EoL. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360911
* Prune entries from 11.3-RELEASE.Glen Barber2020-05-111-269/+16
| | | | | | | | | | Bump copyright year while here. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360910
* Update version information in the installation page.Glen Barber2020-05-111-4/+3
| | | | | | | | | | Bump the copyright year while here. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360909
* Update version number information in release.ent.Glen Barber2020-05-111-6/+6
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360908
* Add the installation SUBDIR (commented for now).Glen Barber2020-05-111-0/+1
| | | | | | | | Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360907
* MF11 r360838:Dimitry Andric2020-05-098-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r358643: Link stand/i386 components using a linker script LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with: ld: error: output file too large: 18446744073707016908 bytes I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it. However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.) Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :). This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section. It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections. Approved by: re (kib) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23952 Notes: svn path=/releng/11.4/; revision=360840
* MFS r360795: lualoader: fix loader.lua mis-mergeKyle Evans2020-05-091-3/+0
| | | | | | | | | | | | | | | | This mis-merge came from r360599; r331321 introduced core.isUEFIBoot but will not get merged back to stable/11 due to being somewhat disruptive. I had resolved the conflict once, but had to re-do the merge locally due to another conflict and failed to resolve it the second time. This mistake is explosive to those trying to run lualoader on stable/11, but is mitigated by the fact that lualoader is not the default here. PR: 246291 Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=360834
* MF11 r360784:Dimitry Andric2020-05-085816-277552/+437667
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release), and a number of follow-ups. MFC r356479 (by bdragon): [PowerPC] Fix libllvmminimal build when building from powerpc64 ELFv1. When bootstrapping on powerpc64 ELFv1, it is necessary to use binutils ld.bfd from ports for the bootstrap, as this is the only modern linker for ELFv1 host tools. As binutils ld.bfd is rather strict in its handling of undefined symbols, it is necessary to pull in Support/Atomic.cpp to avoid an undefined symbol. Reviewed by: dim, emaste Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23072 MFC r356930: Add more Subversion mergeinfo bootstrap information, to hopefully increase the probability of merging in vendor changes. MFC r358408 (by brooks): Merge commit 7214f7a79 from llvm git (by Sam Elliott): [RISCV] Lower llvm.trap and llvm.debugtrap Summary: Until this commit, these have lowered to a call to abort(). `llvm.trap()` now lowers to `unimp`, which should trap on all systems. `llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this instruction is for. Reviewers: asb, luismarques Reviewed By: asb Tags: #llvm Differential Revision: https://reviews.llvm.org/D69390 This fixes miscompilation resulting in linking failures with INVARIANTS disabled. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D23857 MFC r358851: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp 10.0.0-rc3 c290cb61fdc. Release notes for llvm, clang, lld and libc++ 10.0.0 will become available here: https://releases.llvm.org/10.0.0/docs/ReleaseNotes.html https://releases.llvm.org/10.0.0/tools/clang/docs/ReleaseNotes.html https://releases.llvm.org/10.0.0/tools/lld/docs/ReleaseNotes.html https://releases.llvm.org/10.0.0/projects/libcxx/docs/ReleaseNotes.html PR: 244251 MFC r358854: Add one additional file to libllvmminimal, to help the ppc64 bootstrap. Reported by: bdragon PR: 244251 MFC r358857: Move another file in libllvm from sources required for world, to sources required for bootstrap, as the PowerPC builds need this. Reported by: bdragon PR: 244251 MFC r359082: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.0-rc4-5-g52c365aa9ca. The actual release should follow Real Soon Now. PR: 244251 MFC r359084: Merge commit 00925aadb from llvm git (by Fangrui Song): [ELF][PPC32] Fix canonical PLTs when the order does not match the PLT order Reviewed By: Bdragon28 Differential Revision: https://reviews.llvm.org/D75394 This is needed to fix miscompiled canonical PLTs on ppc32/lld10. Requested by: bdragon Differential Revision: https://reviews.freebsd.org/D24109 MFC r359085: Merge commit 315f8a55f from llvm git (by Fangrui Song): [ELF][PPC32] Don't report "relocation refers to a discarded section" for .got2 Similar to D63182 [ELF][PPC64] Don't report "relocation refers to a discarded section" for .toc Reviewed By: Bdragon28 Differential Revision: https://reviews.llvm.org/D75419 This is needed to fix compile errors when building for ppc32/lld10. Requested by: bdragon Differential Revision: https://reviews.freebsd.org/D24110 MFC r359086: Merge commit b8ebc11f0 from llvm git (by Sanjay Patel): [EarlyCSE] avoid crashing when detecting min/max/abs patterns (PR41083) As discussed in PR41083: https://bugs.llvm.org/show_bug.cgi?id=41083 ...we can assert/crash in EarlyCSE using the current hashing scheme and instructions with flags. ValueTracking's matchSelectPattern() may rely on overflow (nsw, etc) or other flags when detecting patterns such as min/max/abs composed of compare+select. But the value numbering / hashing mechanism used by EarlyCSE intersects those flags to allow more CSE. Several alternatives to solve this are discussed in the bug report. This patch avoids the issue by doing simple matching of min/max/abs patterns that never requires instruction flags. We give up some CSE power because of that, but that is not expected to result in much actual performance difference because InstCombine will canonicalize these patterns when possible. It even has this comment for abs/nabs: /// Canonicalize all these variants to 1 pattern. /// This makes CSE more likely. (And this patch adds PhaseOrdering tests to verify that the expected transforms are still happening in the standard optimization pipelines. I left this code to use ValueTracking's "flavor" enum values, so we don't have to change the callers' code. If we decide to go back to using the ValueTracking call (by changing the hashing algorithm instead), it should be obvious how to replace this chunk. Differential Revision: https://reviews.llvm.org/D74285 This fixes an assertion when building the math/gsl port on PowerPC64. Requested by: pkubja MFC r359087: Merge commit 585a3cc31 from llvm git (by me): Fix -Wdeprecated-copy-dtor and -Wdeprecated-dynamic-exception-spec warnings. Summary: The former are like: libcxx/include/typeinfo:322:11: warning: definition of implicit copy constructor for 'bad_cast' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-dtor] virtual ~bad_cast() _NOEXCEPT; ^ libcxx/include/typeinfo:344:11: note: in implicit copy constructor for 'std::bad_cast' first required here throw bad_cast(); ^ Fix these by adding an explicitly defaulted copy constructor. The latter are like: libcxx/include/codecvt:105:37: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec] virtual int do_encoding() const throw(); ^~~~~~~ Fix these by using the _NOEXCEPT macro instead. Reviewers: EricWF, mclow.lists, ldionne, #libc Reviewed By: EricWF, #libc Subscribers: dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D76150 This is because we use -Wsystem-headers during buildworld, and the two warnings above are now triggered by default with clang 10, preventing most C++ code from compiling without NO_WERROR. Requested by: brooks Differential Revision: https://reviews.freebsd.org/D24049 MFC r359333: Merge commit f0990e104 from llvm git (by Justin Hibbits): [PowerPC]: e500 target can't use lwsync, use msync instead The e500 core has a silicon bug that triggers an illegal instruction program trap on any sync other than msync. Other cores will typically ignore illegal sync types, and the documentation even implies that the 'illegal' bits are ignored. Address this hardware deficiency by only using msync, like the PPC440. Differential Revision: https://reviews.llvm.org/D76614 Requested by: jhibbits MFC r359334: Merge commit 459e8e948 from llvm git (by Justin Hibbits): [PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32 Summary: The linker is free to relax this (relocation R_PPC_GOT_TPREL16) against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0 is used, this can generate execution-invalid code (converts to 'addi %rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid this instead. This fixes static binaries using locales on FreeBSD/powerpc (tested on FreeBSD/powerpcspe). Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D76662 Requested by: jhibbits MFC r359338: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release). PR: 244251 MFC r359506 (by emaste): lldb: stop excluding bindings/ subdir With liblua in the tree we should be able to enable lldb's lua scripting. We'll need the files in bindings/, so start by allowing them to come in with the next import. Approved by: dim Sponsored by: The FreeBSD Foundation MFC r359578: Merge once more from ^/vendor/llvm-project/release-10.x, to get the lldb/bindings directory, which will be used to provide lua bindings for lldb. Requested by: emaste MFC r359826: Merge commit 30588a739 from llvm git (by Erich Keane): Make target features check work with ctor and dtor- The problem was reported in PR45468, applying target features to an always_inline constructor/destructor runs afoul of GlobalDecl construction assert when checking for target-feature compatibility. The core problem is fixed by using the version of the check that takes a FunctionDecl rather than the GlobalDecl. However, while writing the test, I discovered that source locations weren't properly set for this check on ctors/dtors. This patch also fixes constructors and CALLED destructors. Unfortunately, it doesn't seem too possible to get a meaningful source location for a 'cleanup' destructor, so those are still 'frontend' level errors unfortunately. A fixme was added to the test to cover that situation. This should fix 'Assertion failed: (!isa<CXXConstructorDecl>(D) && "Use other ctor with ctor decls!"), function Init, file /usr/src/contrib/llvm-project/clang/include/clang/AST/GlobalDecl.h, line 45' when compiling the security/botan2 port. PR: 245550 MFC r359981: Revert commit a9ad65a2b from llvm git (by Nemanja Ivanovic): [PowerPC] Change default for unaligned FP access for older subtargets This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554 Some CPU's trap to the kernel on unaligned floating point access and there are kernels that do not handle the interrupt. The program then fails with a SIGBUS according to the PR. This just switches the default for unaligned access to only allow it on recent server CPUs that are known to allow this. Differential revision: https://reviews.llvm.org/D71954 This upstream commit causes a compiler hang when building certain ports (e.g. security/nss, multimedia/x264) for powerpc64. The hang has been reported in https://bugs.llvm.org/show_bug.cgi?id=45186, but in the mean time it is more convenient to revert the commit. Requested by: jhibbits MFC r359994: Revert commit b6cf400aa fro llvm git (by Nemanja Ivanovic): Fix bots after a9ad65a2b34f In the last commit, I neglected to initialize the new subtarget feature I added which caused failures on a few bots. This should fix that. This unbreaks the build after r359981, which reverted upstream commit a9ad65a2b34f. Reported by: jhibbits (and jenkins :) MFC r360129: Merge commit ce5173c0e from llvm git (by Reid Kleckner): Use FinishThunk to finish musttail thunks FinishThunk, and the invariant of setting and then unsetting CurCodeDecl, was added in 7f416cc42638 (2015). The invariant didn't exist when I added this musttail codepath in ab2090d10765 (2014). Recently in 28328c3771, I started using this codepath on non-Windows platforms, and users reported problems during release testing (PR44987). The issue was already present for users of EH on i686-windows-msvc, so I added a test for that case as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D76444 This should fix 'Assertion failed: (!empty() && "popping exception stack when not empty"), function popTerminate, file /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h, line 583' when building the net-p2p/libtorrent-rasterbar PR: 244830 Reported by: jbeich, yuri MFC r360134: Merge commit 64b31d96d from llvm git (by Nemanja Ivanovic): [PowerPC] Do not attempt to reuse load for 64-bit FP_TO_UINT without FPCVT We call the function that attempts to reuse the conversion without checking whether the target matches the constraints that the callee expects. This patch adds the check prior to the call. Fixes: https://bugs.llvm.org/show_bug.cgi?id=43976 Differential revision: https://reviews.llvm.org/D77564 This should fix 'Assertion failed: ((Op.getOpcode() == ISD::FP_TO_SINT || Subtarget.hasFPCVT()) && "i64 FP_TO_UINT is supported only with FPCVT"), function LowerFP_TO_INTForReuse, file /usr/src/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp, line 7276' when building the devel/libslang2 port (and a few others) for PowerPC64. Requested by: pkubaj MFC r360350: Tentatively apply https://reviews.llvm.org/D78877 (by Dave Green): [ARM] Only produce qadd8b under hasV6Ops When compiling for a arm5te cpu from clang, the +dsp attribute is set. This meant we could try and generate qadd8 instructions where we would end up having no pattern. I've changed the condition here to be hasV6Ops && hasDSP, which is what other parts of ARMISelLowering seem to use for similar instructions. Fixed PR45677. This fixes "fatal error: error in backend: Cannot select: t37: i32 = ARMISD::QADD8b t43, t44" when compiling sys/dev/sound/pcm/feeder_mixer.c for armv5. For some reason we do not encounter this on head, but this error popped up while building universes for stable/12. MFC r360697: In r358396 I merged llvm upstream commit 2e24219d3, which fixed "error: unsupported relocation on symbol" when assembling arm 'adr' pseudo instructions. However, the upstream commit did not take big-endian arm into account. Applying the same changes to the big-endian handling is straightforward, thanks to Andrew Turner and Peter Smith for the hint. This will also be submitted upstream. MF11 r360785: Adjust UPDATING and ObsoleteFiles.inc dates to match reality. Approved by: re (gjb) Relnotes: yes Notes: svn path=/releng/11.4/; revision=360822
* MF11 r360782:Dimitry Andric2020-05-081-1/+1
| | | | | | | | | | | | MFC r306679 (by glebius): Fix indentation. CID: 1363671 Approved by: re (gjb) Notes: svn path=/releng/11.4/; revision=360821
* - Copy stable/11@r360774 to releng/11.4 as part of the 11.4-RELEASEGlen Barber2020-05-084-4/+4
| | | | | | | | | | | | | | | cycle. - Update releng/11.4 from PRERELEASE to BETA1. - Switch the default dvd1.iso pkg(8) repository from latest to - quarterly. - Bump __FreeBSD_version. - Prune vestigial svn:mergeinfo from the new branch. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/releng/11.4/; revision=360804
* Fix misleading indentation warning:Dimitry Andric2020-05-071-1/+1
| | | | | | | | | | | | | | | sys/dev/vxge/vxgehal/vxgehal-virtualpath.c:5550:6: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] return (VXGE_HAL_ERR_EVENT_MRPCIM_CRITICAL); ^ sys/dev/vxge/vxgehal/vxgehal-virtualpath.c:5545:5: note: previous statement is here if (!skip_alarms) ^ Direct commit to stable/11, since vxge(4) has been removed from FreeBSD 12 and later. Notes: svn path=/stable/11/; revision=360774
* MFC r360671: Avoid integer underflowMichael Tuexen2020-05-071-1/+5
| | | | | | | | | | Avoid underflowing a variable, which would result in taking more data from the stream queues then needed. Thanks to Timo Voelker for finding this bug and providing a fix. Notes: svn path=/stable/11/; revision=360772
* MFC r360662: Fix a bug in SCTP SACK generationMichael Tuexen2020-05-071-1/+1
| | | | | | | | | | | | Fix the computation of the numbers of entries of the mapping array to look at when generating a SACK. This was wrong in case of sequence numbers wrap arounds. Thanks to Gwenael FOURRE for reporting the issue for the userland stack: https://github.com/sctplab/usrsctp/issues/462 Notes: svn path=/stable/11/; revision=360771
* MFC r360193, r360209: Improve input validation ofor AUTH chunksMichael Tuexen2020-05-071-8/+13
| | | | | | | | | | Improve input validation when processing AUTH chunks. Thanks to Natalie Silvanovich from Google for finding and reporting the issue found by her in the SCTP userland stack. Notes: svn path=/stable/11/; revision=360770
* MFC r359131: Fix MTU candidatesMichael Tuexen2020-05-071-1/+1
| | | | | | | The MTU candidates MUST be a multiple of 4, so make them so. Notes: svn path=/stable/11/; revision=360769
* MFC r358621:Michael Tuexen2020-05-071-1/+2
| | | | | | | | | | | | | | | When using automatically generated flow labels and using TCP SYN cookies, use the same flow label for the segments sent during the handshake and after the handshake. This fixes a bug by making sure that sc_flowlabel is always stored in network byte order. Reviewed by: bz Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D23957 Notes: svn path=/stable/11/; revision=360768
* MFC r358169: Remove an unused timer type.Michael Tuexen2020-05-071-7/+6
| | | | Notes: svn path=/stable/11/; revision=360767
* MFC r358028: Fix SCTP stream scheduler bugMichael Tuexen2020-05-071-0/+9
| | | | | | | | | | | Fix the non-default stream schedulers such that do not interleave user messages when it is now allowed. Thanks to Christian Wright for reporting the issue for the userland stack and providing a fix for the priority scheduler. Notes: svn path=/stable/11/; revision=360766
* MFC r358023: Don't use uninitialized memoryMichael Tuexen2020-05-071-1/+3
| | | | | | | | | | | | | | | Don't use uninitialised stack memory if the sysctl variable net.inet.tcp.hostcache.enable is set to 0. The bug resulted in using possibly a too small MSS value or wrong initial retransmission timer settings. Possibly the value used for ssthresh was also wrong. Submitted by: rscheff Reviewed by: Cheng Cui, rgrimes@, tuexen@ Differential Revision: https://reviews.freebsd.org/D23687 Notes: svn path=/stable/11/; revision=360765
* MFC r357830: Improve handling of memory allocation failureMichael Tuexen2020-05-071-3/+0
| | | | | | | | | Don't panic under INVARIANTS when we can't allocate memory for storing a vtag in time wait. This issue was found by running syzkaller. Notes: svn path=/stable/11/; revision=360764
* MFC r357768: Optimize timer startingMichael Tuexen2020-05-072-0/+5
| | | | | | | | | Don't start an SCTP timer using a net, which has been removed. Submitted by: Taylor Brandstetter Notes: svn path=/stable/11/; revision=360763