Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for SLE-Module-Development-Tools-OBS:x86_64
SUSE:SLE-12:Update
xen.8005
xsa175-0002-libxl-Provide-libxl__backendpath_pa...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xsa175-0002-libxl-Provide-libxl__backendpath_parse_domid.patch of Package xen.8005
References: bsc#979620 CVE-2016-4962 XSA-175 From fd2317e415eab76f20d11c6518fca9042fe117bc Mon Sep 17 00:00:00 2001 From: Ian Jackson <ian.jackson@eu.citrix.com> Date: Wed, 27 Apr 2016 16:34:19 +0100 Subject: [PATCH 02/12] libxl: Provide libxl__backendpath_parse_domid Multiple places in libxl need to figure out the backend domid of a device. This can be discovered easily by looking at the backend path, which always starts /local/domain/$backend_domid/. There are no call sites yet. This is part of XSA-175. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> --- tools/libxl/libxl_device.c | 15 +++++++++++++++ tools/libxl/libxl_internal.h | 2 ++ 2 files changed, 17 insertions(+) Index: xen-4.4.4-testing/tools/libxl/libxl_device.c =================================================================== --- xen-4.4.4-testing.orig/tools/libxl/libxl_device.c +++ xen-4.4.4-testing/tools/libxl/libxl_device.c @@ -270,6 +270,21 @@ static int disk_try_backend(disk_try_bac return 0; } +int libxl__backendpath_parse_domid(libxl__gc *gc, const char *be_path, + libxl_domid *domid_out) { + int r; + unsigned int domid_sc; + char delim_sc; + + r = sscanf(be_path, "/local/domain/%u%c", &domid_sc, &delim_sc); + if (!(r==2 && delim_sc=='/')) { + LOG(ERROR, "internal error: backend path %s unparseable!", be_path); + return ERROR_FAIL; + } + *domid_out = domid_sc; + return 0; +} + int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) { libxl_disk_backend ok; disk_try_backend_args a; Index: xen-4.4.4-testing/tools/libxl/libxl_internal.h =================================================================== --- xen-4.4.4-testing.orig/tools/libxl/libxl_internal.h +++ xen-4.4.4-testing/tools/libxl/libxl_internal.h @@ -574,6 +574,8 @@ _hidden bool libxl__xs_mkdir(libxl__gc * _hidden char *libxl__xs_libxl_path(libxl__gc *gc, uint32_t domid); +_hidden int libxl__backendpath_parse_domid(libxl__gc *gc, const char *be_path, + libxl_domid *domid_out); /*----- "checked" xenstore access functions -----*/ /* Each of these functions will check that it succeeded; if it
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor