fortuna.c (767991d2bed376736535f8f788007a9c3766fcaf) | fortuna.c (4312ebfe0bbf314a0d5d1b6d14d003673255dd0d) |
---|---|
1/*- 2 * Copyright (c) 2017 W. Dean Freeman 3 * Copyright (c) 2013-2015 Mark R V Murray 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 285 unchanged lines hidden (view full) --- 294 * Fortuna parameters. Do not adjust these unless you have 295 * have a very good clue about what they do! 296 */ 297 fortuna_state.fs_minpoolsize = RANDOM_FORTUNA_DEFPOOLSIZE; 298#ifdef _KERNEL 299 fortuna_state.fs_lasttime = 0; 300 random_fortuna_o = SYSCTL_ADD_NODE(&random_clist, 301 SYSCTL_STATIC_CHILDREN(_kern_random), | 1/*- 2 * Copyright (c) 2017 W. Dean Freeman 3 * Copyright (c) 2013-2015 Mark R V Murray 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 285 unchanged lines hidden (view full) --- 294 * Fortuna parameters. Do not adjust these unless you have 295 * have a very good clue about what they do! 296 */ 297 fortuna_state.fs_minpoolsize = RANDOM_FORTUNA_DEFPOOLSIZE; 298#ifdef _KERNEL 299 fortuna_state.fs_lasttime = 0; 300 random_fortuna_o = SYSCTL_ADD_NODE(&random_clist, 301 SYSCTL_STATIC_CHILDREN(_kern_random), |
302 OID_AUTO, "fortuna", CTLFLAG_RW, 0, | 302 OID_AUTO, "fortuna", CTLFLAG_RW | CTLFLAG_MPSAFE, 0, |
303 "Fortuna Parameters"); 304 SYSCTL_ADD_PROC(&random_clist, | 303 "Fortuna Parameters"); 304 SYSCTL_ADD_PROC(&random_clist, |
305 SYSCTL_CHILDREN(random_fortuna_o), OID_AUTO, 306 "minpoolsize", CTLTYPE_UINT | CTLFLAG_RWTUN, 307 &fortuna_state.fs_minpoolsize, RANDOM_FORTUNA_DEFPOOLSIZE, 308 random_check_uint_fs_minpoolsize, "IU", 309 "Minimum pool size necessary to cause a reseed"); | 305 SYSCTL_CHILDREN(random_fortuna_o), OID_AUTO, "minpoolsize", 306 CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, 307 &fortuna_state.fs_minpoolsize, RANDOM_FORTUNA_DEFPOOLSIZE, 308 random_check_uint_fs_minpoolsize, "IU", 309 "Minimum pool size necessary to cause a reseed"); |
310 KASSERT(fortuna_state.fs_minpoolsize > 0, ("random: Fortuna threshold must be > 0 at startup")); 311 312 SYSCTL_ADD_BOOL(&random_clist, SYSCTL_CHILDREN(random_fortuna_o), 313 OID_AUTO, "concurrent_read", CTLFLAG_RDTUN, 314 &fortuna_concurrent_read, 0, "If non-zero, enable " 315 "feature to improve concurrent Fortuna performance."); 316#endif 317 --- 503 unchanged lines hidden --- | 310 KASSERT(fortuna_state.fs_minpoolsize > 0, ("random: Fortuna threshold must be > 0 at startup")); 311 312 SYSCTL_ADD_BOOL(&random_clist, SYSCTL_CHILDREN(random_fortuna_o), 313 OID_AUTO, "concurrent_read", CTLFLAG_RDTUN, 314 &fortuna_concurrent_read, 0, "If non-zero, enable " 315 "feature to improve concurrent Fortuna performance."); 316#endif 317 --- 503 unchanged lines hidden --- |