1. 21 5月, 2020 12 次提交
    • C
      NFSD: Fix improperly-formatted Doxygen comments · f2453978
      Chuck Lever 提交于
      fs/nfsd/nfsctl.c:256: warning: Function parameter or member 'file' not described in 'write_unlock_ip'
      fs/nfsd/nfsctl.c:256: warning: Function parameter or member 'buf' not described in 'write_unlock_ip'
      fs/nfsd/nfsctl.c:256: warning: Function parameter or member 'size' not described in 'write_unlock_ip'
      fs/nfsd/nfsctl.c:295: warning: Function parameter or member 'file' not described in 'write_unlock_fs'
      fs/nfsd/nfsctl.c:295: warning: Function parameter or member 'buf' not described in 'write_unlock_fs'
      fs/nfsd/nfsctl.c:295: warning: Function parameter or member 'size' not described in 'write_unlock_fs'
      fs/nfsd/nfsctl.c:352: warning: Function parameter or member 'file' not described in 'write_filehandle'
      fs/nfsd/nfsctl.c:352: warning: Function parameter or member 'buf' not described in 'write_filehandle'
      fs/nfsd/nfsctl.c:352: warning: Function parameter or member 'size' not described in 'write_filehandle'
      fs/nfsd/nfsctl.c:434: warning: Function parameter or member 'file' not described in 'write_threads'
      fs/nfsd/nfsctl.c:434: warning: Function parameter or member 'buf' not described in 'write_threads'
      fs/nfsd/nfsctl.c:434: warning: Function parameter or member 'size' not described in 'write_threads'
      fs/nfsd/nfsctl.c:478: warning: Function parameter or member 'file' not described in 'write_pool_threads'
      fs/nfsd/nfsctl.c:478: warning: Function parameter or member 'buf' not described in 'write_pool_threads'
      fs/nfsd/nfsctl.c:478: warning: Function parameter or member 'size' not described in 'write_pool_threads'
      fs/nfsd/nfsctl.c:697: warning: Function parameter or member 'file' not described in 'write_versions'
      fs/nfsd/nfsctl.c:697: warning: Function parameter or member 'buf' not described in 'write_versions'
      fs/nfsd/nfsctl.c:697: warning: Function parameter or member 'size' not described in 'write_versions'
      fs/nfsd/nfsctl.c:858: warning: Function parameter or member 'file' not described in 'write_ports'
      fs/nfsd/nfsctl.c:858: warning: Function parameter or member 'buf' not described in 'write_ports'
      fs/nfsd/nfsctl.c:858: warning: Function parameter or member 'size' not described in 'write_ports'
      fs/nfsd/nfsctl.c:892: warning: Function parameter or member 'file' not described in 'write_maxblksize'
      fs/nfsd/nfsctl.c:892: warning: Function parameter or member 'buf' not described in 'write_maxblksize'
      fs/nfsd/nfsctl.c:892: warning: Function parameter or member 'size' not described in 'write_maxblksize'
      fs/nfsd/nfsctl.c:941: warning: Function parameter or member 'file' not described in 'write_maxconn'
      fs/nfsd/nfsctl.c:941: warning: Function parameter or member 'buf' not described in 'write_maxconn'
      fs/nfsd/nfsctl.c:941: warning: Function parameter or member 'size' not described in 'write_maxconn'
      fs/nfsd/nfsctl.c:1023: warning: Function parameter or member 'file' not described in 'write_leasetime'
      fs/nfsd/nfsctl.c:1023: warning: Function parameter or member 'buf' not described in 'write_leasetime'
      fs/nfsd/nfsctl.c:1023: warning: Function parameter or member 'size' not described in 'write_leasetime'
      fs/nfsd/nfsctl.c:1039: warning: Function parameter or member 'file' not described in 'write_gracetime'
      fs/nfsd/nfsctl.c:1039: warning: Function parameter or member 'buf' not described in 'write_gracetime'
      fs/nfsd/nfsctl.c:1039: warning: Function parameter or member 'size' not described in 'write_gracetime'
      fs/nfsd/nfsctl.c:1094: warning: Function parameter or member 'file' not described in 'write_recoverydir'
      fs/nfsd/nfsctl.c:1094: warning: Function parameter or member 'buf' not described in 'write_recoverydir'
      fs/nfsd/nfsctl.c:1094: warning: Function parameter or member 'size' not described in 'write_recoverydir'
      fs/nfsd/nfsctl.c:1125: warning: Function parameter or member 'file' not described in 'write_v4_end_grace'
      fs/nfsd/nfsctl.c:1125: warning: Function parameter or member 'buf' not described in 'write_v4_end_grace'
      fs/nfsd/nfsctl.c:1125: warning: Function parameter or member 'size' not described in 'write_v4_end_grace'
      
      fs/nfsd/nfs4proc.c:1164: warning: Function parameter or member 'nss' not described in 'nfsd4_interssc_connect'
      fs/nfsd/nfs4proc.c:1164: warning: Function parameter or member 'rqstp' not described in 'nfsd4_interssc_connect'
      fs/nfsd/nfs4proc.c:1164: warning: Function parameter or member 'mount' not described in 'nfsd4_interssc_connect'
      fs/nfsd/nfs4proc.c:1262: warning: Function parameter or member 'rqstp' not described in 'nfsd4_setup_inter_ssc'
      fs/nfsd/nfs4proc.c:1262: warning: Function parameter or member 'cstate' not described in 'nfsd4_setup_inter_ssc'
      fs/nfsd/nfs4proc.c:1262: warning: Function parameter or member 'copy' not described in 'nfsd4_setup_inter_ssc'
      fs/nfsd/nfs4proc.c:1262: warning: Function parameter or member 'mount' not described in 'nfsd4_setup_inter_ssc'
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      f2453978
    • C
      NFSD: Squash an annoying compiler warning · 45f56da8
      Chuck Lever 提交于
      Clean up: Fix gcc empty-body warning when -Wextra is used.
      
      ../fs/nfsd/nfs4state.c:3898:3: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      45f56da8
    • C
      SUNRPC: Clean up request deferral tracepoints · 8954c5c2
      Chuck Lever 提交于
      - Rename these so they are easy to enable and search for as a set
      - Move the tracepoints to get a more accurate sense of control flow
      - Tracepoints should not fire on xprt shutdown
      - Display memory address in case data structure had been corrupted
      - Abandon dprintk in these paths
      
      I haven't ever gotten one of these tracepoints to trigger. I wonder
      if we should simply remove them.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      8954c5c2
    • C
      1eace0d1
    • C
      NFSD: Add tracepoints to the NFSD state management code · dd5e3fbc
      Chuck Lever 提交于
      Capture obvious events and replace dprintk() call sites. Introduce
      infrastructure so that adding more tracepoints in this code later
      is simplified.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      dd5e3fbc
    • C
      NFSD: Add tracepoints to NFSD's duplicate reply cache · 0b175b18
      Chuck Lever 提交于
      Try to capture DRC failures.
      
      Two additional clean-ups:
      - Introduce Doxygen-style comments for the main entry points
      - Remove a dprintk that fires for an allocation failure. This was
        the only dprintk in the REPCACHE class.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      [ cel: force typecast for display of checksum values ]
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      0b175b18
    • C
      SUNRPC: svc_show_status() macro should have enum definitions · d88ff958
      Chuck Lever 提交于
      Clean up: Add missing TRACE_DEFINE_ENUMs in
      include/trace/events/sunrpc.h
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      d88ff958
    • C
      SUNRPC: Restructure svc_udp_recvfrom() · fff1ebb2
      Chuck Lever 提交于
      Clean up. At this point, we are not ready yet to support bio_vecs in
      the UDP transport implementation. However, we can clean up
      svc_udp_recvfrom() to match the tracing and straight-lining recently
      changes made in svc_tcp_recvfrom().
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      fff1ebb2
    • C
      SUNRPC: Refactor svc_recvfrom() · ca07eda3
      Chuck Lever 提交于
      This function is not currently "generic" so remove the documenting
      comment and rename it appropriately. Its internals are converted to
      use bio_vecs for reading from the transport socket.
      
      In existing typical sunrpc uses of bio_vecs, the bio_vec array is
      allocated dynamically. Here, instead, an array of bio_vecs is added
      to svc_rqst. The lifetime of this array can be greater than one call
      to xpo_recvfrom():
      
      - Multiple calls to xpo_recvfrom() might be needed to read an RPC
        message completely.
      
      - At some later point, rq_arg.bvecs will point to this array and it
        will carry the received message into svc_process().
      
      I also expect that a future optimization will remove either the
      rq_vec or rq_pages array in favor of rq_bvec, thus conserving the
      size of struct svc_rqst.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      ca07eda3
    • C
      SUNRPC: Clean up svc_release_skb() functions · cca557a5
      Chuck Lever 提交于
      Rename these functions using the convention used for other xpo
      method entry points.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      cca557a5
    • C
      SUNRPC: Refactor recvfrom path dealing with incomplete TCP receives · 6be8c594
      Chuck Lever 提交于
      Clean up: move exception processing out of the main path.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      6be8c594
    • C
      7dae1dd7
  2. 18 5月, 2020 27 次提交
  3. 17 5月, 2020 1 次提交
    • E
      exec: Move would_dump into flush_old_exec · f87d1c95
      Eric W. Biederman 提交于
      I goofed when I added mm->user_ns support to would_dump.  I missed the
      fact that in the case of binfmt_loader, binfmt_em86, binfmt_misc, and
      binfmt_script bprm->file is reassigned.  Which made the move of
      would_dump from setup_new_exec to __do_execve_file before exec_binprm
      incorrect as it can result in would_dump running on the script instead
      of the interpreter of the script.
      
      The net result is that the code stopped making unreadable interpreters
      undumpable.  Which allows them to be ptraced and written to disk
      without special permissions.  Oops.
      
      The move was necessary because the call in set_new_exec was after
      bprm->mm was no longer valid.
      
      To correct this mistake move the misplaced would_dump from
      __do_execve_file into flos_old_exec, before exec_mmap is called.
      
      I tested and confirmed that without this fix I can attach with gdb to
      a script with an unreadable interpreter, and with this fix I can not.
      
      Cc: stable@vger.kernel.org
      Fixes: f84df2a6 ("exec: Ensure mm->user_ns contains the execed files")
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      f87d1c95