All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-4.19 1/4] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.
@ 2021-03-02 22:09 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-02 22:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3264 bytes --]

tree:   https://android.googlesource.com/kernel/common android-4.19
head:   7bab03039e64ed6c26be90530e08978eab3be578
commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial commit of Incremental FS
config: i386-randconfig-s032-20210303 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-241-geaceeafa-dirty
        git remote add android-common https://android.googlesource.com/kernel/common
        git fetch --no-tags android-common android-4.19
        git checkout 040942fc50b20325bb56737c32b303268bb6f35c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"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,
                    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=]
       5 | #define KERN_SOH "001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/printk.h:136:10: note: in definition of macro 'no_printk'
     136 |   printk(fmt, ##__VA_ARGS__);  12-      |          ^~~
   include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
      15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
         |                    ^~~~~~~~
   include/linux/printk.h:346:12: note: in expansion of macro 'KERN_DEBUG'
     346 |  no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
         |            ^~~~~~~~~~
   fs/incfs/integrity.c:24:3: note: in expansion of macro 'pr_debug'
      24 |   pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
         |   ^~~~~~~~
   fs/incfs/integrity.c:24:49: note: format string is defined here
      24 |   pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
         |                                               ~~^
         |                                                 |
         |                                                 long int
         |                                               %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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29642 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [android-common:android-4.19 1/4] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.
@ 2021-01-02  1:40 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-01-02  1:40 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

tree:   https://android.googlesource.com/kernel/common android-4.19
head:   7bab03039e64ed6c26be90530e08978eab3be578
commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial commit of Incremental FS
config: x86_64-randconfig-s032-20201231 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-184-g1b896707-dirty
        git remote add android-common https://android.googlesource.com/kernel/common
        git fetch --no-tags android-common android-4.19
        git checkout 040942fc50b20325bb56737c32b303268bb6f35c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.

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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33196 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [android-common:android-4.19 1/4] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used.
@ 2020-12-04  5:59 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-04  5:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3264 bytes --]

tree:   https://android.googlesource.com/kernel/common android-4.19
head:   7bab03039e64ed6c26be90530e08978eab3be578
commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial commit of Incremental FS
config: i386-randconfig-s031-20201204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-179-ga00755aa-dirty
        git remote add android-common https://android.googlesource.com/kernel/common
        git fetch --no-tags android-common android-4.19
        git checkout 040942fc50b20325bb56737c32b303268bb6f35c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"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,
                    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=]
       5 | #define KERN_SOH "001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/printk.h:136:10: note: in definition of macro 'no_printk'
     136 |   printk(fmt, ##__VA_ARGS__);  12-      |          ^~~
   include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH'
      15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
         |                    ^~~~~~~~
   include/linux/printk.h:346:12: note: in expansion of macro 'KERN_DEBUG'
     346 |  no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
         |            ^~~~~~~~~~
   fs/incfs/integrity.c:24:3: note: in expansion of macro 'pr_debug'
      24 |   pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
         |   ^~~~~~~~
   fs/incfs/integrity.c:24:49: note: format string is defined here
      24 |   pr_debug("PKCS#7 parsing error. ptr=%p size=%ld err=%ldn",
         |                                               ~~^
         |                                                 |
         |                                                 long int
         |                                               %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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29136 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-02 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 22:09 [android-common:android-4.19 1/4] fs/incfs/integrity.c:196:9: sparse: sparse: Variable length array is used kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-01-02  1:40 kernel test robot
2020-12-04  5:59 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.