Source-Changes-D archive

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

Re: CVS commit: src/sys/kern


> Module Name:    src
> Committed By:   dsl
> Date:           Sat Dec 12 17:47:05 UTC 2009
> Modified Files:
>         src/sys/kern: sys_select.c
> Log Message:
> Bounding the 'nfds' arg to poll() at the current process limit for actual
> open files is rather gross - the poll map isn't required to be dense.
> Instead limit to a much larger value (1000 + dt_nfiles) so that user
> programs cannot allocate indefinite sized blocks of kvm.

This does not look right to me.

- Where does the random value 1000 come from?  If you need a limit, POSIX
  allows to limit up to OPEN_MAX (thus did SVR4?).

- How about truncating to fd_lastfile (plus one), instead of dt_nfiles?


Home | Main Index | Thread Index | Old Index