17 Apr, 2014
1 commit
-
Return the appropriate error code and handle the case when the target
file exists correctly. This fixes a bug.Signed-off-by: K. Y. Srinivasan
Cc: [3.14]
Signed-off-by: Greg Kroah-Hartman
19 Feb, 2014
1 commit
-
Implement the file copy service for Linux guests on Hyper-V. This permits the
host to copy a file (over VMBUS) into the guest. This facility is part of
"guest integration services" supported on the Windows platform.
Here is a link that provides additional details on this functionality:http://technet.microsoft.com/en-us/library/dn464282.aspx
In V1 version of the patch I have addressed comments from
Olaf Hering and Dan CarpenterIn V2 version of this patch I did some minor cleanup (making some globals
static). In V4 version of the patch I have addressed all of Olaf's
most recent set of comments/concerns.In V5 version of the patch I had addressed Greg's most recent comments.
I would like to thank Greg for suggesting that I use misc device; it has
significantly simplified the code.In V6 version of the patch I have cleaned up error message based on Olaf's
comments. I have also rebased the patch based on the current tip.In this version of the patch, I have addressed the latest comments from Greg.
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
16 Feb, 2014
2 commits
-
If the guest has a FAT file system mounted, skip it during the FREEZE
operation. With this change we can support host initiated backup of
the guest even when the guest may have FAT file systems mounted.Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Currently, there is no makefile for the Hyper-V tools.
This patch adds the missing makefile, and adds it to the main tools makefile.Signed-off-by: Bjarke Istrup Pedersen
Signed-off-by: Greg Kroah-Hartman
09 Dec, 2013
1 commit
-
With very old libc headers the inclusion of sys/types.h causes conflicts
with linux/types.h. Since the latter is not required anyway, remove it
from the source files. If any of the headers really needs linux/types.h
it has to include it itself.Signed-off-by: Olaf Hering
Signed-off-by: Greg Kroah-Hartman
27 Sep, 2013
2 commits
-
send_buffer is used only once during registration. To reduce runtime
memory usage reuse the recv_buffer for registration. Also use
NLMSG_LENGTH instead of NLMSG_HDRLEN to take alignment into account.Signed-off-by: Olaf Hering
Signed-off-by: Greg Kroah-Hartman -
kvp_daemon does some operations which take an unpredicable amount of
time. In addition the kernel driver gives the kvp_daemon a 5 second
timeout to respond to message from the host. If an operation such as
getaddrinfo takes a long time and the timeout triggers then netlink
errors occour. As a result of such errors the daemon just terminates and
the service becomes unavailable.Idendifying and fixing these shortcomings in the kernel-userland
communication protocol will be done in separate patches. This change
fixes just one obvious timeout bug.Update kvp_get_domain_name to not return a value, better diagnostic for
the consumer of the hostname string, remove trailing newline in error
case, use snprintf to not overrun output buffer, get hostname only once
and return the cached result.Signed-off-by: Olaf Hering
Signed-off-by: Greg Kroah-Hartman
13 Aug, 2013
2 commits
-
There is no need to have a nlmsghdr pointer to another temporary buffer.
Instead use a full struct nlmsghdr.Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
netlink_send is supposed to send just the cn_msg+hv_kvp_msg via netlink.
Currently it sets an incorrect iovec size, as reported by valgrind.In the case of registering with the kernel the allocated buffer is large
enough to hold nlmsghdr+cn_msg+hv_kvp_msg, no overrun happens. In the
case of responding to the kernel the cn_msg is located in the middle of
recv_buffer, after the nlmsghdr. Currently the code in netlink_send adds
also the size of nlmsghdr to the payload. But nlmsghdr is a separate
iovec. This leads to an (harmless) out-of-bounds access when the kernel
processes the iovec. Correct the iovec size of the cn_msg to be just
cn_msg + its payload.Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
05 Aug, 2013
2 commits
-
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
... to simplify error path in upcoming changes.
Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
02 Aug, 2013
2 commits
-
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
hv_kvp_daemon fails to start in current openSuSE 13.1 snapshots because
the kvp_send_buffer is too small to hold cn_msg+hv_kvp_msg, the very
first sendmsg returns with EFAULT. In addition it fixes the Network info
tab in Windows Server 2012R2 in SLES11.Adjust the code in kvp and vss daemon to allocate the needed buffers at
runtime. To keep the code simple, the buffer_len includes also the
nlmsghdr, although only the recv_buffer needs this extra space.Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2013
1 commit
-
This resolves a merge issue with:
drivers/misc/mei/init.cSigned-off-by: Greg Kroah-Hartman
27 Jul, 2013
3 commits
-
Check return value of setsockopt call and if it fails print error to the
system log and exit with non-zero value.Signed-off-by: Tomas Hozza
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Check return value of poll call and if it fails print error to the
system log. If errno is EINVAL then exit with non-zero value otherwise
continue the while loop and call poll again.Signed-off-by: Tomas Hozza
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Use errno and strerror() when logging errors to provide more
information.Signed-off-by: Tomas Hozza
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2013
1 commit
-
Each subnet string needs to be separated with a semicolon. Fix this bug.
Signed-off-by: K. Y. Srinivasan
Cc: Stable
Signed-off-by: Greg Kroah-Hartman
18 Jun, 2013
1 commit
-
Use errno and strerror() when logging errors to provide
more information.Signed-off-by: Tomas Hozza
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
04 Jun, 2013
4 commits
-
Close "fd" file descriptor when is goes out of scope so it does
not leak.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Check return value of strchr call and dereference it only if it is
not NULL.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Check return value of poll call and if it fails print error
to the system log. If errno is EINVAL then exit with non-zero
value otherwise continue the while loop and call poll again.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Check return value of setsockopt call and if it fails print error
to the system log and exit with non-zero value.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
25 Apr, 2013
7 commits
-
Fix a checkpatch warning.
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
fsreeze does not work for iso9660 filesystems. A ENOSUPP may be caught
in the freeze case, but the subsequent thaw call would fail and leads to
a false error.Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
As suggested by Paolo Bonzini, use ioctl instead of calling fsfreeze.
Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
As suggested by Paolo Bonzini, use getmntent instead of parsing output
of mount(1).Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Fix a checkpatch warning.
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Similar to what commit 95a69adab9acfc3981c504737a2b6578e4d846ef ("tools:
hv: Netlink source address validation allows DoS") does in
hv_kvp_daemon, improve checks for origin of netlink connector message.Signed-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
This change fixes a few compile errors:
hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:66: warning: 'return' with no value, in function returning non-void
hv_vss_daemon.c: In function 'main':
hv_vss_daemon.c:130: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:47: warning: 'fs_op' may be used uninitialized in this functionSigned-off-by: Olaf Hering
Signed-off-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
16 Mar, 2013
4 commits
-
This driver supports host initiated backup of the guest. On Windows guests,
the host can generate application consistent backups using the Windows VSS
framework. On Linux, we ensure that the backup will be file system consistent.
This driver allows the host to initiate a "Freeze" operation on all the mounted
file systems in the guest. Once the mounted file systems in the guest are frozen,
the host snapshots the guest's file systems. Once this is done, the guest's file
systems are "thawed".This driver has a user-level component (daemon) that invokes the appropriate
operation on all the mounted file systems in response to the requests from
the host. The duration for which the guest is frozen is very short - a few seconds.
During this interval, the diff disk is comitted.In this version of the patch I have addressed the feedback from Olaf Herring.
Also, some of the connector related issues have been fixed.Signed-off-by: K. Y. Srinivasan
Reviewed-by: Haiyang Zhang
Cc: Evgeniy Polyakov
Signed-off-by: Greg Kroah-Hartman -
HyperV KVP daemon should check nlmsg_type in received netlink message
header. If message type is NLMSG_DONE daemon can proceed with processing
otherwise it should wait for next message.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
HyperV daemon should use macros for option values when calling setsockopt.
Using specific numeric values instead of macros is confusing.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Previously HyperV daemon set sockaddr_nl.nl_groups to CN_KVP_IDX.
Netlink documentation says: "nl_groups is a bit mask with every bit
representing a netlink group number". Since CN_KVP_IDX value is "9"
HyperV daemon was receiving Netlink messages also from group number
"1" which is used by CGroup Rules Engine Daemon. This caused the
daemon to segfault (at least on 2.6.32 kernel).HyperV daemon should set nl_groups to zero and specify multicast
group CN_KVP_IDX only by using socket options.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
19 Jan, 2013
1 commit
-
Use CLOEXEC flag when opening kvp_pool_x files to prevent file
descriptor leakage. Not using it was causing a problem when
SELinux was enabled.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
18 Jan, 2013
4 commits
-
Fix for the daemon code and for hv_set_ifconfig.sh script, so
that the created ifcfg-* file is consistent with initscripts
documentation.Signed-off-by: Tomas Hozza
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Jason Wang
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
It's silly to create directories without execute permission, or to
give permissions to 'other' but not the group-owner.Write the permissions in octal and 'ls -l' format since these are much
easier to read than the named macros.Signed-off-by: Ben Hutchings
Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman -
Initial patch by Ben Hutchings
We will install this in /usr, so it must use /var/lib for its state.
Only programs installed under /opt should use /var/opt.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman
16 Nov, 2012
1 commit
-
Initial patch by Ben Hutchings
Standard C strings are arrays of char, not __u8 (unsigned char).
Declare variables and parameters accordingly, and add the necessary
casts.Signed-off-by: Tomas Hozza
Acked-by: K. Y. Srinivasan
Signed-off-by: Greg Kroah-Hartman