public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Ford <david@linux.com>
To: Igmar Palsenberg <maillist@chello.nl>
Cc: Jeff Garzik <jgarzik@mandrakesoft.mandrakesoft.com>,
	Matthew Kirkwood <matthew@hairy.beasts.org>,
	folkert@vanheusden.com, "Theodore Y Ts'o" <tytso@mit.edu>,
	Kernel devel list <linux-kernel@vger.kernel.org>,
	vpnd@sunsite.auc.dk
Subject: Re: /dev/random probs in 2.4test(12-pre3)
Date: Sat, 02 Dec 2000 12:42:11 -0800	[thread overview]
Message-ID: <3A295EA3.F0E47E9@linux.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0012022229580.11907-100000@server.serve.me.nl>

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

Igmar Palsenberg wrote:

> > For a blocking fd, read(2) has always blocked until some data is
> > available.  There has never been a guarantee, for any driver, that
> > a read(2) will return the full amount of bytes requested.
>
> I know. Still leaves lot's of people that assume that reading /dev/random
> will return data, or will block.
>
> I've seen lots of programs that will assume that if we request x bytes
> from /dev/random it will return x bytes.

I find this really humorous honestly.  I see a lot of people assuming that if
you write N bytes or read N bytes that you will have done N bytes.  There are
return values for these functions that tell you clearly how many bytes were
done.

Any programmer who has evolved sufficiently from a scriptie should take
necessary precautions to check how much data was transferred.  Those who
don't..well, there is still tomorrow.

There is no reason to add any additional documentation.  If we did, we'd be
starting the trend of documenting the direction a mouse moves when it's
pushed and not to be alarmed if you turn the mouse sideways and the result is
90 degrees off.

-d


[-- Attachment #2: Card for David Ford --]
[-- Type: text/x-vcard, Size: 274 bytes --]

begin:vcard 
n:Ford;David
x-mozilla-html:TRUE
url:www.blue-labs.org
adr:;;;;;;
version:2.1
email;internet:david@blue-labs.org
title:Blue Labs Developer
note;quoted-printable:GPG key: http://www.blue-labs.org/david@nifty.key=0D=0A
x-mozilla-cpt:;9952
fn:David Ford
end:vcard

  reply	other threads:[~2000-12-02 21:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-01 17:33 /dev/random probs in 2.4test(12-pre3) folkert
2000-12-02 11:09 ` Matthew Kirkwood
2000-12-02 18:58   ` Igmar Palsenberg
2000-12-02 18:03     ` Jeff Garzik
2000-12-02 21:32       ` Igmar Palsenberg
2000-12-02 20:42         ` David Ford [this message]
2000-12-02 22:00           ` Albert D. Cahalan
2000-12-02 23:18             ` Theodore Y. Ts'o
2000-12-02 23:34               ` Alexander Viro
2000-12-03  3:01                 ` Theodore Y. Ts'o
2000-12-03 12:20                 ` Andrew Morton
2000-12-03 16:32               ` Igmar Palsenberg
2000-12-03  7:20             ` H. Peter Anvin
2000-12-03  7:41               ` Albert D. Cahalan
2000-12-03 16:25           ` Igmar Palsenberg
2000-12-03 18:52             ` Jeff Garzik
2000-12-03 21:18               ` Igmar Palsenberg
2000-12-03 20:15                 ` David Ford
2000-12-03  7:17         ` H. Peter Anvin
2000-12-19 19:24           ` Kai Henningsen
2000-12-02 21:35       ` Igmar Palsenberg
2000-12-02 20:44         ` David Ford
2000-12-03 16:27           ` Igmar Palsenberg
2000-12-03  7:19         ` H. Peter Anvin
2000-12-03  7:16     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2000-12-01 17:26 Matthew Kirkwood
2000-12-01 18:18 ` H. Peter Anvin
2000-12-02 12:01   ` Matthew Kirkwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A295EA3.F0E47E9@linux.com \
    --to=david@linux.com \
    --cc=folkert@vanheusden.com \
    --cc=jgarzik@mandrakesoft.mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maillist@chello.nl \
    --cc=matthew@hairy.beasts.org \
    --cc=tytso@mit.edu \
    --cc=vpnd@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox