Page MenuHomeFreeBSD
Feed Advanced Search

May 25 2015

jmg added inline comments to D2651: libcpufeats and amd64 assembly for sha256.
May 25 2015, 10:38 PM
jmg updated D2651: libcpufeats and amd64 assembly for sha256.
May 25 2015, 10:35 PM
jmg updated the diff for D2651: libcpufeats and amd64 assembly for sha256.

fix libcrypt so it compiles.. This moves most of the cpufeats
work into the Makefile.inc in libmd..

May 25 2015, 10:16 PM
jmg retitled D2651: libcpufeats and amd64 assembly for sha256 from to libcpufeats and amd64 assembly for sha256.
May 25 2015, 10:04 PM

May 21 2015

jmg committed rS283249: remove stray ; that came in r272673....
remove stray ; that came in r272673...
May 21 2015, 3:38 PM

May 18 2015

jmg committed rS283073: Don't do things we aren't allowed to do in a signal handler... Defer.
Don't do things we aren't allowed to do in a signal handler... Defer
May 18 2015, 7:18 PM

May 16 2015

jmg requested changes to D2566: Add support for AES algorithms to IPSec.

The nonce change and some of the define changes I mentioned are required to be fixed before I'd approve this change.

May 16 2015, 6:30 PM

Apr 15 2015

jmg updated subscribers of D2240: Update pci_cfg_save/restore to work for type 1 and type 2..
Apr 15 2015, 7:10 AM
jmg added a comment to D2285: gcc 4.9.1 compilation fixes for aesni.

we should either include both w/ quotes or both w/ angle braces… I personally would prefer quotes, but that's me, but I won't object to angle braces.

Apr 15 2015, 7:07 AM

Apr 13 2015

jmg added a comment to D2285: gcc 4.9.1 compilation fixes for aesni.

hmm.. maybe we should put this hack into a different header file and just include that one… since all these files are in crypto/aesni, why not a local header (use quotes) that is named gnuhack.h or something (can't think of a good name right now)?

Apr 13 2015, 4:18 PM

Apr 7 2015

jmg accepted D2240: Update pci_cfg_save/restore to work for type 1 and type 2..

I can't think of anything else to change.

Apr 7 2015, 4:08 AM

Apr 2 2015

jmg added a comment to D2177: RFC6864 and per-CPU IP ID counters.
In D2177#22, @glebius wrote:

Robert, tracking it based on IP pair tuples can be achieved only by turning FLOWTABLE (or anything alike) on by default. This doesn't sound like what we want to do now.

Apr 2 2015, 12:38 AM
jmg added a comment to D2177: RFC6864 and per-CPU IP ID counters.
In D2177#23, @glebius wrote:

Emeric, who observed collisions with old ip_id++ code, reports that with per-CPU code he doesn't see them:

https://lists.freebsd.org/pipermail/svn-src-head/2015-March/070091.html

I would dare to speculate, that the per-CPU code is more safe than a single atomic counter for all CPUs,
despite the birthday paradox. My point is that in the network stack we are trying to make network flows
affine to certain RX/TX queues in NICs, and at the same we are trying to make networking threads affine
to CPUs. So, what happens (at least we try to achieve that!) that a certain CPU serves a certain set of
IP flows. And making the ID counter not global, we make it overflow less often, making collisions less
probable. Of course, it is all very speculative. :)

Apr 2 2015, 12:36 AM

Mar 22 2015

jmg added a comment to D2063: Fix libxo JSON output for uptime command.

I'd prefer if you would make the changes.

Mar 22 2015, 1:57 AM
jmg closed D2064: NIST KAT data file port for use w/ tests.

Closed by commit rP381886 (authored by @jmg).

Mar 22 2015, 1:49 AM

Mar 14 2015

jmg retitled D2064: NIST KAT data file port for use w/ tests from to NIST KAT data file port for use w/ tests.
Mar 14 2015, 7:40 AM

Mar 7 2015

jmg abandoned D2012: convert random to ChaCha and use PCPU structures.

As D1956 says, no point in working on this.

Mar 7 2015, 11:44 PM
jmg abandoned D1956: Unify kernel randomness API.

No point in working on this per latest request.

Mar 7 2015, 11:43 PM
jmg added a comment to D1956: Unify kernel randomness API.

A spin lock is RIDICULOUSLY expensive, and where they are in the random(4) code is going to noticeably affect kernel performance. See locking(9).

Mar 7 2015, 11:43 PM
jmg added inline comments to D2025: Tidy up random(4) driver after developer feedback and code audit..
Mar 7 2015, 11:32 PM
jmg added a comment to D2012: convert random to ChaCha and use PCPU structures.

Note: No comments will be addressed till it is decided the correct path forward. If others would like a single final patch, make the decision, but I won't break it up again after doing the work to make a single patch.

Mar 7 2015, 10:50 PM
jmg added a comment to D1956: Unify kernel randomness API.
In D1956#39, @jhb wrote:

Just because people do not agree with you does not mean they are not reading your e-mails. They may still disagree. It's hard for me to see why loadavg() really needs crypto-quality RNG. Given the infrequent updates it would be a far lower bandwidth side channel than something like the hyperthreading SSL thing. Your refusal to really consider such comments raised by multiple people doesn't really give warm fuzzies. The fact is that there are a _lot_ of kernel APIs that are not safe from interrupt context. printf() is barely safe and it's the one case that arguably should be. Most code does not run in interrupt context. The callout stuff added some recent uses, but I suspect there are actually very few places that you would need to fix and you can fix them by removing C_DIRECT_EXEC. In fact, here's the entire list for C_DIRECT_EXEC. This does not look hard to audit:

Mar 7 2015, 10:46 PM

Mar 6 2015

jmg added a comment to D1956: Unify kernel randomness API.
In D1956#36, @jhb wrote:

I am still opposed to splatting spin locks all over the place. We have tools in place to catch violations, and you will just have to fix things like loadavg() appropriately (either by using something simpler or by moving the context it runs in, e.g. removing C_DIRECT).

Mar 6 2015, 6:38 PM

Mar 5 2015

jmg added a comment to D2012: convert random to ChaCha and use PCPU structures.
In D2012#6, @delphij wrote:

Is the code at https://github.com/bitwiseshiftleft/crandom freely redistributable? I didn't find a license there, but it's okay if there is a license allows us to do it.

(I think it's probably a good idea to move cpu_random() and friends to the MD code and create a MI interface for them, as some other platforms may offer similar features in the future).

Mar 5 2015, 10:14 PM
jmg added a comment to D1956: Unify kernel randomness API.

I assert that people can't well the difference between 1 and 2 and there are cases where picking 1 seems like a good choice, but later we discover that it should have been cryptographicly secure. Always using cryptographicly secure RNG ensures that an entire class of bugs is eliminated from FreeBSD. Even if 90% of the developers could tell the difference, we still should. The new ChaCha example in D2012, it would be comparable to an LCG most (99%) of the time.

Mar 5 2015, 7:49 PM
jmg updated subscribers of D1982: Fix return errors in tcp_usrreq.c.
Mar 5 2015, 6:32 PM
jmg removed a reviewer for D1987: Factor out MBUF hashing code for Ethernet and TCP/IP.: network.
Mar 5 2015, 6:32 PM
jmg added inline comments to D1956: Unify kernel randomness API.
Mar 5 2015, 6:27 PM
jmg retitled D2012: convert random to ChaCha and use PCPU structures from to convert random to ChaCha and use PCPU structures.
Mar 5 2015, 6:17 PM
jmg added a comment to D1956: Unify kernel randomness API.

All of these comments are exactly why we should make random able to be called in any context. We will continue to find many cases of this, and end up introducing more code than is worth it if we add LCG's to all of these cases.

Mar 5 2015, 5:43 PM
jmg added a comment to D1956: Unify kernel randomness API.

add comment about confusion on how this new panic shouldn't really be new.

Mar 5 2015, 6:12 AM
jmg updated the diff for D1956: Unify kernel randomness API.

I reverted the yarrow spin lock changes, booted the kernel, and found
the following callchain:
lapic_handle_timer -> timercb -> handleevents -> callout_process ->
softclock_call_cc -> loadav -> arc4rand

Mar 5 2015, 1:08 AM

Mar 4 2015

jmg added a reviewer for D1956: Unify kernel randomness API: jhb.
Mar 4 2015, 10:29 PM
jmg added a comment to D1956: Unify kernel randomness API.

Now that the scheduler has been "fixed", I'll try to run w/ normal mutexs and see if I have any issues. If that works, I'll update the patch, and also include an update for fortuna.

Mar 4 2015, 10:29 PM

Feb 25 2015

jmg updated the diff for D1956: Unify kernel randomness API.

fixed compile, and included a test suite for random_uniform...

Feb 25 2015, 4:32 AM
jmg added inline comments to D1956: Unify kernel randomness API.
Feb 25 2015, 4:19 AM
jmg updated the diff for D1956: Unify kernel randomness API.

change random_uniform to eliminate a division/multiplication and
instead only use addition or simple bit operations, this should help
performance on embeded systems that don't have 64bit mul/div units..

Feb 25 2015, 4:08 AM

Feb 24 2015

jmg updated the diff for D1956: Unify kernel randomness API.

update to address some of delphij's comments...

Feb 24 2015, 2:32 AM
jmg added inline comments to D1956: Unify kernel randomness API.
Feb 24 2015, 2:17 AM
jmg added a comment to D1956: Unify kernel randomness API.

I'll update the patch to address the ones I agree with.

Feb 24 2015, 1:12 AM

Feb 23 2015

jmg retitled D1956: Unify kernel randomness API from to Unify kernel randomness API.
Feb 23 2015, 11:49 PM

Feb 2 2015

jmg added a comment to D1755: Kernel Test Framework (built for the callout testing).

I agree with hselasky.. putting this as a module and kernel option means that we don't bloat the kernel more on embedded systems...

Feb 2 2015, 8:20 PM

Jan 30 2015

jmg added a comment to D1726: Constify a number of accesses in aesni to avoid cast-qual warnings.

Sorry, I'll accept the _wrap.c change, but would prefer not to change _ghash.c as it's contributed code…

Jan 30 2015, 5:59 PM
jmg requested changes to D1726: Constify a number of accesses in aesni to avoid cast-qual warnings.

actually, I consider this a bug in clang.. requiring to cast a point to add const is stupid.. I understand requiring to remove it, but adding const should not generate a warning… This just adds const for no benefit and no change..

Jan 30 2015, 5:42 PM

Jan 27 2015

jmg closed D715: Add AES-GCM & AES-CTR software modes.

committed, why I couldn't do this in one step is beyond me… :(

Jan 27 2015, 5:52 PM
jmg accepted D715: Add AES-GCM & AES-CTR software modes.

committed

Jan 27 2015, 5:51 PM
jmg closed D839: Remove ifdef IPSEC from ip_ipsec.c as they are redundant.

committed

Jan 27 2015, 5:50 PM

Nov 25 2014

jmg added a comment to D1220: Do not use xform_ipip as decapsulation fallback..

I don't know the IPsec code well enough, but as long as everything has been tested, it looks ok.

Nov 25 2014, 6:53 PM

Sep 26 2014

jmg retitled D839: Remove ifdef IPSEC from ip_ipsec.c as they are redundant from to Remove ifdef IPSEC from ip_ipsec.c as they are redundant.
Sep 26 2014, 9:29 AM

Sep 2 2014

jmg updated the diff for D715: Add AES-GCM & AES-CTR software modes.

remove the aesni parts as that still needs to be reviewed by Mike.

Sep 2 2014, 11:26 PM
jmg retitled D715: Add AES-GCM & AES-CTR software modes from to Add AES-GCM & AES-CTR software modes.
Sep 2 2014, 11:24 PM