All pastes #761299 Raw Edit

Someone

public text v1 · immutable
·published 2007-11-04 19:37 UTC
rendered paste body
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 942b2dc..ca6ae6a 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -48,6 +48,16 @@ do_crypt(void *src, void *dst, int len, u32 flags)
 {
        u32 status;
        u32 counter = AES_OP_TIMEOUT;
+       unsigned long v_src, v_dst;
+       int ret;
+       u8 tmp[16];
+
+       memcpy(tmp, dst, 16);
+       v_src = virt_to_phys(src);
+       v_dst = virt_to_phys(dst);
+       printk("SRC: %p / %08lx | DST: %p, %08lx | %d %s\n",
+                       src, v_src, dst, v_dst, len,
+                       src == dst ? "*" : "");
 
        iowrite32(virt_to_phys(src), _iobase + AES_SOURCEA_REG);
        iowrite32(virt_to_phys(dst), _iobase + AES_DSTA_REG);
@@ -63,6 +73,10 @@ do_crypt(void *src, void *dst, int len, u32 flags)
 
        /* Clear the event */
        iowrite32((status & 0xFF) | AES_INTRA_PENDING, _iobase + AES_INTR_REG);
+       ret = memcmp(tmp, dst, 16);
+       if (ret)
+               printk("Memory untouched\n");
+