From owner-freebsd-audit Sun Nov 28 23:42: 3 1999 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 297C014DE8; Sun, 28 Nov 1999 23:42:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 181011CD624; Sun, 28 Nov 1999 23:42:02 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Sun, 28 Nov 1999 23:42:02 -0800 (PST) From: Kris Kennaway To: Bruce Evans Cc: Mike Smith , audit@freebsd.org, Warner Losh Subject: Re: cvs commit: src/sys/i386/conf files.i386 src/sys/kern kern_fork.c src/sys/libkern arc4random.c src/sys/sys libkern.h In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 29 Nov 1999, Bruce Evans wrote: > It's unreasonable to ask a new committer to use /dev/random when more > important things like netinet don't use it. To use it in One must start somewhere - I hope the other candidates get addressed over the next few months (most of the patches should be simple merges from openbsd). > machine-independent code, you first have to implement it for alpha. Here > is a toy implementation: Good point. Again, OpenBSD have presumably got working code we can pull over. I'll check that tomorrow, time permitting. Hmm, given this it may be more productive to simply bring across the entire OpenBSD /dev/random as Dan suggested, Mark's plans to implement Yarrow notwithstanding. Thoughts, Mark? > This does the same thing as the i386 implementation on a bad day. The > caller must be prepared for a limited amount of entropy being available. > All callers except the ones for userland get this wrong by calling > read_random() on alphas and always ignoring the result of read_random(). Can you suggest a decent fix? Simply polling until we fill our desired buffer? Using read_random_unlimited() may well be "good enough" in many cases. I'll add the cases you mentioned to my list of things to look at - thanks! Kris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message