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

Re: [Xen-devel] [PATCH v2] tools/xenconsoled: Increase file descriptor limit

On Tue, Feb 17, 2015 at 04:37:08PM +0000, Andrew Cooper wrote:
> >> +
> > This function looks Linux centric (/proc and CAP_SYSRESOURCE). Please be
> > considerate to other Unices. :-)
> >
> > Also you might want to log failures along the line.
> >
> > Wei.
> setrlimit() is posix.  From the manpage:
>        getrlimit(), setrlimit(): SVr4, 4.3BSD, POSIX.1-2001.


> "/proc/sys/fs/nr_open" is likely Linux only, but not fatal, and doesn't
> prevent an arbitrary grab for 4096 descriptors.

Please use

  #if defined(__linux__)

for Linux specific code.

> I am not sure what an admin could usefully do with a logged failure
> message here.  Xenconsoled will most likely not function in an
> environment where it is not sufficiently privileged to make this limit
> adjustment (use of privcmd and /dev/ptmx).

Does xenconsoled requires CAP_SYS_RESOURCE to make use of privcmd and
/dev/ptmx? If not, there is a case that your setrlimit fails
while other parts can still be functional, right?


> ~Andrew

Xen-devel mailing list



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