summaryrefslogtreecommitdiff
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-01 23:46:35 (GMT)
committerDavid S. Miller <davem@davemloft.net>2009-12-01 23:46:35 (GMT)
commit7e8f44f8d4fa9bb35e32c161fbcdbd6b9e6400e3 (patch)
treecf6d526a070a06b365ab0ceb4e1c3ca9ad94666e /drivers/crypto/padlock-aes.c
parent138f3c8518976953563a1316d7e0420c72d4ab96 (diff)
parent2127816366e0ffbc1426fa69e7b9b2bebd2e2288 (diff)
downloadlinux-fsl-qoriq-7e8f44f8d4fa9bb35e32c161fbcdbd6b9e6400e3.tar.xz
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c4
1 files changed, 2 insertions, 2 deletions
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);