1. 06 11月, 2014 14 次提交
  2. 24 10月, 2014 6 次提交
  3. 14 10月, 2014 5 次提交
  4. 08 10月, 2014 1 次提交
  5. 24 9月, 2014 3 次提交
  6. 18 9月, 2014 1 次提交
  7. 15 9月, 2014 1 次提交
  8. 01 9月, 2014 1 次提交
  9. 29 8月, 2014 2 次提交
  10. 25 8月, 2014 6 次提交
    • C
      crypto: caam - fix addressing of struct member · 4451d494
      Cristian Stoica 提交于
      buf_0 and buf_1 in caam_hash_state are not next to each other.
      Accessing buf_1 is incorrect from &buf_0 with an offset of only
      size_of(buf_0). The same issue is also with buflen_0 and buflen_1
      
      Cc: <stable@vger.kernel.org> # 3.13+
      Signed-off-by: NCristian Stoica <cristian.stoica@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4451d494
    • C
      crypto: caam - remove duplicated sg copy functions · 307fd543
      Cristian Stoica 提交于
      Replace equivalent (and partially incorrect) scatter-gather functions
      with ones from crypto-API.
      
      The replacement is motivated by page-faults in sg_copy_part triggered
      by successive calls to crypto_hash_update. The following fault appears
      after calling crypto_ahash_update twice, first with 13 and then
      with 285 bytes:
      
      Unable to handle kernel paging request for data at address 0x00000008
      Faulting instruction address: 0xf9bf9a8c
      Oops: Kernel access of bad area, sig: 11 [#1]
      SMP NR_CPUS=8 CoreNet Generic
      Modules linked in: tcrypt(+) caamhash caam_jr caam tls
      CPU: 6 PID: 1497 Comm: cryptomgr_test Not tainted
      3.12.19-rt30-QorIQ-SDK-V1.6+g9fda9f2 #75
      task: e9308530 ti: e700e000 task.ti: e700e000
      NIP: f9bf9a8c LR: f9bfcf28 CTR: c0019ea0
      REGS: e700fb80 TRAP: 0300   Not tainted
      (3.12.19-rt30-QorIQ-SDK-V1.6+g9fda9f2)
      MSR: 00029002 <CE,EE,ME>  CR: 44f92024  XER: 20000000
      DEAR: 00000008, ESR: 00000000
      
      GPR00: f9bfcf28 e700fc30 e9308530 e70b1e55 00000000 ffffffdd e70b1e54 0bebf888
      GPR08: 902c7ef5 c0e771e2 00000002 00000888 c0019ea0 00000000 00000000 c07a4154
      GPR16: c08d0000 e91a8f9c 00000001 e98fb400 00000100 e9c83028 e70b1e08 e70b1d48
      GPR24: e992ce10 e70b1dc8 f9bfe4f4 e70b1e55 ffffffdd e70b1ce0 00000000 00000000
      NIP [f9bf9a8c] sg_copy+0x1c/0x100 [caamhash]
      LR [f9bfcf28] ahash_update_no_ctx+0x628/0x660 [caamhash]
      Call Trace:
      [e700fc30] [f9bf9c50] sg_copy_part+0xe0/0x160 [caamhash] (unreliable)
      [e700fc50] [f9bfcf28] ahash_update_no_ctx+0x628/0x660 [caamhash]
      [e700fcb0] [f954e19c] crypto_tls_genicv+0x13c/0x300 [tls]
      [e700fd10] [f954e65c] crypto_tls_encrypt+0x5c/0x260 [tls]
      [e700fd40] [c02250ec] __test_aead.constprop.9+0x2bc/0xb70
      [e700fe40] [c02259f0] alg_test_aead+0x50/0xc0
      [e700fe60] [c02241e4] alg_test+0x114/0x2e0
      [e700fee0] [c022276c] cryptomgr_test+0x4c/0x60
      [e700fef0] [c004f658] kthread+0x98/0xa0
      [e700ff40] [c000fd04] ret_from_kernel_thread+0x5c/0x64
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      307fd543
    • W
      crypto: qat - Fix return value check in adf_chr_drv_create() · 65fafbe9
      Wei Yongjun 提交于
      In case of error, the function device_create() returns ERR_PTR()
      and never returns NULL. The NULL test in the return value check
      should be replaced with IS_ERR().
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      65fafbe9
    • A
      crypto: caam - enable raw data instead of von Neumann data · e5ffbfc1
      Alex Porosanu 提交于
      The sampling of the oscillator can be done in multiple modes for
      generating the entropy value. By default, this is set to von
      Neumann. This patch changes the sampling to raw data, since it
      has been discovered that the generated entropy has a better
      'quality'.
      Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e5ffbfc1
    • A
      crypto: caam - change starting entropy delay value · eeaa1724
      Alex Porosanu 提交于
      The entropy delay (the length in system clocks of each
      entropy sample) for the RNG4 block of CAAM is dependent
      on the frequency of the SoC. By elaborate methods, it
      has been determined that a good starting value for all
      platforms integrating the CAAM IP is 3200. Using a
      higher value has additional benefit of  speeding up
      the process of instantiating the RNG, since the entropy
      delay will be increased and instantiation of the RNG
      state handles will be reattempted by the driver. If the
      starting value is low, for certain platforms, this can
      lead to a quite lengthy process.
      This patch changes the starting value of the length of
      the entropy sample to 3200 system clocks.
      In addition to this change, the attempted entropy delay
      values are now printed on the console upon initialization
      of the RNG block.
      While here, a safeguard for yielding the processor was
      added for ensuring that in very adverse cases,
      the CPU isn't hogged by the instantiation loop.
      Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      eeaa1724
    • A
      crypto: caam - disable RNG oscillator maximum frequency check · b061f3fe
      Alex Porosanu 提交于
      The rtfrqmax & rtfrqmin set the bounds of the expected frequency of the
      oscillator, when SEC runs at its maximum frequency. For certain platforms
      (f.i. T2080), the oscillator is very fast and thus if the SEC runs at
      a lower than normal frequency, the ring oscillator is incorrectly detected
      as being out of bounds.
      
      This patch effectively disables the maximum frequency check, by setting a
      high enough maximum allowable frequency for the oscillator. The reasoning
      behind this is that usually a broken oscillator will run too slow
      (i.e. not run at all) rather than run too fast.
      Signed-off-by: NAlex Porosanu <alexandru.porosanu@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      b061f3fe