From: Linus Torvalds Date: Sun, 8 Jun 2014 02:44:40 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6 into next X-Git-Tag: v3.16-rc1~82^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=639b4ac691c6f6e48921dc576379c176f82f3250;p=platform%2Fkernel%2Flinux-exynos.git Merge git://git./linux/kernel/git/herbert/cryptodev-2.6 into next Pull crypto updates from Herbert Xu: "Here is the crypto update for 3.16: - Added test vectors for SHA/AES-CCM/DES-CBC/3DES-CBC. - Fixed a number of error-path memory leaks in tcrypt. - Fixed error-path memory leak in caam. - Removed unnecessary global mutex from mxs-dcp. - Added ahash walk interface that can actually be asynchronous. - Cleaned up caam error reporting. - Allow crypto_user get operation to be used by non-root users. - Add support for SSS module on Exynos. - Misc fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6: (60 commits) crypto: testmgr - add aead cbc des, des3_ede tests crypto: testmgr - Fix DMA-API warning crypto: cesa - tfm->__crt_alg->cra_type directly crypto: sahara - tfm->__crt_alg->cra_name directly crypto: padlock - tfm->__crt_alg->cra_name directly crypto: n2 - tfm->__crt_alg->cra_name directly crypto: dcp - tfm->__crt_alg->cra_name directly crypto: cesa - tfm->__crt_alg->cra_name directly crypto: ccp - tfm->__crt_alg->cra_name directly crypto: geode - Don't use tfm->__crt_alg->cra_name directly crypto: geode - Weed out printk() from probe() crypto: geode - Consistently use AES_KEYSIZE_128 crypto: geode - Kill AES_IV_LENGTH crypto: geode - Kill AES_MIN_BLOCK_SIZE crypto: mxs-dcp - Remove global mutex crypto: hash - Add real ahash walk interface hwrng: n2-drv - Introduce the use of the managed version of kzalloc crypto: caam - reinitialize keys_fit_inline for decrypt and givencrypt crypto: s5p-sss - fix multiplatform build hwrng: timeriomem - remove unnecessary OOM messages ... --- 639b4ac691c6f6e48921dc576379c176f82f3250 diff --cc crypto/crypto_user.c index 43665d0,aa906b8..e2a34fe --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@@ -265,6 -265,9 +265,9 @@@ static int crypto_update_alg(struct sk_ struct nlattr *priority = attrs[CRYPTOCFGA_PRIORITY_VAL]; LIST_HEAD(list); - if (!capable(CAP_NET_ADMIN)) ++ if (!netlink_capable(skb, CAP_NET_ADMIN)) + return -EPERM; + if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name)) return -EINVAL; @@@ -295,6 -298,9 +298,9 @@@ static int crypto_del_alg(struct sk_buf struct crypto_alg *alg; struct crypto_user_alg *p = nlmsg_data(nlh); - if (!capable(CAP_NET_ADMIN)) ++ if (!netlink_capable(skb, CAP_NET_ADMIN)) + return -EPERM; + if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name)) return -EINVAL; @@@ -379,6 -385,9 +385,9 @@@ static int crypto_add_alg(struct sk_buf struct crypto_user_alg *p = nlmsg_data(nlh); struct nlattr *priority = attrs[CRYPTOCFGA_PRIORITY_VAL]; - if (!capable(CAP_NET_ADMIN)) ++ if (!netlink_capable(skb, CAP_NET_ADMIN)) + return -EPERM; + if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name)) return -EINVAL; diff --cc drivers/char/hw_random/Kconfig index 244759b,38cfae6..836b061 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@@ -342,11 -321,12 +321,12 @@@ config HW_RANDOM_TP If unsure, say Y. config HW_RANDOM_MSM - tristate "Qualcomm MSM Random Number Generator support" - depends on ARCH_MSM + tristate "Qualcomm SoCs Random Number Generator support" + depends on HW_RANDOM && ARCH_QCOM + default HW_RANDOM ---help--- This driver provides kernel-side support for the Random Number - Generator hardware found on Qualcomm MSM SoCs. + Generator hardware found on Qualcomm SoCs. To compile this driver as a module, choose M here. the module will be called msm-rng.