All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: XenBus_AddWatch
       [not found] <CA+J4q6damheMoEXQq4YmvPY8cidMADwhrrVbcb+MkQ9OKsaucA@mail.gmail.com>
@ 2015-01-02 15:10 ` hanji unit
  2015-01-06 10:34 ` [win-pv-devel] XenBus_AddWatch Paul Durrant
       [not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257AF4EF@AMSPEX01CL01.citrite.net>
  2 siblings, 0 replies; 3+ messages in thread
From: hanji unit @ 2015-01-02 15:10 UTC (permalink / raw)
  To: win-pv-devel, xen-devel

Hello, I am calling XenBus_AddWatch API from a DomU guest in the
win-pvdrivers xenpci driver, and noticed that I am not able to watch
xenstore entries that are outside of the DomU's xenstore tree. For
example, the following call in
XenPci_EvtDeviceD0EntryPostInterruptsEnabled fails with response="EIO"
even if the xenstore permissions for Container and Container/DomU in
xenstore are both "b0":

response = XenBus_AddWatch(xpdd, XN_BASE_GLOBAL, "Container/DomU",
MyCallback, xpdd);

However, the following call works and it watches a xenstore entry
relative to DomUs xenstore tree:

response = XenBus_AddWatch(xpdd, XBT_NIL, "DomU", MyCallback, xpdd);

Writing to an entry outside the DomUs tree is allowed if permissions are b0:

result = XnWriteString(xpdd, XN_BASE_GLOBAL, "Container/DomU", buffer);

It seems like DomUs should be allowed to watch xenstore entries
outside their trees. Is this a bug or is it by design?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [win-pv-devel] XenBus_AddWatch
       [not found] <CA+J4q6damheMoEXQq4YmvPY8cidMADwhrrVbcb+MkQ9OKsaucA@mail.gmail.com>
  2015-01-02 15:10 ` Fwd: XenBus_AddWatch hanji unit
@ 2015-01-06 10:34 ` Paul Durrant
       [not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257AF4EF@AMSPEX01CL01.citrite.net>
  2 siblings, 0 replies; 3+ messages in thread
From: Paul Durrant @ 2015-01-06 10:34 UTC (permalink / raw)
  To: hanji unit, win-pv-devel, xen-devel

> -----Original Message-----
> From: win-pv-devel-bounces@lists.xenproject.org [mailto:win-pv-devel-
> bounces@lists.xenproject.org] On Behalf Of hanji unit
> Sent: 31 December 2014 15:15
> To: win-pv-devel@lists.xenproject.org; xen-devel@lists.xen.org
> Subject: [win-pv-devel] XenBus_AddWatch
> 
> Hello, I am calling XenBus_AddWatch API from a DomU guest in the
> win-pvdrivers xenpci driver, and noticed that I am not able to watch
> xenstore entries that are outside of the DomU's xenstore tree. For
> example, the following call in
> XenPci_EvtDeviceD0EntryPostInterruptsEnabled fails with response="EIO"
> even if the xenstore permissions for Container and Container/DomU in
> xenstore are both "b0":
> 
> response = XenBus_AddWatch(xpdd, XN_BASE_GLOBAL,
> "Container/DomU",
> MyCallback, xpdd);
> 
> However, the following call works and it watches a xenstore entry
> relative to DomUs xenstore tree:
> 
> response = XenBus_AddWatch(xpdd, XBT_NIL, "DomU", MyCallback, xpdd);
> 
> Writing to an entry outside the DomUs tree is allowed if permissions are b0:
> 
> result = XnWriteString(xpdd, XN_BASE_GLOBAL, "Container/DomU", buffer);
> 
> It seems like DomUs should be allowed to watch xenstore entries
> outside their trees. Is this a bug or is it by design?

Hi,

  The API you're referring to is part of James Harper's GPLPV drivers I believe, which I'm no expert on. I would imagine the API simply passes error codes back from xenstored though so you should probably check xenstored-access.log, although EIO does sound like an odd code to get back.

  Paul

> 
> Thanks.
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@lists.xenproject.org
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [win-pv-devel] XenBus_AddWatch
       [not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257AF4EF@AMSPEX01CL01.citrite.net>
@ 2015-01-07 22:06   ` hanji unit
  0 siblings, 0 replies; 3+ messages in thread
From: hanji unit @ 2015-01-07 22:06 UTC (permalink / raw)
  To: Paul Durrant; +Cc: win-pv-devel, xen-devel

Yea, I debugged through Harper's code and it seems like the error
response is coming from XenStore on Dom0. Ive been looking at it, and
OXenStored is running on Dom0. Of all the languages possible, they
decided to write xenstore in OCaml. I am not very good at OCaml and
dont know anyone that is, so I could work with someone to help them
fix this bug if there is interest.

I cannot watch a xenstore node, even when the DomU that I'm watching
from owns the node and allows full access to everyone else that wants
to access the node. Permissions are "bU" where U is the DomID of the
DomU doing the watching.

Is there any requirement for consistency of programming languages and
use of common languages across the different subprojects in Xen?

On Tue, Jan 6, 2015 at 5:34 AM, Paul Durrant <Paul.Durrant@citrix.com> wrote:
>> -----Original Message-----
>> From: win-pv-devel-bounces@lists.xenproject.org [mailto:win-pv-devel-
>> bounces@lists.xenproject.org] On Behalf Of hanji unit
>> Sent: 31 December 2014 15:15
>> To: win-pv-devel@lists.xenproject.org; xen-devel@lists.xen.org
>> Subject: [win-pv-devel] XenBus_AddWatch
>>
>> Hello, I am calling XenBus_AddWatch API from a DomU guest in the
>> win-pvdrivers xenpci driver, and noticed that I am not able to watch
>> xenstore entries that are outside of the DomU's xenstore tree. For
>> example, the following call in
>> XenPci_EvtDeviceD0EntryPostInterruptsEnabled fails with response="EIO"
>> even if the xenstore permissions for Container and Container/DomU in
>> xenstore are both "b0":
>>
>> response = XenBus_AddWatch(xpdd, XN_BASE_GLOBAL,
>> "Container/DomU",
>> MyCallback, xpdd);
>>
>> However, the following call works and it watches a xenstore entry
>> relative to DomUs xenstore tree:
>>
>> response = XenBus_AddWatch(xpdd, XBT_NIL, "DomU", MyCallback, xpdd);
>>
>> Writing to an entry outside the DomUs tree is allowed if permissions are b0:
>>
>> result = XnWriteString(xpdd, XN_BASE_GLOBAL, "Container/DomU", buffer);
>>
>> It seems like DomUs should be allowed to watch xenstore entries
>> outside their trees. Is this a bug or is it by design?
>
> Hi,
>
>   The API you're referring to is part of James Harper's GPLPV drivers I believe, which I'm no expert on. I would imagine the API simply passes error codes back from xenstored though so you should probably check xenstored-access.log, although EIO does sound like an odd code to get back.
>
>   Paul
>
>>
>> Thanks.
>>
>> _______________________________________________
>> win-pv-devel mailing list
>> win-pv-devel@lists.xenproject.org
>> http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-07 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+J4q6damheMoEXQq4YmvPY8cidMADwhrrVbcb+MkQ9OKsaucA@mail.gmail.com>
2015-01-02 15:10 ` Fwd: XenBus_AddWatch hanji unit
2015-01-06 10:34 ` [win-pv-devel] XenBus_AddWatch Paul Durrant
     [not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257AF4EF@AMSPEX01CL01.citrite.net>
2015-01-07 22:06   ` hanji unit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.