From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 12:02:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B510D54F; Wed, 1 Apr 2015 12:02:34 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 454701B1; Wed, 1 Apr 2015 12:02:34 +0000 (UTC) Received: by wgdm6 with SMTP id m6so50716460wgd.2; Wed, 01 Apr 2015 05:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=XZffWIcmEALQEPqQIRdX+XQNJtbEd7zrD9MY6pj6uuI=; b=Q8GsSH/acP5DEsX2I/JmrOfSyGS3hLeCyPwjsDOofQJyFaw0l8DNi2SplFEW516AN3 GBX2yKPd+n06fzFhKolo9VF/eTYHoY8TtwGm3ju7fQ1YgC3r+qjepElvYBf222o5hvqc 0J69pJml8ulw9srAlWvBeDEqod0bFUcyZU/UPrVqqaPKXroIY2t9PESt1oYQCDQ/Md2Q Hb8tkMYl8R0HXKbzsNa2n5bc7p5lMRL7KE1oW1vGQUFWevxuqj2ArGVY2SO18d6mt6G5 3m8C//d+PorIUu8YzOF9s163Bza9elKJ2Fx/5/jl4CX6x85qde74uzhr5b+oGGq13owF a12w== X-Received: by 10.180.83.136 with SMTP id q8mr14530885wiy.39.1427889752713; Wed, 01 Apr 2015 05:02:32 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id v8sm28728703wib.0.2015.04.01.05.02.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 05:02:32 -0700 (PDT) Date: Wed, 1 Apr 2015 14:02:29 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom Message-ID: <20150401120229.GA2201@dft-labs.eu> References: <20150401113628.GA16649@dft-labs.eu> <20150401114313.GZ64665@FreeBSD.org> <20150401115204.GB16649@dft-labs.eu> <20150401115729.GA64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150401115729.GA64665@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 12:02:34 -0000 On Wed, Apr 01, 2015 at 02:57:29PM +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 01:52:04PM +0200, Mateusz Guzik wrote: > M> /dev/zero returns 0s, while notrandom was implemented to return 7s. > M> > M> We could e.g. symlink /dev/notrandom to /dev/zero, but that would break > M> compatiblity with Solaris apps depending on this functionality. > M> > M> It could also introduce hard-to-debug problems. After all, readers get a > M> different value than they expect. > M> > M> Given that we have some parts of Solaris merged (zfs, dtrace) and work > M> with open source forks on these technologies, I think we should diverge > M> only when necessary. > M> > M> As a side note I'm surprised with the choice of 7. > M> > M> I would expect 3, no more, no less. 3 would be the number returned, and > M> the number readers receive would be 3. > > You can add the seven_region variable to dev/null/null.c and implement > the new device here. Now notrandom.c shares > 50% of code with null.c. > Yeah I know, in fact I got most of the code from that driver. I just wanted to have a file with my own copyright in the tree, what's so bad about it. If you feel strongly about it feel free to move it, but I would prefer if you did not. -- Mateusz Guzik