#
6b0cf2a2 |
| 24-Apr-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D4
vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
show more ...
|
#
66df8102 |
| 24-Apr-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.
sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
show more ...
|
#
0cd9cde7 |
| 06-Apr-2024 |
Jake Freeland <jfree@FreeBSD.org> |
ktrace: Record namei violations with KTR_CAPFAIL
Report namei path lookups while Capsicum violation tracing with CAPFAIL_NAMEI. vfs caching is also ignored when tracing to mimic capability mode beha
ktrace: Record namei violations with KTR_CAPFAIL
Report namei path lookups while Capsicum violation tracing with CAPFAIL_NAMEI. vfs caching is also ignored when tracing to mimic capability mode behavior.
Reviewed by: markj Approved by: markj (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D40680
show more ...
|
Revision tags: release/13.3.0 |
|
#
55edc40e |
| 04-Jan-2024 |
Mark Johnston <markj@FreeBSD.org> |
file: Remove the fd parameter to fgetvp_lookup() and fgetvp_lookup_smr()
The fd is always obtained from nameidata, so just fetch it from there instead. No functional change intended.
Reviewed by:
file: Remove the fd parameter to fgetvp_lookup() and fgetvp_lookup_smr()
The fd is always obtained from nameidata, so just fetch it from there instead. No functional change intended.
Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43257
show more ...
|
#
29363fb4 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
586fed0b |
| 04-Nov-2023 |
Jason A. Harmening <jah@FreeBSD.org> |
vfs_lookup_cross_mount(): restore previous do...while loop
When the cross-mount walking logic in vfs_lookup() was factored into a separate function, the main cross-mount traversal loop was changed f
vfs_lookup_cross_mount(): restore previous do...while loop
When the cross-mount walking logic in vfs_lookup() was factored into a separate function, the main cross-mount traversal loop was changed from a do...while loop conditional on the current vnode having VIRF_MOUNTPOINT set to an unconditional for(;;) loop. For the unionfs 'crosslock' case in which the vnode may be re-locked, this meant that continuing the loop upon finding inconsistent v_mountedhere state would no longer branch to a check that the vnode is in fact still a mountpoint. This would in turn lead to over- iteration and, for INVARIANTS builds, a failed assert on the next iteration.
Fix this by restoring the previous loop behavior.
Reported by: pho Tested by: pho Fixes: 80bd5ef0702562c546fa1717e8fe221058974eac MFC after: 1 week
show more ...
|
#
02cbc029 |
| 22-Sep-2023 |
Olivier Certner <olce.freebsd@certner.fr> |
vfs: fix reference counting/locking on LK_UPGRADE error
Factoring out this code unfortunately introduced reference and lock leaks in case of failure in the lock upgrade path under VV_CROSSLOCK. In t
vfs: fix reference counting/locking on LK_UPGRADE error
Factoring out this code unfortunately introduced reference and lock leaks in case of failure in the lock upgrade path under VV_CROSSLOCK. In terms of practical use, this impacts unionfs (and nullfs in a corner case).
Fixes: 80bd5ef07025 ("vfs: factor out mount point traversal to a dedicated routine") MFC after: 3 days MFC to: stable/14 releng/14.0 Sponsored by: The FreeBSD Foundation Reviewed by: mjg [mjg: massaged the commit message a little bit]
Differential Revision: https://reviews.freebsd.org/D41731
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
b8b33f3b |
| 09-Aug-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: retire NAMEI_DIAGNOSTIC
It is too spammy and information-deficient for practical use.
Also see https://reviews.freebsd.org/D41207
|
#
80bd5ef0 |
| 06-Jul-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: factor out mount point traversal to a dedicated routine
While here tidy up asserts in the area.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40883
|
#
ebf37c3f |
| 06-Jul-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: drop LK_RETRY when crossing mount points in vfs_lookup
vn_lock already returns the expected error.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40883
|
#
0724cf38 |
| 05-Jul-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: whack dpunlocked var in vfs_lookup
It is redundant given the bad_unlocked goto label.
|
#
5842f73d |
| 05-Jul-2023 |
Olivier Certner <olce.freebsd@certner.fr> |
vfs: compute_lk_cnflags(): Remove unused argument 'cnflags'; Rename
Argument unused since commit 93a0ba8f4990785f.
Rename it to enforce_lkflags(), which seems to more aptly describe what it does.
vfs: compute_lk_cnflags(): Remove unused argument 'cnflags'; Rename
Argument unused since commit 93a0ba8f4990785f.
Rename it to enforce_lkflags(), which seems to more aptly describe what it does.
[mjg: massaged the commit message a little] Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D40848
show more ...
|
#
7b5a1c39 |
| 28-Jun-2023 |
Igor Ostapenko <pm@igoro.pro> |
vfs: bring vfs_lookup() description comment up to date
Signed-off-by: Igor Ostapenko <pm@igoro.pro> Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/737
|
#
5958cd88 |
| 28-Jun-2023 |
Igor Ostapenko <pm@igoro.pro> |
vfs: fix description comment of vfs_lookup()
Signed-off-by: Igor Ostapenko <pm@igoro.pro> Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/737
|
#
cea7c564 |
| 13-Jun-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
namei: Reset the lookup to start from the real root for abs symlink target
Since fd745e1d Linux ABI specifies alternative root directory to reroot lookups. First, an attempt is made to lookup the fi
namei: Reset the lookup to start from the real root for abs symlink target
Since fd745e1d Linux ABI specifies alternative root directory to reroot lookups. First, an attempt is made to lookup the file in /ABI/original-path. If that fails, the lookup is done in /original-path. In case of lookup symbolic link with leading / in target namei() fails due to reroot reloads original file name. To avoid this handle restart in a special maner, without origin path name reloading.
Reported by: Goran Mekić, Vincent Milum Jr Tested by: Goran Mekić Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40479
show more ...
|
#
861abdad |
| 13-Jun-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
namei: Add a comment explaining ISRESTARTED flag
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40494
|
#
07c0b6e5 |
| 29-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
vfs: Retire kern_alternate_path() as unused anymore
From now a non-native ABI should use pwd_altroot() ability to tell to the namei() its root directory to dynamically reroots lookups.
Differential
vfs: Retire kern_alternate_path() as unused anymore
From now a non-native ABI should use pwd_altroot() ability to tell to the namei() its root directory to dynamically reroots lookups.
Differential Revision: https://reviews.freebsd.org/D40093 MFC after: 2 month
show more ...
|
#
3d2fec7d |
| 29-May-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
namei: Add the abilty for the ABI to specify an alternate root path
For now a non-native ABI (i.e., Linux) uses the kern_alternate_path() facility to dynamically reroot lookups. First, an attempt is
namei: Add the abilty for the ABI to specify an alternate root path
For now a non-native ABI (i.e., Linux) uses the kern_alternate_path() facility to dynamically reroot lookups. First, an attempt is made to lookup the file in /compat/linux/original-path. If that fails, the lookup is done in /original-path. Thats requires a bit of code in every ABI syscall implementation where path name translation is needed. Also our kern_alternate_path() does not properly lookups absolute symlinks in second attempt, i.e., does not append /compat/linux part to the resolved link. The change is intended to avoid this by specifiyng the ABI root directory for namei(), using one call to pwd_altroot() during exec-time into the ABI. In that case namei() will dynamically reroot lookups as mentioned above.
PR: 72920 Reviewed by: kib Differential revision: https://reviews.freebsd.org/D38933 MFC after: 2 month
show more ...
|
#
cf0fc64b |
| 03-May-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: reduce audit branching in namei_setup
|
#
a718431c |
| 24-Apr-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
lookup(): ensure that openat("/", "..", O_RESOLVE_BENEATH) fails
PR: 269780 Reported by: Dan Gohman <dev@sunfishcode.online> Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after
lookup(): ensure that openat("/", "..", O_RESOLVE_BENEATH) fails
PR: 269780 Reported by: Dan Gohman <dev@sunfishcode.online> Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39773
show more ...
|
Revision tags: release/13.2.0 |
|
#
0c01203e |
| 28-Mar-2023 |
Jason A. Harmening <jah@FreeBSD.org> |
vfs_lookup(): re-check v_mountedhere on lock upgrade
The VV_CROSSLOCK handling logic may need to upgrade the covered vnode lock depending upon the requirements of the filesystem into which vfs_looku
vfs_lookup(): re-check v_mountedhere on lock upgrade
The VV_CROSSLOCK handling logic may need to upgrade the covered vnode lock depending upon the requirements of the filesystem into which vfs_lookup() is walking. This may involve transiently dropping the lock, which can allow the target mount to be unmounted.
Tested by: pho Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D39272
show more ...
|
#
7b6fe242 |
| 08-Apr-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
DEBUG_VFS_LOCKS: use witness if available
The assert_vop_locked messages are ignored, and file/line information is not too useful. Fixing this without changing both witness and VFS asserts KPIs is n
DEBUG_VFS_LOCKS: use witness if available
The assert_vop_locked messages are ignored, and file/line information is not too useful. Fixing this without changing both witness and VFS asserts KPIs is not possible.
Reviewed by: markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39464
show more ...
|
#
829f0bcb |
| 19-Dec-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: add the concept of vnode state transitions
To quote from a comment above vput_final: <quote> * XXX Some filesystems pass in an exclusively locked vnode and strongly depend * on the lock being h
vfs: add the concept of vnode state transitions
To quote from a comment above vput_final: <quote> * XXX Some filesystems pass in an exclusively locked vnode and strongly depend * on the lock being held all the way until VOP_INACTIVE. This in particular * happens with UFS which adds half-constructed vnodes to the hash, where they * can be found by other code. </quote>
As is there is no mechanism which allows filesystems to denote that a vnode is fully initialized, consequently problems like the above are only found the hard way(tm).
Add rudimentary support for state transitions, which in particular allow to assert the vnode is not legally unlocked until its fate is decided (either construction finishes or vgone is called to abort it).
The new field lands in a 1-byte hole, thus it does not grow the struct.
Bump __FreeBSD_version to 1400077
Reviewed by: kib (previous version) Tested by: pho Differential Revision: https://reviews.freebsd.org/D37759
show more ...
|
#
8f7859e8 |
| 14-Dec-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: retire the now unused SAVESTART flag
Bump __FreeBSD_version to 1400075
Tested by: pho
|