- Mar 06, 2018
-
-
Julia Suvorova authored
basename(3) and dirname(3) modify their argument and may return pointers to statically allocated memory which may be overwritten by subsequent calls. g_path_get_basename and g_path_get_dirname have no such issues, and therefore more preferable. Signed-off-by:
Julia Suvorova <jusual@mail.ru> Message-Id: <1519888086-4207-1-git-send-email-jusual@mail.ru> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 09, 2018
-
-
Markus Armbruster authored
qemu-common.h includes qemu/option.h, but most places that include the former don't actually need the latter. Drop the include, and add it to the places that actually need it. While there, drop superfluous includes of both headers, and separate #include from file comment with a blank line. This cleanup makes the number of objects depending on qemu/option.h drop from 4545 (out of 4743) to 284 in my "build everything" tree. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-20-armbru@redhat.com> [Semantic conflict with commit bdd6a90a in block/nvme.c resolved]
-
Markus Armbruster authored
This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e9 resolved, OSX breakage fixed]
-
- Feb 08, 2018
-
-
Paolo Bonzini authored
qemu_co_queue_next does not need to release and re-acquire the mutex, because the queued coroutine does not run immediately. However, this does not hold for qemu_co_enter_next. Now that qemu_co_queue_wait can synchronize (via QemuLockable) with code that is not running in coroutine context, it's important that code using qemu_co_enter_next can easily use a standardized locking idiom. First of all, qemu_co_enter_next must use aio_co_wake to restart the coroutine. Second, the function gains a second argument, a QemuLockable*, and the comments of qemu_co_queue_next and qemu_co_queue_restart_all are adjusted to clarify the difference. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180203153935.8056-5-pbonzini@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Fam Zheng <famz@redhat.com>
-
- Jan 08, 2018
-
-
Greg Kurz authored
This patch changes some error messages in the backend init code and convert backends to propagate QEMU Error objects instead of calling error_report(). One notable improvement is that the local backend now provides a more detailed error report when it fails to open the shared directory. Signed-off-by:
Greg Kurz <groug@kaod.org>
-
Greg Kurz authored
This patch changes some error messages in the backend opts parsing code and convert backends to propagate QEMU Error objects instead of calling error_report(). Signed-off-by:
Greg Kurz <groug@kaod.org>
-
Greg Kurz authored
To comply with the QEMU coding style. Signed-off-by:
Greg Kurz <groug@kaod.org>
-
Greg Kurz authored
To comply with the QEMU coding style. Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- Sep 05, 2017
-
-
ZhiPeng Lu authored
@rpath and @sock_name are not freed and leaked. [groug, not really leaked since the program exits just after that. But it is always good practice to free allocated memory] Signed-off-by:
Zhipeng Lu <lu.zhipeng@zte.com.cn> Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- Aug 30, 2017
-
-
Cornelia Huck authored
Nothing in fsdev/ or hw/9pfs/ depends on pci; it should rather depend on CONFIG_VIRTFS and CONFIG_VIRTIO/CONFIG_XEN only. Acked-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
- Jul 18, 2017
-
-
Manos Pitsidianakis authored
throttle_config() cancels the timers of the calling BlockBackend. This doesn't make sense because other BlockBackends in the group remain untouched. There's no need to cancel the timers in the one specific BlockBackend so let's not do that. Throttled requests will run as scheduled and future requests will follow the new configuration. This also allows a throttle group's configuration to be changed even when it has no members. Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Manos Pitsidianakis authored
Clock type in throttling is currently inferred by the ThrottleTimer's clock type even though it is a per-ThrottleGroup property; it doesn't make sense to have different clock types in the same group. Moving this to a field in ThrottleGroup can simplify some of the throttle functions. Signed-off-by:
Manos Pitsidianakis <el13635@mail.ntua.gr> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jun 29, 2017
-
-
Tobias Schramm authored
In mapped security modes, files are created with very restrictive permissions (600 for files and 700 for directories). This makes file sharing between virtual machines and users on the host rather complicated. Imagine eg. a group of users that need to access data produced by processes on a virtual machine. Giving those users access to the data will be difficult since the group access mode is always 0. This patch makes the default mode for both files and directories configurable. Existing setups that don't know about the new parameters keep using the current secure behavior. Signed-off-by:
Tobias Schramm <tobleminer@gmail.com> Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- May 25, 2017
-
-
Greg Kurz authored
The utimensat() and futimens() syscalls have been around for ages (ie, glibc 2.6 and linux 2.6.22), and the decision was already taken to switch to utimensat() anyway when fixing CVE-2016-9602 in 2.9. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Greg Kurz authored
Since chroot() doesn't change the current directory, it is indeed a good practice to chdir() to the target directory and then then chroot(), or to chroot() to the target directory and then chdir("/"). The current code does neither of them actually. Let's go for the latter. This doesn't fix any security issue since all of this takes place before the helper begins to process requests. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Greg Kurz authored
The code only uses well known format strings. An unknown format token is a bug. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Stefano Stabellini <sstabellini@kernel.org>
-
- Feb 28, 2017
-
-
Pradeep Jagadeesh authored
This patch removes the redundant throttle code that was present in block and fsdev device files. Now the common code is moved to a single file. Signed-off-by:
Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Alberto Garcia <berto@igalia.com> (fix indent nit, Greg Kurz) Signed-off-by:
Greg Kurz <groug@kaod.org>
-
Pradeep Jagadeesh authored
This patchset adds the throttle support for the 9p-local driver. For now this functionality can be enabled only through qemu cli options. QMP interface and support to other drivers need further extensions. To make it simple for other 9p drivers, the throttle code has been put in separate files. Signed-off-by:
Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> Reviewed-by:
Alberto Garcia <berto@igalia.com> (pass extra NULL CoMutex * argument to qemu_co_queue_wait(), added options to qemu-options.hx, Greg Kurz) Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- Nov 23, 2016
-
-
Li Qiang authored
Currently, the backend of VirtFS doesn't have a cleanup function. This will lead resource leak issues if the backed driver allocates resources. This patch addresses this issue. Signed-off-by:
Li Qiang <liq3ea@gmail.com> Reviewed-by:
Greg Kurz <groug@kaod.org> Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- Oct 17, 2016
-
-
Greg Kurz authored
Signed-off-by:
Greg Kurz <groug@kaod.org>
-
Li Qiang authored
If a guest sends an empty string paramater to any 9P operation, the current code unmarshals it into a V9fsString equal to { .size = 0, .data = NULL }. This is unfortunate because it can cause NULL pointer dereference to happen at various locations in the 9pfs code. And we don't want to check str->data everywhere we pass it to strcmp() or any other function which expects a dereferenceable pointer. This patch enforces the allocation of genuine C empty strings instead, so callers don't have to bother. Out of all v9fs_iov_vunmarshal() users, only v9fs_xattrwalk() checks if the returned string is empty. It now uses v9fs_string_size() since name.data cannot be NULL anymore. Signed-off-by:
Li Qiang <liqiang6-s@360.cn> [groug, rewritten title and changelog, fix empty string check in v9fs_xattrwalk()] Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- Sep 16, 2016
-
-
Greg Kurz authored
The v9fs_string_null() function just calls v9fs_string_free(). Also it only has 4 users, whereas v9fs_string_free() has 87. This patch converts users to call directly v9fs_string_free() and drops the useless function. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Cédric Le Goater <clg@kaod.org>
-
- Jul 12, 2016
-
-
Markus Armbruster authored
Cleaned up with scripts/clean-header-guards.pl. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
Markus Armbruster authored
Header guard symbols should match their file name to make guard collisions less likely. Offenders found with scripts/clean-header-guards.pl -vn. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Richard Henderson <rth@twiddle.net>
-
Peter Maydell authored
Don't use the cpu_to_*w() functions, which we are trying to deprecate. Instead just use cpu_to_*() to do the byteswap, which brings the code in the marshal function in line with that in the unmarshal. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1467908460-27048-2-git-send-email-peter.maydell@linaro.org
-
- Jul 01, 2016
-
-
Greg Kurz authored
The <sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't define CONFIG_IOVEC (like win32, if it is to support 9p one day). Acked-by:
Cédric Le Goater <clg@kaod.org> Acked-by:
Michael Fritscher <michael@fritscher.net> Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com>
-
- Jun 07, 2016
-
-
Peter Maydell authored
Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Michael Tokarev authored
Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jun 06, 2016
-
-
Greg Kurz authored
This patch changes the 9p code to use readdir() again instead of readdir_r(), which is deprecated in glibc 2.24. All the locking was put in place by a previous patch. Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com>
-
Greg Kurz authored
Most of the 9p code is now virtio agnostic. This patch does a final cleanup: - drop references to Virtio from the header comments - fix includes Also drop a couple of leading empty lines while here. Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com>
-
- Mar 16, 2016
-
-
Eduardo Habkost authored
The only remaining users of machine_init() only call qemu_add_opts(). Rename machine_init() to opts_init() and move it closer to the qemu_add_opts() calls on vl.c. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Feb 23, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Feb 11, 2016
-
-
Christophe Fergeau authored
There was a 'capbilities' typo in this man page. This commit reformulates the sentence the typo was in to make it easier to grasp. This is based on a suggestion from Eric Blake. Signed-off-by:
Christophe Fergeau <cfergeau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jan 29, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-18-git-send-email-peter.maydell@linaro.org
-
- Jan 26, 2016
-
-
Sitsofe Wheeler authored
Signed-off-by:
Sitsofe Wheeler <sitsofe@yahoo.com> Message-Id: <1452718226-25001-1-git-send-email-sitsofe@yahoo.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jan 22, 2016
-
-
Greg Kurz authored
Only fix the code that gets built into QEMU. Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Greg Kurz <gkurz@linux.vnet.ibm.com>
-
- Jan 08, 2016
-
-
Wei Liu authored
Factor out v9fs_iov_v{,un}marshal. Implement pdu_{,un}marshal with those functions. Signed-off-by:
Wei Liu <wei.liu2@citrix.com> Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
-
Wei Liu authored
And rename v9fs_marshal to v9fs_iov_marshal, v9fs_unmarshal to v9fs_iov_unmarshal. The rationale behind this change is that, this marshalling interface is used both by virtio and proxy helper. Renaming files and functions to reflect the true nature of this interface. Xen transport is going to have its own marshalling interface. Signed-off-by:
Wei Liu <wei.liu2@citrix.com> Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
-
Wei Liu authored
Break out some generic functions for marshaling 9p state. Pure code motion plus minor fixes for build system. Signed-off-by:
Wei Liu <wei.liu2@citrix.com> Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
-
Wei Liu authored
Those two files are not virtio specific. Rename them to use generic names. Fix includes in various C files. Change define guards and comments in header files. Signed-off-by:
Wei Liu <wei.liu2@citrix.com> Signed-off-by:
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
-