Page MenuHomeFreeBSD
Feed Advanced Search

Oct 6 2023

asomers updated the diff for D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
  • Restore the original behavior in vfs_lookup
Oct 6 2023, 9:45 PM
asomers committed rG8399d764c929: Fix intermittency in the sys.fs.fusefs.symlink.main test (authored by asomers).
Fix intermittency in the sys.fs.fusefs.symlink.main test
Oct 6 2023, 9:09 PM
asomers accepted D42114: ping: Avoid reporting NaNs.

Approved, but please note in the commit message that this condition can only occur due to FPU rounding error.

Oct 6 2023, 8:38 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

Sorry, but I still don't like it. :)

fuse_vnop_readlink() should be sanitizing its inputs to the VFS rather than expecting the VFS to handle this situation in some arbitrary way. With this patch, we are now hiding what could be bugs in all VOP_READLINK implementations. If it were ZFS returning corrupted symlink targets, then I'd want the system to panic (at least on INVARIANTS systems). If this situation can legitimately arise in FUSE filesystems, then fuse_vnop_readlink() needs to decide how to handle it; in this case it seems like you want to simply return the string up to the first nul terminator.

Oct 6 2023, 8:35 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
In D42081#960674, @kib wrote:

BTW is there a check in fusefs that lookup never returns vp == dvp (of non-dot cnp, but this should never reach VOP)? IMO it is even more fundamental invariant.

Oct 6 2023, 8:14 PM
asomers committed rG86885b186898: Fix intermittency in the sys.fs.fusefs.mknod.main test (authored by asomers).
Fix intermittency in the sys.fs.fusefs.mknod.main test
Oct 6 2023, 7:58 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

@markj I've moved the check into namei_follow_link . Do you like this version better? I could also have it print some kind of warning to dmesg, subject to INVARIANTS, if you would prefer. Or I could remove it entirely and restore the panic, if you prefer. The problem with doing the check in namei_follow_link is that it causes an extra scan through the string, rather than piggy backing on the scan that already takes place in vfs_lookup.

Oct 6 2023, 7:20 PM
asomers added a comment to D42114: ping: Avoid reporting NaNs.

If we were computing with real numbers, then it should be impossible for vari to ever be negative. And in fact, all of the failing tests use -t 1, which means that n will be 1, so vari should always be exactly zero. So the fact that you're seeing these errors must mean that we're hitting some kind of floating point round-off error. Your patch will work, but it begs the question: why print min/avg/max/stddev when there is only one datapoint? I think that we should only print those things when n > 1. In fact, the standard deviation isn't really meaningful when n == 2, but it probably wouldn't hurt to print it, if that makes the code more readable.

Oct 6 2023, 7:15 PM
asomers updated the diff for D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
  • Move the nul check into namei_follow_link
Oct 6 2023, 4:22 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

You could add something to namei_follow_link(), where VOP_READLINK is actually called during name resolution. But I also want to ask, why is not sufficient to modify fuse alone? How would other filesystems allow this situation to occur, barring corruption of on-disk data?

Exactly, corruption of on-disk data. From inspection, I think that ext2fs is vulnerable. I haven't checked others. But I think we should be resilient against corrupt disks.

But your approach to resiliency should depend on the filesystem. FUSE explicitly needs to guard against this particular possibility, so it should check for nul bytes in symlink targets. OpenZFS probably does not, assuming that it always writes valid symlinks to disk and can catch corruption using checksums. UFS and ext2 provide no mechanism to detect data corruption, so we cannot be resilient to corruption in any general sense. Certainly they could explicitly check for this case and panic, but then we should presumably also make sure that directory entries don't contain nul bytes (ext2_readdir() and ufs_readdir() don't appear to verify this), and the rabbit hole doesn't end there.

Oct 6 2023, 3:55 PM
asomers accepted D42110: tests: Use ifconfig -j instead of jexec ifconfig..
Oct 6 2023, 3:36 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

You could add something to namei_follow_link(), where VOP_READLINK is actually called during name resolution. But I also want to ask, why is not sufficient to modify fuse alone? How would other filesystems allow this situation to occur, barring corruption of on-disk data?

Oct 6 2023, 3:18 PM

Oct 5 2023

asomers committed rG73765a5fa7d0: Advertise the MPI Message Version that's contained in the IOCFacts message (authored by scottl).
Advertise the MPI Message Version that's contained in the IOCFacts message
Oct 5 2023, 8:38 PM
asomers committed rG51426ad9c75b: mprutil: "fix user reply buffer (64)..." warnings (authored by asomers).
mprutil: "fix user reply buffer (64)..." warnings
Oct 5 2023, 5:38 PM
asomers committed rG2d05cbe00272: fusefs: fix some bugs updating atime during close (authored by asomers).
fusefs: fix some bugs updating atime during close
Oct 5 2023, 5:35 PM
asomers committed rG6a773a0582ba: fusefs: add more readdir tests for misbehaving servers (authored by asomers).
fusefs: add more readdir tests for misbehaving servers
Oct 5 2023, 4:15 PM
asomers added a comment to D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

Why do other filesystems need to be modified if we check the invariant in a vop_readlink_post()?

Oct 5 2023, 4:00 PM
asomers updated subscribers of D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
In D42081#959985, @mjg wrote:

i don't think the patch is legitimate in that length indicated by VOP_READLINK does not line up with the real length -- it is that discrepancy which needs to be avoided instead. i would make it an invariant that VOP_READLINK returns correct size or an error like in the case above. then a debug_pre func for VOP_READLINK could validate it. i also note the proposed patch pessimizes all lookups (not only those which encounter a symlink) by adding a func call and no longer avoiding an extra branch per character (currently achieved by slapping / at the end)

Oct 5 2023, 2:03 PM

Oct 4 2023

asomers edited reviewers for D42081: Don't panic in vfs_lookup due to paths with embedded NULs, added: dchagin; removed: mjg.
Oct 4 2023, 7:04 PM
asomers updated subscribers of D42081: Don't panic in vfs_lookup due to paths with embedded NULs.

Sorry, @mjg . Good luck with your next project.

Oct 4 2023, 7:03 PM
asomers updated the diff for D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
  • Restrict the new fusefs warning to INVARIANTS
Oct 4 2023, 7:01 PM
asomers requested review of D42081: Don't panic in vfs_lookup due to paths with embedded NULs.
Oct 4 2023, 6:54 PM

Oct 3 2023

asomers committed rG63c0b60063c7: fusefs: fix some bugs updating atime during close (authored by asomers).
fusefs: fix some bugs updating atime during close
Oct 3 2023, 9:47 PM
asomers committed rGc70a4185c637: mprutil: "fix user reply buffer (64)..." warnings (authored by asomers).
mprutil: "fix user reply buffer (64)..." warnings
Oct 3 2023, 1:32 AM
asomers committed rG13f188ce0b51: fusefs: fix some bugs updating atime during close (authored by asomers).
fusefs: fix some bugs updating atime during close
Oct 3 2023, 1:12 AM

Sep 27 2023

asomers committed rG1e3214571b78: printenv: fix typo in a comment (authored by asomers).
printenv: fix typo in a comment
Sep 27 2023, 3:04 PM

Sep 25 2023

asomers added a comment to D41970: lib/libc/tests/string: add extended unit tests for strcmp().

Let me see if I understand this dlopen business correctly. Your plan is that if you create a separate .c file containing "test_strcmp" and link it to t_strcmp.o, then the test will operate on that function. Otherwise, it will operate on the standard strcmp?

Sep 25 2023, 8:52 PM
asomers committed rGc989957f28ef: printenv: Add test for printenv. (authored by bses30074_gmail.com).
printenv: Add test for printenv.
Sep 25 2023, 4:12 PM
asomers closed D41468: printenv: Add test for printenv..
Sep 25 2023, 4:11 PM
asomers accepted D41468: printenv: Add test for printenv..
Sep 25 2023, 4:04 PM

Sep 24 2023

asomers added a comment to D41468: printenv: Add test for printenv..

In its current state, the "base" test doesn't pass. It seems like the expected_value variable isn't getting correctly expanded. Its value is just the name of the variable. Could you please fix that?

Sep 24 2023, 1:44 PM

Sep 23 2023

asomers requested changes to D41468: printenv: Add test for printenv..
Sep 23 2023, 2:39 PM
asomers accepted D41468: printenv: Add test for printenv..
Sep 23 2023, 2:36 PM

Sep 22 2023

asomers committed R11:3471492291d3: sysutils/gstat: update to 0.1.4 (authored by asomers).
sysutils/gstat: update to 0.1.4
Sep 22 2023, 7:04 PM
asomers committed rG2209676efe9a: Fix padding in struct tcp_info (authored by asomers).
Fix padding in struct tcp_info
Sep 22 2023, 5:25 PM
asomers added a comment to D41894: Fix padding in struct tcp_info.

Ok, I've commited to stable/14 now.

Sep 22 2023, 5:25 PM
asomers closed D41894: Fix padding in struct tcp_info.
Sep 22 2023, 5:25 PM
asomers added a comment to D41894: Fix padding in struct tcp_info.
In D41894#955899, @cc wrote:

I am learning Rust if you meant the Rust programming language. Would you please elaborate why is Rust involved here?

Sep 22 2023, 2:25 PM

Sep 21 2023

asomers committed rGb2dff90c0be7: Fix zfsd with the device_removal pool feature. (authored by asomers).
Fix zfsd with the device_removal pool feature.
Sep 21 2023, 10:27 PM
asomers committed rGa015b9e690d8: Fix zfsd with the device_removal pool feature. (authored by asomers).
Fix zfsd with the device_removal pool feature.
Sep 21 2023, 10:24 PM
asomers committed rG3676929d3cae: Fix zfsd with the device_removal pool feature. (authored by asomers).
Fix zfsd with the device_removal pool feature.
Sep 21 2023, 10:22 PM
asomers committed rGa39aac5bb8e4: Fix zfsd with the device_removal pool feature. (authored by asomers).
Fix zfsd with the device_removal pool feature.
Sep 21 2023, 8:53 PM
asomers committed R11:68b0bfc82661: net-mgmt/nfs-exporter: version 0.4.3 (authored by asomers).
net-mgmt/nfs-exporter: version 0.4.3
Sep 21 2023, 8:01 PM
asomers committed rGe5236d25f2c0: fusefs: fix unused variables from fb619c94c67 (authored by asomers).
fusefs: fix unused variables from fb619c94c67
Sep 21 2023, 3:41 PM
asomers requested changes to D41468: printenv: Add test for printenv..
Sep 21 2023, 3:33 PM
asomers added a comment to D41894: Fix padding in struct tcp_info.

If the caller provides insufficient space for the entire structure, will the kernel fail the ioctl or copy as much as it can? It looks to me like it will do the latter. That also provides backwards compatibility, as long as we don't move or delete fields. @tuexen do you accept @glebius's suggestion to directly commit to stable/14? I would like to do that because it improves the Rust story. The Rust community still has not accepted that some APIs change between versions, like 64-bit inodes. Pushing the tcp_info compatibility break to FreeBSD 15 instead of 14 will give Rust some more time to come to terms.

Sep 21 2023, 3:06 PM
asomers committed rG7d154c4dc64e: mprutil: "fix user reply buffer (64)..." warnings (authored by asomers).
mprutil: "fix user reply buffer (64)..." warnings
Sep 21 2023, 2:46 PM
asomers closed D38739: mprutil: "fix user reply buffer (64)..." warnings.
Sep 21 2023, 2:45 PM
asomers added a comment to D38739: mprutil: "fix user reply buffer (64)..." warnings.

Looks like this review got away from me. Oops. I'll rebase, test, and hopefully commit today.

Sep 21 2023, 2:23 PM
asomers committed rGfb619c94c679: fusefs: fix some bugs updating atime during close (authored by asomers).
fusefs: fix some bugs updating atime during close
Sep 21 2023, 2:04 PM
asomers closed D41925: fusefs: fix some bugs updating atime during close.
Sep 21 2023, 2:04 PM

Sep 20 2023

asomers requested review of D41925: fusefs: fix some bugs updating atime during close.
Sep 20 2023, 9:46 PM

Sep 17 2023

asomers added a comment to D41894: Fix padding in struct tcp_info.

Note that I have no way to test this change.

Sep 17 2023, 2:24 PM
asomers requested review of D41894: Fix padding in struct tcp_info.
Sep 17 2023, 2:23 PM

Sep 12 2023

asomers added a comment to D41805: Fix zfs_copy_file_range() for handling of RLIMIT_FSIZE.

This isn't necessary. My test program passes on ZFS even without this change. Here's the program:

#include <sys/types.h>
Sep 12 2023, 7:04 PM
asomers committed rG0b294a386d34: Fix zfsd with the device_removal pool feature. (authored by asomers).
Fix zfsd with the device_removal pool feature.
Sep 12 2023, 2:48 PM
asomers closed D41818: Fix zfsd with the device_removal pool feature..
Sep 12 2023, 2:48 PM
asomers requested review of D41818: Fix zfsd with the device_removal pool feature..
Sep 12 2023, 1:26 AM

Sep 8 2023

asomers committed R11:172aee05e04b: shells/fish: fix ZFS tab completion (authored by asomers).
shells/fish: fix ZFS tab completion
Sep 8 2023, 3:09 PM

Sep 6 2023

asomers committed rGf85da5f88efc: Multiple fixes to the zfsd test suite (authored by asomers).
Multiple fixes to the zfsd test suite
Sep 6 2023, 9:49 PM
asomers committed rGb969a40cdf17: zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs (authored by asomers).
zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs
Sep 6 2023, 9:49 PM
asomers committed rG3961edfe13d8: ixl.4: update link to intel-nvmupdate ports (authored by asomers).
ixl.4: update link to intel-nvmupdate ports
Sep 6 2023, 8:48 PM
asomers committed rG14ca2bc402bb: During F_SETFL, don't change file flags on error (authored by asomers).
During F_SETFL, don't change file flags on error
Sep 6 2023, 8:46 PM
asomers committed rGb2c207ddfc45: Fix the zfsd_autoreplace_001_neg test (authored by asomers).
Fix the zfsd_autoreplace_001_neg test
Sep 6 2023, 8:45 PM
asomers committed rG422efa7050a7: Implement GEOM::rotation_rate for gmirror (authored by asomers).
Implement GEOM::rotation_rate for gmirror
Sep 6 2023, 8:45 PM
asomers committed rGa6506dda739c: sesutil: fix "fault all" with zoned jbods (authored by asomers).
sesutil: fix "fault all" with zoned jbods
Sep 6 2023, 8:41 PM

Aug 23 2023

asomers accepted D41562: bectl: make mount subcommand less verbose.

Works for me.

Aug 23 2023, 1:56 PM

Aug 10 2023

asomers committed rGec54a3142354: ixl.4: update link to intel-nvmupdate ports (authored by asomers).
ixl.4: update link to intel-nvmupdate ports
Aug 10 2023, 3:00 PM
asomers closed D41288: ixl.4: update link to intel-nvmupdate ports.
Aug 10 2023, 2:59 PM

Aug 9 2023

asomers accepted D41399: GoogleTest 1.14.0: import.
Aug 9 2023, 8:18 PM
asomers accepted D41398: fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0.
Aug 9 2023, 8:16 PM

Aug 2 2023

asomers requested review of D41288: ixl.4: update link to intel-nvmupdate ports.
Aug 2 2023, 12:04 AM

Jul 14 2023

asomers committed rG2a0c0aea4209: Fix zfsd unittests after 92642bba4db (authored by asomers).
Fix zfsd unittests after 92642bba4db
Jul 14 2023, 9:59 PM

Jul 10 2023

asomers committed rGdba2e89ea7a1: Multiple fixes to the zfsd test suite (authored by asomers).
Multiple fixes to the zfsd test suite
Jul 10 2023, 10:41 PM
asomers committed rG92642bba4db4: zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs (authored by asomers).
zfsd: listen for sysevent.fs.zfs instead of misc.fs.zfs
Jul 10 2023, 10:41 PM
asomers closed D39437: Multiple fixes to zfsd and its tests.
Jul 10 2023, 10:41 PM
asomers committed rG6c049996ec29: During F_SETFL, don't change file flags on error (authored by asomers).
During F_SETFL, don't change file flags on error
Jul 10 2023, 2:14 PM
asomers closed D40955: During F_SETFL, don't change file flags on error.
Jul 10 2023, 2:14 PM
asomers added inline comments to D40955: During F_SETFL, don't change file flags on error.
Jul 10 2023, 2:12 PM
asomers added a comment to D40955: During F_SETFL, don't change file flags on error.
In D40955#932173, @kib wrote:

May be, set the flags after fo_ioctls ops? Then you do not need to revert.

Jul 10 2023, 2:09 AM

Jul 9 2023

asomers requested review of D40955: During F_SETFL, don't change file flags on error.
Jul 9 2023, 9:13 PM

Jul 6 2023

asomers added inline comments to D40898: copy_file_range() support for install(1).
Jul 6 2023, 10:26 PM
asomers added a comment to D40898: copy_file_range() support for install(1).

Your latest diff is also missing context. Could you please regenerate it with diff -U 9999?

Jul 6 2023, 8:11 PM
asomers added inline comments to D40882: copy_file_range() support for cat(1).
Jul 6 2023, 8:07 PM
asomers added a comment to D40898: copy_file_range() support for install(1).

Unfortunately the need to compute a digest invalidates half of the benefit of copy_file_range. I think it would be ok to skip copy_file_range if the user requests a digest. Also, if you're going to use copy_file_range even in that case, I think you should add some ATF tests that cover digests.

Jul 6 2023, 5:52 PM
asomers accepted D40882: copy_file_range() support for cat(1).

LGTM. I still don't know if it's a good idea to use ZFS block-cloning, but you could take advantage of this change with, say, the NFS client. BTW, have you considered adding copy_file_range support to install(1) ?

Jul 6 2023, 3:51 PM
asomers added a comment to D40882: copy_file_range() support for cat(1).

Could you please regenerate the diff with more context? Either use the arcanist-php82 CLI, or generate the diff with diff -U 9999.

Jul 6 2023, 1:09 PM

Jul 5 2023

asomers committed rGbe092bcde96b: Fix the zfsd_autoreplace_001_neg test (authored by asomers).
Fix the zfsd_autoreplace_001_neg test
Jul 5 2023, 10:39 PM

Jun 20 2023

asomers accepted D40661: tests/fusefs: Suppress false warning from GCC..
Jun 20 2023, 5:11 PM

Jun 5 2023

asomers committed R11:cecb8a2eccb1: sysutils/gstat-rs: update to 0.1.3 (authored by asomers).
sysutils/gstat-rs: update to 0.1.3
Jun 5 2023, 10:34 PM

May 18 2023

asomers accepted D40143: fusefs: Remove an unused pbuf zone.

Good catch. Looks like that code has been dead ever since SVN r349378.

May 18 2023, 8:20 PM

Apr 25 2023

asomers accepted D39797: prometheus_sysctl_exporter: Replace magic numbers with identifiers..
Apr 25 2023, 1:49 PM

Apr 19 2023

asomers committed rG5e2ba9cb6b0b: Cirrus update to new freebsd instance version (authored by QWERTIOX <qwertiox.kontakt@gmail.com>).
Cirrus update to new freebsd instance version
Apr 19 2023, 2:36 PM

Apr 12 2023

asomers added a comment to D38739: mprutil: "fix user reply buffer (64)..." warnings.

@scottl does this look good to you now?

Apr 12 2023, 5:01 PM

Apr 10 2023

asomers committed rG9309a460b23a: Implement GEOM::rotation_rate for gmirror (authored by asomers).
Implement GEOM::rotation_rate for gmirror
Apr 10 2023, 4:29 PM
asomers closed D39458: Implement GEOM::rotation_rate for gmirror.
Apr 10 2023, 4:28 PM

Apr 7 2023

asomers requested review of D39458: Implement GEOM::rotation_rate for gmirror.
Apr 7 2023, 4:12 PM

Apr 6 2023

asomers committed rGf698c1e99b99: zfsd: add support for hotplugging spares (authored by asomers).
zfsd: add support for hotplugging spares
Apr 6 2023, 6:00 PM

Apr 5 2023

asomers added a comment to D39437: Multiple fixes to zfsd and its tests.

With these changes, the zfsd tests all pass again except for zfsd_degrade_001_pos. It's still broken by https://github.com/openzfs/zfs/issues/14717 . I don't have a permanent fix for that bug ready yet.

Apr 5 2023, 5:31 PM
asomers requested review of D39437: Multiple fixes to zfsd and its tests.
Apr 5 2023, 5:29 PM