linux-next: build failure after merge of the kspp tree

Stephen Rothwell posted 1 patch 4 years, 5 months ago
There is a newer version of this series
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
linux-next: build failure after merge of the kspp tree
Posted by Stephen Rothwell 4 years, 5 months ago
Hi all,

After merging the kspp tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/linux/printk.h:555,
                 from include/asm-generic/bug.h:22,
                 from arch/x86/include/asm/bug.h:84,
                 from include/linux/bug.h:5,
                 from include/linux/mmdebug.h:5,
                 from include/linux/gfp.h:5,
                 from include/linux/firmware.h:7,
                 from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:5:
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c: In function 'otx2_cpt_print_uc_dbg_info':
include/linux/dynamic_debug.h:162:33: error: array subscript 4 is above array bounds of 'u32[4]' {aka 'unsigned int[4]'} [-Werror=array-bounds]
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |                                 ^
include/linux/dynamic_debug.h:134:17: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                 ^~~~
include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call'
  162 |         _dynamic_func_call(fmt, __dynamic_pr_debug,             \
      |         ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:570:9: note: in expansion of macro 'dynamic_pr_debug'
  570 |         dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1798:41: note: in expansion of macro 'pr_debug'
 1798 |                                         pr_debug("Mask: %8.8x %8.8x %8.8x %8.8x %8.8x",
      |                                         ^~~~~~~~
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c:1756:13: note: while referencing 'mask'
 1756 |         u32 mask[4];
      |             ^~~~

Caused by commit

  d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")

from Linus' tree interacting with commit

  a8712a32665f ("Makefile: Enable -Warray-bounds")

from the kspp tree.

I have applied the following patch for now.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 31 Jan 2022 09:28:12 +1100
Subject: [PATCH] fix up for otx2_cptpf_ucode.c out of bound reference

Fixes: d9d7749773e8 ("crypto: octeontx2 - add apis for custom engine groups")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
index 4c8ebdf671ca..e990405c7f33 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
@@ -1753,7 +1753,7 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
 	char engs_info[2 * OTX2_CPT_NAME_LENGTH];
 	struct otx2_cpt_eng_grp_info *grp;
 	struct otx2_cpt_engs_rsvd *engs;
-	u32 mask[4];
+	u32 mask[5];
 	int i, j;
 
 	pr_debug("Engine groups global info");
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the kspp tree
Posted by Herbert Xu 4 years, 5 months ago
On Mon, Jan 31, 2022 at 09:34:06AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

This should be fixed if you merge the latest cryptodev tree as
it includes the following fix:

commit f0a26ee8e1f8bda99f1e0050292de928cec17f92
Author: Kees Cook <keescook@chromium.org>
Date:   Wed Jan 12 12:38:11 2022 -0800

    crypto: octeontx2 - Avoid stack variable overflow

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: linux-next: build failure after merge of the kspp tree
Posted by Stephen Rothwell 4 years, 5 months ago
Hi Herbert,

On Mon, 31 Jan 2022 10:24:09 +1100 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, Jan 31, 2022 at 09:34:06AM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the kspp tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:  
> 
> This should be fixed if you merge the latest cryptodev tree as
> it includes the following fix:
> 
> commit f0a26ee8e1f8bda99f1e0050292de928cec17f92
> Author: Kees Cook <keescook@chromium.org>
> Date:   Wed Jan 12 12:38:11 2022 -0800
> 
>     crypto: octeontx2 - Avoid stack variable overflow

Are you intending to send that to Linus soon (as it fixes a commit that
was merged in v5.17-rc1)?  I would have expected to see it in the
crypto-current tree
(git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git#master)
in which case it would have been merged before the kspp tree.

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the kspp tree
Posted by Herbert Xu 4 years, 5 months ago
On Mon, Jan 31, 2022 at 11:15:31AM +1100, Stephen Rothwell wrote:
>
> Are you intending to send that to Linus soon (as it fixes a commit that
> was merged in v5.17-rc1)?  I would have expected to see it in the
> crypto-current tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git#master)
> in which case it would have been merged before the kspp tree.

You're right Stephen.  I will push this to the crypto tree.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: linux-next: build failure after merge of the kspp tree
Posted by Stephen Rothwell 4 years, 5 months ago
Hi Herbert,

On Mon, 31 Jan 2022 11:20:01 +1100 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, Jan 31, 2022 at 11:15:31AM +1100, Stephen Rothwell wrote:
> >
> > Are you intending to send that to Linus soon (as it fixes a commit that
> > was merged in v5.17-rc1)?  I would have expected to see it in the
> > crypto-current tree
> > (git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git#master)
> > in which case it would have been merged before the kspp tree.  
> 
> You're right Stephen.  I will push this to the crypto tree.

Thanks.

-- 
Cheers,
Stephen Rothwell