All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL] VirtFS update
@ 2011-12-21  7:57 Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 1/4] hw/9pfs: replace iovec manipulation with QEMUIOVector Aneesh Kumar K.V
                   ` (4 more replies)
  0 siblings, 5 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-21  7:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

Hi Anthony,

This is the updated pull request after moving the repo to github. I added two
patches to the series. The signed tag for-anthony is updated with updated info

The following changes since commit 3799ce4ab64f578eb818689a276e4f0c73d01fb5:

  sd: Remember to reset .expecting_acmd on reset. (2011-12-21 05:04:21 +0100)

are available in the git repository at:

  git://github.com/kvaneesh/QEMU.git for-upstream

for you to fetch changes up to 058a96ed506d77714bcce3d69b351e364078c080:

  scripts/analyse-9p-simpletrace.py:	Add symbolic names for 9p operations. (2011-12-21 12:37:23 +0530)

----------------------------------------------------------------
(from the branch description for for-upstream local branch)

branch for landing changes for upstream merge

----------------------------------------------------------------
Aneesh Kumar K.V (2):
      hw/9pfs: Use the correct signed type for different variables
      hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values.

Harsh Prateek Bora (1):
      scripts/analyse-9p-simpletrace.py:	Add symbolic names for 9p operations.

Stefan Hajnoczi (1):
      hw/9pfs: replace iovec manipulation with QEMUIOVector

 fsdev/file-op-9p.h                |    2 +-
 hw/9pfs/virtio-9p.c               |  230 +++++++++++++++----------------------
 hw/9pfs/virtio-9p.h               |    2 +-
 scripts/analyse-9p-simpletrace.py |   75 ++++++++++++-
 trace-events                      |    8 +-
 5 files changed, 174 insertions(+), 143 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PATCH 1/4] hw/9pfs: replace iovec manipulation with QEMUIOVector
  2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
@ 2011-12-21  7:57 ` Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 2/4] hw/9pfs: Use the correct signed type for different variables Aneesh Kumar K.V
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-21  7:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Stefan Hajnoczi, Aneesh Kumar K.V

From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

The v9fs_read() and v9fs_write() functions rely on iovec[] manipulation
code should be replaced with QEMUIOVector to avoid duplicating code.
In the future it may be possible to make the code even more concise by
using QEMUIOVector consistently across virtio and 9pfs.

The "v" format specifier for pdu_marshal() and pdu_unmarshal() is
dropped since it does not actually pack/unpack anything.  The specifier
was also not implemented to update the offset variable and could only be
used at the end of a format string, another sign that this shouldn't
really be a format specifier.  Instead, see the new
v9fs_init_qiov_from_pdu() function.

This change avoids a possible iovec[] buffer overflow when indirect
vrings are used since the number of vectors is now limited by the
underlying VirtQueueElement and cannot be out-of-bounds.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 hw/9pfs/virtio-9p.c |  162 +++++++++++++++++++--------------------------------
 1 files changed, 60 insertions(+), 102 deletions(-)

diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 36a862f..46dc9f7 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -674,40 +674,6 @@ static size_t pdu_pack(V9fsPDU *pdu, size_t offset, const void *src,
                              offset, size, 1);
 }
 
-static int pdu_copy_sg(V9fsPDU *pdu, size_t offset, int rx, struct iovec *sg)
-{
-    size_t pos = 0;
-    int i, j;
-    struct iovec *src_sg;
-    unsigned int num;
-
-    if (rx) {
-        src_sg = pdu->elem.in_sg;
-        num = pdu->elem.in_num;
-    } else {
-        src_sg = pdu->elem.out_sg;
-        num = pdu->elem.out_num;
-    }
-
-    j = 0;
-    for (i = 0; i < num; i++) {
-        if (offset <= pos) {
-            sg[j].iov_base = src_sg[i].iov_base;
-            sg[j].iov_len = src_sg[i].iov_len;
-            j++;
-        } else if (offset < (src_sg[i].iov_len + pos)) {
-            sg[j].iov_base = src_sg[i].iov_base;
-            sg[j].iov_len = src_sg[i].iov_len;
-            sg[j].iov_base += (offset - pos);
-            sg[j].iov_len -= (offset - pos);
-            j++;
-        }
-        pos += src_sg[i].iov_len;
-    }
-
-    return j;
-}
-
 static size_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...)
 {
     size_t old_offset = offset;
@@ -743,12 +709,6 @@ static size_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...)
             *valp = le64_to_cpu(val);
             break;
         }
-        case 'v': {
-            struct iovec *iov = va_arg(ap, struct iovec *);
-            int *iovcnt = va_arg(ap, int *);
-            *iovcnt = pdu_copy_sg(pdu, offset, 0, iov);
-            break;
-        }
         case 's': {
             V9fsString *str = va_arg(ap, V9fsString *);
             offset += pdu_unmarshal(pdu, offset, "w", &str->size);
@@ -827,12 +787,6 @@ static size_t pdu_marshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...)
             offset += pdu_pack(pdu, offset, &val, sizeof(val));
             break;
         }
-        case 'v': {
-            struct iovec *iov = va_arg(ap, struct iovec *);
-            int *iovcnt = va_arg(ap, int *);
-            *iovcnt = pdu_copy_sg(pdu, offset, 1, iov);
-            break;
-        }
         case 's': {
             V9fsString *str = va_arg(ap, V9fsString *);
             offset += pdu_marshal(pdu, offset, "w", str->size);
@@ -1143,42 +1097,6 @@ static void stat_to_v9stat_dotl(V9fsState *s, const struct stat *stbuf,
     stat_to_qid(stbuf, &v9lstat->qid);
 }
 
-static struct iovec *adjust_sg(struct iovec *sg, int len, int *iovcnt)
-{
-    while (len && *iovcnt) {
-        if (len < sg->iov_len) {
-            sg->iov_len -= len;
-            sg->iov_base += len;
-            len = 0;
-        } else {
-            len -= sg->iov_len;
-            sg++;
-            *iovcnt -= 1;
-        }
-    }
-
-    return sg;
-}
-
-static struct iovec *cap_sg(struct iovec *sg, int cap, int *cnt)
-{
-    int i;
-    int total = 0;
-
-    for (i = 0; i < *cnt; i++) {
-        if ((total + sg[i].iov_len) > cap) {
-            sg[i].iov_len -= ((total + sg[i].iov_len) - cap);
-            i++;
-            break;
-        }
-        total += sg[i].iov_len;
-    }
-
-    *cnt = i;
-
-    return sg;
-}
-
 static void print_sg(struct iovec *sg, int cnt)
 {
     int i;
@@ -1861,6 +1779,38 @@ out:
     return count;
 }
 
+/*
+ * Create a QEMUIOVector for a sub-region of PDU iovecs
+ *
+ * @qiov:       uninitialized QEMUIOVector
+ * @skip:       number of bytes to skip from beginning of PDU
+ * @size:       number of bytes to include
+ * @is_write:   true - write, false - read
+ *
+ * The resulting QEMUIOVector has heap-allocated iovecs and must be cleaned up
+ * with qemu_iovec_destroy().
+ */
+static void v9fs_init_qiov_from_pdu(QEMUIOVector *qiov, V9fsPDU *pdu,
+                                    uint64_t skip, size_t size,
+                                    bool is_write)
+{
+    QEMUIOVector elem;
+    struct iovec *iov;
+    unsigned int niov;
+
+    if (is_write) {
+        iov = pdu->elem.out_sg;
+        niov = pdu->elem.out_num;
+    } else {
+        iov = pdu->elem.in_sg;
+        niov = pdu->elem.in_num;
+    }
+
+    qemu_iovec_init_external(&elem, iov, niov);
+    qemu_iovec_init(qiov, niov);
+    qemu_iovec_copy(qiov, &elem, skip, size);
+}
+
 static void v9fs_read(void *opaque)
 {
     int32_t fid;
@@ -1895,21 +1845,21 @@ static void v9fs_read(void *opaque)
         err += pdu_marshal(pdu, offset, "d", count);
         err += count;
     } else if (fidp->fid_type == P9_FID_FILE) {
-        int32_t cnt;
+        QEMUIOVector qiov_full;
+        QEMUIOVector qiov;
         int32_t len;
-        struct iovec *sg;
-        struct iovec iov[128]; /* FIXME: bad, bad, bad */
 
-        sg = iov;
-        pdu_marshal(pdu, offset + 4, "v", sg, &cnt);
-        sg = cap_sg(sg, max_count, &cnt);
+        v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset + 4, max_count, false);
+        qemu_iovec_init(&qiov, qiov_full.niov);
         do {
+            qemu_iovec_reset(&qiov);
+            qemu_iovec_copy(&qiov, &qiov_full, count, qiov_full.size - count);
             if (0) {
-                print_sg(sg, cnt);
+                print_sg(qiov.iov, qiov.niov);
             }
             /* Loop in case of EINTR */
             do {
-                len = v9fs_co_preadv(pdu, fidp, sg, cnt, off);
+                len = v9fs_co_preadv(pdu, fidp, qiov.iov, qiov.niov, off);
                 if (len >= 0) {
                     off   += len;
                     count += len;
@@ -1920,11 +1870,12 @@ static void v9fs_read(void *opaque)
                 err = len;
                 goto out;
             }
-            sg = adjust_sg(sg, len, &cnt);
         } while (count < max_count && len > 0);
         err = offset;
         err += pdu_marshal(pdu, offset, "d", count);
         err += count;
+        qemu_iovec_destroy(&qiov);
+        qemu_iovec_destroy(&qiov_full);
     } else if (fidp->fid_type == P9_FID_XATTR) {
         err = v9fs_xattr_read(s, pdu, fidp, off, max_count);
     } else {
@@ -2095,7 +2046,6 @@ out:
 
 static void v9fs_write(void *opaque)
 {
-    int cnt;
     ssize_t err;
     int32_t fid;
     int64_t off;
@@ -2104,13 +2054,14 @@ static void v9fs_write(void *opaque)
     int32_t total = 0;
     size_t offset = 7;
     V9fsFidState *fidp;
-    struct iovec iov[128]; /* FIXME: bad, bad, bad */
-    struct iovec *sg = iov;
     V9fsPDU *pdu = opaque;
     V9fsState *s = pdu->s;
+    QEMUIOVector qiov_full;
+    QEMUIOVector qiov;
 
-    pdu_unmarshal(pdu, offset, "dqdv", &fid, &off, &count, sg, &cnt);
-    trace_v9fs_write(pdu->tag, pdu->id, fid, off, count, cnt);
+    offset += pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count);
+    v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);
+    trace_v9fs_write(pdu->tag, pdu->id, fid, off, count, qiov_full.niov);
 
     fidp = get_fid(pdu, fid);
     if (fidp == NULL) {
@@ -2126,20 +2077,23 @@ static void v9fs_write(void *opaque)
         /*
          * setxattr operation
          */
-        err = v9fs_xattr_write(s, pdu, fidp, off, count, sg, cnt);
+        err = v9fs_xattr_write(s, pdu, fidp, off, count,
+                               qiov_full.iov, qiov_full.niov);
         goto out;
     } else {
         err = -EINVAL;
         goto out;
     }
-    sg = cap_sg(sg, count, &cnt);
+    qemu_iovec_init(&qiov, qiov_full.niov);
     do {
+        qemu_iovec_reset(&qiov);
+        qemu_iovec_copy(&qiov, &qiov_full, total, qiov_full.size - total);
         if (0) {
-            print_sg(sg, cnt);
+            print_sg(qiov.iov, qiov.niov);
         }
         /* Loop in case of EINTR */
         do {
-            len = v9fs_co_pwritev(pdu, fidp, sg, cnt, off);
+            len = v9fs_co_pwritev(pdu, fidp, qiov.iov, qiov.niov, off);
             if (len >= 0) {
                 off   += len;
                 total += len;
@@ -2148,16 +2102,20 @@ static void v9fs_write(void *opaque)
         if (len < 0) {
             /* IO error return the error */
             err = len;
-            goto out;
+            goto out_qiov;
         }
-        sg = adjust_sg(sg, len, &cnt);
     } while (total < count && len > 0);
+
+    offset = 7;
     offset += pdu_marshal(pdu, offset, "d", total);
     err = offset;
     trace_v9fs_write_return(pdu->tag, pdu->id, total, err);
+out_qiov:
+    qemu_iovec_destroy(&qiov);
 out:
     put_fid(pdu, fidp);
 out_nofid:
+    qemu_iovec_destroy(&qiov_full);
     complete_pdu(s, pdu, err);
 }
 
-- 
1.7.8.247.g10f4e.dirty

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PATCH 2/4] hw/9pfs: Use the correct signed type for different variables
  2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 1/4] hw/9pfs: replace iovec manipulation with QEMUIOVector Aneesh Kumar K.V
@ 2011-12-21  7:57 ` Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 3/4] hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values Aneesh Kumar K.V
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-21  7:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Aneesh Kumar K.V

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fsdev/file-op-9p.h  |    2 +-
 hw/9pfs/virtio-9p.c |   21 +++++++++++----------
 hw/9pfs/virtio-9p.h |    2 +-
 trace-events        |    8 ++++----
 4 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index a85ecd3..c823fe0 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -74,7 +74,7 @@ typedef struct FsContext
 } FsContext;
 
 typedef struct V9fsPath {
-    int16_t size;
+    uint16_t size;
     char *data;
 } V9fsPath;
 
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 46dc9f7..7f1301b 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1694,8 +1694,8 @@ out_nofid:
     complete_pdu(s, pdu, err);
 }
 
-static int v9fs_xattr_read(V9fsState *s, V9fsPDU *pdu,
-                           V9fsFidState *fidp, int64_t off, int32_t max_count)
+static int v9fs_xattr_read(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp,
+                           uint64_t off, uint32_t max_count)
 {
     size_t offset = 7;
     int read_count;
@@ -1719,7 +1719,7 @@ static int v9fs_xattr_read(V9fsState *s, V9fsPDU *pdu,
 }
 
 static int v9fs_do_readdir_with_stat(V9fsPDU *pdu,
-                                     V9fsFidState *fidp, int32_t max_count)
+                                     V9fsFidState *fidp, uint32_t max_count)
 {
     V9fsPath path;
     V9fsStat v9stat;
@@ -1814,11 +1814,11 @@ static void v9fs_init_qiov_from_pdu(QEMUIOVector *qiov, V9fsPDU *pdu,
 static void v9fs_read(void *opaque)
 {
     int32_t fid;
-    int64_t off;
+    uint64_t off;
     ssize_t err = 0;
     int32_t count = 0;
     size_t offset = 7;
-    int32_t max_count;
+    uint32_t max_count;
     V9fsFidState *fidp;
     V9fsPDU *pdu = opaque;
     V9fsState *s = pdu->s;
@@ -1962,8 +1962,9 @@ static void v9fs_readdir(void *opaque)
     V9fsFidState *fidp;
     ssize_t retval = 0;
     size_t offset = 7;
-    int64_t initial_offset;
-    int32_t count, max_count;
+    uint64_t initial_offset;
+    int32_t count;
+    uint32_t max_count;
     V9fsPDU *pdu = opaque;
     V9fsState *s = pdu->s;
 
@@ -2001,7 +2002,7 @@ out_nofid:
 }
 
 static int v9fs_xattr_write(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp,
-                            int64_t off, int32_t count,
+                            uint64_t off, uint32_t count,
                             struct iovec *sg, int cnt)
 {
     int i, to_copy;
@@ -2048,8 +2049,8 @@ static void v9fs_write(void *opaque)
 {
     ssize_t err;
     int32_t fid;
-    int64_t off;
-    int32_t count;
+    uint64_t off;
+    uint32_t count;
     int32_t len = 0;
     int32_t total = 0;
     size_t offset = 7;
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 8b612da..19a797b 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -156,7 +156,7 @@ typedef struct V9fsFidState V9fsFidState;
 
 typedef struct V9fsString
 {
-    int16_t size;
+    uint16_t size;
     char *data;
 } V9fsString;
 
diff --git a/trace-events b/trace-events
index 514849a..2918398 100644
--- a/trace-events
+++ b/trace-events
@@ -578,11 +578,11 @@ v9fs_lcreate(uint16_t tag, uint8_t id, int32_t dfid, int32_t flags, int32_t mode
 v9fs_lcreate_return(uint16_t tag, uint8_t id, int8_t type, int32_t version, int64_t path, int32_t iounit) "tag %d id %d qid={type %d version %d path %"PRId64"} iounit %d"
 v9fs_fsync(uint16_t tag, uint8_t id, int32_t fid, int datasync) "tag %d id %d fid %d datasync %d"
 v9fs_clunk(uint16_t tag, uint8_t id, int32_t fid) "tag %d id %d fid %d"
-v9fs_read(uint16_t tag, uint8_t id, int32_t fid, int64_t off, int32_t max_count) "tag %d id %d fid %d off %"PRId64" max_count %d"
+v9fs_read(uint16_t tag, uint8_t id, int32_t fid, uint64_t off, uint32_t max_count) "tag %d id %d fid %d off %"PRIu64" max_count %u"
 v9fs_read_return(uint16_t tag, uint8_t id, int32_t count, ssize_t err) "tag %d id %d count %d err %zd"
-v9fs_readdir(uint16_t tag, uint8_t id, int32_t fid, int64_t offset, int32_t max_count) "tag %d id %d fid %d offset %"PRId64" max_count %d"
-v9fs_readdir_return(uint16_t tag, uint8_t id, int32_t count, ssize_t retval) "tag %d id %d count %d retval %zd"
-v9fs_write(uint16_t tag, uint8_t id, int32_t fid, int64_t off, int32_t count, int cnt) "tag %d id %d fid %d off %"PRId64" count %d cnt %d"
+v9fs_readdir(uint16_t tag, uint8_t id, int32_t fid, uint64_t offset, uint32_t max_count) "tag %d id %d fid %d offset %"PRIu64" max_count %u"
+v9fs_readdir_return(uint16_t tag, uint8_t id, uint32_t count, ssize_t retval) "tag %d id %d count %u retval %zd"
+v9fs_write(uint16_t tag, uint8_t id, int32_t fid, uint64_t off, uint32_t count, int cnt) "tag %d id %d fid %d off %"PRIu64" count %u cnt %d"
 v9fs_write_return(uint16_t tag, uint8_t id, int32_t total, ssize_t err) "tag %d id %d total %d err %zd"
 v9fs_create(uint16_t tag, uint8_t id, int32_t fid, char* name, int32_t perm, int8_t mode) "tag %d id %d fid %d name %s perm %d mode %d"
 v9fs_create_return(uint16_t tag, uint8_t id, int8_t type, int32_t version, int64_t path, int iounit) "tag %d id %d qid={type %d version %d path %"PRId64"} iounit %d"
-- 
1.7.8.247.g10f4e.dirty

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PATCH 3/4] hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values.
  2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 1/4] hw/9pfs: replace iovec manipulation with QEMUIOVector Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 2/4] hw/9pfs: Use the correct signed type for different variables Aneesh Kumar K.V
@ 2011-12-21  7:57 ` Aneesh Kumar K.V
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 4/4] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations Aneesh Kumar K.V
  2011-12-27 16:36 ` [Qemu-devel] [PULL] VirtFS update Anthony Liguori
  4 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-21  7:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Aneesh Kumar K.V

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

Kernel internal values can change, add protocol values for these constant and
use them.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 hw/9pfs/virtio-9p.c |   47 ++++++++++++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 7f1301b..df0a8e7 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1293,17 +1293,18 @@ out_nofid:
     complete_pdu(s, pdu, retval);
 }
 
-/* From Linux kernel code */
-#define ATTR_MODE    (1 << 0)
-#define ATTR_UID     (1 << 1)
-#define ATTR_GID     (1 << 2)
-#define ATTR_SIZE    (1 << 3)
-#define ATTR_ATIME   (1 << 4)
-#define ATTR_MTIME   (1 << 5)
-#define ATTR_CTIME   (1 << 6)
-#define ATTR_MASK    127
-#define ATTR_ATIME_SET  (1 << 7)
-#define ATTR_MTIME_SET  (1 << 8)
+/* Attribute flags */
+#define P9_ATTR_MODE       (1 << 0)
+#define P9_ATTR_UID        (1 << 1)
+#define P9_ATTR_GID        (1 << 2)
+#define P9_ATTR_SIZE       (1 << 3)
+#define P9_ATTR_ATIME      (1 << 4)
+#define P9_ATTR_MTIME      (1 << 5)
+#define P9_ATTR_CTIME      (1 << 6)
+#define P9_ATTR_ATIME_SET  (1 << 7)
+#define P9_ATTR_MTIME_SET  (1 << 8)
+
+#define P9_ATTR_MASK    127
 
 static void v9fs_setattr(void *opaque)
 {
@@ -1322,16 +1323,16 @@ static void v9fs_setattr(void *opaque)
         err = -EINVAL;
         goto out_nofid;
     }
-    if (v9iattr.valid & ATTR_MODE) {
+    if (v9iattr.valid & P9_ATTR_MODE) {
         err = v9fs_co_chmod(pdu, &fidp->path, v9iattr.mode);
         if (err < 0) {
             goto out;
         }
     }
-    if (v9iattr.valid & (ATTR_ATIME | ATTR_MTIME)) {
+    if (v9iattr.valid & (P9_ATTR_ATIME | P9_ATTR_MTIME)) {
         struct timespec times[2];
-        if (v9iattr.valid & ATTR_ATIME) {
-            if (v9iattr.valid & ATTR_ATIME_SET) {
+        if (v9iattr.valid & P9_ATTR_ATIME) {
+            if (v9iattr.valid & P9_ATTR_ATIME_SET) {
                 times[0].tv_sec = v9iattr.atime_sec;
                 times[0].tv_nsec = v9iattr.atime_nsec;
             } else {
@@ -1340,8 +1341,8 @@ static void v9fs_setattr(void *opaque)
         } else {
             times[0].tv_nsec = UTIME_OMIT;
         }
-        if (v9iattr.valid & ATTR_MTIME) {
-            if (v9iattr.valid & ATTR_MTIME_SET) {
+        if (v9iattr.valid & P9_ATTR_MTIME) {
+            if (v9iattr.valid & P9_ATTR_MTIME_SET) {
                 times[1].tv_sec = v9iattr.mtime_sec;
                 times[1].tv_nsec = v9iattr.mtime_nsec;
             } else {
@@ -1359,13 +1360,13 @@ static void v9fs_setattr(void *opaque)
      * If the only valid entry in iattr is ctime we can call
      * chown(-1,-1) to update the ctime of the file
      */
-    if ((v9iattr.valid & (ATTR_UID | ATTR_GID)) ||
-        ((v9iattr.valid & ATTR_CTIME)
-         && !((v9iattr.valid & ATTR_MASK) & ~ATTR_CTIME))) {
-        if (!(v9iattr.valid & ATTR_UID)) {
+    if ((v9iattr.valid & (P9_ATTR_UID | P9_ATTR_GID)) ||
+        ((v9iattr.valid & P9_ATTR_CTIME)
+         && !((v9iattr.valid & P9_ATTR_MASK) & ~P9_ATTR_CTIME))) {
+        if (!(v9iattr.valid & P9_ATTR_UID)) {
             v9iattr.uid = -1;
         }
-        if (!(v9iattr.valid & ATTR_GID)) {
+        if (!(v9iattr.valid & P9_ATTR_GID)) {
             v9iattr.gid = -1;
         }
         err = v9fs_co_chown(pdu, &fidp->path, v9iattr.uid,
@@ -1374,7 +1375,7 @@ static void v9fs_setattr(void *opaque)
             goto out;
         }
     }
-    if (v9iattr.valid & (ATTR_SIZE)) {
+    if (v9iattr.valid & (P9_ATTR_SIZE)) {
         err = v9fs_co_truncate(pdu, &fidp->path, v9iattr.size);
         if (err < 0) {
             goto out;
-- 
1.7.8.247.g10f4e.dirty

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PATCH 4/4] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations.
  2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
                   ` (2 preceding siblings ...)
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 3/4] hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values Aneesh Kumar K.V
@ 2011-12-21  7:57 ` Aneesh Kumar K.V
  2011-12-27 16:36 ` [Qemu-devel] [PULL] VirtFS update Anthony Liguori
  4 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-21  7:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Harsh Prateek Bora, Aneesh Kumar K.V

From: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>

Currently, we just print the numerical value of 9p operation identifier in
case of RERROR which is less meaningful for readability. Mapping 9p
operation ids to symbolic names provides a better tracelog:

	RERROR (tag = 1 , id = TWALK , err = " No such file or directory ")
	RERROR (tag = 1 , id = TUNLINKAT , err = " Directory not empty ")

This patch provides a dictionary of all possible 9p operation symbols mapped
to their numerical identifiers which are likely to be used in future at
various places in this script.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 scripts/analyse-9p-simpletrace.py |   75 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simpletrace.py
index b6d58fd..3c3dee4 100755
--- a/scripts/analyse-9p-simpletrace.py
+++ b/scripts/analyse-9p-simpletrace.py
@@ -3,15 +3,86 @@
 # Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid>
 #
 # Author: Harsh Prateek Bora
-
+import os
 import simpletrace
 
+symbol_9p = {
+    6   : 'TLERROR',
+    7   : 'RLERROR',
+    8   : 'TSTATFS',
+    9   : 'RSTATFS',
+    12  : 'TLOPEN',
+    13  : 'RLOPEN',
+    14  : 'TLCREATE',
+    15  : 'RLCREATE',
+    16  : 'TSYMLINK',
+    17  : 'RSYMLINK',
+    18  : 'TMKNOD',
+    19  : 'RMKNOD',
+    20  : 'TRENAME',
+    21  : 'RRENAME',
+    22  : 'TREADLINK',
+    23  : 'RREADLINK',
+    24  : 'TGETATTR',
+    25  : 'RGETATTR',
+    26  : 'TSETATTR',
+    27  : 'RSETATTR',
+    30  : 'TXATTRWALK',
+    31  : 'RXATTRWALK',
+    32  : 'TXATTRCREATE',
+    33  : 'RXATTRCREATE',
+    40  : 'TREADDIR',
+    41  : 'RREADDIR',
+    50  : 'TFSYNC',
+    51  : 'RFSYNC',
+    52  : 'TLOCK',
+    53  : 'RLOCK',
+    54  : 'TGETLOCK',
+    55  : 'RGETLOCK',
+    70  : 'TLINK',
+    71  : 'RLINK',
+    72  : 'TMKDIR',
+    73  : 'RMKDIR',
+    74  : 'TRENAMEAT',
+    75  : 'RRENAMEAT',
+    76  : 'TUNLINKAT',
+    77  : 'RUNLINKAT',
+    100 : 'TVERSION',
+    101 : 'RVERSION',
+    102 : 'TAUTH',
+    103 : 'RAUTH',
+    104 : 'TATTACH',
+    105 : 'RATTACH',
+    106 : 'TERROR',
+    107 : 'RERROR',
+    108 : 'TFLUSH',
+    109 : 'RFLUSH',
+    110 : 'TWALK',
+    111 : 'RWALK',
+    112 : 'TOPEN',
+    113 : 'ROPEN',
+    114 : 'TCREATE',
+    115 : 'RCREATE',
+    116 : 'TREAD',
+    117 : 'RREAD',
+    118 : 'TWRITE',
+    119 : 'RWRITE',
+    120 : 'TCLUNK',
+    121 : 'RCLUNK',
+    122 : 'TREMOVE',
+    123 : 'RREMOVE',
+    124 : 'TSTAT',
+    125 : 'RSTAT',
+    126 : 'TWSTAT',
+    127 : 'RWSTAT'
+}
+
 class VirtFSRequestTracker(simpletrace.Analyzer):
         def begin(self):
                 print "Pretty printing 9p simpletrace log ..."
 
         def v9fs_rerror(self, tag, id, err):
-                print "RERROR (tag =", tag, ", id =", id, ",err =", err, ")"
+                print "RERROR (tag =", tag, ", id =", symbol_9p[id], ", err = \"", os.strerror(err), "\")"
 
         def v9fs_version(self, tag, id, msize, version):
                 print "TVERSION (tag =", tag, ", msize =", msize, ", version =", version, ")"
-- 
1.7.8.247.g10f4e.dirty

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
                   ` (3 preceding siblings ...)
  2011-12-21  7:57 ` [Qemu-devel] [PATCH 4/4] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations Aneesh Kumar K.V
@ 2011-12-27 16:36 ` Anthony Liguori
  4 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2011-12-27 16:36 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: qemu-devel

On 12/21/2011 01:57 AM, Aneesh Kumar K.V wrote:
> Hi Anthony,
>
> This is the updated pull request after moving the repo to github. I added two
> patches to the series. The signed tag for-anthony is updated with updated info
>
> The following changes since commit 3799ce4ab64f578eb818689a276e4f0c73d01fb5:
>
>    sd: Remember to reset .expecting_acmd on reset. (2011-12-21 05:04:21 +0100)
>
> are available in the git repository at:
>
>    git://github.com/kvaneesh/QEMU.git for-upstream
>
> for you to fetch changes up to 058a96ed506d77714bcce3d69b351e364078c080:
>
>    scripts/analyse-9p-simpletrace.py:	Add symbolic names for 9p operations. (2011-12-21 12:37:23 +0530)

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> (from the branch description for for-upstream local branch)
>
> branch for landing changes for upstream merge
>
> ----------------------------------------------------------------
> Aneesh Kumar K.V (2):
>        hw/9pfs: Use the correct signed type for different variables
>        hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values.
>
> Harsh Prateek Bora (1):
>        scripts/analyse-9p-simpletrace.py:	Add symbolic names for 9p operations.
>
> Stefan Hajnoczi (1):
>        hw/9pfs: replace iovec manipulation with QEMUIOVector
>
>   fsdev/file-op-9p.h                |    2 +-
>   hw/9pfs/virtio-9p.c               |  230 +++++++++++++++----------------------
>   hw/9pfs/virtio-9p.h               |    2 +-
>   scripts/analyse-9p-simpletrace.py |   75 ++++++++++++-
>   trace-events                      |    8 +-
>   5 files changed, 174 insertions(+), 143 deletions(-)
>
>
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2015-06-16 15:29 Aneesh Kumar K.V
@ 2015-06-17 11:26 ` Peter Maydell
  0 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2015-06-17 11:26 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers, Anthony Liguori

On 16 June 2015 at 16:29, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
> The following changes since commit 93f6d1c16036aaf34055d16f54ea770fb8d6d280:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150615-1' into staging (2015-06-16 10:35:43 +0100)
>
> are available in the git repository at:
>
>   https://github.com/kvaneesh/qemu.git tags/for-upstream-signed
>
> for you to fetch changes up to f8d30a4f96d6c3a12e692d2e69b8fe4734b916c6:
>
>   virtfs-proxy-helper: fail gracefully if socket path is too long (2015-06-16 20:32:29 +0530)
>
> ----------------------------------------------------------------
> VirtFS update:
>
> * Fix for virtfs-proxy-helper crash
> * Gracefully handle the error condition on input validation in virtfs-proxy-helper
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2015-06-16 15:29 Aneesh Kumar K.V
  2015-06-17 11:26 ` Peter Maydell
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2015-06-16 15:29 UTC (permalink / raw)
  To: anthony, peter.maydell; +Cc: qemu-devel, Aneesh Kumar K.V

The following changes since commit 93f6d1c16036aaf34055d16f54ea770fb8d6d280:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150615-1' into staging (2015-06-16 10:35:43 +0100)

are available in the git repository at:

  https://github.com/kvaneesh/qemu.git tags/for-upstream-signed

for you to fetch changes up to f8d30a4f96d6c3a12e692d2e69b8fe4734b916c6:

  virtfs-proxy-helper: fail gracefully if socket path is too long (2015-06-16 20:32:29 +0530)

----------------------------------------------------------------
VirtFS update:

* Fix for virtfs-proxy-helper crash
* Gracefully handle the error condition on input validation in virtfs-proxy-helper

----------------------------------------------------------------
Stefan Hajnoczi (2):
      virtfs-proxy-helper: add missing long option terminator
      virtfs-proxy-helper: fail gracefully if socket path is too long

 fsdev/virtfs-proxy-helper.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2015-03-16 10:09 Aneesh Kumar K.V
@ 2015-03-16 13:55 ` Peter Maydell
  0 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2015-03-16 13:55 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers, Anthony Liguori

On 16 March 2015 at 10:09, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> Hi,
>
> Please pull the below update for VirtFS
>
> The following changes since commit ee74801035b0b5f1fdfd4e31d3a53f511f91c804:
>
>   Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150311' into staging (2015-03-11 18:22:15 +0000)
>
> are available in the git repository at:
>
>   https://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to 4ed7b2c3a78f785a1bcbe575e08c379b166723e3:

Nudge: this is not a signed pull request. I am currently still
accepting and applying these, but after 2.3 is out I plan to
start rejecting them. You should update your workflow (ask me
if you're not sure how, it's not too much different).

>   virtio: Fix memory leaks reported by Coverity (2015-03-16 13:32:24 +0530)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2015-03-16 10:09 Aneesh Kumar K.V
  2015-03-16 13:55 ` Peter Maydell
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2015-03-16 10:09 UTC (permalink / raw)
  To: anthony, peter.maydell; +Cc: qemu-devel, Aneesh Kumar K.V


Hi,

Please pull the below update for VirtFS

The following changes since commit ee74801035b0b5f1fdfd4e31d3a53f511f91c804:

  Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150311' into staging (2015-03-11 18:22:15 +0000)

are available in the git repository at:

  https://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to 4ed7b2c3a78f785a1bcbe575e08c379b166723e3:

  virtio: Fix memory leaks reported by Coverity (2015-03-16 13:32:24 +0530)

----------------------------------------------------------------
Michael Tokarev (2):
      9pfs-local: simplify/optimize local_mapped_attr_path()
      9pfs-proxy: tiny cleanups in proxy_pwritev and proxy_preadv

Shannon Zhao (3):
      hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access
      fsdev/virtfs-proxy-helper: Fix improper use of negative value
      virtfs-proxy: Fix possible overflow

Stefan Weil (1):
      virtio: Fix memory leaks reported by Coverity

 fsdev/virtfs-proxy-helper.c   |  4 ++++
 hw/9pfs/virtio-9p-local.c     | 52 ++++++++++++++++---------------------------
 hw/9pfs/virtio-9p-posix-acl.c |  2 +-
 hw/9pfs/virtio-9p-proxy.c     | 22 +++++++++---------
 4 files changed, 36 insertions(+), 44 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-09-04 16:01 Aneesh Kumar K.V
@ 2014-09-04 18:21 ` Peter Maydell
  0 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2014-09-04 18:21 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers, Anthony Liguori

On 4 September 2014 17:01, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
> The following changes since commit 30eaca3acdf17d7bcbd1213eb149c02037edfb0b:
>
>   Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20140902-1' into staging (2014-09-02 10:26:10 +0100)
>
> are available in the git repository at:
>
>
>   https://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to 840a1bf2832f5783d1070547fcb460216fc219e5:
>
>   hw/9pfs: Don't return type from host in readdir on local 9p filesystem (2014-09-04 10:51:13 -0500)
>
> ----------------------------------------------------------------
> Aneesh Kumar K.V (1):
>       hw/9pfs: Use little-endian format for xattr values
>
> Bastian Blank (1):
>       hw/9pfs: Don't return type from host in readdir on local 9p filesystem
>
>  hw/9pfs/virtio-9p-local.c | 49 +++++++++++++++++++++++------------------------
>  1 file changed, 24 insertions(+), 25 deletions(-)
>
> --
> 1.9.1

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2014-09-04 16:01 Aneesh Kumar K.V
  2014-09-04 18:21 ` Peter Maydell
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2014-09-04 16:01 UTC (permalink / raw)
  To: anthony, peter.maydell; +Cc: qemu-devel, Aneesh Kumar K.V

The following changes since commit 30eaca3acdf17d7bcbd1213eb149c02037edfb0b:

  Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20140902-1' into staging (2014-09-02 10:26:10 +0100)

are available in the git repository at:


  https://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to 840a1bf2832f5783d1070547fcb460216fc219e5:

  hw/9pfs: Don't return type from host in readdir on local 9p filesystem (2014-09-04 10:51:13 -0500)

----------------------------------------------------------------
Aneesh Kumar K.V (1):
      hw/9pfs: Use little-endian format for xattr values

Bastian Blank (1):
      hw/9pfs: Don't return type from host in readdir on local 9p filesystem

 hw/9pfs/virtio-9p-local.c | 49 +++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 25 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-03-07 15:16 Aneesh Kumar K.V
@ 2014-03-08 12:52 ` Peter Maydell
  0 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2014-03-08 12:52 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers, Anthony Liguori

On 7 March 2014 15:16, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
> Hi,
>
> Please pull the below update for VirtFS
>
>
> The following changes since commit d5001cf787ad0514839a81d0f2e771e01e076e21:
>
>   xilinx: Delete hw/include/xilinx.h (2014-02-26 14:54:45 +1000)
>
> are available in the git repository at:
>
>   https://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to 993c91a0e996346c7ee8fa2ca310cc76edb59e17:
>
>   hw/9pfs: Include virtio-9p-device.o in build (2014-03-04 09:20:49 +0530)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2014-03-07 15:16 Aneesh Kumar K.V
  2014-03-08 12:52 ` Peter Maydell
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-07 15:16 UTC (permalink / raw)
  To: anthony, peter.maydell; +Cc: qemu-devel

Hi,

Please pull the below update for VirtFS


The following changes since commit d5001cf787ad0514839a81d0f2e771e01e076e21:

  xilinx: Delete hw/include/xilinx.h (2014-02-26 14:54:45 +1000)

are available in the git repository at:

  https://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to 993c91a0e996346c7ee8fa2ca310cc76edb59e17:

  hw/9pfs: Include virtio-9p-device.o in build (2014-03-04 09:20:49 +0530)

----------------------------------------------------------------
Aneesh Kumar K.V (1):
      hw/9pfs: Include virtio-9p-device.o in build

Chen Gang (3):
      hw/9pfs/virtio-9p-local.c: move v9fs_string_free() to below "err_out:"
      hw/9pfs/virtio-9p-local.c: use snprintf() instead of sprintf()
      hw/9pfs: use g_strdup_printf() instead of PATH_MAX limitation

Markus Armbruster (1):
      fsdev: Fix overrun after readlink() fills buffer completely

 Makefile.objs                  |   5 -
 fsdev/Makefile.objs            |   4 +-
 fsdev/virtfs-proxy-helper.c    |   2 +-
 hw/9pfs/cofs.c                 |  48 +++++--
 hw/9pfs/virtio-9p-handle.c     |   9 +-
 hw/9pfs/virtio-9p-local.c      | 288 +++++++++++++++++++++++++++--------------
 hw/9pfs/virtio-9p-posix-acl.c  |  52 ++++++--
 hw/9pfs/virtio-9p-xattr-user.c |  27 +++-
 hw/9pfs/virtio-9p-xattr.c      |   9 +-
 hw/9pfs/virtio-9p-xattr.h      |  27 +++-
 hw/9pfs/virtio-9p.h            |   6 +-
 hw/Makefile.objs               |   2 +-
 12 files changed, 322 insertions(+), 157 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-10 19:48     ` Andreas Färber
@ 2014-02-10 19:51       ` Peter Maydell
  0 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2014-02-10 19:51 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Aneesh Kumar K.V, Anthony Liguori, QEMU Developers

On 10 February 2014 19:48, Andreas Färber <afaerber@suse.de> wrote:
> Am 10.02.2014 20:43, schrieb Peter Maydell:
>> On 10 February 2014 19:21, Andreas Färber <afaerber@suse.de> wrote:
>>> Please remember to label the pull request [PULL 0/m] and to thread the
>>> actual commits as [PULL n/m]. We had to adopt our scripts, too.
>>>
>>> Peter, please either enforce those rules or drop them for all of us!
>>
>> My workflow for applying pull requests doesn't technically
>> require this or check for it, and so I'm not going to
> [snip]
>
> Anthony said that his "patches" tool relies on the 0/x, and I thought
> you were using the same...

I was, but since the patches db isn't currently updating I
wrote a script which drives git directly and just wants the
"repo-url branchname" bit from the cover letter (and I find
the cover letters by textual search for the magic words that
git puts in pull requests).

thanks
-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-10 19:43   ` Peter Maydell
@ 2014-02-10 19:48     ` Andreas Färber
  2014-02-10 19:51       ` Peter Maydell
  0 siblings, 1 reply; 45+ messages in thread
From: Andreas Färber @ 2014-02-10 19:48 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Aneesh Kumar K.V, Anthony Liguori, QEMU Developers

Am 10.02.2014 20:43, schrieb Peter Maydell:
> On 10 February 2014 19:21, Andreas Färber <afaerber@suse.de> wrote:
>> Please remember to label the pull request [PULL 0/m] and to thread the
>> actual commits as [PULL n/m]. We had to adopt our scripts, too.
>>
>> Peter, please either enforce those rules or drop them for all of us!
> 
> My workflow for applying pull requests doesn't technically
> require this or check for it, and so I'm not going to
[snip]

Anthony said that his "patches" tool relies on the 0/x, and I thought
you were using the same...

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-10 19:21 ` Andreas Färber
@ 2014-02-10 19:43   ` Peter Maydell
  2014-02-10 19:48     ` Andreas Färber
  0 siblings, 1 reply; 45+ messages in thread
From: Peter Maydell @ 2014-02-10 19:43 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Aneesh Kumar K.V, Anthony Liguori, QEMU Developers

On 10 February 2014 19:21, Andreas Färber <afaerber@suse.de> wrote:
> Please remember to label the pull request [PULL 0/m] and to thread the
> actual commits as [PULL n/m]. We had to adopt our scripts, too.
>
> Peter, please either enforce those rules or drop them for all of us!

My workflow for applying pull requests doesn't technically
require this or check for it, and so I'm not going to
"enforce" this, since I might well not notice (and in this
case didn't). The rule is not for my benefit when applying
pulls, but for people who might be CC'd on patches forming
part of a pull request and who would otherwise not be able
to tell whether they could reasonably ignore them.

As usual we should:
(a) document our best practice:
 http://wiki.qemu.org/Contribute/SubmitAPullRequest
(b) politely nudge people if they have not followed it
 (and anybody who is adversely affected should feel free
 to do that; I don't have any particular greater standing
 here than you do); since this is pretty much always simply
 an occasional contributor who wasn't aware of something,
 a gentle nudge should be sufficient
(c) be open to reconsidering our practices if on balance the
 burden turns out to be greater than the benefit. (In this
 case personally I think the rule is a useful one.)

It's inevitably the case that some of our process isn't
enforced by technical means and so there will be occasional
accidental violations; we should in general assume good
faith. I'm not going to punitively refuse to apply pull
requests simply because they don't meet every detail of
what we prefer to do (though of course I will and
already have refused pulls which fail on significant points
like lack of signoff or review).

thanks
-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-05  7:14 Aneesh Kumar K.V
  2014-02-05  7:58 ` Aneesh Kumar K.V
  2014-02-10 18:48 ` Peter Maydell
@ 2014-02-10 19:21 ` Andreas Färber
  2014-02-10 19:43   ` Peter Maydell
  2 siblings, 1 reply; 45+ messages in thread
From: Andreas Färber @ 2014-02-10 19:21 UTC (permalink / raw)
  To: Aneesh Kumar K.V, Peter Maydell; +Cc: QEMU Developers, Anthony Liguori

Hi Aneesh,

Please remember to label the pull request [PULL 0/m] and to thread the
actual commits as [PULL n/m]. We had to adopt our scripts, too.

Peter, please either enforce those rules or drop them for all of us!

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-05  7:14 Aneesh Kumar K.V
  2014-02-05  7:58 ` Aneesh Kumar K.V
@ 2014-02-10 18:48 ` Peter Maydell
  2014-02-10 19:21 ` Andreas Färber
  2 siblings, 0 replies; 45+ messages in thread
From: Peter Maydell @ 2014-02-10 18:48 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: Anthony Liguori, QEMU Developers

On 5 February 2014 07:14, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> Hi Anthony,
>
> Please pull the below update for VirtFS
>
> The following changes since commit 2f61120c10da9128357510debc8e66880cd2bfdc:
>
>   Merge remote-tracking branch 'qmp-unstable/queue/qmp' into staging (2014-02-01 23:32:31 +0000)
>
> are available in the git repository at:
>
>
>   https://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to f8b7ee38b3ed4ec2da5cc0529cf0cf82c8589805:
>
>   hw/9pfs: fix P9_STATS_GEN handling (2014-02-02 22:09:16 +0530)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2014-02-05  7:14 Aneesh Kumar K.V
@ 2014-02-05  7:58 ` Aneesh Kumar K.V
  2014-02-10 18:48 ` Peter Maydell
  2014-02-10 19:21 ` Andreas Färber
  2 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2014-02-05  7:58 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


Adding the correct email address for Anthony.

-aneesh

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> Hi Anthony,
>
> Please pull the below update for VirtFS
>
> The following changes since commit 2f61120c10da9128357510debc8e66880cd2bfdc:
>
>   Merge remote-tracking branch 'qmp-unstable/queue/qmp' into staging (2014-02-01 23:32:31 +0000)
>
> are available in the git repository at:
>
>
>   https://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to f8b7ee38b3ed4ec2da5cc0529cf0cf82c8589805:
>
>   hw/9pfs: fix P9_STATS_GEN handling (2014-02-02 22:09:16 +0530)
>
> ----------------------------------------------------------------
> Kirill A. Shutemov (4):
>       hw/9pfs: fix error handing in local_ioc_getversion()
>       hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion()
>       hw/9pfs: make get_st_gen() return ENOTTY error on special files
>       hw/9pfs: fix P9_STATS_GEN handling
>
>  hw/9pfs/cofile.c           |  4 ----
>  hw/9pfs/virtio-9p-handle.c |  8 +++++++-
>  hw/9pfs/virtio-9p-local.c  | 10 ++++++----
>  hw/9pfs/virtio-9p-proxy.c  |  3 ++-
>  hw/9pfs/virtio-9p.c        | 12 ++++++++++--
>  5 files changed, 25 insertions(+), 12 deletions(-)
>
>  -aneesh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2014-02-05  7:14 Aneesh Kumar K.V
  2014-02-05  7:58 ` Aneesh Kumar K.V
                   ` (2 more replies)
  0 siblings, 3 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2014-02-05  7:14 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


Hi Anthony,

Please pull the below update for VirtFS

The following changes since commit 2f61120c10da9128357510debc8e66880cd2bfdc:

  Merge remote-tracking branch 'qmp-unstable/queue/qmp' into staging (2014-02-01 23:32:31 +0000)

are available in the git repository at:


  https://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to f8b7ee38b3ed4ec2da5cc0529cf0cf82c8589805:

  hw/9pfs: fix P9_STATS_GEN handling (2014-02-02 22:09:16 +0530)

----------------------------------------------------------------
Kirill A. Shutemov (4):
      hw/9pfs: fix error handing in local_ioc_getversion()
      hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion()
      hw/9pfs: make get_st_gen() return ENOTTY error on special files
      hw/9pfs: fix P9_STATS_GEN handling

 hw/9pfs/cofile.c           |  4 ----
 hw/9pfs/virtio-9p-handle.c |  8 +++++++-
 hw/9pfs/virtio-9p-local.c  | 10 ++++++----
 hw/9pfs/virtio-9p-proxy.c  |  3 ++-
 hw/9pfs/virtio-9p.c        | 12 ++++++++++--
 5 files changed, 25 insertions(+), 12 deletions(-)

 -aneesh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2013-05-29 11:33 Aneesh Kumar K.V
@ 2013-05-31 18:48 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2013-05-31 18:48 UTC (permalink / raw)
  To: Aneesh Kumar K.V, Anthony Liguori, QEMU Developers

Pulled.  Thanks.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2013-05-29 11:33 Aneesh Kumar K.V
  2013-05-31 18:48 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2013-05-29 11:33 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


The following changes since commit 371386fb60961e0afc02f03c817dff79633e323e:

  Update version for 1.5.0 release. (2013-05-20 08:20:08 -0500)

are available in the git repository at:

  git://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to db431f6adc881a0758512cd765b3108209013512:

  hw/9pfs: Be robust against paths without FS_IOC_GETVERSION (2013-05-28 15:23:12 +0530)

----------------------------------------------------------------
Aneesh Kumar K.V (3):
      hw/9pfs: Fix segfault with 9p2000.u
      hw/9pfs: use O_NOFOLLOW for mapped readlink operation
      hw/9pfs: Use O_NOFOLLOW when opening files on server

Gabriel de Perthuis (1):
      hw/9pfs: Be robust against paths without FS_IOC_GETVERSION

 hw/9pfs/cofile.c          |  4 ++++
 hw/9pfs/virtio-9p-local.c | 50 +++++++++++++++++++++++++++++++++++++++--------
 hw/9pfs/virtio-9p.c       |  2 +-
 3 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c
index 2efebf3..194c130 100644
--- a/hw/9pfs/cofile.c
+++ b/hw/9pfs/cofile.c
@@ -38,6 +38,10 @@ int v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t st_mode,
             });
         v9fs_path_unlock(s);
     }
+    /* The ioctl may not be supported depending on the path */
+    if (err == -ENOTTY) {
+        err = 0;
+    }
     return err;
 }
 
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index 6ece6f7..fc93e9e 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -59,6 +59,33 @@ static const char *local_mapped_attr_path(FsContext *ctx,
     return buffer;
 }
 
+static FILE *local_fopen(const char *path, const char *mode)
+{
+    int fd, o_mode = 0;
+    FILE *fp;
+    int flags = O_NOFOLLOW;
+    /*
+     * only supports two modes
+     */
+    if (mode[0] == 'r') {
+        flags |= O_RDONLY;
+    } else if (mode[0] == 'w') {
+        flags |= O_WRONLY | O_TRUNC | O_CREAT;
+        o_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
+    } else {
+        return NULL;
+    }
+    fd = open(path, flags, o_mode);
+    if (fd == -1) {
+        return NULL;
+    }
+    fp = fdopen(fd, mode);
+    if (!fp) {
+        close(fd);
+    }
+    return fp;
+}
+
 #define ATTR_MAX 100
 static void local_mapped_file_attr(FsContext *ctx, const char *path,
                                    struct stat *stbuf)
@@ -68,7 +95,7 @@ static void local_mapped_file_attr(FsContext *ctx, const char *path,
     char attr_path[PATH_MAX];
 
     local_mapped_attr_path(ctx, path, attr_path);
-    fp = fopen(attr_path, "r");
+    fp = local_fopen(attr_path, "r");
     if (!fp) {
         return;
     }
@@ -152,7 +179,7 @@ static int local_set_mapped_file_attr(FsContext *ctx,
     char attr_path[PATH_MAX];
     int uid = -1, gid = -1, mode = -1, rdev = -1;
 
-    fp = fopen(local_mapped_attr_path(ctx, path, attr_path), "r");
+    fp = local_fopen(local_mapped_attr_path(ctx, path, attr_path), "r");
     if (!fp) {
         goto create_map_file;
     }
@@ -179,7 +206,7 @@ create_map_file:
     }
 
 update_map_file:
-    fp = fopen(attr_path, "w");
+    fp = local_fopen(attr_path, "w");
     if (!fp) {
         ret = -1;
         goto err_out;
@@ -284,7 +311,7 @@ static ssize_t local_readlink(FsContext *fs_ctx, V9fsPath *fs_path,
     if ((fs_ctx->export_flags & V9FS_SM_MAPPED) ||
         (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE)) {
         int fd;
-        fd = open(rpath(fs_ctx, path, buffer), O_RDONLY);
+        fd = open(rpath(fs_ctx, path, buffer), O_RDONLY | O_NOFOLLOW);
         if (fd == -1) {
             return -1;
         }
@@ -316,7 +343,7 @@ static int local_open(FsContext *ctx, V9fsPath *fs_path,
     char buffer[PATH_MAX];
     char *path = fs_path->data;
 
-    fs->fd = open(rpath(ctx, path, buffer), flags);
+    fs->fd = open(rpath(ctx, path, buffer), flags | O_NOFOLLOW);
     return fs->fd;
 }
 
@@ -601,6 +628,11 @@ static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name,
     V9fsString fullname;
     char buffer[PATH_MAX];
 
+    /*
+     * Mark all the open to not follow symlinks
+     */
+    flags |= O_NOFOLLOW;
+
     v9fs_string_init(&fullname);
     v9fs_string_sprintf(&fullname, "%s/%s", dir_path->data, name);
     path = fullname.data;
@@ -676,8 +708,9 @@ static int local_symlink(FsContext *fs_ctx, const char *oldpath,
     if (fs_ctx->export_flags & V9FS_SM_MAPPED) {
         int fd;
         ssize_t oldpath_size, write_size;
-        fd = open(rpath(fs_ctx, newpath, buffer), O_CREAT|O_EXCL|O_RDWR,
-                SM_LOCAL_MODE_BITS);
+        fd = open(rpath(fs_ctx, newpath, buffer),
+                  O_CREAT|O_EXCL|O_RDWR|O_NOFOLLOW,
+                  SM_LOCAL_MODE_BITS);
         if (fd == -1) {
             err = fd;
             goto out;
@@ -705,7 +738,8 @@ static int local_symlink(FsContext *fs_ctx, const char *oldpath,
     } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {
         int fd;
         ssize_t oldpath_size, write_size;
-        fd = open(rpath(fs_ctx, newpath, buffer), O_CREAT|O_EXCL|O_RDWR,
+        fd = open(rpath(fs_ctx, newpath, buffer),
+                  O_CREAT|O_EXCL|O_RDWR|O_NOFOLLOW,
                   SM_LOCAL_MODE_BITS);
         if (fd == -1) {
             err = fd;
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 296f66f..8cbb8ae 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -658,7 +658,7 @@ static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
         ret |= S_IFIFO;
     }
     if (mode & P9_STAT_MODE_DEVICE) {
-        if (extension && extension->data[0] == 'c') {
+        if (extension->size && extension->data[0] == 'c') {
             ret |= S_IFCHR;
         } else {
             ret |= S_IFBLK;

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-12-05 16:37 Aneesh Kumar K.V
@ 2012-12-10 16:58 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2012-12-10 16:58 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> The following changes since commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e:
>
>   Open up 1.4 development branch (2012-12-03 14:08:40 -0600)
>
> are available in the git repository at:
>
>   git://github.com/kvaneesh/qemu.git for-upstream
>
> for you to fetch changes up to 9fd2ecdc8cb2dc1a8a7c57b6c9c60bc9947b6a73:
>
>   virtfs-proxy-helper: use setresuid and setresgid (2012-12-05 21:55:54 +0530)
>

Pulled. Thanks.

Regards,

Anthony Liguori

> ----------------------------------------------------------------
> Paolo Bonzini (1):
>       virtfs-proxy-helper: use setresuid and setresgid
>
>  fsdev/virtfs-proxy-helper.c |   93 +++++++++++++++++++++++++++++--------------
>  1 file changed, 64 insertions(+), 29 deletions(-)
>
> diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
> index f9a8270..df2a939 100644
> --- a/fsdev/virtfs-proxy-helper.c
> +++ b/fsdev/virtfs-proxy-helper.c
> @@ -272,31 +272,76 @@ static int send_status(int sockfd, struct iovec *iovec, int status)
>  /*
>   * from man 7 capabilities, section
>   * Effect of User ID Changes on Capabilities:
> - * 4. If the file system user ID is changed from 0 to nonzero (see setfsuid(2))
> - * then the following capabilities are cleared from the effective set:
> - * CAP_CHOWN, CAP_DAC_OVERRIDE, CAP_DAC_READ_SEARCH,  CAP_FOWNER, CAP_FSETID,
> - * CAP_LINUX_IMMUTABLE  (since  Linux 2.2.30), CAP_MAC_OVERRIDE, and CAP_MKNOD
> - * (since Linux 2.2.30). If the file system UID is changed from nonzero to 0,
> - * then any of these capabilities that are enabled in the permitted set
> - * are enabled in the effective set.
> + * If the effective user ID is changed from nonzero to 0, then the permitted
> + * set is copied to the effective set.  If the effective user ID is changed
> + * from 0 to nonzero, then all capabilities are are cleared from the effective
> + * set.
> + *
> + * The setfsuid/setfsgid man pages warn that changing the effective user ID may
> + * expose the program to unwanted signals, but this is not true anymore: for an
> + * unprivileged (without CAP_KILL) program to send a signal, the real or
> + * effective user ID of the sending process must equal the real or saved user
> + * ID of the target process.  Even when dropping privileges, it is enough to
> + * keep the saved UID to a "privileged" value and virtfs-proxy-helper won't
> + * be exposed to signals.  So just use setresuid/setresgid.
>   */
> -static int setfsugid(int uid, int gid)
> +static int setugid(int uid, int gid, int *suid, int *sgid)
>  {
> +    int retval;
> +
>      /*
> -     * We still need DAC_OVERRIDE because  we don't change
> +     * We still need DAC_OVERRIDE because we don't change
>       * supplementary group ids, and hence may be subjected DAC rules
>       */
>      cap_value_t cap_list[] = {
>          CAP_DAC_OVERRIDE,
>      };
>  
> -    setfsgid(gid);
> -    setfsuid(uid);
> +    *suid = geteuid();
> +    *sgid = getegid();
> +
> +    if (setresgid(-1, gid, *sgid) == -1) {
> +        retval = -errno;
> +        goto err_out;
> +    }
> +
> +    if (setresuid(-1, uid, *suid) == -1) {
> +        retval = -errno;
> +        goto err_sgid;
> +    }
>  
>      if (uid != 0 || gid != 0) {
> -        return do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0);
> +        if (do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0) < 0) {
> +            retval = -errno;
> +            goto err_suid;
> +        }
>      }
>      return 0;
> +
> +err_suid:
> +    if (setresuid(-1, *suid, *suid) == -1) {
> +        abort();
> +    }
> +err_sgid:
> +    if (setresgid(-1, *sgid, *sgid) == -1) {
> +        abort();
> +    }
> +err_out:
> +    return retval;
> +}
> +
> +/*
> + * This is used to reset the ugid back with the saved values
> + * There is nothing much we can do checking error values here.
> + */
> +static void resetugid(int suid, int sgid)
> +{
> +    if (setresgid(-1, sgid, sgid) == -1) {
> +        abort();
> +    }
> +    if (setresuid(-1, suid, suid) == -1) {
> +        abort();
> +    }
>  }
>  
>  /*
> @@ -578,18 +623,15 @@ static int do_create_others(int type, struct iovec *iovec)
>  
>      v9fs_string_init(&path);
>      v9fs_string_init(&oldpath);
> -    cur_uid = geteuid();
> -    cur_gid = getegid();
>  
>      retval = proxy_unmarshal(iovec, offset, "dd", &uid, &gid);
>      if (retval < 0) {
>          return retval;
>      }
>      offset += retval;
> -    retval = setfsugid(uid, gid);
> +    retval = setugid(uid, gid, &cur_uid, &cur_gid);
>      if (retval < 0) {
> -        retval = -errno;
> -        goto err_out;
> +        goto unmarshal_err_out;
>      }
>      switch (type) {
>      case T_MKNOD:
> @@ -619,9 +661,10 @@ static int do_create_others(int type, struct iovec *iovec)
>      }
>  
>  err_out:
> +    resetugid(cur_uid, cur_gid);
> +unmarshal_err_out:
>      v9fs_string_free(&path);
>      v9fs_string_free(&oldpath);
> -    setfsugid(cur_uid, cur_gid);
>      return retval;
>  }
>  
> @@ -641,24 +684,16 @@ static int do_create(struct iovec *iovec)
>      if (ret < 0) {
>          goto unmarshal_err_out;
>      }
> -    cur_uid = geteuid();
> -    cur_gid = getegid();
> -    ret = setfsugid(uid, gid);
> +    ret = setugid(uid, gid, &cur_uid, &cur_gid);
>      if (ret < 0) {
> -        /*
> -         * On failure reset back to the
> -         * old uid/gid
> -         */
> -        ret = -errno;
> -        goto err_out;
> +        goto unmarshal_err_out;
>      }
>      ret = open(path.data, flags, mode);
>      if (ret < 0) {
>          ret = -errno;
>      }
>  
> -err_out:
> -    setfsugid(cur_uid, cur_gid);
> +    resetugid(cur_uid, cur_gid);
>  unmarshal_err_out:
>      v9fs_string_free(&path);
>      return ret;

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2012-12-05 16:37 Aneesh Kumar K.V
  2012-12-10 16:58 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-12-05 16:37 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers


The following changes since commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e:

  Open up 1.4 development branch (2012-12-03 14:08:40 -0600)

are available in the git repository at:

  git://github.com/kvaneesh/qemu.git for-upstream

for you to fetch changes up to 9fd2ecdc8cb2dc1a8a7c57b6c9c60bc9947b6a73:

  virtfs-proxy-helper: use setresuid and setresgid (2012-12-05 21:55:54 +0530)

----------------------------------------------------------------
Paolo Bonzini (1):
      virtfs-proxy-helper: use setresuid and setresgid

 fsdev/virtfs-proxy-helper.c |   93 +++++++++++++++++++++++++++++--------------
 1 file changed, 64 insertions(+), 29 deletions(-)

diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index f9a8270..df2a939 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -272,31 +272,76 @@ static int send_status(int sockfd, struct iovec *iovec, int status)
 /*
  * from man 7 capabilities, section
  * Effect of User ID Changes on Capabilities:
- * 4. If the file system user ID is changed from 0 to nonzero (see setfsuid(2))
- * then the following capabilities are cleared from the effective set:
- * CAP_CHOWN, CAP_DAC_OVERRIDE, CAP_DAC_READ_SEARCH,  CAP_FOWNER, CAP_FSETID,
- * CAP_LINUX_IMMUTABLE  (since  Linux 2.2.30), CAP_MAC_OVERRIDE, and CAP_MKNOD
- * (since Linux 2.2.30). If the file system UID is changed from nonzero to 0,
- * then any of these capabilities that are enabled in the permitted set
- * are enabled in the effective set.
+ * If the effective user ID is changed from nonzero to 0, then the permitted
+ * set is copied to the effective set.  If the effective user ID is changed
+ * from 0 to nonzero, then all capabilities are are cleared from the effective
+ * set.
+ *
+ * The setfsuid/setfsgid man pages warn that changing the effective user ID may
+ * expose the program to unwanted signals, but this is not true anymore: for an
+ * unprivileged (without CAP_KILL) program to send a signal, the real or
+ * effective user ID of the sending process must equal the real or saved user
+ * ID of the target process.  Even when dropping privileges, it is enough to
+ * keep the saved UID to a "privileged" value and virtfs-proxy-helper won't
+ * be exposed to signals.  So just use setresuid/setresgid.
  */
-static int setfsugid(int uid, int gid)
+static int setugid(int uid, int gid, int *suid, int *sgid)
 {
+    int retval;
+
     /*
-     * We still need DAC_OVERRIDE because  we don't change
+     * We still need DAC_OVERRIDE because we don't change
      * supplementary group ids, and hence may be subjected DAC rules
      */
     cap_value_t cap_list[] = {
         CAP_DAC_OVERRIDE,
     };
 
-    setfsgid(gid);
-    setfsuid(uid);
+    *suid = geteuid();
+    *sgid = getegid();
+
+    if (setresgid(-1, gid, *sgid) == -1) {
+        retval = -errno;
+        goto err_out;
+    }
+
+    if (setresuid(-1, uid, *suid) == -1) {
+        retval = -errno;
+        goto err_sgid;
+    }
 
     if (uid != 0 || gid != 0) {
-        return do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0);
+        if (do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0) < 0) {
+            retval = -errno;
+            goto err_suid;
+        }
     }
     return 0;
+
+err_suid:
+    if (setresuid(-1, *suid, *suid) == -1) {
+        abort();
+    }
+err_sgid:
+    if (setresgid(-1, *sgid, *sgid) == -1) {
+        abort();
+    }
+err_out:
+    return retval;
+}
+
+/*
+ * This is used to reset the ugid back with the saved values
+ * There is nothing much we can do checking error values here.
+ */
+static void resetugid(int suid, int sgid)
+{
+    if (setresgid(-1, sgid, sgid) == -1) {
+        abort();
+    }
+    if (setresuid(-1, suid, suid) == -1) {
+        abort();
+    }
 }
 
 /*
@@ -578,18 +623,15 @@ static int do_create_others(int type, struct iovec *iovec)
 
     v9fs_string_init(&path);
     v9fs_string_init(&oldpath);
-    cur_uid = geteuid();
-    cur_gid = getegid();
 
     retval = proxy_unmarshal(iovec, offset, "dd", &uid, &gid);
     if (retval < 0) {
         return retval;
     }
     offset += retval;
-    retval = setfsugid(uid, gid);
+    retval = setugid(uid, gid, &cur_uid, &cur_gid);
     if (retval < 0) {
-        retval = -errno;
-        goto err_out;
+        goto unmarshal_err_out;
     }
     switch (type) {
     case T_MKNOD:
@@ -619,9 +661,10 @@ static int do_create_others(int type, struct iovec *iovec)
     }
 
 err_out:
+    resetugid(cur_uid, cur_gid);
+unmarshal_err_out:
     v9fs_string_free(&path);
     v9fs_string_free(&oldpath);
-    setfsugid(cur_uid, cur_gid);
     return retval;
 }
 
@@ -641,24 +684,16 @@ static int do_create(struct iovec *iovec)
     if (ret < 0) {
         goto unmarshal_err_out;
     }
-    cur_uid = geteuid();
-    cur_gid = getegid();
-    ret = setfsugid(uid, gid);
+    ret = setugid(uid, gid, &cur_uid, &cur_gid);
     if (ret < 0) {
-        /*
-         * On failure reset back to the
-         * old uid/gid
-         */
-        ret = -errno;
-        goto err_out;
+        goto unmarshal_err_out;
     }
     ret = open(path.data, flags, mode);
     if (ret < 0) {
         ret = -errno;
     }
 
-err_out:
-    setfsugid(cur_uid, cur_gid);
+    resetugid(cur_uid, cur_gid);
 unmarshal_err_out:
     v9fs_string_free(&path);
     return ret;

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-07-31 17:27 Aneesh Kumar K.V
@ 2012-08-03 20:45 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2012-08-03 20:45 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> Hi Anthony,
>
> I have merged the configure fix which is sent as a part of 
>
> http://thread.gmane.org/gmane.comp.emulators.qemu/160620/focus=160634
>
> The following changes since commit 5e3bc7144edd6e4fa2824944e5eb16c28197dd5a:
>
>   Merge remote-tracking branch 'mst/tags/for_anthony' into staging (2012-07-30 10:00:48 -0500)
>
> are available in the git repository at:
>
>
>   git://github.com/kvaneesh/QEMU.git for-upstream
>
> for you to fetch changes up to 4cdc0789ec17ce1ce48506cae62035310e932a2e:
>
>   hw/9pfs: Fix assert when disabling migration (2012-07-31 22:01:40 +0530)

Pulled. Thanks.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> Aneesh Kumar K.V (1):
>       hw/9pfs: Fix assert when disabling migration
>
> Stefan Weil (1):
>       configure: Fix build with capabilities
>
>  configure           |    2 +-
>  hw/9pfs/virtio-9p.c |   15 ++++++++++-----
>  2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/configure b/configure
> index c65b5f6..309aeac 100755
> --- a/configure
> +++ b/configure
> @@ -2084,7 +2084,7 @@ if test "$cap" != "no" ; then
>    cat > $TMPC <<EOF
>  #include <stdio.h>
>  #include <sys/capability.h>
> -int main(void) { cap_t caps; caps = cap_init(); }
> +int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
>  EOF
>    if compile_prog "" "-lcap" ; then
>      cap=yes
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index f4a7026..4b52540 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -983,11 +983,16 @@ static void v9fs_attach(void *opaque)
>      err += offset;
>      trace_v9fs_attach_return(pdu->tag, pdu->id,
>                               qid.type, qid.version, qid.path);
> -    s->root_fid = fid;
> -    /* disable migration */
> -    error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
> -              s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
> -    migrate_add_blocker(s->migration_blocker);
> +    /*
> +     * disable migration if we haven't done already.
> +     * attach could get called multiple times for the same export.
> +     */
> +    if (!s->migration_blocker) {
> +        s->root_fid = fid;
> +        error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
> +                  s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
> +        migrate_add_blocker(s->migration_blocker);
> +    }
>  out:
>      put_fid(pdu, fidp);
>  out_nofid:

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2012-07-31 17:27 Aneesh Kumar K.V
  2012-08-03 20:45 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-07-31 17:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers


Hi Anthony,

I have merged the configure fix which is sent as a part of 

http://thread.gmane.org/gmane.comp.emulators.qemu/160620/focus=160634

The following changes since commit 5e3bc7144edd6e4fa2824944e5eb16c28197dd5a:

  Merge remote-tracking branch 'mst/tags/for_anthony' into staging (2012-07-30 10:00:48 -0500)

are available in the git repository at:


  git://github.com/kvaneesh/QEMU.git for-upstream

for you to fetch changes up to 4cdc0789ec17ce1ce48506cae62035310e932a2e:

  hw/9pfs: Fix assert when disabling migration (2012-07-31 22:01:40 +0530)

----------------------------------------------------------------
Aneesh Kumar K.V (1):
      hw/9pfs: Fix assert when disabling migration

Stefan Weil (1):
      configure: Fix build with capabilities

 configure           |    2 +-
 hw/9pfs/virtio-9p.c |   15 ++++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index c65b5f6..309aeac 100755
--- a/configure
+++ b/configure
@@ -2084,7 +2084,7 @@ if test "$cap" != "no" ; then
   cat > $TMPC <<EOF
 #include <stdio.h>
 #include <sys/capability.h>
-int main(void) { cap_t caps; caps = cap_init(); }
+int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
 EOF
   if compile_prog "" "-lcap" ; then
     cap=yes
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index f4a7026..4b52540 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -983,11 +983,16 @@ static void v9fs_attach(void *opaque)
     err += offset;
     trace_v9fs_attach_return(pdu->tag, pdu->id,
                              qid.type, qid.version, qid.path);
-    s->root_fid = fid;
-    /* disable migration */
-    error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
-              s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
-    migrate_add_blocker(s->migration_blocker);
+    /*
+     * disable migration if we haven't done already.
+     * attach could get called multiple times for the same export.
+     */
+    if (!s->migration_blocker) {
+        s->root_fid = fid;
+        error_set(&s->migration_blocker, QERR_VIRTFS_FEATURE_BLOCKS_MIGRATION,
+                  s->ctx.fs_root ? s->ctx.fs_root : "NULL", s->tag);
+        migrate_add_blocker(s->migration_blocker);
+    }
 out:
     put_fid(pdu, fidp);
 out_nofid:

^ permalink raw reply related	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-02-26 17:44 Aneesh Kumar K.V
@ 2012-02-28 15:33 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2012-02-28 15:33 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: qemu-devel

On 02/26/2012 11:44 AM, Aneesh Kumar K.V wrote:
> Hi Anthony,
>
> Please pull the below VirtFS  update
>
> -aneesh
>
> The following changes since commit 235fe3bfd46b1104575b540d0bc3fdf584030b99:
>
>    qom: add test tools (2012-02-22 12:18:26 -0600)
>
> are available in the git repository at:
>
>    git://github.com/kvaneesh/QEMU.git for-upstream
>
> for you to fetch changes up to 67d6fa53629f1eb3401974d740310c10e03fa1c9:
>
>    hw/9pfs: Endian fixes for virtfs (2012-02-24 14:01:19 +0530)

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> Benjamin Herrenschmidt (1):
>        hw/9pfs: Endian fixes for virtfs
>
> Meador Inge (1):
>        ./configure: add option for disabling VirtFS
>
>   Makefile            |    2 ++
>   configure           |   25 +++++++++++++++++++------
>   hw/9pfs/virtio-9p.c |    8 +++++---
>   3 files changed, 26 insertions(+), 9 deletions(-)
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2012-02-26 17:44 Aneesh Kumar K.V
  2012-02-28 15:33 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-02-26 17:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori


Hi Anthony,

Please pull the below VirtFS  update

-aneesh

The following changes since commit 235fe3bfd46b1104575b540d0bc3fdf584030b99:

  qom: add test tools (2012-02-22 12:18:26 -0600)

are available in the git repository at:

  git://github.com/kvaneesh/QEMU.git for-upstream

for you to fetch changes up to 67d6fa53629f1eb3401974d740310c10e03fa1c9:

  hw/9pfs: Endian fixes for virtfs (2012-02-24 14:01:19 +0530)

----------------------------------------------------------------
Benjamin Herrenschmidt (1):
      hw/9pfs: Endian fixes for virtfs

Meador Inge (1):
      ./configure: add option for disabling VirtFS

 Makefile            |    2 ++
 configure           |   25 +++++++++++++++++++------
 hw/9pfs/virtio-9p.c |    8 +++++---
 3 files changed, 26 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-01-30 16:14 Aneesh Kumar K.V
@ 2012-02-07 12:36 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-02-07 12:36 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


Hi Anthony,

Any update on this pull request ? You have merged the MAINTAINERS file
update separately. But that conflict should be easy to fix.

-anesh

On Mon, 30 Jan 2012 21:44:33 +0530, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> 
> Hi Anthony,
> 
> I now have a successful build at build bot. So hopefully build breakage
> is gone. I also added "remove O_NOATIME" patch which Mohan acked.
> 
> -anees
> 
> The following changes since commit 8c4ec5c0269bda18bb777a64b2008088d1c632dc:
> 
>   pxa2xx_keypad: fix unbalanced parenthesis. (2012-01-17 02:14:42 +0100)
> 
> are available in the git repository at:
> 
>   git://github.com/kvaneesh/QEMU.git for-upstream
> 
> for you to fetch changes up to eed968607d656a218712df47a5e0432c21fd6994:
> 
>   hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode (2012-01-30 10:54:17 +0530)
> 
> ----------------------------------------------------------------
> (from the branch description for for-upstream local branch)
> 
> branch for landing changes for upstream merge
> 
> ----------------------------------------------------------------
> Aneesh Kumar K.V (3):
>       hw/9pfs: Add new security model mapped-file.
>       hw/9pfs: Fix crash when mounting with synthfs
>       hw/9pfs: Update MAINTAINERS file
> 
> Daniel P. Berrange (1):
>       hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode
> 
> M. Mohan Kumar (2):
>       hw/9pfs: Preserve S_ISGID
>       fsdev: Fix parameter parsing for proxy helper
> 
>  MAINTAINERS                 |    6 +-
>  fsdev/file-op-9p.h          |   12 +-
>  fsdev/virtfs-proxy-helper.c |   10 +-
>  hw/9pfs/cofile.c            |   14 ++
>  hw/9pfs/virtio-9p-device.c  |    9 -
>  hw/9pfs/virtio-9p-handle.c  |    4 +-
>  hw/9pfs/virtio-9p-local.c   |  357 ++++++++++++++++++++++++++++++++++++++++++-
>  hw/9pfs/virtio-9p.c         |    3 +-
>  qemu-options.hx             |   18 ++-
>  9 files changed, 397 insertions(+), 36 deletions(-)
> 

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2012-01-30 16:14 Aneesh Kumar K.V
  2012-02-07 12:36 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-01-30 16:14 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


Hi Anthony,

I now have a successful build at build bot. So hopefully build breakage
is gone. I also added "remove O_NOATIME" patch which Mohan acked.

-anees

The following changes since commit 8c4ec5c0269bda18bb777a64b2008088d1c632dc:

  pxa2xx_keypad: fix unbalanced parenthesis. (2012-01-17 02:14:42 +0100)

are available in the git repository at:

  git://github.com/kvaneesh/QEMU.git for-upstream

for you to fetch changes up to eed968607d656a218712df47a5e0432c21fd6994:

  hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode (2012-01-30 10:54:17 +0530)

----------------------------------------------------------------
(from the branch description for for-upstream local branch)

branch for landing changes for upstream merge

----------------------------------------------------------------
Aneesh Kumar K.V (3):
      hw/9pfs: Add new security model mapped-file.
      hw/9pfs: Fix crash when mounting with synthfs
      hw/9pfs: Update MAINTAINERS file

Daniel P. Berrange (1):
      hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode

M. Mohan Kumar (2):
      hw/9pfs: Preserve S_ISGID
      fsdev: Fix parameter parsing for proxy helper

 MAINTAINERS                 |    6 +-
 fsdev/file-op-9p.h          |   12 +-
 fsdev/virtfs-proxy-helper.c |   10 +-
 hw/9pfs/cofile.c            |   14 ++
 hw/9pfs/virtio-9p-device.c  |    9 -
 hw/9pfs/virtio-9p-handle.c  |    4 +-
 hw/9pfs/virtio-9p-local.c   |  357 ++++++++++++++++++++++++++++++++++++++++++-
 hw/9pfs/virtio-9p.c         |    3 +-
 qemu-options.hx             |   18 ++-
 9 files changed, 397 insertions(+), 36 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-01-23 17:05 ` Anthony Liguori
@ 2012-01-23 18:25   ` Aneesh Kumar K.V
  0 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-01-23 18:25 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers

On Mon, 23 Jan 2012 11:05:25 -0600, Anthony Liguori <aliguori@us.ibm.com> wrote:
> On 01/23/2012 07:02 AM, Aneesh Kumar K.V wrote:
> >
> >
> > The following changes since commit 8c4ec5c0269bda18bb777a64b2008088d1c632dc:
> >
> >    pxa2xx_keypad: fix unbalanced parenthesis. (2012-01-17 02:14:42 +0100)
> >
> > are available in the git repository at:
> >
> >    git://github.com/kvaneesh/QEMU.git for-upstream
> >
> > for you to fetch changes up to 0700a73cfe166100cb59e28aad2c1fc5e4e952cb:
> >
> >    hw/9pfs: Update MAINTAINERS file (2012-01-23 12:26:54 +0530)
> 
>    CC    libhw64/9pfs/virtio-9p-local.o
> cc1: warnings being treated as errors
> /home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c: In function 
> ‘local_set_mapped_file_attr’:
> /home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:9: error: ‘uid’ may be used 
> uninitialized in this function
> /home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:14: error: ‘gid’ may be 
> used uninitialized in this function
> /home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:19: error: ‘mode’ may be 
> used uninitialized in this function
> /home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:25: error: ‘rdev’ may be 
> used uninitialized in this function
> make[1]: *** [9pfs/virtio-9p-local.o] Error 1
> make: *** [subdir-libhw64] Error 2
> 
> I see a lot of build breakages come into through this tree.  I understand that 
> GCC can be fickle with -Werror but there's an easy way to solve this.
> 
> Please get your tree added to buildbot and make sure there's a successful 
> buildbot run before you do a pull request.

I will do this

> 
> Alternatively, setup multiple VMs to build test yourself.  But please do 
> something to check the build a bit more rigorously before sending future PULL 
> requests.
> 

I actually do build test on ubuntu 11.10, fedora 15, rhel5.7 before pull
request. That usually catch most of the errors like above. 

-aneesh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2012-01-23 13:02 Aneesh Kumar K.V
@ 2012-01-23 17:05 ` Anthony Liguori
  2012-01-23 18:25   ` Aneesh Kumar K.V
  0 siblings, 1 reply; 45+ messages in thread
From: Anthony Liguori @ 2012-01-23 17:05 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

On 01/23/2012 07:02 AM, Aneesh Kumar K.V wrote:
>
>
> The following changes since commit 8c4ec5c0269bda18bb777a64b2008088d1c632dc:
>
>    pxa2xx_keypad: fix unbalanced parenthesis. (2012-01-17 02:14:42 +0100)
>
> are available in the git repository at:
>
>    git://github.com/kvaneesh/QEMU.git for-upstream
>
> for you to fetch changes up to 0700a73cfe166100cb59e28aad2c1fc5e4e952cb:
>
>    hw/9pfs: Update MAINTAINERS file (2012-01-23 12:26:54 +0530)

   CC    libhw64/9pfs/virtio-9p-local.o
cc1: warnings being treated as errors
/home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c: In function 
‘local_set_mapped_file_attr’:
/home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:9: error: ‘uid’ may be used 
uninitialized in this function
/home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:14: error: ‘gid’ may be 
used uninitialized in this function
/home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:19: error: ‘mode’ may be 
used uninitialized in this function
/home/anthony/git/qemu/hw/9pfs/virtio-9p-local.c:153:25: error: ‘rdev’ may be 
used uninitialized in this function
make[1]: *** [9pfs/virtio-9p-local.o] Error 1
make: *** [subdir-libhw64] Error 2

I see a lot of build breakages come into through this tree.  I understand that 
GCC can be fickle with -Werror but there's an easy way to solve this.

Please get your tree added to buildbot and make sure there's a successful 
buildbot run before you do a pull request.

Alternatively, setup multiple VMs to build test yourself.  But please do 
something to check the build a bit more rigorously before sending future PULL 
requests.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> (from the branch description for for-upstream local branch)
>
> branch for landing changes for upstream merge
>
> ----------------------------------------------------------------
> Aneesh Kumar K.V (3):
>        hw/9pfs: Add new security model mapped-file.
>        hw/9pfs: Fix crash when mounting with synthfs
>        hw/9pfs: Update MAINTAINERS file
>
> M. Mohan Kumar (2):
>        hw/9pfs: Preserve S_ISGID
>        fsdev: Fix parameter parsing for proxy helper
>
>   MAINTAINERS                 |    6 +-
>   fsdev/file-op-9p.h          |   12 +-
>   fsdev/virtfs-proxy-helper.c |   10 +-
>   hw/9pfs/cofile.c            |   14 ++
>   hw/9pfs/virtio-9p-device.c  |    9 -
>   hw/9pfs/virtio-9p-handle.c  |    4 +-
>   hw/9pfs/virtio-9p-local.c   |  348 ++++++++++++++++++++++++++++++++++++++++++-
>   hw/9pfs/virtio-9p.c         |    2 +-
>   qemu-options.hx             |   18 ++-
>   9 files changed, 388 insertions(+), 35 deletions(-)
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2012-01-23 13:02 Aneesh Kumar K.V
  2012-01-23 17:05 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2012-01-23 13:02 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers



The following changes since commit 8c4ec5c0269bda18bb777a64b2008088d1c632dc:

  pxa2xx_keypad: fix unbalanced parenthesis. (2012-01-17 02:14:42 +0100)

are available in the git repository at:

  git://github.com/kvaneesh/QEMU.git for-upstream

for you to fetch changes up to 0700a73cfe166100cb59e28aad2c1fc5e4e952cb:

  hw/9pfs: Update MAINTAINERS file (2012-01-23 12:26:54 +0530)

----------------------------------------------------------------
(from the branch description for for-upstream local branch)

branch for landing changes for upstream merge

----------------------------------------------------------------
Aneesh Kumar K.V (3):
      hw/9pfs: Add new security model mapped-file.
      hw/9pfs: Fix crash when mounting with synthfs
      hw/9pfs: Update MAINTAINERS file

M. Mohan Kumar (2):
      hw/9pfs: Preserve S_ISGID
      fsdev: Fix parameter parsing for proxy helper

 MAINTAINERS                 |    6 +-
 fsdev/file-op-9p.h          |   12 +-
 fsdev/virtfs-proxy-helper.c |   10 +-
 hw/9pfs/cofile.c            |   14 ++
 hw/9pfs/virtio-9p-device.c  |    9 -
 hw/9pfs/virtio-9p-handle.c  |    4 +-
 hw/9pfs/virtio-9p-local.c   |  348 ++++++++++++++++++++++++++++++++++++++++++-
 hw/9pfs/virtio-9p.c         |    2 +-
 qemu-options.hx             |   18 ++-
 9 files changed, 388 insertions(+), 35 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2011-12-17 13:31 Aneesh Kumar K.V
  0 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-17 13:31 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers, qemu-stable


Hi Anthony,

This include a signed pull request. I guess you would require a recent
git to use the gpg info.

The following changes since commit 774d5c5b1604b8443a8e42048b370b6c95dbfc40:

  cris: Handle conditional stores on CRISv10 (2011-12-12 11:38:31 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/v9fs.git tag for-anthony

for you to fetch changes up to db6e84e6cbe728ea5dcecc62d40e4835ef2b1a4b:

  hw/9pfs: Use the correct signed type for different variables (2011-12-13 18:59:17 +0530)

----------------------------------------------------------------
Bug fix series. This should also be merged to 1.0 stable.

----------------------------------------------------------------
Aneesh Kumar K.V (1):
      hw/9pfs: Use the correct signed type for different variables

Stefan Hajnoczi (1):
      hw/9pfs: replace iovec manipulation with QEMUIOVector

 fsdev/file-op-9p.h  |    2 +-
 hw/9pfs/virtio-9p.c |  183 ++++++++++++++++++++-------------------------------
 hw/9pfs/virtio-9p.h |    2 +-
 trace-events        |    8 +-
 4 files changed, 77 insertions(+), 118 deletions(-)

-aneesh

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2011-12-05  9:04 Aneesh Kumar K.V
  0 siblings, 0 replies; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-12-05  9:04 UTC (permalink / raw)
  To: qemu-devel, jmforbes; +Cc: aliguori, qemu-stable

Hi,

I guess all these patches can be applied to 1.0 stable series.

The following changes since commit 1c8a881daaca6fe0646a425b0970fb3ad25f6732:

  Update version for 1.0 release (2011-12-01 14:04:21 -0600)

are available in the git repository at:
  git://repo.or.cz/qemu/v9fs.git 1.0-fixes

Aneesh Kumar K.V (4):
      hw/9pfs: Improve portability to older systems
      hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted
      hw/9pfs: Add qdev.reset callback for virtio-9p-pci device
      hw/9pfs: Use the correct file descriptor in Fsdriver Callback

Deepak C Shetty (1):
      hw/9pfs: Reset server state during TVERSION

 Makefile.objs              |    4 +-
 fsdev/file-op-9p.h         |    4 +-
 fsdev/qemu-fsdev.c         |    2 +
 hw/9pfs/cofile.c           |    4 +-
 hw/9pfs/virtio-9p-device.c |   25 +++++++++--------
 hw/9pfs/virtio-9p-handle.c |   61 ++++++++++++++++----------------------------
 hw/9pfs/virtio-9p-local.c  |   36 ++++++++++++++++++-------
 hw/9pfs/virtio-9p-synth.c  |    5 ++-
 hw/9pfs/virtio-9p.c        |   45 ++++++++++++++++++++++++++++++++
 hw/9pfs/virtio-9p.h        |    5 ++-
 hw/virtio-pci.c            |    2 +-
 hw/virtio-pci.h            |    1 +
 qerror.c                   |    5 +++
 qerror.h                   |    3 ++
 14 files changed, 130 insertions(+), 72 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] Virtfs update
  2011-11-02 14:09   ` Aneesh Kumar K.V
@ 2011-11-03 13:09     ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2011-11-03 13:09 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

On 11/02/2011 09:09 AM, Aneesh Kumar K.V wrote:
> On Wed, 02 Nov 2011 07:42:16 -0500, Anthony Liguori<aliguori@us.ibm.com>  wrote:
>> On 11/02/2011 05:22 AM, Aneesh Kumar K.V wrote:
>>>
>>> The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:
>>>
>>>     Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)
>>>
>>> are available in the git repository at:
>>>     git://repo.or.cz/qemu/v9fs.git for-upstream-8
>>>
>>> Aneesh Kumar K.V (1):
>>>         hw/9pfs: Move opt validation to FsDriver callback
>>>
>>> Stefan Hajnoczi (1):
>>>         hw/9pfs: use g_vasprintf() instead of rolling our own
>>
>> Neither of these look like bug fixes to me.
>>
>> Regards,
>>
>
> The related discussion for the first commit can be found at
>
> http://article.gmane.org/gmane.comp.emulators.qemu/122891
>
> I dropped the second commit. updated details below.

Pulled.  Thanks.

Regards,

Anthony Liguori

>
>
> The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:
>
>    Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)
>
> are available in the git repository at:
>    git://repo.or.cz/qemu/v9fs.git for-upstream-8
>
> Stefan Hajnoczi (1):
>        hw/9pfs: use g_vasprintf() instead of rolling our own
>
>   hw/9pfs/virtio-9p.c |  103 ++-------------------------------------------------
>   1 files changed, 4 insertions(+), 99 deletions(-)
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] Virtfs update
  2011-11-02 12:42 ` Anthony Liguori
  2011-11-02 14:09   ` Aneesh Kumar K.V
@ 2011-11-02 15:55   ` Markus Armbruster
  1 sibling, 0 replies; 45+ messages in thread
From: Markus Armbruster @ 2011-11-02 15:55 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Aneesh Kumar K.V, QEMU Developers

Anthony Liguori <aliguori@us.ibm.com> writes:

> On 11/02/2011 05:22 AM, Aneesh Kumar K.V wrote:
>>
>> The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:
>>
>>    Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)
>>
>> are available in the git repository at:
>>    git://repo.or.cz/qemu/v9fs.git for-upstream-8
>>
>> Aneesh Kumar K.V (1):
>>        hw/9pfs: Move opt validation to FsDriver callback
>>
>> Stefan Hajnoczi (1):
>>        hw/9pfs: use g_vasprintf() instead of rolling our own
>
> Neither of these look like bug fixes to me.

The second one is actually a minor portability fix: one of the replaced
functions uses va_copy() without a matching va_end().  I posted the
obvious fix "Subject: [PATCH 2/2] hw/9pfs: Supply missing va_end()", but
Stefan's fix is better.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] Virtfs update
  2011-11-02 12:42 ` Anthony Liguori
@ 2011-11-02 14:09   ` Aneesh Kumar K.V
  2011-11-03 13:09     ` Anthony Liguori
  2011-11-02 15:55   ` Markus Armbruster
  1 sibling, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-11-02 14:09 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers

On Wed, 02 Nov 2011 07:42:16 -0500, Anthony Liguori <aliguori@us.ibm.com> wrote:
> On 11/02/2011 05:22 AM, Aneesh Kumar K.V wrote:
> >
> > The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:
> >
> >    Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)
> >
> > are available in the git repository at:
> >    git://repo.or.cz/qemu/v9fs.git for-upstream-8
> >
> > Aneesh Kumar K.V (1):
> >        hw/9pfs: Move opt validation to FsDriver callback
> >
> > Stefan Hajnoczi (1):
> >        hw/9pfs: use g_vasprintf() instead of rolling our own
> 
> Neither of these look like bug fixes to me.
> 
> Regards,
> 

The related discussion for the first commit can be found at

http://article.gmane.org/gmane.comp.emulators.qemu/122891

I dropped the second commit. updated details below.


The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:

  Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)

are available in the git repository at:
  git://repo.or.cz/qemu/v9fs.git for-upstream-8

Stefan Hajnoczi (1):
      hw/9pfs: use g_vasprintf() instead of rolling our own

 hw/9pfs/virtio-9p.c |  103 ++-------------------------------------------------
 1 files changed, 4 insertions(+), 99 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] Virtfs update
  2011-11-02 10:22 [Qemu-devel] [PULL] Virtfs update Aneesh Kumar K.V
@ 2011-11-02 12:42 ` Anthony Liguori
  2011-11-02 14:09   ` Aneesh Kumar K.V
  2011-11-02 15:55   ` Markus Armbruster
  0 siblings, 2 replies; 45+ messages in thread
From: Anthony Liguori @ 2011-11-02 12:42 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

On 11/02/2011 05:22 AM, Aneesh Kumar K.V wrote:
>
> The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:
>
>    Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)
>
> are available in the git repository at:
>    git://repo.or.cz/qemu/v9fs.git for-upstream-8
>
> Aneesh Kumar K.V (1):
>        hw/9pfs: Move opt validation to FsDriver callback
>
> Stefan Hajnoczi (1):
>        hw/9pfs: use g_vasprintf() instead of rolling our own

Neither of these look like bug fixes to me.

Regards,

Anthony Liguori

>
>   fsdev/file-op-9p.h         |   15 ++++++-
>   fsdev/qemu-fsdev.c         |   44 +++----------------
>   fsdev/qemu-fsdev.h         |   10 ----
>   hw/9pfs/virtio-9p-device.c |   13 +++--
>   hw/9pfs/virtio-9p-handle.c |   20 +++++++++
>   hw/9pfs/virtio-9p-local.c  |   34 ++++++++++++++
>   hw/9pfs/virtio-9p.c        |  103 ++------------------------------------------
>   vl.c                       |    8 +---
>   8 files changed, 87 insertions(+), 160 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] Virtfs update
@ 2011-11-02 10:22 Aneesh Kumar K.V
  2011-11-02 12:42 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-11-02 10:22 UTC (permalink / raw)
  To: Anthony Liguori, QEMU Developers


The following changes since commit e072ea2fd8fdceef64159b9596d3c15ce01bea91:

  Bump version to 1.0-rc0 (2011-11-01 19:37:01 -0500)

are available in the git repository at:
  git://repo.or.cz/qemu/v9fs.git for-upstream-8

Aneesh Kumar K.V (1):
      hw/9pfs: Move opt validation to FsDriver callback

Stefan Hajnoczi (1):
      hw/9pfs: use g_vasprintf() instead of rolling our own

 fsdev/file-op-9p.h         |   15 ++++++-
 fsdev/qemu-fsdev.c         |   44 +++----------------
 fsdev/qemu-fsdev.h         |   10 ----
 hw/9pfs/virtio-9p-device.c |   13 +++--
 hw/9pfs/virtio-9p-handle.c |   20 +++++++++
 hw/9pfs/virtio-9p-local.c  |   34 ++++++++++++++
 hw/9pfs/virtio-9p.c        |  103 ++------------------------------------------
 vl.c                       |    8 +---
 8 files changed, 87 insertions(+), 160 deletions(-)

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2011-09-27  9:11 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
@ 2011-09-29 20:05 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2011-09-29 20:05 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

On 09/27/2011 04:11 AM, Aneesh Kumar K.V wrote:
>
> The following changes since commit d85a1302a91912c52cdc3fe459b313848a8a0792:
>
>    Merge remote-tracking branch 'kwolf/for-anthony' into staging (2011-09-22 10:31:26 -0500)
>
> are available in the git repository at:
>
>    git://repo.or.cz/qemu/v9fs.git for-upstream-5

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Aneesh Kumar K.V (8):
>        hw/9pfs: Make v9fs_string* functions non-static
>        hw/9pfs: Use read-write lock for protecting fid path.
>        hw/9pfs: Move fid pathname tracking to seperate data type.
>        hw/9pfs: Add init callback to fs driver
>        hw/9pfs: Add fs driver specific details to fscontext
>        hw/9pfs: Avoid unnecessary get_fid in v9fs_clunk
>        hw/9pfs: Implement TFLUSH operation
>        hw/9pfs: Add handle based fs driver
>
>   Makefile.objs              |    8 +-
>   fsdev/file-op-9p.h         |   54 ++-
>   fsdev/qemu-fsdev.c         |    1 +
>   fsdev/qemu-fsdev.h         |    1 +
>   hw/9pfs/codir.c            |   64 +++-
>   hw/9pfs/cofile.c           |  110 +++++--
>   hw/9pfs/cofs.c             |  195 ++++++++++--
>   hw/9pfs/coxattr.c          |   41 ++-
>   hw/9pfs/virtio-9p-coth.h   |   72 +++--
>   hw/9pfs/virtio-9p-device.c |   10 +-
>   hw/9pfs/virtio-9p-handle.c |  611 +++++++++++++++++++++++++++++++++
>   hw/9pfs/virtio-9p-local.c  |  213 +++++++++---
>   hw/9pfs/virtio-9p.c        |  820 ++++++++++++++++++++++++--------------------
>   hw/9pfs/virtio-9p.h        |   50 +++-
>   14 files changed, 1712 insertions(+), 538 deletions(-)
>   create mode 100644 hw/9pfs/virtio-9p-handle.c
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2011-09-27  9:11 Aneesh Kumar K.V
  2011-09-29 20:05 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-09-27  9:11 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers


The following changes since commit d85a1302a91912c52cdc3fe459b313848a8a0792:

  Merge remote-tracking branch 'kwolf/for-anthony' into staging (2011-09-22 10:31:26 -0500)

are available in the git repository at:

  git://repo.or.cz/qemu/v9fs.git for-upstream-5

Aneesh Kumar K.V (8):
      hw/9pfs: Make v9fs_string* functions non-static
      hw/9pfs: Use read-write lock for protecting fid path.
      hw/9pfs: Move fid pathname tracking to seperate data type.
      hw/9pfs: Add init callback to fs driver
      hw/9pfs: Add fs driver specific details to fscontext
      hw/9pfs: Avoid unnecessary get_fid in v9fs_clunk
      hw/9pfs: Implement TFLUSH operation
      hw/9pfs: Add handle based fs driver

 Makefile.objs              |    8 +-
 fsdev/file-op-9p.h         |   54 ++-
 fsdev/qemu-fsdev.c         |    1 +
 fsdev/qemu-fsdev.h         |    1 +
 hw/9pfs/codir.c            |   64 +++-
 hw/9pfs/cofile.c           |  110 +++++--
 hw/9pfs/cofs.c             |  195 ++++++++++--
 hw/9pfs/coxattr.c          |   41 ++-
 hw/9pfs/virtio-9p-coth.h   |   72 +++--
 hw/9pfs/virtio-9p-device.c |   10 +-
 hw/9pfs/virtio-9p-handle.c |  611 +++++++++++++++++++++++++++++++++
 hw/9pfs/virtio-9p-local.c  |  213 +++++++++---
 hw/9pfs/virtio-9p.c        |  820 ++++++++++++++++++++++++--------------------
 hw/9pfs/virtio-9p.h        |   50 +++-
 14 files changed, 1712 insertions(+), 538 deletions(-)
 create mode 100644 hw/9pfs/virtio-9p-handle.c

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [Qemu-devel] [PULL] VirtFS update
  2011-09-13 13:27 Aneesh Kumar K.V
@ 2011-09-15 19:10 ` Anthony Liguori
  0 siblings, 0 replies; 45+ messages in thread
From: Anthony Liguori @ 2011-09-15 19:10 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: QEMU Developers

On 09/13/2011 08:27 AM, Aneesh Kumar K.V wrote:
>
> Hi Anthony,
>
> This series contain few fixes to VirtFS server. The patch set also add
> two new 9p operations. Please pull.
>
> The following changes since commit 07ff2c4475df77e38a31d50ee7f3932631806c15:
>
>    Merge remote-tracking branch 'origin/master' into staging (2011-09-08 09:25:36 -0500)


Pulled.  Thanks.

Regards,

Anthony Liguori


> are available in the git repository at:
>
>    git://repo.or.cz/qemu/v9fs.git for-upstream-4
>
> Aneesh Kumar K.V (5):
>        hw/9pfs: Update the fidp path before opendir
>        hw/9pfs: Initialize rest of qid field to zero.
>        hw/9pfs: Fix memleaks in some 9p operation
>        hw/9pfs: add 9P2000.L renameat operation
>        hw/9pfs: add 9P2000.L unlinkat operation
>
>   hw/9pfs/virtio-9p.c |  126 +++++++++++++++++++++++++++++++++++++++++++++++++++
>   hw/9pfs/virtio-9p.h |    4 ++
>   2 files changed, 130 insertions(+), 0 deletions(-)
>
>
> -aneesh
>
>
>

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Qemu-devel] [PULL] VirtFS update
@ 2011-09-13 13:27 Aneesh Kumar K.V
  2011-09-15 19:10 ` Anthony Liguori
  0 siblings, 1 reply; 45+ messages in thread
From: Aneesh Kumar K.V @ 2011-09-13 13:27 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers


Hi Anthony,

This series contain few fixes to VirtFS server. The patch set also add
two new 9p operations. Please pull.

The following changes since commit 07ff2c4475df77e38a31d50ee7f3932631806c15:

  Merge remote-tracking branch 'origin/master' into staging (2011-09-08 09:25:36 -0500)

are available in the git repository at:

  git://repo.or.cz/qemu/v9fs.git for-upstream-4

Aneesh Kumar K.V (5):
      hw/9pfs: Update the fidp path before opendir
      hw/9pfs: Initialize rest of qid field to zero.
      hw/9pfs: Fix memleaks in some 9p operation
      hw/9pfs: add 9P2000.L renameat operation
      hw/9pfs: add 9P2000.L unlinkat operation

 hw/9pfs/virtio-9p.c |  126 +++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/9pfs/virtio-9p.h |    4 ++
 2 files changed, 130 insertions(+), 0 deletions(-)


-aneesh

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2015-06-17 11:26 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21  7:57 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
2011-12-21  7:57 ` [Qemu-devel] [PATCH 1/4] hw/9pfs: replace iovec manipulation with QEMUIOVector Aneesh Kumar K.V
2011-12-21  7:57 ` [Qemu-devel] [PATCH 2/4] hw/9pfs: Use the correct signed type for different variables Aneesh Kumar K.V
2011-12-21  7:57 ` [Qemu-devel] [PATCH 3/4] hw/9pfs: iattr_valid flags are kernel internal flags map them to 9p values Aneesh Kumar K.V
2011-12-21  7:57 ` [Qemu-devel] [PATCH 4/4] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations Aneesh Kumar K.V
2011-12-27 16:36 ` [Qemu-devel] [PULL] VirtFS update Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2015-06-16 15:29 Aneesh Kumar K.V
2015-06-17 11:26 ` Peter Maydell
2015-03-16 10:09 Aneesh Kumar K.V
2015-03-16 13:55 ` Peter Maydell
2014-09-04 16:01 Aneesh Kumar K.V
2014-09-04 18:21 ` Peter Maydell
2014-03-07 15:16 Aneesh Kumar K.V
2014-03-08 12:52 ` Peter Maydell
2014-02-05  7:14 Aneesh Kumar K.V
2014-02-05  7:58 ` Aneesh Kumar K.V
2014-02-10 18:48 ` Peter Maydell
2014-02-10 19:21 ` Andreas Färber
2014-02-10 19:43   ` Peter Maydell
2014-02-10 19:48     ` Andreas Färber
2014-02-10 19:51       ` Peter Maydell
2013-05-29 11:33 Aneesh Kumar K.V
2013-05-31 18:48 ` Anthony Liguori
2012-12-05 16:37 Aneesh Kumar K.V
2012-12-10 16:58 ` Anthony Liguori
2012-07-31 17:27 Aneesh Kumar K.V
2012-08-03 20:45 ` Anthony Liguori
2012-02-26 17:44 Aneesh Kumar K.V
2012-02-28 15:33 ` Anthony Liguori
2012-01-30 16:14 Aneesh Kumar K.V
2012-02-07 12:36 ` Aneesh Kumar K.V
2012-01-23 13:02 Aneesh Kumar K.V
2012-01-23 17:05 ` Anthony Liguori
2012-01-23 18:25   ` Aneesh Kumar K.V
2011-12-17 13:31 Aneesh Kumar K.V
2011-12-05  9:04 Aneesh Kumar K.V
2011-11-02 10:22 [Qemu-devel] [PULL] Virtfs update Aneesh Kumar K.V
2011-11-02 12:42 ` Anthony Liguori
2011-11-02 14:09   ` Aneesh Kumar K.V
2011-11-03 13:09     ` Anthony Liguori
2011-11-02 15:55   ` Markus Armbruster
2011-09-27  9:11 [Qemu-devel] [PULL] VirtFS update Aneesh Kumar K.V
2011-09-29 20:05 ` Anthony Liguori
2011-09-13 13:27 Aneesh Kumar K.V
2011-09-15 19:10 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.