1. 25 Dec, 2008 6 commits
    • Harvey Harrison's avatar
      crypto: camellia - use kernel-provided bitops, unaligned access · 32bd78e0
      Harvey Harrison authored
      Remove the private implementation of 32-bit rotation and unaligned
      access with byteswapping.
      
      As a bonus, fixes sparse warnings:
      crypto/camellia.c:602:2: warning: cast to restricted __be32
      crypto/camellia.c:603:2: warning: cast to restricted __be32
      crypto/camellia.c:604:2: warning: cast to restricted __be32
      crypto/camellia.c:605:2: warning: cast to restricted __be32
      crypto/camellia.c:710:2: warning: cast to restricted __be32
      crypto/camellia.c:711:2: warning: cast to restricted __be32
      crypto/camellia.c:712:2: warning: cast to restricted __be32
      crypto/camellia.c:713:2: warning: cast to restricted __be32
      crypto/camellia.c:714:2: warning: cast to restricted __be32
      crypto/camellia.c:715:2: warning: cast to restricted __be32
      crypto/camellia.c:716:2: warning: cast to restricted __be32
      crypto/camellia.c:717:2: warning: cast to restricted __be32
      
      [Thanks to Tomoyuki Okazaki for spotting the typo]
      Tested-by: default avatarCarlo E. Prelz <fluido@fluido.as>
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      32bd78e0
    • Neil Horman's avatar
      crypto: testmgr - Trigger a panic when self test fails in FIPS mode · d12d6b6d
      Neil Horman authored
      The FIPS specification requires that should self test for any supported
      crypto algorithm fail during operation in fips mode, we need to prevent
      the use of any crypto functionality until such time as the system can
      be re-initialized.  Seems like the best way to handle that would be
      to panic the system if we were in fips mode and failed a self test.
      This patch implements that functionality.  I've built and run it
      successfully.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      d12d6b6d
    • Kim Phillips's avatar
      crypto: talitos - Perform auth check in h/w if on sec 2.1 and above · fe5720e2
      Kim Phillips authored
      SEC version 2.1 and above adds the capability to do the IPSec ICV
      memcmp in h/w. Results of the cmp are written back in the descriptor
      header, along with the done status.  A new callback is added that
      checks these ICCR bits instead of performing the memcmp on the core,
      and is enabled by h/w capability.
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
      
      After testing on different parts, another condition was added
      before using h/w auth check because different
      SEC revisions require different handling.
      
      The SEC 3.0 allows a more flexible link table where
      the auth data can span separate link table entries.
      The SEC 2.4/2.1 does not support this case.
      So a test was added in the decrypt routine
      for a fragmented case; the h/w auth check is disallowed for
      revisions not having the extent in the link table;
      in this case the hw auth check is done by software.
      
      A portion of a previous change for SEC 3.0 link table handling
      was removed since it became dead code with the hw auth check supported.
      
      This seems to be the best compromise for using hw auth check
      on supporting SEC revisions; it keeps the link table logic
      simpler for the fragmented cases.
      Signed-off-by: default avatarLee Nipper <lee.nipper@freescale.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      fe5720e2
    • Lee Nipper's avatar
      crypto: talitos - Implement done interrupt mitigation · 1c2e8811
      Lee Nipper authored
      In talitos_interrupt, upon one done interrupt, mask further done interrupts,
      and ack only any error interrupt.
      In talitos_done, unmask done interrupts after completing processing.
      In flush_channel, ack each done channel processed.
      Keep done overflow interrupts masked because even though each pkt
      is ack'ed, a few done overflows still occur.
      Signed-off-by: default avatarLee Nipper <lee.nipper@freescale.com>
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      1c2e8811
    • Kim Phillips's avatar
      crypto: talitos - Pass correct interrupt status to error handler · 40405f10
      Kim Phillips authored
      Since we ack early, the re-read interrupt status in talitos_error
      may be already updated with a new value.  Pass the error ISR value
      directly in order to report and handle the error based on the correct
      error status.
      
      Also remove unused error tasklet.
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: default avatarLee Nipper <lee.nipper@freescale.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      40405f10
    • Evgeniy Polyakov's avatar
      crypto: hifn - Disable driver when physical size exceeds 32 bits · a44b56cc
      Evgeniy Polyakov authored
      On Tue, Sep 23, 2008 at 08:06:32PM +0200, Dimitri Puzin (max@psycast.de) wrote:
      > With this patch applied it still doesn't work as expected. The overflow
      > messages are gone however syslog shows
      > [  120.924266] hifn0: abort: c: 0, s: 1, d: 0, r: 0.
      > when doing cryptsetup luksFormat as in original e-mail. At this point
      > cryptsetup hangs and can't be killed with -SIGKILL. I've attached
      > SysRq-t dump of this condition.
      
      Yes, I was wrong with the patch: HIFN does not support 64-bit addresses
      afaics.
      
      Attached patch should not allow HIFN to be registered on 64-bit arch, so
      crypto layer will fallback to the software algorithms.
      Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      a44b56cc
  2. 24 Dec, 2008 8 commits
  3. 23 Dec, 2008 7 commits
  4. 22 Dec, 2008 7 commits
  5. 20 Dec, 2008 4 commits
  6. 19 Dec, 2008 8 commits