History

xen/privcmd: add IOCTL_PRIVCMD_RESTRICT

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.

Paul Durrant committed 9 years ago

Commit 4610d241 parent ab520be2 files · +81 −9Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/xen/privcmd.h+2−0
@@ -111,5 +111,7 @@ struct privcmd_dm_op { · 110 unmodified lines
111111 _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
112112 #define IOCTL_PRIVCMD_DM_OP \
113113 _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
114+#define IOCTL_PRIVCMD_RESTRICT \
115+ _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
114116
115117 #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */