summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/environment_variables.rst5
-rw-r--r--src/libcamera/ipa_manager.cpp8
2 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst
index d392fd26..1e85befd 100644
--- a/Documentation/environment_variables.rst
+++ b/Documentation/environment_variables.rst
@@ -24,6 +24,11 @@ LIBCAMERA_IPA_CONFIG_PATH
Example value: ``${HOME}/.libcamera/share/ipa:/opt/libcamera/vendor/share/ipa``
+LIBCAMERA_IPA_FORCE_ISOLATION
+ When set to a non-empty string, force process isolation of all IPA modules.
+
+ Example value: ``1``
+
LIBCAMERA_IPA_MODULE_PATH
Define custom search locations for IPA modules (`more <IPA module_>`__).
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 73a86886..55840896 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -276,6 +276,14 @@ IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion,
bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
{
#if HAVE_IPA_PUBKEY
+ char *force = utils::secure_getenv("LIBCAMERA_IPA_FORCE_ISOLATION");
+ if (force && force[0] != '\0') {
+ LOG(IPAManager, Debug)
+ << "Isolation of IPA module " << ipa->path()
+ << " forced through environment variable";
+ return false;
+ }
+
File file{ ipa->path() };
if (!file.open(File::ReadOnly))
return false;