1. 02 10月, 2020 10 次提交
  2. 27 8月, 2020 1 次提交
  3. 08 8月, 2020 1 次提交
    • W
      mm, treewide: rename kzfree() to kfree_sensitive() · 453431a5
      Waiman Long 提交于
      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: NJoe Perches <joe@perches.com>
      Signed-off-by: NWaiman Long <longman@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Acked-by: NJohannes 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.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      453431a5
  4. 02 8月, 2020 1 次提交
  5. 21 7月, 2020 1 次提交
  6. 30 6月, 2020 1 次提交
  7. 23 6月, 2020 2 次提交
    • J
      iwlwifi: fix crash in iwl_dbg_tlv_alloc_trigger · ea0cca61
      Jiri Slaby 提交于
      The tlv passed to iwl_dbg_tlv_alloc_trigger comes from a loaded firmware
      file. The memory can be marked as read-only as firmware could be
      shared. In anyway, writing to this memory is not expected. So,
      iwl_dbg_tlv_alloc_trigger can crash now:
      
        BUG: unable to handle page fault for address: ffffae2c01bfa794
        PF: supervisor write access in kernel mode
        PF: error_code(0x0003) - permissions violation
        PGD 107d51067 P4D 107d51067 PUD 107d52067 PMD 659ad2067 PTE 8000000662298161
        CPU: 2 PID: 161 Comm: kworker/2:1 Not tainted 5.7.0-3.gad96a07-default #1 openSUSE Tumbleweed (unreleased)
        RIP: 0010:iwl_dbg_tlv_alloc_trigger+0x25/0x60 [iwlwifi]
        Code: eb f2 0f 1f 00 66 66 66 66 90 83 7e 04 33 48 89 f8 44 8b 46 10 48 89 f7 76 40 41 8d 50 ff 83 fa 19 77 23 8b 56 20 85 d2 75 07 <c7> 46 20 ff ff ff ff 4b 8d 14 40 48 c1 e2 04 48 8d b4 10 00 05 00
        RSP: 0018:ffffae2c00417ce8 EFLAGS: 00010246
        RAX: ffff8f0522334018 RBX: ffff8f0522334018 RCX: ffffffffc0fc26c0
        RDX: 0000000000000000 RSI: ffffae2c01bfa774 RDI: ffffae2c01bfa774
        RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000001
        R10: 0000000000000034 R11: ffffae2c01bfa77c R12: ffff8f0522334230
        R13: 0000000001000009 R14: ffff8f0523fdbc00 R15: ffff8f051f395800
        FS:  0000000000000000(0000) GS:ffff8f0527c80000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: ffffae2c01bfa794 CR3: 0000000389eba000 CR4: 00000000000006e0
        Call Trace:
         iwl_dbg_tlv_alloc+0x79/0x120 [iwlwifi]
         iwl_parse_tlv_firmware.isra.0+0x57d/0x1550 [iwlwifi]
         iwl_req_fw_callback+0x3f8/0x6a0 [iwlwifi]
         request_firmware_work_func+0x47/0x90
         process_one_work+0x1e3/0x3b0
         worker_thread+0x46/0x340
         kthread+0x115/0x140
         ret_from_fork+0x1f/0x40
      
      As can be seen, write bit is not set in the PTE. Read of
      trig->occurrences succeeds in iwl_dbg_tlv_alloc_trigger, but
      trig->occurrences = cpu_to_le32(-1); fails there, obviously.
      
      This is likely because we (at SUSE) use compressed firmware and that is
      marked as RO after decompression (see fw_map_paged_buf).
      
      Fix it by creating a temporary buffer in case we need to change the
      memory.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Reported-by: NDieter Nützel <Dieter@nuetzel-hh.de>
      Tested-by: NDieter Nützel <Dieter@nuetzel-hh.de>
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
      Cc: Luca Coelho <luciano.coelho@intel.com>
      Cc: Intel Linux Wireless <linuxwifi@intel.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200612073800.27742-1-jslaby@suse.cz
      ea0cca61
    • J
      iwlwifi: mvm: don't call iwl_mvm_free_inactive_queue() under RCU · fbb1461a
      Johannes Berg 提交于
      iwl_mvm_free_inactive_queue() will sleep in synchronize_net() under
      some circumstances, so don't call it under RCU. There doesn't appear
      to be a need for RCU protection around this particular call.
      
      Cc: stable@vger.kernel.org # v5.4+
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/iwlwifi.20200403112332.0f49448c133d.I17fd308bc4a9491859c9b112f4eb5d2c3fc18d7d@changeid
      fbb1461a
  8. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  9. 10 6月, 2020 3 次提交
  10. 09 6月, 2020 1 次提交
    • A
      iwlwifi: mvm: fix gcc-10 zero-length-bounds warning · 9cec1d54
      Arnd Bergmann 提交于
      gcc-10 complains when a zero-length array is accessed:
      
      drivers/net/wireless/intel/iwlwifi/mvm/tx.c: In function 'iwl_mvm_rx_ba_notif':
      drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1929:17: warning: array subscript 9 is outside the bounds of an interior zero-length array 'struct iwl_mvm_compressed_ba_tfd[0]' [-Wzero-length-bounds]
       1929 |     &ba_res->tfd[i];
            |      ~~~~~~~~~~~^~~
      In file included from drivers/net/wireless/intel/iwlwifi/mvm/../fw/api/tdls.h:68,
                       from drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h:68,
                       from drivers/net/wireless/intel/iwlwifi/mvm/sta.h:73,
                       from drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:83,
                       from drivers/net/wireless/intel/iwlwifi/mvm/tx.c:72:
      drivers/net/wireless/intel/iwlwifi/mvm/../fw/api/tx.h:769:35: note: while referencing 'tfd'
        769 |  struct iwl_mvm_compressed_ba_tfd tfd[0];
            |                                   ^~~
      
      Change this structure to use a flexible-array member for 'tfd' instead,
      along with the various structures using an zero-length ieee80211_hdr
      array that do not show warnings today but might be affected by similar
      issues in the future.
      
      Fixes: 6f68cc36 ("iwlwifi: api: annotate compressed BA notif array sizes")
      Fixes: c46e7724 ("iwlwifi: mvm: support new BA notification response")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20200430213101.135134-3-arnd@arndb.deSigned-off-by: NLuca Coelho <luciano.coelho@intel.com>
      9cec1d54
  11. 08 6月, 2020 4 次提交
  12. 05 6月, 2020 1 次提交
  13. 29 5月, 2020 11 次提交
  14. 08 5月, 2020 2 次提交