{"id":1634,"url":"https://patchwork.libcamera.org/api/1.1/patches/1634/?format=json","web_url":"https://patchwork.libcamera.org/patch/1634/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190709184450.32023-2-paul.elder@ideasonboard.com>","date":"2019-07-09T18:44:44","name":"[libcamera-devel,v3,1/7] libcamera: ipa_module_info: add license field","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"fbd2ff8e53b00da0044f0d56f2a7aa4a54b28875","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1634/mbox/","series":[{"id":410,"url":"https://patchwork.libcamera.org/api/1.1/series/410/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=410","date":"2019-07-09T18:44:43","name":"Add IPA process isolation","version":3,"mbox":"https://patchwork.libcamera.org/series/410/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1634/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1634/checks/","tags":{},"headers":{"Return-Path":"<paul.elder@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 52AC061570\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jul 2019 20:45:01 +0200 (CEST)","from neptunite.amanokami.net (softbank126163157105.bbtec.net\n\t[126.163.157.105])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EB748596;\n\tTue,  9 Jul 2019 20:44:59 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562697901;\n\tbh=iHO6yueEo51THISUS4htP8k32lxYxqjE7WqxHJ3r2MA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=GCPumx3IWJA6+PlcRdGcem+0SiqqSVx3tbfyYYornwlf6Tk3I5dX0wX/zrMUb1lc7\n\tpwfFRN9emOvHdf3mGLo03BbjrogfiSDE4CMOhXjuH3Py1KOqh9weEFfaVa8TNgt3Dz\n\tL7gytPvjF8ScSr7LSU6M0NiDLngPfYAsw6rLUVwg=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 10 Jul 2019 03:44:44 +0900","Message-Id":"<20190709184450.32023-2-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.20.1","In-Reply-To":"<20190709184450.32023-1-paul.elder@ideasonboard.com>","References":"<20190709184450.32023-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 1/7] libcamera: ipa_module_info: add\n\tlicense field","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":"Tue, 09 Jul 2019 18:45:01 -0000"},"content":"Add a field to IPAModuleInfo to contain the license of the module.\n\nThis license field will be used to determine whether the IPA module\nshould be run in an isolated process or not. If the license is open\nsource, then the IPA module will be allowed to run without process\nisolation, if the user enables it. If the license is not open source,\nthen the IPA module will be run with process isolation.\n\nUpdate the dummy IPA and IPA test to conform to the new struct layout.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nChanges in v3:\n- make license field SPDX\n\nNew patch in v2\n- this replaces the isolate flag that was used in v1\n\n include/libcamera/ipa/ipa_module_info.h |  1 +\n src/ipa/ipa_dummy.cpp                   |  1 +\n src/libcamera/ipa_module.cpp            | 21 +++++++++++++++++++++\n test/ipa/ipa_test.cpp                   |  1 +\n 4 files changed, 24 insertions(+)","diff":"diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h\nindex 585f753..d9e33c1 100644\n--- a/include/libcamera/ipa/ipa_module_info.h\n+++ b/include/libcamera/ipa/ipa_module_info.h\n@@ -18,6 +18,7 @@ struct IPAModuleInfo {\n \tuint32_t pipelineVersion;\n \tchar pipelineName[256];\n \tchar name[256];\n+\tchar license[64];\n } __attribute__((packed));\n \n extern \"C\" {\ndiff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp\nindex ee7a3a8..4c8b665 100644\n--- a/src/ipa/ipa_dummy.cpp\n+++ b/src/ipa/ipa_dummy.cpp\n@@ -34,6 +34,7 @@ const struct IPAModuleInfo ipaModuleInfo = {\n \t0,\n \t\"PipelineHandlerVimc\",\n \t\"Dummy IPA for Vimc\",\n+\t\"LGPL-2.1-or-later\",\n };\n \n IPAInterface *ipaCreate()\ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex d2e3c36..06111c0 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -214,6 +214,27 @@ elfLoadSymbol(void *map, size_t soSize, const char *symbol)\n  *\n  * \\var IPAModuleInfo::name\n  * \\brief The name of the IPA module\n+ *\n+ * \\var IPAModuleInfo::license\n+ * \\brief License of the IPA module\n+ *\n+ * This license is used to determine whether to isolate the IPA in a\n+ * separate process. If the license is \"Proprietary\", then the IPA will\n+ * be isolated. The license should be an SPDX license string. The following\n+ * licenses are currently available to allow the IPA to run unisolated:\n+ *\n+ * - GPL-2.0-only\n+ * - GPL-2.0-or-later\n+ * - GPL-3.0-only\n+ * - GPL-3.0-or-later\n+ * - LGPL-2.1-only\n+ * - LGPL-2.1-or-later\n+ * - LGPL-3.0-only\n+ * - LGPL-3.0-or-later\n+ *\n+ * Any other license will cause the IPA to be run isolated.\n+ *\n+ * \\todo Allow user to choose to isolated open source IPAs\n  */\n \n /**\ndiff --git a/test/ipa/ipa_test.cpp b/test/ipa/ipa_test.cpp\nindex bbef069..b9e1bd6 100644\n--- a/test/ipa/ipa_test.cpp\n+++ b/test/ipa/ipa_test.cpp\n@@ -59,6 +59,7 @@ protected:\n \t\t\t0,\n \t\t\t\"PipelineHandlerVimc\",\n \t\t\t\"Dummy IPA for Vimc\",\n+\t\t\t\"GPL-2.0-or-later\",\n \t\t};\n \n \t\tcount += runTest(\"src/ipa/ipa_dummy.so\", testInfo);\n","prefixes":["libcamera-devel","v3","1/7"]}