diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-02-20 16:58:19 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-02-20 16:58:19 +0000 |
commit | 0573d0a9b8ec478348cbf2a7ec370c875eb57dff (patch) | |
tree | 11b7e9f241b8fd9cad66b1f30bce46c6083e161c /sys/security | |
parent | 43623d0ce7ac4cbe47b94c69077ce5b268fb05cf (diff) | |
download | src-0573d0a9b8ec478348cbf2a7ec370c875eb57dff.tar.gz src-0573d0a9b8ec478348cbf2a7ec370c875eb57dff.zip |
vfs: add realpathat syscall
realpath(3) is used a lot e.g., by clang and is a major source of getcwd
and fstatat calls. This can be done more efficiently in the kernel.
This works by performing a regular lookup while saving the name and found
parent directory. If the terminal vnode is a directory we can resolve it using
usual means. Otherwise we can use the name saved by lookup and resolve the
parent.
See the review for sample syscall counts.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D23574
Notes
Notes:
svn path=/head/; revision=358172
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/audit/audit_bsm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c index feaae8edce9b..3ff90b68a708 100644 --- a/sys/security/audit/audit_bsm.c +++ b/sys/security/audit/audit_bsm.c @@ -830,6 +830,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau) case AUE_UNLINK: case AUE_UNLINKAT: case AUE_UTIMES: + case AUE_REALPATHAT: ATFD1_TOKENS(1); UPATH1_VNODE1_TOKENS; break; |