aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* zpool-features(7): Note that the boot loader has support for large_blocksAllan Jude2020-07-151-4/+3
| | | | | | | | | | | | | | Since r304321 (-current: Aug 18, 2016) and r328866 (stable/11: Feb 5, 2018) the FreeBSD loader has supported reading from datasets with the large_blocks feature active. PR: 247992 Reported by: Anton Saietskii <vsasjason@gmail.com> MFC after: 2 weeks Sponsored by: Klara Inc. Notes: svn path=/head/; revision=363224
* vlan(4): Minor grammar correctionsAllan Jude2020-07-151-4/+4
| | | | | | | | | | | | | Note: date not bumped because "content" was not changed, just inserted some missing words. PR: 248001 Submitted by: Jose Luis Duran <jlduran@gmail.com> MFC after: 2 weeks Sponsored by: Klara Inc. Notes: svn path=/head/; revision=363223
* [PowerPC] Use PVO_PADDR to get the PA from PVOLeandro Lupori2020-07-151-14/+17
| | | | | | | | | | | | | | Use PVO_PADDR macro to get the physical address from a PVO, instead of explicitly ANDing pvo_pte.pa with LPTE_RPGN where it is needed. Besides improving readability, this is needed to support superpages (D25237), where the steps to get the PA from a PVO are different. Reviewed by: markj Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25654 Notes: svn path=/head/; revision=363222
* Fix style in r363220Eric van Gyzen2020-07-155-5/+5
| | | | | | | | | | | | | Apply the style change Kostik suggested in the review. Reported by: kib MFC after: 2 weeks X-MFC with: r363220 Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676 Notes: svn path=/head/; revision=363221
* Fix Coverity issues in OFEDEric van Gyzen2020-07-1518-23/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_ibdiag_config NULL deref read_ibdiag_config mem leak ib_mad_inv_field_str Missing comma in a string array initialization print_node_header NULL deref diff_node_ports copy-paste error ibportstate.c main() missing break in switch set_thresholds NULL ptr deref dump_unicast_tables leaks mapnd umad_cm_attr_str dead code __ibv_close_device close(-1) check return value of listen() mlx5 bitmap.h - bad bit shift - UB get_dst_addr check return value of inet_pton osm_perfmgr_init check return value of cl_spinlock_init osm_port_new memory leak on error path sa_mad_ctrl_rcv_callback missing break in switch case I did not include CID numbers because these were found by an internal run at Isilon. Reviewed by: cem kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676 Notes: svn path=/head/; revision=363220
* Fix BUILD_WITH_STRICT_TMPPATH buildsAlex Richardson2020-07-151-1/+1
| | | | | | | | | We need dd in $PATH for some of the MK_BOOT code and some tests also use it. Obtained from: CheriBSD Notes: svn path=/head/; revision=363219
* Allow bootstrapping localdef on non-FreeBSD systemsAlex Richardson2020-07-1515-2/+549
| | | | | | | | | | | | | | | | | | | The current localedef simply assumes that the locale headers on build system are compatible with those on the target system which is not necessarily true. It generally works on FreeBSD (as long as we don't change the locale headers), but Linux and macOS provide completely different locale headers. This change adds new bootstrap headers that namespace certain xlocale structures defined or used by in the headers that localdef needs. This is required since system headers *must* be able to include the "real" locale headers for printf(), etc., but we also want to access the target systems's internal locale structures. Reviewed By: yuripv, brooks Differential Revision: https://reviews.freebsd.org/D25229 Notes: svn path=/head/; revision=363218
* Add missing newline and return in localedef error messageAlex Richardson2020-07-151-2/+3
| | | | | | | | | I hit those error messages when using a localedef built against headers that don't match the target system (cross-building from a Linux host). This problem will be fixed in the next commit. Notes: svn path=/head/; revision=363217
* Avoid rebuilding libpmc in every incremental rebuildAlex Richardson2020-07-151-3/+7
| | | | | | | | | | | | | Generate libpmc_events.c in a temporary file first and only overwrite it if the files are actually different. This avoids compiling and relinking the different variants of libpmc on every incremental build. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D24784 Notes: svn path=/head/; revision=363216
* poll: factor fd lookup out of scan and rescanMateusz Guzik2020-07-151-43/+70
| | | | Notes: svn path=/head/; revision=363215
* fd: remove fd_lastfileMateusz Guzik2020-07-156-84/+86
| | | | | | | | | | | It keeps recalculated way more often than it is needed. Provide a routine (fdlastfile) to get it if necessary. Consumers may be better off with a bitmap iterator instead. Notes: svn path=/head/; revision=363214
* fd: add obvious branch predictions to fdallocMateusz Guzik2020-07-151-2/+2
| | | | Notes: svn path=/head/; revision=363213
* libprocstat: fix kvm filedesc access after introduction of fdescenttblMateusz Guzik2020-07-151-16/+23
| | | | Notes: svn path=/head/; revision=363212
* Grammar and typo fixes.Konstantin Belousov2020-07-151-6/+6
| | | | | | | | Submitted by: alc MFC after: 20 days Notes: svn path=/head/; revision=363211
* Fix the pNFS flexible file layout client for servers with small write size.Rick Macklem2020-07-151-2/+9
| | | | | | | | | | | | | | | | | | | The code in nfscl_dofflayout() loops when a flexible file layout server provides a small write data limit (no extant server is known to do this). If/when it looped, it erroneously reused the "drpc" argument for the mirror worker thread, corrupting it. This patch fixes the problem by only using the calling thread after the first loop iteration. Found during testing by simulating a server with a small write size. Since no extant pNFS server is known to provide a small write size, this fix it not needed in practice at this time. MFC after: 2 weeks Notes: svn path=/head/; revision=363210
* Remove obsolete files after byacc 20200330 import (r363171).Jung-uk Kim2020-07-151-0/+15
| | | | | | | Reported by: lwhsu Notes: svn path=/head/; revision=363209
* Remove a redundant file from test directory to unbreak yacc regression test.Jung-uk Kim2020-07-141-668/+0
| | | | | | | | | | It looks like the obsolete file from old regression test was accidentally re-added between version 20170709 and 20180510. Reported by: lwhsu Notes: svn path=/head/; revision=363208
* top: VIS_SAFE turned out to be unsafeYuri Pankov2020-07-141-1/+1
| | | | | | | | | | | | | Unset VIS_SAFE flag as it turned out to be actually unsafe for continuos top display as it's passing through sequences resulting cursor movement (backspace, tab, carriage-return), and explicitly set VIS_TAB for the same reason. Reported by: Mark Millard <marklmi@yahoo.com>, swills Tested by: Mark Millard <marklmi@yahoo.com>, swills Notes: svn path=/head/; revision=363207
* hwpmc: Always set pmc_cpuid to somethingRyan Moeller2020-07-144-13/+18
| | | | | | | | | | | | | | | pmc_cpuid was uninitialized for most AMD processor families. We can still populate this string for unimplemented families. Also added a CPUID_TO_STEPPING macro and converted existing code to use it. Reviewed by: mav MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25673 Notes: svn path=/head/; revision=363206
* linuxkpi: Ignore NULL pointers passed to string parameter of kstr(n)dupVladimir Kondratyev2020-07-141-0/+4
| | | | | | | | | | | That follows Linux and fixes related drm-kmod-5.3 panic. Reviewed by: imp, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25657 Notes: svn path=/head/; revision=363205
* cache: make negative shrinker round robin on all lists every timeMateusz Guzik2020-07-141-12/+8
| | | | | | | | | | | | | Previously it would check 4, 3, 2, 1 lists. In practice by the time it is getting called all lists have some elements and consequently this does not result in new evictions. Nonetheless, the code is clearer. Tested by: pho Notes: svn path=/head/; revision=363202
* cache: remove numcallsMateusz Guzik2020-07-141-3/+0
| | | | | | | | The counter is not very useful and if necessary the value can be found by summing up other counters. Notes: svn path=/head/; revision=363201
* cache: count dropped entriesMateusz Guzik2020-07-141-0/+2
| | | | Notes: svn path=/head/; revision=363200
* cache: remove neg_locked argument from cache_zap_lockedMateusz Guzik2020-07-141-28/+31
| | | | | | | Tested by: pho Notes: svn path=/head/; revision=363199
* cache: remove a useless argument from cache_negative_insertMateusz Guzik2020-07-141-9/+4
| | | | Notes: svn path=/head/; revision=363198
* Really fix cleandir after r362973Mitchell Horne2020-07-141-1/+2
| | | | | | | | | | | | | | | | | | I made an attempt to fix this in r362978, but all it really did was confine the issue to the $MACHINE_CPUARCH == "riscv" case. The real problem is that LINKER_FEATURES is not defined here, so bsd.linker.mk needs to be included. This error with cleandir only occurs when META_MODE is disabled, which explains why it was missed by both CI and myself. Note that this effectively reverts r362978. Reported by: mjg Reviewed by: imp, kevans (in IRC) Notes: svn path=/head/; revision=363197
* cache: create a dedicate struct for negative entriesMateusz Guzik2020-07-141-17/+49
| | | | | | | | | | | | | | | .. and stuff if into the unused target vnode field This gets rid of concurrent nc_flag modifications racing with the shrinker and consequently fixes a bug where such a change could have been missed when cache_ncp_invalidate was being issued.. Reported by: zeising Tested by: pho, zeising Fixes: r362828 ("cache: lockless forward lookup with smr") Notes: svn path=/head/; revision=363196
* amd64: allow parallel shootdown IPIsKonstantin Belousov2020-07-1412-457/+689
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop using smp_ipi_mtx to protect global shootdown state, and move/multiply the global state into pcpu. Now each CPU can initiate shootdown IPI independently from other CPUs. Initiator enters critical section, then fills its local PCPU shootdown info (pc_smp_tlb_XXX), then clears scoreboard generation at location (cpu, my_cpuid) for each target cpu. After that IPI is sent to all targets which scan for zeroed scoreboard generation words. Upon finding such word the shootdown data is read from corresponding cpu' pcpu, and generation is set. Meantime initiator loops waiting for all zeroed generations in scoreboard to update. Initiator does not disable interrupts, which should allow non-invalidation IPIs from deadlocking, it only needs to disable preemption to pin itself to the instance of the pcpu smp_tlb data. The generation is set before the actual invalidation is performed in handler. It is safe because target CPU cannot return to userspace before handler finishes. In principle only NMI can preempt the handler, but NMI would see the kernel handler frame and not touch not-invalidated user page table. Handlers loop until they do not see zeroed scoreboard generations. This, together with hardware keeping one pending IPI in LAPIC IRR should prevent lost shootdowns. Notes. 1. The code does protect writes to LAPIC ICR with exclusion. I believe this is fine because we in fact do not send IPIs from interrupt handlers. More for !x2APIC mode where ICR access for write requires two registers write, we disable interrupts around it. If considered incorrect, I can add per-cpu spinlock around ipi_send(). 2. Scoreboard lines owned by given target CPU can be padded to the cache line, to reduce ping-pong. Reviewed by: markj (previous version) Discussed with: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D25510 Notes: svn path=/head/; revision=363195
* Improve the error handling in generating ASCONF chunks.Michael Tuexen2020-07-142-98/+74
| | | | | | | | | | | In case of errors, the cleanup was not consistent. Thanks to Felix Weinrank for fuzzing the userland stack and making me aware of the issue. MFC after: 1 week Notes: svn path=/head/; revision=363194
* Make CLOCK_REALTIME and TIMER_ABSTIME available for XOPEN_SOURCE >= 500.Konstantin Belousov2020-07-142-6/+12
| | | | | | | | | | | | Reported by: jbeich PR: 247701 Reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25554 Notes: svn path=/head/; revision=363193
* Update to D25266, bin/ps: Make the rtprio option actually showKirk McKusick2020-07-142-1/+9
| | | | | | | | | | | | | | | | | realtime priorities The current `ps -axO rtprio' show threads running at interrupt priority such as the [intr] thread as '1:48' and threads running at kernel priority such as [pagedaemon] as normal:4294967260. This change shows [intr] as intr:48 and [pagedaemon] as kernel:4. Reviewed by: kib MFC after: 1 week (together with -r362369) Differential Revision: https://reviews.freebsd.org/D25660 Notes: svn path=/head/; revision=363192
* Print the arm64 registers in more exception handling panicsAndrew Turner2020-07-141-2/+12
| | | | | | | | | | | | | It can be useful to get a dump of all registers when investigating why we received an exception that we are unable to handle. In these cases we already call panic, however we don't always print the registers. Add calls to print_registers and print esr and far when applicable. Sponsored by: Innovate UK Notes: svn path=/head/; revision=363191
* Add stepping to the kern.hwpmc.cpuid string on x86.Alexander Motin2020-07-143-10/+11
| | | | | | | | | | | | It follows the equivalent Linux change to be able to differentiate skylakex and cascadelakex, sharing the same model but not stepping. This fixes skylakex handling broken by r363144. MFC after: 6 days Notes: svn path=/head/; revision=363188
* Enable EFI system partition on amd64 and i386 VM imagesOleksandr Tymoshenko2020-07-141-0/+5
| | | | | | | | | | | EFI support is a hard requirement for generating Hyper-V Gen2 VM images. Reviewed by: gjb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25655 Notes: svn path=/head/; revision=363187
* Add a RELNOTES entry for safexcel(4).Mark Johnston2020-07-141-0/+3
| | | | | | | Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=363183
* safexcel(4): Fix the INVARIANTS build after a last-second change.Mark Johnston2020-07-141-2/+2
| | | | | | | | Reported by: Jenkins MFC with: r363180 Notes: svn path=/head/; revision=363182
* Add safexcel(4) to cryptotest.Mark Johnston2020-07-141-2/+3
| | | | | | | | MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=363181
* Add a driver for the SafeXcel EIP-97.Mark Johnston2020-07-149-0/+3613
| | | | | | | | | | | | | | | | | | | | | The EIP-97 is a packet processing module found on the ESPRESSObin. This commit adds a crypto(9) driver for the crypto and hash engine in this device. An initial skeleton driver that could attach and submit requests was written by loos and others at Netgate, and the driver was finished by me. Support for separate AAD and output buffers will be added in a separate commit, to simplify merging to stable/12 (where those features don't exist). Reviewed by: gnn, jhb Feedback from: andrew, cem, manu MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D25417 Notes: svn path=/head/; revision=363180
* Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and ↵Gordon Bergling2020-07-142-14/+2
| | | | | | | | | | | | | | | | makewhatis(8). We don't mention the first appearance of a utility in FreeBSD, when it first appeared in a BSD version that predates FreeBSD. PR: 223520, 223521 Reported by: rgrimes, imp Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25521 Notes: svn path=/head/; revision=363178
* Start splitting-out the Intel DMAR busdma backend to a generic place,Ruslan Bukin2020-07-1413-614/+865
| | | | | | | | | | | | | | | | | | so it can be used on other IOMMU systems. Provide MI iommu_unit, iommu_domain and iommu_ctx structs in sys/iommu.h; use them as a first member of MD dmar_unit, dmar_domain and dmar_ctx. Change the namespace in DMAR backend: use iommu_ prefix instead of dmar_. Move some macroses and function prototypes to sys/iommu.h. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D25574 Notes: svn path=/head/; revision=363177
* [pmc] whoops, remove spurious #'sAdrian Chadd2020-07-141-3/+3
| | | | | | | pointed out by gonzo@, thanks! Notes: svn path=/head/; revision=363176
* [hwpmc] Compile 'pmc' only if we have C++11.Adrian Chadd2020-07-141-3/+3
| | | | | | | | I noticed when compiling with ye olde gcc-6.3.0 on mips that it tripped over a lack of C++11 bits. This allows it to compile fine. Notes: svn path=/head/; revision=363174
* [ipfw] quieten maybe-uninitialized errors in ipfw when compiled under ↵Adrian Chadd2020-07-144-11/+10
| | | | | | | | | | | | mips-gcc-6.3.0. This is mostly an exercise to set variables to NULL/0 when declared, but one was ensuring a string variable was set before printing it. We should never see "<unknown>" in a printed rule; if we do then this code definitely has some bugs that need addressing. Notes: svn path=/head/; revision=363173
* [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0.Adrian Chadd2020-07-141-1/+1
| | | | | | | | I guess this didn't like the case statements.. ? But this does quieten the compiler error. Notes: svn path=/head/; revision=363172
* [flex] Fix compilation issue under mips-gcc-6.4Adrian Chadd2020-07-141-1/+1
| | | | | | | This was triggering a pointer-losing-constness error. Notes: svn path=/head/; revision=363171
* MFV: r362513Jung-uk Kim2020-07-14272-4577/+36259
|\ | | | | | | | | | | | | Update byacc to 20200330. Notes: svn path=/head/; revision=363170
| * Import byacc 20200330.vendor/byacc/20200330vendor/byaccJung-uk Kim2020-06-22267-4519/+36060
| | | | | | | | | | Notes: svn path=/vendor/byacc/dist/; revision=362513 svn path=/vendor/byacc/20200330/; revision=362514; tag=vendor/byacc/20200330
* | Actually install the new 221.backup-gpart periodic scriptAllan Jude2020-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Rob Fairbanks <rob.fx907@gmail.com> Reported by: Michael Butler <imb@protected-networks.net> MFC with: r363110 Sponsored by: Klara Inc. Notes: svn path=/head/; revision=363169
* | cxgbev(4): Compare at most 16 bytes of the Ethernet header when tryingNavdeep Parhar2020-07-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to coalesce tx work requests. Note that Coverity will still treat this as an out-of-bounds access. We do want to compare 16B starting from ethmacdst but cmp_l2hdr was was going beyond that by 2B. cmp_l2hdr was introduced in r362905. Reported by: Coverity (CID 1430284) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=363167
* | ipfw(8): Handle unaligned pointers in pr_u64.Mark Johnston2020-07-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | struct _ipfw_dyn_rule is defined as packed, and as a result, its uint64_t fields are misaligned on some 32-bit platforms. Since pr_u64() is explicitly supposed to handle this case, avoid using a uint64_t * for the input pointer to make sure that the compiler won't (correctly) warn about the misalignment. Reported by: jenkins MFC with: r363164 Notes: svn path=/head/; revision=363166