path: root/sys/bsm
diff options
authorMateusz Guzik <mjg@FreeBSD.org>2020-02-20 16:58:19 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-02-20 16:58:19 +0000
commit0573d0a9b8ec478348cbf2a7ec370c875eb57dff (patch)
tree11b7e9f241b8fd9cad66b1f30bce46c6083e161c /sys/bsm
parent43623d0ce7ac4cbe47b94c69077ce5b268fb05cf (diff)
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: svn path=/head/; revision=358172
Diffstat (limited to 'sys/bsm')
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/bsm/audit_kevents.h b/sys/bsm/audit_kevents.h
index 195194887db4..58582e235635 100644
--- a/sys/bsm/audit_kevents.h
+++ b/sys/bsm/audit_kevents.h
@@ -657,6 +657,7 @@
#define AUE_LGETUUID 43261 /* CADETS. */
#define AUE_EXECVEAT 43262 /* FreeBSD/Linux. */
#define AUE_SHMRENAME 43263 /* FreeBSD-specific. */
+#define AUE_REALPATHAT 43264 /* FreeBSD-specific. */
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the