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)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 27 Nov 2019 00:43:04 +0000 (16:43 -0800)
commit5b9decf632ff5bafd847cc074b4ef841e021f564
tree2e0f195a1ac312a244ecdba5440ccf45901279f5
parent0b0c500ad12aedf558e368d6ab3a7734821e1c3f
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")
(cherry picked from commit f54c4e85ce089964e4d2ed39157f07226a41d11f)
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c