Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2008 13:01:01 +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:  <20080917090101.GC57480@nagual.pp.ru>
In-Reply-To: <89506.1221638697@critter.freebsd.dk>
References:  <20080917075513.GB55535@nagual.pp.ru> <89506.1221638697@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 17, 2008 at 08:04:57AM +0000, Poul-Henning Kamp wrote:
> >The situation is not so simple since the library functions can call 
> >ar4random() internally (like mktemp() family already and always does)
> 
> I have a really hard time seeing how this could become a performance
> issue, ever.

The performance issue happens when application tries to call arc4random() 
in the loop.

> The solution however, is simple: Just have these hidden library calls 
> to arc4random call a wrapper function that does the pid check.

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). There is no special mentions of pid check needed in 
arc4random() general API, so 3rd party code will tends to not come to that 
matter.

-- 
http://ache.pp.ru/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080917090101.GC57480>