[Qemu-devel] [PATCH 1/1] block: Dont ignore previously set bdrv_flags

2013-08-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" bdrv_flags is set by bdrv_parse_discard_flags(), but later it is reset to zero. Signed-off-by: M. Mohan Kumar --- blockdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index e174b7d..bc7016a 100644 --- a/blockdev.c +++ b/

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

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

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 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 Reviewed-by: M. Mohan Kumar > --- > > Hi, >

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

2013-07-03 Thread M. Mohan Kumar
Stefan Weil writes: > This leak was reported by cppcheck. > > Signed-off-by: Stefan Weil Reviewed-by: M. Mohan Kumar > --- > fsdev/qemu-fsdev.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c > index 6eaf36d..c

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

2013-06-11 Thread M. Mohan Kumar
Michael Tokarev writes: > 11.06.2013 21:23, M. Mohan Kumar wrote: >> Peter Maydell writes: >> >> How about this approach? > > Well, this is definitely wrong :) > >> -if test "$softmmu" = yes ; then >> - if test "$virtfs" != n

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

2013-06-11 Thread M. Mohan Kumar
Peter Maydell writes: How about this approach? [PATCH] configure: Disable virtfs if softmmu not enabled Signed-off-by: M. Mohan Kumar --- configure | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1654413..88c2b0f 100755 --- a

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

2013-06-11 Thread M. Mohan Kumar
per.pod, > which can't be created because fsdev/ does not exist. > Hi, 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.

[Qemu-devel] [Bug 1130769] Re: VirtFS (virtio-9p-pci) error: Parameter 'driver' expects device type

2013-03-01 Thread M. Mohan Kumar
-fsdev can take local, handle and proxy. Could you please use try with one of them? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1130769 Title: VirtFS (virtio-9p-pci) error: Parameter 'driver' exp

Re: [Qemu-devel] 9pfs: unWRITAble dirs with random errors in guest

2013-02-28 Thread M. Mohan Kumar
Michael Tokarev writes: > 28.02.2013 17:55, M. Mohan Kumar wrote: >> Michael Tokarev writes: >> >> Hi, >> >> Please try mounting with -oversion=9p2000.L >> >> With qemu-1.4.0 and 9p2000.L, I could not recreate this issue. ie not >> gett

Re: [Qemu-devel] 9pfs: unreadable dirs with random errors in guest

2013-02-28 Thread M. Mohan Kumar
Michael Tokarev writes: Hi, Please try mounting with -oversion=9p2000.L With qemu-1.4.0 and 9p2000.L, I could not recreate this issue. ie not getting Unknown error during directory listing. I am using Guest kernel 3.8.0-rc5+. > When I mount a 9pfs filesystem in guest with no write permission

Re: [Qemu-devel] 9pfs segfaults on chmod(special)

2013-02-28 Thread M. Mohan Kumar
Michael Tokarev writes: > 28.02.2013 13:12, Aneesh Kumar K.V wrote: >> Michael Tokarev writes: >> >>> When guest tries to chmod a block or char device file over 9pfs, >>> the qemu process segfaults. >>> >>> On host: >>> qemu-system-x86_64 -virtfs >>> local,path=/dev,security_model=mapped-file

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-12-04 Thread M. Mohan Kumar
IDE, > }; > > -setfsgid(gid); > -setfsuid(uid); > +if (setresuid(-1, uid, suid) == -1) { > +retval = -errno; > +goto err_out; > +} > +if (setresgid(-1, gid, sgid) == -1) { > +retval = -errno; > +goto err_suid; > +} > After changing the order of setresuid and setresgid this patch works as expected. Please move setresgid before setresuid. Tested-by: M. Mohan Kumar

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-11 Thread M. Mohan Kumar
Stefan Weil writes: We need to change fsuid and fsgid in 9p server side when 9p client wants to create a file with given uid and gid. In my case setfsuid and setfsgid never return -1 even if a normal user tries to change fsuid. I am running F17 and glibc is 2.15-56.fc17 IMHO setfsuid/setfsgid

[Qemu-devel] [PATCH] fsdev: Don't ignore setfsuid/setfsgid return values

2012-10-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" In current implementation of setfsuid/setfsgid there is no way to know if it failed by checking the return value. This patch assumes setfsuid/setfsgid returns -1 in case of error. Eventually kernel code needs to be fixed. Signed-off-by: M. Mohan Kumar --- fs

[Qemu-devel] [Bug 1018530] Re: No write access in a 9p/virtfs shared folder

2012-07-10 Thread M. Mohan Kumar
Georg, pass-through security model needs root privilege, if you want to run qemu as non-root user either you have to use mapped security model or proxy fs driver. But libvirt does not have support for proxy FS driver. I posted a patch few months ago to libvirt for enabling the same. I will do the

[Qemu-devel] [Bug 1018530] Re: No write access in a 9p/virtfs shared folder

2012-07-09 Thread M. Mohan Kumar
No, commit daf0b9aca9f67323266af1a92e8ea06f9d7bf408 added create support proxy FS driver model. Local FS had support for creating files much before. Georg, is qemu running with root user privileges? -- You received this bug notification because you are a member of qemu- devel-ml, which is subsc

[Qemu-devel] [Bug 965867] Re: 9p virtual file system on qemu slow

2012-04-25 Thread M. Mohan Kumar
Hi Max, Could you try passing msize=262144 for 9p mount point and post the results? Host: [root@llm116 media]# ls -lhas file 1.1G -rw-r--r-- 1 root root 1.0G Apr 26 11:05 file [root@llm116 media]# dd if=/dev/zero of=file bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1

Re: [Qemu-devel] VirtIO 9p mount_tag (bogus?) limit of 32 bytes

2012-03-07 Thread M. Mohan Kumar
Hi Anthony, When I tried with ldconfig version 2.14.90, ldconfig successfully completed QEMU version: 1.0.50 Kernel version: 3.3.0-rc6+ Could you please try with recent ldconfig? On 02/22/2012 09:28 AM, C Anthony Risinger wrote: On Sat, Feb 18, 2012 at 11:38 AM, Aneesh Kumar K.V wrote: On

Re: [Qemu-devel] QEMU build errors with 'fdopendir'

2012-02-08 Thread M. Mohan Kumar
Hi, I will give a fix to disable virtfs by providing a configure option --disable-virtfs. But if you want use virtfs with your current setup, we can give the option to disable handle and proxy FS driver. Still you can use local FS driver. Meador Inge wrote: Did these [1] builds errors ever

Re: [Qemu-devel] [PATCH] Remove O_NOATIME flag from 9pfs open() calls in readonly mode

2012-01-24 Thread M. Mohan Kumar
Acked-by: M. Mohan Kumar On Monday, January 16, 2012 11:41:40 PM Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When 2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 added support for > the 'readonly' flag against 9p filesystems, it also made QEMU > add

[Qemu-devel] [PATCH] fsdev: parameter parsing for proxy helper

2012-01-19 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index baafee2..5aafc38 100644 --- a/fsdev/virtfs-proxy-help

[Qemu-devel] [PATCH] Preserve S_ISGID

2011-12-27 Thread M. Mohan Kumar
From: "M. Mohan Kumar" In passthrough security model in local fs driver, after a file creation chown and chmod are done to set the file credentials and mode as requested by 9p client. But if there was a request to create a file with S_ISGID bit, doing chown on that file resets the S

[Qemu-devel] [PATCH V5 07/14] hw/9pfs: Create other filesystem objects

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 129 ++-- hw/9pfs/virtio-9p-proxy.

[Qemu-devel] [PATCH V5 14/14] hw/9pfs: Add support to use named socket for proxy FS

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. We can achive the same using a shell script over qemu and virtfs-proxy-helper using exec fd<>,

[Qemu-devel] [PATCH V5 09/14] hw/9pfs: File ownership and others

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar --- Makefile|2 +- fsdev/virtfs-proxy-helper.c | 83 ++ hw/9pfs

[Qemu-devel] [PATCH V5 02/14] hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Move p9 marshaling/unmarshaling code to a separate file so that proxy filesytem driver can use these calls. Also made marshaling code generic to accept "struct iovec" instead of V9fsPDU. Signed-off-by: M. Mohan Kumar --- Makefile.objs |

[Qemu-devel] [PATCH V5 03/14] hw/9pfs: Add validation to {un}marshal code

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar Signed-off-by: Aneesh Kumar K.V --- fsdev/virtio-9p-marshal.c | 148 -- fsdev/virtio-9p-marshal.h | 19 +- hw/9pfs/virtio-9p.c | 467 + 3 files changed, 438

[Qemu-devel] [PATCH V5 13/14] hw/9pfs: man page for proxy helper

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- Makefile | 12 +++- fsdev/virtfs-proxy-helper.texi | 59 2 files changed, 70 insertions(+), 1 deletions(-) create mode 100644 fsdev/virtfs-proxy-helper.

[Qemu-devel] [PATCH V5 00/14] Proxy FS driver for VirtFS

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model 1) TOCTTOU vulnerability: Following symbolic links in the server could prov

[Qemu-devel] [PATCH V5 01/14] hw/9pfs: Move opt validation to FsDriver callback

2011-12-14 Thread M. Mohan Kumar
From: "Aneesh Kumar K.V" This remove all conditional code from common code path and make opt validation a FSDriver callback. Signed-off-by: Aneesh Kumar K.V Signed-off-by: M. Mohan Kumar --- fsdev/file-op-9p.h | 15 +-- fsdev/qemu-fsdev.c

[Qemu-devel] [PATCH V5 04/14] hw/9pfs: Add new proxy filesystem driver

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=,mount_tag=,socket_fd= Signed-off-by: M. M

[Qemu-devel] [PATCH V5 11/14] hw/9pfs: Proxy getversion

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 80 +++ hw/9pfs/virtio-9p-proxy.c | 32 + hw/9pfs/virtio-9p-proxy.h |1 + 3 fil

[Qemu-devel] [PATCH V5 06/14] hw/9pfs: Open and create files

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 178 - hw/9pfs/virtio-9p-proxy.c | 187 +-

[Qemu-devel] [PATCH V5 08/14] hw/9pfs: Add stat/readlink/statfs for proxy FS

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 182 ++ hw/9pfs/virtio-9p-proxy.c | 206 +-- hw/9pfs/virtio-9p-proxy.h | 34 +++ 3 files changed, 414 insert

[Qemu-devel] [PATCH V5 10/14] hw/9pfs: xattr interfaces in proxy filesystem driver

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 99 ++ hw/9pfs/virtio-9p-proxy.c | 124 --- hw/9pfs/virtio-9p-proxy.h |4 ++ 3 fil

[Qemu-devel] [PATCH V5 05/14] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper -f|--fd -p|--path Signed-off-by: M. Mohan Kumar --- Makefile|3 +

[Qemu-devel] [PATCH V5 12/14] hw/9pfs: Documentation changes related to proxy fs

2011-12-14 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- qemu-options.hx | 25 - 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index b3db10c..cfc999f 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

Re: [Qemu-devel] [PATCH V4 04/13] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-12-09 Thread M. Mohan Kumar
On Friday, December 09, 2011 12:01:14 AM Stefan Hajnoczi wrote: > On Mon, Dec 05, 2011 at 09:48:41PM +0530, M. Mohan Kumar wrote: > > +static int read_request(int sockfd, struct iovec *iovec, ProxyHeader > > *header) +{ > > +int retval; > > + > > +/* &g

Re: [Qemu-devel] [PATCH V4 00/13] Proxy FS driver for VirtFS

2011-12-09 Thread M. Mohan Kumar
On Thursday, December 08, 2011 11:16:33 PM Stefan Hajnoczi wrote: > On Mon, Dec 05, 2011 at 09:48:37PM +0530, M. Mohan Kumar wrote: > > From: "M. Mohan Kumar" > > > > Pass-through security model in QEMU 9p server needs root privilege to do > > few file oper

[Qemu-devel] [PATCH V4 12/13] hw/9pfs: man page for proxy helper

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- Makefile | 12 +++- fsdev/virtfs-proxy-helper.texi | 59 2 files changed, 70 insertions(+), 1 deletions(-) create mode 100644 fsdev/virtfs-proxy-helper.

[Qemu-devel] [PATCH V4 02/13] hw/9pfs: Add validation to {un}marshal code

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar Signed-off-by: Aneesh Kumar K.V --- fsdev/virtio-9p-marshal.c | 148 -- fsdev/virtio-9p-marshal.h | 19 +- hw/9pfs/virtio-9p.c | 467 + 3 files changed, 438

[Qemu-devel] [PATCH V4 09/13] hw/9pfs: xattr interfaces in proxy filesystem driver

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 99 + hw/9pfs/virtio-9p-proxy.c | 128 --- hw/9pfs/virtio-9p-proxy.h |4 + 3 fil

[Qemu-devel] [PATCH V4 10/13] hw/9pfs: Proxy getversion

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 80 +++ hw/9pfs/virtio-9p-proxy.c | 33 ++ hw/9pfs/virtio-9p-proxy.h |1 + 3 fil

[Qemu-devel] [PATCH V4 06/13] hw/9pfs: Create other filesystem objects

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 131 ++-- hw/9pfs/virtio-9p-proxy.

[Qemu-devel] [PATCH V4 07/13] hw/9pfs: Add stat/readlink/statfs for proxy FS

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 182 + hw/9pfs/virtio-9p-proxy.c | 209 +-- hw/9pfs/virtio-9p-proxy.h | 34 +++ 3 files changed, 417 insert

[Qemu-devel] [PATCH V4 08/13] hw/9pfs: File ownership and others

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar --- Makefile|2 +- fsdev/virtfs-proxy-helper.c | 83 + hw/9pfs

[Qemu-devel] [PATCH V4 13/13] hw/9pfs: Add support to use named socket for proxy FS

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. We can achive the same using a shell script over qemu and virtfs-proxy-helper using exec fd<>,

[Qemu-devel] [PATCH V4 11/13] hw/9pfs: Documentation changes related to proxy fs

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- qemu-options.hx | 25 - 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 681eaf1..cde17ed 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

[Qemu-devel] [PATCH V4 00/13] Proxy FS driver for VirtFS

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model 1) TOCTTOU vulnerability: Following symbolic links in the server could prov

[Qemu-devel] [PATCH V4 04/13] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper -f|--fd -p|--path Signed-off-by: M. Mohan Kumar --- Makefile|3 +

[Qemu-devel] [PATCH V4 03/13] hw/9pfs: Add new proxy filesystem driver

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=,mount_tag=,socket_fd= Signed-off-by: M. M

[Qemu-devel] [PATCH V4 05/13] hw/9pfs: Open and create files

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 191 ++- hw/9pfs/virtio-9p-proxy.c | 189 +

[Qemu-devel] [PATCH V4 01/13] hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

2011-12-05 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Move p9 marshaling/unmarshaling code to a separate file so that proxy filesytem driver can use these calls. Also made marshaling code generic to accept "struct iovec" instead of V9fsPDU. Signed-off-by: M. Mohan Kumar --- Makefile.objs |

Re: [Qemu-devel] virtio-9p compiling error

2011-11-29 Thread M. Mohan Kumar
Could you please give your host information? Such as gcc version, distro version etc? I could compile in my Fedora 15 x86-64 system using gcc 4.6.0 -- Regards, M. Mohan Kumar On Tuesday, November 29, 2011 06:27:00 PM erik.r...@rdsoftware.de wrote: > Hi all, > > when compiling the

[Qemu-devel] [Bug 897193] Re: virtfs: kernel compile fails

2011-11-29 Thread M. Mohan Kumar
Hi Avishay, Are you running qemu as a normal user? In that case, could you please check whether normal user has rw access to the kernel source? Also could you please attach the output of strace scripts/kconfig/conf --silentoldconfig Kconfig ? -- You received this bug notification because you ar

[Qemu-devel] [PATCH V3 11/13] hw/9pfs: Documentation changes related to proxy fs

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- qemu-options.hx | 25 - 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 681eaf1..cde17ed 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

[Qemu-devel] [PATCH V3 03/13] hw/9pfs: Add new proxy filesystem driver

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=,mount_tag=,socket_fd= Signed-off-by: M. M

[Qemu-devel] [PATCH V3 00/13] Proxy FS driver for VirtFS

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model 1) TOCTTOU vulnerability: Following symbolic links in the server could prov

[Qemu-devel] [PATCH V3 12/13] hw/9pfs: man page for proxy helper

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- Makefile | 12 +++- fsdev/virtfs-proxy-helper.texi | 59 2 files changed, 70 insertions(+), 1 deletions(-) create mode 100644 fsdev/virtfs-proxy-helper.

[Qemu-devel] [PATCH V3 01/13] hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Move p9 marshaling/unmarshaling code to a separate file so that proxy filesytem driver can use these calls. Also made marshaling code generic to accept "struct iovec" instead of V9fsPDU. Signed-off-by: M. Mohan Kumar --- Makefile.objs |

[Qemu-devel] [PATCH V3 09/13] hw/9pfs: xattr interfaces in proxy filesystem driver

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 93 ++- hw/9pfs/virtio-9p-proxy.c | 130 +++--- hw/9pfs/virtio-9p-proxy.h |4 + 3 files ch

[Qemu-devel] [PATCH V3 07/13] hw/9pfs: Add stat/readlink/statfs for proxy FS

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 182 + hw/9pfs/virtio-9p-proxy.c | 189 +-- hw/9pfs/virtio-9p-proxy.h | 34 3 files changed, 397

[Qemu-devel] [PATCH V3 04/13] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper -f|--fd -p|--path Signed-off-by: M. Mohan Kumar --- Makefile|3 +

[Qemu-devel] [PATCH V3 08/13] hw/9pfs: File ownership and others

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar --- Makefile|2 +- fsdev/virtfs-proxy-helper.c | 88 + hw/9pfs

[Qemu-devel] [PATCH V3 05/13] hw/9pfs: Open and create files

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 133 ++- hw/9pfs/virtio-9p-proxy.c | 187 +-- hw/9pfs

[Qemu-devel] [PATCH V3 13/13] hw/9pfs: Add support to use named socket for proxy FS

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. We can achive the same using a shell script over qemu and virtfs-proxy-helper using exec fd<>,

[Qemu-devel] [PATCH V3 02/13] hw/9pfs: Add validation to marshal code

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add validatio check to {un}marshal code. Signed-off-by: M. Mohan Kumar --- fsdev/virtio-9p-marshal.c | 97 --- fsdev/virtio-9p-marshal.h |8 +- hw/9pfs/virtio-9p.c | 231 + 3 files ch

[Qemu-devel] [PATCH V3 06/13] hw/9pfs: Create other filesystem objects

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 120 ++-- hw/9pfs/virtio-9p-proxy.

[Qemu-devel] [PATCH V3 10/13] hw/9pfs: Proxy getversion

2011-11-21 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 77 +++ hw/9pfs/virtio-9p-proxy.c | 34 +++ hw/9pfs/virtio-9p-proxy.h |1 + 3 fil

Re: [Qemu-devel] [PATCH V2 03/12] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-11-16 Thread M. Mohan Kumar
Stefan Hajnoczi wrote: On Tue, Nov 15, 2011 at 11:57 AM, M. Mohan Kumar wrote: diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c new file mode 100644 index 000..69daf7c --- /dev/null +++ b/fsdev/virtfs-proxy-helper.c @@ -0,0 +1,271 @@ +/* + * Helper for QEMU Proxy

[Qemu-devel] [PATCH V2 03/12] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-11-15 Thread M. Mohan Kumar
Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper -f|--fd -p|--path Signed-off-by: M. Mohan Kumar --- Makefile|3 + configure | 19 +++ fsdev

[Qemu-devel] [PATCH V2 04/12] hw/9pfs: Open and create files

2011-11-15 Thread M. Mohan Kumar
Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 136 +++- hw/9pfs/virtio-9p-proxy.c | 180 +-- hw/9pfs/virtio-9p-proxy.h |9 ++ 3

[Qemu-devel] [PATCH V2 09/12] hw/9pfs: Proxy getversion

2011-11-15 Thread M. Mohan Kumar
Add proxy getversion to get generation number Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 74 +++ hw/9pfs/virtio-9p-proxy.c | 31 ++ hw/9pfs/virtio-9p-proxy.h |1 + 3 files changed, 106 insertions(+), 0

[Qemu-devel] [PATCH V2 08/12] hw/9pfs: xattr interfaces in proxy filesystem driver

2011-11-15 Thread M. Mohan Kumar
Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 78 - hw/9pfs/virtio-9p-proxy.c | 119 +++ hw/9pfs/virtio-9p-proxy.h |4 ++ 3 files changed, 190 insertions(+), 11

[Qemu-devel] [PATCH 00/12] Proxy FS driver for VirtFS

2011-11-15 Thread M. Mohan Kumar
filesystem operations (like CAP_DAC_OVERRIDE, CAP_FOWNER etc) M. Mohan Kumar (12): hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file hw/9pfs: Add new proxy filesystem driver hw/9pfs: File system helper process for qemu 9p proxy FS hw/9pfs: Open and create files hw/9pfs: Create other

[Qemu-devel] [PATCH V2 11/12] hw/9pfs: man page for proxy helper

2011-11-15 Thread M. Mohan Kumar
Signed-off-by: M. Mohan Kumar --- Makefile | 12 +++- fsdev/virtfs-proxy-helper.texi | 59 2 files changed, 70 insertions(+), 1 deletions(-) create mode 100644 fsdev/virtfs-proxy-helper.texi diff --git a/Makefile b/Makefile

Re: [Qemu-devel] [PATCH V2 00/12] Proxy FS driver for VirtFS

2011-11-15 Thread M. Mohan Kumar
Changes from previous version: 1) Communication between qemu and helper process is similar to 9p way of packing elements (pdu marshaling). M. Mohan Kumar wrote: Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid

[Qemu-devel] [PATCH V2 01/12] hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

2011-11-15 Thread M. Mohan Kumar
Move p9 marshaling/unmarshaling code to a separate file so that proxy filesytem driver can use these calls. Also made marshaling code generic to accept "struct iovec" instead of V9fsPDU. Signed-off-by: M. Mohan Kumar --- Makefile.objs |2 +- fsdev/virtio-9p-marsha

[Qemu-devel] [PATCH V2 10/12] hw/9pfs: Documentation changes related to proxy fs

2011-11-15 Thread M. Mohan Kumar
Signed-off-by: M. Mohan Kumar --- qemu-options.hx | 25 - 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 681eaf1..cde17ed 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -530,19 +530,19 @@ DEFHEADING

[Qemu-devel] [PATCH V2 12/12] hw/9pfs: Add support to use named socket for proxy FS

2011-11-15 Thread M. Mohan Kumar
ent to qemu and virtfs-proxy-helper. Also having a server like virtfs-proxy-helper listening on a pathname without any authentication is little bit scary. So we have to decide whether this patch is really needed. Signed-off-by: M. Mohan Kumar Signed-off-by: Aneesh Kumar K.V --- fsdev/file-o

[Qemu-devel] [PATCH V2 02/12] hw/9pfs: Add new proxy filesystem driver

2011-11-15 Thread M. Mohan Kumar
Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=,mount_tag=,socket_fd= Signed-off-by: M. Mohan Kumar --- Makefile.objs

[Qemu-devel] [PATCH V2 06/12] hw/9pfs: Add stat/readlink/statfs for proxy FS

2011-11-15 Thread M. Mohan Kumar
Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 165 hw/9pfs/virtio-9p-proxy.c | 174 +-- hw/9pfs/virtio-9p-proxy.h | 34 + 3 files changed, 367 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH V2 05/12] hw/9pfs: Create other filesystem objects

2011-11-15 Thread M. Mohan Kumar
Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar --- fsdev/virtfs-proxy-helper.c | 105 -- hw/9pfs/virtio-9p-proxy.c | 173

[Qemu-devel] [PATCH V2 07/12] hw/9pfs: File ownership and others

2011-11-15 Thread M. Mohan Kumar
Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar --- Makefile|2 +- fsdev/virtfs-proxy-helper.c | 66 + hw/9pfs/virtio-9p-proxy.c | 134

[Qemu-devel] [PATCH V2 00/12] Proxy FS driver for VirtFS

2011-11-15 Thread M. Mohan Kumar
filesystem operations (like CAP_DAC_OVERRIDE, CAP_FOWNER etc) M. Mohan Kumar (12): hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file hw/9pfs: Add new proxy filesystem driver hw/9pfs: File system helper process for qemu 9p proxy FS hw/9pfs: Open and create files hw/9pfs: Create other

[Qemu-devel] [PATCH 06/13] hw/9pfs: Open and create files

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to open and create files for proxy file system driver. Signed-off-by: M. Mohan Kumar --- Makefile |2 + configure |1 + hw/9pfs/proxy.h |6 ++ hw/9pfs/virtfs-proxy-helpe

[Qemu-devel] [PATCH 10/13] hw/9pfs: xattr interfaces in proxy filesystem driver

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add xattr support for proxy FS Signed-off-by: M. Mohan Kumar --- hw/9pfs/proxy.h |4 ++ hw/9pfs/virtfs-proxy-helper.c | 60 hw/9pfs/virtio-9p-proxy.c | 121 ++--- 3 files ch

[Qemu-devel] [PATCH 00/13] Proxy FS driver for VirtFS

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model 1) TOCTTOU vulnerability: Following symbolic links in the server could prov

[Qemu-devel] [PATCH 02/13] hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Move p9 marshaling/unmarshaling code to a separate file so that proxy filesytem driver can use these calls. Also made marshaling code generic to accept "struct iovec" instead of V9fsPDU. Signed-off-by: M. Mohan Kumar Signed-off-by: Aneesh Kumar K.V

[Qemu-devel] [PATCH 03/13] hw/9pfs: Add new proxy filesystem driver

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add new proxy filesystem driver to add root privilege to qemu process. It needs a helper process to be started by root user. Following command line can be used to utilize proxy filesystem driver -virtfs proxy,id=,mount_tag=,sock_fd= Signed-off-by: M. M

[Qemu-devel] [PATCH 08/13] hw/9pfs: Add stat/readlink/statfs for proxy FS

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- hw/9pfs/proxy.h |3 ++ hw/9pfs/virtfs-proxy-helper.c | 81 - hw/9pfs/virtio-9p-proxy.c | 67 +++--- 3 files changed, 144 insert

[Qemu-devel] [PATCH 12/13] hw/9pfs: Documentation changes related to proxy fs

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- qemu-options.hx | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 8df6165..eef98c5 100644 --- a/qemu-options.hx +++ b/qemu-

[Qemu-devel] [PATCH 13/13] hw/9pfs: man page for proxy helper

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Signed-off-by: M. Mohan Kumar --- Makefile | 12 ++- hw/9pfs/virtfs-proxy-helper.texi | 63 ++ 2 files changed, 74 insertions(+), 1 deletions(-) create mode 100644 hw/9pfs/virtfs-proxy-h

[Qemu-devel] [PATCH 09/13] hw/9pfs: File ownership and others

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add file ownership interfaces like chmod/chown, utime update, rename, remove and truncating files for proxy FS Signed-off-by: M. Mohan Kumar --- hw/9pfs/proxy.h |6 ++ hw/9pfs/virtfs-proxy-helper.c | 61 ++- hw/9pfs/virtio-

[Qemu-devel] [PATCH 07/13] hw/9pfs: Create other filesystem objects

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add interfaces to create filesystem objects like directory, device nodes, symbolic links, links for proxy filesytem driver Signed-off-by: M. Mohan Kumar --- hw/9pfs/proxy.h |4 ++ hw/9pfs/virtfs-proxy-helper.c | 63 +

[Qemu-devel] [PATCH 05/13] hw/9pfs: Add support to use named socket for proxy FS

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. Signed-off-by: M. Mohan Kumar --- hw/9pfs/virtfs-proxy-helpe

[Qemu-devel] [PATCH 04/13] hw/9pfs: File system helper process for qemu 9p proxy FS

2011-10-31 Thread M. Mohan Kumar
From: "M. Mohan Kumar" Provide root privilege access to QEMU 9p proxy filesystem using socket communication. Proxy helper is started by root user as: ~ # virtfs-proxy-helper {{-s|--socket -u|--uid -g|--gid}|{-f|--fd }} -p[-r -t ] Where uid:gid gives socket access to uid

[Qemu-devel] [PATCH 01/13] hw/9pfs: Move opt validation to FsDriver callback

2011-10-31 Thread M. Mohan Kumar
From: "Aneesh Kumar K.V" This remove all conditional code from common code path and make opt validation a FSDriver callback. Signed-off-by: Aneesh Kumar K.V Signed-off-by: M. Mohan Kumar --- fsdev/file-op-9p.h | 15 +-- fsdev/qemu-fsdev.c

[Qemu-devel] [V3 PATCH 1/2] qemu: Add opt_set_bool functionality

2011-10-25 Thread M. Mohan Kumar
Signed-off-by: M. Mohan Kumar --- Changes from previous version V2: * qemu_opt_set_bool does not need to call qemu_opt_parse, because it supports only setting boolean types Changes from previous version: * Changed qemu_opt_{get|set}_bool to use 'bool' data type qemu-optio

[Qemu-devel] [V3 PATCH 2/2] hw/9pfs: Read-only support for 9p export

2011-10-25 Thread M. Mohan Kumar
A new fsdev parameter "readonly" is introduced to control accessing 9p export. "readonly" can be used to specify the access type. By default "rw" access is given to 9p export. Signed-off-by: M. Mohan Kumar --- fsdev/file-op-9p.h |4 +++- fsdev/qemu-fsdev.c

  1   2   3   >