get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1305425/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1305425,
    "url": "http://patchwork.ozlabs.org/api/patches/1305425/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200606200116.1398-1-cai@lca.pw/",
    "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": "<20200606200116.1398-1-cai@lca.pw>",
    "list_archive_url": null,
    "date": "2020-06-06T20:01:16",
    "name": "i40e: silence an UBSAN false positive",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "16ba176e362dcfde030b4dc39591fd5aa27b311c",
    "submitter": {
        "id": 76055,
        "url": "http://patchwork.ozlabs.org/api/people/76055/?format=api",
        "name": "Qian Cai",
        "email": "cai@lca.pw"
    },
    "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/20200606200116.1398-1-cai@lca.pw/mbox/",
    "series": [
        {
            "id": 182064,
            "url": "http://patchwork.ozlabs.org/api/series/182064/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=182064",
            "date": "2020-06-06T20:01:16",
            "name": "i40e: silence an UBSAN false positive",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/182064/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1305425/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1305425/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.138; helo=whitealder.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=none (p=none dis=none) header.from=lca.pw",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=lca.pw header.i=@lca.pw header.a=rsa-sha256\n header.s=google header.b=snyxI1RF;\n\tdkim-atps=neutral"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 49gmVw6233z9sRN\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  9 Jun 2020 07:25:12 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1E94E86E69;\n\tMon,  8 Jun 2020 21:25:11 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 63vi-IgOP+Nt; Mon,  8 Jun 2020 21:25:10 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 093E986E33;\n\tMon,  8 Jun 2020 21:25:10 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by ash.osuosl.org (Postfix) with ESMTP id 3D95E1BF477\n for <intel-wired-lan@lists.osuosl.org>; Sat,  6 Jun 2020 20:01:30 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by fraxinus.osuosl.org (Postfix) with ESMTP id 38E788618D\n for <intel-wired-lan@lists.osuosl.org>; Sat,  6 Jun 2020 20:01:30 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id OYnlKI-Q2LtA for <intel-wired-lan@lists.osuosl.org>;\n Sat,  6 Jun 2020 20:01:29 +0000 (UTC)",
            "from mail-qk1-f194.google.com (mail-qk1-f194.google.com\n [209.85.222.194])\n by fraxinus.osuosl.org (Postfix) with ESMTPS id 7C37B86153\n for <intel-wired-lan@lists.osuosl.org>; Sat,  6 Jun 2020 20:01:29 +0000 (UTC)",
            "by mail-qk1-f194.google.com with SMTP id c14so13391974qka.11\n for <intel-wired-lan@lists.osuosl.org>; Sat, 06 Jun 2020 13:01:29 -0700 (PDT)",
            "from ovpn-112-93.phx2.redhat.com\n (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43])\n by smtp.gmail.com with ESMTPSA id e1sm3170960qto.51.2020.06.06.13.01.26\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Sat, 06 Jun 2020 13:01:27 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=+Pq6RzQqJCNvdcxNmu8B5Dj+UAbb2+P92x9klLCwkTg=;\n b=snyxI1RFz4ks9PuyfJj3AxurO0chMruanXZ4FnuGVI+PtJ8+px+72zjIAOr27ekn0D\n XraBfMx3R5YFIXc+cr9zw/rejrQL8CWlZ0zjvmMv4l4UWQay4UWiUC0IlVINrxGJKUDE\n VFuKWUUtwEetvUMSTSW6J/SBJGIgCMxpuZ6vMAETDsC2fT9gY+G0B2gwP76MwCRxhRvh\n /8XNqPoimET0t01e5gPHwEi95jaPxlulGpbcGkM/IK0mG/CGlfX7o+uaapqaUCoEvchF\n 4no8e2CQFkig7qtwEXrh0zgYaVsVXM1Ahiu7llTifsB69tg6rTxIcI5y0N6FZOBfXnKE\n pLyw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=+Pq6RzQqJCNvdcxNmu8B5Dj+UAbb2+P92x9klLCwkTg=;\n b=gNz2cdccv9Bb2d2PgdBxD2bB1tLR7Z6TrK5cVGCwmlz3PM2jwepArtwKanTXQ8l9oF\n Ya7qRecH31z5RmhGoz6J/CowgknPQFJ3SRI86rDZVVI5Bs82LGFFKIZ5EvZW0LWl+gJm\n /2CmB5dZBXPBz8nZ/+nbZf+qA9x9z+iPqQzxqYwSaUgYS7L5LIRH56zRlhkZWUYqEn9O\n st4wKKvtWEjOH4lAXpOS0sCEXjOS5ru789c0XJ36aYCvafTpxyTGSdTmAwnoSLj+mATg\n LCDTfTdx93YqEnLd6q2VAyOkfa4GEv3rVPS9sdVO6pW92qQdQ5G9YWx6TppsWug9PXpL\n Fh0Q==",
        "X-Gm-Message-State": "AOAM531wvQlJNeOHI5u7Jzasdddfbt4W7l7I8Z+7Urbxfg1PxgJGgkqt\n k1KwfJtBTGvwXBMdQxUd+JlDZg==",
        "X-Google-Smtp-Source": "\n ABdhPJxaj9ZWumNwHhmlL7/HI4iCEPKtVDD/DQlVN8Qr2cveSXoE+w30VfvYEcyRHG62uRqGgA9R8Q==",
        "X-Received": "by 2002:a37:4595:: with SMTP id\n s143mr16482248qka.449.1591473688461;\n Sat, 06 Jun 2020 13:01:28 -0700 (PDT)",
        "From": "Qian Cai <cai@lca.pw>",
        "To": "jeffrey.t.kirsher@intel.com",
        "Date": "Sat,  6 Jun 2020 16:01:16 -0400",
        "Message-Id": "<20200606200116.1398-1-cai@lca.pw>",
        "X-Mailer": "git-send-email 2.21.0 (Apple Git-122.2)",
        "MIME-Version": "1.0",
        "X-Mailman-Approved-At": "Mon, 08 Jun 2020 21:25:08 +0000",
        "Subject": "[Intel-wired-lan] [PATCH] i40e: silence an UBSAN false positive",
        "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, linux-kernel@vger.kernel.org,\n Qian Cai <cai@lca.pw>,\n intel-wired-lan@lists.osuosl.org, davem@davemloft.net",
        "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": "virtchnl_rss_lut.lut is used for the RSS lookup table, but in\ni40e_vc_config_rss_lut(), it is indexed by subscript results in a false\npositive.\n\n UBSAN: array-index-out-of-bounds in drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:2983:15\n index 1 is out of range for type 'u8 [1]'\n CPU: 34 PID: 871 Comm: kworker/34:2 Not tainted 5.7.0-next-20200605+ #5\n Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 03/09/2018\n Workqueue: i40e i40e_service_task [i40e]\n Call Trace:\n  dump_stack+0xa7/0xea\n  ubsan_epilogue+0x9/0x45\n  __ubsan_handle_out_of_bounds+0x6f/0x80\n  i40e_vc_process_vf_msg+0x457c/0x4660 [i40e]\n  i40e_service_task+0x96c/0x1ab0 [i40e]\n  process_one_work+0x57d/0xbd0\n  worker_thread+0x63/0x5b0\n  kthread+0x20c/0x230\n  ret_from_fork+0x22/0x30\n\nFixes: d510497b8397 (\"i40e: add input validation for virtchnl handlers\")\nSigned-off-by: Qian Cai <cai@lca.pw>\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex 56b9e445732b..d5a959d91ba9 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2971,6 +2971,7 @@ static int i40e_vc_config_rss_lut(struct i40e_vf *vf, u8 *msg)\n \tstruct i40e_vsi *vsi = NULL;\n \ti40e_status aq_ret = 0;\n \tu16 i;\n+\tu8 *lut = vrl->lut;\n \n \tif (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states) ||\n \t    !i40e_vc_isvalid_vsi_id(vf, vrl->vsi_id) ||\n@@ -2980,13 +2981,13 @@ static int i40e_vc_config_rss_lut(struct i40e_vf *vf, u8 *msg)\n \t}\n \n \tfor (i = 0; i < vrl->lut_entries; i++)\n-\t\tif (vrl->lut[i] >= vf->num_queue_pairs) {\n+\t\tif (lut[i] >= vf->num_queue_pairs) {\n \t\t\taq_ret = I40E_ERR_PARAM;\n \t\t\tgoto err;\n \t\t}\n \n \tvsi = pf->vsi[vf->lan_vsi_idx];\n-\taq_ret = i40e_config_rss(vsi, NULL, vrl->lut, I40E_VF_HLUT_ARRAY_SIZE);\n+\taq_ret = i40e_config_rss(vsi, NULL, lut, I40E_VF_HLUT_ARRAY_SIZE);\n \t/* send the response to the VF */\n err:\n \treturn i40e_vc_send_resp_to_vf(vf, VIRTCHNL_OP_CONFIG_RSS_LUT,\n",
    "prefixes": []
}