summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-21 12:03:17 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-21 12:03:17 -0800
commit10d8f961cdfd0c2a78e85569425ccc60983d19de (patch)
treeb10362fbf15bd3dd509f54580f10e4cc8b096692
parent975d8e876040c84dec85977985ec379a4a9b3caf (diff)
downloadlongterm-queue-2.6.32-10d8f961cdfd0c2a78e85569425ccc60983d19de.tar.gz
2.6.32-stable patches
added patches: crypto-sha512-use-standard-ror64.patch drm-radeon-kms-fix-msi-re-arm-on-rv370.patch ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch scsi-3w-9xxx-fix-bug-in-sgl-loading.patch
-rw-r--r--queue-2.6.32/crypto-sha512-use-standard-ror64.patch86
-rw-r--r--queue-2.6.32/drm-radeon-kms-fix-msi-re-arm-on-rv370.patch50
-rw-r--r--queue-2.6.32/ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch38
-rw-r--r--queue-2.6.32/scsi-3w-9xxx-fix-bug-in-sgl-loading.patch56
-rw-r--r--queue-2.6.32/series4
5 files changed, 234 insertions, 0 deletions
diff --git a/queue-2.6.32/crypto-sha512-use-standard-ror64.patch b/queue-2.6.32/crypto-sha512-use-standard-ror64.patch
new file mode 100644
index 0000000..7c6ad3b
--- /dev/null
+++ b/queue-2.6.32/crypto-sha512-use-standard-ror64.patch
@@ -0,0 +1,86 @@
+From f2ea0f5f04c97b48c88edccba52b0682fbe45087 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Sat, 14 Jan 2012 21:44:49 +0300
+Subject: crypto: sha512 - use standard ror64()
+
+From: Alexey Dobriyan <adobriyan@gmail.com>
+
+commit f2ea0f5f04c97b48c88edccba52b0682fbe45087 upstream.
+
+Use standard ror64() instead of hand-written.
+There is no standard ror64, so create it.
+
+The difference is shift value being "unsigned int" instead of uint64_t
+(for which there is no reason). gcc starts to emit native ROR instructions
+which it doesn't do for some reason currently. This should make the code
+faster.
+
+Patch survives in-tree crypto test and ping flood with hmac(sha512) on.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ crypto/sha512_generic.c | 13 ++++---------
+ include/linux/bitops.h | 20 ++++++++++++++++++++
+ 2 files changed, 24 insertions(+), 9 deletions(-)
+
+--- a/crypto/sha512_generic.c
++++ b/crypto/sha512_generic.c
+@@ -31,11 +31,6 @@ static inline u64 Maj(u64 x, u64 y, u64
+ return (x & y) | (z & (x | y));
+ }
+
+-static inline u64 RORu64(u64 x, u64 y)
+-{
+- return (x >> y) | (x << (64 - y));
+-}
+-
+ static const u64 sha512_K[80] = {
+ 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL,
+ 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
+@@ -66,10 +61,10 @@ static const u64 sha512_K[80] = {
+ 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL,
+ };
+
+-#define e0(x) (RORu64(x,28) ^ RORu64(x,34) ^ RORu64(x,39))
+-#define e1(x) (RORu64(x,14) ^ RORu64(x,18) ^ RORu64(x,41))
+-#define s0(x) (RORu64(x, 1) ^ RORu64(x, 8) ^ (x >> 7))
+-#define s1(x) (RORu64(x,19) ^ RORu64(x,61) ^ (x >> 6))
++#define e0(x) (ror64(x,28) ^ ror64(x,34) ^ ror64(x,39))
++#define e1(x) (ror64(x,14) ^ ror64(x,18) ^ ror64(x,41))
++#define s0(x) (ror64(x, 1) ^ ror64(x, 8) ^ (x >> 7))
++#define s1(x) (ror64(x,19) ^ ror64(x,61) ^ (x >> 6))
+
+ static inline void LOAD_OP(int I, u64 *W, const u8 *input)
+ {
+--- a/include/linux/bitops.h
++++ b/include/linux/bitops.h
+@@ -46,6 +46,26 @@ static inline unsigned long hweight_long
+ }
+
+ /**
++ * rol64 - rotate a 64-bit value left
++ * @word: value to rotate
++ * @shift: bits to roll
++ */
++static inline __u64 rol64(__u64 word, unsigned int shift)
++{
++ return (word << shift) | (word >> (64 - shift));
++}
++
++/**
++ * ror64 - rotate a 64-bit value right
++ * @word: value to rotate
++ * @shift: bits to roll
++ */
++static inline __u64 ror64(__u64 word, unsigned int shift)
++{
++ return (word >> shift) | (word << (64 - shift));
++}
++
++/**
+ * rol32 - rotate a 32-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
diff --git a/queue-2.6.32/drm-radeon-kms-fix-msi-re-arm-on-rv370.patch b/queue-2.6.32/drm-radeon-kms-fix-msi-re-arm-on-rv370.patch
new file mode 100644
index 0000000..ca2dbaf
--- /dev/null
+++ b/queue-2.6.32/drm-radeon-kms-fix-msi-re-arm-on-rv370.patch
@@ -0,0 +1,50 @@
+From b7f5b7dec3d539a84734f2bcb7e53fbb1532a40b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 13 Feb 2012 16:36:34 -0500
+Subject: drm/radeon/kms: fix MSI re-arm on rv370+
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit b7f5b7dec3d539a84734f2bcb7e53fbb1532a40b upstream.
+
+MSI_REARM_EN register is a write only trigger register.
+There is no need RMW when re-arming.
+
+May fix:
+https://bugs.freedesktop.org/show_bug.cgi?id=41668
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/r100.c | 4 +---
+ drivers/gpu/drm/radeon/rs600.c | 4 +---
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/r100.c
++++ b/drivers/gpu/drm/radeon/r100.c
+@@ -218,9 +218,7 @@ int r100_irq_process(struct radeon_devic
+ WREG32(RADEON_AIC_CNTL, msi_rearm | RS400_MSI_REARM);
+ break;
+ default:
+- msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN;
+- WREG32(RADEON_MSI_REARM_EN, msi_rearm);
+- WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN);
++ WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN);
+ break;
+ }
+ }
+--- a/drivers/gpu/drm/radeon/rs600.c
++++ b/drivers/gpu/drm/radeon/rs600.c
+@@ -270,9 +270,7 @@ int rs600_irq_process(struct radeon_devi
+ WREG32(RADEON_BUS_CNTL, msi_rearm | RS600_MSI_REARM);
+ break;
+ default:
+- msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN;
+- WREG32(RADEON_MSI_REARM_EN, msi_rearm);
+- WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN);
++ WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN);
+ break;
+ }
+ }
diff --git a/queue-2.6.32/ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch b/queue-2.6.32/ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch
new file mode 100644
index 0000000..5c6e096
--- /dev/null
+++ b/queue-2.6.32/ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch
@@ -0,0 +1,38 @@
+From 323ef68faf1bbd9b1e66aea268fd09d358d7e8ab Mon Sep 17 00:00:00 2001
+From: Andy Whitcroft <apw@canonical.com>
+Date: Wed, 16 Feb 2011 04:49:59 +0000
+Subject: ecryptfs: read on a directory should return EISDIR if not supported
+
+From: Andy Whitcroft <apw@canonical.com>
+
+commit 323ef68faf1bbd9b1e66aea268fd09d358d7e8ab upstream.
+
+read() calls against a file descriptor connected to a directory are
+incorrectly returning EINVAL rather than EISDIR:
+
+ [EISDIR]
+ [XSI] [Option Start] The fildes argument refers to a directory and the
+ implementation does not allow the directory to be read using read()
+ or pread(). The readdir() function should be used instead. [Option End]
+
+This occurs because we do not have a .read operation defined for
+ecryptfs directories. Connect this up to generic_read_dir().
+
+BugLink: http://bugs.launchpad.net/bugs/719691
+Signed-off-by: Andy Whitcroft <apw@canonical.com>
+Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
+
+---
+ fs/ecryptfs/file.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/ecryptfs/file.c
++++ b/fs/ecryptfs/file.c
+@@ -323,6 +323,7 @@ ecryptfs_compat_ioctl(struct file *file,
+
+ const struct file_operations ecryptfs_dir_fops = {
+ .readdir = ecryptfs_readdir,
++ .read = generic_read_dir,
+ .unlocked_ioctl = ecryptfs_unlocked_ioctl,
+ #ifdef CONFIG_COMPAT
+ .compat_ioctl = ecryptfs_compat_ioctl,
diff --git a/queue-2.6.32/scsi-3w-9xxx-fix-bug-in-sgl-loading.patch b/queue-2.6.32/scsi-3w-9xxx-fix-bug-in-sgl-loading.patch
new file mode 100644
index 0000000..cef1052
--- /dev/null
+++ b/queue-2.6.32/scsi-3w-9xxx-fix-bug-in-sgl-loading.patch
@@ -0,0 +1,56 @@
+From 53ca353594a254e6bd45ccf2d405aa31bcbb7091 Mon Sep 17 00:00:00 2001
+From: adam radford <aradford@gmail.com>
+Date: Thu, 10 Dec 2009 11:53:31 -0800
+Subject: SCSI: 3w-9xxx fix bug in sgl loading
+
+From: adam radford <aradford@gmail.com>
+
+commit 53ca353594a254e6bd45ccf2d405aa31bcbb7091 upstream.
+
+This small patch fixes a bug in the 3w-9xxx driver where it would load
+an invalid sgl address in the ioctl path even if request length was zero.
+
+Signed-off-by: Adam Radford <aradford@gmail.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/3w-9xxx.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- a/drivers/scsi/3w-9xxx.c
++++ b/drivers/scsi/3w-9xxx.c
+@@ -76,6 +76,7 @@
+ Fix bug in twa_get_param() on 4GB+.
+ Use pci_resource_len() for ioremap().
+ 2.26.02.012 - Add power management support.
++ 2.26.02.013 - Fix bug in twa_load_sgl().
+ */
+
+ #include <linux/module.h>
+@@ -100,7 +101,7 @@
+ #include "3w-9xxx.h"
+
+ /* Globals */
+-#define TW_DRIVER_VERSION "2.26.02.012"
++#define TW_DRIVER_VERSION "2.26.02.013"
+ static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
+ static unsigned int twa_device_extension_count;
+ static int twa_major = -1;
+@@ -1378,10 +1379,12 @@ static void twa_load_sgl(TW_Device_Exten
+ newcommand = &full_command_packet->command.newcommand;
+ newcommand->request_id__lunl =
+ cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id));
+- newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
+- newcommand->sg_list[0].length = cpu_to_le32(length);
++ if (length) {
++ newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
++ newcommand->sg_list[0].length = cpu_to_le32(length);
++ }
+ newcommand->sgl_entries__lunh =
+- cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), 1));
++ cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), length ? 1 : 0));
+ } else {
+ oldcommand = &full_command_packet->command.oldcommand;
+ oldcommand->request_id = request_id;
diff --git a/queue-2.6.32/series b/queue-2.6.32/series
index b22c78f..26686e6 100644
--- a/queue-2.6.32/series
+++ b/queue-2.6.32/series
@@ -11,3 +11,7 @@ crypto-sha512-avoid-stack-bloat-on-i386.patch
ecryptfs-remove-mmap-from-directory-operations.patch
ban-ecryptfs-over-ecryptfs.patch
add-mount-option-to-check-uid-of-device-being-mounted-expect-uid-cve-2011-1833.patch
+crypto-sha512-use-standard-ror64.patch
+drm-radeon-kms-fix-msi-re-arm-on-rv370.patch
+ecryptfs-read-on-a-directory-should-return-eisdir-if-not-supported.patch
+scsi-3w-9xxx-fix-bug-in-sgl-loading.patch