Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1241236/?format=api
{ "id": 1241236, "url": "http://patchwork.ozlabs.org/api/patches/1241236/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200220062302.68898-1-keescook@chromium.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": "<20200220062302.68898-1-keescook@chromium.org>", "list_archive_url": null, "date": "2020-02-20T06:23:02", "name": "e1000: Distribute switch variables for initialization", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "86c67f64da52b81b26574970c2bb69a605b75d41", "submitter": { "id": 10641, "url": "http://patchwork.ozlabs.org/api/people/10641/?format=api", "name": "Kees Cook", "email": "keescook@chromium.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/20200220062302.68898-1-keescook@chromium.org/mbox/", "series": [ { "id": 159658, "url": "http://patchwork.ozlabs.org/api/series/159658/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=159658", "date": "2020-02-20T06:23:02", "name": "e1000: Distribute switch variables for initialization", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/159658/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1241236/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1241236/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; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.137;\n\thelo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dmarc=fail (p=none dis=none)\n\theader.from=chromium.org", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.a=rsa-sha256 header.s=google header.b=mqTSY/qA; \n\tdkim-atps=neutral" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 48NPfS1gh0z9sRs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Feb 2020 17:23:11 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A6D1385EB4;\n\tThu, 20 Feb 2020 06:23:08 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id nR_AHZSxOysl; Thu, 20 Feb 2020 06:23:08 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1A64E85E93;\n\tThu, 20 Feb 2020 06:23:08 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5B1391BF2FC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Feb 2020 06:23:07 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4E02485E93\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Feb 2020 06:23:07 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Eufdc6VpUk37 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Feb 2020 06:23:06 +0000 (UTC)", "from mail-pg1-f193.google.com (mail-pg1-f193.google.com\n\t[209.85.215.193])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 9AC2485E6B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 20 Feb 2020 06:23:06 +0000 (UTC)", "by mail-pg1-f193.google.com with SMTP id j15so1392792pgm.6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 19 Feb 2020 22:23:06 -0800 (PST)", "from www.outflux.net (smtp.outflux.net. [198.145.64.163])\n\tby smtp.gmail.com with ESMTPSA id\n\tu126sm1728668pfu.182.2020.02.19.22.23.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 19 Feb 2020 22:23:05 -0800 (PST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=xQ2hH1WuA3WIBV0TGGs6V9kr1LqyBnjsbugRrEFt9Ew=;\n\tb=mqTSY/qAB/RCNO8ZmyzzeSV454kKhoI4MrnzIubx8FG9Hs1YDY8qgkYCOOZ03fnOpj\n\tM9d3mq2QPbxb8DI9+NencQP10TelM1jX3r75i6nEudJJNC0pyPwTl5Zo70spE5jj6nwC\n\tRYRBy2U0gZtVNXuoqBFMSLZN6PyqSMEXMIPUo=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=xQ2hH1WuA3WIBV0TGGs6V9kr1LqyBnjsbugRrEFt9Ew=;\n\tb=ZbtpTdK7Ct70K3TARgbe3R1GIpheWedj5e4GbPex+XQR0bf3kke30g92FJxYisnlGw\n\t2E2i1itvWo1eBuVBqcvBAC4WDbU+6R5iIfsRzVAc5RwzacJw/UlTBxyBKOppCIN+TvxV\n\tlGdi8id35ZShmdd4fqn9A/KQ57VPkgZURD+0tSb4EvCow0njVuhwxvGYJVidnO+aKwyh\n\tP+FIyyfdvTP07KoZzppM6L4X0TxTlwLREIwBzRACjIOZ6gT/T8Yspb4CB3xsOvP7NCVS\n\tHLFhBaXfKxrU/Gp1EKtDFHAsDKlAskCgDwS+9anzp0va379c314USP1iYdIXUZ2hlyvi\n\tAT4Q==", "X-Gm-Message-State": "APjAAAVneayqmIT9I1C+MuPZKugUWF5pOGfG8t2Zfr+4KykBw4ciW4B7\n\tYhBw2z0zLgQ9AtQAwsDxjEbBlg==", "X-Google-Smtp-Source": "APXvYqzAN57Ts+Ho0KQDmWMLWunp5OP1KQlTHt9upDJZGi6oUtxg6xEDyffRcacLKD/SVypLHcvH+Q==", "X-Received": "by 2002:a63:9251:: with SMTP id\n\ts17mr31193888pgn.127.1582179786195; \n\tWed, 19 Feb 2020 22:23:06 -0800 (PST)", "From": "Kees Cook <keescook@chromium.org>", "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "Date": "Wed, 19 Feb 2020 22:23:02 -0800", "Message-Id": "<20200220062302.68898-1-keescook@chromium.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH] e1000: Distribute switch variables for\n\tinitialization", "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\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<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\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "intel-wired-lan@lists.osuosl.org, Alexander Potapenko <glider@google.com>,\n\tKees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.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": "Variables declared in a switch statement before any case statements\ncannot be automatically initialized with compiler instrumentation (as\nthey are not part of any execution flow). With GCC's proposed automatic\nstack variable initialization feature, this triggers a warning (and they\ndon't get initialized). Clang's automatic stack variable initialization\n(via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also\ndoesn't initialize such variables[1]. Note that these warnings (or silent\nskipping) happen before the dead-store elimination optimization phase,\nso even when the automatic initializations are later elided in favor of\ndirect initializations, the warnings remain.\n\nTo avoid these problems, move such variables into the \"case\" where\nthey're used or lift them up into the main function body.\n\ndrivers/net/ethernet/intel/e1000/e1000_main.c: In function ‘e1000_xmit_frame’:\ndrivers/net/ethernet/intel/e1000/e1000_main.c:3143:18: warning: statement will never be executed [-Wswitch-unreachable]\n 3143 | unsigned int pull_size;\n | ^~~~~~~~~\n\n[1] https://bugs.llvm.org/show_bug.cgi?id=44916\n\nSigned-off-by: Kees Cook <keescook@chromium.org>\n---\n drivers/net/ethernet/intel/e1000/e1000_main.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c\nindex 2bced34c19ba..a540d0206129 100644\n--- a/drivers/net/ethernet/intel/e1000/e1000_main.c\n+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c\n@@ -3140,8 +3140,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,\n \t\thdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);\n \t\tif (skb->data_len && hdr_len == len) {\n \t\t\tswitch (hw->mac_type) {\n+\t\t\tcase e1000_82544: {\n \t\t\t\tunsigned int pull_size;\n-\t\t\tcase e1000_82544:\n+\n \t\t\t\t/* Make sure we have room to chop off 4 bytes,\n \t\t\t\t * and that the end alignment will work out to\n \t\t\t\t * this hardware's requirements\n@@ -3162,6 +3163,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,\n \t\t\t\t}\n \t\t\t\tlen = skb_headlen(skb);\n \t\t\t\tbreak;\n+\t\t\t}\n \t\t\tdefault:\n \t\t\t\t/* do nothing */\n \t\t\t\tbreak;\n", "prefixes": [] }