Page MenuHomeFreeBSD

jtl (Jonathan T. Looney)Administrator
User

Projects

User Details

User Since
Oct 29 2015, 5:25 PM (158 w, 6 d)
Roles
Administrator

Recent Activity

Fri, Nov 9

jtl added a comment to D17914: Check for an overly large fragment..

I'm writing a regression test for this to stick under tests/sys/netinet. I'll see if I can add test cases for D17922 as well.

Fri, Nov 9, 5:24 PM
jtl created D17922: More IPv4 fragment checks.
Fri, Nov 9, 2:56 PM
jtl added a comment to D17914: Check for an overly large fragment..

Yeah, I saw this shortly before seeing this review. I agree we should fix it.

Fri, Nov 9, 12:31 AM

Thu, Nov 8

jtl accepted D17909: Avoid buffer underwrite in icmp_error.

If alignment is important, we can (theoretically) do something more intelligent to maintain it. However, I think this is both safe and good enough for an emergency fix.

Thu, Nov 8, 4:47 PM

Fri, Nov 2

jtl committed rS340077: m_pulldown() may reallocate n. Update the oip pointer after the.
m_pulldown() may reallocate n. Update the oip pointer after the
Fri, Nov 2, 7:14 PM

Thu, Oct 18

jtl added a comment to D17609: Optimize curthread.
In D17609#375841, @mjg wrote:

I think this is a very questionable idea. In my experience clang does *mostly* not re-read. For all cases you are adding a function call.

See vfs_ref/vfs_rel or fsetown as examples.

Can you show me a specific function which compiles to multiple reads of gs just to get curthread?

Thu, Oct 18, 6:02 PM
jtl created D17609: Optimize curthread.
Thu, Oct 18, 3:24 PM
jtl committed rS339419: r334853 added a "socket destructor" callback. However, as implemented, it.
r334853 added a "socket destructor" callback. However, as implemented, it
Thu, Oct 18, 2:20 PM
jtl closed D17590: Update the socket destructor to run in sofree().
Thu, Oct 18, 2:20 PM
jtl added a comment to D17604: Maintain qualifiers on (struct thread_lite) members.
In D17604#375736, @kib wrote:

I definitely agree with the genoffset.sh changes.

On the other hand, I am not sure that we need to restore volatile qualifiers in the thread_lite, instead of removing them in the struct thread. The manipulations of the critnest level and pin count should use barriers, and I believe that the thread_lite patch and some of its follow-ups just did that. Volatile relied on the compiler-specific semantic to get similar effect.

Thu, Oct 18, 1:20 PM
jtl created D17604: Maintain qualifiers on (struct thread_lite) members.
Thu, Oct 18, 1:57 AM

Tue, Oct 16

jtl created D17590: Update the socket destructor to run in sofree().
Tue, Oct 16, 5:29 PM
jtl updated the diff for D17588: Fix TCP module unloading code to work with epoch(9) changes.

Fix stupid syntax error.

Tue, Oct 16, 4:48 PM
jtl created D17588: Fix TCP module unloading code to work with epoch(9) changes.
Tue, Oct 16, 4:39 PM
jtl committed rS339378: In r338102, the TCP reassembly code was substantially restructured. Prior.
In r338102, the TCP reassembly code was substantially restructured. Prior
Tue, Oct 16, 2:41 PM

Oct 16 2018

jtl closed D17503: Run epoch calls sooner and more reliably.

Let's merge from upstream if possible.

Oct 16 2018, 2:33 AM
jtl closed D17492: Fix early epoch calls.

Ok, call should be fine as well! In all cases, seems like writers are synchronized and any other usage is in the context of a protected section. CI also passes (though I haven't run it through SPARCv9+ and ARM, but we already have RMO and TSO coverage, nothing specific to ARM / SPARC with these changes).

Thanks again Jon. These are great.

Oct 16 2018, 2:32 AM
jtl committed rS339375: Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb..
Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
Oct 16 2018, 2:30 AM
jtl committed rS339374: Tag CK after import of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb..
Tag CK after import of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
Oct 16 2018, 12:50 AM
jtl committed rS339373: Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb..
Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
Oct 16 2018, 12:48 AM

Oct 13 2018

jtl accepted D17511: Add stat counter for ipv6 atomic fragments.

Please make the two changes suggested by bz@ and then feel free to commit this. I think its OK to ask re@ to commit this during the freeze. (I also won't be upset if they say "no".)

Oct 13 2018, 12:49 AM

Oct 12 2018

jtl accepted D17525: Move variable into proper block..
Oct 12 2018, 3:13 AM

Oct 11 2018

jtl added a comment to D17492: Fix early epoch calls.

Ok. I caught up with Matt offline. This doesn't solve the problem at hand. The API is not being used as intended in some areas, so we will work to address that. I would advise against merging this in as it doesn't address the underlying issues:

  • Some usage of epoch records is re-entrant: This is not supported. Supporting this would require atomic usage that would be, expensive. We have an easy fix for that.
Oct 11 2018, 1:17 AM

Oct 10 2018

jtl added a comment to D17503: Run epoch calls sooner and more reliably.
In D17503#373529, @jtl wrote:

See previous note in D17492 regarding the assumption that write-side functions are *not* called with-in a read-side critical. Does FreeBSD require that this is permitted?

See my comments in that review.

Regardless of whether that is true, it seems like this change would still be safe. Do you agree?

Is it expected by the kernel that ck_epoch write-side functions are safe to call on records that are already in a read-side critical section?
Helping me understand the intended use-case will allow me to answer accurately. There is further validation needed beyond poll.

Oct 10 2018, 7:49 PM
jtl added a comment to D17492: Fix early epoch calls.

The above change should not have any impact if ck_epoch is being correctly used. For that reason, it's good to go. However, I am concerned about a larger problem.

For barriers, we do assert that the caller is not in a read section. However, the CPU's record may still be in a read section. So, maybe we do violate the reader/writer assumption there, too.

As long as the CPU record does not require re-entrance support, that's fine. The requirement is that the record that is used to issue a write-side request is not in a read-side section. We can lift this restriction, but I'll need to validate a few things. Is the kernel violating this restriction at the moment? I had trouble understanding that from the example given, because if the tick handler has a dedicated record, there is no problem and then the above change is a no-op.

If the above constraint is being violated, then I'll get back to you tonight as I'll want to do some additional validation.

Oct 10 2018, 7:39 PM
jtl added a comment to D17503: Run epoch calls sooner and more reliably.

See previous note in D17492 regarding the assumption that write-side functions are *not* called with-in a read-side critical. Does FreeBSD require that this is permitted?

Oct 10 2018, 5:03 PM
jtl added a comment to D17492: Fix early epoch calls.

Thanks much for this. Note that the assumption here is a writer thread *should not* be calling ck_epoch_synchronize or write while inside of a read-side critical section. In other words, the active bit must be set to 0. In this situation, the invariant is not violated. If inside a read-side critical section, bets are off. Is the assumption or requirement here that it be safe to call synchronize from with-in a read-side critical section? If so, there are a few other areas we could fix up.

Oct 10 2018, 5:00 PM
jtl added a comment to D17492: Fix early epoch calls.

The other half of the original diff is now in D17503.

Oct 10 2018, 3:20 PM
jtl created D17503: Run epoch calls sooner and more reliably.
Oct 10 2018, 3:19 PM
jtl updated the summary of D17492: Fix early epoch calls.
Oct 10 2018, 2:35 PM
jtl updated the diff for D17492: Fix early epoch calls.

Split the commit into two parts. In this part, just fix the early epoch calls.

Oct 10 2018, 2:33 PM
jtl created D17493: Check for td_epochnest when an ithread sleeps.
Oct 10 2018, 4:53 AM
jtl created D17492: Fix early epoch calls.
Oct 10 2018, 4:32 AM

Oct 9 2018

jtl committed rS339251: There are three places where we return from a function which entered an.
There are three places where we return from a function which entered an
Oct 9 2018, 1:26 PM
jtl closed D17450: Fix three epoch leaks.
Oct 9 2018, 1:26 PM

Oct 6 2018

jtl added inline comments to D16851: Add support for header chain validation on IPv6 Fragments (RFC7112).
Oct 6 2018, 5:15 PM
jtl created D17450: Fix three epoch leaks.
Oct 6 2018, 11:25 AM

Oct 5 2018

jtl accepted D17434: Add support for none ACPI battery method batteries.

FYI, it looks like there was a typo in the description:

Oct 5 2018, 4:29 PM

Oct 4 2018

jtl accepted D17357: Convert UDP length to host byte order.

Looks good. Please commit with "Approved: jtl (mentor)".

Oct 4 2018, 4:23 PM
jtl accepted D17406: Fix ips_localout counter for SCTP.
Oct 4 2018, 4:21 PM

Sep 8 2018

jtl added a comment to D17065: Use ratecheck(9) in in_pcbinslbgrouphash()..

Hi. I know I'm late to the party, but I have three comments:
a) I could be wrong, but I don't think there is any guarantee this won't be called simultaneously for two different groups at the same time. (The groups could be in different VNETs, for example.) In that case, two different invocations could be working on the function's static variables at the same time. That may produce unexpected results. (Granted, it would take an unusual series of events. But, I think we've all seen highly unusual events occur.)
b) I don't think the const variable also needs to be static.
c) It seems like the rate limiter should really be per-group, so I would suggest adding the lastprint variable to the inpcblbgroup struct.

Sep 8 2018, 12:56 AM

Aug 23 2018

jtl added a comment to D16847: Eliminate KAME custom circular queues in reassembly code..

FYI, something didn't look right doing my tests. So, I'm going to delay committing this until I can satisfy myself that it behaves correctly. That will almost certainly mean I miss the code freeze. C'est la vie!

Aug 23 2018, 10:25 PM
jtl updated the diff for D16847: Eliminate KAME custom circular queues in reassembly code..
  • Limit the ipq structure to the kernel to eliminate a buildworld failure. (And, why should we make userspace code import the sys/queue.h header for a structure they don't need anyway?)
  • Address @jhb's nit.
Aug 23 2018, 10:24 PM
jtl accepted D16860: Use arc4rand() instead of read_random().
Aug 23 2018, 6:16 PM
jtl added inline comments to D16847: Eliminate KAME custom circular queues in reassembly code..
Aug 23 2018, 1:09 PM

Aug 22 2018

jtl added a comment to D16471: Some TCP reassembly improvements.

D16626 expanded on these changes and was recently committed. I believe we can close this one out.

Aug 22 2018, 5:40 PM
jtl created D16850: Update the fragment reassembly code's handling of overlapping fragments to conform to RFC 8200..
Aug 22 2018, 5:31 PM
jtl created D16847: Eliminate KAME custom circular queues in reassembly code..
Aug 22 2018, 4:27 PM

Aug 21 2018

jtl accepted D16835: KASSERT: Make runtime optionality optional.
Aug 21 2018, 8:31 PM

Aug 18 2018

jtl accepted D16626: Rewrite of TCP Reassembly code.
Aug 18 2018, 10:32 PM
jtl accepted D16626: Rewrite of TCP Reassembly code.

LGTM (with minor change noted in-line).

Aug 18 2018, 10:24 AM
jtl added a comment to D16626: Rewrite of TCP Reassembly code.
In D16626#356917, @rrs wrote:

This version incorporates all of Jonathans comments and suggested improvements. Thanks
Jonathan!!!

Aug 18 2018, 10:22 AM

Aug 14 2018

jtl committed rS337804: MFC r337788:.
MFC r337788:
Aug 14 2018, 6:17 PM
jtl committed rS337803: MFC r337787:.
MFC r337787:
Aug 14 2018, 6:15 PM
jtl committed rS337802: MFC r337786:.
MFC r337786:
Aug 14 2018, 6:13 PM
jtl committed rS337801: MFC r337784:.
MFC r337784:
Aug 14 2018, 6:12 PM
jtl committed rS337799: MFC r337783:.
MFC r337783:
Aug 14 2018, 6:10 PM
jtl committed rS337798: MFC r337782:.
MFC r337782:
Aug 14 2018, 6:07 PM
jtl committed rS337797: MFC r337781:.
MFC r337781:
Aug 14 2018, 6:00 PM
jtl committed rS337796: MFC r337780:.
MFC r337780:
Aug 14 2018, 5:54 PM
jtl committed rS337795: MFC r337778:.
MFC r337778:
Aug 14 2018, 5:52 PM
jtl committed rS337790: MFC r337776:.
MFC r337776:
Aug 14 2018, 5:47 PM
jtl committed rS337789: MFC r337775:.
MFC r337775:
Aug 14 2018, 5:43 PM
jtl committed rS337788: Update the inet(4) and inet6(4) man pages to reflect the changes made.
Update the inet(4) and inet6(4) man pages to reflect the changes made
Aug 14 2018, 5:36 PM
jtl committed rS337787: Lower the default limits on the IPv6 reassembly queue..
Lower the default limits on the IPv6 reassembly queue.
Aug 14 2018, 5:32 PM
jtl committed rS337786: Lower the default limits on the IPv4 reassembly queue..
Lower the default limits on the IPv4 reassembly queue.
Aug 14 2018, 5:30 PM
jtl committed rS337784: Drop 0-byte IPv6 fragments..
Drop 0-byte IPv6 fragments.
Aug 14 2018, 5:29 PM
jtl committed rS337783: Implement a limit on on the number of IPv6 reassembly queues per bucket..
Implement a limit on on the number of IPv6 reassembly queues per bucket.
Aug 14 2018, 5:27 PM
jtl committed rS337782: Add a limit of the number of fragments per IPv6 packet..
Add a limit of the number of fragments per IPv6 packet.
Aug 14 2018, 5:26 PM
jtl committed rS337781: Make the IPv6 fragment limits be global, rather than per-VNET, limits..
Make the IPv6 fragment limits be global, rather than per-VNET, limits.
Aug 14 2018, 5:24 PM
jtl committed rS337780: Implement a limit on on the number of IPv4 reassembly queues per bucket..
Implement a limit on on the number of IPv4 reassembly queues per bucket.
Aug 14 2018, 5:23 PM
jtl committed rS337778: Add a global limit on the number of IPv4 fragments..
Add a global limit on the number of IPv4 fragments.
Aug 14 2018, 5:20 PM
jtl committed rS337776: Improve IPv6 reassembly performance by hashing fragments into buckets..
Improve IPv6 reassembly performance by hashing fragments into buckets.
Aug 14 2018, 5:17 PM
jtl committed rS337775: Improve hashing of IPv4 fragments..
Improve hashing of IPv4 fragments.
Aug 14 2018, 5:16 PM

Aug 6 2018

jtl committed rS337392: MFC r337390: Bump date after r337384..
MFC r337390: Bump date after r337384.
Aug 6 2018, 6:47 PM
jtl committed rS337391: MFC r337390: Bump date after r337384..
MFC r337390: Bump date after r337384.
Aug 6 2018, 6:46 PM
jtl committed rS337390: Bump date after r337384..
Bump date after r337384.
Aug 6 2018, 6:42 PM
jtl committed rS337389: Address concerns about CPU usage while doing TCP reassembly..
Address concerns about CPU usage while doing TCP reassembly.
Aug 6 2018, 5:50 PM
jtl committed rS337388: Address concerns about CPU usage while doing TCP reassembly..
Address concerns about CPU usage while doing TCP reassembly.
Aug 6 2018, 5:48 PM
jtl committed rS337387: Address concerns about CPU usage while doing TCP reassembly..
Address concerns about CPU usage while doing TCP reassembly.
Aug 6 2018, 5:48 PM
jtl committed rS337386: MFC r337384:.
MFC r337384:
Aug 6 2018, 5:46 PM
jtl committed rS337385: MFC r337384:.
MFC r337384:
Aug 6 2018, 5:42 PM
jtl committed rS337384: Address concerns about CPU usage while doing TCP reassembly..
Address concerns about CPU usage while doing TCP reassembly.
Aug 6 2018, 5:37 PM

Jul 28 2018

jtl accepted D16485: Fix some TCP fast open issues.
Jul 28 2018, 11:28 PM

Jul 27 2018

jtl created D16471: Some TCP reassembly improvements.
Jul 27 2018, 5:36 PM

Jul 25 2018

jtl committed rD52056: Update PGP key for jtl..
Update PGP key for jtl.
Jul 25 2018, 2:55 AM

Jul 24 2018

jtl accepted D16420: Fastpath was a temp holder to give as an example and now needs to disappear.

Never mind. It looks like this is a display issue, and you really are deleting them.

Jul 24 2018, 2:18 PM
jtl requested changes to D16420: Fastpath was a temp holder to give as an example and now needs to disappear.

It looks like you're keeping the code by moving it to the modules directory? At this point, I think it just makes sense to delete it.

Jul 24 2018, 1:39 PM

Jun 18 2018

jtl added a comment to D15706: socket: introduction of destructor callback.
In D15706#334711, @jtl wrote:

Didn't quite catch this before it was committed. This isn't really a destructor, it's a close notification. Rather than confuse matters, as sockets have UMA destructors as well, this should probably be so_notify_close.

Yes, I caught that when I asked the submitter about the placement of the "destructor". But, once I figured out it was a close notification, I should have changed the name. Mea cupla.

Before changing this, let me see if I can confirm what the Linux implementation does.

Thanks, it is intended to be equivalent to sk_destruct() callback in struct sock in Linux.

Is the Linux sk_destruct called on socket close, or on socket destruction? If we want an actual socket destructor, we can add one of those [instead / as well], called from the socket destructor function.

It is literally destructor, which is called when the final reference count drops to zero. So probably we should define so_dtor() as destructor (so keep the name) and call it after SOCK_UNLOCK() in sofree(). (in Linux it is invoked without locking socket).

Jun 18 2018, 11:07 PM
jtl accepted D15686: convert inpcbhash rlock to epoch.
Jun 18 2018, 10:13 PM

Jun 15 2018

jtl added a comment to D15706: socket: introduction of destructor callback.

Didn't quite catch this before it was committed. This isn't really a destructor, it's a close notification. Rather than confuse matters, as sockets have UMA destructors as well, this should probably be so_notify_close.

Jun 15 2018, 6:19 PM
jtl updated subscribers of D15686: convert inpcbhash rlock to epoch.

I've spent some time thinking about this a bit, and I have the following comments. (Some may seem contradictory, but please bear with me. :-) )

Jun 15 2018, 3:32 PM
jtl added inline comments to D15815: Set page permissions for kernel modules.
Jun 15 2018, 1:59 AM

Jun 14 2018

jtl created D15815: Set page permissions for kernel modules.
Jun 14 2018, 11:27 PM

Jun 13 2018

jtl committed rS335068: Make UMA and malloc(9) return non-executable memory in most cases..
Make UMA and malloc(9) return non-executable memory in most cases.
Jun 13 2018, 5:05 PM
jtl closed D15691: Make kernel allocations be non-executable on some platforms.
Jun 13 2018, 5:04 PM
jtl updated the diff for D15691: Make kernel allocations be non-executable on some platforms.

Address @markj's feedback by always defining the vmd_kernel_rwx_arena member of the vm_domain struct.

Jun 13 2018, 4:47 PM
jtl added inline comments to D15691: Make kernel allocations be non-executable on some platforms.
Jun 13 2018, 4:41 PM

Jun 12 2018

jtl updated the diff for D15691: Make kernel allocations be non-executable on some platforms.

Update the zone(9) manpage.

Jun 12 2018, 12:42 PM

Jun 11 2018

jtl updated the diff for D15691: Make kernel allocations be non-executable on some platforms.

Okay, really without the cruft this time. (Hopefully...)

Jun 11 2018, 11:55 PM