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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274224834.6930.8361.camel@macbook.infradead.org>
Date:	Wed, 19 May 2010 00:20:34 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	David Miller <davem@...emloft.net>
Cc:	penberg@...helsinki.fi, mpm@...enic.com,
	herbert@...dor.apana.org.au, ken@...elabs.ch, geert@...ux-m68k.org,
	michael-dev@...i-braun.de, linux-kernel@...r.kernel.org,
	linux-crypto@...r.kernel.org, anemo@....ocn.ne.jp
Subject: Re: [BUG] SLOB breaks Crypto

On Tue, 2010-05-18 at 14:20 -0700, David Miller wrote:
> I think it does make sense to expect that, whatever my architecture
> defines or does not define, I can expect the allocators to provide the
> same minimum alignment guarentee.

In a sense, they do. The minimum alignment guarantee is sizeof(long).
You are guaranteed that no allocator will return memory blocks which are
aligned to anything less than that.

Some allocators may sometimes return memory blocks which are
better-aligned than that -- but that's not guaranteed behaviour. If you
_depend_ on that behaviour and it happens to vary with the phase of the
moon, that's your problem.

It would be better if the minimum alignment was exposed to generic code
though -- you're right that the CPP tests in linux/crypto.h really
shouldn't have to exist. If it wasn't for that, then the crypto problem
wouldn't have occurred.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@...el.com                              Intel Corporation

--
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