DragonFly BSD
DragonFly commits List (threaded) for 2010-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: padlock - Properly align data


From: Alex Hornung <alexh@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 21 Aug 2010 06:28:47 -0700 (PDT)

commit a702ec91d1960a1d75cebedfe310096377682ff8
Author: Alex Hornung <ahornung@gmail.com>
Date:   Sat Aug 21 11:46:17 2010 +0100

    padlock - Properly align data
    
    * Most parameters to the xcrypt instruction need to be aligned to 16
      bytes. So far we haven't been aligning some of the data such as the
      key, iv and control structure. Refer to the "VIA PadLock Programming
      Guide" for more details.
    
    * Address this by allocating a bit more
      space and setting stuff up at 16-byte boundaries and ensuring gcc
      aligns the whole structure 16-bytish. While this wastes some memory,
      it is negligible.
    
    * This fixes the issue with encryption and decryption with padlock
      causing general protection faults.
    
    Reported-by: Jan Lentfer (lentferj@)

Summary of changes:
 sys/crypto/via/padlock.c |   14 +++++++++++---
 sys/crypto/via/padlock.h |    3 ++-
 2 files changed, 13 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a702ec91d1960a1d75cebedfe310096377682ff8


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]