Page MenuHomeFreeBSD
Feed Advanced Search

Oct 10 2018

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
jtl added a comment to D15686: convert inpcbhash rlock to epoch.

I'll try to look at this review this week.

Jun 11 2018, 11:54 PM
jtl added a reviewer for D15686: convert inpcbhash rlock to epoch: rwatson.
Jun 11 2018, 11:53 PM
jtl updated the diff for D15691: Make kernel allocations be non-executable on some platforms.

Get the correct version of sys/vm/vm_kern.c (with the troubleshooting stuff removed).

Jun 11 2018, 11:47 PM
jtl updated the diff for D15691: Make kernel allocations be non-executable on some platforms.

Numerous updates:

  • Address @alc's concerns by adding a new arena for allocations with non-standard permissions. Import a 2MB-aligned address block at a time into the arena. Release space back to the parent arena when able. But, only do this for architectures with superpages.
  • Plumb M_EXEC through malloc(9).
  • Fix BPF by reverting most of rS317072.
  • Add a note to the manpage that not all architectures will enforce execution permissions.
Jun 11 2018, 11:38 PM
jtl committed rS334983: Fix a memory leak for the BIOCSETWF ioctl on kernels with the BPF_JITTER.
Fix a memory leak for the BIOCSETWF ioctl on kernels with the BPF_JITTER
Jun 11 2018, 11:32 PM
jtl added a comment to D15758: Rack crash that Larry Rosenman found...

This passes my "sniff test", but it would be better to get @pkelsey to review it.

Jun 11 2018, 2:49 PM
jtl added reviewers for D15758: Rack crash that Larry Rosenman found..: transport, pkelsey.
Jun 11 2018, 2:45 PM
jtl requested changes to D15757: HPTS Is missing some support for Vnets.

I think there are more changes needed.

Jun 11 2018, 2:37 PM
jtl closed D15756: Change RACK dependency on TCPHPTS from build-time to load-time.
Jun 11 2018, 2:27 PM
jtl committed rS334949: Change RACK dependency on TCPHPTS from a build-time dependency to a load-.
Change RACK dependency on TCPHPTS from a build-time dependency to a load-
Jun 11 2018, 2:27 PM
jtl accepted D15634: Use updated TCP timestamps when retransmitting SYN-ACK using the syncache code path.
Jun 11 2018, 10:36 AM
jtl created D15756: Change RACK dependency on TCPHPTS from build-time to load-time.
Jun 11 2018, 10:31 AM

Jun 8 2018

jtl committed rS334854: Create a symlink for sodtor_set(9) to the socket(9) man page..
Create a symlink for sodtor_set(9) to the socket(9) man page.
Jun 8 2018, 7:47 PM
jtl closed D15706: socket: introduction of destructor callback.
Jun 8 2018, 7:35 PM
jtl committed rS334853: Add a socket destructor callback. This allows kernel providers to set.
Add a socket destructor callback. This allows kernel providers to set
Jun 8 2018, 7:35 PM
jtl accepted D15706: socket: introduction of destructor callback.

The submitter spoke to me in person at BSDCan and answered my questions.

Jun 8 2018, 6:38 PM
jtl added a comment to D15691: Make kernel allocations be non-executable on some platforms.
In D15691#331801, @alc wrote:

Overall, I think that this is a good idea, but the implementation has the following problem. The allocation of one executable page will block the promotion of the surrounding pages to a superpage mapping.

Jun 8 2018, 3:57 PM
jtl added inline comments to D15706: socket: introduction of destructor callback.
Jun 8 2018, 3:26 PM
jtl added a reviewer for D15706: socket: introduction of destructor callback: network.
Jun 8 2018, 3:26 PM

Jun 7 2018

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

Incorporate review feedback from @jhb.

Jun 7 2018, 4:53 PM
jtl created D15691: Make kernel allocations be non-executable on some platforms.
Jun 7 2018, 4:04 PM
jtl committed rS334783: Fix a typo in vm_domain_set(). When a domain crosses into the severe range,.
Fix a typo in vm_domain_set(). When a domain crosses into the severe range,
Jun 7 2018, 1:32 PM
jtl added a comment to D15686: convert inpcbhash rlock to epoch.

I added a few basic comments while I ponder the rest...

Jun 7 2018, 2:46 AM
jtl added a reviewer for D15686: convert inpcbhash rlock to epoch: glebius.
Jun 7 2018, 2:28 AM