1. 08 6月, 2016 3 次提交
  2. 25 4月, 2016 1 次提交
  3. 20 4月, 2016 2 次提交
    • H
      crypto: talitos - fix AEAD tcrypt tests · 340ff60a
      Horia Geant? 提交于
      After conversion to new AEAD interface, tcrypt tests fail as follows:
      
      [...]
      [    1.145414] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-aes-talitos
      [    1.153564] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67
      [    1.160041] 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [    1.166509] 00000020: 00 00 00 00
      [...]
      
      Fix them by providing the correct cipher in & cipher out pointers,
      i.e. must skip over associated data in src and dst S/G.
      
      While here, fix a problem with the HW S/G table index usage:
      tbl_off must be updated after the pointer to the table entries is set.
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Fixes: aeb4c132 ("crypto: talitos - Convert to new AEAD interface")
      Reported-by: NJonas Eymann <J.Eymann@gmx.net>
      Signed-off-by: NHoria Geant? <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      340ff60a
    • J
      crypto: talitos - fix crash in talitos_cra_init() · 89d124cb
      Jonas Eymann 提交于
      Conversion of talitos driver to the new AEAD interface
      hasn't been properly tested.
      
      AEAD algorithms crash in talitos_cra_init as follows:
      
      [...]
      [    1.141095] talitos ffe30000.crypto: hwrng
      [    1.145381] Unable to handle kernel paging request for data at address 0x00000058
      [    1.152913] Faulting instruction address: 0xc02accc0
      [    1.157910] Oops: Kernel access of bad area, sig: 11 [#1]
      [    1.163315] SMP NR_CPUS=2 P1020 RDB
      [    1.166810] Modules linked in:
      [    1.169875] CPU: 0 PID: 1007 Comm: cryptomgr_test Not tainted 4.4.6 #1
      [    1.176415] task: db5ec200 ti: db4d6000 task.ti: db4d6000
      [    1.181821] NIP: c02accc0 LR: c02acd18 CTR: c02acd04
      [    1.186793] REGS: db4d7d30 TRAP: 0300   Not tainted  (4.4.6)
      [    1.192457] MSR: 00029000 <CE,EE,ME>  CR: 95009359  XER: e0000000
      [    1.198585] DEAR: 00000058 ESR: 00000000
      GPR00: c017bdc0 db4d7de0 db5ec200 df424b48 00000000 00000000 df424bfc db75a600
      GPR08: df424b48 00000000 db75a628 db4d6000 00000149 00000000 c0044cac db5acda0
      GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 df424940
      GPR24: df424900 00003083 00000400 c0180000 db75a640 c03e9f84 df424b40 df424b48
      [    1.230978] NIP [c02accc0] talitos_cra_init+0x28/0x6c
      [    1.236039] LR [c02acd18] talitos_cra_init_aead+0x14/0x28
      [    1.241443] Call Trace:
      [    1.243894] [db4d7de0] [c03e9f84] 0xc03e9f84 (unreliable)
      [    1.249322] [db4d7df0] [c017bdc0] crypto_create_tfm+0x5c/0xf0
      [    1.255083] [db4d7e10] [c017beec] crypto_alloc_tfm+0x98/0xf8
      [    1.260769] [db4d7e40] [c0186a20] alg_test_aead+0x28/0xc8
      [    1.266181] [db4d7e60] [c0186718] alg_test+0x260/0x2e0
      [    1.271333] [db4d7ee0] [c0183860] cryptomgr_test+0x30/0x54
      [    1.276843] [db4d7ef0] [c0044d80] kthread+0xd4/0xd8
      [    1.281741] [db4d7f40] [c000e4a4] ret_from_kernel_thread+0x5c/0x64
      [    1.287930] Instruction dump:
      [    1.290902] 38600000 4e800020 81230028 7c681b78 81490010 38e9ffc0 3929ffe8 554a073e
      [    1.298691] 2b8a000a 7d474f9e 812a0008 91230030 <80e90058> 39270060 7c0004ac 7cc04828
      
      Cc: <stable@vger.kernel.org> # 4.3+
      Fixes: aeb4c132 ("crypto: talitos - Convert to new AEAD interface")
      Signed-off-by: NJonas Eymann <J.Eymann@gmx.net>
      
      Fix typo - replaced parameter of __crypto_ahash_alg(): s/tfm/alg
      Remove checkpatch warnings.
      Add commit message.
      Signed-off-by: NHoria Geant? <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      89d124cb
  4. 04 12月, 2015 1 次提交
  5. 17 11月, 2015 1 次提交
  6. 16 11月, 2015 1 次提交
  7. 01 10月, 2015 1 次提交
  8. 17 8月, 2015 2 次提交
  9. 10 8月, 2015 1 次提交
    • A
      crypto: talitos - Prevent panic in probe error path · 35a3bb3d
      Aaron Sierra 提交于
      The probe error path for this driver, for all intents and purposes,
      is the talitos_remove() function due to the common "goto err_out".
      
      Without this patch applied, talitos_remove() will panic under these
      two conditions:
      
      1. If the RNG device hasn't been registered via
         talitos_register_rng() prior to entry into talitos_remove(),
         then the attempt to unregister the RNG "device" will cause a panic.
      
      2. If the priv->chan array has not been allocated prior to entry
         into talitos_remove(), then the per-channel FIFO cleanup will panic
         because of the dereference of that NULL "array".
      
      Both of the above scenarios occur if talitos_probe_irq() fails.
      
      This patch resolves issue #1 by introducing a boolean to mask the
      hwrng_unregister() call in talitos_unregister_rng() if RNG device
      registration was unsuccessful.
      
      It resolves issue #2 by checking that priv->chan is not NULL in the
      per-channel FIFO cleanup for loop.
      Signed-off-by: NAaron Sierra <asierra@xes-inc.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      35a3bb3d
  10. 04 8月, 2015 1 次提交
  11. 13 5月, 2015 6 次提交
  12. 21 4月, 2015 14 次提交
  13. 06 3月, 2015 2 次提交
  14. 26 1月, 2015 1 次提交
  15. 20 10月, 2014 1 次提交
  16. 09 2月, 2014 1 次提交
    • K
      crypto: talitos: init the priv->alg_list more earlier in talitos_probe() · f3de9cb1
      Kevin Hao 提交于
      In function talitos_probe(), it will jump to err_out when getting an
      error in talitos_probe_irq(). Then the uninitialized list head
      priv->alg_list will be used in function talitos_remove(). In this case
      we would get a call trace like the following. So move up the
      initialization of priv->alg_list.
      
        Unable to handle kernel paging request for data at address 0x00000000
        Faulting instruction address: 0xc0459ff4
        Oops: Kernel access of bad area, sig: 11 [#1]
        SMP NR_CPUS=8 P1020 RDB
        Modules linked in:
        CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W    3.13.0-08789-g54c0a4b4 #33
        task: cf050000 ti: cf04c000 task.ti: cf04c000
        NIP: c0459ff4 LR: c0459fd4 CTR: c02f2438
        REGS: cf04dcb0 TRAP: 0300   Tainted: G        W     (3.13.0-08789-g54c0a4b4)
        MSR: 00029000 <CE,EE,ME>  CR: 82000028  XER: 20000000
        DEAR: 00000000 ESR: 00000000
        GPR00: c045ac28 cf04dd60 cf050000 cf2579c0 00021000 00000000 c02f35b0 0000014e
        GPR08: c07e702c cf104300 c07e702c 0000014e 22000024 00000000 c0002a3c 00000000
        GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 c082e4e0 000000df
        GPR24: 00000000 00100100 00200200 cf257a2c cf0efe10 cf2579c0 cf0efe10 00000000
        NIP [c0459ff4] talitos_remove+0x3c/0x1c8
        LR [c0459fd4] talitos_remove+0x1c/0x1c8
        Call Trace:
        [cf04dd60] [c07485d8] __func__.13331+0x1241c8/0x1391c0 (unreliable)
        [cf04dd90] [c045ac28] talitos_probe+0x244/0x998
        [cf04dde0] [c0306a74] platform_drv_probe+0x28/0x68
        [cf04ddf0] [c0304d38] really_probe+0x78/0x250
        [cf04de10] [c030505c] __driver_attach+0xc8/0xcc
        [cf04de30] [c0302e98] bus_for_each_dev+0x6c/0xb8
        [cf04de60] [c03043cc] bus_add_driver+0x168/0x220
        [cf04de80] [c0305798] driver_register+0x88/0x130
        [cf04de90] [c0002458] do_one_initcall+0x14c/0x198
        [cf04df00] [c079f904] kernel_init_freeable+0x138/0x1d4
        [cf04df30] [c0002a50] kernel_init+0x14/0x124
        [cf04df40] [c000ec40] ret_from_kernel_thread+0x5c/0x64
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      f3de9cb1
  17. 30 12月, 2013 1 次提交