Subject: Re: replace kernel random number function
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
From: Michael Graff <explorer@flame.org>
List: tech-security
Date: 10/23/2000 20:55:28
  by mail.netbsd.org with SMTP; 24 Oct 2000 03:55:36 -0000
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
Cc: tech-security@netbsd.org, tech-kern@netbsd.org
Subject: Re: replace kernel random number function
References: <Pine.GSO.4.21.0010222248360.26027-100000@rfhpc8320.fh-regensburg.de>
From: Michael Graff <explorer@flame.org>
In-Reply-To: Hubert Feyrer's message of "Sun, 22 Oct 2000 22:50:08 +0200 (MET DST)"
Date: 23 Oct 2000 20:55:28 -0700
Message-ID: <v6og0a7v0v.fsf@kechara.flame.org>
Lines: 18

Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de> writes:

> > A syscall for that would be a bad idea.
> 
> Why - because passing the ammount of data between userland and kernel and
> back is too much overhead?

For one, random() is repeatable, so you'd have to maintain per-process
state for it.  That would be silly to do, rather than having it in
libc.

As for passing in data to be md5() hashed, that is still pretty silly,
as this is what userland is for.

Replicating the code in every binary (via libc) and in the kernel
really is a good idea in both of those cases.

--Michael