Subject: Re: multiple copyout()s or a malloc?
To: Simon Burge <simonb@netbsd.org>
From: None <erh@nimenees.com>
List: tech-kern
Date: 05/30/2000 09:14:30
On Tue, May 30, 2000 at 09:45:53PM +1000, Simon Burge wrote:
> Folks,
>
> In relation to a ipcs-type sysctl(), given the choice between doing (for
> example) 128x 60byte copyouts or one 8kish malloc and a copyout(), which
> would be the better choice? I'd guess that the latter would be quicker,
> but could it be used as a serious DOS-type attack on kernel memory if
> lots of processes were to call the sysctl() at the same time?
Unless you used a semaphore to have the sysctl keep track of
and limit the number of concurrent calls. Or even limit it to one process
at a time. How many different processes at once are going to want this
information?
eric