From bdebda2bbaeeb4534650ae1dba5b3daee2412164 Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Thu, 31 Jan 2019 17:50:17 -0800 Subject: [PATCH] Search/permit /vendor/${LIB}/hw in sphal namespace The vulkan runtime loads drivers into the sphal namespace and relies on them being in the sphal search path so that it doesn't have to hardcode /vendor/${LIB}/hw. These paths used to be allowed, but were removed by commit 2498e1b because they were believed not to be required. Things didn't break immediately because the vulkan runtime has a (supposed to be temporary) fallback to hw_get_module, which loads from /vendor/${LIB}/hw using absolute paths. Bug: 123600276 Test: Launch Vulkan app on device with hw_get_module disabled Change-Id: I07ac43bc9d2d877d8f427058b2d62c62d065c558 --- rootdir/etc/ld.config.txt | 1 + rootdir/etc/ld.config.vndk_lite.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt index 582ce277d..9bf90580b 100644 --- a/rootdir/etc/ld.config.txt +++ b/rootdir/etc/ld.config.txt @@ -216,6 +216,7 @@ namespace.sphal.visible = true namespace.sphal.search.paths = /odm/${LIB} namespace.sphal.search.paths += /vendor/${LIB} +namespace.sphal.search.paths += /vendor/${LIB}/hw namespace.sphal.permitted.paths = /odm/${LIB} namespace.sphal.permitted.paths += /vendor/${LIB} diff --git a/rootdir/etc/ld.config.vndk_lite.txt b/rootdir/etc/ld.config.vndk_lite.txt index d0bdf3a29..ca180c065 100644 --- a/rootdir/etc/ld.config.vndk_lite.txt +++ b/rootdir/etc/ld.config.vndk_lite.txt @@ -164,6 +164,7 @@ namespace.sphal.visible = true namespace.sphal.search.paths = /odm/${LIB} namespace.sphal.search.paths += /vendor/${LIB} +namespace.sphal.search.paths += /vendor/${LIB}/hw namespace.sphal.permitted.paths = /odm/${LIB} namespace.sphal.permitted.paths += /vendor/${LIB}