Skip to content
Snippets Groups Projects
  1. Aug 07, 2022
  2. Jul 16, 2022
  3. Jul 03, 2022
  4. Jan 15, 2022
  5. Sep 11, 2021
    • Wen Yang's avatar
      coccinelle: semantic patch to check for inappropriate do_div() calls · ac5f3136
      Wen Yang authored
      
      do_div() does a 64-by-32 division.
      When the divisor is unsigned long, u64, or s64,
      do_div() truncates it to 32 bits, this means it
      can test non-zero and be truncated to zero for division.
      This semantic patch is inspired by Mateusz Guzik's patch:
      commit b0ab99e7 ("sched: Fix possible divide by zero in avg_atom() calculation")
      
      Signed-off-by: default avatarWen Yang <wenyang@linux.alibaba.com>
      Signed-off-by: default avatarJulia Lawall <julia.lawall@inria.fr>
      Cc: Gilles Muller <Gilles.Muller@lip6.fr>
      Cc: Nicolas Palix <nicolas.palix@imag.fr>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Matthias Maennich <maennich@google.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      ac5f3136
  6. Aug 08, 2021
  7. Aug 05, 2021
  8. Jun 21, 2021
  9. May 01, 2021
  10. Feb 13, 2021
    • Rob Herring's avatar
      of: Remove of_dev_{get,put}() · 83c4a4ee
      Rob Herring authored
      
      of_dev_get() and of_dev_put are just wrappers for get_device()/put_device()
      on a platform_device. There's also already platform_device_{get,put}()
      wrappers for this purpose. Let's update the few users and remove
      of_dev_{get,put}().
      
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Julia Lawall <Julia.Lawall@inria.fr>
      Cc: Gilles Muller <Gilles.Muller@inria.fr>
      Cc: Nicolas Palix <nicolas.palix@imag.fr>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: netdev@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-usb@vger.kernel.org
      Cc: cocci@systeme.lip6.fr
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Link: https://lore.kernel.org/r/20210211232745.1498137-2-robh@kernel.org
      83c4a4ee
  11. Dec 15, 2020
  12. Nov 09, 2020
  13. Oct 17, 2020
  14. Oct 15, 2020
  15. Oct 10, 2020
  16. Oct 03, 2020
  17. Oct 01, 2020
  18. Sep 21, 2020
  19. Sep 12, 2020
  20. Sep 10, 2020
  21. Sep 05, 2020
  22. Sep 02, 2020
  23. Aug 21, 2020
  24. Aug 07, 2020
    • Waiman Long's avatar
      mm, treewide: rename kzfree() to kfree_sensitive() · 453431a5
      Waiman Long authored
      
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
      Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      453431a5
  25. Aug 04, 2020
Loading