From owner-freebsd-current@FreeBSD.ORG Sat Sep 7 18:56:55 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 48AE9D6C; Sat, 7 Sep 2013 18:56:55 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08D722EEF; Sat, 7 Sep 2013 18:56:55 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VINgi-000DiS-5O; Sat, 07 Sep 2013 19:56:53 +0100 Subject: Re: random(4) update causes mips compile fail | mips boot fail Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_053A3495-BC7E-4B15-90DF-0CFB85825BE9"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <1378579756.1588.17.camel@localhost> Date: Sat, 7 Sep 2013 19:56:51 +0100 Message-Id: References: <1378572186.1588.5.camel@localhost> <24DB010A-F374-491B-9203-FDDD7EA14A51@grondar.org> <1378579011.1588.16.camel@localhost> <9240BEF1-2791-4D58-A422-08AEF1CD306C@grondar.org> <1378579756.1588.17.camel@localhost> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1508) X-SA-Score: -2.2 X-Mailman-Approved-At: Sat, 07 Sep 2013 20:14:13 +0000 Cc: "freebsd-current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:56:55 -0000 --Apple-Mail=_053A3495-BC7E-4B15-90DF-0CFB85825BE9 Content-Type: multipart/mixed; boundary="Apple-Mail=_FF2D9108-EAEC-4415-9AA6-B6FED16783D6" --Apple-Mail=_FF2D9108-EAEC-4415-9AA6-B6FED16783D6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 7 Sep 2013, at 19:49, Sean Bruno wrote: > On Sat, 2013-09-07 at 19:40 +0100, Mark R V Murray wrote: >>> Looks like it does indeed work if that is set to 1. =20 >>>=20 >>> This "DIR-825" config, should be loading random as a module, not >> built >>> into the kernel due to size limitations of the kernel on this board. >>=20 >> Hmm. I'll set it back to 1, but this is technically a security issue. >>=20 >> Thanks for the report back, and sorry for the hassles! >>=20 >> M >> --=20 >> Mark R V Murray=20 >=20 > Ok. Right now, the mips kernel doesn't build unless I have random = built > in, we were using it as a module previously. =20 I'm testing a fix, but if you want to help out, please move the = random_null_func() from randomdev.c to pseudo_rng.c in sys/dev/random. Patch enclosed. Thanks! M --=20 Mark R V Murray --Apple-Mail=_FF2D9108-EAEC-4415-9AA6-B6FED16783D6 Content-Disposition: attachment; filename=rng_fix.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="rng_fix.patch" Content-Transfer-Encoding: 7bit Index: pseudo_rng.c =================================================================== --- pseudo_rng.c (revision 255362) +++ pseudo_rng.c (working copy) @@ -39,6 +39,12 @@ static struct mtx pseudo_random_block_mtx; +/* Used to fake out unused random calls in random_adaptor */ +void +random_null_func(void) +{ +} + static int pseudo_random_block_read(void *buf __unused, int c __unused) { Index: randomdev.c =================================================================== --- randomdev.c (revision 255362) +++ randomdev.c (working copy) @@ -80,12 +80,6 @@ /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *random_dev; -/* Used to fake out unused random calls in random_adaptor */ -void -random_null_func(void) -{ -} - struct random_adaptor * random_get_active_adaptor(void) { --Apple-Mail=_FF2D9108-EAEC-4415-9AA6-B6FED16783D6 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_FF2D9108-EAEC-4415-9AA6-B6FED16783D6-- --Apple-Mail=_053A3495-BC7E-4B15-90DF-0CFB85825BE9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUit28958vKOKE6LNAQoCVgQAtHSwtqUlBuER7aAu1Rrqhw0oqwIkXMxV grTuI5YiEWExx89Hzf2Lf96FuAjuF/wa8uu05M2Gjqm6sZDIEjpOogZpGRQXKBjV s2hDLbo3ZmWWgnz3Jeujb8P7T6dK4JQCUjqWjem4kAlFiceGmzeBplRQ/aacSfXP /4tg8FRucWo= =66in -----END PGP SIGNATURE----- --Apple-Mail=_053A3495-BC7E-4B15-90DF-0CFB85825BE9--