From 8b3ec75a9165ba9cc6124fe3ef6c6776da209fb3 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 25 Jan 2006 19:56:31 +0000 Subject: [PATCH] The random number generator was not generating sufficient entropy by default, resulting in weak random numbers for a short period of time after a machine is first booted. * Change the entropy default for all interrupts except the clock interrupt from off to on. * Greatly reduce the overhead of the interrupt entropy code so even high performance interrupts can call it. * Instead of calculating the entropy at the time of the interrupt, introduce a new rate-limited kernel thread which the interrupt code can simply schedule. The new thread will be responsible for adding the entropy. This thread will rate-limit based on the amount of entropy that has been built up. The more entropy we have, the lower the thread's frequency of operation. Currently the limit is set to 25 hz. * Use the TSC in addition to the normal time calculation when introducing entropy. Note that during tests it was found that a new ssh connection tends to 'eat' all available entropy. This isn't actually true, it's really the entropy calculation itself which is not quite correct, but I am duely noting the issue here. Reported-by: "Simon 'corecode' Schubert" --- sys/dev/disk/mpt/mpt_freebsd.h | 6 +- sys/dev/raid/aac/aac_pci.c | 4 +- sys/dev/raid/amr/amr_pci.c | 4 +- sys/dev/raid/mlx/mlx.c | 4 +- sys/dev/raid/twe/twe_freebsd.c | 4 +- sys/i386/include/clock.h | 3 +- sys/i386/isa/clock.c | 16 ++++-- sys/kern/kern_intr.c | 16 ++++-- sys/kern/kern_random.c | 95 +++++++++++++++++++++++++++---- sys/platform/pc32/include/clock.h | 3 +- sys/platform/pc32/isa/clock.c | 16 ++++-- sys/sys/bus.h | 4 +- sys/sys/kernel.h | 3 +- 13 files changed, 135 insertions(+), 43 deletions(-) diff --git a/sys/dev/disk/mpt/mpt_freebsd.h b/sys/dev/disk/mpt/mpt_freebsd.h index 4ae2f3ddf5..f21cdf25ea 100644 --- a/sys/dev/disk/mpt/mpt_freebsd.h +++ b/sys/dev/disk/mpt/mpt_freebsd.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/mpt/mpt_freebsd.h,v 1.3.2.3 2002/09/24 21:37:25 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/mpt/mpt_freebsd.h,v 1.8 2005/10/12 17:35:50 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/mpt/mpt_freebsd.h,v 1.9 2006/01/25 19:56:25 dillon Exp $ */ /* * LSI MPT Host Adapter FreeBSD Wrapper Definitions (CAM version) * @@ -90,7 +90,7 @@ #define MPT_LOCK_DESTROY(mpt) #else #if LOCKING_WORKED_AS_IT_SHOULD -#define MPT_IFLAGS INTR_ENTROPY | INTR_MPSAFE +#define MPT_IFLAGS INTR_MPSAFE #define MPT_LOCK_SETUP(mpt) \ mtx_init(&mpt->mpt_lock, "mpt", NULL, MTX_DEF); \ mpt->mpt_locksetup = 1 @@ -103,7 +103,7 @@ #define MPT_LOCK(mpt) mtx_lock(&(mpt)->mpt_lock) #define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) #else -#define MPT_IFLAGS INTR_ENTROPY +#define MPT_IFLAGS 0 #define MPT_LOCK_SETUP(mpt) do { } while (0) #define MPT_LOCK_DESTROY(mpt) do { } while (0) #define MPT_LOCK(mpt) do { } while (0) diff --git a/sys/dev/raid/aac/aac_pci.c b/sys/dev/raid/aac/aac_pci.c index 7fc1274894..2e86723b8c 100644 --- a/sys/dev/raid/aac/aac_pci.c +++ b/sys/dev/raid/aac/aac_pci.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac_pci.c,v 1.3.2.19 2003/11/01 18:44:51 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac_pci.c,v 1.7 2005/10/12 17:35:54 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac_pci.c,v 1.8 2006/01/25 19:56:26 dillon Exp $ */ /* @@ -219,7 +219,7 @@ aac_pci_attach(device_t dev) device_printf(sc->aac_dev, "can't allocate interrupt\n"); goto out; } - if (bus_setup_intr(sc->aac_dev, sc->aac_irq, INTR_ENTROPY, + if (bus_setup_intr(sc->aac_dev, sc->aac_irq, 0, aac_intr, sc, &sc->aac_intr, NULL)) { device_printf(sc->aac_dev, "can't set up interrupt\n"); goto out; diff --git a/sys/dev/raid/amr/amr_pci.c b/sys/dev/raid/amr/amr_pci.c index 5d78d48276..58d3433c5d 100644 --- a/sys/dev/raid/amr/amr_pci.c +++ b/sys/dev/raid/amr/amr_pci.c @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amr_pci.c,v 1.1.2.9 2002/12/20 15:12:04 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amr_pci.c,v 1.6 2005/10/12 17:35:54 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amr_pci.c,v 1.7 2006/01/25 19:56:28 dillon Exp $ */ #include @@ -231,7 +231,7 @@ amr_pci_attach(device_t dev) goto out; } error = bus_setup_intr(sc->amr_dev, sc->amr_irq, - INTR_ENTROPY, amr_pci_intr, sc, + 0, amr_pci_intr, sc, &sc->amr_intr, NULL); if (error) { device_printf(sc->amr_dev, "can't set up interrupt\n"); diff --git a/sys/dev/raid/mlx/mlx.c b/sys/dev/raid/mlx/mlx.c index f3b8116e13..6ac48f47c2 100644 --- a/sys/dev/raid/mlx/mlx.c +++ b/sys/dev/raid/mlx/mlx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlx.c,v 1.14.2.5 2001/09/11 09:49:53 kris Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.14 2005/10/12 17:35:54 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.15 2006/01/25 19:56:29 dillon Exp $ */ /* @@ -370,7 +370,7 @@ mlx_attach(struct mlx_softc *sc) return(ENXIO); } error = bus_setup_intr(sc->mlx_dev, sc->mlx_irq, - INTR_ENTROPY, mlx_intr, sc, + 0, mlx_intr, sc, &sc->mlx_intr, NULL); if (error) { device_printf(sc->mlx_dev, "can't set up interrupt\n"); diff --git a/sys/dev/raid/twe/twe_freebsd.c b/sys/dev/raid/twe/twe_freebsd.c index e231978842..a3ccc43010 100644 --- a/sys/dev/raid/twe/twe_freebsd.c +++ b/sys/dev/raid/twe/twe_freebsd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twe_freebsd.c,v 1.2.2.9 2004/06/11 18:57:31 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.17 2005/10/12 17:35:55 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.18 2006/01/25 19:56:31 dillon Exp $ */ /* @@ -268,7 +268,7 @@ twe_attach(device_t dev) twe_free(sc); return(ENXIO); } - if (bus_setup_intr(sc->twe_dev, sc->twe_irq, INTR_ENTROPY, + if (bus_setup_intr(sc->twe_dev, sc->twe_irq, 0, twe_pci_intr, sc, &sc->twe_intr, NULL)) { twe_printf(sc, "can't set up interrupt\n"); twe_free(sc); diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 4629f21370..2651734540 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -4,7 +4,7 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.6 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/i386/include/Attic/clock.h,v 1.7 2006/01/25 19:56:18 dillon Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -20,6 +20,7 @@ extern int disable_rtc_set; extern int statclock_disable; extern u_int timer_freq; extern int timer0_max_count; +extern int tsc_present; extern u_int tsc_freq; extern int tsc_is_broken; extern int wall_cmos_clock; diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index f82b9dea7e..b93ac9e0bb 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.45 2005/12/24 20:34:04 swildner Exp $ + * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.46 2006/01/25 19:56:19 dillon Exp $ */ /* @@ -114,6 +114,7 @@ static uint16_t i8254_walltimer_cntr; int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ int statclock_disable = 1; /* we don't use the statclock right now */ +int tsc_present; u_int tsc_freq; /* XXX obsolete, convert users */ int64_t tsc_frequency; int tsc_is_broken; @@ -128,7 +129,6 @@ static int beeping = 0; static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR | RTCSB_PINTR; -static u_int tsc_present; static int rtc_loaded; static int i8254_cputimer_div; @@ -997,14 +997,16 @@ cpu_initclocks(void) clkdesc = register_int(apic_8254_intr, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(apic_8254_intr); #else /* APIC_IO */ register_int(0, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(ICU_IRQ0); #endif /* APIC_IO */ @@ -1024,7 +1026,8 @@ cpu_initclocks(void) #endif /* APIC_IO */ register_int(8, (inthand2_t *)rtcintr, NULL, "rtc", NULL, - INTR_EXCL | INTR_FAST | INTR_NOPOLL); + INTR_EXCL | INTR_FAST | INTR_NOPOLL | + INTR_NOENTROPY); machintr_intren(8); writertc(RTC_STATUSB, rtc_statusb); @@ -1077,7 +1080,8 @@ cpu_initclocks(void) register_int(apic_8254_intr, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(apic_8254_intr); } diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 06769eb502..eff6398866 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_intr.c,v 1.24.2.1 2001/10/14 20:05:50 luigi Exp $ - * $DragonFly: src/sys/kern/kern_intr.c,v 1.40 2005/12/27 21:32:11 dillon Exp $ + * $DragonFly: src/sys/kern/kern_intr.c,v 1.41 2006/01/25 19:56:21 dillon Exp $ * */ @@ -244,6 +244,14 @@ register_int(int intr, inthand2_t *handler, void *arg, const char *name, else ++info->i_slow; + /* + * Enable random number generation keying off of this interrupt. + */ + if ((intr_flags & INTR_NOENTROPY) == 0 && info->i_random.sc_enabled == 0) { + info->i_random.sc_enabled = 1; + info->i_random.sc_intr = intr; + } + /* * Add the record to the interrupt list. */ @@ -424,7 +432,7 @@ unregister_randintr(int intr) if (intr < 0 || intr >= MAX_INTS) panic("register_swi: bad intr %d", intr); info = &intr_info_ary[intr]; - info->i_random.sc_enabled = 0; + info->i_random.sc_enabled = -1; } int @@ -436,7 +444,7 @@ next_registered_randintr(int intr) panic("register_swi: bad intr %d", intr); while (intr < MAX_INTS) { info = &intr_info_ary[intr]; - if (info->i_random.sc_enabled) + if (info->i_random.sc_enabled > 0) break; ++intr; } @@ -764,7 +772,7 @@ ithread_handler(void *arg) * This is our interrupt hook to add rate randomness to the random * number generator. */ - if (info->i_random.sc_enabled) + if (info->i_random.sc_enabled > 0) add_interrupt_randomness(intr); /* diff --git a/sys/kern/kern_random.c b/sys/kern/kern_random.c index 6d3e049e3f..5286c029c6 100644 --- a/sys/kern/kern_random.c +++ b/sys/kern/kern_random.c @@ -2,7 +2,7 @@ * kern_random.c -- A strong random number generator * * $FreeBSD: src/sys/kern/kern_random.c,v 1.36.2.4 2002/09/17 17:11:57 sam Exp $ - * $DragonFly: src/sys/kern/Attic/kern_random.c,v 1.10 2005/11/02 08:33:30 dillon Exp $ + * $DragonFly: src/sys/kern/Attic/kern_random.c,v 1.11 2006/01/25 19:56:21 dillon Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -49,6 +49,7 @@ #include #include #include +#include #ifdef __i386__ #include @@ -107,7 +108,15 @@ static struct timer_rand_state irq_timer_state[MAX_INTS]; static struct timer_rand_state blkdev_timer_state[MAX_BLKDEV]; #endif static struct wait_queue *random_wait; +static thread_t rand_td; +static int rand_td_slot; +static void add_timer_randomness(struct random_bucket *r, + struct timer_rand_state *state, u_int num); + +/* + * Called from early boot + */ void rand_initialize(void) { @@ -119,6 +128,52 @@ rand_initialize(void) random_state.rsel.si_pid = 0; } +/* + * Random number generator helper thread. + * + * Note that rand_td_slot is initially 0, which means nothing will try + * to schedule our thread until we reset it to -1. This also prevents + * any attempt to schedule the thread before it has been initialized. + */ +static +void +rand_thread_loop(void *dummy) +{ + int slot; + int count; + + for (;;) { + if ((slot = rand_td_slot) >= 0) { + add_timer_randomness(&random_state, + &irq_timer_state[slot], slot); + } + + /* + * The fewer bits we have, the shorter we sleep, up to a + * point. We use an interrupt to trigger the thread once + * we have slept the calculated amount of time. + */ + count = random_state.entropy_count * hz / POOLBITS; + if (count < hz / 25) + count = hz / 25; + if (count > hz) + count = hz; + tsleep(rand_td, 0, "rwait", count); + lwkt_deschedule_self(rand_td); + rand_td_slot = -1; + lwkt_switch(); + } +} + +static +void +rand_thread_init(void) +{ + lwkt_create(rand_thread_loop, NULL, &rand_td, NULL, 0, 0, "random"); +} + +SYSINIT(rand, SI_SUB_HELPER_THREADS, SI_ORDER_ANY, rand_thread_init, 0); + /* * This function adds an int into the entropy "pool". It does not * update the entropy estimate. The caller must do this if appropriate. @@ -180,9 +235,15 @@ add_timer_randomness(struct random_bucket *r, struct timer_rand_state *state, int delta, delta2; u_int nbits; u_int32_t time; + int count; num ^= sys_cputimer->count() << 16; - r->entropy_count += 2; + if (tsc_present) + num ^= ~(u_int)rdtsc(); + count = r->entropy_count + 2; + if (count > POOLBITS) + count = POOLBITS; + r->entropy_count = count; time = ticks; @@ -206,14 +267,17 @@ add_timer_randomness(struct random_bucket *r, struct timer_rand_state *state, for (nbits = 0; delta; nbits++) delta >>= 1; - r->entropy_count += nbits; - /* Prevent overflow */ - if (r->entropy_count > POOLBITS) - r->entropy_count = POOLBITS; + count = r->entropy_count + nbits; + if (count > POOLBITS) + count = POOLBITS; + cpu_sfence(); + r->entropy_count = count; - if (r->entropy_count >= 8) + if (count >= 8 && try_mplock()) { selwakeup(&random_state.rsel); + rel_mplock(); + } } void @@ -222,10 +286,16 @@ add_keyboard_randomness(u_char scancode) add_timer_randomness(&random_state, &keyboard_timer_state, scancode); } +/* + * This routine is called from an interrupt and must be very efficient. + */ void add_interrupt_randomness(int intr) { - add_timer_randomness(&random_state, &irq_timer_state[intr], intr); + if (rand_td_slot < 0) { + rand_td_slot = intr; + lwkt_schedule(rand_td); + } } #ifdef notused @@ -354,10 +424,13 @@ write_random(const char *buf, u_int nbytes) void add_true_randomness(int val) { + int count; + add_entropy_word(&random_state, val); - random_state.entropy_count += 8*sizeof (val); - if (random_state.entropy_count > POOLBITS) - random_state.entropy_count = POOLBITS; + count = random_state.entropy_count + 8 *sizeof(val); + if (count > POOLBITS) + count = POOLBITS; + random_state.entropy_count = count; selwakeup(&random_state.rsel); } diff --git a/sys/platform/pc32/include/clock.h b/sys/platform/pc32/include/clock.h index adff0ca417..e639979da9 100644 --- a/sys/platform/pc32/include/clock.h +++ b/sys/platform/pc32/include/clock.h @@ -4,7 +4,7 @@ * This file is in the public domain. * * $FreeBSD: src/sys/i386/include/clock.h,v 1.38.2.1 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.6 2005/06/12 20:55:14 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/include/clock.h,v 1.7 2006/01/25 19:56:18 dillon Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -20,6 +20,7 @@ extern int disable_rtc_set; extern int statclock_disable; extern u_int timer_freq; extern int timer0_max_count; +extern int tsc_present; extern u_int tsc_freq; extern int tsc_is_broken; extern int wall_cmos_clock; diff --git a/sys/platform/pc32/isa/clock.c b/sys/platform/pc32/isa/clock.c index 48e63d10ea..2a6d1ab1e1 100644 --- a/sys/platform/pc32/isa/clock.c +++ b/sys/platform/pc32/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.45 2005/12/24 20:34:04 swildner Exp $ + * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.46 2006/01/25 19:56:19 dillon Exp $ */ /* @@ -114,6 +114,7 @@ static uint16_t i8254_walltimer_cntr; int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ int statclock_disable = 1; /* we don't use the statclock right now */ +int tsc_present; u_int tsc_freq; /* XXX obsolete, convert users */ int64_t tsc_frequency; int tsc_is_broken; @@ -128,7 +129,6 @@ static int beeping = 0; static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR | RTCSB_PINTR; -static u_int tsc_present; static int rtc_loaded; static int i8254_cputimer_div; @@ -997,14 +997,16 @@ cpu_initclocks(void) clkdesc = register_int(apic_8254_intr, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(apic_8254_intr); #else /* APIC_IO */ register_int(0, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(ICU_IRQ0); #endif /* APIC_IO */ @@ -1024,7 +1026,8 @@ cpu_initclocks(void) #endif /* APIC_IO */ register_int(8, (inthand2_t *)rtcintr, NULL, "rtc", NULL, - INTR_EXCL | INTR_FAST | INTR_NOPOLL); + INTR_EXCL | INTR_FAST | INTR_NOPOLL | + INTR_NOENTROPY); machintr_intren(8); writertc(RTC_STATUSB, rtc_statusb); @@ -1077,7 +1080,8 @@ cpu_initclocks(void) register_int(apic_8254_intr, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_FAST | - INTR_NOPOLL | INTR_MPSAFE); + INTR_NOPOLL | INTR_MPSAFE | + INTR_NOENTROPY); machintr_intren(apic_8254_intr); } diff --git a/sys/sys/bus.h b/sys/sys/bus.h index fb35c5a34e..30b2dad3ce 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/bus.h,v 1.30.2.5 2004/03/17 17:54:25 njl Exp $ - * $DragonFly: src/sys/sys/bus.h,v 1.20 2006/01/11 02:38:02 corecode Exp $ + * $DragonFly: src/sys/sys/bus.h,v 1.21 2006/01/25 19:56:23 dillon Exp $ */ #ifndef _SYS_BUS_H_ @@ -55,7 +55,7 @@ typedef void driver_intr_t(void*); #define INTR_FAST 0x0080 #define INTR_EXCL 0x0100 #define INTR_MPSAFE 0x0200 -#define INTR_ENTROPY 0x0400 +#define INTR_NOENTROPY 0x0400 #define INTR_NOPOLL 0x0800 /* interrupt cannot be polled (e.g. ata) */ #define INTR_NETSAFE INTR_MPSAFE diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 2526705c67..d31dff3e72 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -40,7 +40,7 @@ * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/kernel.h,v 1.63.2.9 2002/07/02 23:00:30 archie Exp $ - * $DragonFly: src/sys/sys/kernel.h,v 1.18 2005/11/14 18:50:11 dillon Exp $ + * $DragonFly: src/sys/sys/kernel.h,v 1.19 2006/01/25 19:56:23 dillon Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -121,6 +121,7 @@ enum sysinit_sub_id { SI_SUB_VFS = 0x4000000, /* virtual file system*/ SI_SUB_CLOCKS = 0x4800000, /* real time and stat clocks*/ SI_SUB_FINISH_SMP = 0x5000000, /* finish setting up cpus */ + SI_SUB_HELPER_THREADS = 0x5400000, /* misc helper threads */ SI_SUB_CLIST = 0x5800000, /* clists*/ SI_SUB_SYSV_SHM = 0x6400000, /* System V shared memory*/ SI_SUB_SYSV_SEM = 0x6800000, /* System V semaphores*/ -- 2.41.0