aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* accf_tls: accept filter that waits for TLS handshake headerGleb Smirnoff2024-04-259-1/+273
|
* syscalls.master: correct return type of {read,write}vBrooks Davis2024-04-244-10/+10
| | | | | | | | | This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930
* vfs_lookup.c: only call ktrcapfail() if KTRACE is enabledKonstantin Belousov2024-04-241-1/+7
| | | | | | | Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
* sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.cKonstantin Belousov2024-04-242-5/+5
| | | | | | | Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
* meta.autodep.mk do not override start_utcSimon J. Gerraty2024-04-241-1/+3
| | | | | Update meta.autodep.mk If included at level 0 it is important not to override start_utc
* elf_common.h: Add STO_AARCH64_VARIANT_PCSAndrew Turner2024-04-241-0/+3
| | | | | | | | | This is used to mark symbols that use a variant procedure call with a different calling convention to the main ABI. Reviewed by: kib, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44868
* showconfig: Set MACHINE for src.opts.mkAndrew Turner2024-04-241-1/+2
| | | | | | | | | | Also set MACHINE and MACHINE_ARCH when reading config options from src.opts.mk. This ensures any machine-dependent options are reported correctly. Reviewed by: emaste, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44838
* arm64: Check DMAP address is valid in PHYS_IN_DMAPAndrew Turner2024-04-244-14/+22
| | | | | | | | | | | | | | | | | When checking if a physical address is in the DMAP region we assume all physical addresses between DMAP_MIN_PHYSADDR and DMAP_MAX_PHYSADDR are able to be accesses through the DMAP. It may be the case that there is device memory in this range that shouldn't be accessed through the DMAP mappings. Add a check to PHYS_IN_DMAP that the translated virtual address is a valid kernel address. To support code that already checks the address is valid add PHYS_IN_DMAP_RANGE. PR: 278233 Reviewed by: alc, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44677
* arm64/vmm: Ensure the tlbi has completedAndrew Turner2024-04-241-0/+3
| | | | | | | | | | | Ensure the TLB is invalidated before enabling the EL2 MMU. Without this the TLB may be in an inconsistant state leading to a possible exception when enabling the MMU. PR: 277559 Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44799
* bhyve.8: Document arm64 supportMark Johnston2024-04-241-6/+34
| | | | | | | | | - Mention the options that are amd64-only. - Provide a minimal example for booting an arm64 guest. Reviewed by: corvink Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44738
* vmrun.sh: Stop passing -A to bhyveMark Johnston2024-04-241-1/+1
| | | | | | It's a no-op now. Sponsored by: Innovate UK
* bhyve.8: Remove mention of the -A flagMark Johnston2024-04-242-10/+6
| | | | | | | | | | It is a no-op on amd64 now and is not implemented on arm64, so let's remove mention of it altogether so as to reduce confusion for arm64 users. Reviewed by: corvink, jhb Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44737
* geli.8: add some notes regarding performance tuningAlan Somers2024-04-241-1/+41
| | | | | | | MFC after: 1 week Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44908
* busdma: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* khelp: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* udf: uma_zcreate() does not failMark Johnston2024-04-241-11/+0
| | | | | | | | | | While here remove an old comment regarding preallocation; it appears to refer to an optimization that is almost certainly irrelevant at this point. No functional change intended. MFC after: 1 week
* wg: uma_zcreate() does not failMark Johnston2024-04-242-6/+5
| | | | | | No functional change intended. MFC after: 1 week
* dpaa: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* ng_pipe: Do not panic when memory allocations failMartin Vahlensieck2024-04-241-15/+30
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Replace deprecated random() with prng32_bounded()Martin Vahlensieck2024-04-241-2/+3
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> MFC after: 2 weeks Reviewed by: markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Remove node when all hooks are disconnectedMartin Vahlensieck2024-04-241-0/+7
| | | | | | | | | | | This is the behavior described in the man page. Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Discussed with: glebius Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Fix whitespaceMartin Vahlensieck2024-04-241-8/+8
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* heimdal: Fix compiling hdb ldap as a moduleCy Schubert2024-04-241-3/+6
| | | | | | | Fix build when WITH_OPENLDAP defined. PR: 278430 Obtained from: Upstream c1c7da7f79
* kdc: Add restart optionCy Schubert2024-04-242-2/+29
| | | | | | | | | | | | | | | | Add a new kdc_restart rc variable that manages kdc (or krb5kdc) under daemon(8). This automatically restarts the kdc should it fail, i.e. when it's configured to use LDAP as a backend and cannot connect to its LDAP directory. Set kdc_restart="YES" to auto restart kdc on abnormal termination. Set kdc_restart_delay="N" to the number of seconds to delay before restarting the kdc. The daemon(8) default seconds applies when not set. Reported by: Lexi Winter <lexi.freebsd@le-fay.org> PR: 278395 Differential Revision: https://reviews.freebsd.org/D44898
* MFV: less: Do not trust st_size if it equals zeroRicardo Branco2024-04-241-11/+2
|\ | | | | | | | | | | | | | | | | | | | | This is a smaller version of upstream 1fafd968b48e5cea6c85f126d77071a8de707a55 to address the issue that less not being able to operate on files residing in pseudo-filesystems that advertize a zero size value. PR: bin/276133 MFC after: 3 days
| * less: Do not trust st_size if it equals zerovendor/lessRicardo Branco2024-04-241-11/+2
| |
* | Revert "swapon: Do not overwrite Linux swap header"Warner Losh2024-04-244-126/+1
| | | | | | | | | | | | This reverts commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e.This is broken on armv7, and closer scrutiny of the reviews shows I was in error when I thought it was ready.
* | Revert "bsdinstall/distfetch.c: check environment variables before ↵Warner Losh2024-04-241-23/+10
| | | | | | | | | | | | | | downloading and handle memory allocation errors" This reverts commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7. It wasn't as ready as I thought
* | ktrace: Remove CAPFAIL from default trace pointsJake Freeland2024-04-242-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CAPFAIL tracepoint was recently extended to report ECAPMODE capability violations for processes that do not enter capability mode. This allows developers that are interested in Capsicumizing their programs to determine where violations are being raised. Previously, CAPFAIL only produced output for processes using Capsicum(4) capabilties. Thus, most ktrace users never received log output from the trace point. With the recent changes, this is no longer the case. Having this trace point enabled by default will produce output for all processes that use syscalls that are not permitted in capability mode. This may lead to confusion for users that are not familiar with the feature. Remove KTRFAC_CAPFAIL from ktrace's default points to avoid this. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44887
* | ktrace: Describe CAPFAIL trace point in man pageJake Freeland2024-04-241-2/+18
| | | | | | | | | | | | | | | | | | | | Update the ktrace(1) man page to describe the recently improved capability failure tracing. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44886
* | sockets: inherit SO_ACCEPTFILTER from listener to childGleb Smirnoff2024-04-241-2/+6
| | | | | | | | | | | | This is crucial for operation of accept_filter(9). See added comment. Fixes: d29b95ecc0d049406d27a6c11939d40a46658733
* | bsdinstall/distfetch.c: check environment variables before downloading and ↵rilysh2024-04-231-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handle memory allocation errors 1. Currently, distfetch checks environment variables existence when it will use them or in a case (in chdir()) it doesn't check at all. As they are necessary to set before doing anything with it, check them, if they set or not, before proceeding any further. This also avoids extra cleaning when that environment variable isn't set. 2. Handle memory allocation error in malloc(PATH_MAX) and replace (sizeof const char *) with (sizeof char *). Both are similar and const doesn't have a size. 3. Indent the error message a bit in chdir(). Signed-off-by: rilysh <nightquick@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1071
* | zfs: merge openzfs/zfs@1f940de07Martin Matuska2024-04-2340-304/+1141
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable upstream pull request merges: #16038 1f940de07 L2ARC: Cleanup buffer re-compression #16093 c183d164a Parallel pool import #16094 cd3e6b4f4 Add zfetch stats in arcstats #16103 35bf25848 Fix: FreeBSD Arm64 does not build currently #16104 4036b8d02 Refactor dbuf_read() for safer decryption #16110 9f83eec03 Handle FLUSH errors as "expected" #16117 c346068e5 zfs get: add '-t fs' and '-t vol' options Obtained from: OpenZFS OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9
| * | L2ARC: Cleanup buffer re-compressionAlexander Motin2024-04-231-39/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compressed ARC is disabled, we may have to re-compress when writing into L2ARC. If doing so we can't fit it into the original physical size, we should just fail immediately, since even if it may still fit into allocation size, its checksum will never match. While there, refactor the code similar to other compression places without using abd_return_buf_copy(). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16038
| * | zfs-kmod: fix empty rpm requires/conflictsTodd2024-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an error in zfs-kmod.spec that causes kmod-zfs packages not to include the correct RPM requires/conflicts relationships. With this change applied, RPM correctly no longer allows kmod-zfs & zfs-dkms packages to be installed together. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Todd Seidelmann <18294602+seidelma@users.noreply.github.com> Closes #16121
| * | Refactor dbuf_read() for safer decryptionAlexander Motin2024-04-221-110/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In dbuf_read_verify_dnode_crypt(): - We don't need original dbuf locked there. Instead take a lock on a dnode dbuf, that is actually manipulated. - Block decryption for a dnode dbuf if it is currently being written. ARC hash lock does not protect anonymous buffers, so arc_untransform() is unsafe when used on buffers being written, that may happen in case of encrypted dnode buffers, since they are not copied by dbuf_dirty()/dbuf_hold_copy(). In dbuf_read(): - If the buffer is in flight, recheck its compression/encryption status after it is cached, since it may need arc_untransform(). Tested-by: Rich Ercolani <rincebrain@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16104
| * | zfs get: add '-t fs' and '-t vol' optionsRyan2024-04-222-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | Make `zfs get` accept `fs` for `filesystem` and `vol` for `volume`. Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan <errornointernet@envs.net> Closes #16117
| * | ztest: use ASSERT3P to compare pointersBrooks Davis2024-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a sufficiently modern gcc (I saw this with gcc13), gcc complains when casting pointers to an integer of a different type (even a larger one). On 32-bt ASSERT3U does this on 32-bit systems by casting a 32-bit pointer to uint64_t so use ASSERT3P which uses uintptr_t. Fixes: 5caeef02fa53 RAID-Z expansion feature Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brooks Davis <brooks.davis@sri.com> Closes #16115
| * | ZTS: user_namespace_004.ksh avoid error in cleanup if unsupportedSeth Troisi2024-04-221-2/+2
| | | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Seth Troisi <sethtroisi@google.com> Closes #16114
| * | Add newline to two zpool messagesSeth Troisi2024-04-221-2/+2
| | | | | | | | | | | | | | | Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Seth Troisi <sethtroisi@google.com> Closes #16113
| * | Parallel pool importGeorge Wilson2024-04-2219-72/+818
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit allow spa_load() to drop the spa_namespace_lock so that imports can happen concurrently. Prior to dropping the spa_namespace_lock, the import logic will set the spa_load_thread value to track the thread which is doing the import. Consumers of spa_lookup() retain the same behavior by blocking when either a thread is holding the spa_namespace_lock or the spa_load_thread value is set. This will ensure that critical concurrent operations cannot take place while a pool is being imported. The zpool command is also enhanced to provide multi-threaded support when invoking zpool import -a. Lastly, zinject provides a mechanism to insert artificial delays when importing a pool and new zfs tests are added to verify parallel import functionality. Contributions-by: Don Brady <don.brady@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Wilson <gwilson@delphix.com> Closes #16093
| * | abd_iter_page: rework to handle multipage scatterlistsRob N2024-04-191-46/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, abd_iter_page() would assume that every scatterlist would contain a single page (compound or no), because that's all we ever create in abd_alloc_chunks(). However, scatterlists can contain multiple pages of arbitrary provenance, and if we get one of those, we'd get all the math wrong. This reworks things to handle multiple pages in a scatterlist, by properly finding the right page within it for the given offset, and understanding better where the end of the page is and not crossing it. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reported-by: Brian Atkinson <batkinson@lanl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16108
| * | Handle FLUSH errors as "expected"Alexander Motin2024-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before #16061 zio_vdev_io_done() was not used for FLUSH requests. Addition of it triggers reprobe each TXG for vdevs not supporting them. Since those errors are often expected, they are normally handled by individual vdev drivers and should be ignored here. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16110
| * | tests/quota: consistently clear quota property between testsRob Norris2024-04-197-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When run in isolation, quota_005_pos would fail in cleanup because it would attempt restore the previous quota, which was 0, and so get an error (because you can't set quota to '0', you have to use 'none'). It worked as part of the quota tag set because the previous tests did not clean up their quota, so there was always a non-zero quota to return to. This adds a simple quota reset function, and has all quota tests run it at cleanup. For the ones that weren't cleaning up, they now do, and for quota_005_pos, which was trying to do the right thing, it now just resets it. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16097
| * | tests/quota_005_pos: use a long int for doubling the quota sizeRob Norris2024-04-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When run in isolation, quota_005_pos would see an empty ~300G dataset. Doubling it's space overflows a int32, which meant it was trying to then set the quota to a negative value, and would fail. When run as part of the quota tests, the filesystem appears to have stuff in it, and so a lower available space, which doesn't overflow, and so succeeds. The bare minimum fix seems to be to use a int64 for the available space, so it can be comfortably doubled. Here it is. (Also a typo fix and a tiny bit of cleanup). Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16097
| * | Add zfetch stats in arcstatsAmeer Hamza2024-04-191-5/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arc_summary also reports zfetch stats but it's inconvenient to monitor contiguously incrementing numbers. Adding them in arcstats allows us to observe streams more conveniently. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #16094
| * | Fix: FreeBSD Arm64 does not build currentlyTino Reichardt2024-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The define LD_VERSION isn't defined on FreeBSD Arm64 when OpenZFS is build with the default compiler: clang. I used only gcc for testing - my fault. Fast fix as suggested by @mmatuska Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Martin Matuska <mm@FreeBSD.org> Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de> Closes #16103
| * | Linux 6.8 compat: META (#16099)Tony Hutter2024-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Update the META file to reflect compatibility with the 6.8 kernel. Signed-off-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
| * | zts: add a debug option to get full test outputRob N2024-04-162-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test runner accumulates output from individual tests, then writes it to the log at the end. If a test hangs or crashes the system half way through, we get no insight into how it got to where it did. This adds a -D option for "debug". When set, all test output is written to stdout. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16096
* | | swapon: Do not overwrite Linux swap headerRicardo Branco2024-04-234-1/+126
| | | | | | | | | | | | | | | Reviewed by: imp, jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1084