25 May, 2018

1 commit

  • [ Upstream commit 7c73cf4cc2ac16465f5102437dc0a12d66671bd6 ]

    The MODULE_ALIAS is required to enable the sun4i-ss driver to load
    automatically when built at a module. Tested on a Cubietruck.

    Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
    Signed-off-by: Peter Robinson
    Signed-off-by: Herbert Xu
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Peter Robinson
     

22 Feb, 2018

2 commits

  • commit 2e7d1d61ea6c0f1c4da5eb82cafac750d55637a7 upstream.

    Lockdep detects a possible deadlock in sun4i_ss_prng_generate() and
    throws an "inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage" warning.
    Disabling softirqs to fix this.

    Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG")
    Signed-off-by: Artem Savkov
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    Artem Savkov
     
  • commit dd78c832ffaf86eb6434e56de4bc3bc31f03f771 upstream.

    According to crypto/rng.h generate function should return 0 on success
    and < 0 on error.

    Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG")
    Signed-off-by: Artem Savkov
    Acked-by: Corentin Labbe
    Signed-off-by: Herbert Xu
    Signed-off-by: Greg Kroah-Hartman

    Artem Savkov
     

18 Jul, 2017

1 commit


19 Jun, 2017

11 commits


22 Sep, 2016

1 commit

  • We get 1 warning when building kernel with W=1:
    drivers/crypto/sunxi-ss/sun4i-ss-hash.c:168:5: warning: no previous prototype for 'sun4i_hash' [-Wmissing-prototypes]

    In fact, this function is only used in the file in which it is
    declared and don't need a declaration, but can be made static.
    So this patch marks it 'static'.

    Signed-off-by: Baoyou Xie
    Signed-off-by: Herbert Xu

    Baoyou Xie
     

24 Aug, 2016

1 commit


16 Aug, 2016

6 commits


05 Apr, 2016

1 commit

  • The current sun4i-ss driver could generate data corruption when ciphering/deciphering.
    It occurs randomly on end of handled data.
    No root cause have been found and the only way to remove it is to replace
    all spin_lock_bh by their irq counterparts.

    Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
    Signed-off-by: LABBE Corentin
    Cc: stable
    Signed-off-by: Herbert Xu

    Corentin LABBE
     

27 Jan, 2016

1 commit

  • gcc correctly warns that the printk output contains a variable that
    it thinks is not initialized in some cases:

    drivers/crypto/sunxi-ss/sun4i-ss-cipher.c: In function 'sun4i_ss_cipher_poll':
    drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:254:76: warning: 'todo' may be used uninitialized in this function [-Wmaybe-uninitialized]
    drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:144:15: note: 'todo' was declared here

    A closer look at the function reveals that the variable is always
    initialized at this point (ileft is guaranteed to be positive at the
    start), but its contents are not well-defined:
    Depending on some other variables, it might be either a count in
    words or bytes, and it could refer to either input or output.

    The easiest solution apparently is to remove the confusing output
    and let the reader figure out the state from the other variables.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Herbert Xu

    Arnd Bergmann
     

17 Nov, 2015

1 commit

  • sun4i-ss implementaton of md5/sha1 is via ahash algorithms.
    Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
    made impossible to load them without giving statesize. This patch
    specifiy statesize for sha1 and md5.

    Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
    Cc: # v4.3+
    Tested-by: Chen-Yu Tsai
    Signed-off-by: LABBE Corentin
    Signed-off-by: Herbert Xu

    LABBE Corentin
     

10 Sep, 2015

1 commit


13 Aug, 2015

1 commit


20 Jul, 2015

1 commit