ecryptfs: crypto: Supply some missing param descriptions and demote abuses

Fixes the following W=1 kernel build warning(s):

 fs/ecryptfs/crypto.c:29: warning: expecting prototype for eCryptfs(). Prototype was for DECRYPT() instead
 fs/ecryptfs/crypto.c:360: warning: Function parameter or member 'crypt_stat' not described in 'lower_offset_for_page'
 fs/ecryptfs/crypto.c:360: warning: Function parameter or member 'page' not described in 'lower_offset_for_page'
 fs/ecryptfs/crypto.c:637: warning: Function parameter or member 'crypt_stat' not described in 'ecryptfs_compute_root_iv'
 fs/ecryptfs/crypto.c:1386: warning: Function parameter or member 'ecryptfs_dentry' not described in 'ecryptfs_read_metadata'
 fs/ecryptfs/crypto.c:1463: warning: Function parameter or member 'filename' not described in 'ecryptfs_encrypt_filename'
 fs/ecryptfs/crypto.c:1463: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_encrypt_filename'
 fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'encoded_name_size' not described in 'ecryptfs_encrypt_and_encode_filename'
 fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_encrypt_and_encode_filename'
 fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'name_size' not described in 'ecryptfs_encrypt_and_encode_filename'
 fs/ecryptfs/crypto.c:1897: warning: Excess function parameter 'crypt_stat' description in 'ecryptfs_encrypt_and_encode_filename'
 fs/ecryptfs/crypto.c:1897: warning: Excess function parameter 'length' description in 'ecryptfs_encrypt_and_encode_filename'
 fs/ecryptfs/crypto.c:2006: warning: Function parameter or member 'sb' not described in 'ecryptfs_decode_and_decrypt_filename'
 fs/ecryptfs/crypto.c:2006: warning: Excess function parameter 'ecryptfs_dir_dentry' description in 'ecryptfs_decode_and_decrypt_filename'

Cc: Tyler Hicks <code@tyhicks.com>
Cc: Eric Biggers <ebiggers@google.com>
Cc: "Michael A. Halcrow" <mahalcro@us.ibm.com>
Cc: "Michael C. Thompson" <mcthomps@us.ibm.com>
Cc: ecryptfs@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
[tyhicks: Fix typo in ecryptfs_encrypt_and_encode_filename() func docs]
Signed-off-by: Tyler Hicks <code@tyhicks.com>
This commit is contained in:
Lee Jones 2021-03-30 17:44:55 +01:00 коммит произвёл Tyler Hicks
Родитель 65bbb7b846
Коммит 5da877eadf
1 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
/** /*
* eCryptfs: Linux filesystem encryption layer * eCryptfs: Linux filesystem encryption layer
* *
* Copyright (C) 1997-2004 Erez Zadok * Copyright (C) 1997-2004 Erez Zadok
@ -350,7 +350,7 @@ out:
return rc; return rc;
} }
/** /*
* lower_offset_for_page * lower_offset_for_page
* *
* Convert an eCryptfs page index into a lower byte offset * Convert an eCryptfs page index into a lower byte offset
@ -627,9 +627,8 @@ void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat)
} }
} }
/** /*
* ecryptfs_compute_root_iv * ecryptfs_compute_root_iv
* @crypt_stats
* *
* On error, sets the root IV to all 0's. * On error, sets the root IV to all 0's.
*/ */
@ -1370,7 +1369,7 @@ int ecryptfs_read_and_validate_xattr_region(struct dentry *dentry,
return rc; return rc;
} }
/** /*
* ecryptfs_read_metadata * ecryptfs_read_metadata
* *
* Common entry point for reading file metadata. From here, we could * Common entry point for reading file metadata. From here, we could
@ -1448,7 +1447,7 @@ out:
return rc; return rc;
} }
/** /*
* ecryptfs_encrypt_filename - encrypt filename * ecryptfs_encrypt_filename - encrypt filename
* *
* CBC-encrypts the filename. We do not want to encrypt the same * CBC-encrypts the filename. We do not want to encrypt the same
@ -1876,10 +1875,11 @@ out:
/** /**
* ecryptfs_encrypt_and_encode_filename - converts a plaintext file name to cipher text * ecryptfs_encrypt_and_encode_filename - converts a plaintext file name to cipher text
* @crypt_stat: The crypt_stat struct associated with the file anem to encode * @encoded_name: The encrypted name
* @encoded_name_size: Length of the encrypted name
* @mount_crypt_stat: The crypt_stat struct associated with the file name to encode
* @name: The plaintext name * @name: The plaintext name
* @length: The length of the plaintext * @name_size: The length of the plaintext name
* @encoded_name: The encypted name
* *
* Encrypts and encodes a filename into something that constitutes a * Encrypts and encodes a filename into something that constitutes a
* valid filename for a filesystem, with printable characters. * valid filename for a filesystem, with printable characters.
@ -1991,7 +1991,7 @@ static bool is_dot_dotdot(const char *name, size_t name_size)
* ecryptfs_decode_and_decrypt_filename - converts the encoded cipher text name to decoded plaintext * ecryptfs_decode_and_decrypt_filename - converts the encoded cipher text name to decoded plaintext
* @plaintext_name: The plaintext name * @plaintext_name: The plaintext name
* @plaintext_name_size: The plaintext name size * @plaintext_name_size: The plaintext name size
* @ecryptfs_dir_dentry: eCryptfs directory dentry * @sb: Ecryptfs's super_block
* @name: The filename in cipher text * @name: The filename in cipher text
* @name_size: The cipher text name size * @name_size: The cipher text name size
* *