libprocstat kstack: fix race with thread creationWhen collecting kernel stacks for a target process, if the processadds a thread between the two calls to sysctl, ignore the additionalthreads. Pr
libprocstat kstack: fix race with thread creationWhen collecting kernel stacks for a target process, if the processadds a thread between the two calls to sysctl, ignore the additionalthreads. Previously, procstat would print only a useless errormessage. Now, it prints a consistent snapshot of the stacks.We know that snapshot is already stale, but it could still be staleeven with a more complex fix to reallocate and retry, so such a fixis hardly worth the effort.Reported by: [email protected]MFC after: 1 weekSponsored by: Dell EMC Isilon(cherry picked from commit 427f12f150e875c40acb84f292a80bfa0b90a1a2)
show more ...
procstat_getfiles_sysctl: do not require non-null ki_fdPR: 260174(cherry picked from commit 7a9423d6f360e3758ca67fbb25d309140ea93670)
Style(cherry picked from commit 0ea3e4a27bc0d1b0fdf876c3ef89d790e29ad5b1)
libprocstat: extend zfs_defs hack for .pieoBy default _pie.a archives are built only for INTERNALLIBs, so there isusually no need for zfs_defs.pieo to exist. However, some experimentalwork build
libprocstat: extend zfs_defs hack for .pieoBy default _pie.a archives are built only for INTERNALLIBs, so there isusually no need for zfs_defs.pieo to exist. However, some experimentalwork builds _pie.a archives for everything. Extend the existing set ofzfs_defs hacks to build zfs_defs.pieo as well.Reviewed by: arichardsonMFC after: 1 weekSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D31924(cherry picked from commit b9df18d6e8917a9bfb62babb7cf9efeca23aa2fc)
Decode and report native eventfd descriptors from libprocstat and procstat.Submitted by: [email protected]Reviewed by: markj (previous version)MFC after: 2 weeksDifferential
Decode and report native eventfd descriptors from libprocstat and procstat.Submitted by: [email protected]Reviewed by: markj (previous version)MFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D26668
libprocstat.3: Correct two occurrences of kvm_getprocs to procstat_getprocsSubmitted by: otis_sk.freebsd.orgReviewed by: markjMFC after: 3 daysDifferential Revision: https://reviews.freebsd.org/
libprocstat.3: Correct two occurrences of kvm_getprocs to procstat_getprocsSubmitted by: otis_sk.freebsd.orgReviewed by: markjMFC after: 3 daysDifferential Revision: https://reviews.freebsd.org/D26151
Remove the cloned file descriptors for /dev/crypto.Crypto file descriptors were added in the original OCF import as a wayto provide per-open data (specifically the list of symmetricsessions). Ho
Remove the cloned file descriptors for /dev/crypto.Crypto file descriptors were added in the original OCF import as a wayto provide per-open data (specifically the list of symmetricsessions). However, this gives a bit of a confusing API where one hasto open /dev/crypto and then invoke an ioctl to obtain a second filedescriptor. This also does not match the API used with /dev/crypto onother BSDs or with Linux's /dev/crypto driver.Character devices have gained support for per-open data via cdevprivsince OCF was imported, so use cdevpriv to simplify the userland APIby permitting ioctls directly on /dev/crypto descriptors.To provide backwards compatibility, CRIOGET now opens another/dev/crypto descriptor via kern_openat() rather than dup'ing theexisting file descriptor. This preserves prior semantics in caseCRIOGET is invoked multiple times on a single file descriptor.Reviewed by: markjRelnotes: yesSponsored by: Chelsio CommunicationsDifferential Revision: https://reviews.freebsd.org/D27302
Split out cwd/root/jail, cmask state from filedesc tableNo functional change intended.Tracking these structures separately for each proc enables future work tocorrectly emulate clone(2) in linux
Split out cwd/root/jail, cmask state from filedesc tableNo functional change intended.Tracking these structures separately for each proc enables future work tocorrectly emulate clone(2) in linux(4).__FreeBSD_version is bumped (to 1300130) for consumption by, e.g., lsof.Reviewed by: kibDiscussed with: markj, mjgDifferential Revision: https://reviews.freebsd.org/D27037
Merge OpenZFS support in to HEAD.The primary benefit is maintaining a completely sharedcode base with the community allowing FreeBSD to receivenew features sooner and with less effort.I would a
Merge OpenZFS support in to HEAD.The primary benefit is maintaining a completely sharedcode base with the community allowing FreeBSD to receivenew features sooner and with less effort.I would advise against doing 'zpool upgrade'or creating indispensable pools using newfeatures until this change has had a month+to soak.Work on merging FreeBSD support in to what wasat the time "ZFS on Linux" began in August 2018.I first publicly proposed transitioning FreeBSDto (new) OpenZFS on December 18th, 2018. FreeBSDsupport in OpenZFS was finally completed in December2019. A CFT for downstreaming OpenZFS support into FreeBSD was first issued on July 8th. All issuesthat were reported have been addressed or, fora couple of less critical matters there arepull requests in progress with OpenZFS. iXsystemshas tested and dogfooded extensively internally.The TrueNAS 12 release is based on OpenZFS withsome additional features that have not yet madeit upstream.Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression.Thanks to those who have helped along the way:Ryan Moeller, Allan Jude, Zack Welch, and manyothers.Sponsored by: iXsystems, Inc.Differential Revision: https://reviews.freebsd.org/D25872
Avoid adding duplicates to SRCS/OBJS/SOBJS/POBJSThis is a change in preparation for stopping to use lorder.sh (D26044) andinstead assume that we have a linker newer than ~1990. Without lorder.shd
Avoid adding duplicates to SRCS/OBJS/SOBJS/POBJSThis is a change in preparation for stopping to use lorder.sh (D26044) andinstead assume that we have a linker newer than ~1990. Without lorder.shduplicates end up being passed to the linker when building .so files and thiscan result in duplicate symbol definition errors.There is one minor change: libcompiler_rt.a will no longer providegcc_personality_v0 and instead we now only have it in libgcc_eh.a/libgcc_s.so.This matches GCC's behaviour.Reviewed By: emaste, cemDifferential Revision: https://reviews.freebsd.org/D26042
libprocstat: fix kvm filedesc access after introduction of fdescenttbl
libprocstat: try to fix fallout from r361363The revision caused libprocstat to have two undefined symbols:- __start_set_pcpu- __stop_set_pcpuprobably because of __GLOBL() used in sys/pcpu.h unde
libprocstat: try to fix fallout from r361363The revision caused libprocstat to have two undefined symbols:- __start_set_pcpu- __stop_set_pcpuprobably because of __GLOBL() used in sys/pcpu.h under _KERNEL.The symbols are not accessed by anything and the linker in base does notcomplain about them, but some ports are failing to build.Hack around the problem by providing definitions for those symbols.Probably there is a better solution, but I could not think of it yet.Reported by: zeisingMFC after: 3 daysX-MFC with: r361363Sponsored by: Panzura
libprocstat: fix ZFS supportFirst of all, znode_phys_t hasn't been used for storing file attributesfor a long time now. Modern ZFS versions use a System Attribute tablewith a flexible layout. B
libprocstat: fix ZFS supportFirst of all, znode_phys_t hasn't been used for storing file attributesfor a long time now. Modern ZFS versions use a System Attribute tablewith a flexible layout. But more importantly all the requiredinformation is available in znode_t itself.It's not easy to include zfs_znode.h in userland without breaking codebecause the most interesting parts of the header are kernel-only. Andhardcoding field offsets is too fragile. So, I created a newcompilation unit that includes zfs_znode.h using some mild kludges toget it and its dependencies to compile in userland. The compilationunit exports interesting field offsets and does not have any other code.PR: 194117Reviewed by: markjMFC after: 2 weeksSponsored by: PanzuraDifferential Revision: https://reviews.freebsd.org/D24941
libprocstat: fix reading of file descriptor table via kvmThis seems to have been broken since r247602 (from year 2013!).Can be easily tested with fstat -N /boot/kernel/kernel -M /var/crash/vmcor
libprocstat: fix reading of file descriptor table via kvmThis seems to have been broken since r247602 (from year 2013!).Can be easily tested with fstat -N /boot/kernel/kernel -M /var/crash/vmcore.lastMFC after: 1 weekSponsored by: Panzura
Remove the SYMVER build option.This option was added as a transition aide when symbol versioning wasfirst added. It was enabled by default in 2007 and is supported evenby the old GPLv2 binutils.
Remove the SYMVER build option.This option was added as a transition aide when symbol versioning wasfirst added. It was enabled by default in 2007 and is supported evenby the old GPLv2 binutils. Trying to disable it currently fails tobuild in libc and at this point it isn't worth fixing the build.Reported by: Michael DexterReviewed by: impDifferential Revision: https://reviews.freebsd.org/D24637
fd: use smr for managing struct pwdThis has a side effect of eliminating filedesc slock/sunlock during pathlookup, which in turn removes contention vs concurrent modifications to the fdtable.Re
fd: use smr for managing struct pwdThis has a side effect of eliminating filedesc slock/sunlock during pathlookup, which in turn removes contention vs concurrent modifications to the fdtable.Reviewed by: markj, kibDifferential Revision: https://reviews.freebsd.org/D23889
fd: move vnodes out of filedesc into a dedicated structureThe new structure is copy-on-write. With the assumption that path lookups aresignificantly more frequent than chdirs and chrooting this is
fd: move vnodes out of filedesc into a dedicated structureThe new structure is copy-on-write. With the assumption that path lookups aresignificantly more frequent than chdirs and chrooting this is a win.This provides stable root and jail root vnodes without the need to referencethem on lookup, which in turn means less work on globally shared structures.Note this also happens to fix a bug where jail vnode was never referenced,meaning subsequent access on lookup could run into use-after-free.Reviewed by: kibDifferential Revision: https://reviews.freebsd.org/D23884
procstat: read lo_name instead of now removed v_tag
Update Makefile.depend filesUpdate a bunch of Makefile.depend files asa result of adding Makefile.depend.options filesReviewed by: bdreweryMFC after: 1 weekSponsored by: Juniper NetworksDi
Update Makefile.depend filesUpdate a bunch of Makefile.depend files asa result of adding Makefile.depend.options filesReviewed by: bdreweryMFC after: 1 weekSponsored by: Juniper NetworksDifferential Revision: https://reviews.freebsd.org/D22494
Define a vm_map method for user-space for advancing from a map entryto its successor in cases where examining a map entry requires ahelper like kvm_read_all. Use that method, with kvm_read_all, to
Define a vm_map method for user-space for advancing from a map entryto its successor in cases where examining a map entry requires ahelper like kvm_read_all. Use that method, with kvm_read_all, to fixprocstat_getfiles_kvm, which tries to find the successor now withoutusing such a helper. This addresses a problem introduced by r355491.Reviewed by: markj (previous version)Discussed with: kibDifferential Revision: https://reviews.freebsd.org/D22728
Fix a type error in fixing libprocstat to be compatible with vm_map changes.Approved by: markjDifferential Revision: https://reviews.freebsd.org/D22726
r355491 broke compilation of libprocstat.c. Change that code to usenew methods for accessing first, next map entries.Approved by: kibDifferential Revision: https://reviews.freebsd.org/D22725
pkgbase: Create a FreeBSD-utilities package and make it the default oneThe default package use to be FreeBSD-runtime but it should only containbinaries and libs enough to boot to single user and r
pkgbase: Create a FreeBSD-utilities package and make it the default oneThe default package use to be FreeBSD-runtime but it should only containbinaries and libs enough to boot to single user and repair the system, itis also very handy to have a package that can be tranform to a small mfsroot.So create a new package named FreeBSD-utilities and make it the default one.Also move a few binaries and lib into this package when it make sense.Reviewed by: bapt, gjbDifferential Revision: https://reviews.freebsd.org/D21506
Bump SPECNAMELEN to MAXNAMLEN.This includes the bump for cdevsw d_version. Otherwise, the impact onthe ABI (not KBI) is surprisingly low. The most important affectedinterface is devname(3) and
Bump SPECNAMELEN to MAXNAMLEN.This includes the bump for cdevsw d_version. Otherwise, the impact onthe ABI (not KBI) is surprisingly low. The most important affectedinterface is devname(3) and ttyname(3) which already correctly handlelong names (and ttyname(3) should not be affected at all).Still, due to the d_version bump, I argue that the change is not MFC-able.Requested by: mmacyReviewed by: jhbSponsored by: The FreeBSD FoundationDifferential revision: https://reviews.freebsd.org/D18932
Print type designator 'D' for the KF_TYPE_DEV files.No type-specific data is provided by the kernel.Sponsored by: Mellanox TechnologiesMFC after: 1 week
1234