21 May, 2014

1 commit

  • Although the existing hash walk interface has already been used
    by a number of ahash crypto drivers, it turns out that none of
    them were really asynchronous. They were all essentially polling
    for completion.

    That's why nobody has noticed until now that the walk interface
    couldn't work with a real asynchronous driver since the memory
    is mapped using kmap_atomic.

    As we now have a use-case for a real ahash implementation on x86,
    this patch creates a minimal ahash walk interface. Basically it
    just calls kmap instead of kmap_atomic and does away with the
    crypto_yield call. Real ahash crypto drivers don't need to yield
    since by definition they won't be hogging the CPU.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

13 May, 2014

3 commits

  • This patch moves data allocated using kzalloc to managed data allocated
    using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
    functions. The NULL assignment to np->units is removed as there is no
    interaction between this field and sun4v_hvapi_unregister. Also, the
    labels out_free_units and out_free are removed as they are no longer
    required.

    The following Coccinelle semantic patch was used for making the change:

    @platform@
    identifier p, probefn, removefn;
    @@
    struct platform_driver p = {
    .probe = probefn,
    .remove = removefn,
    };

    @prb@
    identifier platform.probefn, pdev;
    expression e, e1, e2;
    @@
    probefn(struct platform_device *pdev, ...) {
    dev, e1, e2)
    ...
    ?-kfree(e);
    ...+>
    }

    @rem depends on prb@
    identifier platform.removefn;
    expression e;
    @@
    removefn(...) {

    }

    Signed-off-by: Himangi Saraogi
    Signed-off-by: Herbert Xu

    Himangi Saraogi
     
  • Re-initialize keys_fit_inline to avoid using its stale encrypt() shared
    descriptor value prior to building descriptors for the decrypt() and
    givencrypt() cases.

    Signed-off-by: Vakul Garg
    [reworded commit text, enhanced code readability]
    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Vakul Garg
     
  • As we are preparing to enable multiplatform support on EXYNOS,
    we can no longer include mach/*.h or plat/*.h headers from device
    drivers.

    The s5p-sss driver was just enabled for EXYNOS when it used to
    be used only on s5pv210, and it includes two samsung platform
    specific header files for historic reasons. Fortunately, it no
    longer actually needs them, so we can remove the #includes and
    avoid the problem

    Signed-off-by: Arnd Bergmann
    Cc: Naveen Krishna Chatradhi
    Cc: Tomasz Figa
    Cc:
    Cc: Vladimir Zapolskiy
    Reviewed-by: Jingoo Han
    Signed-off-by: Herbert Xu

    Arnd Bergmann
     

08 May, 2014

21 commits

  • The site-specific OOM messages are unnecessary, because they
    duplicate the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Signed-off-by: Herbert Xu

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they
    duplicate the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Signed-off-by: Herbert Xu

    Jingoo Han
     
  • Currently, the driver enqueues a request only if the busy bit is
    false. And every request initiates a dequeue. If 2 requests arrive
    simultaneously, only one of them will be dequeued.

    To avoid this senario, we will enqueue the next request irrespective
    of the system condition (that is what queue is here for). Also
    schedule at a tasklet immediatly after the current request is done.
    The tasklet will dequeue the next request in the queue, giving
    continuous loop. tasklet will exit if there are no requests in the
    queue.

    Signed-off-by: Naveen Krishna Chatradhi
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch set adds use of clk_prepare/clk_unprepare as
    required by generic clock framework.

    Signed-off-by: Naveen Krishna Chatradhi
    Reviewed-by: Tomasz Figa
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch adds code to validate "iv" buffer before trying to
    memcpy the contents

    Signed-off-by: Naveen Krishna Chatradhi
    Reviewed-by: Tomasz Figa
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch modifies Kconfig such that ARCH_EXYNOS SoCs
    which includes (Exynos4210, Exynos5250 and Exynos5420)
    can also select Samsung SSS(Security SubSystem) driver.

    Signed-off-by: Naveen Krishna Chatradhi
    Reviewed-by: Tomasz Figa
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch adds new compatible and variant struct to support the SSS
    module on Exynos4 (Exynos4210), Exynos5 (Exynos5420 and Exynos5250)
    for which
    1. AES register are at an offset of 0x200 and
    2. hash interrupt is not available

    Signed-off-by: Naveen Krishna Chatradhi
    Reviewed-by: Tomasz Figa
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch adds device tree support to the s5p-sss.c crypto driver.

    Signed-off-by: Naveen Krishna Chatradhi
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • This patch uses the platform_get_irq() instead of the
    platform_get_irq_byname(). Making feeder control interrupt
    as resource "0" and hash interrupt as "1".

    reasons for this change.
    1. Cannot find any Arch which is currently using this driver
    2. Samsung Exynos4 and 5 SoCs only use the feeder control interrupt
    3. Patches adding support for DT and H/W version are in pipeline

    Signed-off-by: Naveen Krishna Chatradhi
    Reviewed-by: Tomasz Figa
    CC: David S. Miller
    CC:
    Acked-by: Vladimir Zapolskiy
    Signed-off-by: Herbert Xu

    Naveen Krishna Chatradhi
     
  • CRYPTO_USER requires CAP_NET_ADMIN for all operations. Most information
    provided by CRYPTO_MSG_GETALG is also accessible through /proc/modules
    and AF_ALG. CRYPTO_MSG_GETALG should not require CAP_NET_ADMIN so that
    processes without CAP_NET_ADMIN can use CRYPTO_MSG_GETALG to get cipher
    details, such as cipher priorities, for AF_ALG.

    Signed-off-by: Matthias-Christian Ott
    Signed-off-by: Herbert Xu

    Matthias-Christian Ott
     
  • Fix the checkpatch warnings that the strings were split across
    multiple lines. Checkpatch now complains about lines over 80,
    but this is better, since we can actually grep the source code
    for these strings now.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Clean up the remnants from the rework. Constify function arguments.

    Note that checkpatch again complains about this space before newline,
    but this is the original code behavior, so I'm keeping it.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • This macro is just like an encyclopedia of string handling done wrong.
    This must die. This is so wrong on so many levels.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Clean this function up and rework it into sensible shape. This function
    now contains one single dev_err() instead of the previous insanity full
    of memory allocation, chaotic string handling and use of SPRINTFCAT().

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Clean this function up and rework it into sensible shape. This function
    now contains one single dev_err() instead of the previous insanity full
    of memory allocation, possible stack overwriting, chaotic string handling
    and use of SPRINTFCAT().

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Just dissolve this function so it's not in the way of applying
    further white magic cleanup down the line.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Fix the functions which can be obviously done right with a simple
    dev_err() now. While at it, further press the on-stack allocation
    of buffer for sprintf() voodoo down into the abominated functions.

    This patch cleans up most of the functions and leaves just two
    remaining functions, report_ccb_status() and report_deco_status()
    ugly and unhappy.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Pass the error type string into the functions, so they can handle
    the printing of the string. This is now still using the very unsafe
    sprintf(), but we will fix that.

    While at this, pass the device pointer too, so we can dev_err()
    functions readily when we start fixing this proper.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Implement fast-path error code printout for errors with no associated
    handler function. This reduces calls to this kmalloc() nonsense in
    SPRINTFCAT() already.

    Note that the format of output is compatible with the old code, even
    if -- exposed like this -- it looks a bit weird. Checkpatch complains
    on this one as well.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • Pull the error code error string mapping tables out of the function
    so the code becomes readable. This lets me see the real flesh of the
    functions, without all that flab clouding the view.

    Note: There is a checkpatch issue with quoted strings across multiple
    lines. I will fix that in a subsequent patch to keep the changes
    small and separate.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     
  • The tentacles of this function were firmly attached to various
    places in the CAAM code. Just cut them, or this cthulhu function
    will sprout them anew.

    Signed-off-by: Marek Vasut
    Cc: Herbert Xu
    Cc: Horia Geanta
    Signed-off-by: Herbert Xu

    Marek Vasut
     

28 Apr, 2014

6 commits


16 Apr, 2014

9 commits