Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1271754/?format=api
{ "id": 1271754, "url": "http://patchwork.ozlabs.org/api/patches/1271754/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200416095049.12917-1-geert@linux-m68k.org/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200416095049.12917-1-geert@linux-m68k.org>", "list_archive_url": null, "date": "2020-04-16T09:50:49", "name": "virtchnl: Add missing explicit padding to structures", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7964d6fcc1f353ea24505793de80ef6d113aa372", "submitter": { "id": 703, "url": "http://patchwork.ozlabs.org/api/people/703/?format=api", "name": "Geert Uytterhoeven", "email": "geert@linux-m68k.org" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200416095049.12917-1-geert@linux-m68k.org/mbox/", "series": [ { "id": 170687, "url": "http://patchwork.ozlabs.org/api/series/170687/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=170687", "date": "2020-04-16T09:50:49", "name": "virtchnl: Add missing explicit padding to structures", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/170687/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1271754/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1271754/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=none (p=none dis=none) header.from=linux-m68k.org" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4932zh1VF9zB3x4\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2020 01:23:08 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A834622640;\n\tThu, 16 Apr 2020 15:23:05 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 1ysU5Y2mL6lJ; Thu, 16 Apr 2020 15:23:02 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id CDBBF2263E;\n\tThu, 16 Apr 2020 15:23:02 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by ash.osuosl.org (Postfix) with ESMTP id 76D6C1BF8B4\n for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Apr 2020 09:50:57 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by hemlock.osuosl.org (Postfix) with ESMTP id 72C6186EC8\n for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Apr 2020 09:50:57 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 1cxp7PRHLnre for <intel-wired-lan@lists.osuosl.org>;\n Thu, 16 Apr 2020 09:50:55 +0000 (UTC)", "from michel.telenet-ops.be (michel.telenet-ops.be [195.130.137.88])\n by hemlock.osuosl.org (Postfix) with ESMTPS id 4534C86D73\n for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Apr 2020 09:50:54 +0000 (UTC)", "from ramsan ([IPv6:2a02:1810:ac12:ed60:fd83:81bb:c1d7:433d])\n by michel.telenet-ops.be with bizsmtp\n id TMqr220064dKHqf06Mqrzy; Thu, 16 Apr 2020 11:50:51 +0200", "from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim\n 4.90_1)\n (envelope-from <geert@linux-m68k.org>)\n id 1jP1AZ-00013K-2g; Thu, 16 Apr 2020 11:50:51 +0200", "from geert by rox.of.borg with local (Exim 4.90_1)\n (envelope-from <geert@linux-m68k.org>)\n id 1jP1AZ-0003N5-0d; Thu, 16 Apr 2020 11:50:51 +0200" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "From": "Geert Uytterhoeven <geert@linux-m68k.org>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>,\n \"David S . Miller\" <davem@davemloft.net>", "Date": "Thu, 16 Apr 2020 11:50:49 +0200", "Message-Id": "<20200416095049.12917-1-geert@linux-m68k.org>", "X-Mailer": "git-send-email 2.17.1", "MIME-Version": "1.0", "X-Mailman-Approved-At": "Thu, 16 Apr 2020 15:23:01 +0000", "Subject": "[Intel-wired-lan] [PATCH] virtchnl: Add missing explicit padding to\n structures", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "On e.g. m68k, the alignment of 32-bit values is only 2 bytes, leading\nto:\n\n ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t^\n ./include/linux/avf/virtchnl.h:577:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);\n ^~~~~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:577:32: error: enumerator value for ‘virtchnl_static_assert_virtchnl_filter’ is not an integer constant\n VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);\n\t\t\t\t ^~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t\t\t ^\n ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t^\n ./include/linux/avf/virtchnl.h:619:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);\n ^~~~~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:619:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_pf_event’ is not an integer constant\n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);\n\t\t\t\t ^~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t\t\t ^\n ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t^\n ./include/linux/avf/virtchnl.h:640:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);\n ^~~~~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:640:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qv_info’ is not an integer constant\n VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);\n\t\t\t\t ^~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t\t\t ^\n ./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t^\n ./include/linux/avf/virtchnl.h:647:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);\n ^~~~~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:647:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qvlist_info’ is not an integer constant\n VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);\n\t\t\t\t ^~~~~~~~~~~~~~~~~~~~~~~~~~\n ./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’\n { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }\n\t\t\t\t\t\t\t ^\n\nFix this by adding explicit padding to structures with holes.\n\nReported-by: noreply@ellerman.id.au\nSigned-off-by: Geert Uytterhoeven <geert@linux-m68k.org>\n---\nExposed by the \"select PCI\" in commit 4be5e8648b0c287a (\"media: move CEC\nplatform drivers to a separate directory\").\n---\n include/linux/avf/virtchnl.h | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h\nindex ca956b672ac0f759..40bad71865ea7628 100644\n--- a/include/linux/avf/virtchnl.h\n+++ b/include/linux/avf/virtchnl.h\n@@ -476,6 +476,7 @@ struct virtchnl_rss_key {\n \tu16 vsi_id;\n \tu16 key_len;\n \tu8 key[1]; /* RSS hash key, packed bytes */\n+\tu8 pad[1];\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);\n@@ -484,6 +485,7 @@ struct virtchnl_rss_lut {\n \tu16 vsi_id;\n \tu16 lut_entries;\n \tu8 lut[1]; /* RSS lookup table */\n+\tu8 pad[1];\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);\n@@ -572,6 +574,7 @@ struct virtchnl_filter {\n \tenum\tvirtchnl_action action;\n \tu32\taction_meta;\n \tu8\tfield_flags;\n+\tu8\tpad[3];\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);\n@@ -610,6 +613,7 @@ struct virtchnl_pf_event {\n \t\t\t/* link_speed provided in Mbps */\n \t\t\tu32 link_speed;\n \t\t\tu8 link_status;\n+\t\t\tu8 pad[3];\n \t\t} link_event_adv;\n \t} event_data;\n \n@@ -635,6 +639,7 @@ struct virtchnl_iwarp_qv_info {\n \tu16 ceq_idx;\n \tu16 aeq_idx;\n \tu8 itr_idx;\n+\tu8 pad[3];\n };\n \n VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);\n", "prefixes": [] }