[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xenconsole: Ensure exclusive access to console using locks



On Fri, 2015-07-24 at 15:40 +0200, Martin Lucina wrote:
> On Friday, 24.07.2015 at 14:11, Ian Campbell wrote:
> > I'm afraid this (delving into another components private headers) isn't
> > allowed. Instead you should add the two lines to tools/console/Makefile
> > to generate a local _paths.h:
> > 
> > genpath-target = $(call buildmakevars2header,_paths.h)
> > $(eval $(genpath-target))
> > 
> > Plus a dependency on it in the xenconsole rule and a .gitignore entry.
> > 
> > You might want to generate client/_paths.h instead to avoid needing to
> > muck around with CFLAGS.
> 
> The above works, but causes genpath-target to be re-run each time "make" 
> is
> called in tools/console, i.e. no longer says "Nothing to be done for 
> all".
> I presume that's ok?

I think so, yes.

> > I think you can use string concatenation here, e.g.
> >     XEN_LOCK_DIR "/xenconsole.%d"
> > 
> > 
> > Given the known limits on the size of domid it would probably be
> > possible to figure out a tighter limit than PATH_MAX.
> 
> Ok, I can just make it the usual 255 ...

Or sizeof(XEN_LOCK_DIR"/xenconsole.") + 8 ? (8 being more digits that any
valid domid can have), which avoids problems with people putting the lock
dir somewhere ludicrous.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.