Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262500AbVAPNXr (ORCPT ); Sun, 16 Jan 2005 08:23:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262501AbVAPNXr (ORCPT ); Sun, 16 Jan 2005 08:23:47 -0500 Received: from pastinakel.tue.nl ([131.155.2.7]:15884 "EHLO pastinakel.tue.nl") by vger.kernel.org with ESMTP id S262500AbVAPNXo (ORCPT ); Sun, 16 Jan 2005 08:23:44 -0500 Date: Sun, 16 Jan 2005 14:23:40 +0100 From: Andries Brouwer To: Ulrich Drepper Cc: Matt Mackall , "Theodore Ts'o" , Linux Kernel Subject: Re: short read from /dev/urandom Message-ID: <20050116132340.GA8163@pclin040.win.tue.nl> References: <41E7509E.4030802@redhat.com> <20050116024446.GA3867@waste.org> <41E9E65F.1030100@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41E9E65F.1030100@redhat.com> User-Agent: Mutt/1.4.2i X-Spam-DCC: dmv.com: pastinakel.tue.nl 1181; Body=1 Fuz1=1 Fuz2=1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1308 Lines: 31 On Sat, Jan 15, 2005 at 07:58:23PM -0800, Ulrich Drepper wrote: > Matt Mackall wrote: > >_Neither_ case mentions signals and the "and will return as many bytes > >as requested" is clearly just a restatement of "does not have this > >limit". Whoever copied this comment to the manpage was a bit sloppy > >and dropped the first clause rather than the second: > > It still means the documented API says there are no short reads. No. It says that /dev/urandom "contains" an unlimited amount of bits - you can read as many bits from there as you want, while /dev/random "contains" a limited amount of information - you can exhaust it. That is information about the device. There is no suggestion at all about some special property that would guarantee that the normal read() system call has special behavior in connection with /dev/urandom. There is no special documented API. Now that this misunderstanding occurred I suppose a clarifying sentence will be added. Nothing special with /dev/urandom. Applications that make special assumptions are broken. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/