From: kernel test robot <[email protected]>
To: Ammar Faizi <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Cc: [email protected]
Subject: [ammarfaizi2-block:google/android/kernel/common/upstream-f2fs-stable-linux-4.19.y 468/1172] fs/crypto/fname.c:87:17: sparse: sparse: Variable length array is used.
Date: Sat, 28 Jan 2023 09:53:13 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/upstream-f2fs-stable-linux-4.19.y
head: b9aeb147225616494256fcf913c559afd4088a05
commit: 86eb43f574e090ecb3a2ca7366f4c74bd6ab3df2 [468/1172] fscrypt: improve format of no-key names
config: i386-randconfig-s001-20230123 (https://download.01.org/0day-ci/archive/20230128/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/ammarfaizi2/linux-block/commit/86eb43f574e090ecb3a2ca7366f4c74bd6ab3df2
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/upstream-f2fs-stable-linux-4.19.y
git checkout 86eb43f574e090ecb3a2ca7366f4c74bd6ab3df2
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash fs/crypto/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> fs/crypto/fname.c:87:17: sparse: sparse: Variable length array is used.
fs/crypto/fname.c:55: warning: Function parameter or member 'dirhash' not described in 'fscrypt_nokey_name'
fs/crypto/fname.c:55: warning: Function parameter or member 'bytes' not described in 'fscrypt_nokey_name'
fs/crypto/fname.c:55: warning: Function parameter or member 'sha256' not described in 'fscrypt_nokey_name'
fs/crypto/fname.c:117: warning: Function parameter or member 'inode' not described in 'fscrypt_fname_encrypt'
fs/crypto/fname.c:117: warning: Function parameter or member 'iname' not described in 'fscrypt_fname_encrypt'
fs/crypto/fname.c:117: warning: Function parameter or member 'out' not described in 'fscrypt_fname_encrypt'
fs/crypto/fname.c:117: warning: Function parameter or member 'olen' not described in 'fscrypt_fname_encrypt'
fs/crypto/fname.c:169: warning: Function parameter or member 'inode' not described in 'fname_decrypt'
fs/crypto/fname.c:169: warning: Function parameter or member 'iname' not described in 'fname_decrypt'
fs/crypto/fname.c:169: warning: Function parameter or member 'oname' not described in 'fname_decrypt'
fs/crypto/fname.c:218: warning: Function parameter or member 'src' not described in 'base64_encode'
fs/crypto/fname.c:218: warning: Function parameter or member 'len' not described in 'base64_encode'
fs/crypto/fname.c:218: warning: Function parameter or member 'dst' not described in 'base64_encode'
fs/crypto/fname.c:286: warning: Function parameter or member 'inode' not described in 'fscrypt_fname_alloc_buffer'
fs/crypto/fname.c:286: warning: Function parameter or member 'max_encrypted_len' not described in 'fscrypt_fname_alloc_buffer'
fs/crypto/fname.c:286: warning: Function parameter or member 'crypto_str' not described in 'fscrypt_fname_alloc_buffer'
fs/crypto/fname.c:306: warning: Function parameter or member 'crypto_str' not described in 'fscrypt_fname_free_buffer'
fs/crypto/fname.c:330: warning: Function parameter or member 'inode' not described in 'fscrypt_fname_disk_to_usr'
fs/crypto/fname.c:330: warning: Function parameter or member 'hash' not described in 'fscrypt_fname_disk_to_usr'
fs/crypto/fname.c:330: warning: Function parameter or member 'minor_hash' not described in 'fscrypt_fname_disk_to_usr'
fs/crypto/fname.c:330: warning: Function parameter or member 'iname' not described in 'fscrypt_fname_disk_to_usr'
fs/crypto/fname.c:330: warning: Function parameter or member 'oname' not described in 'fscrypt_fname_disk_to_usr'
vim +87 fs/crypto/fname.c
65
66 static int fscrypt_do_sha256(const u8 *data, unsigned int data_len, u8 *result)
67 {
68 struct crypto_shash *tfm = READ_ONCE(sha256_hash_tfm);
69
70 if (unlikely(!tfm)) {
71 struct crypto_shash *prev_tfm;
72
73 tfm = crypto_alloc_shash("sha256", 0, 0);
74 if (IS_ERR(tfm)) {
75 fscrypt_err(NULL,
76 "Error allocating SHA-256 transform: %ld",
77 PTR_ERR(tfm));
78 return PTR_ERR(tfm);
79 }
80 prev_tfm = cmpxchg(&sha256_hash_tfm, NULL, tfm);
81 if (prev_tfm) {
82 crypto_free_shash(tfm);
83 tfm = prev_tfm;
84 }
85 }
86 {
> 87 SHASH_DESC_ON_STACK(desc, tfm);
88
89 desc->tfm = tfm;
90 desc->flags = 0;
91
92 return crypto_shash_digest(desc, data, data_len, result);
93 }
94 }
95
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-01-28 1:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox