Turn on/off DAC capabilities as needed

Write access is required for some RSMI services. This change
temporarily permits write access so configuration can be done,
and then turns it off.

To help with this, the ScopedCapability struct is introduced to
provide scope limited access, helping to ensure a process is not
left with extra capability, should an exception occur.

Change-Id: I4978a1a688db935b8bfc27b3b537a0dd07959d3f


[ROCm/rdc commit: 6b5aeaaa23]
This commit is contained in:
Chris Freehill
2021-02-04 08:17:48 -06:00
parent 7cf47fb5c9
commit 8b1c887834
8 changed files with 89 additions and 12 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ THE SOFTWARE.
#include "rdc/rdc_server_main.h"
#include "rdc/rdc_rsmi_service.h"
#include "rdc/rdc_api_service.h"
#include "rdc/rdc_server_utils.h"
#include "common/rdc_capabilities.h"
#include "common/rdc_utils.h"
// TODO(cfreehil):