Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/864496/?format=api
{ "id": 864496, "url": "http://patchwork.ozlabs.org/api/patches/864496/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180122170039.14144-1-alice.michael@intel.com/", "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": "<20180122170039.14144-1-alice.michael@intel.com>", "list_archive_url": null, "date": "2018-01-22T17:00:32", "name": "[next,S86-V2,1/8] i40e: don't leak memory addresses", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "52debd7fbae6bba753321292336e29c8ae7083ea", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@intel.com" }, "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/20180122170039.14144-1-alice.michael@intel.com/mbox/", "series": [ { "id": 24794, "url": "http://patchwork.ozlabs.org/api/series/24794/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=24794", "date": "2018-01-22T17:00:32", "name": "[next,S86-V2,1/8] i40e: don't leak memory addresses", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/24794/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/864496/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/864496/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\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zQVXr0JzSz9s72\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 23 Jan 2018 12:08:10 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0DAA0301E4;\n\tTue, 23 Jan 2018 01:08:09 +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 N1Iqj4CSp0Xd; Tue, 23 Jan 2018 01:08:08 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id F3AC530156;\n\tTue, 23 Jan 2018 01:08:07 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3CA431C006F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 01:08:07 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3922B30156\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 01:08:07 +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 M93PiQ9aOK-j for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 01:08:06 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 1E56830109\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 01:08:06 +0000 (UTC)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Jan 2018 17:08:04 -0800", "from alicemic-2.jf.intel.com ([10.166.16.121])\n\tby fmsmga007.fm.intel.com with ESMTP; 22 Jan 2018 17:08:04 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.46,398,1511856000\"; d=\"scan'208\";a=\"12244781\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Mon, 22 Jan 2018 12:00:32 -0500", "Message-Id": "<20180122170039.14144-1-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.5", "Subject": "[Intel-wired-lan] [next PATCH S86-V2 1/8] i40e: don't leak memory\n\taddresses", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Mitch Williams <mitch.a.williams@intel.com>\n\nCould a Bad Person do Bad Things to a server if they found these\naddresses printed in the log? Who knows? But let's not take that risk.\n\nRemove pointers from a bunch of printks. In some cases, I was able to\nadjust the mesasge to indicate whether or not the value was null. In\nothers, I just removed the entire message as there was really no hope of\nsaving it.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 40 ++++----------------------\n drivers/net/ethernet/intel/i40e/i40e_main.c | 13 ++++-----\n 2 files changed, 12 insertions(+), 41 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex e9fc51b..b829fd3 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -155,8 +155,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\tdev_info(&pf->pdev->dev, \" vlan_features = 0x%08lx\\n\",\n \t\t\t (unsigned long int)nd->vlan_features);\n \t}\n-\tdev_info(&pf->pdev->dev,\n-\t\t \" vlgrp: & = %p\\n\", vsi->active_vlans);\n+\tdev_info(&pf->pdev->dev, \" active_vlans is %s\\n\",\n+\t\t vsi->active_vlans ? \"<valid>\" : \"<null>\");\n \tdev_info(&pf->pdev->dev,\n \t\t \" flags = 0x%08lx, netdev_registered = %i, current_netdev_flags = 0x%04x\\n\",\n \t\t vsi->flags, vsi->netdev_registered, vsi->current_netdev_flags);\n@@ -270,14 +270,6 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t\tcontinue;\n \n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" rx_rings[%i]: desc = %p\\n\",\n-\t\t\t i, rx_ring->desc);\n-\t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" rx_rings[%i]: dev = %p, netdev = %p, rx_bi = %p\\n\",\n-\t\t\t i, rx_ring->dev,\n-\t\t\t rx_ring->netdev,\n-\t\t\t rx_ring->rx_bi);\n-\t\tdev_info(&pf->pdev->dev,\n \t\t\t \" rx_rings[%i]: state = %lu, queue_index = %d, reg_idx = %d\\n\",\n \t\t\t i, *rx_ring->state,\n \t\t\t rx_ring->queue_index,\n@@ -307,13 +299,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t\t rx_ring->rx_stats.realloc_count,\n \t\t\t rx_ring->rx_stats.page_reuse_count);\n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" rx_rings[%i]: size = %i, dma = 0x%08lx\\n\",\n-\t\t\t i, rx_ring->size,\n-\t\t\t (unsigned long int)rx_ring->dma);\n-\t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" rx_rings[%i]: vsi = %p, q_vector = %p\\n\",\n-\t\t\t i, rx_ring->vsi,\n-\t\t\t rx_ring->q_vector);\n+\t\t\t \" rx_rings[%i]: size = %i\\n\",\n+\t\t\t i, rx_ring->size);\n \t\tdev_info(&pf->pdev->dev,\n \t\t\t \" rx_rings[%i]: itr_setting = %d (%s)\\n\",\n \t\t\t i, rx_ring->itr_setting,\n@@ -326,14 +313,6 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t\tcontinue;\n \n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" tx_rings[%i]: desc = %p\\n\",\n-\t\t\t i, tx_ring->desc);\n-\t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" tx_rings[%i]: dev = %p, netdev = %p, tx_bi = %p\\n\",\n-\t\t\t i, tx_ring->dev,\n-\t\t\t tx_ring->netdev,\n-\t\t\t tx_ring->tx_bi);\n-\t\tdev_info(&pf->pdev->dev,\n \t\t\t \" tx_rings[%i]: state = %lu, queue_index = %d, reg_idx = %d\\n\",\n \t\t\t i, *tx_ring->state,\n \t\t\t tx_ring->queue_index,\n@@ -355,13 +334,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t\t tx_ring->tx_stats.tx_busy,\n \t\t\t tx_ring->tx_stats.tx_done_old);\n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" tx_rings[%i]: size = %i, dma = 0x%08lx\\n\",\n-\t\t\t i, tx_ring->size,\n-\t\t\t (unsigned long int)tx_ring->dma);\n-\t\tdev_info(&pf->pdev->dev,\n-\t\t\t \" tx_rings[%i]: vsi = %p, q_vector = %p\\n\",\n-\t\t\t i, tx_ring->vsi,\n-\t\t\t tx_ring->q_vector);\n+\t\t\t \" tx_rings[%i]: size = %i\\n\",\n+\t\t\t i, tx_ring->size);\n \t\tdev_info(&pf->pdev->dev,\n \t\t\t \" tx_rings[%i]: DCB tc = %d\\n\",\n \t\t\t i, tx_ring->dcb_tc);\n@@ -466,8 +440,6 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t vsi->info.resp_reserved[6], vsi->info.resp_reserved[7],\n \t\t vsi->info.resp_reserved[8], vsi->info.resp_reserved[9],\n \t\t vsi->info.resp_reserved[10], vsi->info.resp_reserved[11]);\n-\tif (vsi->back)\n-\t\tdev_info(&pf->pdev->dev, \" PF = %p\\n\", vsi->back);\n \tdev_info(&pf->pdev->dev, \" idx = %d\\n\", vsi->idx);\n \tdev_info(&pf->pdev->dev,\n \t\t \" tc_config: numtc = %d, enabled_tc = 0x%x\\n\",\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex fcec88d..31f1b70 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -209,8 +209,8 @@ static int i40e_get_lump(struct i40e_pf *pf, struct i40e_lump_tracking *pile,\n \n \tif (!pile || needed == 0 || id >= I40E_PILE_VALID_BIT) {\n \t\tdev_info(&pf->pdev->dev,\n-\t\t\t \"param err: pile=%p needed=%d id=0x%04x\\n\",\n-\t\t\t pile, needed, id);\n+\t\t\t \"param err: pile=%s needed=%d id=0x%04x\\n\",\n+\t\t\t pile ? \"<valid>\" : \"<null>\", needed, id);\n \t\treturn -EINVAL;\n \t}\n \n@@ -10018,18 +10018,17 @@ static int i40e_vsi_clear(struct i40e_vsi *vsi)\n \n \tmutex_lock(&pf->switch_mutex);\n \tif (!pf->vsi[vsi->idx]) {\n-\t\tdev_err(&pf->pdev->dev, \"pf->vsi[%d] is NULL, just free vsi[%d](%p,type %d)\\n\",\n-\t\t\tvsi->idx, vsi->idx, vsi, vsi->type);\n+\t\tdev_err(&pf->pdev->dev, \"pf->vsi[%d] is NULL, just free vsi[%d](type %d)\\n\",\n+\t\t\tvsi->idx, vsi->idx, vsi->type);\n \t\tgoto unlock_vsi;\n \t}\n \n \tif (pf->vsi[vsi->idx] != vsi) {\n \t\tdev_err(&pf->pdev->dev,\n-\t\t\t\"pf->vsi[%d](%p, type %d) != vsi[%d](%p,type %d): no free!\\n\",\n+\t\t\t\"pf->vsi[%d](type %d) != vsi[%d](type %d): no free!\\n\",\n \t\t\tpf->vsi[vsi->idx]->idx,\n-\t\t\tpf->vsi[vsi->idx],\n \t\t\tpf->vsi[vsi->idx]->type,\n-\t\t\tvsi->idx, vsi, vsi->type);\n+\t\t\tvsi->idx, vsi->type);\n \t\tgoto unlock_vsi;\n \t}\n \n", "prefixes": [ "next", "S86-V2", "1/8" ] }