aboutsummaryrefslogtreecommitdiff
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* libdtrace: fix indendation in dt_printd()Christos Margiolis2 days1-1/+1
| | | | | | | | No functional change. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39145
* ctf: Remove unused function prototype for getpname()Zhenlei Huang2023-02-261-2/+0
| | | | | | | | This function prototype should have been removed along with the implementation. Fixes: 3dd552426409 ctfdump: Use getprogname() MFC after: 1 day
* zpool: install vdevprops(7) man pageYuri2023-02-251-0/+1
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/666
* lockstat: Use gelf.h instead of playing games with the preprocessorMark Johnston2023-02-251-13/+8
| | | | | | | This reverts a portion of 1477dd823ee ("Merge OpenZFS support in to HEAD."). No functional change intended. MFC after: 1 week
* lockstat: Use the correct type for a symbol sizeMark Johnston2023-02-251-1/+1
| | | | | | No functional change intended. MFC after: 1 week
* Delete obsolete Solaris compat header file stdlib.hZhenlei Huang2023-02-231-37/+0
| | | | | | | | | | | | | | | | | | | | This drops function `getexecname()` redirection. Historically `getexecname()` is a compatibility definition. Since openzfs has its own implementation of function `getexecname()` in libspl and has been merged into base, the compat header file stdlib.h is no longer needed and should not be used. Also without this fix libspl will end up an incompatible version of `getprogname()` with libc. In particular, if zfs is enabled, programs such as pgrep in /rescue can be wrongly statically linked with libspl and will not function properly. PR: 269738 Reviewed by: markj Fixes: 9e5787d2284e Merge OpenZFS support in to HEAD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38733
* ctfdump: Use getprogname()Zhenlei Huang2023-02-232-25/+1
| | | | | | | | Also remove no longer used function `getpname()`. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38740
* pkgbase: Create a FreeBSD-ctf-tools packageEmmanuel Vadot2023-02-083-0/+3
| | | | | | | It contains the ctf tools that most users will never use. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38223
* libdtrace: add riscv supportMitchell Horne2023-02-061-7/+103
| | | | | | | | | | | Largely untested, as we can't really do anything with user probes without an implementation of fasttrap. However, this is enough to generate an embedded dtrace program with `dtrace -G` and link the generated ELF file. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38301
* libdtrace: drop remaining mips supportMitchell Horne2023-02-062-28/+2
| | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38300
* zfs: Disable -Wunused-variable for environ in main in zfs_main.c.John Baldwin2023-01-301-0/+2
| | | | | | | | | | There is an extern declaration of the global variable environ (which has no portable header that defines it) that is unused on FreeBSD due to zfs_setproctitle_init() being a stub. Reviewed by: emaste Reported by: GCC Differential Revision: https://reviews.freebsd.org/D38231
* Retire WITHOUT_CXX optionEd Maste2023-01-271-2/+1
| | | | | | | | | | | | Several important base system components are written in C++, and the WITHOUT_CXX option produced a system that was not fully functional. Just accept this, and remove the option to build without C++ support. This reverts commit adc3c128c6603054586a993d117e5dd808deac17. Reviewed by: brooks, kevans, jhb (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33108
* dtrace: remove stray {Kristof Provost2023-01-241-1/+1
| | | | | Fixes: da81cc6035f8283b6adda1ef466977e8c1c5389e PR: 269128
* dtrace: conditionally load the systrace_linux klds when loading dtrace.Andrew Gallatin2023-01-241-0/+9
| | | | | | | | | | | | | | | | | | | When dtrace starts, it tries to detect if the dtrace klds are loaded, and if not, it loads them by loading the dtraceall kld. This module depends on most dtrace modules, including systrace for the native freebsd and freebsd32 ABIs. However, it does not depend on the systrace_linux klds, as they in turn depend on the linux ABI klds, and we don't want to load an ABI module that the user has not explicitly requested. This can leave a naive user in a state where they think all syscall providers have been loaded, yet linux ABI syscalls are "invisible" to dtrace. To fix this, check to see if the linux ABI modules are loaded. If they are, then load their systrace klds. Reviewed by: markj, (emaste & jhb, earlier versions) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D37986
* libdtrace: Change the binding of USDT probe symbols to STB_WEAKMark Johnston2022-12-111-0/+1
| | | | | | | | | | | | | | | | Otherwise, if multiple object files contain references to the same probe, newish lld will refuse to link them by default, raising a duplicate global symbol definition error. Previously, duplicate global symbols with identical absolute st_values were permitted by both lld and GNU ld. Since dtrace has no use for probe function symbols after the relocation performed by dtrace -G, make the symbols weak as well, following a suggestion from MaskRay. Reported by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation
* dtrace tests: Extend the kinst regression testMark Johnston2022-12-081-0/+1
| | | | Trace a function which disables interrupts.
* tcp: embed inpcb into tcpcbGleb Smirnoff2022-12-071-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the TCP protocol inpcb storage specify allocation size that would provide space to most of the data a TCP connection needs, embedding into struct tcpcb several structures, that previously were allocated separately. The most import one is the inpcb itself. With embedding we can provide strong guarantee that with a valid TCP inpcb the tcpcb is always valid and vice versa. Also we reduce number of allocs/frees per connection. The embedded inpcb is placed in the beginning of the struct tcpcb, since in_pcballoc() requires that. However, later we may want to move it around for cache line efficiency, and this can be done with a little effort. The new intotcpcb() macro is ready for such move. The congestion algorithm data, the TCP timers and osd(9) data are also embedded into tcpcb, and temprorary struct tcpcb_mem goes away. There was no extra allocation here, but we went through extra pointer every time we accessed this data. One interesting side effect is that now TCP data is allocated from SMR-protected zone. Potentially this allows the TCP stacks or other TCP related modules to utilize that for their own synchronization. Large part of the change was done with sed script: s/tp->ccv->/tp->t_ccv./g s/tp->ccv/\&tp->t_ccv/g s/tp->cc_algo/tp->t_cc/g s/tp->t_timers->tt_/tp->tt_/g s/CCV\(ccv, osd\)/\&CCV(ccv, t_osd)/g Dependency side effect is that code that needs to know struct tcpcb should also know struct inpcb, that added several <netinet/in_pcb.h>. Differential revision: https://reviews.freebsd.org/D37127
* dwatch: install hard links with same mode as targetEd Maste2022-11-231-0/+1
| | | | | | | | | | Previoulsy when using NO_ROOT we recorded METALOG entries for dwatch hard links with different file modes than their link targets, which is not permitted. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37477
* libicp: Link with -z noexecstack for ld.bfd.John Baldwin2022-11-222-0/+4
| | | | | The assembly source files do not contain GNU-stack annotations, so ld.bfd defaults to using an executable stack.
* zfs: merge openzfs/zfs@2163cde45Martin Matuska2022-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #13680 Add options to zfs redundant_metadata property #13758 Allow mounting snapshots in .zfs/snapshot as a regular user #13838 quota: disable quota check for ZVOL #13839 quota: extend quota for dataset #13973 Fix memory leaks in dmu_send()/dmu_send_obj() #13977 Avoid unnecessary metaslab_check_free calling #13978 PAM: Fix unchecked return value from zfs_key_config_load() #13979 Handle possible null pointers from malloc/strdup/strndup() #13997 zstream: allow decompress to fix metadata for uncompressed records #13998 zvol_wait logic may terminate prematurely #14001 FreeBSD: Fix a pair of bugs in zfs_fhtovp() #14003 Stop ganging due to past vdev write errors #14039 Optimize microzaps #14050 Fix draid2+2s metadata error on simultaneous 2 drive failures #14062 zed: Avoid core dump if wholedisk property does not exist #14077 Propagate extent_bytes change to autotrim thread #14079 FreeBSD: vn_flush_cached_data: observe vnode locking contract #14093 Fix ARC target collapse when zfs_arc_meta_limit_percent=100 #14106 Add ability to recompress send streams with new compression algorithm #14119 Deny receiving into encrypted datasets if the keys are not loaded #14120 Fix arc_p aggressive increase #14129 zed: Prevent special vdev to be replaced by hot spare #14133 Expose zfs_vdev_open_timeout_ms as a tunable #14135 FreeBSD: Fix out of bounds read in zfs_ioctl_ozfs_to_legacy() #14152 Adds the `-p` option to `zfs holds` #14161 Handle and detect #13709's unlock regression Obtained from: OpenZFS OpenZFS commit: 2163cde450d0898b5f7bac16afb4e238485411ff
* pkgbase: Put zfs utilities and lib in their own packageEmmanuel Vadot2022-10-2622-14/+23
| | | | | | | | | It is useful to have zfs utilities and lib in a separate package as it allow users to create image that can support ZFS (i.e. not with WITHOUT_ZFS in src.conf set) without bloating the default image with all zfs tools (for example for jails). Differential Revision: https://reviews.freebsd.org/D36225
* zfsd(8): Fix a typo in an error messageGordon Bergling2022-10-251-1/+1
| | | | | | - s/faild/failed/ MFC after: 1 week
* libdtrace: Fix some CPU register number definitions to match the kernelMark Johnston2022-10-121-3/+3
| | | | MFC after: 1 week
* kinst: Add a rudimentary regression test caseMark Johnston2022-10-113-1/+67
| | | | | | | The test instruments a number of large, frequently called kernel functions while generating load in the background. MFC after: 3 months
* libdtrace: Add kinst supportChristos Margiolis2022-10-114-0/+34
| | | | | | | | | | | | kinst does not instantiate its probes automatically, it only does so on demand via an ioctl interface implemented by /dev/kinst. This change modifies libdtrace to perform that work when the script references the kinst provider, similar to the way pid provider probes are implemented. Reviewed by: markj MFC after: 3 months Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D36852
* dtrace: Add a "regs" variableMark Johnston2022-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This allows invop-based providers (i.e., fbt and kinst) to expose the register file of the CPU at the point where the probe fired. It does not work for SDT providers because their probes are implemented as plain function calls and so don't save registers. It's not clear what semantics "regs" should have for them anyway. This is akin to "uregs", which nominally provides access to the userspace registers. In fact, DIF already had a DIF_VAR_REGS variable defined, it was simply unimplemented. Usage example: print the contents of %rdi upon each call to amd64_syscall(): fbt::amd64_syscall:entry {printf("%x", regs[R_RDI]);} Note that the R_* constants are defined in /usr/lib/dtrace/regs_x86.d. Currently there are no similar definitions for non-x86 platforms. Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36799
* libzpool: Disable -Wuse-after-free for dbuf.c.John Baldwin2022-10-031-0/+4
| | | | | | | | | | | | The debug traces for reference counting in ZFS use the pointer of the owning object as a "tag" for references to check that when an object drops a reference it had actually held one. In a couple of places ZFS drops references after freeing the owning object. In userland GCC realizes this is a use after free. However, since only the value of the pointer is used, and it isn't indirected, the use is harmless. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D36818
* zfs: merge openzfs/zfs@c629f0bf6Martin Matuska2022-09-212-2/+0
| | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #13725 Fix BLAKE3 tuneable and module loading on Linux and FreeBSD #13756 FreeBSD: Organize sysctls #13773 FreeBSD: add kqfilter support for zvol cdev #13781 Importing from cachefile can trip assertion #13794 Apply arc_shrink_shift to ARC above arc_c_min #13798 Improve too large physical ashift handling #13799 Revert "Avoid panic with recordsize > 128k, raw sending and no large_blocks" #13802 Add zfs.sync.snapshot_rename #13831 zfs_enter rework #13855 zfs recv hangs if max recordsize is less than received recordsize Obtained from: OpenZFS OpenZFS commit: c629f0bf62e351355716f9870d6c2e377584b016
* In man page cross refs to sudo, indicate it comes from ports/security/sudo.Jens Schweikhardt2022-08-141-1/+1
|
* ctfconvert: Actually use the asprintf() helperMark Johnston2022-08-031-1/+1
| | | | Fixes: 1165fc9a5266 ("ctfconvert: Give bitfield types names distinct from the base type")
* ctfconvert: Give bitfield types names distinct from the base typeMark Johnston2022-08-033-3/+19
| | | | | | | | | | | | | | | | | | CTF integers have an explicit width and so can be used to represent bitfields. Bitfield types emitted by ctfconvert(1) share the name of the base integer type, so a struct field with type "unsigned int : 15" will have a type named "unsigned int". To avoid ambiguity when looking up types by name, add a suffix to names of bitfield types to distinguish them from the base type. Then, if ctfmerge happens to order bitfield types before the corresponding base type in a CTF file, a name lookup will return the base type, which is always going to be the desired behaviour. PR: 265403 Reported by: cy MFC after: 1 week Sponsored by: The FreeBSD Foundation
* dtrace tests: Rename some test type names to avoid a conflictMark Johnston2022-08-031-6/+6
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* dtrace tests: Override RLIMIT_CORE for a test which triggers a core dumpMark Johnston2022-08-031-1/+1
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* libnvpair: install libnvpair.hKristof Provost2022-07-211-0/+2
| | | | | | This is included by libbe/be.h. Sponsored by: Rubicon Communications, LLC ("Netgate")
* zfs: merge openzfs/zfs@cb01da680Martin Matuska2022-07-071-0/+1
| | | | | | | | | | | | | | | | | Notable upstream pull request merges: #12438 Avoid panic with recordsize > 128k, raw sending and no large_blocks #13015 Fix dnode byteswapping #13256 Add a "zstream decompress" subcommand #13555 Scrub mirror children without BPs #13576 Several sorted scrub optimizations #13579 Fix and disable blocks statistics during scrub #13582 Several B-tree optimizations #13591 Avoid two 64-bit divisions per scanned block #13606 Avoid memory copies during mirror scrub #13613 Avoid memory copy when verifying raidz/draid parity Obtained from: OpenZFS OpenZFS commit: cb01da68057dcb9e612e8d2e97d058c46c3574af
* cddl/*: add a WITH(OUT)_DTRACE optionBrooks Davis2022-07-066-66/+41
| | | | | | | | | | | | | | | | | | Add an option to enable/disable DTrace without disabling ZFS. New architectures such as CHERI may support ZFS before they support DTrace and the old model of WITHOUT_CDDL disabling both wasn't helpful. For compatiblity, the CDDL option remains and WITHOUT_CDDL implies WITHOUT_DTRACE. WITHOUT_DTRACE also implies WITHOUT_CTF. As part of this change, largely convert cddl/*/Makefile to using the more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate variables. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35718
* lockstat: Fix construction of comparision predicatesKornel Dulęba2022-07-041-2/+2
| | | | | | | | | | | | | | Passing "0x%p" to sprintf results in double "0x" being printed. This causes a dtrace script compilation failure when "-d" flag is specified. Fix that by removing the extraneous "0x". Reviewed by: markj Approved by: mw(mentor) Obtained from: Semihalf Sponsored by: Alstom MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35690
* dtrace: Remove local mips supportBrooks Davis2022-07-013-84/+0
| | | | | | | | Remove the stub pid probe and all the build glue. Reviewed by: imp, jhb Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35541
* libicp_rescue: Fix build for powerpc64leJessica Clarke2022-07-011-1/+1
| | | | | | | This is a repeat of 13cee53cef35 ("libicp: Fix build for powerpc64le") but for the rescue version of the library. Fixes: 1f1e2261e341 ("zfs: merge openzfs/zfs@deb121309")
* libicp: Fix build for powerpc64leJessica Clarke2022-07-011-1/+1
| | | | | | | | The C sources use the assembly routines for little-endian powerpc64, and the assembly files have ppc64le in their names, but the guard here was for big-endian powerpc64. Fixes: 1f1e2261e341 ("zfs: merge openzfs/zfs@deb121309")
* zfs: merge openzfs/zfs@deb121309Martin Matuska2022-06-233-2/+58
| | | | | | | | | | | | Notable upstream pull request merges: #12918 Introduce BLAKE3 checksums as an OpenZFS feature #13553 Reduce ZIO io_lock contention on sorted scrub #13537 Improve sorted scan memory accounting #13540 AVL: Remove obsolete branching optimizations #13563 FreeBSD: Improve crypto_dispatch() handling Obtained from: OpenZFS OpenZFS commit: deb1213098e2dc10e6eee5e5c57bb40584e096a6
* zfs: merge openzfs/zfs@b9d98453fMartin Matuska2022-06-031-1/+1
| | | | | | | | | | | | | | | | | Notable upstream pull request merges: #12321 Fix inflated quiesce time caused by lwb_tx during zil_commit() #13244 zstd early abort #13360 Verify BPs as part of spa_load_verify_cb() #13452 More speculative prefetcher improvements #13466 Expose zpool guids through kstats #13476 Refactor Log Size Limit #13484 FreeBSD: libspl: Add locking around statfs globals #13498 Cancel in-progress rebuilds when we finish removal #13499 zed: Take no action on scrub/resilver checksum errors #13513 Remove wrong assertion in log spacemap Obtained from: OpenZFS OpenZFS commit: b9d98453f9387c413f91d1d9cdb0cba8e04dbd95
* zfs: merge openzfs/zfs@c0cf6ed67Martin Matuska2022-05-182-3/+2
| | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #10662 zvol_wait: Ignore locked zvols #12789 Improve log spacemap load time #12812 Improved zpool status output, list all affected datasets #13277 FreeBSD: Use NDFREE_PNBUF if available #13302 Make zfs_max_recordsize default to 16M #13311 Fix error handling in FreeBSD's get/putpages VOPs #13345 FreeBSD: Fix translation from ABD to physical pages #13373 zfs: holds: dequadratify #13375 Corrected edge case in uncompressed ARC->L2ARC handling #13388 Improve mg_aliquot math #13405 Reduce dbuf_find() lock contention #13406 FreeBSD: use zero_region instead of allocating a dedicated page Obtained from: OpenZFS OpenZFS commit: c0cf6ed6792e545fd614c2a88cb53756db7e03f8
* ctf: Link CTF toolchain man pages to ctf.5Mark Johnston2022-04-213-12/+16
| | | | | | | | Also expand the CTF acronym to provide a bit of context. PR: 259790 MFC after: 1 week Sponsored by: The FreeBSD Foundation
* ctfdump: Remove definitions of warn() and vwarn()Mark Johnston2022-04-213-31/+2
| | | | | | | | | | | The presence of the latter causes a link error when building a statically linked ctfdump(1) because libc defines the same symbol. libc's warn() is defined as a weak symbol and so does not cause the same problem, but let's just use libc's version. Reported by: stephane rochoy <stephane.rochoy@stormshield.eu> MFC after: 1 week Sponsored by: The FreeBSD Foundation
* libctf: Fix recursive descent into anonymous SOU fieldsMark Johnston2022-04-121-2/+2
| | | | | | | | PR: 262412 Tested by: dhw, gallatin Fixes: a6fb86917362 ("libctf: Handle CTFv3 containers") MFC after: 3 days Sponsored by: The FreeBSD Foundation
* DTrace test: skip flakey common.misc.t_dtrace_contrib.tst_dynopt_d in CILi-Wen Hsu2022-03-241-0/+3
| | | | | PR: 237641 Sponsored by: The FreeBSD Foundation
* DTrace test: Add a new keyword SKIPCI to gentest.shLi-Wen Hsu2022-03-242-4/+8
| | | | | | | | | This is for marking a test case is flakey and should not be executed in the CI environment. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34635
* dtrace tests: Fix expected outout for tst.system.dLi-Wen Hsu2022-03-091-6/+6
| | | | | | | This is follow up of d500a85e640d1cd270747c12e17c511b53864436 PR: 262415 Sponsored by: The FreeBSD Foundation
* zfs: merge openzfs/zfs@a86e08941 (master) into mainMartin Matuska2022-03-084-14/+70
| | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #9078: log xattr=sa create/remove/update to ZIL #11919: Cross-platform xattr user namespace compatibility #13014: Report dnodes with faulty bonuslen #13016: FreeBSD: Fix zvol_cdev_open locking #13019: spl: Don't check FreeBSD rwlocks for double initialization #13027: Fix clearing set-uid and set-gid bits on a file when replying a write #13031: Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v' #13074: Enable encrypted raw sending to pools with greater ashift #13076: Receive checks should allow unencrypted child datasets #13098: Avoid dirtying the final TXGs when exporting a pool #13172: Fix ENOSPC when unlinking multiple files from full pool Obtained from: OpenZFS OpenZFS commit: a86e089415679cf1b98eb424a159bb36aa2c19e3