aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-0199-137/+2
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* Modify the NFSv4.2 VOP_COPY_FILE_RANGE() client call to return after oneRick Macklem2020-10-011-14/+12
| | | | | | | | | | | | | | successful RPC. Without this patch, the NFSv4.2 VOP_COPY_FILE_RANGE() client call would loop until the copy "len" was completed. The problem with doing this is that it might take a considerable time to complete for a large "len". By returning after a single successful Copy RPC that copied some of the data, the application that did the copy_file_range(2) syscall will be more responsive to signal delivery for large "len" copies. Notes: svn path=/head/; revision=366303
* Clip the "len" argument to vn_generic_copy_file_range() at aRick Macklem2020-10-011-2/+12
| | | | | | | | | | | | | | | | | | | | | hole size boundary. By clipping the len argument of vn_generic_copy_file_range() to end at an exact multiple of hole size, holes are more likely to be maintained during the copy. A hole can still straddle the boundary at the end of the copy range, resulting in a block being allocated in the output file as it is being grown in size, but this will reduce the likelyhood of this happening. While here, also modify setting of blksize to better handle the case where _PC_MIN_HOLE_SIZE is returned as 1. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D26570 Notes: svn path=/head/; revision=366302
* pciconf: print PCIe CTL max read request.Konstantin Belousov2020-09-301-0/+24
| | | | | | | | | | | To not complicate existing parsers, the value is printed on a new output line. Sponsored by: Mellanox Technologies/NVIDIA Networking MFC after: 1 week Notes: svn path=/head/; revision=366300
* Avoid a dubious assignment to bio_data in aio_qbio().John Baldwin2020-09-301-2/+1
| | | | | | | | | | | | | | | A user pointer is not a suitable value for bio_data and the next block of code always overwrites bio_data anyway. Just use cb->aio_buf directly in the call to vm_fault_quick_hold_pages(). Reviewed by: kib Obtained from: CheriBSD MFC after: 1 month Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26595 Notes: svn path=/head/; revision=366296
* ahci_generic: add quirk for NXP0004 (NXP Layerscape LX2160A)Emmanuel Vadot2020-09-301-0/+17
| | | | | | | | | | | | | | | This fixes this error : (aprobe3:ahcich3:0:15:0): NOP FLUSHQUEUE. ACB: 00 00 00 00 00 00 00 00 00 00 00 00 (aprobe3:ahcich3:0:15:0): CAM status: Command timeout (aprobe3:ahcich3:0:15:0): Error 5, Retries exhausted Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: imp, mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25157 Notes: svn path=/head/; revision=366295
* acpi_resource: support multiple IRQsEmmanuel Vadot2020-09-301-14/+6
| | | | | | | | | | | | | | | Some DSDT entries have multiple interrupts for one device. Add support for it. This fixes ahci on NXP LS2160 and genet on RPi4 Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25145 Notes: svn path=/head/; revision=366294
* cache: push the lock into cache_purge_implMateusz Guzik2020-09-301-9/+2
| | | | Notes: svn path=/head/; revision=366293
* gdb(4): Don't escape GDB special characters at application layerConrad Meyer2020-09-301-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | In r351368, we introduced this XML- and GDB-encoded data. The protocol 'offset' should reflex the logical XML data offset, but unfortunately we counted the GDB escapes as well. In fact, we cannot safely do GDB character escaping at this layer at all, because we don't know what will be flushed in a packet. It is bogus to send only the first character of a two-character escape sequence. This patch "corrects" the problem by squashing these characters in the transmitted XML document. It would be nice to transmit the characters faithfully, but that is a more complicated change. Thread names are a nice convenience feature for the GDB client, but one can always inspect td_name or p_comm directly to find the true name. Reported by: Ka Ho Ng <khng300 AT gmail.com> Tested by: Ka Ho Ng Reviewed by: emaste, markj, rlibby Differential Revision: https://reviews.freebsd.org/D26599 Notes: svn path=/head/; revision=366291
* Continued ipfilter #ifdef cleanup. The r343701 log entry contains aCy Schubert2020-09-301-4/+3
| | | | | | | | | complete description. MFC after: 1 week Notes: svn path=/head/; revision=366287
* ipfilter getifname ifdef cleanup.Cy Schubert2020-09-301-28/+1
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=366286
* Resurrect ipfilter's getifname, replacing the stub with the realCy Schubert2020-09-301-11/+0
| | | | | | | | | function. MFC after: 2 months Notes: svn path=/head/; revision=366285
* riscv: Panic on PMP errorsKristof Provost2020-09-301-0/+3
| | | | | | | | | | | | | | | | Load/store/fetch access exceptions always indicate a violation of a PMP rule. We can't treat those as page faults, because updating the page table and trying again will only result in exactly the same access exception recurring. This leaves us in an endless exception loop. We cannot recover from these exceptions, so panic instead. Reviewed by: jhb Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D26544 Notes: svn path=/head/; revision=366284
* cache: use cache_has_entries where appropriate instead of opencoding itMateusz Guzik2020-09-301-6/+3
| | | | Notes: svn path=/head/; revision=366283
* riscv: Define __PCI_REROUTE_INTERRUPTJessica Clarke2020-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every other architecture defines this and this is required for interrupts to work when using QEMU's PCI VirtIO devices (which all report an interrupt line of 0) for two reasons. Firstly, interrupt line 0 is wrong; they use one of 0x20-0x23 with the lines being cycled across devices like normal. Moreover, RISC-V uses INTRNG, whose IRQs are virtual as indices into its irq_map, so even if we have the right interrupt line we still need to try and route the interrupt in order to ultimately call into intr_map_irq and get back a unique index into the map for the given line, otherwise we will use whatever happens to be in irq_map[line] (which for QEMU where the line is initialised to 0 results in using the first allocated interrupt, namely the RTC on IRQ 11 at time of commit). Note that pci_assign_interrupt will still do the wrong thing for INTRNG when using a tunable, as it will bypass INTRNG entirely and use the tunable's value as the index into irq_map, when it should instead (indirectly) call intr_map_irq to allocate a new entry for the given IRQ and treat the tunable as stating the physical line in use, which is what one would expect. This, however, is a problem shared by all INTRNG architectures, and not exclusive to RISC-V. Reviewed by: kib Approved by: kib Differential Revision: https://reviews.freebsd.org/D26564 Notes: svn path=/head/; revision=366279
* Make copy_file_range(2) Linux compatible for overflow of offset + len.Rick Macklem2020-09-301-9/+15
| | | | | | | | | | | | | | | | Without this patch, if a call to copy_file_range(2) specifies an input file offset + len that would wrap around, EINVAL is returned. I thought that was the Linux behaviour, but recent testing showed that Linux accepts this case and does the copy_file_range() to EOF. This patch changes the FreeBSD code to exhibit the same behaviour as Linux for this case. Reviewed by: asomers, kib Differential Revision: https://reviews.freebsd.org/D26569 Notes: svn path=/head/; revision=366278
* Makefile.inc1: sysent: allow subordinate sysent targets to run in parallelKyle Evans2020-09-301-0/+4
| | | | | | | | | | | | | | | makesyscalls.lua (and indeed makesyscalls.sh) are both safe to be run in parallel, so let's do it. This is a trivial difference because runtime per-target is pretty small, but I like seeing it run in parallel when my muscle memory types `make -sj4`. Reviewed by: brooks, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26594 Notes: svn path=/head/; revision=366275
* Hoist comment on fixup of ld pathBrooks Davis2020-09-291-1/+1
| | | | | | | | Reported by: jrtc27 Differential Revision: https://reviews.freebsd.org/D26591 Notes: svn path=/head/; revision=366273
* arm64: set the correct HWCAPMitchell Horne2020-09-291-1/+1
| | | | | | | | | | | | This appears to be a typo. The AdvSIMD field encodes support for half-precision floating point SIMD instructions, which corresponds to HWCAP_ASIMDHP, not HWCAP_ASIMDDP. MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366271
* Prefer --ld-path=/path/to/ld on clang >= 12Brooks Davis2020-09-291-1/+4
| | | | | | | | | | | | Clang 12 warns about passing a path to -fuse-ld and -Werror makes that an error preventing building world without this change. Reviewed by: arichardson, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26591 Notes: svn path=/head/; revision=366270
* Fallback to software for more GCM and CCM requests.John Baldwin2020-09-291-2/+2
| | | | | | | | | | | | | | | | ccr(4) uses software to handle GCM and CCM requests not supported by the crypto engine (e.g. with only AAD and no payload). This change adds a fallback for a few more requests such as those with more SGL entries than can fit in a work request (this can happen for GCM when decrypting a TLS record split across 15 or more packets). Reported by: Chelsio QA Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D26582 Notes: svn path=/head/; revision=366269
* rtwn: narrow the epoch areaBjoern A. Zeeb2020-09-291-6/+12
| | | | | | | | | | | | | | | | | | Rather than placing the epoch around the entire receive loop which might call into rtwn_rx_frame() and USB and sleep, split the loop into two[1] and leave us with one unlock/lock cycle as well. PR: 249925 Reported by: thj, (rkoberman gmail.com) Tested by: thj Suggested by: adrian [1] Reviewed by: adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation (initially, paniced my iwl lab host) Differential Revision: https://reviews.freebsd.org/D26554 Notes: svn path=/head/; revision=366268
* Rename kernel option ACPI_DMAR to IOMMU.Ruslan Bukin2020-09-2911-31/+39
| | | | | | | | | | | This is mostly needed for a common arm64/amd64 iommu code. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26587 Notes: svn path=/head/; revision=366267
* Updates to chroot(2) docsWarner Losh2020-09-291-2/+9
| | | | | | | | 1. Note what settings give historic behavior 2. Recommend jail under security considerations. Notes: svn path=/head/; revision=366266
* Standalone SX shimsWarner Losh2020-09-291-0/+22
| | | | | | | | Create a do-nothing version of SX locks. OpenZFS needs them. However, since the boot loader is single threaded, they can be nops. Notes: svn path=/head/; revision=366265
* kldconfig(8): Add EXAMPLES to the man pageFernando ApesteguĂ­a2020-09-291-4/+66
| | | | | | | | | | | | | | | Add EXAMPLES section to the man page showing the use of all flags except for -S. While here, clarify -f description. It not only suppresses diagnostic messages but it also affects the exit status of the command itself. This is shown in two of the examples. Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D26588 Notes: svn path=/head/; revision=366264
* Implement some time variables from kernelWarner Losh2020-09-292-0/+38
| | | | | | | | | OpenZFS will start using some of the kernel timekeeping bits shortly. This implements the bare minimum of that which currently is just the time_seconds variable. Notes: svn path=/head/; revision=366260
* o Rename acpi_iommu_get_dma_tag() -> iommu_get_dma_tag().Ruslan Bukin2020-09-295-7/+13
| | | | | | | | | | | | | This function isn't ACPI dependent and we may use it on FDT systems as well. o Don't repeat the function declaration, include iommu.h instead. Reviewed by: andrew, kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26584 Notes: svn path=/head/; revision=366257
* ZFS: Fix a logic bug in the FreeBSD getpages VOPMark Johnston2020-09-291-2/+4
| | | | | | | | | | | This was introduced when I merged r361287 to OpenZFS and has been fixed there already, commit 3f6bb6e43fd68e. Reported by: swills Reviewed by: allanjude, freqlabs, mmacy Notes: svn path=/head/; revision=366252
* Build debug kernels with -O2.Edward Tomasz Napierala2020-09-291-15/+4
| | | | | | | | | | | | | | | LLVM 11 changed the meaning of '-O' from '-O2' to '-O1', which resulted in debug kernels (with 'makeoptions DEBUG=-g') being built with inlining disabled, causing severe performance hit. The -O2 was already being used for building amd64, powerpc, and powerpcspe. Discussed with: jrtc27, arichardson, bdragon, jhibbits Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26471 Notes: svn path=/head/; revision=366251
* Use the 'traced' variable instead of comparing p->p_flag again.Edward Tomasz Napierala2020-09-291-1/+1
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26577 Notes: svn path=/head/; revision=366250
* Bump manual page date after 366243Mateusz Piotrowski2020-09-291-3/+3
| | | | | | | While here, address mandoc warnings. Notes: svn path=/head/; revision=366249
* Improve the input validation and processing of cookies.Michael Tuexen2020-09-292-16/+14
| | | | | | | | | | | | | | This avoids setting the association in an inconsistent state, which could result in a use-after-free situation. This can be triggered by a malicious peer, if the peer can modify the cookie without the local endpoint recognizing it. Thanks to Ned Williamson for reporting the issue. MFC after: 3 days Notes: svn path=/head/; revision=366248
* cxgbe(4): Avoid unnecessary work in the firmware during netmap tx.Navdeep Parhar2020-09-291-0/+16
| | | | | | | | | | | | Bind the netmap tx queues to a special '0xff' scheduling class which makes the firmware skip some processing related to rate limiting on the outgoing traffic. Future firmwares will do this automatically. MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=366247
* Remove duplicate line.Navdeep Parhar2020-09-291-3/+0
| | | | Notes: svn path=/head/; revision=366246
* cxgbe(4): adjust the doorbell threshold for netmap freelists to match theNavdeep Parhar2020-09-292-1/+5
| | | | | | | | | | maximum burst size used when fetching descriptors from the list. MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=366245
* cxgbe(4): display an error message when netmap cannot be enabled becauseNavdeep Parhar2020-09-291-1/+4
| | | | | | | | | the interface is down. MFC after: 1 week Notes: svn path=/head/; revision=366244
* Document the fact (bug?) that the -a option will normally processGreg Lehey2020-09-291-2/+17
| | | | | | | | | | | | | | root's calendar files three times, once each for root, toor and daemon. This relates to bug 246943, but does not solve it. See discussion in bug report for more details. PR: 246943 Reported by: wcarson.bugzilla@disillusion.net Notes: svn path=/head/; revision=366243
* cxgbe(4): fixes for netmap operation with only some queues active.Navdeep Parhar2020-09-291-77/+201
| | | | | | | | | | | | | | | | | | - Only active netmap receive queues should be in the RSS lookup table. - The RSS table should be restored for NIC operation when the last active netmap queue is switched off, not the first one. - Support repeated netmap ON/OFF on a subset of the queues. This works whether the the queues being enabled and disabled are the only ones active or not. Some kring indexes have to be reset in the driver for the second case. MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=366242
* procstat: Fix regression after 365880.Konstantin Belousov2020-09-291-8/+7
| | | | | | | | | | | | Basically it reverts one chunk that reversed the parsing logic, making legacy variants of invocation, like `procstat -a -f', non-operational. Reported and tested by: Dewayne Geraghty <dewayne@heuristicsystems.com.au> Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=366237
* Address whitespace nits in subr_rtc.cKyle Evans2020-09-281-2/+2
| | | | | | | | | These were separated out from a nearby patch from Andrew Gierth. MFC after: 3 days Notes: svn path=/head/; revision=366231
* add SIOCGIFDATA ioctlEd Maste2020-09-283-2/+16
| | | | | | | | | | | | | | | | | | | For interfaces that do not support SIOCGIFMEDIA (for which there are quite a few) the only fallback is to query the interface for if_data->ifi_link_state. While it's possible to get at if_data for an interface via getifaddrs(3) or sysctl, both are heavy weight mechanisms. SIOCGIFDATA is a simple ioctl to retrieve this fast with very little resource use in comparison. This implementation mirrors that of other similar ioctls in FreeBSD. Submitted by: Roy Marples <roy@marples.name> Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D26538 Notes: svn path=/head/; revision=366230
* For mulitcons boot, report it and which console is primaryWarner Losh2020-09-281-1/+9
| | | | | | | | | | | | | | Until we can do proper /etc/rc output on both consoles in multicons boot (or all of them if we ever generalize), report when we are booting multicons. Also report the primary console. This will be a big hint why output stops after this line (though some slow USB discovery still happens after mountroot / init starts). Reviewed by: scottl@, tsoome@ Differential Revision: https://reviews.freebsd.org/D26574 Notes: svn path=/head/; revision=366229
* Report the kernel console on the boot screenWarner Losh2020-09-282-0/+45
| | | | | | | | | | | | | | | | | | | | | | | Report what console the boot loader is telling the kernel to use: o Dual (Serial Primary) o Dual (Video Primary) o Serial o Video This allows the user to interrupt the boot and tweak the cosnole, if needed, in a trivial way. Useful for installs where the default selected may not be quite what you want, or when you are running a dual setup and need to toggle over to the other console being primary. The 'c'/'C' keys will do the cycling through the consoles. Note: you'll still have to drop into the loader to set details about serial consoles. And this doesn't change the console the loader is using. Reviewed by: kevans@ MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D26573 Notes: svn path=/head/; revision=366228
* Minor cleanup.Michael Tuexen2020-09-281-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=366226
* Fix booting arm64 EFI with LINUX_BOOT_ABI enabled.Michal Meloun2020-09-281-7/+6
| | | | | | | | | | | | Use address of the pointer passed to kernel to determine whether the pointer is a FDT block (physical address) or a module pointer (virtual kernel address). This fragment was supposed to be committed before r366196, but I accidentally skipped it in a patch series. Reported by: bz Notes: svn path=/head/; revision=366219
* Speciy the dev in an easily changed variableWarner Losh2020-09-281-14/+12
| | | | | | | | | | | | Rather than hard coding ada0 everywhere, use ${dev}. Also, set dev=vtbd0 since both qemu and bhyve support this. More work should be done to use labels instead for fstab. qemu scripts likely need adjustment. And we should also likely generate byhve scripts too. Notes: svn path=/head/; revision=366217
* Fix video on PCI heuristicWarner Losh2020-09-281-2/+4
| | | | | | | | | | | | | | | | | | The video on PCI heuristic was broken. It was supposed to infer a video device when the last element of the path was a PCI DEVICE PATH node. However, the last node in the device path is an END node, so this heuristic never fired. This leads, among other things, to bhyve only producing output in the serial connection once we leave the boot loader. This restores the dual headed boot on bhyve + UEFI (as we did in 11.2), but will favor serial in the absence of other config which may be a change from 11.2. MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D26572 Notes: svn path=/head/; revision=366216
* Use %ju and cast to (uintmax_t) to avoid using PRI* macros.Xin LI2020-09-281-2/+2
| | | | | | | Suggested by: kevlo Notes: svn path=/head/; revision=366215
* Consistently use __FBSDID("FreeBSD") for ids in usr.bin/procstat.Konstantin Belousov2020-09-2714-29/+42
| | | | | | | | | Submitted by: Juraj Lutter <juraj@lutter.sk> MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26568 Notes: svn path=/head/; revision=366210