get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 102924,
    "url": "http://patchwork.dpdk.org/api/patches/102924/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/8079312ba39435a0ac92e084cc1a3fe291008a47.1635254797.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<8079312ba39435a0ac92e084cc1a3fe291008a47.1635254797.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/8079312ba39435a0ac92e084cc1a3fe291008a47.1635254797.git.anatoly.burakov@intel.com",
    "date": "2021-10-26T13:26:44",
    "name": "[v1,1/1] vfio: fix partial unmap check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ac262ef40b284ef93a431f7faf9bd5258c3699bb",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/8079312ba39435a0ac92e084cc1a3fe291008a47.1635254797.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 20008,
            "url": "http://patchwork.dpdk.org/api/series/20008/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20008",
            "date": "2021-10-26T13:26:44",
            "name": "[v1,1/1] vfio: fix partial unmap check",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/20008/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/102924/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/102924/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 06E35A0547;\n\tTue, 26 Oct 2021 15:30:07 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9C7D140E0F;\n\tTue, 26 Oct 2021 15:30:06 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 91385407FF\n for <dev@dpdk.org>; Tue, 26 Oct 2021 15:30:04 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Oct 2021 06:26:48 -0700",
            "from silpixa00401191.ir.intel.com ([10.55.128.95])\n by fmsmga006.fm.intel.com with ESMTP; 26 Oct 2021 06:26:46 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10148\"; a=\"216812184\"",
            "E=Sophos;i=\"5.87,184,1631602800\"; d=\"scan'208\";a=\"216812184\"",
            "E=Sophos;i=\"5.87,184,1631602800\"; d=\"scan'208\";a=\"722366356\""
        ],
        "X-ExtLoop1": "1",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,\n Xuan Ding <xuan.ding@intel.com>",
        "Date": "Tue, 26 Oct 2021 13:26:44 +0000",
        "Message-Id": "\n <8079312ba39435a0ac92e084cc1a3fe291008a47.1635254797.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v1 1/1] vfio: fix partial unmap check",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Partial unmap support was introduced in commit c13ca4e81cac, and with it\nwas added a check that dereferenced the IOMMU type to determine whether\npartial ummapping is supported for currently configured IOMMU type. In\ncertain circumstances (such as when VFIO is supported, but no devices\nwere bound to the VFIO driver), the IOMMU type pointer can be NULL.\n\nHowever, dereferencing of IOMMU type was guarded by access to the user\nmaps list - that is, we were always checking the user map list first,\nand then, if we found a memory region that encloses the one we're trying\nto unmap, we would have performed the IOMMU type check.\n\nThis ensured that the IOMMU type check will not cause any NULL pointer\ndereferences, because in order for an IOMMU type check to have been\nperformed, there necessarily must have been at least one memory region\nthat was previously mapped successfully, and that implies having a\ndefined IOMMU type.\n\nWhen 56259f7fc010 was introduced, the IOMMU type check was moved to\nbefore we were traversing the user mem maps list, thereby introducing a\npotential NULL dereference, because the IOMMU type access was no longer\nguarded by the user mem maps list traversal.\n\nFix the issue by moving the IOMMU type check to after the user mem maps\ntraversal, thereby ensuring that by the time the check happens, the\nIOMMU type is always valid.\n\nFixes: 56259f7fc010 (\"vfio: allow partially unmapping adjacent memory\")\nCc: xuan.ding@intel.com\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/eal/linux/eal_vfio.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c\nindex 657c89ca58..aa2087a2da 100644\n--- a/lib/eal/linux/eal_vfio.c\n+++ b/lib/eal/linux/eal_vfio.c\n@@ -1943,9 +1943,6 @@ container_dma_unmap(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,\n \t * mappings, let's just rebuild them using information we have.\n \t */\n \n-\t/* do we have partial unmap capability? */\n-\thas_partial_unmap = vfio_cfg->vfio_iommu_type->partial_unmap;\n-\n \t/*\n \t * first thing to do is check if there exists a mapping that includes\n \t * the start and the end of our requested unmap. We need to collect all\n@@ -1961,6 +1958,9 @@ container_dma_unmap(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,\n \t\tgoto out;\n \t}\n \n+\t/* do we have partial unmap capability? */\n+\thas_partial_unmap = vfio_cfg->vfio_iommu_type->partial_unmap;\n+\n \t/*\n \t * if we don't support partial unmap, we must check if start and end of\n \t * current unmap region are chunk-aligned.\n",
    "prefixes": [
        "v1",
        "1/1"
    ]
}