Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbcDZBLo (ORCPT ); Mon, 25 Apr 2016 21:11:44 -0400 Received: from imap.thunk.org ([74.207.234.97]:39392 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbcDZBLn (ORCPT ); Mon, 25 Apr 2016 21:11:43 -0400 Date: Mon, 25 Apr 2016 21:11:37 -0400 From: "Theodore Ts'o" To: Nikos Mavrogiannopoulos Cc: Stephan Mueller , Herbert Xu , Linux Crypto Mailing List , Linux Kernel Mailing List , Sandy Harris Subject: Re: [RFC][PATCH 0/6] /dev/random - a new approach Message-ID: <20160426011137.GC28496@thunk.org> Mail-Followup-To: Theodore Ts'o , Nikos Mavrogiannopoulos , Stephan Mueller , Herbert Xu , Linux Crypto Mailing List , Linux Kernel Mailing List , Sandy Harris References: <9192755.iDgo3Omyqe@positron.chronox.de> <1499137.D4Mft7n8bh@tauon.atsec.com> <2009968.Rf1hsrr5t0@tauon.atsec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 17 On Mon, Apr 25, 2016 at 10:23:51AM +0200, Nikos Mavrogiannopoulos wrote: > That's far from a solution and I wouldn't recommend to anyone doing > that. We cannot expect each and every program to do glibc's job. The > purpose of a system call like getrandom is to simplify the complex use > of /dev/urandom and eliminate it, not to make code handling randomness > in applications even worse. Yes, but if glibc is falling down on the job and refusing to export the system call (I think for political reasons; it's a Linux-only interface, so Hurd wouldn't have it), then the only solution is to either use syscall directly (it's not hard for getrandom, since we're not using 64-bit arguments which gets tricky for some architectures), or as Peter Avin has suggested, maybe kernel developers will have to start releasing the libinux library, and then teaching application authors to add -linux to their linker lines. - Ted