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] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2014 15:14:25 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Vitaly Kuznetsov <vkuznets@...hat.com>,
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jason Wang <jasowang@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Drivers: hv: util: make struct hv_do_fcopy match Hyper-V
 host messages



> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> Sent: Friday, October 24, 2014 3:20 AM
> To: linux-api@...r.kernel.org; KY Srinivasan
> Cc: Greg Kroah-Hartman; Jason Wang; linux-kernel@...r.kernel.org
> Subject: [PATCH] Drivers: hv: util: make struct hv_do_fcopy match Hyper-V
> host messages
> 
> An attempt to fix fcopy on i586 (bc5a5b0 Drivers: hv: util: Properly pack the
> data for file copy functionality) led to a regression on x86_64 (and actually
> didn't fix
> i586 breakage). Fcopy messages from Hyper-V host come in the following
> format:
> 
> struct do_fcopy_hdr   |   36 bytes
> 0000                  |    4 bytes
> offset                |    8 bytes
> size                  |    4 bytes
> data                  | 6144 bytes
> 
> On x86_64 struct hv_do_fcopy matched this format without '
> __attribute__((packed))'
> and on i586 adding ' __attribute__((packed))' to it doesn't change anything.
> Keep the structure packed and add padding to match re reality. Tested both
> i586 and x86_64 on Hyper-V Server 2012 R2.

Thanks Vitaly.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
Cc: <stable@...r.kernel.org>
> ---
>  include/uapi/linux/hyperv.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index
> 0a8e6ba..bb1cb73 100644
> --- a/include/uapi/linux/hyperv.h
> +++ b/include/uapi/linux/hyperv.h
> @@ -134,6 +134,7 @@ struct hv_start_fcopy {
> 
>  struct hv_do_fcopy {
>  	struct hv_fcopy_hdr hdr;
> +	__u32   pad;
>  	__u64	offset;
>  	__u32	size;
>  	__u8	data[DATA_FRAGMENT];
> --
> 1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ