rpms/kernel/devel crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch, NONE, 1.1 kernel.spec, 1.1843, 1.1844
Chuck Ebbert
cebbert at fedoraproject.org
Sun Nov 15 13:58:35 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15039
Modified Files:
kernel.spec
Added Files:
crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch
Log Message:
Fix oops in VIA Padlock driver.
crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch:
padlock-aes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch ---
From: Chuck Ebbert <cebbert at redhat.com>
Date: Tue, 3 Nov 2009 15:32:03 +0000 (-0500)
Subject: crypto: padlock-aes - Use the correct mask when checking whether copying is required
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fherbert%2Fcrypto-2.6.git;a=commitdiff_plain;h=e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea
crypto: padlock-aes - Use the correct mask when checking whether copying is required
Masking with PAGE_SIZE is just wrong...
Signed-off-by: Chuck Ebbert <cebbert at redhat.com>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
---
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index a9952b1..84c51e1 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -236,7 +236,7 @@ static inline void ecb_crypt(const u8 *in, u8 *out, u32 *key,
/* Padlock in ECB mode fetches at least ecb_fetch_bytes of data.
* We could avoid some copying here but it's probably not worth it.
*/
- if (unlikely(((unsigned long)in & PAGE_SIZE) + ecb_fetch_bytes > PAGE_SIZE)) {
+ if (unlikely(((unsigned long)in & ~PAGE_MASK) + ecb_fetch_bytes > PAGE_SIZE)) {
ecb_crypt_copy(in, out, key, cword, count);
return;
}
@@ -248,7 +248,7 @@ static inline u8 *cbc_crypt(const u8 *in, u8 *out, u32 *key,
u8 *iv, struct cword *cword, int count)
{
/* Padlock in CBC mode fetches at least cbc_fetch_bytes of data. */
- if (unlikely(((unsigned long)in & PAGE_SIZE) + cbc_fetch_bytes > PAGE_SIZE))
+ if (unlikely(((unsigned long)in & ~PAGE_MASK) + cbc_fetch_bytes > PAGE_SIZE))
return cbc_crypt_copy(in, out, key, iv, cword, count);
return rep_xcrypt_cbc(in, out, key, iv, cword, count);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1843
retrieving revision 1.1844
diff -u -p -r1.1843 -r1.1844
--- kernel.spec 15 Nov 2009 05:09:18 -0000 1.1843
+++ kernel.spec 15 Nov 2009 13:58:34 -0000 1.1844
@@ -720,6 +720,9 @@ Patch12010: linux-2.6-dell-laptop-rfkill
Patch12011: linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
Patch12013: linux-2.6-rfkill-all.patch
+# Fix oops in VIA Padlock driver.
+Patch12020: crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1326,6 +1329,9 @@ ApplyPatch linux-2.6-silence-acpi-blackl
# Patches headed upstream
ApplyPatch linux-2.6-rfkill-all.patch
+# Fix oops in VIA Padlock driver.
+ApplyPatch crypto-2.6.git-e8edb3cbd7dd8acf6c748a02d06ec1d82c4124ea.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1983,6 +1989,9 @@ fi
%changelog
* Sun Nov 15 2009 Chuck Ebbert <cebbert at redhat.com>
+- Fix oops in VIA Padlock driver.
+
+* Sun Nov 15 2009 Chuck Ebbert <cebbert at redhat.com>
- Linux 2.6.32-rc7-git1
* Fri Nov 13 2009 Chuck Ebbert <cebbert at redhat.com>
More information about the scm-commits
mailing list