Date: Sat, 7 Sep 2013 19:56:51 +0100 From: Mark R V Murray <mark@grondar.org> To: sbruno@freebsd.org Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: random(4) update causes mips compile fail | mips boot fail Message-ID: <D8D37885-C474-44C9-9ED2-E35D31CD87F8@grondar.org> In-Reply-To: <1378579756.1588.17.camel@localhost> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <sean_bruno@yahoo.com> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D8D37885-C474-44C9-9ED2-E35D31CD87F8>
