aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-01-11 23:30:09 -0500
committerTheodore Ts'o <tytso@mit.edu>2018-01-11 23:30:09 -0500
commit2f46a2bc2694877332f9c1ff47acb7fa117e168a (patch)
tree4770143c03bd8b19c0b5b7205ef35f0af4e9cc0e /Documentation/filesystems
parentb9db0b4a68d373897119d1e0a3beebe1c1a23936 (diff)
fscrypt: document symlink length restriction
Document that encryption reduces the maximum length of a symlink target slightly. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/fscrypt.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst
index 776ddc655f79..cfbc18f0d9c9 100644
--- a/Documentation/filesystems/fscrypt.rst
+++ b/Documentation/filesystems/fscrypt.rst
@@ -448,8 +448,14 @@ astute users may notice some differences in behavior:
448 448
449- The st_size of an encrypted symlink will not necessarily give the 449- The st_size of an encrypted symlink will not necessarily give the
450 length of the symlink target as required by POSIX. It will actually 450 length of the symlink target as required by POSIX. It will actually
451 give the length of the ciphertext, which may be slightly longer than 451 give the length of the ciphertext, which will be slightly longer
452 the plaintext due to the NUL-padding. 452 than the plaintext due to NUL-padding and an extra 2-byte overhead.
453
454- The maximum length of an encrypted symlink is 2 bytes shorter than
455 the maximum length of an unencrypted symlink. For example, on an
456 EXT4 filesystem with a 4K block size, unencrypted symlinks can be up
457 to 4095 bytes long, while encrypted symlinks can only be up to 4093
458 bytes long (both lengths excluding the terminating null).
453 459
454Note that mmap *is* supported. This is possible because the pagecache 460Note that mmap *is* supported. This is possible because the pagecache
455for an encrypted file contains the plaintext, not the ciphertext. 461for an encrypted file contains the plaintext, not the ciphertext.