fscrypt.rst: update definition of struct fscrypt_context_v2
Subsystems (2)
Eric Biggers
maintainerPATCH 1/1 fscrypt.rst: update definition of struct fscrypt_context_v2
From: Eric Biggers <[email protected]>
Get the copy of the fscrypt_context_v2 definition in the documentation in sync with the actual definition, which was changed recently by commit 5b1188847180 ("fscrypt: support crypto data unit size less than filesystem block size").
Signed-off-by Eric Biggers <[email protected]>
--- Documentation/filesystems/fscrypt.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/fscrypt.rst +2 -1
@@ -1375,21 +1375,22 @@ directory.) These structs are defined as follows:: u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE]; u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; }; #define FSCRYPT_KEY_IDENTIFIER_SIZE 16 struct fscrypt_context_v2 { u8 version; u8 contents_encryption_mode; u8 filenames_encryption_mode; u8 flags; - u8 __reserved[4]; + u8 log2_data_unit_size; + u8 __reserved[3]; u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; u8 nonce[FSCRYPT_FILE_NONCE_SIZE]; }; The context structs contain the same information as the corresponding policy structs (see `Setting an encryption policy`_), except that the context structs also contain a nonce. The nonce is randomly generated by the kernel and is used as KDF input or as a tweak to cause different files to be encrypted differently; see `Per-file encryption keys`_ and `DIRECT_KEY policies`_.
base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
Signature · 1 line
2.43.0