From patchwork Mon Jan 12 16:42:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 427821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id DF3B0140146; Tue, 13 Jan 2015 03:42:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1YAi4A-0004We-5d; Mon, 12 Jan 2015 16:42:10 +0000 Received: from mail-we0-f178.google.com ([74.125.82.178]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1YAi43-0004WK-SK for kernel-team@lists.ubuntu.com; Mon, 12 Jan 2015 16:42:03 +0000 Received: by mail-we0-f178.google.com with SMTP id p10so20090773wes.9 for ; Mon, 12 Jan 2015 08:42:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fIMxWj9cFEK1r6LorCts8vs5K+bQ2+U8bXth3Msx33c=; b=mGzba3D8rJN73cFF5oyoN4t6pjAW39jsGPam1dllZXBDZdeQBoznATNB8F+6XOX/6D isgEDSR/mktneDmnX/O6RKb1Mcty3TB151k/WpTCHo3TnurMvEWUxP/80MMbfvxxGVul U/qVj1Gj0SfhJ9oL4MMxOSEfV8Jrf+uckK94XRV2JkhMl+XQFrVPCNZlYIPH+21LNopa fJqgPzGgxITFM9JIWxvz+5G1XQ5ptZtbT8K2Icix10EPerL4dYX6Cw3YMg9c2+Rw1+s8 qzMSd62YP4otaB9Lml5URmTI50zujEQnwDKPM2+e1Q61T29nK/qUDtHh4LemSP7QbU8j E1DQ== X-Gm-Message-State: ALoCoQnzc21uX7/eSr6Ma8XRi5990vGm6FFG6xLegDiFXFxfB6KZj/ZSsFkxyXEp7nS4ynGU5Xfb X-Received: by 10.180.100.98 with SMTP id ex2mr32141482wib.58.1421080923599; Mon, 12 Jan 2015 08:42:03 -0800 (PST) Received: from localhost ([2001:470:6973:10:d81f:9933:bb4f:7ebe]) by mx.google.com with ESMTPSA id vh8sm22275759wjc.12.2015.01.12.08.42.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 08:42:02 -0800 (PST) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [utopic 1/1] Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host messages Date: Mon, 12 Jan 2015 16:42:43 +0000 Message-Id: <1421080963-17627-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421080963-17627-1-git-send-email-apw@canonical.com> References: <1421080963-17627-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Vitaly Kuznetsov 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. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Cc: Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 31d4ea1a093fcf668d5f95af44b8d41488bdb7ec) BugLink: http://bugs.launchpad.net/bugs/1401903 Signed-off-by: Andy Whitcroft --- 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];