lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180513102409.4adc5200@xeon-e3>
Date:   Sun, 13 May 2018 10:24:09 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     kys@...uxonhyperv.com
Cc:     kys@...rosoft.com, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, devel@...uxdriverproject.org,
        olaf@...fle.de, apw@...onical.com, jasowang@...hat.com,
        vkuznets@...hat.com, Stephen Hemminger <sthemmin@...rosoft.com>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version
 5.0

On Sat, 12 May 2018 02:30:33 -0700
kys@...uxonhyperv.com wrote:

>  int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
>  {
> +	struct vmbus_channel_message_header *hdr;
>  	union hv_connection_id conn_id;
>  	int ret = 0;
>  	int retries = 0;
>  	u32 usec = 1;
>  
>  	conn_id.asu32 = 0;
> -	conn_id.u.id = VMBUS_MESSAGE_CONNECTION_ID;
> +	conn_id.u.id = vmbus_connection.msg_conn_id;
>  
>  	/*
>  	 * hv_post_message() can have transient failures because of
> @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
>  
>  		switch (ret) {
>  		case HV_STATUS_INVALID_CONNECTION_ID:
> +			/*
> +			 * See vmbus_negotiate_version(): VMBus protocol 5.0
> +			 * requires that we must use
> +			 * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate
> +			 * Contact message, but on old hosts that only
> +			 * support VMBus protocol 4.0 or lower, here we get
> +			 * HV_STATUS_INVALID_CONNECTION_ID and we should
> +			 * return an error immediately without retrying.
> +			 */
> +			hdr = (struct vmbus_channel_message_header *)buffer;

Hate to pick o the details, but buffer is void * so cast is not necessary here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ