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/android-4.14-stable 2063/9999] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.
Date: Thu, 4 Aug 2022 08:45:51 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.14-stable
head: c529afa15a69594211793a68cb70c873508061df
commit: 318babce66a62d8bc8d5434909a044b89ab3a53e [2063/9999] ANDROID: Initial commit of Incremental FS
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220804/[email protected]/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/ammarfaizi2/linux-block/commit/318babce66a62d8bc8d5434909a044b89ab3a53e
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.14-stable
git checkout 318babce66a62d8bc8d5434909a044b89ab3a53e
# 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 SHELL=/bin/bash drivers/md/ fs/incfs/
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/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.
In file included from include/linux/kernel.h:14:0,
from include/linux/crypto.h:21,
from include/crypto/hash.h:16,
from fs/incfs/integrity.c:6:
fs/incfs/integrity.c: In function 'incfs_validate_pkcs7_signature':
include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]
#define KERN_SOH "001" /* ASCII Start Of Header */
^
include/linux/printk.h:137:11: note: in definition of macro 'no_printk'
printk(fmt, ##__VA_ARGS__); 12- ^~~
include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
#define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
^~~~~~~~
include/linux/printk.h:344:12: note: in expansion of macro 'KERN_DEBUG'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~
fs/incfs/integrity.c:24:3: note: in expansion of macro 'pr_debug'
pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
^~~~~~~~
fs/incfs/integrity.c:24:49: note: format string is defined here
pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
~~^
%d
vim +196 fs/incfs/integrity.c
192
193 int incfs_calc_digest(struct incfs_hash_alg *alg, struct mem_range data,
194 struct mem_range digest)
195 {
> 196 SHASH_DESC_ON_STACK(desc, alg->shash);
197
198 if (!alg || !alg->shash || !data.data || !digest.data)
199 return -EFAULT;
200
201 if (alg->digest_size > digest.len)
202 return -EINVAL;
203
204 desc->tfm = alg->shash;
205 return crypto_shash_digest(desc, data.data, data.len, digest.data);
206 }
207
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-08-04 0:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 0:45 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-04 8:52 [ammarfaizi2-block:google/android/kernel/common/android-4.14-stable 2063/9999] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used kernel test robot
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