History

xen/evtchn: add IOCTL_EVTCHN_RESTRICT

IOCTL_EVTCHN_RESTRICT limits the file descriptor to being able to bind to interdomain event channels from a specific domain. Event channels that are already bound continue to work for sending and receiving notifications. This is useful as part of deprivileging a user space PV backend or device model (QEMU). e.g., Once the device model as bound to the ioreq server event channels it can restrict the file handle so an exploited DM cannot use it to create or bind to arbitrary event channels.

David Vrabel committed 10 years ago

Commit fbc872c1 parent aea305e2 files · +55 −0Browse files

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

Unified · Split

include/uapi/xen/evtchn.h+15−0
@@ -85,4 +85,19 @@ struct ioctl_evtchn_notify { · 84 unmodified lines
8585 #define IOCTL_EVTCHN_RESET \
8686 _IOC(_IOC_NONE, 'E', 5, 0)
8787
88+/*
89+ * Restrict this file descriptor so that it can only be used to bind
90+ * new interdomain events from one domain.
91+ *
92+ * Once a file descriptor has been restricted it cannot be
93+ * de-restricted, and must be closed and re-opened. Event channels
94+ * which were bound before restricting remain bound afterwards, and
95+ * can be notified as usual.
96+ */
97+#define IOCTL_EVTCHN_RESTRICT_DOMID \
98+ _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid))
99+struct ioctl_evtchn_restrict_domid {
100+ domid_t domid;
101+};
102+
88103 #endif /* __LINUX_PUBLIC_EVTCHN_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t