- Mar 08, 2023
-
-
Kfir Manor authored
Adds registry value VssOption with value 1 to QEMU Guest Agent VSS Provider service registry key Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
The custom action uses cmd.exe to run VSS Service installation and removal which causes an interactive command shell to spawn. This shell can be used to execute any commands as a SYSTEM user. Even if call qemu-ga.exe directly the interactive command shell will be spawned as qemu-ga.exe is a console application and used by users from the console as well as a service. As VSS Service runs from DLL which contains the installer and uninstaller code, it can be run directly by rundll32.exe without any interactive command shell. Add specific entry points for rundll which is just a wrapper for COMRegister/COMUnregister functions with proper arguments. resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 fixes: CVE-2023-0664 (part 2 of 2) Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Yan Vugenfirer <yvugenfi@redhat.com> Reported-by:
Brian Wiltse <brian.wiltse@live.com>
-
Konstantin Kostiuk authored
Remove the 'change' button from "Programs and Features" because it does not checks if a user is an admin or not. The installer has no components to choose from and always installs everything. So the 'change' button is not obviously needed but can create a security issue. resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2167423 fixes: CVE-2023-0664 (part 1 of 2) Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Yan Vugenfirer <yvugenfi@redhat.com> Reported-by:
Brian Wiltse <brian.wiltse@live.com>
-
- Feb 23, 2023
-
-
Markus Armbruster authored
slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d252 "guest agent: add guest agent RPCs/commands" along with QERR_QGA_LOGGING_FAILED, so maybe that one was meant. However, QERR_QGA_LOGGING_FAILED was never actually used, and was removed in commit d73f0bea "qerror.h: Remove unused error classes". Drop the dangling reference. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-9-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-2-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Feb 08, 2023
-
-
Markus Armbruster authored
This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Message-Id: <20230202133830.2152150-11-armbru@redhat.com>
-
- Jan 09, 2023
-
-
Nikita Ivanov authored
There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which handles the same while loop. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 Signed-off-by:
Nikita Ivanov <nivanov@cloudlinux.com> Message-Id: <20221023090422.242617-3-nivanov@cloudlinux.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> [thuth: Dropped the hunk that changed socket_accept() in libqtest.c] Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Dec 20, 2022
-
-
Andrey Drobyshev authored
According to GLib changelog [1], since version 2.73.2 GLib is using libpcre2 instead of libpcre. As a result, qemu-ga MSI installation fails due to missing DLL when linked with the newer GLib. This commit makes wixl to put the right libpcre version into the MSI bundle: either libpcre-1.dll or libpcre2-8-0.dll, depending on the present version of GLib. [1] https://gitlab.gnome.org/GNOME/glib/-/releases#2.73.2 Previous version: https://lists.nongnu.org/archive/html/qemu-trivial/2022-11/msg00237.html Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Andrey Drobyshev authored
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument). Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the interface to be extended. Note that since slog() is using G_LOG_LEVEL_INFO level, its behaviour doesn't change. Originally-by:
Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Andrey Drobyshev authored
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests. In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres" respectively are used to generate ".rc" file and COFF object file, and then the COFF file is linked into qemu-ga.exe. [1] https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-reporteventa [2] https://learn.microsoft.com/en-us/windows/win32/eventlog/message-text-files Originally-by:
Yuri Pudgorodskiy <yur@virtuozzo.com> Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Tested-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Brad Smith authored
qga: Add initial OpenBSD and NetBSD support Signed-off-by:
Brad Smith <brad@comstyle.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Skip getting PCI info from disks type USB and give them an empty PCI address instead. Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Kfir Manor authored
Refactoring code to avoid duplication of creating an empty PCI address code. Signed-off-by:
Kfir Manor <kfir@daynix.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Dec 14, 2022
-
-
Markus Armbruster authored
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qga/qapi-schema.json. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Michael Roth <michael.roth@amd.com> Cc: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20221104160712.3005652-30-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org>
-
Markus Armbruster authored
When error_propagate(errp, local_err) is the only reader of @local_err, we can just as well change its writers to write @errp directly, and drop the error_propagate() along with @local_err. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20221121085054.683122-2-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org>
-
- Nov 05, 2022
-
-
Stefan Weil authored
Most of them were found and fixed using codespell. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20221030105944.311940-1-sw@weilnetz.de> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Oct 26, 2022
-
-
Bjørn Forsman authored
It's useful to know which device was used if/when it fails. channel-win32.c had this since 2015, with c69403fc ("qemu-ga: debug printouts to help troubleshoot installation"), this brings channel-posix.c up to speed. Signed-off-by:
Bjørn Forsman <bjorn.forsman@gmail.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
Replace a dumb function in commands-bsd.c by the code of HW address getting. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
In the next patch FreeBSD support for guest-network-get-interfaces will be added. Previously move Linux-specific code of HW address getting to a separate functions and add a dumb function to commands-bsd.c. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
Move qmp_guest_set_user_password() from __linux__ condition to (__linux__ || __FreeBSD__) condition. Add command and arguments for password setting in FreeBSD. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
Add appropriate shutdown command arguments to qmp_guest_shutdown() for FreeBSD. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
UFS supports FS freezing through ioctl UFSSUSPEND on /dev/ufssuspend. Frozen FS can be thawed by closing /dev/ufssuspend file descriptior. Use getmntinfo to get a list of mounted FS. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
In the next patches we are going to add FreeBSD support for QEMU Guest Agent. In the result, code in commands-posix.c will be too cumbersome. Move Linux-specific FS freeze/thaw code to a separate file commands-linux.c keeping common POSIX code in commands-posix.c. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Alexander Ivanov authored
- Fix device path. - Fix virtio-serial channel initialization. - Make the code buildable in FreeBSD. Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Acked-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Oct 01, 2022
-
-
Paolo Bonzini authored
This removes the dependency of dbus-display on --enable-modules. It also allows cleanups in modinfo collection and allows moving C++ compiler detection to meson.build. Because it is now deprecated to use install_subdir to create an empty directory, replace it with install_emptydir. Updating the Meson submodule to 0.61.5 also removes the message WARNING: Broken python installation detected. Python files installed by Meson might not be found by python interpreter. unless using system meson is forced with --meson. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/873 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/848 Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 20, 2022
-
-
Thomas Huth authored
Let's use better, more inclusive wording here. Message-Id: <20220727092135.302915-3-thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
Let's use a more appropriate wording for this command line and config file option. The old ones are still accepted for compatibility reasons, but marked as deprecated now so that it could be removed in a future version of QEMU. This change is based on earlier patches from Philippe Mathieu-Daudé, with the idea for the new option name suggested by BALATON Zoltan. And while we're at it, replace the "?" in the help text with "help" since that does not have the problem of conflicting with the wildcard character of the shells. Message-Id: <20220727092135.302915-2-thuth@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jul 18, 2022
-
-
John Snow authored
In some container environments, there may be references to block devices witnessable from a container through /proc/self/mountinfo that reference devices we simply don't have access to in the container, and cannot provide information about. Instead of failing the entire fsinfo command, return stub information for these failed lookups. This allows test-qga to pass under docker tests, which are in turn used by the CentOS VM tests. Signed-off-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220708153503.18864-2-jsnow@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jul 13, 2022
-
-
Zhenwei Pi authored
A vCPU thread always reaches 100% utilization when: - guest uses idle=poll - disable HLT vm-exit - enable MWAIT Add new guest agent command 'guest-get-cpustats' to get guest CPU statistics, we can know the guest workload and how busy the CPU is. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20220707005602.696557-3-pizhenwei@bytedance.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- Jul 08, 2022
-
-
Akihiko Odaki authored
Signed-off-by:
Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220624145455.50058-1-akihiko.odaki@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 06, 2022
-
-
Paolo Bonzini authored
The function will return the build root of the parent project if called from a subproject; that is irrelevant for QEMU's usage but rarely desirable, and therefore the function was deprecated and replaced by two functions project_build_root() and global_build_root(). Replace it with the former. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 28, 2022
-
-
Marc-André Lureau authored
Use more conventional variables to set the location of pre-built DLL/bin. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-15-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Sadly, wixl doesn't have 'elif'. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-14-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
No clear reason to make guesses here. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-13-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
No need to setup an environment or to check if the variable is undefined manually. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-12-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Change build_fs_mount_list() to return bool, in accordance with the guidance under = Rules = in include/qapi/error.h Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Suggested-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-10-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
qemu_open_old() uses qemu_open_internal() which handles special "/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error reporting (and some O_DIRECT special error casing). The monitor fdset handling is unnecessary for qga, use qga_open_cloexec() instead. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-9-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Allow for a single point of error reporting, and further refactoring. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-8-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The function takes care of setting CLOEXEC. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-7-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
QGA calls qemu_open_old() in various places. Calling qemu_open() instead isn't a great alternative, as it has special "/dev/fdset" handling and depends on QEMU internal monitor data structures. Instead, provide a simple helper for QGA needs, with Error* support. The following patches will make use of it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-6-marcandre.lureau@redhat.com>
-