Re: svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-14 Thread Craig Rodrigues
On Mon, Jul 13, 2015 at 4:44 AM, Mark R V Murray  wrote:

>
> A fix is in - r285439.
>
> Apologies again.
>

Looks good: https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests/1181/
Thanks.

--
Craig
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-13 Thread Michael Schmiedgen


>- Remove all mention of RANDOM_FORTUNA. If the system owner wants 
YARROW or DUMMY, they ask for it, otherwise they get FORTUNA.


...

> # Random number generator
> # Only ONE of the below two may be used; they are mutually exclusive.
>+# If neither is present, then the Fortuna algorithm is used.
> optionsRANDOM_YARROW   # Yarrow CSPRNG (Default)
>-#options   RANDOM_FORTUNA  # Fortuna CSPRNG
> optionsRANDOM_DEBUG# Debugging messages

I do not see two generators listed, as stated in the comment. Should
the comment be updated, or another option RANDOM_DUMMY added?

Michael
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-13 Thread Mark R V Murray

> On 13 Jul 2015, at 08:40, Mark R V Murray  wrote:
> 
>> I started getting kernel panics on boot after this commit.
>> Can you look at this:
>> 
>> https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests/1177/console 
>> I'm onto it 
>> now. Thanks and apologies.

A fix is in - r285439.

Apologies again.

M
-- 
Mark R V Murray

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-13 Thread Mark R V Murray
Hi,

> On 13 Jul 2015, at 01:52, Craig Rodrigues  wrote:
> On Jul 12, 2015 2:14 PM, "Mark Murray"  > wrote:
> >
> > Author: markm
> > Date: Sun Jul 12 18:14:38 2015
> > New Revision: 285422
> > URL: https://svnweb.freebsd.org/changeset/base/285422 
> > 
> >
> > Log:
> >   * Address review (and add a bit myself).
> >- Tweek man page.
> >- Remove all mention of RANDOM_FORTUNA. If the system owner wants YARROW 
> > or DUMMY, they ask for it, otherwise they get FORTUNA.
> 
> I started getting kernel panics on boot after this commit.
> Can you look at this:
> 
> https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests/1177/console 
> I'm onto it 
> now. Thanks and apologies.

M
-- 
Mark R V Murray

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-12 Thread Craig Rodrigues
On Jul 12, 2015 2:14 PM, "Mark Murray"  wrote:
>
> Author: markm
> Date: Sun Jul 12 18:14:38 2015
> New Revision: 285422
> URL: https://svnweb.freebsd.org/changeset/base/285422
>
> Log:
>   * Address review (and add a bit myself).
>- Tweek man page.
>- Remove all mention of RANDOM_FORTUNA. If the system owner wants
YARROW or DUMMY, they ask for it, otherwise they get FORTUNA.

I started getting kernel panics on boot after this commit.
Can you look at this:

https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests/1177/console

Thanks.
--
Craig
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r285422 - in head: share/man/man4 sys/conf sys/dev/random sys/net sys/netgraph

2015-07-12 Thread Mark Murray
Author: markm
Date: Sun Jul 12 18:14:38 2015
New Revision: 285422
URL: https://svnweb.freebsd.org/changeset/base/285422

Log:
  * Address review (and add a bit myself).
   - Tweek man page.
   - Remove all mention of RANDOM_FORTUNA. If the system owner wants YARROW or 
DUMMY, they ask for it, otherwise they get FORTUNA.
   - Tidy up headers a bit.
   - Tidy up declarations a bit.
   - Make static in a couple of places where needed.
   - Move Yarrow/Fortuna SYSINIT/SYSUNINIT to randomdev.c, moving us towards a 
single file where the algorithm context is used.
   - Get rid of random_*_process_buffer() functions. They were only used in one 
place each, and are better subsumed into those places.
   - Remove *_post_read() functions as they are stubs everywhere.
   - Assert against buffer size illegalities.
   - Clean up some silly code in the randomdev_read() routine.
   - Make the harvesting more consistent.
   - Make some requested argument name changes.
   - Tidy up and clarify a few comments.
   - Make some requested comment changes.
   - Make some requested macro changes.
  
  * NOTE: the thing calling itself a 'unit test' is not yet a proper
unit test, but it helps me ensure things work. It may be a proper
unit test at some time in the future, but for now please don't make
any assumptions or hold any expectations.
  
  Differential Revision:https://reviews.freebsd.org/D2025
  Approved by:  so (/dev/random blanket)

Modified:
  head/share/man/man4/random.4
  head/sys/conf/NOTES
  head/sys/dev/random/build.sh
  head/sys/dev/random/fortuna.c
  head/sys/dev/random/hash.h
  head/sys/dev/random/random_harvestq.c
  head/sys/dev/random/randomdev.c
  head/sys/dev/random/randomdev.h
  head/sys/dev/random/unit_test.c
  head/sys/dev/random/unit_test.h
  head/sys/dev/random/yarrow.c
  head/sys/net/if_tun.c
  head/sys/netgraph/ng_iface.c

Modified: head/share/man/man4/random.4
==
--- head/share/man/man4/random.4Sun Jul 12 17:28:31 2015
(r285421)
+++ head/share/man/man4/random.4Sun Jul 12 18:14:38 2015
(r285422)
@@ -62,7 +62,7 @@ This sysctl will not return
 random bytes unless
 the
 .Xr random 4
-is seeded.
+device is seeded.
 .Pp
 This initial seeding
 of random number generators

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Sun Jul 12 17:28:31 2015(r285421)
+++ head/sys/conf/NOTES Sun Jul 12 18:14:38 2015(r285422)
@@ -2978,8 +2978,8 @@ options   MAXFILES=999
 
 # Random number generator
 # Only ONE of the below two may be used; they are mutually exclusive.
+# If neither is present, then the Fortuna algorithm is used.
 optionsRANDOM_YARROW   # Yarrow CSPRNG (Default)
-#options   RANDOM_FORTUNA  # Fortuna CSPRNG
 optionsRANDOM_DEBUG# Debugging messages
 
 # Module to enable execution of application via emulators like QEMU

Modified: head/sys/dev/random/build.sh
==
--- head/sys/dev/random/build.shSun Jul 12 17:28:31 2015
(r285421)
+++ head/sys/dev/random/build.shSun Jul 12 18:14:38 2015
(r285422)
@@ -28,7 +28,14 @@
 #
 # Basic script to build crude unit tests.
 #
-cc -g -O0 -pthread -DRANDOM_DEBUG -DRANDOM_YARROW \
+# Diff-reduction checking between Yarrow and fortuna is done like so:
+#
+# $ diff -u -B <(sed -e 's/yarrow/wombat/g' \
+#-e 's/YARROW/WOMBAT/g' yarrow.c) \
+#  <(sed -e 's/fortuna/wombat/g' \
+#-e 's/FORTUNA/WOMBAT/g' fortuna.c) | less
+#
+cc -g -O0 -pthread -DRANDOM_DEBUG \
-I../.. -lstdthreads -Wall \
unit_test.c \
yarrow.c \
@@ -39,7 +46,7 @@ cc -g -O0 -pthread -DRANDOM_DEBUG -DRAND
../../crypto/sha2/sha256c.c \
-lz \
-o yunit_test
-cc -g -O0 -pthread -DRANDOM_DEBUG -DRANDOM_FORTUNA \
+cc -g -O0 -pthread -DRANDOM_DEBUG \
-I../.. -lstdthreads -Wall \
unit_test.c \
fortuna.c \

Modified: head/sys/dev/random/fortuna.c
==
--- head/sys/dev/random/fortuna.c   Sun Jul 12 17:28:31 2015
(r285421)
+++ head/sys/dev/random/fortuna.c   Sun Jul 12 18:14:38 2015
(r285422)
@@ -39,10 +39,8 @@ __FBSDID("$FreeBSD$");
 #ifdef _KERNEL
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -71,6 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #endif /* _KERNEL */
@@ -125,26 +124,28 @@ static uint8_t zero_region[RANDOM_ZERO_B
 
 static void random_fortuna_pre_read(void);
 static void random_fortuna_read(uint8_t *, u_int);
-static void random_fortuna_post_read(void);
 static void random_fortuna_write(uint8_t *, u_int);
 static void random_fortuna_reseed(void);
 st