lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 9 Apr 2023 15:46:59 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc:     clabbe@...libre.com, linux-kernel@...r.kernel.org,
        linux-crypto@...r.kernel.org
Subject: [PATCH] crypto: ixp4xx - Do not check word size when compile testing

On Fri, Apr 07, 2023 at 02:37:44PM -0500, Tom Zanussi wrote:
> COMPILE_TEST was added during the move to drivers/crypto/intel/ but
> shouldn't have been as it triggers a build bug when not compiled by
> the target compiler.  So remove it to match the original.
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202304061846.G6cpPXiQ-lkp@intel.com/
> Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> ---
>  drivers/crypto/intel/ixp4xx/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

We could also fix it by making the BUILD_BUG_ON conditional:

---8<---
The BUILD_BUG_ON preventing compilation on foreign architectures
should be disabled when we're doing compile testing.

Fixes: 1bc7fdbf2677 ("crypto: ixp4xx - Move driver to...")
Reported-by: kernel test robot <lkp@...el.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304061846.G6cpPXiQ-lkp@intel.com/
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

diff --git a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
index b63e2359a133..5d640f13ad1c 100644
--- a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
+++ b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c
@@ -263,7 +263,8 @@ static int setup_crypt_desc(void)
 {
 	struct device *dev = &pdev->dev;
 
-	BUILD_BUG_ON(sizeof(struct crypt_ctl) != 64);
+	BUILD_BUG_ON(!IS_ENABLED(CONFIG_COMPILE_TEST) &&
+		     sizeof(struct crypt_ctl) != 64);
 	crypt_virt = dma_alloc_coherent(dev,
 					NPE_QLEN * sizeof(struct crypt_ctl),
 					&crypt_phys, GFP_ATOMIC);
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ