Skip to content
Snippets Groups Projects
Commit 2f46a2bc authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o
Browse files

fscrypt: document symlink length restriction


Document that encryption reduces the maximum length of a symlink target
slightly.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent b9db0b4a
Branches
Tags
No related merge requests found
...@@ -448,8 +448,14 @@ astute users may notice some differences in behavior: ...@@ -448,8 +448,14 @@ astute users may notice some differences in behavior:
- The st_size of an encrypted symlink will not necessarily give the - The st_size of an encrypted symlink will not necessarily give the
length of the symlink target as required by POSIX. It will actually length of the symlink target as required by POSIX. It will actually
give the length of the ciphertext, which may be slightly longer than give the length of the ciphertext, which will be slightly longer
the plaintext due to the NUL-padding. than the plaintext due to NUL-padding and an extra 2-byte overhead.
- The maximum length of an encrypted symlink is 2 bytes shorter than
the maximum length of an unencrypted symlink. For example, on an
EXT4 filesystem with a 4K block size, unencrypted symlinks can be up
to 4095 bytes long, while encrypted symlinks can only be up to 4093
bytes long (both lengths excluding the terminating null).
Note that mmap *is* supported. This is possible because the pagecache Note that mmap *is* supported. This is possible because the pagecache
for an encrypted file contains the plaintext, not the ciphertext. for an encrypted file contains the plaintext, not the ciphertext.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment