Show a patch.

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

{
    "id": 12900,
    "url": "https://patchwork.libcamera.org/api/patches/12900/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12900/",
    "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": "<20210711231547.19664-4-laurent.pinchart@ideasonboard.com>",
    "date": "2021-07-11T23:15:47",
    "name": "[libcamera-devel,3/3] libcamera: ipa_manager: Allow forcing IPA module isolation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b687ec3bb600b6ba513714bb51eee07fb24d4aaf",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12900/mbox/",
    "series": [
        {
            "id": 2226,
            "url": "https://patchwork.libcamera.org/api/series/2226/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2226",
            "date": "2021-07-11T23:15:44",
            "name": "libcamera: ipa_manager: Fix, cleanup, and allow forcing isolation",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2226/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12900/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12900/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C35E7C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Jul 2021 23:16:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0CA468528;\n\tMon, 12 Jul 2021 01:16:39 +0200 (CEST)",
            "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 50E6268521\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 01:16:38 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E649A255\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 01:16:37 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Slw09HFW\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1626045398;\n\tbh=LztnX5GgerYCOmJNK7HP5SePQGeH+AQAyyjA8SX5j8U=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Slw09HFWnB2zu83u+fPB6feiuRmXtJ778Q2PrvEPYGqoDGhBKfRmuEVup6UPnjBJ8\n\tf4tIIhpZ6kKQ0UNhU+KbgdxxKxMs95AY69OTbxnual0h5cnSRymKzL26VeM6EY1AWP\n\tMPor1jzyJnLa2g80GC02EFIfJyt5qoecO/Sd175M=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 12 Jul 2021 02:15:47 +0300",
        "Message-Id": "<20210711231547.19664-4-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210711231547.19664-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20210711231547.19664-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/3] libcamera: ipa_manager: Allow forcing\n\tIPA module isolation",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "For test purpose it's useful to run open-source IPA modules in\nisolation. This can already be done by deleting the corresponding\nsignature file, but that method can be inconvenient. Add a way to force\nIPA module isolation through a new LIBCAMERA_IPA_FORCE_ISOLATION\nenvironment variable.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n Documentation/environment_variables.rst | 5 +++++\n src/libcamera/ipa_manager.cpp           | 8 ++++++++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst\nindex d392fd26b87a..1e85befd538a 100644\n--- a/Documentation/environment_variables.rst\n+++ b/Documentation/environment_variables.rst\n@@ -24,6 +24,11 @@ LIBCAMERA_IPA_CONFIG_PATH\n \n    Example value: ``${HOME}/.libcamera/share/ipa:/opt/libcamera/vendor/share/ipa``\n \n+LIBCAMERA_IPA_FORCE_ISOLATION\n+   When set to a non-empty string, force process isolation of all IPA modules.\n+\n+   Example value: ``1``\n+\n LIBCAMERA_IPA_MODULE_PATH\n    Define custom search locations for IPA modules (`more <IPA module_>`__).\n \ndiff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 9533c8fadea6..028b2ce21779 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -276,6 +276,14 @@ IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion,\n bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const\n {\n #if HAVE_IPA_PUBKEY\n+\tchar *force = utils::secure_getenv(\"LIBCAMERA_IPA_FORCE_ISOLATION\");\n+\tif (force && force[0] != '\\0') {\n+\t\tLOG(IPAManager, Debug)\n+\t\t\t<< \"Isolation of IPA module \" << ipa->path()\n+\t\t\t<< \" forced through environment variable\";\n+\t\treturn false;\n+\t}\n+\n \tFile file{ ipa->path() };\n \tif (!file.open(File::ReadOnly))\n \t\treturn false;\n",
    "prefixes": [
        "libcamera-devel",
        "3/3"
    ]
}