WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Help on domain creation

To: Ning Wu <ningwu@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Help on domain creation
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Tue, 21 Oct 2003 21:49:53 +0100
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Xen develop mailing list <xen-devel@xxxxxxxxxxxxxxxxxxxxx>, Steven.Hand@xxxxxxxxxxxx
Delivery-date: Tue, 21 Oct 2003 21:49:53 +0100
Envelope-to: Steven.Hand@xxxxxxxxxxxx
In-reply-to: Message from Ning Wu <ningwu@xxxxxxxxxxxxxx> of "Tue, 21 Oct 2003 11:42:09 EDT." <Pine.SOL.4.33.0310211113280.20083-100000@xxxxxxxxxxxxxxxxxxxxxx>
>I did run it as root on domain0. The program calls ioctl(,SNDCTL...) and
>denied access. ??????  What does it do with sound device? The error
>returned for xi_phys_grant is "invalid argument".

The ioctl numbers used by xenctl etc are not in the standard linux
namespace; and so are not understood by strace.  We should probably 
fix this at some point. 
 
>Any ideas?

>open("/proc/xeno/privcmd", O_RDWR)      = 3
>ioctl(3, SNDCTL_DSP_RESET, 0xbffff4e0)  = -1 EPERM (Operation not
>permitted)
>write(2, "ERROR: Error when executing priv"..., 83ERROR: Error when
>executing privileged control ioctl (1 = Operation not permitted)
>) = 83

I believe that SNDCTL_DSP_RESET is actually '0' and hence corresponds
to a hypercall being made by the user tools in domain 0. 

The fact that you get 'EPERM' is kinda odd; this should only really
be the case if the calling domain (guest OS) is not privileged -- but
domain 0 is always privileged. 

The second one is also odd; the ioctl(SNDCTL_DISP_SYNC) is '1' afaics 
and hence corresponds to a block device control message; this will 
return EINVAL if e.g. the buffer size being used is larger than a page
size but xi_phys_grant shouldn't cause this. Can't currently see how 
else this cane be triggered. 

Hmm; will try to sort this out once back from trip, 

S.