Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-02 Thread David Chisnall
On 2 Apr 2015, at 11:22, Mateusz Guzik wrote: > > Now one has to wonder how obnoxious one has to get so that people think > "this can't be real". > > I tried really hard. :) Not sure about your locale, but here (where the tradition originated) if you fool someone in the morning then they are a

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-02 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 11:11:11AM -0700, Jordan Hubbard wrote: > > > On Apr 1, 2015, at 11:04 AM, David Chisnall wrote: > > > > On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: > >> > >> I guess you were right, this was bad. > >> > >> I moved the implementation to null.c, I hope this makes ever

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-02 Thread Garrett Cooper
On Apr 1, 2015, at 23:15, Alexey Dokuchaev wrote: > On Wed, Apr 01, 2015 at 07:04:03PM +0100, David Chisnall wrote: >> This almost certainly does not make people happy: >> >> - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen >> - * Copyright (c) 2001-2004 Mark R. V. Murray >> - *

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Alexey Dokuchaev
On Wed, Apr 01, 2015 at 07:04:03PM +0100, David Chisnall wrote: > This almost certainly does not make people happy: > > - * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen > - * Copyright (c) 2001-2004 Mark R. V. Murray > - * Copyright (c) 2014 Eitan Adler > + * Copyright (c) 2015 Ma

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Matthew D. Fuller
On Wed, Apr 01, 2015 at 01:52:04PM +0200 I heard the voice of Mateusz Guzik, and lo! it spake thus: > > As a side note I'm surprised with the choice of 7. > > I would expect 3, no more, no less. 3 would be the number returned, > and the number readers receive would be 3. This is BSD: System V is

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Jordan Hubbard
> On Apr 1, 2015, at 11:04 AM, David Chisnall wrote: > > On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: >> >> I guess you were right, this was bad. >> >> I moved the implementation to null.c, I hope this makes everyone happy. >> >> https://lists.freebsd.org/pipermail/svn-src-all/2015-April/10

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread David Chisnall
On 1 Apr 2015, at 18:41, Mateusz Guzik wrote: > > I guess you were right, this was bad. > > I moved the implementation to null.c, I hope this makes everyone happy. > > https://lists.freebsd.org/pipermail/svn-src-all/2015-April/101876.html This almost certainly does not make people happy: - *

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Devin Teske
>> On Apr 1, 2015, at 7:59 AM, Alexey Dokuchaev wrote: >> >>> On Wed, Apr 01, 2015 at 08:18:17AM -0600, Ian Lepore wrote: >>> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: >>> As a side note I'm surprised with the choice of 7. >>> >>> I would expect 3, no more, no less. 3 would be the

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 08:11:18AM -0700, Steve Kargl wrote: > On Wed, Apr 01, 2015 at 02:29:16PM +0200, Mateusz Guzik wrote: > > > > > Mateusz, if you keep the momentum, in the next years we will see lots > > > of files with your copyright. :) There is no reason to create one > > > just for this.

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Glen Barber
On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 > > Log: > Add /dev/notrandom > > notrandom provides fast and reliable not random numbers. > > This w

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Ian Lepore
On Wed, 2015-04-01 at 23:13 +0800, Julian Elischer wrote: > On 4/1/15 11:11 PM, Julian Elischer wrote: > > On 4/1/15 10:18 PM, Ian Lepore wrote: > >> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > >>> As a side note I'm surprised with the choice of 7. > >>> > >>> I would expect 3, no mor

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Bryan Drewery
On 4/1/2015 6:36 AM, Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 > > Log: > Add /dev/notrandom > > notrandom provides fast and reliable not random numbers. > This is a nice tradeoff. No lo

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Alexey Dokuchaev
On Wed, Apr 01, 2015 at 05:46:33PM +0200, Mateusz Guzik wrote: > On Wed, Apr 01, 2015 at 11:36:26AM -0400, Benjamin Kaduk wrote: > > But surely to be non-random we need an equal number of 1 and 0 bits, > > making 15 the clear choice. > > I don't know man. I concur. Consider running FreeBSD to HP

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mark R V Murray
> On 1 Apr 2015, at 16:46, Mateusz Guzik wrote: > We can add an ioctl to control this. Thats a bad idea, because some fool may set up their local instance to return a random number (like 4), and that will badly break the intent of this device. And before somebody says “tools, not policy”, ther

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 11:36:26AM -0400, Benjamin Kaduk wrote: > On Wed, Apr 1, 2015 at 11:33 AM, Mark R V Murray wrote: > > > > > > > Before someone makes a terrible mistake, I should point out that 4 is > > confirmed random, as cited here: https://xkcd.com/221/ > > > But surely to be non-ran

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Benjamin Kaduk
On Wed, Apr 1, 2015 at 11:33 AM, Mark R V Murray wrote: > > > Before someone makes a terrible mistake, I should point out that 4 is > confirmed random, as cited here: https://xkcd.com/221/ But surely to be non-random we need an equal number of 1 and 0 bits, making 15 the clear choice. -Ben ___

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Steve Kargl
On Wed, Apr 01, 2015 at 02:29:16PM +0200, Mateusz Guzik wrote: > > > Mateusz, if you keep the momentum, in the next years we will see lots > > of files with your copyright. :) There is no reason to create one > > just for this. Also, you can legitimately add your name into header of > > null.c if

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mark R V Murray
> On 1 Apr 2015, at 16:13, Julian Elischer wrote: > > On 4/1/15 11:11 PM, Julian Elischer wrote: >> On 4/1/15 10:18 PM, Ian Lepore wrote: >>> On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: As a side note I'm surprised with the choice of 7. I would expect 3, no more, no l

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Julian Elischer
On 4/1/15 11:11 PM, Julian Elischer wrote: On 4/1/15 10:18 PM, Ian Lepore wrote: On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: As a side note I'm surprised with the choice of 7. I would expect 3, no more, no less. 3 would be the number returned, and the number readers receive would b

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Julian Elischer
On 4/1/15 10:18 PM, Ian Lepore wrote: On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: As a side note I'm surprised with the choice of 7. I would expect 3, no more, no less. 3 would be the number returned, and the number readers receive would be 3. 5 would be right out. there is prior

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Julian Elischer
On 4/1/15 8:31 PM, Andrew Turner wrote: On Wed, 1 Apr 2015 13:36:28 +0200 Mateusz Guzik wrote: Author: mjg Date: Wed Apr 1 13:37:00 2015 New Revision: 280955 URL: https://svnweb.freebsd.org/changeset/base/280955 Log: Add /dev/notrandom notrandom provides fast and reliable not random n

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Alexey Dokuchaev
On Wed, Apr 01, 2015 at 08:18:17AM -0600, Ian Lepore wrote: > On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > > As a side note I'm surprised with the choice of 7. > > > > I would expect 3, no more, no less. 3 would be the number returned, > > and the number readers receive would be 3. >

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Ian Lepore
On Wed, 2015-04-01 at 13:52 +0200, Mateusz Guzik wrote: > As a side note I'm surprised with the choice of 7. > > I would expect 3, no more, no less. 3 would be the number returned, > and the number readers receive would be 3. 5 would be right out. -- Ian ___

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 01:31:14PM +0100, Andrew Turner wrote: > On Wed, 1 Apr 2015 13:36:28 +0200 > Mateusz Guzik wrote: > > > Author: mjg > > Date: Wed Apr 1 13:37:00 2015 > > New Revision: 280955 > > URL: https://svnweb.freebsd.org/changeset/base/280955 > > > > Log: > > Add /dev/notrandom

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Andrew Turner
On Wed, 1 Apr 2015 13:36:28 +0200 Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 13:37:00 2015 > New Revision: 280955 > URL: https://svnweb.freebsd.org/changeset/base/280955 > > Log: > Add /dev/notrandom > > notrandom provides fast and reliable not random numbers. > > This was add

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 03:13:44PM +0300, Gleb Smirnoff wrote: > Mateusz, > > On Wed, Apr 01, 2015 at 02:02:29PM +0200, Mateusz Guzik wrote: > M> > You can add the seven_region variable to dev/null/null.c and implement > M> > the new device here. Now notrandom.c shares > 50% of code with null.c.

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Gleb Smirnoff
Mateusz, On Wed, Apr 01, 2015 at 02:02:29PM +0200, Mateusz Guzik wrote: M> > You can add the seven_region variable to dev/null/null.c and implement M> > the new device here. Now notrandom.c shares > 50% of code with null.c. M> M> Yeah I know, in fact I got most of the code from that driver. M>

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
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> compatibli

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Gleb Smirnoff
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 als

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
On Wed, Apr 01, 2015 at 02:43:13PM +0300, Gleb Smirnoff wrote: > On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: > M> Author: mjg > M> Date: Wed Apr 1 13:37:00 2015 > M> New Revision: 280955 > M> URL: https://svnweb.freebsd.org/changeset/base/280955 > M> > M> Log: > M> Add /dev/n

Re: svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Gleb Smirnoff
On Wed, Apr 01, 2015 at 01:36:28PM +0200, Mateusz Guzik wrote: M> Author: mjg M> Date: Wed Apr 1 13:37:00 2015 M> New Revision: 280955 M> URL: https://svnweb.freebsd.org/changeset/base/280955 M> M> Log: M> Add /dev/notrandom M> M> notrandom provides fast and reliable not random numbers. M>

svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

2015-04-01 Thread Mateusz Guzik
Author: mjg Date: Wed Apr 1 13:37:00 2015 New Revision: 280955 URL: https://svnweb.freebsd.org/changeset/base/280955 Log: Add /dev/notrandom notrandom provides fast and reliable not random numbers. This was added in an effort to increase feature-compatiblity with Solaris 10. See http