aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Move opieaccess to lib/libopie/Brad Davis2018-09-203-2/+5
| | | | | | | | | | This leverages CONFS to do the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17241 Notes: svn path=/head/; revision=338823
* Move hosts.lpd and printcap to usr.sbin/lpr/lpd/Brad Davis2018-09-204-4/+1
| | | | | | | | | | This leverages CONFS to handle the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17238 Notes: svn path=/head/; revision=338822
* Various fixes for floating point on RISC-V.John Baldwin2018-09-194-3/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Explicitly load an empty initial state into FP registers when taking the fault on the first FP instruction in a thread. Setting SSTATE.FS to INITIAL is just a marker to let context switch restore code know that it can load FP registers with zeroes instead of memory loads. It does not imply that the hardware will reset all registers to zero on first access. In addition, set the state to CLEAN instead of INITIAL after the first FP instruction. cpu_switch() doesn't do anything for INITIAL and only restores from the pcb if the state is CLEAN. We could perhaps change cpu_switch to call fpe_state_clear if the state was INITIAL and leave SSTATE.FS set to INITIAL instead of CLEAN after the first FP instruction. However, adding this complexity to cpu_switch() doesn't seem worth the supposed gain. - Only save the current FPU registers in fill_fpregs() if the request is made to save the current thread's registers. Previously if a debugger requested FP registers via ptrace() it was getting a copy of the debugger's FP registers rather than the debugee's. - Zero the entire FP register set structure returned for ptrace() if a thread hasn't used FP registers rather than leaking garbage in the fp_fcsr field. - If a debugger writes FP registers via ptrace(), always mark the pcb as having valid FP registers and set SSTATUS.FS_MASK to CLEAN so that the registers will be restored when the debugged thread resumes. - Be more explicit about clearing the SSTATUS.FS field before setting it to CLEAN on the first FP instruction trap. Submitted by: br, markj Approved by: re (rgrimes) Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17141 Notes: svn path=/head/; revision=338814
* Clear all of the VFP state in fill_fpregs().John Baldwin2018-09-191-1/+1
| | | | | | | | | | | | | | | Zero the entire FP register set structure returned for ptrace() if a thread hasn't used FP registers rather than leaking garbage in the fp_sr and fp_cr fields. Reviewed by: emaste, andrew Approved by: re (rgrimes) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17140 Notes: svn path=/head/; revision=338813
* openssh: rename local macro to avoid OpenSSL 1.1.1 conflictEd Maste2018-09-193-7/+7
| | | | | | | | | | | | | Local changes introduced an OPENSSH_VERSION macro, but this conflicts with a macro of the same name introduced with OepnsSL 1.1.1 Reviewed by: des Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338810
* Convert x86 cache invalidation functions to ifuncs.Konstantin Belousov2018-09-198-87/+139
| | | | | | | | | | | | | This simplifies the runtime logic and reduces the number of runtime-constant branches. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16736 Notes: svn path=/head/; revision=338807
* Move kernel vmem arena initialization to vm_kern.c.Mark Johnston2018-09-192-83/+83
| | | | | | | | | | | | | | | This keeps the initialization coupled together with the kmem_* KPI implementation, which is the main user of these arenas. No functional change intended. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17247 Notes: svn path=/head/; revision=338806
* Update udp6_output() inp locking to avoid concurrency issues withBjoern A. Zeeb2018-09-191-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | route cache updates. Bring over locking changes applied to udp_output() for the route cache in r297225 and fixed in r306559 which achieve multiple things: (1) acquire an exclusive inp lock earlier depending on the expected conditions; we add a comment explaining this in udp6, (2) having acquired the exclusive lock earlier eliminates a slight possible chance for a race condition which was present in v4 for multiple years as well and is now gone, and (3) only pass the inp_route6 to ip6_output() if we are holding an exclusive inp lock, so that possible route cache updates in case of routing table generation number changes can happen safely. In addition this change (as the legacy IP counterpart) decomposes the tracking of inp and pcbinfo lock and adds extra assertions, that the two together are acquired correctly. PR: 230950 Reviewed by: karels, markj Approved by: re (gjb) Pointyhat to: bz (for completely missing this bit) Differential Revision: https://reviews.freebsd.org/D17230 Notes: svn path=/head/; revision=338804
* Convert i386 NPX hardware context save methods to ifuncs.Konstantin Belousov2018-09-191-32/+66
| | | | | | | | | | | | | Since ifunc-capable linker is now required on i386, bring this code in line with the amd64 counterpart. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16736 Notes: svn path=/head/; revision=338803
* vm: check for empty kstack cache before lockingMateusz Guzik2018-09-191-1/+1
| | | | | | | | | | | | | | | | | | The current cache logic checks the total number of stacks in the kernel, which even on small boxes significantly exceeds the 128 limit (e.g. an 8-way box with zfs has almost 800 stacks allocated). Stacks are cached earlier for each main thread. As a result the code is rarely executed, but when it is then (on boxes like the above) it always fails. Since there are no provisions made for NUMA and release time is approaching, just do a quick check to avoid acquiring the lock. Approved by: re (kib) Notes: svn path=/head/; revision=338802
* amd64 pmap: remove tautological assert.Konstantin Belousov2018-09-191-2/+1
| | | | | | | | | | | | | | | pm_pcid is unsigned. Reviewed by: cem, markj CID: 1395727 Noted by: cem Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 3 days Differential revision: https://reviews.freebsd.org/D17235 Notes: svn path=/head/; revision=338801
* Move remote & phones to usr.bin/tip/tip/Brad Davis2018-09-194-2/+4
| | | | | | | | Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17219 Notes: svn path=/head/; revision=338800
* Fix ZFS VFS op quotactl to follow busy protocol.Konstantin Belousov2018-09-191-0/+4
| | | | | | | | | | | | Reviewed by: avg, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D17208 Notes: svn path=/head/; revision=338799
* Fix state of dquot-less vnodes after failed quotaoff.Konstantin Belousov2018-09-193-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UFS quotaoff iterates over all mp vnodes, and derefences and clears the pointers to corresponding dquots. If SU work items transiently reference some of dquots,quotaoff() would eventually fail, but all processed vnodes are already stripped from dquots. The state is problematic, since quotas are left enabled, but there is no dquots where blocks and inodes can be accounted. The result is assertion failures and NULL pointer dereferences. Fix it by suspending writes around quotaoff() call. Since the filesystem is synced, no dandling references to dquots from SU workitems can left behind, which means that quotaoff succeeds. The complication there is that quotaoff VFS op is performed with the mount point busied, while to suspend, we need to start write on the mp. If vn_start_write() is called on busied mp, system might deadlock against parallel unmount request. Handle this by unbusy-ing mp before starting write, which in turn requires changing the quotaoff() interface to return with the mount point not busied, same as was done for quotaon(). Reviewed by: mckusick Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D17208 Notes: svn path=/head/; revision=338798
* Move regdomain.xml to lib/lib80211/Brad Davis2018-09-193-4/+1
| | | | | | | | | | | This leverages CONFS to handle the install. lib80211 was picked because it is where this file is actually used from. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17229 Notes: svn path=/head/; revision=338794
* cxgbetool(8): Clarify the meaning of the "queue" parameter used to steerNavdeep Parhar2018-09-181-4/+7
| | | | | | | | | | traffic to a particular queue. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re@ (kib@) Notes: svn path=/head/; revision=338762
* cxgbe(4): Enable TXRTLMT by default when the feature is available in theNavdeep Parhar2018-09-181-2/+4
| | | | | | | | | | | kernel (options RATELIMIT) and provisioned in the driver's configuration file (nethofld > 0). Submitted by: gallatin@ Approved by: re@ (kib@) Notes: svn path=/head/; revision=338761
* Move libalias.conf to lib/libalias/libalias/Brad Davis2018-09-183-1/+1
| | | | | | | | | | This leveages CONFS to handle the install. Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17218 Notes: svn path=/head/; revision=338760
* Move disktab to sbin/bsdlabel/Brad Davis2018-09-183-1/+1
| | | | | | | | | | This leverages CONFS to handle the install. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17217 Notes: svn path=/head/; revision=338759
* Move install of locate.rc to usr.bin/locate/locate/Brad Davis2018-09-182-8/+1
| | | | | | | | | | This leverages CONFS to handle the install and purges an old comment. Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17215 Notes: svn path=/head/; revision=338758
* Move mail.rc install to usr.bin/mail.Brad Davis2018-09-182-4/+1
| | | | | | | | | | This leverages CONFS to do the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17216 Notes: svn path=/head/; revision=338757
* Only update the domain cursor once in keg_fetch_slab().Mark Johnston2018-09-181-4/+2
| | | | | | | | | | | | | | | | | We drop the keg lock when we go to actually allocate the slab, allowing other threads to advance the cursor. This can cause us to exit the round-robin loop before having attempted allocations from all domains, resulting in a hang during a subsequent blocking allocation attempt from a depleted domain. Reported and tested by: Jan Bramkamp <crest@bultmann.eu> Reviewed by: alc, cem Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17209 Notes: svn path=/head/; revision=338755
* Update the pkg-stage.sh script used to populate packages on theGlen Barber2018-09-181-1/+1
| | | | | | | | | | | | | dvd1.iso installation medium from including KDE4 to KDE5, as the KDE4-based ports have been marked as deprecated in the Ports Collection. MFC after: 3 days Approved by: re (rgrimes) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338754
* Regen after r338752.Brooks Davis2018-09-181-1/+9
| | | | | | | | Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17211 Notes: svn path=/head/; revision=338753
* Only enable HyperV support by default on x86.Brooks Davis2018-09-182-1/+9
| | | | | | | | | | | | Without this we get spurious output during boot as we try to run nonexistant HyperV scripts on non-x86 models. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17211 Notes: svn path=/head/; revision=338752
* Fix C11 and POSIX 1003.1b-1993 compliance in time.hBrooks Davis2018-09-181-0/+4
| | | | | | | | | | | | | Only expose timespec_get in C11, C++17, or BSD code. Always define struct timespect if defining timespec_get. PR: 231425 Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17174 Notes: svn path=/head/; revision=338751
* Require ifunc-capable linker for i386Ed Maste2018-09-181-3/+4
| | | | | | | | | | | | | | The amd64 kernel started using ifunc for a variety of functions with arch-specific implementations, and we would like to make use of the same functionality on i386 and as much as possible avoid divergence between i386 and amd64. In particular, future changes for security improvements and mitigations may rely on ifunc support. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338750
* Remove unused code.Michael Tuexen2018-09-182-37/+0
| | | | | | | | Approved by: re (kib@) MFC after: 1 week Notes: svn path=/head/; revision=338749
* Move mac.conf to lib/libc/posix1e/Brad Davis2018-09-183-1/+1
| | | | | | | | | | This leverages CONFS to handle the install of the config file. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17162 Notes: svn path=/head/; revision=338745
* Fix CONFS to append the value in this case.Brad Davis2018-09-181-1/+1
| | | | | | | Approved by: re (blanket, pkgbase), will (mentor) Notes: svn path=/head/; revision=338744
* vm: stop taking proc lock in mmap to satisfy racct if it is disabledMateusz Guzik2018-09-182-13/+21
| | | | | | | | | | | | | | | | Limits can be safely obtained with lim_cur from the thread. racct is compiled in but disabled by default. Note that racct enablement is a boot-only tunable. This eliminates second most common place of taking the lock while pkg building. While here don't take the lock in mlockall either. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17210 Notes: svn path=/head/; revision=338743
* Move amd.map to usr.sbin/amd/amd/Brad Davis2018-09-183-4/+1
| | | | | | | | | | This leverages CONFS to handle the install of the config file. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17159 Notes: svn path=/head/; revision=338742
* Move libmap.conf to libexec/rtld-elf/Brad Davis2018-09-183-1/+1
| | | | | | | | | | This leverages CONFS to handle the config file install. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17161 Notes: svn path=/head/; revision=338741
* Move dhclient.conf to sbin/dhclient/.Brad Davis2018-09-183-1/+1
| | | | | | | | | | This also leverages CONFS for handling config files. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17160 Notes: svn path=/head/; revision=338740
* Remove dhclient.conf from here in prep for the move of it from etc/.Brad Davis2018-09-181-39/+0
| | | | | | | | | | This is being done a separate step to ease importing into other VCSes. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17160 Notes: svn path=/head/; revision=338739
* DIRS: Rework how duplicated dirs are installed.Bryan Drewery2018-09-171-10/+21
| | | | | | | | | | | | | - Warn if multiple DIRS have conflicting metadata - This fixes META_MODE writing to a very long .meta file that contained the full DESTDIR path. Reported by: sjg, jonathan Sponsored by: Dell EMC Approved by: re (gjb) Notes: svn path=/head/; revision=338738
* installdirs can be a recursive/standalone target.Bryan Drewery2018-09-171-1/+2
| | | | | | | | Sponsored by: Dell EMC Approved by: re (gjb) Notes: svn path=/head/; revision=338737
* PROGS: Don't redundantly process DIRS.Bryan Drewery2018-09-171-1/+1
| | | | | | | | Sponsored by: Dell EMC Approved by: re (gjb) Notes: svn path=/head/; revision=338736
* DIRS: installdirs should also be .PHONYBryan Drewery2018-09-171-2/+2
| | | | | | | | Sponsored by: Dell EMC Approved by: re (gjb, kib) Notes: svn path=/head/; revision=338735
* Fixed isses:David C Somayajulu2018-09-171-8/+10
| | | | | | | | | | | State check before enqueuing transmit task in bxe_link_attn() routine. State check before invoking bxe_nic_unload in bxe_shutdown(). Submitted by:Vaishali.Kulkarni@cavium.com Approved by:re(gjb) Notes: svn path=/head/; revision=338734
* Do not upgrade the vnode lock to call getinoquota().Konstantin Belousov2018-09-171-28/+7
| | | | | | | | | | | | | | | | | | Doing so can deadlock when the thread already owns another vnode lock, e.g. during a rename, as was demonstrated by the reporter. In fact, there seems to be no need to force the call to getinoquota() always, because vn_open() locks vnode exclusively, and this is the most important case. To add to the point, directories where the dirent is added or removed, are locked exclusively as well. Reported by: bwidawsk Tested by: bwidawsk, pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Notes: svn path=/head/; revision=338733
* Move rpc and netconfig to lib/libc/rpc/Brad Davis2018-09-174-2/+1
| | | | | | | | | | | | | | This uses relative paths to make it more specific to avoid any potential future problems with .PATH and leverages CONFS. libc was picked as the destination location for these because of the syscalls that use these files as the lowest level place they are referenced. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17163 Notes: svn path=/head/; revision=338732
* Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/Brad Davis2018-09-177-9/+6
| | | | | | | | | | | | | | This uses relative paths to make it more specific to avoid any potential future problems with .PATH and leverages CONFS. libc was picked as the destination location for these because of the syscalls that use these files as the lowest level place they are referenced. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17164 Notes: svn path=/head/; revision=338729
* Fix a regression in r338360 when booting an x86 machine without APIC.John Baldwin2018-09-171-2/+8
| | | | | | | | | | | | | | | | The atpic_register_sources callback tries to avoid registering interrupt sources that would collide with an I/O APIC. However, the previous implementation was failing to register IRQs 8-15 since the slave PIC saw valid IRQs from the master and assumed an I/O APIC was present. To fix, go back to registering all 8259A interrupt sources in one loop when the master's register_sources method is invoked. PR: 231291 Approved by: re (kib) MFC after: 1 month Notes: svn path=/head/; revision=338725
* Fix an nvpair leak in vdev_geom_read_config().Mark Johnston2018-09-171-9/+12
| | | | | | | | | | | | | | | | | | Also change the behaviour slightly: instead of freeing "config" if the last nvlist doesn't pass the tests, return the last config that did pass those tests. This matches the comment at the beginning of the function. PR: 230704 Diagnosed by: avg Reviewed by: asomers, avg Tested by: Mark Martinec <Mark.Martinec@ijs.si> Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D17202 Notes: svn path=/head/; revision=338724
* Use ifunc to resolve context switching mode on amd64.Konstantin Belousov2018-09-171-90/+167
| | | | | | | | | | | | | | | Patch removes all checks for pti/pcid/invpcid from the context switch path. I verified this by looking at the generated code, compiling with the in-tree clang. The invpcid_works1 trick required inline attribute for pmap_activate_sw_pcid_pti() to work. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17181 Notes: svn path=/head/; revision=338715
* amd64: tidy up kernel memmove, take 2Mateusz Guzik2018-09-171-18/+15
| | | | | | | | | | | | | | | There is no need to use %rax for temporary values and avoiding doing so shortens the func. Handle the explicit 'check for tail' depessimisization for backwards copying. This reduces the diff against userspace. Tested with the glibc test suite. Approved by: re (kib) Notes: svn path=/head/; revision=338714
* amd64: depessimize userspace memcpy/memmove/bcopyMateusz Guzik2018-09-172-4/+16
| | | | | | | | | | | | | The change resembles what was done in r334537 for kernel routines. While here take care of i386 variants. Note that primitives remain suboptimal. Reviewed by: kib (previous version) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17167 Notes: svn path=/head/; revision=338713
* Calculate PTI, PCID and INVPCID modes earlier, before ifuncs are resolved.Konstantin Belousov2018-09-172-10/+16
| | | | | | | | | | | | This will be used in following conversion of pmap_activate_sw(). Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17181 Notes: svn path=/head/; revision=338712
* Make the PTI violation check to follow style of the SMAP check.Konstantin Belousov2018-09-171-5/+12
| | | | | | | | | | | | | No functional changes. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (rgrimes) Differential revision: https://reviews.freebsd.org/D17181 Notes: svn path=/head/; revision=338711