aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-2152-724/+3291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Notes: svn path=/head/; revision=365938
* atomic_common.h: Fix the volatile qualifier placement in atomic_load_ptrJessica Clarke2020-09-201-1/+1
| | | | | | | | | | | | | | | | This was broken in r357940 which introduced the __typeof use. We need the volatile qualifier to be on the pointee not the pointer otherwise it does nothing. This was found by mhorne in D26498, noticing there was a problem (a spin loop condition was hoisted for RISC-V boot code) but not the root cause of it. Reported by: mhorne Reviewed by: mhorne, mjg Approved by: mhorne, mjg Differential Revision: https://reviews.freebsd.org/D26500 Notes: svn path=/head/; revision=365932
* amd64 pmap: handle cases where pml4 page table page is not allocated.Konstantin Belousov2020-09-201-6/+8
| | | | | | | | | | | | Possible in LA57 pmap config. Noted by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26492 Notes: svn path=/head/; revision=365931
* Remove unused nhop_ref_any() function.Alexander V. Chernikov2020-09-206-13/+0
| | | | | | | | | Remove "opt_mpath.h" header where not needed. No functional changes. Notes: svn path=/head/; revision=365930
* Adjust DMA alignment for USB stack.Michal Meloun2020-09-201-0/+1
| | | | | | | | | | It should be at least as large as the maximum value of caheline size for currently known CPUs. MFC after: 2 weeks Notes: svn path=/head/; revision=365929
* arm: allwinner: aw_nmi: Fix wrong logic when we disable the nmiEmmanuel Vadot2020-09-201-4/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=365927
* Add missing assignment forgotten in r365899Michal Meloun2020-09-205-0/+5
| | | | | | | | | Noticed by: mav MFC after: 1 month MFC with: r365899 Notes: svn path=/head/; revision=365926
* Fix gw updates / flag updates during route changes.Alexander V. Chernikov2020-09-202-1/+7
| | | | | | | | | | | * Zero gw_sdl if switching to interface route - the assumption that underlying storage is zeroed is incorrect with route changes. * Apply proper flag mask to rte. Reported by: vangyzen Notes: svn path=/head/; revision=365925
* Apply an opimization for the kernels used by cexp(x) and cexpf(x) submittedStefan Eßer2020-09-202-6/+8
| | | | | | | | | | | | | by Steve Kargl: - Use sincos[f] instead of a call to cos[f] and a call to sin[f]. - While here, alphabetize declaration. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl) Notes: svn path=/head/; revision=365922
* Apply fix for ld80 and ld128 submitted by Steve Kargl:Stefan Eßer2020-09-202-10/+12
| | | | | | | | | | | | | | | | - Micro-optimization: use sincosl(x) instead of a call to cosl(x) and a call to sinl(x). Argument reduction is done once not twice. - Use a long double constant instead of an invalid double constant. - Spell scale2 correctly He could not test ld128, so that patch is untested. Submitted by: sgk at troutmask.apl.washington.edu (Steve Kargl) Notes: svn path=/head/; revision=365921
* Update the libufs cgget() and cgput() interfaces to have a similarKirk McKusick2020-09-1910-35/+95
| | | | | | | | | | | | | | API to the sbget() and sbput() interfaces. Specifically they take a file descriptor pointer rather than the struct uufsd *disk pointer used by the libufs cgread() and cgwrite() interfaces. Update fsck_ffs to use these revised interfaces. No functional changes intended. Sponsored by: Netflix Notes: svn path=/head/; revision=365919
* Fix for use of the XHCI driver on Cortex-A72 by adding a missing cacheHans Petter Selasky2020-09-191-0/+13
| | | | | | | | | | | | flush operation before writing to the XHCI_ERSTBA_LO/HI register(s). PR: 237666 Discussed with: Mark Millard <marklmi@yahoo.com> MFC after: 1 week Sponsored by: Mellanox Technologies // Nvidia Notes: svn path=/head/; revision=365918
* The fsdb(8) utility uses the fsck_ffs(8) disk I/O interfaces, soKirk McKusick2020-09-195-18/+33
| | | | | | | | | | switch from using libufs's bread() to using fsck_ffs's getdatablk() when importing tools/diag/prtblnos's prtblknos(). Sponsored by: Netflix Notes: svn path=/head/; revision=365912
* fix integer underflow in getgrnam_r and getpwnam_rAlan Somers2020-09-192-4/+24
| | | | | | | | | | | | | | | | | | | Sometimes nscd(8) will return a 1-byte buffer for a nonexistent entry. This triggered an integer underflow in grp_unmarshal_func, causing getgrnam_r to return ERANGE instead of 0. Fix the user's buffer size check, and add a correct check for a too-small nscd buffer. PR: 248932 Event: September 2020 Bugathon Reviewed by: markj MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D26204 Notes: svn path=/head/; revision=365910
* Address compiler warnings in C code used by the DTrace test suite.Mark Johnston2020-09-1933-112/+105
| | | | | | | | Reported by: Jenkins MFC after: 1 week Notes: svn path=/head/; revision=365907
* Fix some nits in 1G page support in the amd64 pmap.Mark Johnston2020-09-191-46/+66
| | | | | | | | | | | | | | | | | | - Move assertions out of the main loop to avoid duplicate conditional expressions, and improve assertion messages. - Fix va_next updates. In some cases we were not doing the wraparound check before continuing the loop. - Use the right va_next. In pmap_advise() and pmap_copy() we would step through 1G pages 2M at a time. - Copy 1G mappings in pmap_copy(). Reviewed by: alc, kib MFC with: r365518 Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26463 Notes: svn path=/head/; revision=365906
* diskless(8): Correct Sections out of conventional order errorGordon Bergling2020-09-191-5/+5
| | | | | | | | Event: September 2020 Bugathon MFC after: 1 week Notes: svn path=/head/; revision=365905
* crypto(7): Correct Sections out of conventional order errorGordon Bergling2020-09-191-4/+4
| | | | | | | | Event: September 2020 Bugathon MFC after: 1 week Notes: svn path=/head/; revision=365904
* src.conf(5): Fix some mandoc issues in source filesGordon Bergling2020-09-193-4/+2
| | | | | | | | | | | - new sentence, new line - blank line in fill mode Event: September 2020 Bugathon MFC after: 1 week Notes: svn path=/head/; revision=365903
* Cirrus-CI: skip svn_head branchEd Maste2020-09-191-0/+1
| | | | | | | | | | svn_head has the same content as the master or main branch (it's just the result of a `git svn` conversion instead of svn2git). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365902
* Fix dtrace tools bootstrap on non-FreeBSD after OpenZFS importAlex Richardson2020-09-197-54/+21
| | | | | | | | | | | | This required surprisingly few build system changes and only two changes to the openZFS compat headers which have been upstreamed as https://github.com/openzfs/zfs/pull/10863 Reviewed By: #zfs, freqlabs Differential Revision: https://reviews.freebsd.org/D26193 Notes: svn path=/head/; revision=365901
* Implement workaround for broken access to configuration space.Michal Meloun2020-09-191-34/+21
| | | | | | | | | Due to a HW bug in the RockChip PCIe implementation, attempting to access a non-existent register in the configuration space will throw an exception. Use new bus functions bus_peek() and bus_poke() to overcomme this limitation. Notes: svn path=/head/; revision=365900
* Add NetBSD compatible bus_space_peek_N() and bus_space_poke_N() functions.Michal Meloun2020-09-1915-4/+544
| | | | | | | | | | | | | | | | | | | | | | | | | One problem with the bus_space_read_N() and bus_space_write_N() family of functions is that they provide no protection against exceptions which can occur when no physical hardware or device responds to the read or write cycles. In such a situation, the system typically would panic due to a kernel-mode bus error. The bus_space_peek_N() and bus_space_poke_N() family of functions provide a mechanism to handle these exceptions gracefully without the risk of crashing the system. Typical example is access to PCI(e) configuration space in bus enumeration function on badly implemented PCI(e) root complexes (RK3399 or Neoverse N1 N1SDP and/or access to PCI(e) register when device is in deep sleep state. This commit adds a real implementation for arm64 only. The remaining architectures have bus_space_peek()/bus_space_poke() emulated by using bus_space_read()/bus_space_write() (without exception handling). MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25371 Notes: svn path=/head/; revision=365899
* Move finalize_components_config from get_params to cmd_*.Colin Percival2020-09-191-1/+8
| | | | | | | | | | | | | | | This allows us to redirect its output in cmd_cron, so that the "src component not installed, skipped" message will be treated the same way as other output from freebsd-update cron: Sent in an email to root (or other address specified) if there are updates to install, and silenced otherwise. PR: 202492 MFC After: 1 week Differential Revision: https://reviews.freebsd.org/D26432 Notes: svn path=/head/; revision=365898
* caroot: update base storeKyle Evans2020-09-195-0/+265
| | | | | | | | | | | Count: - Two (2) removed - Three (3) added MFC after: 3 days Notes: svn path=/head/; revision=365896
* Fix a LOR between the NFS server and server side krpc.Rick Macklem2020-09-181-2/+3
| | | | | | | | | | | | | | | | | | Recent testing of the NFS-over-TLS code found a LOR between the mutex lock used for sessions and the sleep lock used for server side krpc socket structures in nfsrv_checksequence(). This was fixed by r365789. A similar bug exists in nfsrv_bindconnsess(), where SVC_RELEASE() is called while mutexes are held. This patch applies a fix similar to r365789, moving the SVC_RELEASE() call down to after the mutexes are released. This patch fixes the problem by moving the SVC_RELEASE() call in nfsrv_checksequence() down a few lines to below where the mutex is released. MFC after: 1 week Notes: svn path=/head/; revision=365895
* MFV 2.0-rc2Matt Macy2020-09-18135-524/+2672
|\ | | | | | | | | | | | | | | - Fixes divide by zero for unusual hz - remove cryptodev dependency Notes: svn path=/head/; revision=365894
| * Update openzfs to 2.0.0-rc2-g4ce06fvendor/openzfs/2.0-rc2-g4ce06fMatt Macy2020-09-18134-524/+2671
| | | | | | | | | | Notes: svn path=/vendor-sys/openzfs/dist/; revision=365892 svn path=/vendor-sys/openzfs/2.0-rc2-g4ce06f/; revision=365893; tag=vendor/openzfs/2.0-rc2-g4ce06f
* | amd64 pmap_pkru_same: prev_ppr was always NULLEric van Gyzen2020-09-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix the logic so it works as it appears. Reported by: Coverity Reviewed by: kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: D26211 (in progress, so omitting full URL) Notes: svn path=/head/; revision=365890
* | Install library symlinks atomically.Mark Johnston2020-09-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we do for shared library binaries, pass -S to install(1) when installing symlinks. Doing so helps avoid transient failures when libraries are being reinstalled, which seems to be the root cause of spurious libgcc_s.so link failures during CI builds. PR: 233769 Reviewed by: emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26453 Notes: svn path=/head/; revision=365889
* | ys/contrib/dev/ath: remove unintentional double semicolonEd Maste2020-09-181-1/+1
| | | | | | | | | | | | | | Approved by: adrian Notes: svn path=/head/; revision=365888
* | build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-1836-22/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455 Notes: svn path=/head/; revision=365887
* | vm_ooffset_t is now unsignedEric van Gyzen2020-09-187-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | vm_ooffset_t is now unsigned. Remove some tests for negative values, or make other adjustments accordingly. Reported by: Coverity Reviewed by: kib markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26214 Notes: svn path=/head/; revision=365886
* | arm64: generate ISO release imagesMitchell Horne2020-09-181-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some IPMI implementations on arm64 are reportedly unable to load our memstick installer images, but support the older ISO format. Start generating these for arm64. Unlike installer ISOs for other platforms, these images are UEFI-only. Reviewed by: emaste Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26452 Notes: svn path=/head/; revision=365884
* | pkgbase: use consistent annotation for objectk eysKyle Evans2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Everywhere else we use objects ("scripts", generally) we do sepcify the optional colon. Be consistent and do the same for directories. PR: 249273 Submitted by: Martin <martin.jakob gmx com> MFC after: 1 week Notes: svn path=/head/; revision=365883
* | Remove unnecessary include "../Makefile.inc"Alex Richardson2020-09-181-1/+0
| | | | | | | | | | | | | | | | | | This is already pulled in by bsd.init.mk. Reported By: kevans Notes: svn path=/head/; revision=365882
* | Initialize some local variables earlierMitchell Horne2020-09-182-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the initialization of these variables to the beginning of their respective functions. On our end this creates a small amount of unneeded churn, as these variables are properly initialized before their first use in all cases. However, changing this benefits at least one downstream consumer (NetApp) by allowing local and future modifications to these functions to be made without worrying about where the initialization occurs. Reviewed by: melifaro, rscheff Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26454 Notes: svn path=/head/; revision=365881
* | Add pargs, penv, pwdx commands and aliases to procstat(1).Konstantin Belousov2020-09-187-97/+360
| | | | | | | | | | | | | | | | | | | | | | Intent is to mimic Solaris commands with the same names. Submitted by: Juraj Lutter <juraj@lutter.sk> MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26310 Notes: svn path=/head/; revision=365880
* | Assert we are not traversing through superpages in the arm64 pmap.Mark Johnston2020-09-181-8/+15
| | | | | | | | | | | | | | | | | | | | Reviewed by: alc, andrew MFC after: 1 week Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26465 Notes: svn path=/head/; revision=365879
* | Ensure that a protection key is selected in pmap_enter_largepage().Mark Johnston2020-09-181-12/+12
| | | | | | | | | | | | | | | | | | | | Reviewed by: alc, kib Reported by: Coverity MFC with: r365518 Differential Revision: https://reviews.freebsd.org/D26464 Notes: svn path=/head/; revision=365878
* | Fix error checking in shm_create_largepage().Mark Johnston2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed by: alc, kib Reported by: Coverity MFC with: r365524 Differential Revision: https://reviews.freebsd.org/D26464 Notes: svn path=/head/; revision=365877
* | libarchive: fix mismatch between library and test configurationAlex Richardson2020-09-183-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was investigating libarchive test failures on CheriBSD and it turns out we get a reproducible SIGBUS for test_archive_m5, etc. Debugging this shows that libarchive and the tests disagree when it comes to the definition of archive_md5_ctx: libarchive assumes it's the OpenSSL type whereas the test use the libmd type. The latter is not necessarily aligned enough to store a pointer (16 bytes for CHERI RISC-V), so we were crashing when storing EVP_MD_CTX* to an 8-byte-aligned archive_md5_ctx. To avoid problems like this in the future, factor out the common compiler flags into a Makefile.inc and include that from the tests Makefile. Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D26469 Notes: svn path=/head/; revision=365876
* | crypto_buffer(9): Bring back the reference for bus_dma(9)Gordon Bergling2020-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | The reference was accidentally deleted in r365855. Reported by: jhb Pointy hat to: gbe Notes: svn path=/head/; revision=365875
* | Use atf_fail instead of exit 1 to indicate mpath tests failure.Alexander V. Chernikov2020-09-182-23/+12
| | | | | | | | Notes: svn path=/head/; revision=365874
* | Fix byte-reversal of language ID in string descriptor.Peter Grehan2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The language id of String Descriptors in usb mouse is 0x0904, while the spec require 0x0409 (English - United States) Submitted by: Wanpeng Qian Reviewed by: grehan Approved by: grehan (#bhyve) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26472 Notes: svn path=/head/; revision=365873
* | cxgbe(4): add the firmware binaries instead of the empty files that were addedNavdeep Parhar2020-09-183-0/+0
| | | | | | | | | | | | | | | | | | | | | | in r365861. Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=365872
* | cxgbe(4): add support for stateless offloads for VXLAN traffic.Navdeep Parhar2020-09-187-182/+681
| | | | | | | | | | | | | | | | | | | | | | Hardware assistance includes checksumming (tx and rx), TSO, and RSS on the inner traffic in a VXLAN tunnel. Relnotes: Yes Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=365871
* | if_vxlan(4): add support for hardware assisted checksumming, TSO, and RSS.Navdeep Parhar2020-09-186-27/+530
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets a VXLAN pseudo-interface take advantage of hardware checksumming (tx and rx), TSO, and RSS if the NIC is capable of performing these operations on inner VXLAN traffic. A VXLAN interface inherits the capabilities of its vxlandev interface if one is specified or of the interface that hosts the vxlanlocal address. If other interfaces will carry traffic for that VXLAN then they must have the same hardware capabilities. On transmit, if_vxlan verifies that the outbound interface has the required capabilities and then translates the CSUM_ flags to their inner equivalents. This tells the hardware ifnet that it needs to operate on the inner frame and not the outer VXLAN headers. An event is generated when a VXLAN ifnet starts. This allows hardware drivers to configure their devices to expect VXLAN traffic on the specified incoming port. On receive, the hardware does RSS and checksum verification on the inner frame. if_vxlan now does a direct netisr dispatch to take full advantage of RSS. It is not very clear why it didn't do this already. Future work: Rx: it should be possible to avoid the first trip up the protocol stack to get the frame to if_vxlan just so it can decapsulate and requeue for a second trip up the stack. The hardware NIC driver could directly call an if_vxlan receive routine for VXLAN traffic instead. Rx: LRO. depends on what happens with the previous item. There will have to to be a mechanism to indicate that it's time for if_vxlan to flush its LRO state. Reviewed by: kib@ Relnotes: Yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 Notes: svn path=/head/; revision=365870
* | Add a knob to allow zero UDP checksums for UDP/IPv6 traffic on the given UDP ↵Navdeep Parhar2020-09-182-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | port. This will be used by some upcoming changes to if_vxlan(4). RFC 7348 (VXLAN) says that the UDP checksum "SHOULD be transmitted as zero. When a packet is received with a UDP checksum of zero, it MUST be accepted for decapsulation." But the original IPv6 RFCs did not allow zero UDP checksum. RFC 6935 attempts to resolve this. Reviewed by: kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 Notes: svn path=/head/; revision=365869
* | Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic.Navdeep Parhar2020-09-184-3/+26
| | | | | | | | | | | | | | | | | | | | | | These are similar to the existing VLAN capabilities. Reviewed by: kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 Notes: svn path=/head/; revision=365868