]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
mesa: avoid host paths poisoning
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 4 Sep 2025 14:03:39 +0000 (16:03 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Sep 2025 09:45:09 +0000 (10:45 +0100)
commit5948e618b7746ac333c1ec3ca99b66bd3faeb2ba
tree8f1020b3f289ba584c04c86a36f6dba359e300fe
parentb1fae868569cabfef6c2160c7a3cfe0c13421bbc
mesa: avoid host paths poisoning

At least panfrost and asahi drivers are prone to host paths poisoning
due to unpatched __FILE__ macro in assert() of libcl.

The compilation units for files including this file all are passed
specific arguments via the cl_args meson variable which currently only
contains one fmacro-prefix-map entry for relative paths. However, there
are also absolute build and source paths that seem to make it to the
generated files and libraries so this patches mesa to also strip those
paths.

Note that out of the four paths in the default DEBUG_PREFIX_MAP, only
the source and build directories make it to the fmacro-prefix-map and
they aren't mapped like they are when used with ffile-prefix-map in
DEBUG_PREFIX_MAP as I'm not sure if it is at all possible for meson to
fetch this Yocto-provided path we should be mapping to in the current
mesa code base. I guess this is good enough for now.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/mesa/files/0001-meson-fix-libcl-assert-reproducibility.patch [new file with mode: 0644]
meta/recipes-graphics/mesa/mesa.inc