aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* newvers.sh: avoid bare git invocationEd Maste2021-01-211-1/+1
| | | | | | | | git may not be in the path, and $git_cmd includes some commandline arguments. Reported by: mjg Tested by: mjg
* iflib: Fix a NULL pointer derefAndrew Gallatin2021-01-211-1/+2
| | | | | | | | | | rxd_frag_to_sd() have pf_rv parameter as NULL with the current code. This patch fixes the NULL pointer dereference in that case thus avoiding a possible panic. Submitted by: rajesh1.kumar at amd.com Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D28115
* x86: switch vdso TSC timecounter to RDTSCP on AMD Zen CPUsKonstantin Belousov2021-01-211-4/+1
| | | | | | | Reported by: many Tested by: gallatin, mikael, rhurlin MFC after: 1 week Sponsored by: The FreeBSD Foundation
* x86: switch kernel TSC timecounter to RDTSCP on AMD Zen CPUsKonstantin Belousov2021-01-211-8/+1
| | | | | | | Reported by: many Tested by: gallatin, mikael, rhurlin MFC after: 1 week Sponsored by: The FreeBSD Foundation
* elf: add some definitions for i386 and amd64 relocationsKonstantin Belousov2021-01-211-0/+14
| | | | | | | | | | | | I believe that rtld does not need to implement them, they are mostly for the static linker. 'Mostly' because for amd64 our kernel linker loads object files, and amd64 relocation types could be observed. Defines were taken from glibc sources. MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28205
* Remove FirstBurstLength limit for software iSCSI.Alexander Motin2021-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | For hardware offload solicited data may potentially be handled more efficiently than unsolicited due to direct data placement. Or there can be some unsolicited write buffering limitations. It may create situations where FirstBurstLength limit is really useful. Software driver though has no those factors, having to do memcopy() any way and having no so hard limit on the temporary storage. Same time more active use of unsolicited transfers allows to avoid some of Ready To Transfer (R2T) PDU round-trip times and processing. This change effectively doubles from 64KB to 128KB the maximum size of write command that can be transferred within one link RTT. Tests of (64KB, 128KB] QD1 writes mixed with simultaneous QD8 reads over the same connection, increasing RTT, shows almost double write speed and half latency, while we should be able to afford few megabytes of RAM for additional buffering on a target these days. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* pkgbase: allow update-packages for first-run of packagingKyle Evans2021-01-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | If ${REPODIR}/${PKG_ABI} does not exist when we begin real-update-packages, skip the comparison with the non-existent previous repository and just finish the repo off. This allows external scripts to just assume they can run `update-packages` rather than figuring out if they'd previously run `packages` for this Version/Arch combo. PKG_VERSION_FROM_DIR was added so that we could perhaps detect the three distinct cases: 1.) If the repo has not yet been created, PKG_VERSION_FROM_DIR will be empty. 2.) If the repo is in some intermediate state between created and fully initialized, PKG_VERSION_FROM_DIR may point to the ABI directory. 3.) If the repo is fully initialized, then PKG_VERSION_FROM_DIR points to the latest build to compare to. Option #2 is explicitly unhandled at the moment, but this is no different than it was before. Reviewed-by: manu Differential-Revision: https://reviews.freebsd.org/D28229
* virtio_mmio: Delete a stale #if 0'ed debug printJessica Clarke2021-01-211-4/+1
| | | | | | | | This was blindly moved in r360722 but the variable being printed is not yet initialised. It's of little use and can easily be added back in the right place if needed by someone debugging, so just delete it. Reported by: bryanv
* linux64: Don't pass unnecessary -S and -g to objcopyJessica Clarke2021-01-211-1/+1
| | | | | | | | | | | | | | | Since we use --input-type binary these options are rather meaningless. Both binutils and elftoolchain ignore the option in this case, but LLVM does not, and instead strips all symbols from the output file, causing missing symbols at run time if building with llvm-objcopy. Thus simply remove the options; the linux module has never included them for building its VDSO (added in r283407), but for some reason the original commit of linux64 (r283424) added them. These should however eventually be changed to use template assembly files as is now done for firmware and MFS_IMAGE. Reviewed by: emaste, trasz Differential Revision: https://reviews.freebsd.org/D27740
* Rename i386's Linux ELF to Linux ELF32Jessica Clarke2021-01-212-2/+2
| | | | | | | | | This is what amd64 calls the i386 Linux ABI in order to distinguish it from the amd64 Linux ABI, and matches the nomenclature used for the FreeBSD ABIs where they always have the size suffix in the name. Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D27647
* Build VirtIO modules on all architecturesJessica Clarke2021-01-212-27/+9
| | | | | | | | | | | Currently only amd64, i386 and powerpc build VirtIO modules, yet all other architectures have at least one kernel configuration that includes the transport drivers, and so they lack drivers for all the devices they don't statically compile into the kernel. Instead, enable the build everywhere so all architectures have the full set of device drivers available. Reviewed by: bryanv (earlier version), imp (earlier version) Differential Revision: https://reviews.freebsd.org/D28058
* virtio: Reduce boilerplate for device driver module definitionsJessica Clarke2021-01-217-40/+21
| | | | | | | | | | | Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare both, merge VIRTIO_SIMPLE_PNPTABLE with VIRTIO_SIMPLE_PNPINFO and make the latter register for both buses. This also has the benefit of abstracting away the available transports and their names. Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28073
* virtio_mmio: Fix V1 device probing spec conformance (section 4.2.3.1.1)Jessica Clarke2021-01-214-12/+46
| | | | | | | | | | | | | | | | | We must check MagicValue not just Version before anything else, and then we must check DeviceID and immediately abort if zero (and this must not be an error). Do all this when probing rather than at the start of attaching as that's where this belongs, and provides a clear boundary between the device detection and device initialisation parts of the specified driver initialisation process. This also means we don't create empty device instances for placeholder devices, reducing clutter on systems that pre-allocate a large number, such as QEMU's AArch64 virt machine (which provides 32). Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28070
* virtio_mmio: Fix a style(9) issueJessica Clarke2021-01-211-1/+1
|
* Tidy some crypto-related lines in sys/conf/files.John Baldwin2021-01-211-3/+2
| | | | | | Reviewed by: cem (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27835
* Restructure the crypto(7) manpage and add authentication algorithms.John Baldwin2021-01-211-118/+112
| | | | | | | | | | | | | | | Add separate sections for authentication algorithms, block ciphers, stream ciphers, and AEAD algorithms. Describe properties commmon to algorithms in each section to avoid duplication. Use flat tables to list algorithm properties rather than nested tables. List implemented authentication algorithms. Reviewed by: gbe (manpages) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27833
* Simplify dynamic ipfilter sysctls.John Baldwin2021-01-211-56/+30
| | | | | | | | | | | Pass the structure offset in arg2 instead of arg1. This avoids having to undo the pointer arithmetic on arg1. Instead arg2 can be used directly as an offset relative to the desired structure. Reviewed by: cy Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27961
* jail: Use refcount(9) for prison references.Jamie Gritton2021-01-202-63/+91
| | | | | | | | | | | | Use refcount(9) for both pr_ref and pr_uref in struct prison. This allows prisons to held and freed without requiring the prison mutex. An exception to this is that dropping the last reference will still lock the prison, to keep the guarantee that a locked prison remains valid and alive (provided it was at the time it was locked). Among other things, this honors the promise made in a comment in crcopy(9), that it will not block, which hasn't been true for two decades.
* devinfo sysctl handler: Do not write zero-length strings in to sbuf twiceVladimir Kondratyev2021-01-201-6/+0
| | | | | This fixes missing PnPinfo and location strings in devinfo(8) output for devices with no attached drivers.
* pms: handle maximum size IO with any alignmentRyan Libby2021-01-202-2/+3
| | | | | | | | | | Define the maximum numbers of segments to allow for non-page alignment at the beginning and end of a maxphys size transfer. Also set ccb_pathinq.maxio consistent with maxphys. Reviewed by: imp Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28043
* pms: quiet -Wunused-variableRyan Libby2021-01-201-1/+1
| | | | | Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27994
* evdev: Make variable-size ioctls return actual length of copyouted dataVladimir Kondratyev2021-01-201-6/+23
| | | | | | | | | on success instead of 0 to match Linux. Imprivata binary depends on this. Submitted by: Shunchao Hu <ankohuu_outlook.com> Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D28218
* hmt: Allow I2C sampling mode support to be compiled out.Vladimir Kondratyev2021-01-202-0/+11
|
* hms: Workaround idle mouse drift in I2C sampling mode.Vladimir Kondratyev2021-01-202-1/+71
| | | | | | | | | | | Many I2C "compatibility" mouse devices found on touchpads continue to return last report data in sampling mode after touch has been ended. That results in cursor drift. Filter out such a reports with comparing content of current report with content of previous one. Reported by: many Tested by: omatsuda, gllb (github.com) Obtained from: sysutils/iichid
* hconf(4): Do not fetch report before writing new usage values back.Vladimir Kondratyev2021-01-202-34/+31
| | | | | | | | | | | | | There is a report that reading of surface/button switch feature report causes SYN1B7D touchpad malfunction. As specs does not require it to be readable assume that report usages have default value on attach and last written value during operation. Do not apply default usage values on attachment and resume. While here fix manpage typos and add avg@ to copyright header. Reported by: Jakob Alvermark <jakob_AT_alvermark_DOT_net> Reviewed by: avg Differential revision: https://reviews.freebsd.org/D28196
* Handle arm64 undefied instructions on msr exceptionsAndrew Turner2021-01-201-2/+8
| | | | | | | | | | | | When userspace tries to access a special register that it doesn't have access to the kernel receives an exception. On most cores this exception has been observed to be the undefined instruction exception, however on the Apple M1 under a QEMU based hypervisor it can be the MSR exception. Handle this second case by also running the undefined exception handler on these exceptions. Sponsored by: Innovate UK
* Reuse the amd64 loader relocation code on arm64Andrew Turner2021-01-201-13/+22
| | | | | | | | There is no need to keep multiple copies of the relocation code. The amd64 code works on arm64 with a few small changes to relocation types. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28213
* cat: style nitsMariusz Zaborski2021-01-201-1/+1
| | | | Pointed out by: jhb
* release: fix PORT variableGlen Barber2021-01-201-1/+1
| | | | | Reported by: Yasuhiro Kimura (yasu xat utahime dot org) Sponsored by: Rubicon Communications, LLC ("Netgate")
* aio: micro-optimize the lio_opcode assignmentsAlan Somers2021-01-203-44/+23
| | | | | | | | | | | This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or aio mlock operations via lio_listio, which has never been documented, requires the use of deliberately undefined constants (LIO_SYNC and LIO_MLOCK), and is arguably a bug. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27942
* ifconfig: add vlanproto "qiniq" as an alias for "802.1ad"Allan Jude2021-01-202-2/+8
| | | | | | | | | | QinQ is better known by this name, so accept it as an alias Reported-by: Mike Geiger Reviewed-by: melifaro, hselasky, rpokala MFC-with: 366917 Sponsored-by: Klara Inc. Differential-Revision: https://reviews.freebsd.org/D28245
* wpa_supplicant uses PF_ROUTE to return the routing table in order toCy Schubert2021-01-201-1/+1
| | | | | | | | | | | | | | | | | | | determine the length of the routing table buffer. As of 81728a538d24 wpa_supplicant is started before the routing table has been populated resulting in the length of zero to be returned. This causes wpa_supplicant to loop endlessly. (The workaround is to kill and restart wpa_supplicant as by the time it is restarted the routing table is populated.) (Personally, I was not able to reproduce this unless wlan0 was a member of lagg0. However, others experienced this problem on standalone wlan0.) PR: 252844 Submitted by: shu <ankohuu _ outlook.com> Reported by: shu <ankohuu _ outlook.com> Reviewed by: cy X-MFC with: 81728a538d24f483d0986850fa3f51d5d84d8f26 Differential Revision: https://reviews.freebsd.org/D28249
* Regenerate src.conf(5) after 7c5a624afae4Kyle Evans2021-01-201-5/+1
| | | | | WITHOUT_CRYPT no longer implies WITHOUT_WIRELESS after the aforementioned commit.
* Address panic with PRR due to missed initialization of recover_fsRichard Scheffenegger2021-01-202-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When using the base stack in conjunction with RACK, it appears that infrequently, ++tp->t_dupacks is instantly larger than tcprexmtthresh. This leaves the recover flightsize (sackhint.recover_fs) uninitialized, leading to a div/0 panic. Address this by properly initializing the variable just prior to first use, if it is not properly initialized. In order to prevent stale information from a prior recovery to negatively impact the PRR calculations in this event, also clear recover_fs once loss recovery is finished. Finally, improve the readability of the initialization of recover_fs when t_dupacks == tcprexmtthresh by adjusting the indentation and using the max(1, snd_nxt - snd_una) macro. Reviewers: rrs, kbowling, tuexen, jtl, #transport, gnn!, jmg, manu, #manpages Reviewed By: rrs, kbowling, #transport Subscribers: bdrewery, andrew, rpokala, ae, emaste, bz, bcran, #linuxkpi, imp, melifaro Differential Revision: https://reviews.freebsd.org/D28114
* libc: Fix null pointer arithmetic warning in mergesortAlex Richardson2021-01-201-4/+2
| | | | | | | | | This file has other questionable code and "optimizations" (such as copying one int at a time) that are probably no longer useful, so it might make sense to replace it with a different implementation at some point. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D28134
* Emit uprintf() output for initproc if there is no controlling terminalAlex Richardson2021-01-201-0/+8
| | | | | | | | This patch helped me debug why /sbin/init was not being loaded after making changes to the image activator in CheriBSD. Reviewed By: jhb (earlier version), kib Differential Revision: https://reviews.freebsd.org/D28121
* Minor simplification of MK_PMC case in usr.sbin/MakefileAlex Richardson2021-01-201-2/+1
| | | | | | | MK_PMC is already guarded by MK_CXX in src.opts.mk, so we can actually merge it with the following SUBDIR statement after c1a3d7f20696. Suggested By: jrtc27
* newvers.sh: add support for gitup(1)Michael Osipov2021-01-201-9/+15
| | | | | | | | | | | | | | gitup writes a .gituprevision file into the shallow clone directory. Read that file and print commit information only. Submitted by: Michael Osipov <michael.osipov@siemens.com> Pull Request: https://github.com/freebsd/freebsd-src/pull/449 While here, drop the redundant branch name from the git output and don't count commits in shallow clones. Reported by: Michael Osipov <michael.osipov@siemens.com> MFC after: 2 weeks
* Remove the unnecessary space before the colonMateusz Piotrowski2021-01-201-2/+1
| | | | MFC after: 3 days
* cache: augment sdt probe in cache_fplookup_dotMateusz Guzik2021-01-201-7/+6
| | | | Same as 6d386b4c ("cache: save a branch in cache_fplookup_next")
* cache: whitespace nit in cache_fplookup_modifyingMateusz Guzik2021-01-201-1/+1
|
* ktls: Improve handling of the bind_threads tunable a bitMark Johnston2021-01-201-5/+7
| | | | | | | | | | | | | - Only check for empty domains if we actually tried to configure domain affinity in the first place. Otherwise setting bind_threads=1 will always cause the sysctl value to be reported as zero. This is harmless since the threads end up being bound, but it's confusing. - Try to improve the sysctl description a bit. Reviewed by: gallatin, jhb Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28161
* opencrypto: Add comments describing the new crypto_session layoutMark Johnston2021-01-201-0/+2
| | | | Requested by: rpokala
* arm64, riscv: Set VM_KMEM_SIZE_SCALE to 1Mark Johnston2021-01-202-16/+2
| | | | | | | | | | | | | | | | This setting limits the amount of memory that can be allocated to UMA. On systems with a direct map and ample KVA, however, there is no reason for VM_KMEM_SIZE_SCALE to be larger than 1. This appears to have been inherited from the 32-bit ARM platform definitions. Also remove VM_KMEM_SIZE_MIN, which is not needed when VM_KMEM_SIZE_SCALE is defined to be 1.[*] Reviewed by: alc, kp, kib Reported by: alc [*] Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28225
* arm64: Stop setting VM_BCACHE_SIZE_MAXMark Johnston2021-01-201-9/+0
| | | | | | | | | | | This setting places a (small) limit on the size of the buffer cache, constraining UFS performance on large servers. The setting comes from the initial arm64 implementation and appears to be vestigal. Remove it. Reviewed by: kib Submitted by: Klara, Inc. Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D28162
* opencrypto: Fix assignment of crypto completions to worker threadsMark Johnston2021-01-201-1/+4
| | | | | | | | | | | | | | | | | Since r336439 we simply take the session pointer value mod the number of worker threads (ncpu by default). On small systems this ends up funneling all completion work through a single thread, which becomes a bottleneck when processing IPSec traffic using hardware crypto drivers. (Software drivers such as aesni(4) are unaffected since they invoke completion handlers synchonously.) Instead, maintain an incrementing counter with a unique value per session, and use that to distribute work to completion threads. Reviewed by: cem, jhb MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28159
* opencrypto: Embed the driver softc in the session structureMark Johnston2021-01-201-13/+4
| | | | | | | | | | | | | | | Store the driver softc below the fields owned by opencrypto. This is a bit simpler and saves a pointer dereference when fetching the driver softc when processing a request. Get rid of the crypto session UMA zone. Session allocations are frequent or performance-critical enough to warrant a dedicated zone. No functional change intended. Reviewed by: cem, jhb Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28158
* Add a new FreeBSD/arm64 kernel configuration, GENERIC-MMCCAM-NODEBUG,Robert Watson2021-01-191-0/+13
| | | | | | | which is the same as GENERIC-MMCCAM but using a nodebug baseline. Reviewed by: andrew, br (earlier version), jrtc27 (earlier version) Differential revision: https://reviews.freebsd.org/D28091
* add missing .Xr..John-Mark Gurney2021-01-191-1/+1
|
* Remove remaining uses of ${COMPILER_FEATURES:Mc++11}Alex Richardson2021-01-194-10/+2
| | | | | | | | | | All supported compilers have C++11 support so these checks can be replaced with MK_CXX guards. See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252759 PR: 252759 Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D28234