libhsakmt: Support device controller cgroup
Device whiltelist controller cgroup allows to track and enforce open and
mknod restrictions on device files. Tasks should works with
/dev/dri/renderN devices that are whitelisted for its cgroup. If a
certain node is not whitelisted it is not an error condition.
Change-Id: I0b997423ccdc00aee98df5b6f04ed6794549604e
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
[ROCm/ROCR-Runtime commit: c1994e28f0]
Cette révision appartient à :
@@ -1711,8 +1711,11 @@ int open_drm_render_device(int minor)
|
||||
sprintf(path, "/dev/dri/renderD%d", minor);
|
||||
fd = open(path, O_RDWR | O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
if (errno != ENOENT)
|
||||
if (errno != ENOENT) {
|
||||
if (errno == EPERM)
|
||||
pr_info("Check a) User is in \"video\" group b) cgroup permissions\n");
|
||||
pr_err("Failed to open %s: %s\n", path, strerror(errno));
|
||||
}
|
||||
return -errno;
|
||||
}
|
||||
drm_render_fds[index] = fd;
|
||||
|
||||
@@ -595,7 +595,7 @@ static HSAKMT_STATUS topology_sysfs_check_node_supported(uint32_t sysfs_node_id,
|
||||
ret_value = open_drm_render_device(drm_render_minor);
|
||||
if (ret_value > 0)
|
||||
*is_node_supported = true;
|
||||
else if (ret_value != -ENOENT)
|
||||
else if (ret_value != -ENOENT && ret_value != -EPERM)
|
||||
ret = HSAKMT_STATUS_ERROR;
|
||||
|
||||
err:
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur