aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r354991-r354992 (by lwhsu)stable/12Ryan Libby2020-12-191-2/+4
| | | | | | | | | | | | | | | | | | r354991: Fix GCC build. Sponsored by: The FreeBSD Foundation r354992: Initialize variable bitstr r354991 removed variable-sized object initializing on defining. For the safe reason, manually initialize the members to 0. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/12/; revision=368787
* MFC r349848 (by lwhsu):Ryan Libby2020-12-191-1/+2
| | | | | | | | | | | | | - Fix gcc build for superio(4) - Change string mapping of SUPERIO_DEV_NONE to distinguish from SUPERIO_DEV_MAX Reviewed by: imp Discussed with: avg, imp, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20880 Notes: svn path=/stable/12/; revision=368786
* MFC r368745:Ryan Libby2020-12-191-9/+0
| | | | | | | | | | | | | ice: quiet -Wredundant-decls Reapply r364240 after driver update in r365617. Reviewed by: lwhsu Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27561 Notes: svn path=/stable/12/; revision=368785
* MFC r368564:Ryan Libby2020-12-191-2/+0
| | | | | | | | | | | qat: quiet -Wredundant-decls Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27554 Notes: svn path=/stable/12/; revision=368784
* MFC r368563:Ryan Libby2020-12-191-0/+1
| | | | | | | | | | | ntb: quiet gcc -Wreturn-type Reviewed by: cem, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27553 Notes: svn path=/stable/12/; revision=368783
* MFC r347628:Ryan Libby2020-12-192-2/+2
| | | | | | | | | | | | | x86: spell vpxor %zmm0 as vpxord Fix gcc/gas amd64 & i386 build after r347566. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20264 Notes: svn path=/stable/12/; revision=368782
* MFC r343672 (by vangyzen):Ryan Libby2020-12-191-0/+4
| | | | | | | | | rtld: pacify -Wmaybe-uninitialized from gcc6 Sponsored by: Dell EMC Isilon Notes: svn path=/stable/12/; revision=368781
* MFC r343671 (by vangyzen):Ryan Libby2020-12-191-0/+9
| | | | | | | | | libm: squelch -Woverflow from gcc6 Sponsored by: Dell EMC Isilon Notes: svn path=/stable/12/; revision=368780
* MFC r368391: if_em.ko: fix module build outside of kernel build environmentEugene Grosbein2020-12-181-1/+1
| | | | Notes: svn path=/stable/12/; revision=368760
* MFC r368148: fix hastd(8)Eugene Grosbein2020-12-181-0/+1
| | | | | | | | | | hastd(8) assumes it has no extra file descriptors opened and aborts otherwise, so call closefrom() early. PR: 227461 Notes: svn path=/stable/12/; revision=368758
* MFC r368593:Michael Tuexen2020-12-181-4/+62
| | | | | | | | | | | | | | | | | | Clean up more resouces of an existing SCTP association in case of a restart. This fixes a use-after-free scenario, which was reported by Felix Wilhelm from Google in case a peer is able to modify the cookie. However, this can also be triggered by an assciation restart under some specific conditions. MFC r368622: Harden the handling of outgoing streams in case of an restart or INIT collision. This avouds an out-of-bounce access in case the peer can break the cookie signature. Thanks to Felix Wilhelm from Google for reporting the issue. Notes: svn path=/stable/12/; revision=368757
* MFC r368394:Michael Tuexen2020-12-182-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | When dropping packets (RRQ or WRQ) for debugging, report the send operation as successful. Reporting a failure stops the transfer instead of using timeouts. MFC r368521: Fix the TFTP client when performing a RRQ for files smaller than 512 bytes and the server not sending an OACK: * Close the file. * Report the correct the number of received blocks. MFC r368647: Improve the counting of blocks used to transfer a file from the server to the client in case of not using an OACK: Don't miss the first block in case of it is not also the last one. MFC r368657: When receiving a file having a length, which is a mulitple of the blocksize, close the file once it is received. Notes: svn path=/stable/12/; revision=368755
* MFC r350739-r350740 (by cem)Ryan Libby2020-12-182-0/+6
| | | | | | | | | | | | | | | | | | | | r350739: Disable useless -Wformat-zero-length It is part of -Wformat, which is enabled by -Wall. Empty format strings are well defined and it is perfectly reasonable to expect them in a formatting interface. r350740: r350739 try #2 For some inexplicable reason, C++ compilers reject the -Wno- flag, and also (ab)use CWARNFLAGS. Reported by: imp Notes: svn path=/stable/12/; revision=368753
* MFC r357019:Ryan Libby2020-12-181-1/+2
| | | | | | | | | | | | | | | | | | uma: fix zone domain overlaying pcpu cache with disabled cpus UMA zone structures have two arrays at the end which are sized according to the machine: an array of CPU count length, and an array of NUMA domain count length. The CPU counting was wrong in the case where some CPUs are disabled (when mp_ncpus != mp_maxid + 1), and this caused the second array to be overlaid with the first. Reported by: olivier Reviewed by: jeff, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23318 Notes: svn path=/stable/12/; revision=368752
* MFC r368550:Guangyuan Yang2020-12-181-4/+3
| | | | | | | | | | | | Fix a grammar error on locate(1). While here, also fix a useless .Tn reported by mandoc. PR: 251746 Sumbitted by: David Schlachter <fbsd-bugzilla@schlachter.ca> Notes: svn path=/stable/12/; revision=368748
* MFC r368519:Robert Wing2020-12-174-3/+11
| | | | | | | | | | | | | Add deprecation notice for bvmconsole and bvmdebug. Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed. Mark the '-b' and '-g' flag as deprecated for bhyve(8). These will be removed/gone in 13. Notes: svn path=/stable/12/; revision=368733
* MFC r368306:Mark Johnston2020-12-171-17/+39
| | | | | | | sdt: Create providers and probes in separate passes when loading sdt.ko Notes: svn path=/stable/12/; revision=368726
* MFC r368167,r368187,r368203:Michal Meloun2020-12-171-17/+50
| | | | | | | | | | | | | | | r368167: NVME: Don't try to swap data on little endian machines. These swapping functions violate BUSDMA contract - we cannot write to armed (by bus_dmamap_sync(PRE_..)) buffers. Remove them at least from little endian machines until a better solution will be developed. r368187: Unbreak r368167 in userland. Decorate unused arguments. r368203: Always use the __unused attribute even for potentially unused parameters. Notes: svn path=/stable/12/; revision=368717
* MFC r368511: ee(1) man page bugfixesGordon Bergling2020-12-171-199/+202
| | | | | | | | - whitespace cleanups - new sentence, new line Notes: svn path=/stable/12/; revision=368716
* MFC r368364:Michal Meloun2020-12-171-1/+1
| | | | | | | | | DesignWare PCIe driver: Don't call bus_generic_attach() twice. bus_generic_attach() should be called from the attach function of the real implementation, not from the common init function. Notes: svn path=/stable/12/; revision=368715
* MFC r368207,368607:Martin Matuska2020-12-1665-191/+1329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r368207: Update libarchive to 3.5.0 Relevant vendor changes: Issue #1258: add archive_read_support_filter_by_code() PR #1347: mtree digest reader support Issue #1381: skip hardlinks pointing to itself on extraction PR #1387: fix writing of cpio archives with hardlinks without file type PR #1388: fix rdev field in cpio format for device nodes PR #1389: completed support for UTF-8 encoding conversion PR #1405: more formats in archive_read_support_format_by_code() PR #1408: fix uninitialized size in rar5_read_data PR #1409: system extended attribute support PR #1435: support for decompression of symbolic links in zipx archives Issue #1456: memory leak after unsuccessful archive_write_open_filename MFC r368607: Sync libarchive with vendor. Vendor changes: Issue #1461: Unbreak build without lzma Issue #1462: warc reader: Fix build with gcc11 Issue #1463: Fix code compatibility in test_archive_read_support.c Issue #1464: Use built-in strnlen on platforms where not available Issue #1465: warc reader: fix undefined behaviour in deconst() function Notes: svn path=/stable/12/; revision=368706
* MFC 368585:Ian Lepore2020-12-167-78/+1634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide userland notification of gpio pin changes ("userland gpio interrupts"). This is an import of the Google Summer of Code 2018 project completed by Christian Kramer (and, sadly, ignored by us for two years now). The goals stated for that project were: FreeBSD already has support for interrupts implemented in the GPIO controller drivers of several SoCs, but there are no interfaces to take advantage of them out of user space yet. The goal of this work is to implement such an interface by providing descriptors which integrate with the common I/O system calls and multiplexing mechanisms. The initial imported code supports the following functionality: - A kernel driver that provides an interface to the user space; the existing gpioc(4) driver was enhanced with this functionality. - Implement support for the most common I/O system calls / multiplexing mechanisms: - read() Places the pin number on which the interrupt occurred in the buffer. Blocking and non-blocking behaviour supported. - poll()/select() - kqueue() - signal driven I/O. Posting SIGIO when the O_ASYNC was set. - Many-to-many relationship between pins and file descriptors. - A file descriptor can monitor several GPIO pins. - A GPIO pin can be monitored by multiple file descriptors. - Integration with gpioctl and libgpio. I added some fixes (mostly to locking) and feature enhancements on top of the original gsoc code. The feature ehancements allow the user to choose between detailed and summary event reporting. Detailed reporting provides a record describing each pin change event. Summary reporting provides the time of the first and last change of each pin, and a count of how many times it changed state since the last read(2) call. Another enhancement allows the recording of multiple state change events on multiple pins between each call to read(2) (the original code would track only a single event at a time). The phabricator review for these changes timed out without approval, but I cite it below anyway, because the review contains a series of diffs that show how I evolved the code from its original state in Christian's github repo for the gsoc project to what is being commited here. (In effect, the phab review extends the VC history back to the original code.) Submitted by: Christian Kramer Obtained from: https://github.com/ckraemer/freebsd/tree/gsoc2018 Differential Revision: https://reviews.freebsd.org/D27398 Notes: svn path=/stable/12/; revision=368702
* MFC r368478:Cy Schubert2020-12-1654-609/+2532
| | | | | | | | | | | MFV r368464: Update unbound from 1.12.0 to 1.13.0 Security: CVE-2020-28935 Notes: svn path=/stable/12/; revision=368693
* Fix fallout from r368689Vladimir Kondratyev2020-12-161-1/+1
| | | | | | | This is a direct commit because of different KBDC type in HEAD and STABLE12 Notes: svn path=/stable/12/; revision=368691
* MFC r368366Vladimir Kondratyev2020-12-163-3/+46
| | | | | | | | | | ig4(4): Add PCI IDs for Intel Tiger Lake Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D27483 Notes: svn path=/stable/12/; revision=368690
* MFC: r367349, r367854, r368365, r368374(by cem)Vladimir Kondratyev2020-12-163-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r367349: atkbdc(4): Add quirk for "System76 lemur Pro" laptops. Currently atkbdc(4) assumes all coreboot BIOSes belonging to Chromebooks and unconditionally sets a number of quirks to workaround known issues. Exclude "System76" laptops from this set as they appeared to be a traditional hardware ("lemur Pro" is a rebranded Clevo chassis) with coreboot firmware on board. KBDC_QUIRK_KEEP_ACTIVATED quirk activated for Chromebook platform makes keyboard on this devices inoperable. "Purism Librem" laptops may require the same exclusion too. PR: 250711 Reported by: nick.lott@gmail.com r367854: psm(4): Disable AUX multiplexer probing on all Lenovo laptops. Rudimentary AUX multiplexing support was added to kernel to make possible touchpad initialization on some HP EliteBook laptops with trackpoint. Disable multiplexer probing on all Lenovo laptops now as they use touchpad pass-through port rather than AUX multiplexer to connect trackpoint and at least two model (X120e and X121e) is known for getting PS/2 AUX port dysfunctional after switching back to hidden multiplexing mode. AUX MUX probing can be reenabled with setting of hw.psm.mux_disabled loader tunable to 0. PR: 249987 Reported by: jwb r368365: atkbd(4): Change quirk table end-of-list marker to NULL vendor/maker/product This fixes regression introduced in r367349 which effectively resulted in truncation of quirk table. PR: 250711 Submitted by: grembo Reported by: Matthias Apitz <guru@unixarea.de> r368374 (by cem): atkbd(4): Just use nitems() for quirk enumeration Reviewed by: imp, wulf Differential Revision: https://reviews.freebsd.org/D27489 Notes: svn path=/stable/12/; revision=368689
* MFC r368326: kern: soclose: don't sleep on SO_LINGER w/ timeout=0Kyle Evans2020-12-151-1/+2
| | | | | | | | | | | | | | This is a valid scenario that's handled in the various protocol layers where it makes sense (e.g., tcp_disconnect and sctp_disconnect). Given that it indicates we should immediately drop the connection, it makes little sense to sleep on it. This could lead to panics with INVARIANTS. On non-INVARIANTS kernels, this could result in the thread hanging until a signal interrupts it if the protocol does not mark the socket as disconnected for whatever reason. Notes: svn path=/stable/12/; revision=368683
* MFC r368388: bectl: simplify the tail end of the jail cmdKyle Evans2020-12-151-4/+2
| | | | | | | | | | | | This has already confused me once (and I'm pretty sure I wrote it), so let's clarify: unjailing after the command has completed will only happen if we're interactive and -U has not been specified. This just folds two conditionals together to make it obvious how -b/-U interact with each other. Notes: svn path=/stable/12/; revision=368682
* MFC r368462: cpuset_set{affinity,domain}: do not allow empty masksKyle Evans2020-12-151-5/+14
| | | | | | | | | | | | | | | | | | cpuset_modify() would not currently catch this, because it only checks that the new mask is a subset of the root set and circumvents the EDEADLK check in cpuset_testupdate(). This change both directly validates the mask coming in since we can trivially detect an empty mask, and it updates cpuset_testupdate to catch stuff like this going forward by always ensuring we don't end up with an empty mask. The check_mask argument has been renamed because the 'check' verbiage does not imply to me that it's actually doing a different operation. We're either augmenting the existing mask, or we are replacing it entirely. Notes: svn path=/stable/12/; revision=368681
* MFC r368461: kern: cpuset: resolve race between cpuset_lookup/cpuset_relKyle Evans2020-12-151-2/+10
| | | | | | | | | | | | | | | | | | | The race plays out like so between threads A and B: 1. A ref's cpuset 10 2. B does a lookup of cpuset 10, grabs the cpuset lock and searches cpuset_ids 3. A rel's cpuset 10 and observes the last ref, waits on the cpuset lock while B is still searching and not yet ref'd 4. B ref's cpuset 10 and drops the cpuset lock 5. A proceeds to free the cpuset out from underneath B Resolve the race by only releasing the last reference under the cpuset lock. Thread A now picks up the spinlock and observes that the cpuset has been revived, returning immediately for B to deal with later. Notes: svn path=/stable/12/; revision=368680
* MFC r368460: kern: cpuset: plug a unr leakKyle Evans2020-12-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | cpuset_rel_defer() is supposed to be functionally equivalent to cpuset_rel() but with anything that might sleep deferred until cpuset_rel_complete -- this setup is used specifically for cpuset_setproc. Add in the missing unr free to match cpuset_rel. This fixes a leak that was observed when I wrote a small userland application to try and debug another issue, which effectively did: cpuset(&newid); cpuset(&scratch); newid gets leaked when scratch is created; it's off the list, so there's no mechanism for anything else to relinquish it. A more realistic reproducer would likely be a process that inherits some cpuset that it's the only ref for, but it creates a new one to modify. Alternatively, administratively reassigning a process' cpuset that it's the last ref for will have the same effect. Notes: svn path=/stable/12/; revision=368679
* MFC r368555: caroot: update bundleKyle Evans2020-12-1511-0/+134
| | | | | | | | | Summary: - One (1) added - Ten (10) removed Notes: svn path=/stable/12/; revision=368678
* MFC r368525:Kenneth D. Merry2020-12-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r368525 | ken | 2020-12-10 16:06:06 -0500 (Thu, 10 Dec 2020) | 17 lines Add the LTO-9 density code to libmt and the mt(1) man page. These values are taken directly from the density report from an IBM LTO-9 tape drive. (Using mt getdensity) A LTO-9 drive stores 18TB raw (45TB with compression) on an LTO-9 tape. lib/libmt/mtlib.c: Add the LTO-9 density code, and bpmm/bpi values. usr.bin/mt/mt.1: Add the LTO-9 density code, bpmm/bpi values and number of tracks. Bump the man page date. ------------------------------------------------------------------------ Sponsored by: Spectra Logic Notes: svn path=/stable/12/; revision=368674
* MFC r368239:Kristof Provost2020-12-155-18/+0
| | | | | | | | | | | | pf tests: Re-enable panicing tests We've fixed the vnet/epair cleanup race, so it is now safe to re-enable these tests. Sponsored by: Modirum MDPay Notes: svn path=/stable/12/; revision=368666
* MFC r368238:Kristof Provost2020-12-152-12/+2
| | | | | | | | | | | | net: Revert vnet/epair cleanup race mitigation Revert the mitigation code for the vnet/epair cleanup race (done in r365457). r368237 introduced a more reliable fix. Sponsored by: Modirum MDPay Notes: svn path=/stable/12/; revision=368665
* MFC r368237:Kristof Provost2020-12-151-2/+14
| | | | | | | | | | | | | | | | | | | | if: Fix panic when destroying vnet and epair simultaneously When destroying a vnet and an epair (with one end in the vnet) we often panicked. This was the result of the destruction of the epair, which destroys both ends simultaneously, happening while vnet_if_return() was moving the struct ifnet to its home vnet. This can result in a freed ifnet being re-added to the home vnet V_ifnet list. That in turn panics the next time the ifnet is used. Prevent this race by ensuring that vnet_if_return() cannot run at the same time as if_detach() or epair_clone_destroy(). PR: 238870, 234985, 244703, 250870 Sponsored by: Modirum MDPay Notes: svn path=/stable/12/; revision=368663
* MFC r368458:Mitchell Horne2020-12-151-1/+1
| | | | | | | arm64: fix struct l_sigaction_t layout Notes: svn path=/stable/12/; revision=368661
* MFC r368281:Mitchell Horne2020-12-151-2/+4
| | | | | | | em: fix a null de-reference in em_free_pci_resources Notes: svn path=/stable/12/; revision=368660
* MFC r368588:Kristof Provost2020-12-151-1/+1
| | | | | | | | | | | | | pf: Allow net.pf.request_maxcount to be set from loader.conf Mark request_maxcount as RWTUN so we can set it both at runtime and from loader.conf. This avoids users getting caught out by the change from tunable to run time configuration. Suggested by: Franco Fichtner Notes: svn path=/stable/12/; revision=368656
* MFC r368561:Brooks Davis2020-12-144-2/+7
| | | | | | | | | | | | | | | | ndis(4): expand deprecation to the whole driver nids(4) was a clever idea in the early 2000's when the market was flooded with 10/100 NICs with Windows-only drivers, but that hasn't been the case for ages and the driver has had no meaningful maintenance in ages. It only supports Windows-XP era drivers. Reviewed by: imp, bcr Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27527 Notes: svn path=/stable/12/; revision=368646
* MFC r368543:Brooks Davis2020-12-141-7/+7
| | | | | | | | | | | style(9): Correct whitespace in struct definitions struct ifconf and struct ifreq use the odd style "struct<tab>foo". struct ifdrv seems to have tried to follow this but was committed with spaces in place of most tabs resulting in "struct<space><space>ifdrv". Notes: svn path=/stable/12/; revision=368644
* MFC 368004: Pull the check for VM ownership into ppt_find().John Baldwin2020-12-141-70/+58
| | | | | | | | | | This reduces some code duplication. One behavior change is that ppt_assign_device() will now only succeed if the device is unowned. Previously, a device could be assigned to the same VM multiple times, but each time it was assigned, the device's state was reset. Notes: svn path=/stable/12/; revision=368642
* MFC 368003:John Baldwin2020-12-147-1/+53
| | | | | | | | | | | | | | | | | | | Honor the disabled setting for MSI-X interrupts for passthrough devices. Add a new ioctl to disable all MSI-X interrupts for a PCI passthrough device and invoke it if a write to the MSI-X capability registers disables MSI-X. This avoids leaving MSI-X interrupts enabled on the host if a guest device driver has disabled them (e.g. as part of detaching a guest device driver). This was found by Chelsio QA when testing that a Linux guest could switch from MSI-X to MSI interrupts when using the cxgb4vf driver. While here, explicitly fail requests to enable MSI on a passthrough device if MSI-X is enabled and vice versa. Notes: svn path=/stable/12/; revision=368641
* Merge OpenSSL 1.1.1i.Jung-uk Kim2020-12-14476-1033/+1119
| | | | | | | | Note this is a direct commit because assembly code was moved to a new place on head. Notes: svn path=/stable/12/; revision=368639
* MFC r368275: nvme: Fix typo in definitionChuck Tuffli2020-12-142-2/+2
| | | | Notes: svn path=/stable/12/; revision=368638
* MFC r364602: bhyve: NVMe set nominal health valuesChuck Tuffli2020-12-141-0/+5
| | | | Notes: svn path=/stable/12/; revision=368637
* MFC r368414:Mark Johnston2020-12-142-2/+18
| | | | | | | | | arm: Let the GDB stub write to SP, LR and GP registers PR: 251463 Notes: svn path=/stable/12/; revision=368636
* MFC r368161:Michal Meloun2020-12-143-1/+6
| | | | | | | Store MPIDR register in pcpu. Notes: svn path=/stable/12/; revision=368631
* MFC r367955:Michal Meloun2020-12-141-0/+1
| | | | | | | | Ensure that the buffer is in nvme_single_map() mapped to single segment. Not a functional change. Notes: svn path=/stable/12/; revision=368630
* MFC r367865:Michal Meloun2020-12-141-3/+0
| | | | | | | | | Also pass interrupt binding request to non-root interrupt controllers. There are message based controllers that can bind interrupts even if they are not implemented as root controllers (such as the ITS subblock of GIC). Notes: svn path=/stable/12/; revision=368629