Page MenuHomeFreeBSD

cem (Conrad Meyer)
User

Projects

User Details

User Since
Jul 9 2015, 9:56 PM (334 w, 5 d)

Recent Activity

Mon, Nov 29

cem added a comment to D33168: gpart: add options to move the primary and secondary GPT partition tables.

Seems ok in principle.

Mon, Nov 29, 11:22 PM
cem added a comment to D32725: entropy: add quick check before taking lock.

At a minimum, you have rdseed (rdrand). But I expect there are other non-ethernet sources present as well.

Mon, Nov 29, 3:36 PM

Fri, Nov 19

cem added a comment to D32725: entropy: add quick check before taking lock.

The problem is that in some use cases we might not have a lot of entropy good sources, with the ethernet being the only good candidate.

Fri, Nov 19, 4:06 PM

Wed, Nov 17

cem added a comment to D32725: entropy: add quick check before taking lock.

Consider just disabling Ethernet entropy collection instead. In fact, I thought it was off by default in approximately the 13 timeframe.

Wed, Nov 17, 2:57 PM

Tue, Nov 16

cem accepted D33012: aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt().

Cool

Tue, Nov 16, 4:20 PM
cem accepted D33012: aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt().
Tue, Nov 16, 3:19 PM

Mon, Nov 15

cem added inline comments to D32984: randomdev: Remove 100 ms sleep from write routine.
Mon, Nov 15, 5:08 PM

Sat, Nov 13

cem added inline comments to D32984: randomdev: Remove 100 ms sleep from write routine.
Sat, Nov 13, 11:18 PM
cem accepted D32984: randomdev: Remove 100 ms sleep from write routine.

Fortuna doesn't specify the 100ms sleep behavior, as far as I can tell. Removing it seems reasonable to me.

Sat, Nov 13, 7:05 PM

Oct 29 2021

cem added a comment to D32725: entropy: add quick check before taking lock.

This change should come with a motivational ministat graph.

Oct 29 2021, 12:41 PM

Oct 25 2021

cem added a comment to D32478: kern: random: use a spinlock for the reseed lock.

I meant fundamentally bad idea. Very little work should happen in interrupt context. Taking a global lock and running AES in software is somewhat expensive.

Oct 25 2021, 5:41 PM

Oct 13 2021

cem added a comment to D32478: kern: random: use a spinlock for the reseed lock.

I don't believe anything should be consuming random in interrupt contexts. Could you elaborate on the scenario / bug?

Oct 13 2021, 8:01 AM

Sep 27 2021

cem added inline comments to D32144: fstyp: Use a void pointer for the ucs2label argument to convert_label..
Sep 27 2021, 6:32 PM

Sep 25 2021

cem accepted D32144: fstyp: Use a void pointer for the ucs2label argument to convert_label..

Address of packed member? How?

Sep 25 2021, 6:33 PM

Sep 21 2021

cem added inline comments to D32028: bitset(9): Introduce BIT_FOREACH_SET and BIT_FOREACH_CLR.
Sep 21 2021, 5:44 PM
cem accepted D32021: kern: random: reduce the rate at which we collect from fast entropy sources.

Lgtm, thanks for driving this.

Sep 21 2021, 5:42 PM
cem added a comment to D32021: kern: random: reduce the rate at which we collect from fast entropy sources.

Let’s re-remove read_rate_increment but otherwise it’s looking good to me.

Sep 21 2021, 5:13 PM

Sep 20 2021

cem accepted D32028: bitset(9): Introduce BIT_FOREACH_SET and BIT_FOREACH_CLR.
Sep 20 2021, 10:47 PM
cem accepted D32028: bitset(9): Introduce BIT_FOREACH_SET and BIT_FOREACH_CLR.
Sep 20 2021, 7:28 PM
cem accepted D32029: Convert consumers to use the CPU_FOREACH_SET() macro.
Sep 20 2021, 7:16 PM
cem added inline comments to D32021: kern: random: reduce the rate at which we collect from fast entropy sources.
Sep 20 2021, 9:04 AM

Sep 19 2021

cem added a comment to D32013: virtqueue: add virtqueue_poll_timeout().

OK, I can throw together a patch to this effect. Based on your description here, we're tentatively punting on the idea of just collecting into the zero pool for now, right? My understanding is that 128 bits into the zero pool is the bare minimum and 256 bits per pool per second as a good compromise between there and where we're at now.

Sep 19 2021, 8:49 PM

Sep 18 2021

cem added a comment to D32013: virtqueue: add virtqueue_poll_timeout().

If that's an option, then sure. =-) I didn't/don't understand fortuna's design well enough to make claims about what a reasonable rate is. If we can securely drop it down to <= 1kB/s on average then yeah, we can probably just not care about this at all.

Sep 18 2021, 7:57 PM
cem added a comment to D32013: virtqueue: add virtqueue_poll_timeout().

I hadn’t seen the patch moving the stack buffer to the softc when I wrote my earlier remarks. I still think we should be polling less volume.

Sep 18 2021, 6:25 PM
cem added a comment to D32014: virtio_random: timeout rather than blocking entropy collection.

As mentioned earlier in the stack I don’t think this mitigation is great.

Sep 18 2021, 6:21 PM
cem added a comment to D32013: virtqueue: add virtqueue_poll_timeout().

I don’t think this is a great mitigation for random - the pending request will still be written in guest memory, and we need the queue completion to know when we can free the memory.

Sep 18 2021, 6:14 PM

Aug 30 2021

cem accepted D31730: aesni: Avoid a potential out-of-bounds load in aes_encrypt_icm().

Lgtm.

Aug 30 2021, 5:55 PM

Aug 12 2021

cem added a comment to D31510: arc4random: Avoid KMSAN false positives from pre-seeding results.

LTO builds can see across CUs. I don’t know of any particular pass that would eliminate this, though.

Aug 12 2021, 2:38 PM
cem added a comment to D31510: arc4random: Avoid KMSAN false positives from pre-seeding results.

What exactly is the UB here? I'm not sure how the compiler could legally eliminate SHA256_Update(&ctx, key, sizeof(key)).

Aug 12 2021, 2:15 PM

Aug 11 2021

cem accepted D31510: arc4random: Avoid KMSAN false positives from pre-seeding results.

It's not exactly a false positive, although poisoning the output as uninitialized is sort of unhelpful. Are we confident the compiler isn't eliminating access to it (due to UB) outside of KMSAN? In the abstract, I think we would prefer to eliminate bypass_before_seeding.

Aug 11 2021, 11:05 PM

Aug 6 2021

cem accepted D31284: Use arm64 sha256 intrinsics in libmd.
Aug 6 2021, 4:34 PM

Jul 29 2021

cem closed D31292: libc qsort(3): Eliminate ambiguous sign comparison.
Jul 29 2021, 4:01 AM
cem committed R10:7f8f79a5c444: libc qsort(3): Eliminate ambiguous sign comparison (authored by cem).
libc qsort(3): Eliminate ambiguous sign comparison
Jul 29 2021, 4:01 AM

Jul 28 2021

cem updated the diff for D31292: libc qsort(3): Eliminate ambiguous sign comparison.

Oops. Use C89-style comments per style(9).

Jul 28 2021, 10:31 PM
cem updated the diff for D31292: libc qsort(3): Eliminate ambiguous sign comparison.

Add comment explaining the cast.

Jul 28 2021, 5:24 PM
cem added a comment to D31327: debugnet_handle_arp(): Fix false-positive assertion for dp_state.

I don't know exactly but I figured it was simple latency with something like debugnet_arp_gw sending arp request 1, delay(500), retry -> arp request 2 sent, arp reply 1 received (state changes), delay(500), arp reply 2 received (panic due to unexpected state).

Jul 28 2021, 5:13 PM
cem accepted D31327: debugnet_handle_arp(): Fix false-positive assertion for dp_state.

This would only happen if you have multiple competing dhcp servers on a subnet, right? Edit: not dhcp, oops. Still, kind of surprising we’re getting multiple ARP responses?

Jul 28 2021, 3:37 PM

Jul 27 2021

cem accepted D31319: netdump: Fix leaking debugnet state on errors..
Jul 27 2021, 4:35 AM

Jul 24 2021

cem accepted D31300: dumpon: Fix unconfiguring netdump with "off" and "/dev/null"..
Jul 24 2021, 9:58 PM

Jul 23 2021

cem added inline comments to D31292: libc qsort(3): Eliminate ambiguous sign comparison.
Jul 23 2021, 11:38 PM
cem updated the summary of D31292: libc qsort(3): Eliminate ambiguous sign comparison.
Jul 23 2021, 9:26 PM
cem updated the diff for D31292: libc qsort(3): Eliminate ambiguous sign comparison.

Use ssize_t.

Jul 23 2021, 9:24 PM
cem added a comment to D31292: libc qsort(3): Eliminate ambiguous sign comparison.
In D31292#704741, @kib wrote:

ptrdiff_t sounds arbitrary. Why did not you used e.g. ssize_t? Because it is not defined by C STD?

Jul 23 2021, 8:49 PM
cem requested review of D31292: libc qsort(3): Eliminate ambiguous sign comparison.
Jul 23 2021, 7:56 PM
cem added inline comments to D31284: Use arm64 sha256 intrinsics in libmd.
Jul 23 2021, 5:04 PM

May 11 2021

cem added a comment to D30170: sort: Cache value of MB_CUR_MAX.

Is there a way we could make MB_CUR_MAX or __mb_cur_max suck less, in a more general way? Like, isn't it basically always four or one?

May 11 2021, 12:45 AM

May 1 2021

cem added a comment to D26743: Factor out code from fstyp into libfstyp.

I think the idea is very reasonable and could be done in a way that preserves the safety of the sandbox, at least for fstyp. I don't think the popen approach makes sense. There may be a lot of work required to sandbox the suggested consumer (mount).

May 1 2021, 7:03 PM

Apr 12 2021

cem added inline comments to D29736: OCF: Remove support for asymmetric cryptographic operations..
Apr 12 2021, 9:12 PM
cem accepted D29736: OCF: Remove support for asymmetric cryptographic operations..

Nice cleanup. I didn't review the man page language updates super thoroughly, but the parts I skimmed looked good.

Apr 12 2021, 9:11 PM

Apr 1 2021

cem accepted D29518: cryptocheck: Expand the set of sizes tested by -z..

Merci

Apr 1 2021, 10:16 PM

Mar 31 2021

cem edited P491 'pciconf -lc pci0:0:0:2' ryzen 5800x.
Mar 31 2021, 10:43 PM
cem added inline comments to D29518: cryptocheck: Expand the set of sizes tested by -z..
Mar 31 2021, 10:30 PM
cem accepted D29517: ossl: Don't encryt/decrypt too much data for chacha20..
Mar 31 2021, 6:09 PM
cem added inline comments to D29518: cryptocheck: Expand the set of sizes tested by -z..
Mar 31 2021, 6:07 PM

Mar 23 2021

cem accepted D29385: Make random() behaves as documented: "result is uniform in [0, 2^31 - 1]".

Thanks!

Mar 23 2021, 5:05 PM
cem accepted D29385: Make random() behaves as documented: "result is uniform in [0, 2^31 - 1]".

Nice find. I'd encourage using prng32_bounded instead, but I don't think this is mechanically wrong.

Mar 23 2021, 5:52 AM

Mar 16 2021

cem accepted D29173: gdb: allow setting/removing hardware watchpoints.

Awesome, thanks!

Mar 16 2021, 4:25 PM

Mar 9 2021

cem added a comment to D29173: gdb: allow setting/removing hardware watchpoints.

Seems reasonable to me!

Mar 9 2021, 9:31 PM
cem added a comment to D29174: gdb: report specific stop reason for watchpoints.

Generally seems good to me.

Mar 9 2021, 9:25 PM

Mar 3 2021

cem resigned from D29031: fusefs: fix two bugs regarding fcntl file locks.

Nah

Mar 3 2021, 5:38 AM
cem resigned from D27946: fusefs: protect fufh table and cached attributes with the vnode lock.
Mar 3 2021, 5:37 AM
cem requested changes to D27946: fusefs: protect fufh table and cached attributes with the vnode lock.
Mar 3 2021, 5:36 AM
cem added a comment to D29007: address a performance problem w/ partial sscanf on long strings....
In D29007#649973, @jmg wrote:
In D29007#649700, @cem wrote:

Is 128 a reasonable chunk here? How does it relate to the internal buffering of FILE?

I'm going to run some perf numbers on ARM, but w/ the attached file w/ benchmarks, it looks like the chunk should be closer to 16.

Mar 3 2021, 5:17 AM
cem accepted D28754: ossl: Add Poly1305 digest support..
Mar 3 2021, 5:12 AM
cem accepted D28755: The ChaCha20 counter is little endian, not big endian..

Certainly not a regression :-)

Mar 3 2021, 5:04 AM

Mar 2 2021

cem added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

Is 128 a reasonable chunk here? How does it relate to the internal buffering of FILE?

Mar 2 2021, 6:28 PM

Mar 1 2021

cem added a comment to D27946: fusefs: protect fufh table and cached attributes with the vnode lock.

Two small issues remaining, but otherwise I think it's in good shape

Mar 1 2021, 3:12 AM

Feb 28 2021

cem added a comment to D12330: "Long" filename support changes.

@cem Hi there! Is there a link to the v2 ?

Feb 28 2021, 7:20 PM

Feb 23 2021

cem accepted D28889: Fix ptrace_test:ptrace__syscall_args after ATF upgrade.
Feb 23 2021, 4:33 PM

Feb 18 2021

cem accepted D28700: nvdimm(4): Export NVDIMM health flags via sysctl.

Still accepted from earlier

Feb 18 2021, 10:12 PM
cem added a comment to D28756: ossl: Add ChaCha20 cipher support..

Outside of ossl_chacha20.c, everything looks fine.

Feb 18 2021, 2:23 AM
cem added a comment to D28755: The ChaCha20 counter is little endian, not big endian..

Hm, it is little endian, but I'm not confident about the two sentences prior.

Feb 18 2021, 2:17 AM
cem added inline comments to D28754: ossl: Add Poly1305 digest support..
Feb 18 2021, 2:14 AM
cem accepted D28752: cryptosoft: Support per-op keys for AES-GCM and AES-CCM..
Feb 18 2021, 2:00 AM
cem accepted D27838: cryptocheck: Add Chacha20-Poly1305 AEAD coverage..
Feb 18 2021, 1:58 AM
cem accepted D28700: nvdimm(4): Export NVDIMM health flags via sysctl.
Feb 18 2021, 1:57 AM

Feb 17 2021

cem accepted D28753: cryptocheck: Free generated IV after each GMAC test..
Feb 17 2021, 11:59 PM
cem added inline comments to D28700: nvdimm(4): Export NVDIMM health flags via sysctl.
Feb 17 2021, 4:19 PM
cem accepted D28684: libc: Fix t_spawn_fileactions test after ATF update.
Feb 17 2021, 4:03 PM

Feb 16 2021

cem edited P483 Masterwork From Distant Lands.
Feb 16 2021, 1:52 AM

Feb 15 2021

cem accepted D28690: Export various 128 bit long double functions from libgcc_s.so.1.
Feb 15 2021, 10:14 PM
cem accepted D28683: Fix two failing tests after ATF update.

The analysis makes sense and the fix looks fine to me. You could allocate two fds and check socketpair against both (instead of just low) in the final test, but I don't think there's much marginal value in that. (Frankly, I'm not a fan of unix' must-assign-lowest-fd behavior in general, but we have to abide by it.)

Feb 15 2021, 6:54 PM

Feb 13 2021

cem accepted D28605: fusefs: set d_off during VOP_READDIR.
Feb 13 2021, 4:44 AM
cem added inline comments to D28605: fusefs: set d_off during VOP_READDIR.
Feb 13 2021, 3:57 AM
cem added inline comments to D28605: fusefs: set d_off during VOP_READDIR.
Feb 13 2021, 1:46 AM

Feb 12 2021

cem added a comment to D28605: fusefs: set d_off during VOP_READDIR.

In the commit summary, is this a typo?

Feb 12 2021, 5:18 PM
cem added inline comments to D28607: fusefs: forward the server's reported optimal transfer size to statfs.
Feb 12 2021, 4:49 PM

Feb 8 2021

cem added inline comments to D27946: fusefs: protect fufh table and cached attributes with the vnode lock.
Feb 8 2021, 4:44 AM
cem added inline comments to D27946: fusefs: protect fufh table and cached attributes with the vnode lock.
Feb 8 2021, 2:12 AM
cem added a comment to D28528: cherry pick openpam update.

No objection in principle, but the diff is basically unreviewable as-is for me; it's like 90% autoconf generated shell.

Feb 8 2021, 1:48 AM

Feb 2 2021

cem accepted D28461: contribreadelf: do not trucate section name with -W.

LGTM, thanks.

Feb 2 2021, 3:11 PM

Feb 1 2021

cem accepted D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.

Looks great to me!

Feb 1 2021, 3:56 PM
cem added a comment to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.

Turns out the bug was that I messed up the size being passed to the SSE4.2 version. It does work correctly.

Feb 1 2021, 3:48 PM
cem added inline comments to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.
Feb 1 2021, 3:22 PM
cem added inline comments to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.
Feb 1 2021, 3:14 PM

Jan 29 2021

cem added inline comments to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.
Jan 29 2021, 4:43 PM

Jan 28 2021

cem added a comment to D28375: Fix getblk() with GB_NOCREAT returning false-negatives..
In D28375#634909, @cem wrote:

incore has always been able to produce false negatives, FWIW. It's fundamentally racy. I think it's mostly used as a heuristic for avoiding unnecessary prefetch.

That's true, but it's possible for callers to depend on the instantaneous result being correct because some external synchronization guarantees that the result is stable. For instance, some lock might serialize calls to getblk() for a particular vnode, so holding that lock ensures that incore() returns a stable result. I'm worried about false negatives caused by reassignbuf() in cases like this.

Jan 28 2021, 7:18 PM
cem requested changes to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.
Jan 28 2021, 4:29 PM
cem accepted D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.

I think QEMU provides a basic amd64 CPU by default which does not include any newer features (wikipedia suggests SSE4.2 was introduced ~2008).

Jan 28 2021, 2:31 PM
cem requested changes to D28395: tests/sys/kern/crc32: Check for SSE4.2 before using it.

I think the idea here is that CRC32 is part of SSE4.2, which is part of the base feature set of amd64. If you're hitting SIGILL in QEMU in amd64 mode, that suggests QEMU's amd64 emulation is somewhat invalid. However, it's certainly optional on at least some early models of i386.

Jan 28 2021, 1:51 PM