tools: xencall, xengnttab, xengntshr: Provide access to internal fds

I want this to support my qemu depriv descriptor audit tool.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Ian Jackson authored and Ian Jackson committed 2018-07-06 16:27:52 +01:00
1 parent dbb3c4d0a4
commit e1ed22be85
7 files changed
+48

No files matched your search

+5
View File
@@ -91,6 +91,11 @@ int xencall_close(xencall_handle *xcall)
return rc;
}
int xencall_fd(xencall_handle *xcall)
{
return xcall->fd;
}
int xencall0(xencall_handle *xcall, unsigned int op)
{
privcmd_hypercall_t call = {
+8
View File
@@ -73,6 +73,14 @@ xencall_handle *xencall_open(struct xentoollog_logger *logger,
*/
int xencall_close(xencall_handle *xcall);
/*
* Return the fd used internally by xencall. selecting on it is not
* useful. But it could be useful for unusual use cases; perhaps,
* passing to other programs, calling ioctls on directly, or maybe
* calling fcntl.
*/
int xencall_fd(xencall_handle *xcall);
/*
* Call hypercalls with varying numbers of arguments.
*
+1
View File
@@ -21,4 +21,5 @@ VERS_1.0 {
VERS_1.1 {
global:
xencall_buffers_never_fault;
xencall_fd;
} VERS_1.0;
+6
View File
@@ -64,6 +64,12 @@ int xengntshr_close(xengntshr_handle *xgs)
free(xgs);
return rc;
}
int xengntshr_fd(xengntshr_handle *xgs)
{
return xgs->fd;
}
void *xengntshr_share_pages(xengntshr_handle *xcg, uint32_t domid,
int count, uint32_t *refs, int writable)
{
+5
View File
@@ -75,6 +75,11 @@ int xengnttab_close(xengnttab_handle *xgt)
return rc;
}
int xengnttab_fd(xengnttab_handle *xgt)
{
return xgt->fd;
}
int xengnttab_set_max_grants(xengnttab_handle *xgt, uint32_t count)
{
return osdep_gnttab_set_max_grants(xgt, count);
+17
View File
@@ -149,6 +149,15 @@ xengnttab_handle *xengnttab_open(struct xentoollog_logger *logger,
*/
int xengnttab_close(xengnttab_handle *xgt);
/*
* Return the fd used internally by xengnttab. selecting on it is not
* useful. But it could be useful for unusual use cases; perhaps,
* passing to other programs, calling ioctls on directly, or maybe
* calling fcntl.
*/
int xengnttab_fd(xengnttab_handle *xgt);
/**
* Memory maps a grant reference from one domain to a local address range.
* Mappings should be unmapped with xengnttab_unmap. Logs errors.
@@ -334,6 +343,14 @@ xengntshr_handle *xengntshr_open(struct xentoollog_logger *logger,
*/
int xengntshr_close(xengntshr_handle *xgs);
/*
* Return the fd used internally by xengntshr. selecting on it is not
* useful. But it could be useful for unusual use cases; perhaps,
* passing to other programs, calling ioctls on directly, or maybe
* calling fcntl.
*/
int xengntshr_fd(xengntshr_handle *xgs);
/**
* Allocates and shares pages with another domain.
*
+6
View File
@@ -26,3 +26,9 @@ VERS_1.1 {
global:
xengnttab_grant_copy;
} VERS_1.0;
VERS_1.2 {
global:
xengnttab_fd;
xengntshr_fd;
} VERS_1.1;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.