Page MenuHomeFreeBSD

cem (Conrad Meyer)
User

Projects

User Details

User Since
Jul 9 2015, 9:56 PM (533 w, 4 d)

Recent Activity

Sat, Sep 20

cem accepted D52633: random: fxrng: Add an entry for RANDOM_RANDOMDEV to the source table.
Sat, Sep 20, 12:01 AM

Aug 29 2025

cem accepted D52230: random: Fix synchronization of hc_source_mask.
Aug 29 2025, 4:37 PM
cem accepted D52228: random: Make the min-entropy estimate configurable.
Aug 29 2025, 4:35 PM
cem added a comment to D52232: random: Allow pure entropy sources to provide a min-entropy estimate.

Well, 8 bits per sample, but yes this might turn out to be excessive. Perhaps I should include a tunable to override that value.

Aug 29 2025, 4:33 PM
cem accepted D52233: random: Exclude the timestamp from healthtest for pure sources.
Aug 29 2025, 4:30 PM
cem added inline comments to D52228: random: Make the min-entropy estimate configurable.
Aug 29 2025, 1:47 AM
cem accepted D52232: random: Allow pure entropy sources to provide a min-entropy estimate.

8 bits per byte might be high for some sources... I'm not sure. It's probably fine for the relatively simplistic tests in the health test?

Aug 29 2025, 1:40 AM
cem added inline comments to D52233: random: Exclude the timestamp from healthtest for pure sources.
Aug 29 2025, 1:34 AM

Aug 28 2025

cem accepted D52231: random.4: Document the kern.random.nist_healthtest_enabled tunable.
Aug 28 2025, 11:04 PM
cem accepted D52229: random: Make the entropy source registration interface more uniform.
Aug 28 2025, 11:04 PM
cem accepted D52230: random: Fix synchronization of hc_source_mask.

Should we add a comment on the hc_source_mask definition about its locking/access protocol? LGTM.

Aug 28 2025, 11:00 PM

Aug 18 2025

cem accepted D52002: random: Correct wording in a comment.

I'll take your word for it :)

Aug 18 2025, 8:41 PM
cem accepted D52003: random: Make random_source definitions const.

LGTM.

Aug 18 2025, 8:41 PM

Jul 25 2025

cem added a comment to D48683: amdsmu: Initial work on a driver for the AMD SMU.

It might make sense for amdsmu to use amdsmn's amdsmn_read, though its not much extra work for amdsmu. @cem thoughts on this?

Jul 25 2025, 4:54 PM
cem added inline comments to D48714: amdsmu: Get and expose sysctls for metrics about last sleep.
Jul 25 2025, 1:11 AM

Jul 24 2025

cem added inline comments to D48714: amdsmu: Get and expose sysctls for metrics about last sleep.
Jul 24 2025, 5:56 PM
cem added inline comments to D48683: amdsmu: Initial work on a driver for the AMD SMU.
Jul 24 2025, 5:55 PM
cem added inline comments to D48714: amdsmu: Get and expose sysctls for metrics about last sleep.
Jul 24 2025, 5:48 PM
cem added a comment to D51487: amdsmu: Read and dump idlemask.

Otherwise seems unobjectionable to me.

Jul 24 2025, 5:43 PM

Jul 7 2025

cem accepted D51154: random: Add NIST SP 800-90B entropy source health test implementations.
Jul 7 2025, 4:52 PM
cem accepted D51155: random: Treat writes to /dev/random as separate from /entropy.

Oops. :-)

Jul 7 2025, 4:51 PM

Jul 4 2025

cem accepted D51112: random: Change the entropy harvest event queuing scheme.
Jul 4 2025, 2:04 PM
cem added a comment to D51154: random: Add NIST SP 800-90B entropy source health test implementations.

Thanks -- lgtm otherwise.

Jul 4 2025, 4:08 AM
cem added a comment to D51154: random: Add NIST SP 800-90B entropy source health test implementations.

Commit message nit:

Jul 4 2025, 1:48 AM
cem added a comment to D51155: random: Treat writes to /dev/random as separate from /entropy.

Seems reasonable.

Jul 4 2025, 1:15 AM

Jul 1 2025

cem added a comment to D51112: random: Change the entropy harvest event queuing scheme.

...

Jul 1 2025, 4:16 PM
cem accepted D51113: random: Define a macro for getting the CPU cycle count.

Thanks!

Jul 1 2025, 4:14 PM
cem added a comment to D51112: random: Change the entropy harvest event queuing scheme.

No real objection to this overall approach, but we could also just fix the MPSC queue, right? (release stores for ring.in on the producer side and acquire loads on the consumer side.) (More generally, maybe it would be good to have some sort of generic, correct MPSC implementation that this subsystem can use, instead of the bespoke thing.)

Jul 1 2025, 3:50 PM
cem accepted D51111: random: Move entropy harvest queue lock macros to random_harvestq.c.
Jul 1 2025, 3:42 PM
cem added a comment to D51113: random: Define a macro for getting the CPU cycle count.

lgtm otherwise

Jul 1 2025, 3:41 PM
cem accepted D51110: random: Replace a comment with a static assertion.
Jul 1 2025, 3:40 PM
cem accepted D51114: random: Remove ARGSUSED annotations from random_harvestq.c.
Jul 1 2025, 3:39 PM

May 27 2025

cem added a comment to D48943: Add StarFive JH7110 true random number generator driver.

FYI, it's best practice to generate diffs with full context (-U999999 or whatever).

May 27 2025, 2:42 AM · riscv

Dec 8 2024

cem added inline comments to D47985: sys/x86/cpufreq/hwpstate_amd.c: add amd pstate for zen5.
Dec 8 2024, 6:02 PM
cem added a comment to D47985: sys/x86/cpufreq/hwpstate_amd.c: add amd pstate for zen5.

Is the associated hardware documentation public, and if so, could you link to it?

Dec 8 2024, 5:59 PM

Nov 29 2024

cem added a comment to D47659: lib/libc/gen: use Lemire's algorithm for arc4random_uniform()..

I have no objection.

Nov 29 2024, 6:46 PM

Nov 21 2024

cem added a comment to D47659: lib/libc/gen: use Lemire's algorithm for arc4random_uniform()..

Yes, yes. It is easier to analyze with e.g. rand2() % 3. But you and Ed have both mentioned a way to measure this for rand32 more tractably -- great!

Nov 21 2024, 2:23 AM

Nov 20 2024

cem added a comment to D47659: lib/libc/gen: use Lemire's algorithm for arc4random_uniform()..

Yeah, you can do a simple bias test with an upper limit of 3 for example. Bucket 0 is more likely than buckets 1 and 2 under a simplistic rand32() % 3 implementation. Or something like that. It is probably easier to measure with a smaller power of 2 generator.

Nov 20 2024, 11:00 PM

Nov 18 2024

cem added a comment to D47659: lib/libc/gen: use Lemire's algorithm for arc4random_uniform()..

Some context on the Lemire idea if others haven't seen it:

Nov 18 2024, 2:37 PM

Nov 16 2024

cem accepted D47636: getentropy: Remove fallback code.

lgtm

Nov 16 2024, 5:48 PM

Oct 9 2024

cem accepted D46989: sys: Add an SMCCC Random Number Generator driver.

Thanks.

Oct 9 2024, 5:27 PM

Oct 7 2024

cem added inline comments to D46989: sys: Add an SMCCC Random Number Generator driver.
Oct 7 2024, 6:10 PM

Sep 18 2024

cem added inline comments to D46693: random: Avoid magic numbers.
Sep 18 2024, 3:39 PM
cem added a comment to D46635: loader: Expand EFI entropy if < 2048 bytes.

This is now sort of a layering violation, right? We're assuming Fortuna implements devrandom, but the interface is pluggable. We have 2-3 implementations in tree, and integrators might write their own for compliance reasons.

Sep 18 2024, 3:37 PM
cem accepted D46693: random: Avoid magic numbers.

LGTM.

Sep 18 2024, 3:34 PM

Sep 12 2024

cem added a comment to D46635: loader: Expand EFI entropy if < 2048 bytes.

In random_early_prime we divide the input into blocks of size sizeof(event.he_entropy)) and then process those one by one, with each block only being fed into one pool. so simply padding the entropy with zeros would result in most of the pools having no entropy.

Sep 12 2024, 1:09 AM
cem added a comment to D46635: loader: Expand EFI entropy if < 2048 bytes.

I don't think there's any reason to spread this using pbkdf2 just to defeat the Fortuna input seeding thresholds. You might as well seed the 64 bytes and then 2048-64 bytes of zero, or whatever. (Internally Fortuna is compressing the provided seed material using SHA2.)

Sep 12 2024, 12:13 AM

Jul 15 2024

cem accepted D45978: kern: zero out stack buffer after copying out random bits.
Jul 15 2024, 5:44 PM

Aug 28 2023

cem removed a watcher for secteam: cem.
Aug 28 2023, 2:24 PM

Jul 16 2023

cem resigned from D41049: Add support for Zen 4 in amdsmn and amdtemp.
Jul 16 2023, 12:15 PM

Jul 13 2023

cem accepted D40978: vfs_bio: initialize pctries.

Lgtm

Jul 13 2023, 6:25 PM

May 18 2023

cem resigned from D40140: cpufreq(4): calculate power if P-state info comes from MSR.
May 18 2023, 4:29 PM

Mar 4 2023

cem added inline comments to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 4 2023, 12:19 AM

Mar 3 2023

cem added inline comments to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 3 2023, 11:23 PM
cem added a comment to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....

Nice observation and fix.

Mar 3 2023, 7:43 PM
cem added a comment to D38897: stop looping if it fails, we'll try again in 100ms...

No objection. I'll let someone else stamp it.

Mar 3 2023, 6:48 PM

Feb 27 2023

cem accepted D38812: g_part_ebr: always create "compat" aliases.

Lgtm.

Feb 27 2023, 7:24 PM

Sep 29 2022

cem resigned from D36792: Fix Coverty Scan CID 1498397 - array overrun in kern_sysctl.c.
Sep 29 2022, 8:56 PM
cem requested changes to D36792: Fix Coverty Scan CID 1498397 - array overrun in kern_sysctl.c.

Nevermind

Sep 29 2022, 8:55 PM
cem accepted D36792: Fix Coverty Scan CID 1498397 - array overrun in kern_sysctl.c.
Sep 29 2022, 8:12 PM

Sep 26 2022

cem accepted D36709: geom_part: Fix potential integer overflow when checking size of the table.
Sep 26 2022, 11:55 AM

Sep 23 2022

cem accepted D36679: cpuset(9): Refer to CPU_SETSIZE not MAXCPU.
Sep 23 2022, 7:57 PM

Aug 31 2022

cem accepted D36403: Fix the IV length in the armv8 AES GCM code.

LGTM

Aug 31 2022, 6:15 PM

Aug 9 2022

cem accepted D36088: arc4random(3): Reduce diff with OpenBSD..

As mentioned in email, we might also consider publishing a seed generation to the VDSO page from Fortuna.

Aug 9 2022, 1:29 PM

Jul 13 2022

cem added a comment to D35802: random: Ingest extra fast entropy when !seeded.

Something to keep in mind re: exactly 64 is that it's possible for entropy sources to return less entropy than was requested, if for example some internal state means they don't have anything available at the moment. That's one reason I prefer polling repeatedly until seeded (or some spin threshold is crossed).

Jul 13 2022, 4:25 PM
cem added a comment to D35802: random: Ingest extra fast entropy when !seeded.

Discussed with: cem

Jul 13 2022, 2:49 AM

Jun 6 2022

cem added inline comments to D35411: Add an Armv8 rndr random number provider.
Jun 6 2022, 2:06 PM
cem added inline comments to D35411: Add an Armv8 rndr random number provider.
Jun 6 2022, 1:01 PM
cem accepted D35412: Fix the random source descriptions.
Jun 6 2022, 12:55 PM

May 25 2022

cem accepted D24927: x86/mp: don't create empty cpu groups.

Thanks.

May 25 2022, 8:48 PM

May 24 2022

cem added inline comments to D24927: x86/mp: don't create empty cpu groups.
May 24 2022, 2:50 PM

May 14 2022

cem accepted D35196: dumpon: warn if the configured netdump link is down.

Seems reasonable to me.

May 14 2022, 2:37 AM

May 12 2022

cem accepted D35180: netdump: check the support status of the interface.

Seems very reasonable to me. Thanks!

May 12 2022, 3:54 PM
cem accepted D35179: debugnet: fix an errant assertion.

Seems reasonable to me!

May 12 2022, 3:52 PM

Apr 18 2022

cem accepted D34940: geom: consistently strip /dev/ prefix at input.

LGTM. My only bikeshed contribution is maybe gctl_get_devnameparam or get_devparam. But I don’t object to the current name.

Apr 18 2022, 3:52 PM

Mar 20 2022

cem added inline comments to D33129: bhyve: add ROM emulation.
Mar 20 2022, 6:24 AM · bhyve

Mar 16 2022

cem accepted D34580: xen: fix CPUID signature.
Mar 16 2022, 4:44 PM

Mar 1 2022

cem accepted D34238: zstd: fix benchmarking.

Thanks.

Mar 1 2022, 6:33 PM
cem added reviewers for D34238: zstd: fix benchmarking: bapt, emaste.
Mar 1 2022, 5:57 PM
cem requested changes to D34238: zstd: fix benchmarking.

Setting cstd seems strongly preferable vs making upstream updates more difficult.

Mar 1 2022, 5:57 PM

Feb 28 2022

cem added reviewers for D34393: debugnet: remove spurious message on boot: vangyzen, bdrewery.

Either way seems fine to me. I’d ask vangyzen or bdrewery for input.

Feb 28 2022, 5:04 PM

Feb 11 2022

cem requested changes to D34254: .gitignore: remove .orig/.rej.

What workflow?

Feb 11 2022, 10:53 PM

Feb 9 2022

cem accepted D34220: vt: fix splash_cpu logos use of vd_drawrect.

subtract one from vt_logo_sprite_height as well

Feb 9 2022, 3:00 AM
cem added inline comments to D34221: vt: implement rotation for framebuffer consoles.
Feb 9 2022, 2:46 AM
cem added inline comments to D34220: vt: fix splash_cpu logos use of vd_drawrect.
Feb 9 2022, 2:43 AM

Feb 6 2022

cem added a comment to D34186: tty_info: Avoid warning by using logical instead of bitwise operators.
In D34186#773413, @dim wrote:
In D34186#773402, @cem wrote:

Looks like TESTAB expects boolean (0 and 1) values, too.

Well, the interesting thing is that this macro produces values 0 through 4, and it's a sort of weird shortcut to make the switch(TESTAB()) construct possible.

Feb 6 2022, 7:16 PM
cem accepted D34186: tty_info: Avoid warning by using logical instead of bitwise operators.

Looks like TESTAB expects boolean (0 and 1) values, too.

Feb 6 2022, 6:08 PM

Feb 4 2022

cem accepted D34152: style(9): Default to omitting $FreeBSD$.
Feb 4 2022, 10:32 PM

Feb 3 2022

cem added a comment to D34152: style(9): Default to omitting $FreeBSD$.

@cem: You mean "iff" ? if and only if?

Feb 3 2022, 3:20 PM
cem accepted D34152: style(9): Default to omitting $FreeBSD$.
Feb 3 2022, 2:57 PM
cem accepted D34150: kern: harvest entropy from callouts.
Feb 3 2022, 4:18 AM
cem added a comment to D34150: kern: harvest entropy from callouts.

Looks fine to me. We should probably also actively feed jitter entropy if we hit the blocked state on boot, but that doesn't mean we shouldn't just do this first.

Feb 3 2022, 3:12 AM

Feb 1 2022

cem accepted D32144: fstyp: Remove __packed from struct exfat_de_label..
Feb 1 2022, 1:12 AM

Jan 8 2022

cem accepted D33794: gitignore: ignore vim swap files & .rej/.orig.

Typo in summary: s/path/patch/

Jan 8 2022, 4:57 PM

Jan 3 2022

cem accepted D33686: gdb(4): Do not use run length encoding for 3-symbol repetitions.

Thanks.

Jan 3 2022, 12:18 AM

Dec 29 2021

cem added a comment to D33686: gdb(4): Do not use run length encoding for 3-symbol repetitions.

I’m hoping emaste will be able to test and commit it.

Dec 29 2021, 4:34 PM

Dec 28 2021

cem accepted D33686: gdb(4): Do not use run length encoding for 3-symbol repetitions.

LGTM, thanks.

Dec 28 2021, 10:52 PM

Dec 15 2021

cem accepted D33474: aesni: Fix yet another out-of-bounds read.
Dec 15 2021, 8:03 PM
cem added a comment to D33474: aesni: Fix yet another out-of-bounds read.

LGTM modulo overflow concern and what looks like a typo.

Dec 15 2021, 6:02 PM

Dec 11 2021

cem accepted D33373: Add accelerated arm64 sha512 to libmd.

Lgtm. I didn’t attempt to verify the asm implementation.

Dec 11 2021, 5:40 PM