aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix write only mappings on arm64Andrew Turner2020-10-132-1/+17
| | | | | | | | | | | | When trapping on a wrote access to a buffer the kernel has mapped as write only we should only pass the VM_PROT_WRITE flag. Previously the call to vm_fault_trap as the VM_PROT_READ flag was unexpected. Reported by: manu Sponsored by: Innovate UK Notes: svn path=/head/; revision=366665
* Stop using -O instead of -O2 for MIPSAlex Richardson2020-10-131-4/+0
| | | | | | | | | | | | | | | Until clang 11 that was equivalent to -O2, but clang changed it to -O1 so generated MIPS code will now be unnecessarily slow. It also removes a weird special case from sys.mk. This is similar to the D26471 change for debug kernels and should not change anything since everything was previously building MIPS code at -O2 until the clang 11 update. Reviewed By: trasz Differential Revision: https://reviews.freebsd.org/D26749 Notes: svn path=/head/; revision=366664
* Document /boot/config as well as /boot.configWarner Losh2020-10-131-2/+5
| | | | | | | | Add a note about /boot/config being an alternative location for this information. Correct description of -P. Notes: svn path=/head/; revision=366663
* devmatch: First appeared in 12.0Warner Losh2020-10-131-2/+6
| | | | | | | | | | Document that devmatch first appeared in FreeBSD 12.0. Also can't -> can not. But it doesn't help the sentence much. MFC After: 3 days Notes: svn path=/head/; revision=366662
* Document the rather suprising behavior with ' inside action rules.Warner Losh2020-10-131-1/+57
| | | | | | | | | | To prevent issues with odd shell characters appearing in, a surprising shell feature is used. Document it and a workaround for it. Differential Revision: https://reviews.freebsd.org/D26723 Notes: svn path=/head/; revision=366661
* Force __BMI__ experimental instructions off.Warner Losh2020-10-131-0/+1
| | | | | | | | | | | | The OpenZFS code that uses the BMI instructions is broken. Forcibly disable them to prevent their use. When enabled, the build breaks. This fixes the build when compiled for a core with BMI instructions. This is the same fix committed in r364777, for the same issue. Submitted by: Jung-uk Kim Notes: svn path=/head/; revision=366660
* Add back org.freebsd:zstd_compress to features_for_readWarner Losh2020-10-131-2/+0
| | | | | | | | This list is the of features that are allowed on the whole pool, not the list of features that are implemented. Notes: svn path=/head/; revision=366659
* Turn off zstd on aarch64Warner Losh2020-10-133-2/+15
| | | | | | | | loader support for zstd and zfs doesn't work for aarch64. Disable it to unbreak the build. Notes: svn path=/head/; revision=366658
* Add zstd support to the boot loader.Warner Losh2020-10-1227-282/+227
| | | | | | | | | | | | | | | Add support to the _STANDALONE environment enough bits of the kernel that we can compile it. We still have a small zstd_shim.c since there were 3 items that were a bit hard to nail down and may be cleaned up in the future. These go hand in hand with a number of commits to sys/sys in the past weeks, should this need be MFCd. Discussed with: mmacy (in review and on IRC/Slack) Reviewed by: freqlabs (on openzfs repo) Differential Revision: https://reviews.freebsd.org/D26218 Notes: svn path=/head/; revision=366657
* newbus: use ssize_t to match sb's len and size, fix ordering of space checkWarner Losh2020-10-121-6/+8
| | | | | | | | | | | | | | | Both s_len and s_size are ssize_t, so their differece is also more properly a ssize_t not a size_t. Also, assert that len is <= size when we enter. This should always be the case. Ensure that we have that one byte that we write to the end of the buffer before we do so, though the error should already be set on the buffer if not, and the only times we supply 'partial' buffers they should be plenty large. Reviewed by: cem, jhb (prior version, I did cem's suggestion) Differential Revsion: https://reviews.freebsd.org/D26752 Notes: svn path=/head/; revision=366656
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-10-126-11/+21
|\ | | | | | | | | | | | | | | | | | | release/11.x llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release). MFC after: 4 weeks X-MFC-With: r364284 Notes: svn path=/head/; revision=366655
| * Vendor import of llvm-project branch release/11.xvendor/llvm-project/llvmorg-11.0.0-0-g176249bd673Dimitry Andric2020-10-124-6/+16
| | | | | | | | | | | | | | | | llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release). Notes: svn path=/vendor/llvm-project/release-11.x/; revision=366653 svn path=/vendor/llvm-project/llvmorg-11.0.0-0-g176249bd673/; revision=366654; tag=vendor/llvm-project/llvmorg-11.0.0-0-g176249bd673
* | Bug fixes for the ads111x driver... make configurable gain and sample rateIan Lepore2020-10-121-2/+9
| | | | | | | | | | | | | | | | | | hints work on per-channel basis as documented, rather than chip-wide. Also, when configured via hints, return BUS_PROBE_NOWILDCARD on successful hints match, so that the hints don't bogusly match other types of i2c chips. Notes: svn path=/head/; revision=366652
* | pf tests: Test that 'set skip on <group>' works on new group membersKristof Provost2020-10-121-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a know issue where new group members don't get the 'set skip on' applied until the rules are re-loaded. Do this by setting rules that block all traffic, but skip members of the 'epair' group. If we can communicate over the epair interface we know the set skip rule took effect, even if the rule was set before the interface was created. MFC after: 2 weeks Notes: svn path=/head/; revision=366648
* | pf: create a kif for flagsKristof Provost2020-10-121-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If userspace tries to set flags (e.g. 'set skip on <ifspec>') and <ifspec> doesn't exist we should create a kif so that we apply the flags when the <ifspec> does turn up. Otherwise we'd end up in surprising situations where the rules say the interface should be skipped, but it's not until the rules get re-applied. Reviewed by: Lutz Donnerhacke <lutz_donnerhacke.de> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26742 Notes: svn path=/head/; revision=366647
* | Link efi programs with -pie rather than -sharedAlex Richardson2020-10-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | This was causing build failures in CheriBSD where we were passing -pie already by default. Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D24787 Notes: svn path=/head/; revision=366644
* | Enable SUBDIR_PARELLEL in lib/libclang_rtAlex Richardson2020-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that this part of the build was taking much longer than expected. Turns out it's due to not running the subdirs in parallel. Reduces `make all` inside lib/libclang_rt time from 63s to 20s with -j32. Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D26623 Notes: svn path=/head/; revision=366636
* | Fix build with -DBOOTSTRAP_ALL_TOOLSAlex Richardson2020-10-121-1/+4
| | | | | | | | | | | | | | | | sbin/sysctl can no longer be bootstrapped on FreeBSD 12 after r366465, so create a symlink to the host tool instead of trying to build it. Notes: svn path=/head/; revision=366635
* | Fix buildworld on Linux/macOS after nvi updateAlex Richardson2020-10-121-1/+1
| | | | | | | | | | | | | | This re-applies r365941 which was lost in the nvi update. Notes: svn path=/head/; revision=366634
* | Don't use install(1) for the library symlinks in the build directoryAlex Richardson2020-10-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | It appears this was changed from ln to use install in rS245752. I noticed this because my buildenv was setting INSTALL=install -U -M //METALOG and then these links fail to be created with the following error: install: open //METALOG: Permission denied Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D26618 Notes: svn path=/head/; revision=366633
* | Fix building on Linux/macOS after r366622Alex Richardson2020-10-122-1/+13
| | | | | | | | | | | | | | | | | | | | | | We have to bootstrap arc4random.c, so guard the FenestrasX code to avoid using it on Linux/macOS. Reviewed By: cem Differential Revision: https://reviews.freebsd.org/D26738 Notes: svn path=/head/; revision=366632
* | loader: edd_device_path_v3 is too smallToomas Soome2020-10-121-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EDD v3[1], see table 13, page 33, does define device path as double qword, that is, 16 bytes, we have only qword. Also remove edd_device_path_v4 and edd_params_v4 because those are not used, and there is no size difference in v3 versus v4. [1] http://www.t13.org/documents/UploadedDocuments/docs2004/d1572r3-EDD3.pdf MFC after: 2 weeks Notes: svn path=/head/; revision=366631
* | systm.h: forward declare ucred for _STANDALONE tooWarner Losh2020-10-121-0/+1
| | | | | | | | | | | | | | | | | | There's a number of types we forward declare for the kernel. We need struct ucred for the ZSTD ZFS integration, so go ahead and forward declare it here too. Notes: svn path=/head/; revision=366629
* | 10Gigabit Ethernet driver for AMD SoCEmmanuel Vadot2020-10-1127-2790/+14256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has the driver for 10Gigabit Ethernet controller in AMD SoC. This driver is written compatible to the Iflib framework. The existing driver is for the old version of hardware. The submitted driver here is for the recent versions of the hardware where the Ethernet controller is PCI-E based. Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com> MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25793 Notes: svn path=/head/; revision=366628
* | The nextboot(8) manual page currently says that the loader(8) would deleteAlexey Dokuchaev2020-10-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the /boot/nextboot.conf file or its contents which is 1) not the most user- friendly way of working with custom configurations, and 2) simply not true for both Forth and Lua implementations: they would not delete it, but just change the setting to "NO", that is, disable it. While at it, add one missing serial (Oxford) comma and fix some bogus line wraps along the way. Approved by: bcr (manpages) Differential Revision: https://reviews.freebsd.org/D25971 Notes: svn path=/head/; revision=366626
* | ip_mroute: fix the viftable export sysctlBjoern A. Zeeb2020-10-111-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that in r354857 I got more than one thing wrong. Convert the SYSCTL_OPAQUE to a SYSCTL_PROC to properly export the these days allocated and not longer static per-vnet viftable array. This fixes a problem with netstat -g which would show bogus information for the IPv4 Virtual Interface Table. PR: 246626 Reported by: Ozkan KIRIK (ozkan.kirik gmail.com) MFC after: 3 days Notes: svn path=/head/; revision=366623
* | random(4) FenestrasX: Push root seed version to arc4random(3)Conrad Meyer2020-10-1021-16/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Push the root seed version to userspace through the VDSO page, if the RANDOM_FENESTRASX algorithm is enabled. Otherwise, there is no functional change. The mechanism can be disabled with debug.fxrng_vdso_enable=0. arc4random(3) obtains a pointer to the root seed version published by the kernel in the shared page at allocation time. Like arc4random(9), it maintains its own per-process copy of the seed version corresponding to the root seed version at the time it last rekeyed. On read requests, the process seed version is compared with the version published in the shared page; if they do not match, arc4random(3) reseeds from the kernel before providing generated output. This change does not implement the FenestrasX concept of PCPU userspace generators seeded from a per-process base generator. That change is left for future discussion/work. Reviewed by: kib (previous version) Approved by: csprng (me -- only touching FXRNG here) Differential Revision: https://reviews.freebsd.org/D22839 Notes: svn path=/head/; revision=366622
* | arc4random(9): Integrate with RANDOM_FENESTRASX push-reseedConrad Meyer2020-10-108-5/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no functional change for the existing Fortuna random(4) implementation, which remains the default in GENERIC. In the FenestrasX model, when the root CSPRNG is reseeded from pools due to an (infrequent) timer, child CSPRNGs can cheaply detect this condition and reseed. To do so, they just need to track an additional 64-bit value in the associated state, and compare it against the root seed version (generation) on random reads. This revision integrates arc4random(9) into that model without substantially changing the design or implementation of arc4random(9). The motivation is that arc4random(9) is immediately reseeded when the backing random(4) implementation has additional entropy. This is arguably most important during boot, when fenestrasX is reseeding at 1, 3, 9, 27, etc., second intervals. Today, arc4random(9) has a hardcoded 300 second reseed window. Without this mechanism, if arc4random(9) gets weak entropy during initial seed (and arc4random(9) is used early in boot, so this is quite possible), it may continue to emit poorly seeded output for 5 minutes. The FenestrasX push-reseed scheme corrects consumers, like arc4random(9), as soon as possible. Reviewed by: markm Approved by: csprng (markm) Differential Revision: https://reviews.freebsd.org/D22838 Notes: svn path=/head/; revision=366621
* | Add "Fenestras X" alternative /dev/random implementationConrad Meyer2020-10-1012-2/+1741
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fortuna remains the default; no functional change to GENERIC. Big picture: - Scalable entropy generation with per-CPU, buffered local generators. - "Push" system for reseeding child generators when root PRNG is reseeded. (Design can be extended to arc4random(9) and userspace generators.) - Similar entropy pooling system to Fortuna, but starts with a single pool to quickly bootstrap as much entropy as possible early on. - Reseeding from pooled entropy based on time schedule. The time interval starts small and grows exponentially until reaching a cap. Again, the goal is to have the RNG state depend on as much entropy as possible quickly, but still periodically incorporate new entropy for the same reasons as Fortuna. Notable design choices in this implementation that differ from those specified in the whitepaper: - Blake2B instead of SHA-2 512 for entropy pooling - Chacha20 instead of AES-CTR DRBG - Initial seeding. We support more platforms and not all of them use loader(8). So we have to grab the initial entropy sources in kernel mode instead, as much as possible. Fortuna didn't have any mechanism for this aside from the special case of loader-provided previous-boot entropy, so most of these sources remain TODO after this commit. Reviewed by: markm Approved by: csprng (markm) Differential Revision: https://reviews.freebsd.org/D22837 Notes: svn path=/head/; revision=366620
* | pnfsdsfile(8): Remove dublicate word 'the'Gordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=366617
* | cxgbetool(8): Remove dublicate word 'whether'Gordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=366616
* | man5: Fix a few typos spotted by igorGordon Bergling2020-10-103-4/+3
| | | | | | | | | | | | | | | | | | | | | | - fstab(5): conjuction -> conjunction - mount.conf(5): repeated 'the' - periodic.conf(5): Partion -> Partition MFC after: 1 week Notes: svn path=/head/; revision=366615
* | ls(1): Use \& as an escape character for the ',' optionGordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | | | Reported by: karels@, xtouqh at hotmail dot com MFC after: 1 day Notes: svn path=/head/; revision=366613
* | cpuset(1): Fix a typoGordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | | | | | - 'at at' -> 'at a' MFC after: 1 week Notes: svn path=/head/; revision=366611
* | sigevent(3): Fix a typoGordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | | | | | - asychronous -> asynchronous MFC after: 1 week Notes: svn path=/head/; revision=366610
* | dtrace_audit(4): Fix a typoGordon Bergling2020-10-101-1/+1
| | | | | | | | | | | | | | | | | | - asynchonously -> asynchronously MFC after: 1 week Notes: svn path=/head/; revision=366609
* | arm: Check dtb version against the one we're expecting to findEmmanuel Vadot2020-10-101-0/+14
| | | | | | | | | | | | | | | | Reviewed by: imp, emaste, mmel Differential Revision: https://reviews.freebsd.org/D26725 Notes: svn path=/head/; revision=366600
* | Brand our DTS with the Linux version it was imported fromEmmanuel Vadot2020-10-104-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | DTS must be synced with the kernel, add a freebsd,dts-version string in the root node of each DTS that we compile so we can later in the kernel check that it contain a correct value. Reviewed by: imp, mmel Differential Revision: https://reviews.freebsd.org/D26724 Notes: svn path=/head/; revision=366599
* | zfs: use cache_renameMateusz Guzik2020-10-101-4/+1
| | | | | | | | Notes: svn path=/head/; revision=366598
* | vfs: support lockless dirfd lookupsMateusz Guzik2020-10-103-6/+163
| | | | | | | | Notes: svn path=/head/; revision=366597
* | modules/crypto: reenable assembly optimized skein implementationEd Maste2020-10-101-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r366344 corrected the optimized amd64 skein assembly implementation, so we can now enable it again. Also add a dependency on this Makefile for the skein_block object, so that it will be rebuit (similar to r366362). PR: 248221 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366596
* | Modify mountd.c so that it does not always malloc 4K for the map credentials.Rick Macklem2020-10-101-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r362163 upgraded mountd so that it could handle MAX_NGROUPS groups for the anonymous user credentials (the ones provided by -maproot and -mapall exports options). The problem is that this resulted in every export structure growing by about 4Kbytes, because the cr_groups field went from 16->MAX_NGROUPS. This patch fixes this by only including a small 32 element cr_groups in the structure and then malloc()'ng cr_groups when a larger one is needed. The value of SMALLNGROUPS is arbitrarily set to 32, assuming most users used by -maproot or -mapall will be in <= 32 groups. Reviewed by: kib, freqlabs Differential Revision: https://reviews.freebsd.org/D26521 Notes: svn path=/head/; revision=366595
* | Use unlocked page lookup for inmem() to avoid object lock contentionBryan Drewery2020-10-094-20/+42
| | | | | | | | | | | | | | | | | | | | Reviewed By: kib, markj Submitted by: mlaier Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D26653 Notes: svn path=/head/; revision=366594
* | cxgbe(4): More fixes for the T6 FCS error counter.Navdeep Parhar2020-10-093-172/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r365732 was the first attempt to get an accurate count but it was writing to some read-only registers to clear them and that obviously didn't work. Instead, note the counter's value when it is supposed to be cleared and subtract it from future readings. dev.<port>.stats.rx_fcs_error should not be serviced from the MPS register for T6. The stats.* sysctls should all use T5_PORT_REG for T5 and above. This must have been missed in the initial T5 support years ago. Fix it while here. MFC after: 3 days Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=366589
* | vfs: fix a panic when truncating comming from copy_file_rangeMateusz Guzik2020-10-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Truncating requires an exclusive lock, but it was not taken if the filesystem indicates support for shared writes. This only concerns ZFS. In particular fixes cp of files which have trailing holes. Reported by: bdrewery Notes: svn path=/head/; revision=366587
* | Don't invoke semunload() if seminit() fails during MOD_LOAD.John Baldwin2020-10-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The module handler code invokes a MOD_UNLOAD event immediately if MOD_LOAD fails. The result was that if seminit() failed, semunload() was invoked twice. semunload() is not idempotent however and would try to remove it's process_exit eventhandler twice resulting in a panic. Reviewed by: kib, markj Obtained from: CheriBSD MFC after: 1 month Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26696 Notes: svn path=/head/; revision=366584
* | Fix a few mandoc issuesGordon Bergling2020-10-0948-149/+158
| | | | | | | | | | | | | | | | | | | | - skipping paragraph macro: Pp after Sh - sections out of conventional order: Sh EXAMPLES - whitespace at end of input line - normalizing date format Notes: svn path=/head/; revision=366583
* | cache: fix vexec panic when racing against vgoneMateusz Guzik2020-10-092-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of dead_vnodeops would result in a panic instead of returning the intended EOPNOTSUPP error. While here make sure to abort, not just try to return a partial result. The former allows the regular lookup to restart from scratch, while the latter makes it stuck with an unusable vnode. Reported by: kevans Notes: svn path=/head/; revision=366582
* | bpf(4): Update the man page to reflect realityGordon Bergling2020-10-091-41/+118
| | | | | | | | | | | | | | | | | | | | | | | | PR: 131918 Submitted by: guy at alum dot mit dot edu Reviewed by: gnn, gbe Approved by: gnn MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25993 Notes: svn path=/head/; revision=366580
* | Remove gratuitous use of '' around argumentsWarner Losh2020-10-091-1/+1
| | | | | | | | | | | | | | | | There's no need to use ' here, so remove it. This use causes no problems, but is a bad example. Notes: svn path=/head/; revision=366579