1. 15 Jun, 2018 5 commits
    • David Howells's avatar
      afs: Display manually added cells in dynamic root mount · 0da0b7fd
      David Howells authored
      Alter the dynroot mount so that cells created by manipulation of
      /proc/fs/afs/cells and /proc/fs/afs/rootcell and by specification of a root
      cell as a module parameter will cause directories for those cells to be
      created in the dynamic root superblock for the network namespace[*].
      
      To this end:
      
       (1) Only one dynamic root superblock is now created per network namespace
           and this is shared between all attempts to mount it.  This makes it
           easier to find the superblock to modify.
      
       (2) When a dynamic root superblock is created, the list of cells is walked
           and directories created for each cell already defined.
      
       (3) When a new cell is added, if a dynamic root superblock exists, a
           directory is created for it.
      
       (4) When a cell is destroyed, the directory is removed.
      
       (5) These directories are created by calling lookup_one_len() on the root
           dir which automatically creates them if they don't exist.
      
      [*] Inasmuch as network namespaces are currently supported here.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0da0b7fd
    • David Howells's avatar
      afs: Enable IPv6 DNS lookups · c88d5a7f
      David Howells authored
      Remove the restriction on DNS lookup upcalls that prevents ipv6 addresses
      from being looked up.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      c88d5a7f
    • David Howells's avatar
      afs: Show all of a server's addresses in /proc/fs/afs/servers · 0aac4bce
      David Howells authored
      Show all of a server's addresses in /proc/fs/afs/servers, placing the
      second plus addresses on padded lines of their own.  The current address is
      marked with a star.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0aac4bce
    • David Howells's avatar
      afs: Handle CONFIG_PROC_FS=n · b6cfbeca
      David Howells authored
      The AFS filesystem depends at the moment on /proc for configuration and
      also presents information that way - however, this causes a compilation
      failure if procfs is disabled.
      
      Fix it so that the procfs bits aren't compiled in if procfs is disabled.
      
      This means that you can't configure the AFS filesystem directly, but it is
      still usable provided that an up-to-date keyutils is installed to look up
      cells by SRV or AFSDB DNS records.
      Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      b6cfbeca
    • David Howells's avatar
      proc: Make inline name size calculation automatic · 24074a35
      David Howells authored
      Make calculation of the size of the inline name in struct proc_dir_entry
      automatic, rather than having to manually encode the numbers and failing to
      allow for lockdep.
      
      Require a minimum inline name size of 33+1 to allow for names that look
      like two hex numbers with a dash between.
      Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      24074a35
  2. 02 Jun, 2018 1 commit
  3. 23 May, 2018 3 commits
    • David Howells's avatar
      afs: Implement network namespacing · 5b86d4ff
      David Howells authored
      Implement network namespacing within AFS, but don't yet let mounts occur
      outside the init namespace.  An additional patch will be required propagate
      the network namespace across automounts.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      5b86d4ff
    • David Howells's avatar
      afs: Mark afs_net::ws_cell as __rcu and set using rcu functions · 1588def9
      David Howells authored
      The afs_net::ws_cell member is sometimes used under RCU conditions from
      within an seq-readlock.  It isn't, however, marked __rcu and it isn't set
      using the proper RCU barrier-imposing functions.
      
      Fix this by annotating it with __rcu and using appropriate barriers to
      make sure accesses are correctly ordered.
      
      Without this, the code can produce the following warning:
      
      >> fs/afs/proc.c:151:24: sparse: incompatible types in comparison expression (different address spaces)
      
      Fixes: f044c884 ("afs: Lay the groundwork for supporting network namespaces")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      1588def9
    • David Howells's avatar
      afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus() · c875c76a
      David Howells authored
      Sparse doesn't appear able to handle the conditionally-taken locks in
      xdr_decode_AFSFetchStatus(), even though the lock and unlock are both
      contingent on the same unvarying function argument.
      
      Deal with this by interpolating a wrapper function that takes the lock if
      needed and calls xdr_decode_AFSFetchStatus() on two separate branches, one
      with the lock held and one without.
      
      This allows Sparse to work out the locking.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      c875c76a
  4. 18 May, 2018 5 commits
  5. 17 May, 2018 1 commit
  6. 16 May, 2018 25 commits