Statistics
| Branch: | Revision:

root / hw / 9pfs / virtio-9p-local.c @ a8aec295

History | View | Annotate | Download (33.3 kB)

# Date Author Comment
aed858ce 05/28/2013 12:53 pm Aneesh Kumar K.V

hw/9pfs: use O_NOFOLLOW for mapped readlink operation

With mapped security models like mapped-xattr and mapped-file, we save the
symlink target as file contents. Now if we ever expose a normal directory
with mapped security model and find real symlinks in export path, never...

0ceb092e 05/28/2013 12:53 pm Aneesh Kumar K.V

hw/9pfs: Use O_NOFOLLOW when opening files on server

9p server should never follow a symlink. So use O_NOFOLLOW with all open
syscall

Tested-by: "M. Mohan Kumar" <>
Signed-off-by: Aneesh Kumar K.V <>

c7e775e4 05/12/2013 12:25 pm Dong Xu Wang

remove double semicolons

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Michael Tokarev <>

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

d3f8e138 01/30/2013 12:14 pm Markus Armbruster

hw/9pfs: Fix unchecked strdup() by converting to g_strdup()

Note: the allocation in virtio_9p_init() is still leaked. To be fixed
in a followup commit.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

2d40564a 01/30/2012 07:24 am M. Mohan Kumar

hw/9pfs: Preserve S_ISGID

In passthrough security model in local fs driver, after a file creation
chown and chmod are done to set the file credentials and mode as requested
by 9p client. But if there was a request to create a file with S_ISGID
bit, doing chown on that file resets the S_ISGID bit. So first call...

2c30dd74 01/19/2012 08:51 am Aneesh Kumar K.V

hw/9pfs: Add new security model mapped-file.

This enable us to do passthrough equivalent security model on NFS directory.
NFS server mostly do root squashing and don't support xattr. Hence we cannot
use 'passthrough' or 'mapped' security model

Also added "mapped-xattr" security to indicate earlier "mapped" security model...

99519f0a 01/04/2012 04:21 pm Aneesh Kumar K.V

hw/9pfs: Move opt validation to FsDriver callback

This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <>

8b888272 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Use the correct file descriptor in Fsdriver Callback

Fsdriver callback that operate on file descriptor need to
differentiate between directory fd and file fd.

Based on the original patch from Sassan Panahinejad <>

Signed-off-by: Aneesh Kumar K.V <>

2507718b 11/29/2011 12:19 am Aneesh Kumar K.V

9pfs: improve portability to older systems

I guess we can also make sure we don't call local_ioc_getversion at
all.

Reported-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

ae0f940e 11/28/2011 07:36 pm Paolo Bonzini

9pfs: improve portability to older systems

Small requirements on "new" features have percolated to virtio-9p-local.c.
In particular, the utimensat wrapper actually only supports dirfd = AT_FDCWD
and flags = AT_SYMLINK_NOFOLLOW in the fallback code. Remove the arguments...

4f26f2b6 11/09/2011 08:06 pm Avi Kivity

configure: fix detection for xattr.h on modern distributions

Modern distributions place xattr.h in /usr/include/sys, and fold
libattr.so into libc. They also don't have an ENOATTR.

Make configure detect this, and add a qemu-xattr.h file that
directs the #include to the right place....

cc720ddb 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Abstract open state of fid to V9fsFidOpenState

To implement synthetic file system in Qemu we may not really
require file descriptor and Dir *. Make generic code use
V9fsFidOpenState instead.

Signed-off-by: Aneesh Kumar K.V <>

17b1971f 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Fix error handling in local_mknod

Update local_chown to remove unnecessary if loop

Signed-off-by: Aneesh Kumar K.V <>

e06a765e 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Add st_gen support in getattr reply

This patch use file system specific ioctl for getting i_generation
value. Not all file system support the ioctl. So we add an export
specific extended operation and assign right callback for the
file system that support i_generation ioctl...

c98f1d4a 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export_flag for indicating whether fs driver use path names.

This allows us to remove another member from the struct

Signed-off-by: Aneesh Kumar K.V <>

b97400ca 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export flag for indicating security model

This helps to remove some of the structure members

Signed-off-by: Aneesh Kumar K.V <>

d3ab98e6 10/12/2011 04:41 pm Aneesh Kumar K.V

hw/9pfs: Add new virtfs option writeout=immediate skip host page cache

writeout=immediate implies the after pwritev we do a sync_file_range.

Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Aneesh Kumar K.V <>

2289be19 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Move fid pathname tracking to seperate data type.

This enables us to add handles to track fids later. The
V9fsPath added is similar to V9fsString except that the
size include the NULL byte also.

Signed-off-by: Aneesh Kumar K.V <>

0174fe73 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add init callback to fs driver

This call back can be used to do fs driver specific initialization.

Signed-off-by: Aneesh Kumar K.V <>

532decb7 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add fs driver specific details to fscontext

Add a new context flag PATHNAME_FSCONTEXT and indicate whether
the fs driver track fid using path names. Also add a private
pointer that help us to track fs driver specific values in there

Signed-off-by: Aneesh Kumar K.V <>

5f524c1e 08/22/2011 07:14 am Harsh Prateek Bora

use readdir_r instead of readdir for reentrancy

Signed-off-by: Harsh Prateek Bora <>
Signed-off-by: Aneesh Kumar K.V <>

faa44e3d 06/01/2011 08:25 pm Venkateswararao Jujjuri (JV)

[virtio-9p] Make rpath thread safe

Current rpath inline function is heavily used in all system calls.
This function has a static buffer making it a non-thread safe function.
This patch introduces new thread-safe routine and makes use of it.

Signed-off-by: Venkateswararao Jujjuri "<>

873c3213 06/01/2011 08:25 pm Stefan Weil

virtio-9p: Use relative includes for files in hw

Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
without fixing the include paths. It used a modified CFLAGS
to add hw to the include search path, but this breaks builds
where the user wants to set special CFLAGS. Long include paths...

f35bde2f 04/27/2011 06:27 pm Harsh Prateek Bora

hw/virtio-9p-local.c: Remove unnecessary null char in symlink file

This patch removes the addition of null char in symlink file
which is being appended to file in case of mapped security model.
Without this patch, the extra null char causes LTP testcase lstat03...

353ac78d 04/27/2011 06:24 pm Aneesh Kumar K.V

virtio-9p: move 9p files around

Now that we start adding more files related to 9pfs
it make sense to move them to a separate directory

Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Venkateswararao Jujjuri <>