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]
Message-ID: <20100519015154.GA19450@gondor.apana.org.au>
Date:	Wed, 19 May 2010 11:51:54 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Adrian-Ken Rueegsegger <ken@...elabs.ch>
Cc:	Matt Mackall <mpm@...enic.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	michael-dev@...i-braun.de, Pekka Enberg <penberg@...helsinki.fi>,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	Atsushi Nemoto <anemo@....ocn.ne.jp>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [BUG] SLOB breaks Crypto

On Tue, May 18, 2010 at 09:32:54PM +0200, Adrian-Ken Rueegsegger wrote:
> 
> When doing the revert it is necessary to either have
> ARCH_KMALLOC_MINALIGN defined or explicitly define CRYPTO_MINALIGN in
> the case where it is not. Otherwise shash compilation fails because it
> needs CRYPTO_MINALIGN.

I've added the following patch.  Thanks!

commit 18eb8ea6ee4cc9ed39b45f95b734f523bcfb586b
Author: Herbert Xu <herbert@...dor.apana.org.au>
Date:   Wed May 19 11:50:58 2010 +1000

    crypto: shash - Remove usage of CRYPTO_MINALIGN
    
    The macro CRYPTO_MINALIGN is not meant to be used directly.  This
    patch replaces it with crypto_tfm_ctx_alignment.
    
    Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

diff --git a/crypto/shash.c b/crypto/shash.c
index 91f7b9d..22fd943 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -37,7 +37,7 @@ static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
 	u8 *buffer, *alignbuffer;
 	int err;
 
-	absize = keylen + (alignmask & ~(CRYPTO_MINALIGN - 1));
+	absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1));
 	buffer = kmalloc(absize, GFP_KERNEL);
 	if (!buffer)
 		return -ENOMEM;

-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ