04 Sep, 2020

1 commit


28 Aug, 2020

1 commit

  • pm_runtime_get_sync() increments the runtime PM usage counter
    even when it returns an error code. However, users of cc_pm_get(),
    a direct wrapper of pm_runtime_get_sync(), assume that PM usage
    counter will not change on error. Thus a pairing decrement is needed
    on the error handling path to keep the counter balanced.

    Fixes: 8c7849a30255c ("crypto: ccree - simplify Runtime PM handling")
    Signed-off-by: Dinghao Liu
    Signed-off-by: Herbert Xu

    dinghao.liu@zju.edu.cn
     

21 Aug, 2020

2 commits


08 Aug, 2020

1 commit

  • As said by Linus:

    A symmetric naming is only helpful if it implies symmetries in use.
    Otherwise it's actively misleading.

    In "kzalloc()", the z is meaningful and an important part of what the
    caller wants.

    In "kzfree()", the z is actively detrimental, because maybe in the
    future we really _might_ want to use that "memfill(0xdeadbeef)" or
    something. The "zero" part of the interface isn't even _relevant_.

    The main reason that kzfree() exists is to clear sensitive information
    that should not be leaked to other future users of the same memory
    objects.

    Rename kzfree() to kfree_sensitive() to follow the example of the recently
    added kvfree_sensitive() and make the intention of the API more explicit.
    In addition, memzero_explicit() is used to clear the memory to make sure
    that it won't get optimized away by the compiler.

    The renaming is done by using the command sequence:

    git grep -w --name-only kzfree |\
    xargs sed -i 's/kzfree/kfree_sensitive/'

    followed by some editing of the kfree_sensitive() kerneldoc and adding
    a kzfree backward compatibility macro in slab.h.

    [akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h]
    [akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more]

    Suggested-by: Joe Perches
    Signed-off-by: Waiman Long
    Signed-off-by: Andrew Morton
    Acked-by: David Howells
    Acked-by: Michal Hocko
    Acked-by: Johannes Weiner
    Cc: Jarkko Sakkinen
    Cc: James Morris
    Cc: "Serge E. Hallyn"
    Cc: Joe Perches
    Cc: Matthew Wilcox
    Cc: David Rientjes
    Cc: Dan Carpenter
    Cc: "Jason A . Donenfeld"
    Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com
    Signed-off-by: Linus Torvalds

    Waiman Long
     

26 Jun, 2020

3 commits


15 May, 2020

1 commit

  • pid_cd_regs and debug_regs are never changed and can therefore be made
    const.

    This allows the compiler to put it in the text section instead of the
    data section.

    Before:
    text data bss dec hex filename
    2871 2320 64 5255 1487 drivers/crypto/ccree/cc_debugfs.o

    After:
    text data bss dec hex filename
    3255 1936 64 5255 1487 drivers/crypto/ccree/cc_debugfs.o

    Signed-off-by: Rikard Falkeborn
    Signed-off-by: Herbert Xu

    Rikard Falkeborn
     

08 May, 2020

1 commit

  • Instead of manually allocating a 'struct shash_desc' on the stack and
    calling crypto_shash_digest(), switch to using the new helper function
    crypto_shash_tfm_digest() which does this for us.

    Cc: Gilad Ben-Yossef
    Signed-off-by: Eric Biggers
    Acked-by: Gilad Ben-Yossef
    Signed-off-by: Herbert Xu

    Eric Biggers
     

30 Mar, 2020

1 commit


12 Mar, 2020

6 commits


22 Feb, 2020

23 commits