From 251b74036204bbcc679780c87be814723173f11b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 10 Apr 2013 09:10:12 -0700 Subject: [PATCH] 3.8-stable patches added patches: crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch crypto-ux500-add-missing-comma.patch drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch --- ...ssumption-that-assoc-has-one-segment.patch | 57 +++++++++++++++ .../crypto-ux500-add-missing-comma.patch | 40 +++++++++++ ...c-registers-is-24-in-hex-not-decimal.patch | 71 +++++++++++++++++++ queue-3.8/series | 3 + 4 files changed, 171 insertions(+) create mode 100644 queue-3.8/crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch create mode 100644 queue-3.8/crypto-ux500-add-missing-comma.patch create mode 100644 queue-3.8/drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch diff --git a/queue-3.8/crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch b/queue-3.8/crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch new file mode 100644 index 00000000000..4f5ac499f23 --- /dev/null +++ b/queue-3.8/crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch @@ -0,0 +1,57 @@ +From d3dde52209ab571e4e2ec26c66f85ad1355f7475 Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna +Date: Thu, 28 Mar 2013 21:54:03 +0200 +Subject: crypto: gcm - fix assumption that assoc has one segment + +From: Jussi Kivilinna + +commit d3dde52209ab571e4e2ec26c66f85ad1355f7475 upstream. + +rfc4543(gcm(*)) code for GMAC assumes that assoc scatterlist always contains +only one segment and only makes use of this first segment. However ipsec passes +assoc with three segments when using 'extended sequence number' thus in this +case rfc4543(gcm(*)) fails to function correctly. Patch fixes this issue. + +Reported-by: Chaoxing Lin +Tested-by: Chaoxing Lin +Signed-off-by: Jussi Kivilinna +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + crypto/gcm.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +--- a/crypto/gcm.c ++++ b/crypto/gcm.c +@@ -44,6 +44,7 @@ struct crypto_rfc4543_ctx { + + struct crypto_rfc4543_req_ctx { + u8 auth_tag[16]; ++ u8 assocbuf[32]; + struct scatterlist cipher[1]; + struct scatterlist payload[2]; + struct scatterlist assoc[2]; +@@ -1142,9 +1143,19 @@ static struct aead_request *crypto_rfc45 + scatterwalk_crypto_chain(payload, dst, vdst == req->iv + 8, 2); + assoclen += 8 + req->cryptlen - (enc ? 0 : authsize); + +- sg_init_table(assoc, 2); +- sg_set_page(assoc, sg_page(req->assoc), req->assoc->length, +- req->assoc->offset); ++ if (req->assoc->length == req->assoclen) { ++ sg_init_table(assoc, 2); ++ sg_set_page(assoc, sg_page(req->assoc), req->assoc->length, ++ req->assoc->offset); ++ } else { ++ BUG_ON(req->assoclen > sizeof(rctx->assocbuf)); ++ ++ scatterwalk_map_and_copy(rctx->assocbuf, req->assoc, 0, ++ req->assoclen, 0); ++ ++ sg_init_table(assoc, 2); ++ sg_set_buf(assoc, rctx->assocbuf, req->assoclen); ++ } + scatterwalk_crypto_chain(assoc, payload, 0, 2); + + aead_request_set_tfm(subreq, ctx->child); diff --git a/queue-3.8/crypto-ux500-add-missing-comma.patch b/queue-3.8/crypto-ux500-add-missing-comma.patch new file mode 100644 index 00000000000..2490f163305 --- /dev/null +++ b/queue-3.8/crypto-ux500-add-missing-comma.patch @@ -0,0 +1,40 @@ +From d47cbd5bcee7c7a08fc0283dda465375fa1b1fda Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Fri, 5 Apr 2013 14:06:35 +0200 +Subject: crypto: ux500 - add missing comma + +From: Linus Walleij + +commit d47cbd5bcee7c7a08fc0283dda465375fa1b1fda upstream. + +Commit 4f31f5b19eb0418a847b989abc9ac22af1991fe2 +"PM / crypto / ux500: Use struct dev_pm_ops for power management" +add a new line to the driver struct but missed to add a +trailing comma, causing build errors when crypto is +selected. This adds the missing comma. + +This was not noticed until now because the crypto block +is not in the ux500 defconfig. A separate patch will +be submitted to fix this. + +Signed-off-by: Linus Walleij +Cc: Rafael J. Wysocki +Cc: Magnus Myrstedt +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/ux500/cryp/cryp_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/crypto/ux500/cryp/cryp_core.c ++++ b/drivers/crypto/ux500/cryp/cryp_core.c +@@ -1750,7 +1750,7 @@ static struct platform_driver cryp_drive + .shutdown = ux500_cryp_shutdown, + .driver = { + .owner = THIS_MODULE, +- .name = "cryp1" ++ .name = "cryp1", + .pm = &ux500_cryp_pm, + } + }; diff --git a/queue-3.8/drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch b/queue-3.8/drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch new file mode 100644 index 00000000000..e834d345641 --- /dev/null +++ b/queue-3.8/drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch @@ -0,0 +1,71 @@ +From 1812a3db0874be1d1524086da9e84397b800f546 Mon Sep 17 00:00:00 2001 +From: Christopher Harvey +Date: Fri, 5 Apr 2013 10:51:15 -0400 +Subject: drm/mgag200: Index 24 in extended CRTC registers is 24 in hex, not decimal. + +From: Christopher Harvey + +commit 1812a3db0874be1d1524086da9e84397b800f546 upstream. + +This change properly enables the "requester" in G200ER cards that is +responsible for getting pixels out of memory and clocking them out to +the screen. + +Signed-off-by: Christopher Harvey +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/mgag200/mgag200_mode.c | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +--- a/drivers/gpu/drm/mgag200/mgag200_mode.c ++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c +@@ -751,8 +751,6 @@ static int mga_crtc_mode_set(struct drm_ + int i; + unsigned char misc = 0; + unsigned char ext_vga[6]; +- unsigned char ext_vga_index24; +- unsigned char dac_index90 = 0; + u8 bppshift; + + static unsigned char dacvalue[] = { +@@ -803,7 +801,6 @@ static int mga_crtc_mode_set(struct drm_ + option2 = 0x0000b000; + break; + case G200_ER: +- dac_index90 = 0; + break; + } + +@@ -852,10 +849,8 @@ static int mga_crtc_mode_set(struct drm_ + WREG_DAC(i, dacvalue[i]); + } + +- if (mdev->type == G200_ER) { +- WREG_DAC(0x90, dac_index90); +- } +- ++ if (mdev->type == G200_ER) ++ WREG_DAC(0x90, 0); + + if (option) + pci_write_config_dword(dev->pdev, PCI_MGA_OPTION, option); +@@ -952,8 +947,6 @@ static int mga_crtc_mode_set(struct drm_ + if (mdev->type == G200_WB) + ext_vga[1] |= 0x88; + +- ext_vga_index24 = 0x05; +- + /* Set pixel clocks */ + misc = 0x2d; + WREG8(MGA_MISC_OUT, misc); +@@ -965,7 +958,7 @@ static int mga_crtc_mode_set(struct drm_ + } + + if (mdev->type == G200_ER) +- WREG_ECRT(24, ext_vga_index24); ++ WREG_ECRT(0x24, 0x5); + + if (mdev->type == G200_EV) { + WREG_ECRT(6, 0); diff --git a/queue-3.8/series b/queue-3.8/series index 284c7da0f4a..1818ce4e248 100644 --- a/queue-3.8/series +++ b/queue-3.8/series @@ -39,3 +39,6 @@ remoteproc-ste-fix-memory-leak-on-shutdown.patch remoteproc-fix-error-path-of-handle_vdev.patch remoteproc-fix-fw_config-typo.patch spinlocks-and-preemption-points-need-to-be-at-least-compiler-barriers.patch +crypto-ux500-add-missing-comma.patch +crypto-gcm-fix-assumption-that-assoc-has-one-segment.patch +drm-mgag200-index-24-in-extended-crtc-registers-is-24-in-hex-not-decimal.patch -- 2.47.3