search for: xenbus_dev_write

Displaying 6 results from an estimated 6 matches for "xenbus_dev_write".

2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...tok_len; + + hdr.type = XS_WATCH_EVENT; + hdr.len = body_len; + + queue_reply(adap->dev_data, (char *)&hdr, sizeof(hdr)); + queue_reply(adap->dev_data, (char *)path, path_len); + queue_reply(adap->dev_data, (char *)token, tok_len); +} + +static LIST_HEAD(watch_list); static ssize_t xenbus_dev_write(struct file *filp, const char __user *ubuf, @@ -116,6 +167,9 @@ static ssize_t xenbus_dev_write(struct f struct xenbus_dev_transaction *trans = NULL; uint32_t msg_type; void *reply; + char *path, *token; + struct watch_adapter *watch, *tmp_watch; + int err; if ((len + u->len) >...
2011 May 26
0
concurrent writes to xenbus device
Is it supposed to be possible to write to the same struct file instance from multiple threads/processes? Looking at xenbus_dev_write() I can''t see how such writes would be serialized, yet assuming that user mode code always writes full messages it would seem consistent to allow such. Thanks, Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource...
2012 Jan 24
0
[PATCH] linux-2.6.18/xenbus_dev: add missing error checks to watch handling
...ch token was merely assumed to be. Additionally, none of the three associated memory allocations got checked for being successful. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/drivers/xen/xenbus/xenbus_dev.c +++ b/drivers/xen/xenbus/xenbus_dev.c @@ -269,18 +269,24 @@ static ssize_t xenbus_dev_write(struct f goto out; } token++; + if (memchr(token, 0, u->u.msg.len - (token - path)) == NULL) { + rc = -EILSEQ; + goto out; + } if (msg_type == XS_WATCH) { watch = kzalloc(sizeof(*watch), GFP_KERNEL); - watch->watch.node = kmalloc(strlen(path)+1, -...
2005 Dec 15
10
watches not working from domU userspace
...erspace (they obviously do for drivers). In some preliminary debugging of this, there are two aspects of the failure: not sending the watch to xenstore and not handling watch events for userspace watches. The former can be easily fixed by adding the missing ''case XS_WATCH:'' to xenbus_dev_write() in xenbus_dev.c. The latter is more difficult to fix. So before I tackle it, I wanted to see if anyone else was already working on a solution or just had some thoughts to share on possible solutions. Joseph Cihula (Linux) Software Security Architect Open Source Technology Center Intel Corp. **...
2007 Mar 05
0
[PATCH 3/10] linux 2.6.18: constify instances of ''struct file_operations''
...drivers/xen/xenbus/xenbus_dev.c 2007-02-27 16:27:37.000000000 +0100 @@ -342,7 +342,7 @@ static unsigned int xenbus_dev_poll(stru return 0; } -static struct file_operations xenbus_dev_file_ops = { +static const struct file_operations xenbus_dev_file_ops = { .read = xenbus_dev_read, .write = xenbus_dev_write, .open = xenbus_dev_open, Index: head-2007-02-27/../patches/linux-2.6.18/blktap-aio-16_03_06.patch =================================================================== --- head-2007-02-27.orig/../patches/linux-2.6.18/blktap-aio-16_03_06.patch +++ head-2007-02-27/../patches/linux-2.6.18/blktap-aio-...
2005 Sep 08
45
/proc/xen/xenbus supports watch?
Hi, Anybody (Christian?) could please tell me if we can get the support for registering watch with /proc/xen/xenbus? (..OK, I know that we will change it this /proc stuff to a device soon) So far we can only do read/write/rm. I really miss the xen watch feature. Many thanks, Hieu _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com