Thread (38 messages) 38 messages, 4 authors, 2025-01-23

Re: [PATCH v2] man/man7/path-format.7: Add file documenting format of pathnames

From: Florian Weimer <hidden>
Date: 2025-01-15 09:01:39

* Jason Yundt:
+The kernel stores paths as null-terminated byte sequences.
+As far as the kernel is concerned, there are only three rules for paths:
+.IP \[bu]
+The last byte in the sequence needs to be a null byte.
+.IP \[bu]
+Any other bytes in the sequence need to be non-null bytes.
+.IP \[bu]
+A 0x2F byte is always interpreted as a directory separator (/).
There are also rules about overall length.  Some pathnames cannot be
resolved by the kernel directly, even though they exist and can be
resolved piecewise, say using openat.

There are also places with more stringent pathname limits, like the
sun_path in AF_LOCAL socket addresses.

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help