aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Import bmake-20210206vendor/NetBSD/bmake/20210206Simon J. Gerraty2021-02-11127-2133/+3156
| | | | | | | | | | | | | | | | | | | | | | Changes of interest o unit-tests: use private TMPDIR to avoid errors from other users o avoid strdup in mkTempFile o always use vfork o job.c: do not create empty shell files in jobs mode reduce unnecessary calls to waitpid o cond.c: fix debug output for comparison operators in conditionals
* | kldload(8): Improve phrasingDaniel Ebdrup Jensen2021-02-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Mountroot isn't documented in the extant manual pages - so this phrasing, while less absolute and concise, still conveys which modules are recommended to be handled via loader.conf(5), and it also does a better job of elucidating that the modules can include filesystem drivers. Submitted by: kevans (earlier version) Reported by: imp, kevans, eugen Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D28542
* | usleep(3): replace 'process' with 'calling thread'Konstantin Belousov2021-02-111-5/+5
| | | | | | | | | | | | | | PR: 253395 Reported by: zegang.luo@qq.com MFC after: 3 days Sponsored by: The FreeBSD Foundation
* | release: fix overriding UNAME_rGlen Barber2021-02-111-0/+4
| | | | | | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* | Fix incorrect hypotl(3) result with subnormal numbersDimitry Andric2021-02-103-1/+22
| | | | | | | | | | | | | | | | | | | | | | This adjusts the factor used to scale the subnormal numbers, so it becomes the right value after adjusting its exponent. Thanks to Steve Kargl for finding the most elegant fix. Also enable the hypot tests, and add a test case for this bug. PR: 253313 MFC after: 1 week
* | arm64: if_dwc is also needed by intel stratix10 platformEmmanuel Vadot2021-02-101-2/+3
| | | | | | | | MFC after: 3 days
* | arm64: Add a SOC_BRCM_NS2 optionEmmanuel Vadot2021-02-103-3/+5
| | | | | | | | | | | | | | | | Only compile files needed for this platform if the option is enabled in the kernel config file. Add the option to GENERIC. MFC after: 3 days
* | arm64: Make thunderx vnic file depend on soc_cavm_thunderxEmmanuel Vadot2021-02-101-4/+4
| | | | | | | | MFC after: 3 days
* | arm64: Order sys/conf/files.arm64Emmanuel Vadot2021-02-101-420/+474
| | | | | | | | | | | | | | | | This is now easier to read and see what's compiled-in No functional changes intended. MFC after: 3 days
* | netgraph/ng_bridge: Add counters for the first link, tooLutz Donnerhacke2021-02-101-21/+38
| | | | | | | | | | | | | | | | | | | | | | For broadcast, multicast and unknown unicast, the replication loop sends a copy of the packet to each link, beside the first one. This special path is handled later, but the counters are not updated. Factor out the common send and count actions as a function. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28537
* | systat.1: Fix synopsisMateusz Piotrowski2021-02-101-1/+1
| | | | | | | | | | | | | | systat does not have a "-display" flag. Use Ar to indicate that "display" is meant to be substituted with an actual display command. MFC after: 1 week
* | systat.1: Remove Tn macrosMateusz Piotrowski2021-02-101-41/+14
| | | | | | | | | | | | They are no longer supported by mdoc(7). MFC after: 1 week
* | localedef: Fix bootstrapping on Ubuntu 16.04Jessica Clarke2021-02-101-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glibc's stdlib.h defines various prototypes for GNU extensions that take a locale_t. Newer versions use locale_t directly and include an internal bits/types/locale_t.h in order to get its definition, but older versions include xlocale.h for that, for which our bootstrap version is empty. Moreover it expects to use the glibc-specific __locale_t type. Thus, provide dummy definitions of both types in order to ensure the prototypes don't give any errors, and guard against the header being inadvertently included between the bootstrapping namespace.h and un-namespace.h, where locale_t is #define'd. This header is not used when bootstrapping on FreeBSD and exists solely to stub out glibc's, so this should have no impact on FreeBSD hosts. Reviewed by: arichardson, emaste (comment only) Differential Revision: https://reviews.freebsd.org/D28317
* | vm: Honour the "noreuse" flag to vm_page_unwire_managed()Mark Johnston2021-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag indicates that the page should be enqueued near the head of the inactive queue, skipping the LRU queue. It is used when unwiring pages from the buffer cache following direct I/O or after I/O when POSIX_FADV_NOREUSE or _DONTNEED advice was specified, or when sendfile(SF_NOCACHE) completes. For the direct I/O and sendfile cases we only enqueue the page if we decide not to free it, typically because it's mapped. Pass "noreuse" through to vm_page_release_toq() so that we actually honour the desired LRU policy for these scenarios. Reported by: bdrewery Reviewed by: alc, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28555
* | Always build the sanitizer runtimes when compiling with clangAlex Richardson2021-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | This allows instrumenting e.g. test binaries even when compiling with an external clang (e.g. CROSS_TOOLCHAIN=llvm11). I have some upcoming patches that allow building the entire base system with ASan/UBSan/etc. instrumentation and this is required in preparation for this. Reviewed By: dim, emaste Differential Revision: https://reviews.freebsd.org/D28532
* | usr.sbin/makefs: fix use-after-free in read_mtree_keywords()Alex Richardson2021-02-101-0/+2
| | | | | | | | | | | | | | | | | | | | The st variable is used as a shortcut for &node->inode->st, but in one branch just before the exit we update node->inode without changing st. Reported by: AddressSanitizer Reviewed By: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28570
* | MFV d60fa10fd872db7e3d8cb1e161cfdae026c43b14:Cy Schubert2021-02-1077-686/+1700
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Update unbound 1.13.0 --> 1.13.1. Includes numerous bugfixes documented at: https://www.nlnetlabs.nl/projects/unbound/download/#unbound-1-13-1 MFC after: 1 month
| * | Vendor import of Unbound 1.13.1.vendor/unbound/1.13.1Cy Schubert2021-02-09106-6963/+9754
| | | | | | | | | | | | | | | Includes numerous bugfixes documented at: https://www.nlnetlabs.nl/projects/unbound/download/#unbound-1-13-1
* | | Fix non-IPv6 build post 57785538c6e0d7e8ca0f161ab95bae10fd304047.Cy Schubert2021-02-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 57785538c6e0d7e8ca0f161ab95bae10fd304047 change the test for FreeBSD from __FreeBSD_version to __FreeBSD__. However this test was performed before sys/param.h was included, therefore __FreeBSD_version was never defined. As the test was never true opt_random_ip_id.h was never included. Submitted by: bdragon Reported by: bdragon MFC after: 1 week X-MFC with: 57785538c6e0d7e8ca0f161ab95bae10fd304047
* | | libsysdecode: fix decoding of TCP_NOPUSH and TCP_MD5SIGMichael Tuexen2021-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCP_FASTOPEN_MIN_COOKIE_LEN was incorrectly registered as a name of a IPPROTO_TCP level socket option, which overwrote TCP_NOPUSH. TCP_FASTOPEN_PSK_LEN was incorrectly registered as a name of an IPPROTO_TCP level socket option, which overwrote TCP_MD5SIG. MFC after: 3 days Sponsored by: Netflix, Inc.
* | | Add test case for 93fc67896550 (incorrect powf(3) result)Dimitry Andric2021-02-091-0/+22
| | | | | | | | | | | | | | | | | | | | | This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it is currently the only place testing pow(3) and friends. MFC after: 1 week
* | | bsd.compiler.mk: Detect distribution-provided GCC when executed as ccJessica Clarke2021-02-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang always prints "clang $VERSION" regardless of the name used to execute it, whereas GCC prints "$progname $VERSION", meaning if CC is set to cc and cc is GCC it will print "cc $VERSION". We are able to detect some of those cases since it then prints "($PKGVERSION)", where the default is "GCC", but many distributions override that to print their name and the package version number (e.g. "Debian 10.2.1-6"), so nothing tells us it's GCC other than the fact that it's not Clang (and that there's an FSF copyright disclaimer). However, GCC's -v option will always print "gcc version $VERSION", so fall back on using that to detect GCC. Whilst Clang also supports this option, we should never get here, so Clang handling is not added. Reviewed by: brooks, emaste, arichardson Differential Revision: https://reviews.freebsd.org/D28315
* | | Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10Dimitry Andric2021-02-094-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sprinkles a few strategic volatiles in an attempt to defeat clang's optimization interfering with the expected floating-point exception flags. Reported by: lwhsu PR: 244732 MFC after: 3 days
* | | netgraph/ng_bridge: Document staleness in multithreaded operationLutz Donnerhacke2021-02-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the data path of ng_bridge(4), the only value of the host struct, which needs to be modified, is the staleness, which is reset every time a frame is received. It's save to leave the code as it is. This patch is part of a series to make ng_bridge(4) multithreaded. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28546
* | | netgraph/ng_bridge: Merge internal structuresLutz Donnerhacke2021-02-092-48/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a earlier version of ng_bridge(4) the exernal visible host entry structure was a strict subset of the internal one. So internal view was a direct annotation of the external structure. This strict inheritance was lost many versions ago. There is no need to encapsulate a part of the internal represntation as a separate structure. This patch is a preparation to make the internal structure read only in the data path in order to make ng_bridge(4) multithreaded. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28545
* | | Set file mode during zfs_writeAntonio Russo2021-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply https://github.com/openzfs/zfs/pull/11576 Direct commit from upstream openzfs. Full commit message below: Set file mode during zfs_write 3d40b65 refactored zfs_vnops.c, which shared much code verbatim between Linux and BSD. After a successful write, the suid/sgid bits are reset, and the mode to be written is stored in newmode. On Linux, this was propagated to both the in-memory inode and znode, which is then updated with sa_update. 3d40b65 accidentally removed the initialization of newmode, which happened to occur on the same line as the inode update (which has been moved out of the function). The uninitialized newmode can be saved to disk, leading to a crash on stat() of that file, in addition to a merely incorrect file mode. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Antonio Russo <aerusso@aerusso.net> Closes #11474 Closes #11576 Obtained from: openzfs/zfs@f8ce8aed0 MFC after: 0 days Sponsored by: iXsystems, Inc.
* | | usr.bin/grep: Fix Address OOB read errorAlex Richardson2021-02-092-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found this when compiling all the bootstrap tools with -fsanitize=addres: ==65590==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62d000008400 at pc 0x000000473053 bp 0x7ffc1c7dd910 sp 0x7ffc1c7dd0b8 READ of size 32769 at 0x62d000008400 thread T0 #0 0x473052 in regexec (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) #1 0x4c9cf3 in procline /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:539:8 #2 0x4c8687 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:379:18 #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 0x62d000008400 is located 0 bytes to the right of 32768-byte region [0x62d000000400,0x62d000008400) allocated by thread T0 here: #0 0x493d5d in malloc (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x493d5d) #1 0x4cad75 in grep_malloc /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:656:13 #2 0x4c8129 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 SUMMARY: AddressSanitizer: heap-buffer-overflow (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) in regexec Reviewed By: kevans MFC after: 1 week
* | | cache: assorted comment fixupsMateusz Guzik2021-02-091-7/+12
| | |
* | | Revert "amd64: implement strlen in assembly"Mateusz Guzik2021-02-092-66/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit af366d353b84bdc4e730f0fc563853abc338271c. Trips over '\xa4' byte and terminates early, as found in lib/libc/gen/setdomainname_test:setdomainname_basic testcase However, keep moving libkern/strlen.c out of conf/files. Reported by: lwhsu
* | | arm32: Align arguments of sync_icache() syscall to cacheline size.Michal Meloun2021-02-091-6/+3
| | | | | | | | | | | | | | | Otherwise, we may miss synchronization of the last cacheline. MFC after: 3 days
* | | loader: do not autoselect smaller font than 8x16 with high res displayToomas Soome2021-02-092-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VT screen buffer size is calculated based on our default built in (8x16) font. With high-resolution display, we want to use at least 8x16 font, or we will have large unused areas on screen. MFC after: 1 week
* | | loader: remove BORDER_PIXELSToomas Soome2021-02-094-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | BORDER_PIXELS is left over from picking up the source from illumos port. Since FreeBSD VT does not use border in terminal size calculation, there is no reason why should loader use it. MFC after: 1 week
* | | kern: sonewconn: set so_options before pru_attach()Kyle Evans2021-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protocol attachment has historically been able to observe and modify so->so_options as needed, and it still can for newly created sockets. 779f106aa169 moved this to after pru_attach() when we re-acquire the lock on the listening socket. Restore the historical behavior so that pru_attach implementations can consistently use it. Note that some pru_attach() do currently rely on this, though that may change in the future. D28265 contains a change to remove the use in TCP and IB/SDP bits, as resetting the requested linger time on incoming connections seems questionable at best. This does move the assignment out from under the head's listen lock, but glebius notes that head won't be going away and applications cannot assume any specific ordering with a race between a connection coming in and the application changing socket options anyways. Discussed-with: glebius MFC-after: 1 week
* | | devfs: fix use count leak when using TIOCSCTTYMateusz Guzik2021-02-091-1/+1
| | | | | | | | | | | | | | | | | | by matching devfs_ctty_ref Fixes: 3b44443626603f65 ("devfs: rework si_usecount to track opens")
* | | Simplify the FreeBSD check using __FreeBSD__ compiler macro.Cy Schubert2021-02-0923-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week
* | | Simply FreeBSD check using __FreeBSD__ and remove OpenBSDCy Schubert2021-02-091-1/+1
| | | | | | | | | | | | MFC after: 1 week
* | | ZFS: fix assertions with INVARIANTSAlan Somers2021-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AFAICT, this was an oversight from 9e5787d2284e187abb5b654d924394a65772e004 (svn r364746). That revision inadvertently disabled assertions unconditionally. Reviewed by: freqlabs MFC after: 3 days Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D28256
* | | Revert "SO_RERROR indicates that receive buffer overflows should be handled ↵Alexander V. Chernikov2021-02-0821-100/+35
| | | | | | | | | | | | | | | | | | | | | | | | as errors." Wrong version of the change was pushed inadvertenly. This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.
* | | hid: bump HID_ITEM_MAXUSAGES to 8Warner Losh2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My YOGA requires a minimum of 7 to parse w/o an error. Since the memory savings are trivial and the yoga a popular system, bump the default up to 8. There's no API/ABI issues in doing this. This hid_item struct isn't exported to userland and the one libusbhid has is different and only shares a name... MFC After: 3 days Reviewed by: wulf@ Differential Revision: https://reviews.freebsd.org/D28543
* | | Don't check compat.linux.emul_path before loading linux(4)Edward Tomasz Napierala2021-02-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix e40787f900f to make libexec/rc/rc.d/linux retrieve the sysctl after loading the kernel module which provides it, not before. Reported By: jkim Sponsored By: The FreeBSD Foundation
* | | acpi: limit the AMDI0020/AMDI0010 workaround to an optionWarner Losh2021-02-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears that production versions of EPYC firmware get the _STA method right for these nodes. In fact, this workaround breaks on production hardware by including too many uart nodes. This work around was for pre-release hardware that wound up not having a large deployment. Move this work around to a kernel option since the machines that needed it have been powered off and are difficult to resurrect. Should there be a more significant deployment than is understood, we can restrict it based on smbios strings. Discussed with: mmacy@, seanc@, jhb@ MFC After: 3 days
* | | Turn off forgotten multipath debug messagesAlexander V. Chernikov2021-02-081-1/+0
| | | | | | | | | | | | | | | Reported by: mike tancsa<mike at sentex.net> MFC after: 3 days
* | | SO_RERROR indicates that receive buffer overflows should be handled as errors.Alexander V. Chernikov2021-02-0821-35/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors, this behavior is not the default. This is really really important for programs that use route(4) to keep in sync with the system. If we loose a message then we need to reload the full system state, otherwise the behaviour from that point is undefined and can lead to chasing bogus bug reports.
* | | wsp: Add sysctl tunable for Z-Axis inversionVladimir Kondratyev2021-02-082-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new sysctl to Wellspring Touchpad driver for controlling Z-Axis (2-finger vertical scroll) direction "hw.usb.wsp.z_invert". Submitted by: James Wright <james.wright_AT_digital-chaos_DOT_com> Reviewed by: wulf PR: 253321 Differential revision: https://reviews.freebsd.org/D28521
* | | nvme: Make nvme_ctrlr_hw_reset staticWarner Losh2021-02-082-2/+1
| | | | | | | | | | | | | | | nvme_ctrlr_hw_reset is no longer used outside of nvme_ctrlr.c, so make it static. If we need to change this in the future we can.
* | | ktls(4): Mention WITH_OPENSSL_KTLS in the ktls(4) manual pageGordon Bergling2021-02-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we ship a ktls(4) enabled OpenSSL version, mention the src.conf(5) option WITH_OPENSSL_KTLS in the manual page. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28435
* | | nvme: use NVME_GONE rather than hard-coded 0xffffffffWarner Losh2021-02-083-4/+6
| | | | | | | | | | | | | | | Make it clearer that the value 0xfffffff is being used to detect the device is gone. We use it other places in the driver for other meanings.
* | | Fix incorrect powf(3) result with x near 1 and |y| much larger than 1Steve Kargl2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adjusts the check to trigger overflow/underflow to a slightly lower value. Before: powf(9.999995e-01, -1.342177e+08) -> inf After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31 MFC after: 1 week
* | | mca: Handle inconsistent CMCI capability reportingMark Johnston2021-02-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) MFC after: 1 week
* | | amd64: fix up a braino in strlen commentMateusz Guzik2021-02-081-1/+1
| | |