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

    Olaf Hering
     
  • 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

    Olaf Hering
     

05 Aug, 2013

2 commits


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

    Olaf Hering
     
  • 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

    Olaf Hering
     

30 Jul, 2013

1 commit


27 Jul, 2013

3 commits


17 Jul, 2013

1 commit


18 Jun, 2013

1 commit


04 Jun, 2013

4 commits


25 Apr, 2013

7 commits


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

    K. Y. Srinivasan
     
  • 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

    Tomas Hozza
     
  • 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

    Tomas Hozza
     
  • 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

    Tomas Hozza
     

19 Jan, 2013

1 commit


18 Jan, 2013

4 commits


16 Nov, 2012

2 commits

  • 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

    Tomas Hozza
     
  • The source code without this patch caused hypervkvpd to exit when it processed
    a spoofed Netlink packet which has been sent from an untrusted local user.
    Now Netlink messages with a non-zero nl_pid source address are ignored
    and a warning is printed into the syslog.

    Signed-off-by: Tomas Hozza
    Acked-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Tomas Hozza
     

31 Oct, 2012

2 commits

  • Don't return loopback addresses and further don't terminate
    the IP address strings with a semicolon. This is the current
    behavior of Windows guests.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Haiyang Zhang
    Reported-by: Claudio Latini
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • Currently, we are returning the same string for both OSBuildNumber
    and OSVersion keys. Return the full uts string for the OSBuild
    key since Windows does not impose any restrictions on this.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Haiyang Zhang
    Reported-by: Claudio Latini
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     

11 Sep, 2012

4 commits

  • There is a new convention, used by systemd and supported by most
    distributions, to put basic OS release information in /etc/os-release.
    Added some additional error checking on strdup()

    Signed-off-by: Ben Hutchings
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • hv_kvp_daemon currently does not check whether fread() or fwrite()
    succeed. Add the necessary checks. Also, remove the incorrect use of
    feof() before fread().

    Signed-off-by: Ben Hutchings
    Signed-off-by: K. Y. Srinivasan
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • Linux native exit codes are 8-bit unsigned values. exit(-1) results
    in an exit code of 255, which is usually reserved for shells reporting
    'command not found'. Use the portable value EXIT_FAILURE. (Not that
    this matters much for a daemon.)

    Signed-off-by: Ben Hutchings
    Signed-off-by: K. Y. Srinivasan
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • Match up each fopen() with an fclose().

    Signed-off-by: Ben Hutchings
    Signed-off-by: K. Y. Srinivasan
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings