OSDN Git Service

radv: create a fresh fork for each pipeline compile
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 24 Nov 2019 23:08:26 +0000 (10:08 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 24 Nov 2019 23:10:14 +0000 (10:10 +1100)
commitf54c4e85ce089964e4d2ed39157f07226a41d11f
treed74ce17a15617dc4f39ed509c0a31043c9ac0472
parent1663bb1f772dacadaec2d80f8286cfb76c4bb200
radv: create a fresh fork for each pipeline compile

In order to prevent a potential malicious pipeline tainting our
secure compile process and interfering with successive pipelines
we want to create a fresh fork for each pipeline compile.

Benchmarking has shown that simply forking on each pipeline
creation doubles the total time it takes to compile a fossilize db
collection. So instead here we fork the process at device creation
so that we have a slim copy of the device and then fork this
otherwise idle and untainted process each time we compile a
pipeline. Forking this slim copy of the device results in only a
20% increase in compile time vs a 100% increase.

Fixes: cff53da3 ("radv: enable secure compile support")
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c