Page MenuHomeFreeBSD
Feed Advanced Search

Jun 23 2015

jmg commandeered D2725: Add extra INVARIANTS check for ctor/dtor.

I have committed part to properly break up the change...

Jun 23 2015, 6:48 PM
jmg added a reviewer for D2725: Add extra INVARIANTS check for ctor/dtor: jmg.
Jun 23 2015, 6:45 PM
jmg committed rS284733: zero this struct as it depends upon it....
zero this struct as it depends upon it...
Jun 23 2015, 6:40 PM
jmg closed D2890: add MTX_NEW to creation of mutex after uma_zalloc... by committing rS284733: zero this struct as it depends upon it....
Jun 23 2015, 6:40 PM
jmg added a comment to D2890: add MTX_NEW to creation of mutex after uma_zalloc....

changed to using M_ZERO instead... Maintainer should clean this up more.

Jun 23 2015, 6:28 PM
jmg updated the diff for D2890: add MTX_NEW to creation of mutex after uma_zalloc....

switch to zero'ing all of memory, as selinfo and other fields aren't
properly initalized..

Jun 23 2015, 6:28 PM
jmg added a comment to D2890: add MTX_NEW to creation of mutex after uma_zalloc....
In D2890#56145, @mjg wrote:

This particular piece of code actually expects a zeroed struct. In particular, you can see that neither mtx_init nor knlist_init initialize the whole struct, leaving e.g.vpi_events and vpi_revents indeterminate. Then vn_pollrecord immediately examines vpi_revents of a newly added object and we are in trouble.

In other words, while it was mtx_init which complained about junk-filled memory, the issue is bigger. initialisation here needs to either be done with M_ZERO or extended to cover missed fields. Uninitialised parts also include something from struct knlist, so it's more than zeroing 2 shorts, but I'm too lazy to check how to do deal with that knlist.

Jun 23 2015, 6:26 PM
jmg added a comment to D2890: add MTX_NEW to creation of mutex after uma_zalloc....

tomorrow..

Jun 23 2015, 7:57 AM
jmg retitled D2890: add MTX_NEW to creation of mutex after uma_zalloc... from to add MTX_NEW to creation of mutex after uma_zalloc....
Jun 23 2015, 7:02 AM

Jun 20 2015

jmg closed D2875: support SO_REUSEADDR for debug port for bhyve.

committed in svn commit: r284630 - head/usr.sbin/bhyve

Jun 20 2015, 3:54 PM
jmg committed rS284630: add SO_REUSEADDR when starting debug port, lets you still bind when.
add SO_REUSEADDR when starting debug port, lets you still bind when
Jun 20 2015, 7:49 AM
jmg added a comment to D2875: support SO_REUSEADDR for debug port for bhyve.

addressed

Jun 20 2015, 5:45 AM
jmg updated the diff for D2875: support SO_REUSEADDR for debug port for bhyve.

address grehan's comments...

Jun 20 2015, 5:44 AM
jmg retitled D2875: support SO_REUSEADDR for debug port for bhyve from to support SO_REUSEADDR for debug port for bhyve.
Jun 20 2015, 4:21 AM

Jun 19 2015

jmg added a comment to D2025: Tidy up random(4) driver after developer feedback and code audit..

I'll look over the code more later.

Jun 19 2015, 10:57 PM
jmg committed rS284616: change the KASSERT so it is meaningful, var is unsigned, so even.
change the KASSERT so it is meaningful, var is unsigned, so even
Jun 19 2015, 10:42 PM
jmg abandoned D2872: testing...

looks like arc does support git trees too...

Jun 19 2015, 10:16 PM
jmg retitled D2872: testing.. from to testing...
Jun 19 2015, 10:12 PM
jmg added a comment to D2842: Update style.9 to reflect consensus on developer's mailing list..
In D2842#55489, @emaste wrote:
In D2842#55479, @jmg wrote:

Read it, completely unconvinced that adding braces would have caught it, anyone who missed the strange indentation of two goto statements would have missed what extra braces ment... style(9) is there to help make code easier to read, but does not alleviate the developer from reading and understanding the code...

I think you've missed my point: in this case the braces aren't there to make it more likely someone would catch the extra goto fail in code review, but to make it less likely that a merge process ends up producing it at all.

Jun 19 2015, 3:29 PM
jmg added a comment to D2842: Update style.9 to reflect consensus on developer's mailing list..

I would recommend a statement that adds that the preferred/recommended is no extra braces if this must go in...

Jun 19 2015, 3:13 PM
jmg added a comment to D2842: Update style.9 to reflect consensus on developer's mailing list..
In D2842#54946, @emaste wrote:

It might have slipped through code review, but it's less likely to have been introduced in the first place if braces are used.

David Wheeler's got a pretty good description: http://www.dwheeler.com/essays/apple-goto-fail.html

Jun 19 2015, 3:11 PM

Jun 17 2015

jmg added a comment to D2842: Update style.9 to reflect consensus on developer's mailing list..

needs work... style(9) is a guide, clearly not stricktly enforced, and if code is truely confusing w/o the braces, then add them, but changing style(9) is unneeded... The original example of double goto fail doesn't point out that:
if (case) {

goto fail;

}
goto fail;

Jun 17 2015, 5:21 AM

Jun 14 2015

jmg committed rD46829: update my key w/ a few signatures that I got at BSDCan....
update my key w/ a few signatures that I got at BSDCan...
Jun 14 2015, 1:07 PM

Jun 11 2015

jmg committed rD46813: update my key to be stronger.. it's long over due, and I happen to be.
update my key to be stronger.. it's long over due, and I happen to be
Jun 11 2015, 8:47 PM
jmg committed rS284259: drop key_sa_stir_iv as it isn't used....
drop key_sa_stir_iv as it isn't used...
Jun 11 2015, 1:05 PM

Jun 3 2015

jmg committed rS283957: fix missing backslash...
fix missing backslash..
Jun 3 2015, 5:10 PM
jmg committed rS283956: install nanobsd.sh as a MLINK as that is the .Nm of the man page...
install nanobsd.sh as a MLINK as that is the .Nm of the man page..
Jun 3 2015, 5:10 PM
jmg added a comment to D2723: bhyve/vmrun.sh: two improvements.

looks fine, I haven't tested it though

Jun 3 2015, 4:32 PM
jmg added a comment to D2720: Add support for additional architectures in ntp..
Jun 3 2015, 4:16 PM

Jun 1 2015

jmg added a comment to D1503: Use explicitly specified ivsize instead of blocksize, when we mean IV size..
In D1503#28407, @ae wrote:

Is there any news?

Jun 1 2015, 6:53 PM

May 25 2015

jmg updated the diff for D2651: libcpufeats and amd64 assembly for sha256.

fix README to not using X86_...

May 25 2015, 10:45 PM
jmg updated the diff for D2651: libcpufeats and amd64 assembly for sha256.

this time have libcpufeats added so it gets included in the diff...

May 25 2015, 10:42 PM
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