[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140730153713.736881f0@alan.etchedpixels.co.uk>
Date: Wed, 30 Jul 2014 15:37:12 +0100
From: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To: ebiederm@...ssion.com (Eric W. Biederman)
Cc: Andy Lutomirski <luto@...capital.net>,
Paolo Bonzini <pbonzini@...hat.com>,
linux-crypto@...r.kernel.org,
Henrique de Moraes Holschuh <hmh@....eng.br>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
James Morris <james.l.morris@...cle.com>,
LSM List <linux-security-module@...r.kernel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Linux API <linux-api@...r.kernel.org>,
Julien Tinnes <jln@...gle.com>,
"Theodore Ts'o" <tytso@....edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Paul Moore <paul@...l-moore.com>,
David Drysdale <drysdale@...gle.com>,
Kees Cook <keescook@...omium.org>,
Meredydd Luff <meredydd@...atehouse.org>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: General flags to turn things off (getrandom, pid lookup, etc)
> Andy you seem to be arguing here for two system calls.
> get_urandom() and get_random().
>
> Where get_urandom only blocks if there is not enough starting entropy,
> and get_random(GRND_RANDOM) blocks if there is currently not enough
> entropy.
>
> That would allow -ENOSYS to be the right return value and it would
> simply things for everyone.
So you replace the "no file handle" special case with the "unsupported or
disabled syscall" special case, which is even harder to test.
Interfaces have failure modes. People who can't deal with that shouldn't
be writing code that does anything important in languages which don't
handle it for them.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists