Show a patch.

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

{
    "id": 1352,
    "url": "https://patchwork.libcamera.org/api/patches/1352/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1352/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190605005316.4835-5-paul.elder@ideasonboard.com>",
    "date": "2019-06-05T00:53:10",
    "name": "[libcamera-devel,v3,04/10] libcamera: ipa_module: verify IPA module API version upon loading",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "92713221430a5c055d6c1e6918ae449d1050c6ff",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1352/mbox/",
    "series": [
        {
            "id": 336,
            "url": "https://patchwork.libcamera.org/api/series/336/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=336",
            "date": "2019-06-05T00:53:06",
            "name": "Add IPAManager and IPAInterface",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/336/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1352/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1352/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<paul.elder@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92A626471C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Jun 2019 02:53:30 +0200 (CEST)",
            "from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C478F2D1;\n\tWed,  5 Jun 2019 02:53:29 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1559696010;\n\tbh=YJ3Ev46ZbfSbeeW3ZSix5DgsNlsTwaQV4Z8rW5yyrB8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=LqEqTmSN0LWiWDIEQW5B/UEzj/rl3/BUPd/q8rS1r6s0R/VOmbnTyw1v8Ku9xfqry\n\tJ4SjGGtPEcfcl18/RkCW6KcBdlFXPWSSHZfmy8lH0T9MswY4YjraXp3BuG7xVfPpOx\n\tKDNnMtHuL6ZnOuB72UMj4fSTYrLse8Z8U91GH2OM=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  4 Jun 2019 20:53:10 -0400",
        "Message-Id": "<20190605005316.4835-5-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190605005316.4835-1-paul.elder@ideasonboard.com>",
        "References": "<20190605005316.4835-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 04/10] libcamera: ipa_module: verify\n\tIPA module API version upon loading",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Wed, 05 Jun 2019 00:53:30 -0000"
    },
    "content": "The IPA module API version determines the layout of struct\nIPAModuleInfo. If this version number does not match, then it means that\nthe IPA module cannot be loaded at all. Validate this version number\nupon loading the IPA module info from the IPA shared object.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nNew patch\n\n src/libcamera/ipa_module.cpp | 3 +++\n 1 file changed, 3 insertions(+)",
    "diff": "diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex f79a44e..2aa508c 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -274,6 +274,9 @@ int IPAModule::loadIPAModuleInfo()\n \t\tret = elfLoadSymbol<Elf64_Ehdr, Elf64_Shdr, Elf64_Sym>\n \t\t\t\t   (&info_, sizeof(info_), map, soSize, \"ipaModuleInfo\");\n \n+\tif (info_.moduleAPIVersion != IPA_MODULE_API_VERSION)\n+\t\tret = -EINVAL;\n+\n unmap:\n \tmunmap(map, soSize);\n close:\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "04/10"
    ]
}