All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash'
@ 2020-03-25 18:36 kbuild test robot
  2020-03-25 19:08 ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2020-03-25 18:36 UTC (permalink / raw)
  To: kbuild-all

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

Hi Dirk,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   bfd7a248502373da8b1c8eb0e811fdb19cc3f8b6
commit: 35595372d95c0d10784bce1aec8cc144a39eb66d [7819/11710] Remove redundant YYLOC global declaration
config: arm-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2093fdd429d52348e08969180ac6b1e705fc4ff6)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 35595372d95c0d10784bce1aec8cc144a39eb66d
        # save the attached .config to linux build tree
        COMPILER=clang make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

>> security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' [-Wframe-larger-than=]
   int ima_calc_field_array_hash(struct ima_field_data *field_data,
       ^
   1 warning generated.
--
>> sound/soc/codecs/cros_ec_codec.c:757:12: warning: stack frame size of 1152 bytes in function 'wov_hotword_model_put' [-Wframe-larger-than=]
   static int wov_hotword_model_put(struct snd_kcontrol *kcontrol,
              ^
   1 warning generated.
--
>> drivers/staging/exfat/exfat_super.c:2072:12: warning: stack frame size of 1576 bytes in function 'exfat_readdir' [-Wframe-larger-than=]
   static int exfat_readdir(struct file *filp, struct dir_context *ctx)
              ^
   1 warning generated.
--
>> drivers/crypto/inside-secure/safexcel_cipher.c:404:12: warning: stack frame size of 1128 bytes in function 'safexcel_aead_setkey' [-Wframe-larger-than=]
   static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
              ^
   1 warning generated.

vim +/ima_calc_field_array_hash +514 security/integrity/ima/ima_crypto.c

3323eec921efd81 Mimi Zohar      2009-02-04  513  
b6f8f16f41d9286 Roberto Sassu   2013-11-08 @514  int ima_calc_field_array_hash(struct ima_field_data *field_data,
b6f8f16f41d9286 Roberto Sassu   2013-11-08  515  			      struct ima_template_desc *desc, int num_fields,
a71dc65d30a4724 Roberto Sassu   2013-06-07  516  			      struct ima_digest_data *hash)
ea593993d361748 Dmitry Kasatkin 2013-06-07  517  {
ea593993d361748 Dmitry Kasatkin 2013-06-07  518  	struct crypto_shash *tfm;
ea593993d361748 Dmitry Kasatkin 2013-06-07  519  	int rc;
ea593993d361748 Dmitry Kasatkin 2013-06-07  520  
ea593993d361748 Dmitry Kasatkin 2013-06-07  521  	tfm = ima_alloc_tfm(hash->algo);
ea593993d361748 Dmitry Kasatkin 2013-06-07  522  	if (IS_ERR(tfm))
ea593993d361748 Dmitry Kasatkin 2013-06-07  523  		return PTR_ERR(tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07  524  
b6f8f16f41d9286 Roberto Sassu   2013-11-08  525  	rc = ima_calc_field_array_hash_tfm(field_data, desc, num_fields,
b6f8f16f41d9286 Roberto Sassu   2013-11-08  526  					   hash, tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07  527  
ea593993d361748 Dmitry Kasatkin 2013-06-07  528  	ima_free_tfm(tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07  529  
ea593993d361748 Dmitry Kasatkin 2013-06-07  530  	return rc;
ea593993d361748 Dmitry Kasatkin 2013-06-07  531  }
ea593993d361748 Dmitry Kasatkin 2013-06-07  532  

:::::: The code at line 514 was first introduced by commit
:::::: b6f8f16f41d92861621b043389ef49de1c52d613 ima: do not include field length in template digest calc for ima template

:::::: TO: Roberto Sassu <roberto.sassu@polito.it>
:::::: CC: Mimi Zohar <zohar@linux.vnet.ibm.com>

---
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: 72989 bytes --]

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

* Re: [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash'
  2020-03-25 18:36 [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' kbuild test robot
@ 2020-03-25 19:08 ` Nick Desaulniers
  2020-03-26  0:23   ` Rong Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Desaulniers @ 2020-03-25 19:08 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Mar 25, 2020 at 11:37 AM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Dirk,
>
> First bad commit (maybe != root cause):
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   bfd7a248502373da8b1c8eb0e811fdb19cc3f8b6
> commit: 35595372d95c0d10784bce1aec8cc144a39eb66d [7819/11710] Remove redundant YYLOC global declaration
> config: arm-allyesconfig (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2093fdd429d52348e08969180ac6b1e705fc4ff6)
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 35595372d95c0d10784bce1aec8cc144a39eb66d
>         # save the attached .config to linux build tree
>         COMPILER=clang make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):

Please ignore, these warnings and the identified commit are unrelated;
we have a few -Wframe-larger-than= warnings to clean up for 32b arm.
I have a tool that parses debug info to find these:
https://github.com/ClangBuiltLinux/frame-larger-than

>
> >> security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' [-Wframe-larger-than=]
>    int ima_calc_field_array_hash(struct ima_field_data *field_data,
>        ^
>    1 warning generated.
> --
> >> sound/soc/codecs/cros_ec_codec.c:757:12: warning: stack frame size of 1152 bytes in function 'wov_hotword_model_put' [-Wframe-larger-than=]
>    static int wov_hotword_model_put(struct snd_kcontrol *kcontrol,
>               ^
>    1 warning generated.
> --
> >> drivers/staging/exfat/exfat_super.c:2072:12: warning: stack frame size of 1576 bytes in function 'exfat_readdir' [-Wframe-larger-than=]
>    static int exfat_readdir(struct file *filp, struct dir_context *ctx)
>               ^
>    1 warning generated.
> --
> >> drivers/crypto/inside-secure/safexcel_cipher.c:404:12: warning: stack frame size of 1128 bytes in function 'safexcel_aead_setkey' [-Wframe-larger-than=]
>    static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
>               ^
>    1 warning generated.
>
> vim +/ima_calc_field_array_hash +514 security/integrity/ima/ima_crypto.c
>
> 3323eec921efd81 Mimi Zohar      2009-02-04  513
> b6f8f16f41d9286 Roberto Sassu   2013-11-08 @514  int ima_calc_field_array_hash(struct ima_field_data *field_data,
> b6f8f16f41d9286 Roberto Sassu   2013-11-08  515                               struct ima_template_desc *desc, int num_fields,
> a71dc65d30a4724 Roberto Sassu   2013-06-07  516                               struct ima_digest_data *hash)
> ea593993d361748 Dmitry Kasatkin 2013-06-07  517  {
> ea593993d361748 Dmitry Kasatkin 2013-06-07  518         struct crypto_shash *tfm;
> ea593993d361748 Dmitry Kasatkin 2013-06-07  519         int rc;
> ea593993d361748 Dmitry Kasatkin 2013-06-07  520
> ea593993d361748 Dmitry Kasatkin 2013-06-07  521         tfm = ima_alloc_tfm(hash->algo);
> ea593993d361748 Dmitry Kasatkin 2013-06-07  522         if (IS_ERR(tfm))
> ea593993d361748 Dmitry Kasatkin 2013-06-07  523                 return PTR_ERR(tfm);
> ea593993d361748 Dmitry Kasatkin 2013-06-07  524
> b6f8f16f41d9286 Roberto Sassu   2013-11-08  525         rc = ima_calc_field_array_hash_tfm(field_data, desc, num_fields,
> b6f8f16f41d9286 Roberto Sassu   2013-11-08  526                                            hash, tfm);
> ea593993d361748 Dmitry Kasatkin 2013-06-07  527
> ea593993d361748 Dmitry Kasatkin 2013-06-07  528         ima_free_tfm(tfm);
> ea593993d361748 Dmitry Kasatkin 2013-06-07  529
> ea593993d361748 Dmitry Kasatkin 2013-06-07  530         return rc;
> ea593993d361748 Dmitry Kasatkin 2013-06-07  531  }
> ea593993d361748 Dmitry Kasatkin 2013-06-07  532
>
> :::::: The code at line 514 was first introduced by commit
> :::::: b6f8f16f41d92861621b043389ef49de1c52d613 ima: do not include field length in template digest calc for ima template
>
> :::::: TO: Roberto Sassu <roberto.sassu@polito.it>
> :::::: CC: Mimi Zohar <zohar@linux.vnet.ibm.com>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202003260212.EDh6YemF%25lkp%40intel.com.



-- 
Thanks,
~Nick Desaulniers

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

* Re: [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash'
  2020-03-25 19:08 ` Nick Desaulniers
@ 2020-03-26  0:23   ` Rong Chen
  2020-04-01 19:40     ` Nick Desaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: Rong Chen @ 2020-03-26  0:23 UTC (permalink / raw)
  To: kbuild-all

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



On 3/26/20 3:08 AM, Nick Desaulniers wrote:
> On Wed, Mar 25, 2020 at 11:37 AM kbuild test robot <lkp@intel.com> wrote:
>> Hi Dirk,
>>
>> First bad commit (maybe != root cause):
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head:   bfd7a248502373da8b1c8eb0e811fdb19cc3f8b6
>> commit: 35595372d95c0d10784bce1aec8cc144a39eb66d [7819/11710] Remove redundant YYLOC global declaration
>> config: arm-allyesconfig (attached as .config)
>> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2093fdd429d52348e08969180ac6b1e705fc4ff6)
>> reproduce:
>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          git checkout 35595372d95c0d10784bce1aec8cc144a39eb66d
>>          # save the attached .config to linux build tree
>>          COMPILER=clang make.cross ARCH=arm
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
> Please ignore, these warnings and the identified commit are unrelated;
> we have a few -Wframe-larger-than= warnings to clean up for 32b arm.
> I have a tool that parses debug info to find these:
> https://github.com/ClangBuiltLinux/frame-larger-than

Hi Nick,

Thanks a lot, we'll blacklist such warnings.

Best Regards,
Rong Chen


>
>>>> security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' [-Wframe-larger-than=]
>>     int ima_calc_field_array_hash(struct ima_field_data *field_data,
>>         ^
>>     1 warning generated.
>> --
>>>> sound/soc/codecs/cros_ec_codec.c:757:12: warning: stack frame size of 1152 bytes in function 'wov_hotword_model_put' [-Wframe-larger-than=]
>>     static int wov_hotword_model_put(struct snd_kcontrol *kcontrol,
>>                ^
>>     1 warning generated.
>> --
>>>> drivers/staging/exfat/exfat_super.c:2072:12: warning: stack frame size of 1576 bytes in function 'exfat_readdir' [-Wframe-larger-than=]
>>     static int exfat_readdir(struct file *filp, struct dir_context *ctx)
>>                ^
>>     1 warning generated.
>> --
>>>> drivers/crypto/inside-secure/safexcel_cipher.c:404:12: warning: stack frame size of 1128 bytes in function 'safexcel_aead_setkey' [-Wframe-larger-than=]
>>     static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
>>                ^
>>     1 warning generated.
>>
>> vim +/ima_calc_field_array_hash +514 security/integrity/ima/ima_crypto.c
>>
>> 3323eec921efd81 Mimi Zohar      2009-02-04  513
>> b6f8f16f41d9286 Roberto Sassu   2013-11-08 @514  int ima_calc_field_array_hash(struct ima_field_data *field_data,
>> b6f8f16f41d9286 Roberto Sassu   2013-11-08  515                               struct ima_template_desc *desc, int num_fields,
>> a71dc65d30a4724 Roberto Sassu   2013-06-07  516                               struct ima_digest_data *hash)
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  517  {
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  518         struct crypto_shash *tfm;
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  519         int rc;
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  520
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  521         tfm = ima_alloc_tfm(hash->algo);
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  522         if (IS_ERR(tfm))
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  523                 return PTR_ERR(tfm);
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  524
>> b6f8f16f41d9286 Roberto Sassu   2013-11-08  525         rc = ima_calc_field_array_hash_tfm(field_data, desc, num_fields,
>> b6f8f16f41d9286 Roberto Sassu   2013-11-08  526                                            hash, tfm);
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  527
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  528         ima_free_tfm(tfm);
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  529
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  530         return rc;
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  531  }
>> ea593993d361748 Dmitry Kasatkin 2013-06-07  532
>>
>> :::::: The code at line 514 was first introduced by commit
>> :::::: b6f8f16f41d92861621b043389ef49de1c52d613 ima: do not include field length in template digest calc for ima template
>>
>> :::::: TO: Roberto Sassu <roberto.sassu@polito.it>
>> :::::: CC: Mimi Zohar <zohar@linux.vnet.ibm.com>
>>
>> ---
>> 0-DAY CI Kernel Test Service, Intel Corporation
>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202003260212.EDh6YemF%25lkp%40intel.com.
>
>

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

* Re: [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash'
  2020-03-26  0:23   ` Rong Chen
@ 2020-04-01 19:40     ` Nick Desaulniers
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2020-04-01 19:40 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, Mar 25, 2020 at 5:23 PM Rong Chen <rong.a.chen@intel.com> wrote:
>
>
>
> On 3/26/20 3:08 AM, Nick Desaulniers wrote:
> > On Wed, Mar 25, 2020 at 11:37 AM kbuild test robot <lkp@intel.com> wrote:
> >> Hi Dirk,
> >>
> >> First bad commit (maybe != root cause):
> >>
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> >> head:   bfd7a248502373da8b1c8eb0e811fdb19cc3f8b6
> >> commit: 35595372d95c0d10784bce1aec8cc144a39eb66d [7819/11710] Remove redundant YYLOC global declaration
> >> config: arm-allyesconfig (attached as .config)
> >> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2093fdd429d52348e08969180ac6b1e705fc4ff6)
> >> reproduce:
> >>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >>          chmod +x ~/bin/make.cross
> >>          git checkout 35595372d95c0d10784bce1aec8cc144a39eb66d
> >>          # save the attached .config to linux build tree
> >>          COMPILER=clang make.cross ARCH=arm
> >>
> >> If you fix the issue, kindly add following tag
> >> Reported-by: kbuild test robot <lkp@intel.com>
> >>
> >> All warnings (new ones prefixed by >>):
> > Please ignore, these warnings and the identified commit are unrelated;
> > we have a few -Wframe-larger-than= warnings to clean up for 32b arm.
> > I have a tool that parses debug info to find these:
> > https://github.com/ClangBuiltLinux/frame-larger-than
>
> Hi Nick,
>
> Thanks a lot, we'll blacklist such warnings.

One day we'll want to turn these back on; they are useful for
preventing unintentionally large stack allocations.  The issue is that
we don't have all of the existing cases fixed yet, so it's hard for CI
systems to know if this is a new warning introduced by this patch or
not.
-- 
Thanks,
~Nick Desaulniers

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

end of thread, other threads:[~2020-04-01 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 18:36 [linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' kbuild test robot
2020-03-25 19:08 ` Nick Desaulniers
2020-03-26  0:23   ` Rong Chen
2020-04-01 19:40     ` Nick Desaulniers

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.