[{"id":2209,"web_url":"https://patchwork.libcamera.org/comment/2209/","msgid":"<20190711035425.GC5247@pendragon.ideasonboard.com>","date":"2019-07-11T03:54:25","subject":"Re: [libcamera-devel] [PATCH v3 1/7] libcamera: ipa_module_info:\n\tadd license field","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Wed, Jul 10, 2019 at 03:44:44AM +0900, Paul Elder wrote:\n> Add a field to IPAModuleInfo to contain the license of the module.\n> \n> This license field will be used to determine whether the IPA module\n> should be run in an isolated process or not. If the license is open\n> source, then the IPA module will be allowed to run without process\n> isolation, if the user enables it. If the license is not open source,\n> then the IPA module will be run with process isolation.\n> \n> Update the dummy IPA and IPA test to conform to the new struct layout.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n> Changes in v3:\n> - make license field SPDX\n> \n> New 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(+)\n> \n> diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h\n> index 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\" {\n> diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp\n> index 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()\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index 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\nI would say \"whether to force isolation of the IPA in a separate\nprocess\", otherwise it could imply that the license is the only decisive\nfactor.\n\n> + * separate process. If the license is \"Proprietary\", then the IPA will\n> + * be isolated.\n\nAnd add here \"If the license is open-source, then the IPA will be\nallowed to run without isolation if the user enables it.\"\n\nWith those issues addressed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> 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>  /**\n> diff --git a/test/ipa/ipa_test.cpp b/test/ipa/ipa_test.cpp\n> index 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);","headers":{"Return-Path":"<laurent.pinchart@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 DA68A60C23\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jul 2019 05:54:54 +0200 (CEST)","from pendragon.ideasonboard.com (softbank126163157105.bbtec.net\n\t[126.163.157.105])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6A55231C;\n\tThu, 11 Jul 2019 05:54:53 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1562817294;\n\tbh=+aAxwP6PWT9w8QQ60Kn1dkeI7Rnslq/6J2ukcLWAGbI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SsiaPaaEvR7lvyRFAquM6X8fiLKj0sedRm4tjGCUXhKaZeleDLbHrc6N3qSiOm22x\n\twHpqNEE290vulYtKoJ6+Y1kK+sACGoyUEM6N/eTUFFMpELTcaU1WP27pdc/Q/GFqKI\n\teXOVZIvT6v5vVo+iMtrKGjWXhPm+ggwGqlXyqPls=","Date":"Thu, 11 Jul 2019 06:54:25 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190711035425.GC5247@pendragon.ideasonboard.com>","References":"<20190709184450.32023-1-paul.elder@ideasonboard.com>\n\t<20190709184450.32023-2-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190709184450.32023-2-paul.elder@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 1/7] libcamera: ipa_module_info:\n\tadd license 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":"Thu, 11 Jul 2019 03:54:55 -0000"}}]