The purpose if this ioctl is to allow a user of privcmd to restrict its operation such that it will no longer service arbitrary hypercalls via IOCTL_PRIVCMD_HYPERCALL, and will check for a matching domid when servicing IOCTL_PRIVCMD_DM_OP or IOCTL_PRIVCMD_MMAP*. The aim of this is to limit the attack surface for a compromised device model.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -111,5 +111,7 @@ struct privcmd_dm_op { · 110 unmodified lines | ||
| 111 | 111 | _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) |
| 112 | 112 | #define IOCTL_PRIVCMD_DM_OP \ |
| 113 | 113 | _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op)) |
| 114 | +#define IOCTL_PRIVCMD_RESTRICT \ | |
| 115 | + _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t)) | |
| 114 | 116 | |
| 115 | 117 | #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ |