Date: Wed, 17 Sep 2008 13:32:40 +0400 From: Andrey Chernov <ache@nagual.pp.ru> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Daniel Eischen <deischen@freebsd.org>, Max Laier <max@love2party.net>, freebsd-current@freebsd.org Subject: Re: Is fork() hook ever possible? Message-ID: <20080917093238.GA59500@nagual.pp.ru> In-Reply-To: <89740.1221643441@critter.freebsd.dk> References: <20080917090101.GC57480@nagual.pp.ru> <89740.1221643441@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 17, 2008 at 09:24:01AM +0000, Poul-Henning Kamp wrote: > >The performance issue happens when application tries to call arc4random() > >in the loop. > > That is not what we are talking about, we are talking about the calls > in mktemp and similar. There are two things needed to be separated. mktemp etc. calls are the reason for the check. The check (in its current form) is the reason for slowing down in the loops because syscall overhead. > >We can control our own arc4random() internal calls inside our own libs in > >such way but can't control 3rd party libs or programs arc4random() calls > >(consider ports). > > We are not obliged to control these calls. If their authors do something > stupid, it's not our problem. The problem is that we are not authors of that API but currently OpenBSD are. We just integrate their API. Perhaps their API is stupid in this point (so they resolve it by non-efficient way), but people will try to follow their API because they are the authors, not ours. > Just have the FreeBSD library calls, call the wrapper function that > does a pid check and be done with it. I understand your idea and it was first idea that comes to me too, but since API is not ours, it does not work that way. -- http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080917093238.GA59500>