Re: [Qemu-devel] [PATCH trivial] configure: explicitly disable virtfs if softmmu=no

2013-06-11 Thread M. Mohan Kumar
, I tried ./configure --disable-system --enable-virtfs and make. But didnt face any build failure. Could you please share your build failure information? virtfs-proxy-helper.1 is created inside the fsdev folder. Cc: qemu-triv...@nongnu.org Cc: M. Mohan Kumar mo...@in.ibm.com Signed-off

Re: [Qemu-devel] [PATCH trivial] configure: explicitly disable virtfs if softmmu=no

2013-06-11 Thread M. Mohan Kumar
Peter Maydell peter.mayd...@linaro.org writes: How about this approach? [PATCH] configure: Disable virtfs if softmmu not enabled Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- configure | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure

Re: [Qemu-devel] [PATCH trivial] configure: explicitly disable virtfs if softmmu=no

2013-06-11 Thread M. Mohan Kumar
Michael Tokarev m...@tls.msk.ru writes: 11.06.2013 21:23, M. Mohan Kumar wrote: Peter Maydell peter.mayd...@linaro.org writes: How about this approach? Well, this is definitely wrong :) -if test $softmmu = yes ; then - if test $virtfs != no ; then + +if test $virtfs

Re: [Qemu-devel] [PATCH] fsdev: Fix potential memory leak

2013-07-03 Thread M. Mohan Kumar
Stefan Weil s...@weilnetz.de writes: This leak was reported by cppcheck. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: M. Mohan Kumar mo...@in.ibm.com --- fsdev/qemu-fsdev.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index

Re: [Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-07-04 Thread M. Mohan Kumar
Stefan Weil s...@weilnetz.de writes: The leak was reported by cppcheck. Function proxy_init also calls g_free for ctx-fs_root. Avoid reuse of this memory by setting ctx-fs_root to NULL. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: M. Mohan Kumar mo...@in.ibm.com --- Hi, I'm

[Qemu-devel] [PATCH 1/1] hw/9pfs: Fix memory leak in error path

2013-07-04 Thread M. Mohan Kumar
From: M. Mohan Kumar mo...@in.ibm.com Fix few more memory leaks in virtio-9p-device.c detected using valgrind. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-device.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/9pfs

Re: [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci

2010-10-12 Thread M. Mohan Kumar
Pattern: FOO's PCIDeviceInfo method exit is virtio_FOO_exit_pci(), which calls virtio_FOO_exit() and virtio_exit_pci(). virtio_{net,serial}_exit() call virtio_cleanup(). virtio_blk_exit() doesn't. Why? virtio-balloon-pci uses virtio_exit_pci() as exit method. No virtio_cleanup()?

Re: [Qemu-devel] [PATCH] virtio-9p: fix build on !CONFIG_UTIMENSAT v2

2010-11-07 Thread M. Mohan Kumar
This patch introduce a fallback mechanism for old systems that do not support utimensat. This will fix build failure with following warnings: hw/virtio-9p-local.c: In function 'local_utimensat': hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'

[Qemu-devel] [PATCH 1/2] virtio-9p: Use chroot to safely access files in passthrough model

2010-11-15 Thread M. Mohan Kumar
calls. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/file-op-9p.h |2 + hw/virtio-9p-chroot.c | 275 + hw/virtio-9p.c| 20 hw/virtio-9p.h| 21 5 files changed, 319

[Qemu-devel] [PATCH 2/2] virtio-9p: Use chroot interface in passthrough model

2010-11-15 Thread M. Mohan Kumar
Make use of chroot interfaces for passthrough security model to fix the vulnerability in following symbolic links. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p-local.c | 284 ++ 1 files changed, 218 insertions(+), 66 deletions

[Qemu-devel] Re: [PATCH v3] virtio-9p: fix build on !CONFIG_UTIMENSAT

2010-11-15 Thread M. Mohan Kumar
alternative handling for UTIME_NOW/OMIT - Move qemu_utimensat() to cutils.c V2: - Introduce qemu_utimensat() Signed-off-by: Hidetoshi Seto seto.hideto...@jp.fujitsu.com Looks good to me. Acked-by: M. Mohan Kumar mo...@in.ibm.com

[Qemu-devel] [PATCH 1/2] [V2] virtio-9p: Use chroot to safely access files in passthrough model

2010-11-16 Thread M. Mohan Kumar
calls. Changes from previous version * Do not send ancillary data if a 9p open/create request fails * Handle error condition in socket read/write * Chroot subprocess exits when main qemu process exits * Return EIO for failed 9p open/create requests Signed-off-by: M. Mohan Kumar mo...@in.ibm.com

[Qemu-devel] [PATCH 2/2] [V2] virtio-9p: Use chroot interface in passthrough model

2010-11-16 Thread M. Mohan Kumar
Make use of chroot interfaces for passthrough security model to fix the vulnerability in following symbolic links. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p-local.c | 294 ++--- 1 files changed, 228 insertions(+), 66 deletions

[Qemu-devel] [PATCH] Add qemu_read_full

2010-11-24 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 29 + qemu-common.h |2 ++ 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..7046b32 100644 --- a/osdep.c +++ b/osdep.c

[Qemu-devel] [PATCH] virtio-9p: Bugfix to send correct iounit

2011-01-11 Thread M. Mohan Kumar
LCREATE function packs address of iounit in the pdu, fix that to send actual iounit itself. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com Acked-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- hw/9pfs/virtio-9p.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [V3 PATCH 0/8] virtio-9p: Use chroot to safely access files in passthrough model

2011-01-17 Thread M. Mohan Kumar
with fsstress, connectathon, Tuxera POSIX test suite and LTP FS testcases for all three security models. M. Mohan Kumar (8): Implement qemu_read_full Provide chroot environment server side interfaces Add client side interfaces for chroot environment Add support to open a file in chroot

[Qemu-devel] [V3 PATCH 1/8] virtio-9p: Implement qemu_read_full

2011-01-17 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

[Qemu-devel] [V3 PATCH 2/8] virtio-9p: Provide chroot environment server side interfaces

2011-01-17 Thread M. Mohan Kumar
Implement chroot server side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs/virtio-9p

[Qemu-devel] [V3 PATCH 5/8] virtio-9p: Create support in chroot environment

2011-01-17 Thread M. Mohan Kumar
Add both server client side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 42 ++ hw/9pfs/virtio-9p-local.c | 22 -- 2 files changed, 62

[Qemu-devel] [V3 PATCH 3/8] virtio-9p: Add client side interfaces for chroot environment

2011-01-17 Thread M. Mohan Kumar
Define QEMU side interfaces used for chroot environment. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 78 1 files changed, 78 insertions(+), 0 deletions(-) diff --git a/hw/9pfs/virtio-9p-chroot.c b/hw/9pfs/virtio

[Qemu-devel] [V3 PATCH 6/8] virtio-9p: Support for creating special files

2011-01-17 Thread M. Mohan Kumar
Add both server and client side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 84 ++- hw/9pfs/virtio-9p-chroot.h |2 + hw/9pfs/virtio-9p-local.c

[Qemu-devel] [V3 PATCH 8/8] virtio-9p: Chroot environment for other functions

2011-01-17 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 222 ++-- 1 files changed, 191 insertions(+), 31 deletions

[Qemu-devel] [V3 PATCH 4/8] virtio-9p: Add support to open a file in chroot environment

2011-01-17 Thread M. Mohan Kumar
This patch adds both server and client side support to open a file (directory) in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 45 +++-- hw/9pfs/virtio-9p-chroot.h |1 + hw/9pfs/virtio-9p-local.c

[Qemu-devel] [V3 PATCH 7/8] virtio-9p: Move file post creation changes to none security model

2011-01-18 Thread M. Mohan Kumar
-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index 08fd67f..d2e32e2 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p

Re: [Qemu-devel] [V3 PATCH 5/8] virtio-9p: Create support in chroot environment

2011-01-19 Thread M. Mohan Kumar
Hi Blue Swirl, Thanks for your review comments. I will address these in my next version of patchset. M. Mohan Kumar On Tuesday 18 January 2011 10:38:21 pm Blue Swirl wrote: On Tue, Jan 18, 2011 at 6:25 AM, M. Mohan Kumar mo...@in.ibm.com wrote: Add both server client side interfaces

Re: [Qemu-devel] [V3 PATCH 7/8] virtio-9p: Move file post creation changes to none security model

2011-01-20 Thread M. Mohan Kumar
On Thursday 20 January 2011 2:29:54 pm Stefan Hajnoczi wrote: On Tue, Jan 18, 2011 at 01:54:16PM +0530, M. Mohan Kumar wrote: -if (lchown(rpath(fs_ctx, path), credp-fc_uid, credp-fc_gid) 0) { -/* - * If we fail to change ownership and if we are - * using

[Qemu-devel] [V4 PATCH 0/8] virtio-9p: Use chroot to safely access files in passthrough security model

2011-01-31 Thread M. Mohan Kumar
when possible Changes from version V2 * Treat socket IO errors as fatal, ie qemu will exit * Split patchset based on chroot side (server) and qemu side(client) functionalities M. Mohan Kumar (8): Implement qemu_read_full Provide chroot environment server side interfaces Add client side

[Qemu-devel] [V4 PATCH 1/8] virtio-9p: Implement qemu_read_full

2011-01-31 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

[Qemu-devel] [V4 PATCH 2/8] Provide chroot environment server side interfaces

2011-01-31 Thread M. Mohan Kumar
Implement chroot server side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs/virtio-9p

[Qemu-devel] [V4 PATCH 3/8] Add client side interfaces for chroot environment

2011-01-31 Thread M. Mohan Kumar
Define QEMU side interfaces used for chroot environment. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 87 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/hw/9pfs/virtio-9p-chroot.c b/hw/9pfs/virtio

[Qemu-devel] [V4 PATCH 7/8] Move file post creation changes to none security model

2011-01-31 Thread M. Mohan Kumar
-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index c9ece6b..37a2510 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p

[Qemu-devel] [V4 PATCH 5/8] Create support in chroot environment

2011-01-31 Thread M. Mohan Kumar
Add both server client side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 41 + hw/9pfs/virtio-9p-local.c | 22 -- 2 files changed, 61

[Qemu-devel] [V4 PATCH 6/8] Support for creating special files

2011-01-31 Thread M. Mohan Kumar
Add both server and client side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 84 ++ hw/9pfs/virtio-9p-chroot.h |2 + hw/9pfs/virtio-9p-local.c

[Qemu-devel] [V4 PATCH 4/8] Add support to open a file in chroot environment

2011-01-31 Thread M. Mohan Kumar
This patch adds both server and client side support to open a file (directory) in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 53 ++- hw/9pfs/virtio-9p-chroot.h |1 + hw/9pfs/virtio-9p

[Qemu-devel] [V4 PATCH 8/8] Chroot environment for other functions

2011-01-31 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 221 +++-- 1 files changed, 191 insertions(+), 30 deletions

Re: [Qemu-devel] [V4 PATCH 2/8] Provide chroot environment server side interfaces

2011-02-08 Thread M. Mohan Kumar
(fstype_entries, fsle, next); return 0; On Tuesday 01 February 2011 4:02:22 pm Daniel P. Berrange wrote: On Tue, Feb 01, 2011 at 10:55:39AM +0530, M. Mohan Kumar wrote: Implement chroot server side interfaces like sending the file descriptor to qemu process, reading the object request

[Qemu-devel] Re: [V4 PATCH 3/8] Add client side interfaces for chroot environment

2011-02-08 Thread M. Mohan Kumar
On Wednesday 02 February 2011 3:24:16 pm Stefan Hajnoczi wrote: On Tue, Feb 1, 2011 at 5:26 AM, M. Mohan Kumar mo...@in.ibm.com wrote: +/* Receive file descriptor and error status from chroot process */ +static int v9fs_receivefd(int sockfd, int *error) The return value and int *error

[Qemu-devel] [V5 PATCH 0/8] virtio-9p: Use chroot to safely access files in passthrough security model

2011-02-16 Thread M. Mohan Kumar
instead of exiting * Changed data types as suggested by Blue Swirl * Chroot process reports error through qemu process Changes from version V2 * Treat socket IO errors as fatal, ie qemu will exit * Split patchset based on chroot side (server) and qemu side(client) functionalities M. Mohan Kumar (8

[Qemu-devel] [V5 PATCH 5/8] virtio-9p: Create support in chroot environment

2011-02-16 Thread M. Mohan Kumar
Add both server client side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-sv.c | 41 + hw/9pfs/virtio-9p-local.c | 21 +++-- 2 files changed, 60

[Qemu-devel] [V5 PATCH 7/8] virtio-9p: Move file post creation changes to none security model

2011-02-16 Thread M. Mohan Kumar
-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index 9975ed1..9d2d31c 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p

[Qemu-devel] [V5 PATCH 3/8] virtio-9p: Add client side interfaces for chroot environment

2011-02-16 Thread M. Mohan Kumar
Define QEMU side interfaces used for chroot environment. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot-clnt.c | 96 +++ hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed, 98

[Qemu-devel] [V5 PATCH 2/8] virtio-9p: Provide chroot environment server side interfaces

2011-02-16 Thread M. Mohan Kumar
Implement chroot server side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs/virtio

[Qemu-devel] [V5 PATCH 8/8] virtio-9p: Chroot environment for other functions

2011-02-16 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 222 +++-- 1 files changed, 192 insertions(+), 30 deletions

[Qemu-devel] [V5 PATCH 4/8] virtio-9p: Add support to open a file in chroot environment

2011-02-16 Thread M. Mohan Kumar
This patch adds both server and client side support to open a file (directory) in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-clnt.c | 22 +--- hw/9pfs/virtio-9p-chroot-sv.c | 26 +++ hw/9pfs/virtio-9p

[Qemu-devel] [V5 PATCH 6/8] virtio-9p: Support for creating special files

2011-02-16 Thread M. Mohan Kumar
Add both server and client side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-clnt.c | 26 ++ hw/9pfs/virtio-9p-chroot-sv.c | 59 ++ hw/9pfs

[Qemu-devel] [V5 PATCH 1/8] Implement qemu_read_full

2011-02-16 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

Re: [Qemu-devel] Re: [V5 PATCH 6/8] virtio-9p: Support for creating special files

2011-02-17 Thread M. Mohan Kumar
On Thursday 17 February 2011 4:19:17 pm Stefan Hajnoczi wrote: On Wed, Feb 16, 2011 at 12:23 PM, M. Mohan Kumar mo...@in.ibm.com wrote: +switch (type) { +case T_MKNOD: +request.data.type = T_MKNOD; +break; +case T_MKDIR: +request.data.type = T_MKDIR

[Qemu-devel] [PATCH 1/2] qemu-virto9p: Implement TLOCK

2010-09-08 Thread M. Mohan Kumar
-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p-debug.c | 14 ++ hw/virtio-9p.c | 50 ++ hw/virtio-9p.h | 30 ++ 3 files changed, 94 insertions(+), 0 deletions(-) diff --git a/hw/virtio

[Qemu-devel] [PATCH 2/2] qemu-virtio9p: Implement TGETLOCK

2010-09-08 Thread M. Mohan Kumar
, lock all bytes starting at the location 'start' through to the end of file proc_id[4] - process id that wants to take lock/owns the task in case of reply client[4] - Client id of the system that owns the process Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw

[Qemu-devel] [PATCH 1/2] qemu-virto9p: Implement TLOCK

2010-09-21 Thread M. Mohan Kumar
-by: M. Mohan Kumar mo...@in.ibm.com Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- hw/virtio-9p-debug.c | 14 ++ hw/virtio-9p.c | 50 ++ hw/virtio-9p.h | 30 ++ 3 files

[Qemu-devel] [PATCH 2/2] qemu-virtio9p: Implement TGETLOCK

2010-09-21 Thread M. Mohan Kumar
, lock all bytes starting at the location 'start' through to the end of file proc_id[4] - process id that wants to take lock/owns the task in case of reply client[4] - Client id of the system that owns the process Signed-off-by: M. Mohan Kumar mo...@in.ibm.com Signed

[Qemu-devel] [PATCH] qemu-virtio-9p: Implement TREADLINK operation for 9p2000.L

2010-09-21 Thread M. Mohan Kumar
of the symbolic link referred by fid. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com Reviewed-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- hw/virtio-9p-debug.c |8 hw/virtio-9p.c | 44 hw/virtio-9p.h |9 + 3

[Qemu-devel] [PATCH] qemu: virtio-9p: Recognize 9P2000.L protocol

2010-05-27 Thread M. Mohan Kumar
Make 9P server recognize 9P2000.L protocol version Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p.c |6 +- hw/virtio-9p.h |6 ++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index e5d0112..25bd723 100644

[Qemu-devel] [PATCH] qemu: virtio-9p: Implement statfs support in qemu server

2010-05-27 Thread M. Mohan Kumar
] files[8] ffree[8] fsid[8] namelen[4] Signed-off-by: Sripathi Kodi sripat...@in.ibm.com Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/file-op-9p.h |2 + hw/virtio-9p-local.c |6 hw/virtio-9p.c | 63

[Qemu-devel] [PATCH] qemu: virtio-9p: Do not reset atime

2010-05-31 Thread M. Mohan Kumar
any provision to set only mtime or atime. So change v9fs_wstat_post_chmod function to use utimensat function to change the atime and mtime fields. If tv_nsec field is set to the special value UTIME_OMIT, corresponding file time stamp is not updated. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com

[Qemu-devel] [PATCH] qemu: virtio-9p: Implement TMKNOD

2010-05-31 Thread M. Mohan Kumar
is returned with the mknod reply message. Note: Existing v9fs_do_mknod function is changed to accomodate the dotl mknod version. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p.c | 76 ++- hw/virtio-9p.h | 13 + 2 files

[Qemu-devel] qemu:virtio-9p: [RFC] [PATCH 01/02] Send iounit to client for read/write operations

2010-06-01 Thread M. Mohan Kumar
Compute iounit based on the host filesystem block size and pass it to client with open/create response. Also return iounit as statfs's f_bsize for optimal block size transfers. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p.c | 56

[Qemu-devel] 9p: [RFC] [PATCH 02/02] Make use of iounit for read/write

2010-06-01 Thread M. Mohan Kumar
Change the v9fs_file_readn function to limit the maximum transfer size based on the iounit instead of msize. Also remove the redundant check for limiting the transfer size in v9fs_file_write. This check is done by p9_client_write. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- fs/9p

[Qemu-devel] [PATCH] 9p: Make use of iounit for read/write

2010-06-04 Thread M. Mohan Kumar
Change the v9fs_file_readn function to limit the maximum transfer size based on the iounit or msize. Also remove the redundant check for limiting the transfer size in v9fs_file_write. This check is done by p9_client_write. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- fs/9p/vfs_file.c

[Qemu-devel] [PATCH 01/02] qemu: virtio-9p: Implement TMKDIR

2010-06-07 Thread M. Mohan Kumar
is selected as the opcode for TMKDIR from the reserved list. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/virtio-9p-debug.c | 11 +++ hw/virtio-9p.c | 81 ++--- hw/virtio-9p.h |2 + 3 files changed, 89 insertions(+), 5 deletions

[Qemu-devel] [PATCH 02/02] 9p: Implement TMKDIR

2010-06-07 Thread M. Mohan Kumar
with the mkdir reply message. Note: 72 is selected as the opcode for TMKDIR from the reserved list. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- fs/9p/vfs_inode.c | 76 ++- include/net/9p/9p.h |2 + include/net/9p/client.h |2 + net/9p

[Qemu-devel] [PATCH] Check for invalid initrd file

2010-03-04 Thread M. Mohan Kumar
From c5dca54f67ec6aac16c6c5e09958417b2b3ee5a1 Mon Sep 17 00:00:00 2001 From: M. Mohan Kumar mo...@in.ibm.com Date: Thu, 4 Mar 2010 14:23:07 +0530 Subject: [PATCH] Check for invalid initrd file When qemu is invoked with an invalid initrd file, it crashes. Following patch prints a error message

[Qemu-devel] [PATCH] Check for invalid initrd file

2010-04-11 Thread M. Mohan Kumar
When qemu is invoked with an invalid initrd file, it crashes. Following patch prints a error message and exits if an invalid initrd is specified. Includes changes suggested by JV. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/pc.c |6 ++ 1 files changed, 6 insertions(+), 0

[Qemu-devel] [V6 PATCH 8/9] virtio-9p: Move file post creation changes to none security model

2011-02-28 Thread M. Mohan Kumar
-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index c92c5dd..f5dba35 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio

[Qemu-devel] [V6 PATCH 1/9] Implement qemu_read_full

2011-02-28 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

[Qemu-devel] [V6 PATCH 2/9] virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled

2011-02-28 Thread M. Mohan Kumar
9p Chroot environment needs APIs defined in qemu-thread.c, so enable CONFIG_THREAD if virtfs is enabled Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 2560357..9eddd38 100755

[Qemu-devel] [V6 PATCH 3/9] virtio-9p: Provide chroot daemon side interfaces

2011-02-28 Thread M. Mohan Kumar
Implement chroot daemon side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs/virtio

[Qemu-devel] [V6 PATCH 6/9] virtio-9p: Create support in chroot environment

2011-02-28 Thread M. Mohan Kumar
Add both chroot deamon qemu side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-dm.c | 39 +++ hw/9pfs/virtio-9p-local.c | 21 +++-- 2 files changed

[Qemu-devel] [V6 PATCH 4/9] virtio-9p: Add qemu side interfaces for chroot environment

2011-02-28 Thread M. Mohan Kumar
QEMU side interfaces to communicate with chroot daemon process. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot-qemu.c | 97 +++ hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed

[Qemu-devel] [V6 PATCH 5/9] virtio-9p: Add support to open a file in chroot environment

2011-02-28 Thread M. Mohan Kumar
This patch adds both chroot deamon and qemu side support to open a file/ directory in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-qemu.c | 24 +++- hw/9pfs/virtio-9p-chroot.h |2 +- hw/9pfs/virtio-9p-local.c

[Qemu-devel] [V6 PATCH 7/9] virtio-9p: Support for creating special files

2011-02-28 Thread M. Mohan Kumar
Add both chroot deamon and qemu side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-dm.c | 57 hw/9pfs/virtio-9p-chroot-qemu.c | 19 hw/9pfs

[Qemu-devel] [V6 PATCH 9/9] virtio-9p: Chroot environment for other functions

2011-02-28 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 227 +++-- 1 files changed, 197 insertions(+), 30 deletions

[Qemu-devel] [V6 PATCH 0/9] virtio-9p: Use chroot to safely access files in passthrough security model

2011-02-28 Thread M. Mohan Kumar
version V2 * Treat socket IO errors as fatal, ie qemu will exit * Split patchset based on chroot side (server) and qemu side(client) functionalities M. Mohan Kumar (9): Implement qemu_read_full virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled virtio-9p: Provide chroot daemon side

[Qemu-devel] Re: [V6 PATCH 4/9] virtio-9p: Add qemu side interfaces for chroot environment

2011-03-03 Thread M. Mohan Kumar
On Thursday 03 March 2011 5:08:10 pm Stefan Hajnoczi wrote: On Mon, Feb 28, 2011 at 11:22 AM, M. Mohan Kumar mo...@in.ibm.com wrote: +retval = recvmsg(sockfd, msg, 0); +if (retval 0) { +*sock_error = 1; +return -EIO; +} Are we guaranteed

[Qemu-devel] Re: [V6 PATCH 5/9] virtio-9p: Add support to open a file in chroot environment

2011-03-03 Thread M. Mohan Kumar
by reusing the virtio-9p-local.c implementation in chilld side. That may involve breaking down existing local functions? M. Mohan Kumar

[Qemu-devel] [V7 PATCH 0/9] virtio-9p: Use chroot to safely access files in passthrough security model

2011-03-04 Thread M. Mohan Kumar
* Changed data types as suggested by Blue Swirl * Chroot process reports error through qemu process Changes from version V2 * Treat socket IO errors as fatal, ie qemu will exit * Split patchset based on chroot side (server) and qemu side(client) functionalities M. Mohan Kumar (9): Implement

[Qemu-devel] [V7 PATCH 2/9] virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled

2011-03-04 Thread M. Mohan Kumar
9p Chroot environment needs APIs defined in qemu-thread.c, so enable CONFIG_THREAD if virtfs is enabled Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 2560357..9eddd38 100755

[Qemu-devel] [V7 PATCH 1/9] Implement qemu_read_full

2011-03-04 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

[Qemu-devel] [V7 PATCH 3/9] virtio-9p: Provide chroot worker side interfaces

2011-03-04 Thread M. Mohan Kumar
Implement chroot worker side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs

[Qemu-devel] [V7 PATCH 5/9] virtio-9p: Add support to open a file in chroot environment

2011-03-04 Thread M. Mohan Kumar
This patch adds both chroot worker and qemu side support to open a file/ directory in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 28 ++- hw/9pfs/virtio-9p-chroot.h |2 +- hw/9pfs/virtio-9p-local.c | 62

[Qemu-devel] [V7 PATCH 4/9] virtio-9p: Add qemu side interfaces for chroot environment

2011-03-04 Thread M. Mohan Kumar
QEMU side interfaces to communicate with chroot worker process. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot.c | 92 hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed, 94

[Qemu-devel] [V7 PATCH 8/9] virtio-9p: Move file post creation changes to none security model

2011-03-04 Thread M. Mohan Kumar
-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index 904ee71..864334d 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio

[Qemu-devel] [V7 PATCH 6/9] virtio-9p: Create support in chroot environment

2011-03-04 Thread M. Mohan Kumar
Add both chroot worker qemu side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 36 hw/9pfs/virtio-9p-local.c | 26 -- 2

[Qemu-devel] [V7 PATCH 7/9] virtio-9p: Support for creating special files

2011-03-04 Thread M. Mohan Kumar
Add both chroot worker and qemu side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 52 hw/9pfs/virtio-9p-chroot.c| 23 + hw

[Qemu-devel] [V7 PATCH 9/9] virtio-9p: Chroot environment for other functions

2011-03-04 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 229 +++-- 1 files changed, 199 insertions(+), 30 deletions

[Qemu-devel] [V8 PATCH 04/11] virtio-9p: Add qemu side interfaces for chroot environment

2011-03-09 Thread M. Mohan Kumar
QEMU side interfaces to communicate with chroot worker process. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot.c | 92 hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed, 94

[Qemu-devel] [V9 PATCH 00/13] virtio-9p: Use chroot to safely access files in passthrough security model

2011-03-17 Thread M. Mohan Kumar
* Chroot process reports error through qemu process Changes from version V2 * Treat socket IO errors as fatal, ie qemu will exit * Split patchset based on chroot side (server) and qemu side(client) functionalities M. Mohan Kumar (13): Implement qemu_read_full virtio-9p: Enable CONFIG_THREAD

[Qemu-devel] [V9 PATCH 10/13] virtio-9p: Move file post creation changes to none security model

2011-03-17 Thread M. Mohan Kumar
-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index 48ca7ab..65622de 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio

[Qemu-devel] [V9 PATCH 13/13] virtio-9p: Chroot environment for other functions

2011-03-17 Thread M. Mohan Kumar
Add chroot functionality for systemcalls that can operate on a file using relative directory file descriptor. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-local.c | 114 + 1 files changed, 104 insertions(+), 10 deletions

[Qemu-devel] [V9 PATCH 08/13] virtio-9p: Add support for removing file or directory

2011-03-17 Thread M. Mohan Kumar
Support for removing file or directory in chroot environment. Add interfaces to remove file/directory in chroot worker and qemu side. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 34 ++ hw/9pfs/virtio-9p-chroot.h

[Qemu-devel] [V9 PATCH 11/13] virtio-9p: Add support for chmod

2011-03-17 Thread M. Mohan Kumar
Add support to do chmod operation in chroot process. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 18 ++ hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p-local.c |5 +++-- 3 files changed, 22 insertions(+), 2

[Qemu-devel] [V9 PATCH 03/13] virtio-9p: Provide chroot worker side interfaces

2011-03-17 Thread M. Mohan Kumar
Implement chroot worker side interfaces like sending the file descriptor to qemu process, reading the object request from socket etc. Also add chroot main function and other helper routines. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |1 + hw/9pfs

[Qemu-devel] [V9 PATCH 12/13] virtio-9p: Add support for chown

2011-03-17 Thread M. Mohan Kumar
Add support to do chown in chroot process Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 18 ++ hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p-local.c |9 + 3 files changed, 24 insertions(+), 4 deletions

[Qemu-devel] [V9 PATCH 01/13] Implement qemu_read_full

2011-03-17 Thread M. Mohan Kumar
Add qemu_read_full function Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- osdep.c | 32 qemu-common.h |2 ++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 327583b..8d84a88 100644 --- a/osdep.c +++ b

[Qemu-devel] [V9 PATCH 04/13] virtio-9p: Add qemu side interfaces for chroot environment

2011-03-17 Thread M. Mohan Kumar
QEMU side interfaces to communicate with chroot worker process. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- Makefile.objs |2 +- hw/9pfs/virtio-9p-chroot.c | 92 hw/9pfs/virtio-9p-chroot.h |1 + 3 files changed, 94

[Qemu-devel] [V9 PATCH 05/13] virtio-9p: Add support to open a file in chroot environment

2011-03-17 Thread M. Mohan Kumar
This patch adds both chroot worker and qemu side support to open a file/ directory in the chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot.c | 29 +++ hw/9pfs/virtio-9p-chroot.h |2 +- hw/9pfs/virtio-9p-local.c | 80

[Qemu-devel] [V9 PATCH 06/13] virtio-9p: Create support in chroot environment

2011-03-17 Thread M. Mohan Kumar
Add both chroot worker qemu side interfaces to create regular files in chroot environment Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 36 hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p-local.c

[Qemu-devel] [V9 PATCH 09/13] virtio-9p: Add support to rename

2011-03-17 Thread M. Mohan Kumar
Support renaming a file or directory in chroot envirnoment. Add interfaces for renaming in chroot worker and qemu side. Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 17 + hw/9pfs/virtio-9p-chroot.h|1 + hw/9pfs/virtio-9p

[Qemu-devel] [V9 PATCH 02/13] virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled

2011-03-17 Thread M. Mohan Kumar
9p Chroot environment needs APIs defined in qemu-thread.c, so enable CONFIG_THREAD if virtfs is enabled Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 2560357..9eddd38 100755

[Qemu-devel] [V9 PATCH 07/13] virtio-9p: Support for creating special files

2011-03-17 Thread M. Mohan Kumar
Add both chroot worker and qemu side interfaces to create special files (directory, device nodes, links and symbolic links) Signed-off-by: M. Mohan Kumar mo...@in.ibm.com --- hw/9pfs/virtio-9p-chroot-worker.c | 52 hw/9pfs/virtio-9p-chroot.h|5 +++ hw

  1   2   3   >