1. 28 5月, 2013 1 次提交
  2. 12 5月, 2013 1 次提交
  3. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  4. 30 1月, 2013 1 次提交
  5. 19 12月, 2012 1 次提交
  6. 30 1月, 2012 1 次提交
    • M
      hw/9pfs: Preserve S_ISGID · 2d40564a
      M. Mohan Kumar 提交于
      In passthrough security model in local fs driver, after a file creation
      chown and chmod are done to set the file credentials and mode as requested
      by 9p client. But if there was a request to create a file with S_ISGID
      bit, doing chown on that file resets the S_ISGID bit. So first call
      chown and then invoking chmod with proper mode bit retains the S_ISGID
      (if present/requested)
      
      This resulted in LTP mknod02, mknod03, mknod05, open10 test case
      failures. This patch fixes this issue.
      
      man 2 chown
      When the owner or group of an executable file are changed by an unprivileged
      user the S_ISUID  and  S_ISGID mode  bits are cleared.  POSIX does not specify
      whether this also should happen when root does the chown(); the Linux behavior
      depends on the kernel version.
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      2d40564a
  7. 19 1月, 2012 1 次提交
    • A
      hw/9pfs: Add new security model mapped-file. · 2c30dd74
      Aneesh Kumar K.V 提交于
      This enable us to do passthrough equivalent security model on NFS directory.
      NFS server mostly do root squashing and don't support xattr. Hence we cannot
      use 'passthrough' or 'mapped' security model
      
      Also added "mapped-xattr" security to indicate earlier "mapped" security model
      Older name is still supported.
      
      POSIX rules regarding ctime update on chmod are not followed by this security model.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      2c30dd74
  8. 04 1月, 2012 1 次提交
  9. 05 12月, 2011 1 次提交
  10. 29 11月, 2011 2 次提交
  11. 10 11月, 2011 1 次提交
  12. 31 10月, 2011 2 次提交
  13. 15 10月, 2011 3 次提交
  14. 12 10月, 2011 1 次提交
  15. 23 9月, 2011 3 次提交
  16. 22 8月, 2011 1 次提交
  17. 02 6月, 2011 2 次提交
  18. 27 4月, 2011 2 次提交
  19. 03 12月, 2010 2 次提交
    • H
      virtio-9p: fix build on !CONFIG_UTIMENSAT · 38671423
      Hidetoshi Seto 提交于
      This patch introduce a fallback mechanism for old systems that do not
      support utimensat().  This fix build failure with following warnings:
      
      hw/virtio-9p-local.c: In function 'local_utimensat':
      hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'
      hw/virtio-9p-local.c:479: warning: nested extern declaration of 'utimensat'
      
      and:
      
      hw/virtio-9p.c: In function 'v9fs_setattr_post_chmod':
      hw/virtio-9p.c:1410: error: 'UTIME_NOW' undeclared (first use in this function)
      hw/virtio-9p.c:1410: error: (Each undeclared identifier is reported only once
      hw/virtio-9p.c:1410: error: for each function it appears in.)
      hw/virtio-9p.c:1413: error: 'UTIME_OMIT' undeclared (first use in this function)
      hw/virtio-9p.c: In function 'v9fs_wstat_post_chmod':
      hw/virtio-9p.c:2905: error: 'UTIME_OMIT' undeclared (first use in this function)
      
      [NOTE: At this time virtio-9p is only user of utimensat(), and is available
             only when host is linux and CONFIG_VIRTFS is defined.  So there are
             no similar warning for win32.  Please provide a wrapper for win32 in
             oslib-win32.c if new user really requires it.]
      
      v5:
        - Allow fallback on runtime
        - Move qemu_utimensat() to oslib-posix.c
        - Rebased on latest qemu.git
      v4:
        - Use tv_now.tv_usec
      v3:
        - Use better alternative handling for UTIME_NOW/OMIT
        - Move qemu_utimensat() to cutils.c
      V2:
        - Introduce qemu_utimensat()
      Acked-by: NChris Wright <chrisw@sous-sol.org>
      Acked-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Acked-by: NJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      38671423
    • V
      [virtio-9p] Add datasync to server side TFSYNC/RFSYNC for dotl · 49594973
      Venkateswararao Jujjuri (JV) 提交于
      SYNOPSIS
          size[4] Tfsync tag[2] fid[4] datasync[4]
      
          size[4] Rfsync tag[2]
      
      DESCRIPTION
      
          The Tfsync transaction transfers ("flushes") all modified in-core data of
          file identified by fid to the disk device (or other  permanent  storage
          device)  where that  file  resides.
      
          If datasync flag is specified data will be fleshed but does not flush
          modified metadata unless  that  metadata  is  needed  in order to allow a
          subsequent data retrieval to be correctly handled.
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      49594973
  20. 21 10月, 2010 2 次提交
  21. 09 9月, 2010 9 次提交
    • A
      9ed3ef26
    • A
      virtio-9p: Use lchown which won't follow symlink · 5c0f255d
      Aneesh Kumar K.V 提交于
      We should always use functions which don't follow
      symlink on the server
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      5c0f255d
    • A
      virtio-9p: Add SM_NONE security model · 12848bfc
      Aneesh Kumar K.V 提交于
      This is equivalent to SM_PASSTHROUGH security model.
      The only exception is, failure of privilige operation like chown
      are ignored. This makes a passthrough like security model usable
      for people who runs kvm as non root
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      12848bfc
    • A
      virtio-9p: Hide user.virtfs xattr in case of mapped security. · 61b6c499
      Aneesh Kumar K.V 提交于
      With mapped security mode we use "user.virtfs" namespace is used
      to store the virtFs related attributes. So hide it from user.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      61b6c499
    • A
      virtio-9p: Implement TXATTRCREATE · 10b468bd
      Aneesh Kumar K.V 提交于
      TXATTRCREATE:  Prepare a fid for setting xattr value on a file system object.
      
       size[4] TXATTRCREATE tag[2] fid[4] name[s] attr_size[8] flags[4]
       size[4] RXATTRWALK tag[2]
      
      txattrcreate gets a fid pointing to xattr. This fid can later be
      used to get set the xattr value.
      
      flag value is derived from set Linux setxattr. The manpage says
      "The flags parameter can be used to refine the semantics of the operation.
      XATTR_CREATE specifies a pure create, which fails if the named attribute
      exists already. XATTR_REPLACE specifies a pure replace operation, which
      fails if the named attribute does not already exist. By default (no flags),
      the extended attribute will be created if need be, or will simply replace
      the value if the attribute exists."
      
      The actual setxattr operation happens when the fid is clunked. At that point
      the written byte count and the attr_size specified in TXATTRCREATE should be
      same otherwise an error will be returned.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      10b468bd
    • A
      virtio-9p: Implement TXATTRWALK · fa32ef88
      Aneesh Kumar K.V 提交于
      TXATTRWALK: Descend a ATTR namespace
      
       size[4] TXATTRWALK tag[2] fid[4] newfid[4] name[s]
       size[4] RXATTRWALK tag[2] size[8]
      
      txattrwalk gets a fid pointing to xattr. This fid can later be
      used to get read the xattr value. If name is NULL the fid returned
      can be used to get the list of extended attribute associated to
      the file system object.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      fa32ef88
    • S
      virtio-9p: Implement server side of setattr for 9P2000.L protocol. · c79ce737
      Sripathi Kodi 提交于
      SYNOPSIS
      
            size[4] Tsetattr tag[2] attr[n]
      
            size[4] Rsetattr tag[2]
      
         DESCRIPTION
      
            The setattr command changes some of the file status information.
            attr resembles the iattr structure used in Linux kernel. It
            specifies which status parameter is to be changed and to what
            value. It is laid out as follows:
      
               valid[4]
                  specifies which status information is to be changed. Possible
                  values are:
                  ATTR_MODE       (1 << 0)
                  ATTR_UID        (1 << 1)
                  ATTR_GID        (1 << 2)
                  ATTR_SIZE       (1 << 3)
                  ATTR_ATIME      (1 << 4)
                  ATTR_MTIME      (1 << 5)
                  ATTR_CTIME      (1 << 5)
                  ATTR_ATIME_SET  (1 << 7)
                  ATTR_MTIME_SET  (1 << 8)
      
                  The last two bits represent whether the time information
                  is being sent by the client's user space. In the absense
                  of these bits the server always uses server's time.
      
               mode[4]
                  File permission bits
      
               uid[4]
                  Owner id of file
      
               gid[4]
                  Group id of the file
      
               size[8]
                  File size
      
               atime_sec[8]
                  Time of last file access, seconds
      
               atime_nsec[8]
                  Time of last file access, nanoseconds
      
               mtime_sec[8]
                  Time of last file modification, seconds
      
               mtime_nsec[8]
                  Time of last file modification, nanoseconds
      
      Explanation of the patches:
      --------------------------
      
      *) The kernel just copies relevent contents of iattr structure to p9_iattr_dotl
         structure and passes it down to the client. The only check it has is calling
         inode_change_ok()
      *) The p9_iattr_dotl structure does not have ctime and ia_file parameters because
         I don't think these are needed in our case. The client user space can request
         updating just ctime by calling chown(fd, -1, -1). This is handled on server
         side without a need for putting ctime on the wire.
      *) The server currently supports changing mode, time, ownership and size of the
         file.
      *) 9P RFC says "Either all the changes in wstat request happen, or none of them
         does: if the request succeeds, all changes were made; if it fails, none were."
         I have not done anything to implement this specifically because I don't see
         a reason.
      
      [jvrao@linux.vnet.ibm.com: Parts of code for handling chown(-1,-1)
      Signed-off-by: NSripathi Kodi <sripathik@in.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      c79ce737
    • M
      virtio-9p: Do not reset atime · 74bc02b2
      M. Mohan Kumar 提交于
          Current code resets file's atime to 0 when there is a change in mtime.
          This results in resetting the atime to "1970-01-01 05:30:00". For
          example, truncate -s 0 filename results in changing the mtime to the
          truncate time, but resets the atime to "1970-01-01 05:30:00". utime
          system call does not have any provision to set only mtime or atime. So
          change v9fs_wstat_post_chmod function to use utimensat function to change
          the atime and mtime fields. If tv_nsec field is set to the special value
          "UTIME_OMIT", corresponding file time stamp is not updated.
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      74bc02b2
    • M
      qemu: virtio-9p: Implement statfs support in server · be940c87
      M. Mohan Kumar 提交于
      Implement statfs support in qemu server based on Sripathi's
      initial statfs patch.
      Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: NSripathi Kodi <sripathik@in.ibm.com>
      Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      be940c87
  22. 20 8月, 2010 1 次提交