1. 16 12月, 2020 2 次提交
  2. 14 12月, 2020 22 次提交
  3. 04 12月, 2020 1 次提交
  4. 01 12月, 2020 1 次提交
  5. 23 10月, 2020 3 次提交
  6. 22 10月, 2020 2 次提交
  7. 16 10月, 2020 1 次提交
  8. 29 8月, 2020 1 次提交
  9. 24 8月, 2020 1 次提交
  10. 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
  11. 07 8月, 2020 1 次提交
  12. 03 8月, 2020 4 次提交
    • P
      cifs: document and cleanup dfs mount · 7efd0815
      Paulo Alcantara 提交于
      cifs_mount() for DFS mounts is for a long time way too complex to
      follow, mostly because it lacks some documentation, does a lot of
      operations like resolving DFS roots and links, checking for path
      components, perform failover, crap code, etc.
      
      Besides adding some documentation to it, do some cleanup and ensure
      that the following is implemented and supported:
      
          * non-DFS mounts
          * DFS failover
          * DFS root mounts
              - tcon and cifs_sb must contain DFS path (NOT including prefix)
              - if prefix path, then save it in cifs_sb and it must not be
      	  changed
          * DFS link mounts
            - tcon and cifs_sb must contain DFS path (including prefix)
            - if prefix path, then save it in cifs_sb and it may be changed
          * prevent recursion on broken link referrals (MAX_NESTED_LINKS)
          * check every path component of the currently resolved
            target (including prefix), and chase them accordingly
          * make sure that DFS referrals go through newly resolved root
            servers
      Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      Reviewed-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      7efd0815
    • P
      cifs: only update prefix path of DFS links in cifs_tree_connect() · 11375a59
      Paulo Alcantara 提交于
      For DFS root mounts that contain a prefix path, do not change them
      after failover.
      
      E.g., if the user mounts
      
      	//srvA/root/dir1
      
      and then lost connection to srvA, it will reconnect to
      
      	//srvB/root/dir1
      
      In case of DFS links, which may resolve to different prefix paths
      depending on their list of targets, the following must be supported:
      
      	- mount //srvA/root/link/bar
      	- connect to //srvA/share
      	- set prefix path to "bar"
      	- lost connection to srvA
      	- reconnect to next target: //srvB/share/foo
      	- set new prefix path to "foo/bar"
      
      In cifs_tree_connect(), check the server_type field of the cached DFS
      referral to determine whether or not prefix path should be updated.
      Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      Reviewed-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      11375a59
    • C
      cifs: fix double free error on share and prefix · c6a80e1f
      Colin Ian King 提交于
      Currently if the call dfs_cache_get_tgt_share fails we cannot
      fully guarantee that share and prefix are set to NULL and the
      next iteration of the loop can end up potentially double freeing
      these pointers. Since the semantics of dfs_cache_get_tgt_share
      are ambiguous for failure cases with the setting of share and
      prefix (currently now and the possibly the future), it seems
      prudent to set the pointers to NULL when the objects are
      free'd to avoid any double frees.
      
      Addresses-Coverity: ("Double free")
      Fixes: 96296c946a2a ("cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      c6a80e1f
    • P
      cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect · 7548e1da
      Paulo Alcantara 提交于
      Use PathConsumed field when parsing prefixes of referral paths that
      either match a cache entry or are a complete prefix path of an
      existing entry.
      Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      Reviewed-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      7548e1da