[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixed Entropy Patch
From: |
Neal H. Walfield |
Subject: |
Re: Fixed Entropy Patch |
Date: |
Sun, 05 Aug 2007 12:50:28 +0200 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Sun, 5 Aug 2007 01:41:54 -0400 (EDT),
Michael Casadevall wrote:
> Index: device/cons.c
> ===================================================================
> RCS file: /sources/hurd/gnumach/device/Attic/cons.c,v
> retrieving revision 1.2.4.6
> diff -u -r1.2.4.6 cons.c
> - --- device/cons.c 13 Nov 2006 21:30:36 -0000 1.2.4.6
> +++ device/cons.c 5 Aug 2007 09:39:09 -0000
> @@ -44,6 +44,10 @@
> #include <device/kmsg.h>
> #endif
>
> +#ifdef MACH_ENTROPY
> +#include <device/entropy.h>
> +#endif
> +
> static int cn_inited = 0;
> static struct consdev *cn_tab = 0; /* physical console device info
> */
> #ifndef MACH_KERNEL
> @@ -230,8 +234,16 @@
> cngetc()
> {
> if (cn_tab)
> - - return ((*cn_tab->cn_getc)(cn_tab->cn_dev, 1));
> +#if defined(MACH_KERNEL) && defined(MACH_ENTROPY)
> + entropy_putchar (cn_tab->cn_dev);
> +#endif /* MACH_ENTROPY and MACH_ENTROPY */
> + return ((*cn_tab->cn_getc)(cn_tab->cn_dev, 1));
Since cn_tab is NULL, won't this cause a GPF?
> Index: linux/dev/include/linux/blk.h
> ===================================================================
> RCS file: /sources/hurd/gnumach/linux/dev/include/linux/Attic/blk.h,v
> retrieving revision 1.2
> diff -u -r1.2 blk.h
> - --- linux/dev/include/linux/blk.h 5 Apr 2001 06:39:21 -0000 1.2
> +++ linux/dev/include/linux/blk.h 5 Aug 2007 09:39:12 -0000
> @@ -90,7 +90,7 @@
> #endif /* CONFIG_BLK_DEV_MD */
>
> extern void set_device_ro(kdev_t dev,int flag);
> - -void add_blkdev_randomness(int major);
> +extern void add_blkdev_randomness(int major);
>
> extern int floppy_init(void);
> extern void rd_load(void);
> @@ -136,7 +136,11 @@
> #define DEVICE_NR(device) (MINOR(device))
> #define DEVICE_ON(device)
> #define DEVICE_OFF(device)
> +
> +/* HACK */
Hacks should be marked with XXX or FIXME and should be accompanied by
a comment explaining why the following code is a hack.
I think you forgot to include entropy.h and entropy.c.
Neal
- Fixed Entropy Patch, Michael Casadevall, 2007/08/05
- Re: Fixed Entropy Patch,
Neal H. Walfield <=