Show a patch.

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

{
    "id": 20732,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20732/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20732/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240731135936.2105-4-laurent.pinchart@ideasonboard.com>",
    "date": "2024-07-31T13:59:35",
    "name": "[v2,3/4] libcamera: shared_mem_object: Prevent memfd from shrinking or growing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b33b9d9f80a9b92aa256e6eff7e5239cdf216ffa",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20732/mbox/",
    "series": [
        {
            "id": 4470,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4470/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4470",
            "date": "2024-07-31T13:59:32",
            "name": "libcamera: Address soft ISP file seal TODO item",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4470/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20732/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20732/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 47A21C32BB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 31 Jul 2024 14:00:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02E6763379;\n\tWed, 31 Jul 2024 16:00:07 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 366226337A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 31 Jul 2024 16:00:02 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 337C9F85\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 31 Jul 2024 15:59:14 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MQ30k1aO\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722434354;\n\tbh=skpyVrxR5RbAG5xfRsqnolQwCUyVpjAZQxTdOw9ogsY=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=MQ30k1aO5qEGGiPuw6TsLsCnneHvRQNNCjGTfdLjX7OmEERnpJL4W6YkgajXf/cI2\n\t6P472VjRd+QVL/Ca1A7w4SWfiI3wiFZh46+UE2aLPMNV3gLEsAwXgd48gSNYW16w7t\n\tZQeRu61RHHU0xlIGIAgCTs8rqixl+L5NwvYmPT8Y=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v2 3/4] libcamera: shared_mem_object: Prevent memfd from\n\tshrinking or growing",
        "Date": "Wed, 31 Jul 2024 16:59:35 +0300",
        "Message-ID": "<20240731135936.2105-4-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.2",
        "In-Reply-To": "<20240731135936.2105-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20240731135936.2105-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "The memfd underlying the SharedMem object must not shrink, or memory\ncorruption will happen. Prevent this by setting the shrink seal on the\nfile. As there's no valid use case for growing the memory either, set\nthe grow seal as well.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/shared_mem_object.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/shared_mem_object.cpp b/src/libcamera/shared_mem_object.cpp\nindex 022645e71a35..d4c7991ad16a 100644\n--- a/src/libcamera/shared_mem_object.cpp\n+++ b/src/libcamera/shared_mem_object.cpp\n@@ -58,7 +58,8 @@ SharedMem::SharedMem() = default;\n  */\n SharedMem::SharedMem(const std::string &name, std::size_t size)\n {\n-\tUniqueFD memfd = MemFd::create(name.c_str(), size);\n+\tUniqueFD memfd = MemFd::create(name.c_str(), size, MemFd::Seal::Shrink |\n+\t\t\t\t       MemFd::Seal::Grow);\n \tif (!memfd.isValid())\n \t\treturn;\n \n",
    "prefixes": [
        "v2",
        "3/4"
    ]
}