Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Introduce crypto_shash_tfm_digest() and use it wherever possible. - Fix use-after-free and race in crypto_spawn_alg. - Add support for parallel and batch requests to crypto_engine. Algorithms: - Update jitter RNG for SP800-90B compliance. - Always use jitter RNG as seed in drbg. Drivers: - Add Arm CryptoCell driver cctrng. - Add support for SEV-ES to the PSP driver in ccp" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (114 commits) crypto: hisilicon - fix driver compatibility issue with different versions of devices crypto: engine - do not requeue in case of fatal error crypto: cavium/nitrox - Fix a typo in a comment crypto: hisilicon/qm - change debugfs file name from qm_regs to regs crypto: hisilicon/qm - add DebugFS for xQC and xQE dump crypto: hisilicon/zip - add debugfs for Hisilicon ZIP crypto: hisilicon/hpre - add debugfs for Hisilicon HPRE crypto: hisilicon/sec2 - add debugfs for Hisilicon SEC crypto: hisilicon/qm - add debugfs to the QM state machine crypto: hisilicon/qm - add debugfs for QM crypto: stm32/crc32 - protect from concurrent accesses crypto: stm32/crc32 - don't sleep in runtime pm crypto: stm32/crc32 - fix multi-instance crypto: stm32/crc32 - fix run-time self test issue. crypto: stm32/crc32 - fix ext4 chksum BUG_ON() crypto: hisilicon/zip - Use temporary sqe when doing work crypto: hisilicon - add device error report through abnormal irq crypto: hisilicon - remove codes of directly report device errors through MSI crypto: hisilicon - QM memory management optimization crypto: hisilicon - unify initial value assignment into QM ...
This commit is contained in:
@@ -3222,11 +3222,11 @@ static int ipv6_generate_stable_address(struct in6_addr *address,
|
||||
const struct inet6_dev *idev)
|
||||
{
|
||||
static DEFINE_SPINLOCK(lock);
|
||||
static __u32 digest[SHA_DIGEST_WORDS];
|
||||
static __u32 workspace[SHA_WORKSPACE_WORDS];
|
||||
static __u32 digest[SHA1_DIGEST_WORDS];
|
||||
static __u32 workspace[SHA1_WORKSPACE_WORDS];
|
||||
|
||||
static union {
|
||||
char __data[SHA_MESSAGE_BYTES];
|
||||
char __data[SHA1_BLOCK_SIZE];
|
||||
struct {
|
||||
struct in6_addr secret;
|
||||
__be32 prefix[2];
|
||||
@@ -3251,7 +3251,7 @@ static int ipv6_generate_stable_address(struct in6_addr *address,
|
||||
retry:
|
||||
spin_lock_bh(&lock);
|
||||
|
||||
sha_init(digest);
|
||||
sha1_init(digest);
|
||||
memset(&data, 0, sizeof(data));
|
||||
memset(workspace, 0, sizeof(workspace));
|
||||
memcpy(data.hwaddr, idev->dev->perm_addr, idev->dev->addr_len);
|
||||
@@ -3260,7 +3260,7 @@ retry:
|
||||
data.secret = secret;
|
||||
data.dad_count = dad_count;
|
||||
|
||||
sha_transform(digest, data.__data, workspace);
|
||||
sha1_transform(digest, data.__data, workspace);
|
||||
|
||||
temp = *address;
|
||||
temp.s6_addr32[2] = (__force __be32)digest[0];
|
||||
|
@@ -34,7 +34,6 @@
|
||||
#include <net/addrconf.h>
|
||||
#include <net/xfrm.h>
|
||||
|
||||
#include <linux/cryptohash.h>
|
||||
#include <crypto/hash.h>
|
||||
#include <crypto/sha.h>
|
||||
#include <net/seg6.h>
|
||||
|
Reference in New Issue
Block a user