aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-06-27 13:59:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-06-27 13:59:53 -0400
commit5b7452c840ad085e5ca1bb5b5a23a18e6d5b0c33 (patch)
tree44c34c55e8d14389222a2af4d1779db8590c2962
parent4c2e07c6a29e0129e975727b9f57eede813eea85 (diff)
parent055ddaace03580455a7b7dbea8e93d62acee61fc (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following issues: - Missing length check for user-space GETALG request - Bogus memmove length in ux500 driver - Incorrect priority setting for vmx driver - Incorrect ABI selection for vmx driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: user - re-add size check for CRYPTO_MSG_GETALG crypto: ux500 - memmove the right size crypto: vmx - Increase priority of aes-cbc cipher crypto: vmx - Fix ABI detection
-rw-r--r--crypto/crypto_user.c1
-rw-r--r--drivers/crypto/ux500/hash/hash_core.c4
-rw-r--r--drivers/crypto/vmx/aes_cbc.c2
-rw-r--r--drivers/crypto/vmx/aes_ctr.c2
-rw-r--r--drivers/crypto/vmx/ppc-xlate.pl2
5 files changed, 6 insertions, 5 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 43fe85f20d57..7097a3395b25 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -455,6 +455,7 @@ static const int crypto_msg_min[CRYPTO_NR_MSGTYPES] = {
455 [CRYPTO_MSG_NEWALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg), 455 [CRYPTO_MSG_NEWALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
456 [CRYPTO_MSG_DELALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg), 456 [CRYPTO_MSG_DELALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
457 [CRYPTO_MSG_UPDATEALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg), 457 [CRYPTO_MSG_UPDATEALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
458 [CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE] = MSGSIZE(crypto_user_alg),
458 [CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = 0, 459 [CRYPTO_MSG_DELRNG - CRYPTO_MSG_BASE] = 0,
459}; 460};
460 461
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 574e87c7f2b8..9acccad26928 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -781,7 +781,7 @@ static int hash_process_data(struct hash_device_data *device_data,
781 &device_data->state); 781 &device_data->state);
782 memmove(req_ctx->state.buffer, 782 memmove(req_ctx->state.buffer,
783 device_data->state.buffer, 783 device_data->state.buffer,
784 HASH_BLOCK_SIZE / sizeof(u32)); 784 HASH_BLOCK_SIZE);
785 if (ret) { 785 if (ret) {
786 dev_err(device_data->dev, 786 dev_err(device_data->dev,
787 "%s: hash_resume_state() failed!\n", 787 "%s: hash_resume_state() failed!\n",
@@ -832,7 +832,7 @@ static int hash_process_data(struct hash_device_data *device_data,
832 832
833 memmove(device_data->state.buffer, 833 memmove(device_data->state.buffer,
834 req_ctx->state.buffer, 834 req_ctx->state.buffer,
835 HASH_BLOCK_SIZE / sizeof(u32)); 835 HASH_BLOCK_SIZE);
836 if (ret) { 836 if (ret) {
837 dev_err(device_data->dev, "%s: hash_save_state() failed!\n", 837 dev_err(device_data->dev, "%s: hash_save_state() failed!\n",
838 __func__); 838 __func__);
diff --git a/drivers/crypto/vmx/aes_cbc.c b/drivers/crypto/vmx/aes_cbc.c
index 495577b6d31b..94ad5c0adbcb 100644
--- a/drivers/crypto/vmx/aes_cbc.c
+++ b/drivers/crypto/vmx/aes_cbc.c
@@ -182,7 +182,7 @@ struct crypto_alg p8_aes_cbc_alg = {
182 .cra_name = "cbc(aes)", 182 .cra_name = "cbc(aes)",
183 .cra_driver_name = "p8_aes_cbc", 183 .cra_driver_name = "p8_aes_cbc",
184 .cra_module = THIS_MODULE, 184 .cra_module = THIS_MODULE,
185 .cra_priority = 1000, 185 .cra_priority = 2000,
186 .cra_type = &crypto_blkcipher_type, 186 .cra_type = &crypto_blkcipher_type,
187 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | CRYPTO_ALG_NEED_FALLBACK, 187 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | CRYPTO_ALG_NEED_FALLBACK,
188 .cra_alignmask = 0, 188 .cra_alignmask = 0,
diff --git a/drivers/crypto/vmx/aes_ctr.c b/drivers/crypto/vmx/aes_ctr.c
index 0a3c1b04cf3c..38ed10d761d0 100644
--- a/drivers/crypto/vmx/aes_ctr.c
+++ b/drivers/crypto/vmx/aes_ctr.c
@@ -166,7 +166,7 @@ struct crypto_alg p8_aes_ctr_alg = {
166 .cra_name = "ctr(aes)", 166 .cra_name = "ctr(aes)",
167 .cra_driver_name = "p8_aes_ctr", 167 .cra_driver_name = "p8_aes_ctr",
168 .cra_module = THIS_MODULE, 168 .cra_module = THIS_MODULE,
169 .cra_priority = 1000, 169 .cra_priority = 2000,
170 .cra_type = &crypto_blkcipher_type, 170 .cra_type = &crypto_blkcipher_type,
171 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | CRYPTO_ALG_NEED_FALLBACK, 171 .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER | CRYPTO_ALG_NEED_FALLBACK,
172 .cra_alignmask = 0, 172 .cra_alignmask = 0,
diff --git a/drivers/crypto/vmx/ppc-xlate.pl b/drivers/crypto/vmx/ppc-xlate.pl
index 9f4994cabcc7..b18e67d0e065 100644
--- a/drivers/crypto/vmx/ppc-xlate.pl
+++ b/drivers/crypto/vmx/ppc-xlate.pl
@@ -141,7 +141,7 @@ my $vmr = sub {
141 141
142# Some ABIs specify vrsave, special-purpose register #256, as reserved 142# Some ABIs specify vrsave, special-purpose register #256, as reserved
143# for system use. 143# for system use.
144my $no_vrsave = ($flavour =~ /aix|linux64le/); 144my $no_vrsave = ($flavour =~ /linux-ppc64le/);
145my $mtspr = sub { 145my $mtspr = sub {
146 my ($f,$idx,$ra) = @_; 146 my ($f,$idx,$ra) = @_;
147 if ($idx == 256 && $no_vrsave) { 147 if ($idx == 256 && $no_vrsave) {