Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects

User Details

User Since
May 28 2014, 2:27 PM (263 w, 5 d)

Recent Activity

Tue, Jun 4

glebius committed rP503436: Unreverse the thread list for 'info threads' internal command. Now it.
Unreverse the thread list for 'info threads' internal command. Now it
Tue, Jun 4, 4:17 AM

Wed, May 29

glebius committed rS348373: In r343857 the referred comment moved to uma_vm_zone_stats()..
In r343857 the referred comment moved to uma_vm_zone_stats().
Wed, May 29, 10:33 PM
glebius committed rS348351: The KVM code also needs a fix similar to r344269..
The KVM code also needs a fix similar to r344269.
Wed, May 29, 3:14 AM

Fri, May 24

glebius committed rS348230: Merge r344481:.
Merge r344481:
Fri, May 24, 6:27 AM

May 16 2019

glebius added a comment to D20109: Need to wait for epoch callbacks to complete before detaching network interface.

I also see that as contrary to intent of epoch.

May 16 2019, 11:32 PM

May 10 2019

glebius committed rS347466: Fix regression from r347375: do not panic when sending an IP multicast.
Fix regression from r347375: do not panic when sending an IP multicast
May 10 2019, 9:51 PM

May 8 2019

glebius committed rS347375: Existense of PCB route caching doesn't allow us to use new fast route.
Existense of PCB route caching doesn't allow us to use new fast route
May 8 2019, 11:39 PM
glebius closed D19804: Use fib4_lookup_nh_ext() in ip_output()..
May 8 2019, 11:39 PM
glebius committed rP501058: This update fixes bug when minidlna stops sending periodic SSDP notifies..
This update fixes bug when minidlna stops sending periodic SSDP notifies.
May 8 2019, 9:41 PM

Apr 16 2019

glebius added a comment to D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

Bjoern, you comment can be reduced to "Packets can be lost anywhere... so let's just drop them instead of further complicating reassembly code". :(

Apr 16 2019, 8:46 PM
glebius added a comment to D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

You didn't convince me guys. Can you please elaborate why removal of an interface should free packets that once came through this interface? Packet has arrived all the way to its last bit, it is legitimate packet. If you think it should be freed, then why are we flushing only fragment reassembly queues? Why don't flush TCP reassembly queues, socket buffers? Ah, we don't usually dereference m_pkthdr.rcvif for these kinds of queues, right, so we don't panic.

Apr 16 2019, 8:40 PM

Apr 15 2019

glebius resigned from D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

Sorry, I withdraw my approval. The more I think about this, the more I dislike it. What the patch does - it fixes the panic in a most straightforward way. But let's look at it from standpoint of network engineer, not kernel developer.

Apr 15 2019, 10:29 PM
glebius accepted D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

Although I still think that the problem of departing ifnets and queued/in-flight mbufs should be solved in a generic way, I'm fine with this patch. It closes one case out of many, but in non-disruptive way.

Apr 15 2019, 3:34 PM

Apr 10 2019

glebius added a comment to D19804: Use fib4_lookup_nh_ext() in ip_output()..

Yes, as a separate change.

Apr 10 2019, 12:00 AM

Apr 9 2019

glebius committed rS346069: Obvious comment correction..
Obvious comment correction.
Apr 9 2019, 10:15 PM

Apr 4 2019

glebius updated the diff for D19804: Use fib4_lookup_nh_ext() in ip_output()..
  • Remove spare, since nh_ia was added.
Apr 4 2019, 10:28 PM
glebius added inline comments to D19804: Use fib4_lookup_nh_ext() in ip_output()..
Apr 4 2019, 10:27 PM

Apr 3 2019

glebius updated the diff for D19804: Use fib4_lookup_nh_ext() in ip_output()..
  • Copy RTF_HOST to NHF_HOST.
  • Export in_ifaddr as nh_ia. This allows to fix ifa packets/bytes accounting
Apr 3 2019, 8:51 PM
glebius updated the diff for D19804: Use fib4_lookup_nh_ext() in ip_output()..

More comments & fix a bug with broadcast.

Apr 3 2019, 8:21 PM
glebius added inline comments to D19804: Use fib4_lookup_nh_ext() in ip_output()..
Apr 3 2019, 8:20 PM
D4794: Remove per-ifa outgoing packet accounting from ip[6]_output. now requires changes to proceed.

After I spent sometime around this code, I support melifaro@'s suggestion.

Apr 3 2019, 8:18 PM

Apr 2 2019

glebius created D19804: Use fib4_lookup_nh_ext() in ip_output()..
Apr 2 2019, 9:26 PM

Mar 25 2019

glebius committed rS345511: Merge r344741:.
Merge r344741:
Mar 25 2019, 6:19 PM

Mar 21 2019

glebius added a comment to D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

I think that while in flight problem can be fixed with epoch, the queueing problem should be fixed in a radical way - do not store mbufs with rcvif in reassembly queues. Just grab the ND_IFINFO(m->m_pkthdr.rcvif)->chlim or whatever you need before putting buffer on queue.

Mar 21 2019, 4:57 PM
glebius requested changes to D19622: Fix panic in network stack due memory use after free in relation to fragmented packets.

I absolutely agree with Bjoern. This is fix for just one particular case of problem that an interface goes away and mbufs pointing at it with m_pkthdr.rcvif are still queued, or worse - in flight. This problem needs to be addressed as a whole.

Mar 21 2019, 4:53 PM
glebius committed rS345381: Always create ipfw(4) hooks as long as module is loaded..
Always create ipfw(4) hooks as long as module is loaded.
Mar 21 2019, 4:15 PM

Mar 17 2019

glebius closed D18951: New pfil(9).
Mar 17 2019, 12:13 PM
glebius committed rS343631: New pfil(9) KPI together with newborn pfil API and control utility..
New pfil(9) KPI together with newborn pfil API and control utility.
Mar 17 2019, 12:13 PM

Mar 15 2019

glebius committed rS345196: Deanonymize thread and proc state enums, so that a userland app can.
Deanonymize thread and proc state enums, so that a userland app can
Mar 15 2019, 6:18 PM

Mar 14 2019

glebius committed rS345166: PFIL_MEMPTR for ipfw link level hook.
PFIL_MEMPTR for ipfw link level hook
Mar 14 2019, 10:52 PM
glebius closed D19357: PFIL_MEMPTR support for ipfw link level hook.
Mar 14 2019, 10:52 PM
glebius committed rS345165: Remove 'dir' argument from dummynet_io(). This makes it possible to make.
Remove 'dir' argument from dummynet_io(). This makes it possible to make
Mar 14 2019, 10:33 PM
glebius committed rS345164: Reduce argument list to ipfw_divert(), as args holds the rule ref and.
Reduce argument list to ipfw_divert(), as args holds the rule ref and
Mar 14 2019, 10:31 PM
glebius committed rS345163: Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info..
Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info.
Mar 14 2019, 10:30 PM
glebius committed rS345162: - Add more flags to ip_fw_args. At this changeset only IPFW_ARGS_IN and.
- Add more flags to ip_fw_args. At this changeset only IPFW_ARGS_IN and
Mar 14 2019, 10:28 PM
glebius committed rS345161: Make second argument of ip_divert(), that specifies packet direction a bool..
Make second argument of ip_divert(), that specifies packet direction a bool.
Mar 14 2019, 10:23 PM
glebius committed rS345160: Simplify ipfw_bpf_mtap2(). No functional change..
Simplify ipfw_bpf_mtap2(). No functional change.
Mar 14 2019, 10:21 PM

Mar 13 2019

glebius updated the diff for D19111: Summary: widen net_epoch coverage up to all packet processing.

Update to cover panics discovered by pf test suite.

Mar 13 2019, 11:19 PM

Mar 12 2019

glebius accepted D19558: pf :Use counter(9) in pf tables..
Mar 12 2019, 9:35 PM
glebius updated the diff for D19357: PFIL_MEMPTR support for ipfw link level hook.
  • Use existing difference between ip and eh pointers to calculate
Mar 12 2019, 8:28 PM

Mar 11 2019

glebius updated the diff for D19357: PFIL_MEMPTR support for ipfw link level hook.

Style - no functional change.

Mar 11 2019, 11:47 PM
glebius updated the diff for D19357: PFIL_MEMPTR support for ipfw link level hook.

Parse VLAN headers.

Mar 11 2019, 11:28 PM
glebius updated the diff for D19357: PFIL_MEMPTR support for ipfw link level hook.

Optionally use m->m_pkthdr.rcvif for iif on output packets.

Mar 11 2019, 10:48 PM
glebius added inline comments to D19357: PFIL_MEMPTR support for ipfw link level hook.
Mar 11 2019, 10:43 PM
glebius updated the diff for D19357: PFIL_MEMPTR support for ipfw link level hook.

Rebase since some changes are already in head.

Mar 11 2019, 10:27 PM
glebius added inline comments to D19357: PFIL_MEMPTR support for ipfw link level hook.
Mar 11 2019, 9:59 PM

Mar 10 2019

glebius committed rS344980: Most Ethernet drivers that potentially can run a pfil(9) hook with.
Most Ethernet drivers that potentially can run a pfil(9) hook with
Mar 10 2019, 5:20 PM
glebius committed rS344979: Properly handle a case when a first filter returns PFIL_REALLOCED, then.
Properly handle a case when a first filter returns PFIL_REALLOCED, then
Mar 10 2019, 5:08 PM

Mar 3 2019

glebius committed rS344741: Remove bogus assert that I added in r319722. It is a legitimate case.
Remove bogus assert that I added in r319722. It is a legitimate case
Mar 3 2019, 6:58 PM

Feb 25 2019

glebius added inline comments to D19340: FFS: allow sendfile(2) to work with block sizes greater than the page size.
Feb 25 2019, 9:59 PM
glebius accepted D19340: FFS: allow sendfile(2) to work with block sizes greater than the page size.
Feb 25 2019, 9:58 PM
glebius created D19357: PFIL_MEMPTR support for ipfw link level hook.
Feb 25 2019, 9:46 PM

Feb 23 2019

glebius committed rS344481: Support struct ip_mreqn as argument for IP_ADD_MEMBERSHIP. Legacy support.
Support struct ip_mreqn as argument for IP_ADD_MEMBERSHIP. Legacy support
Feb 23 2019, 6:03 AM
glebius closed D19276: Support struct ip_mreqn in IP_ADD_MEMBERSHIP..
Feb 23 2019, 6:03 AM

Feb 21 2019

glebius updated the diff for D19111: Summary: widen net_epoch coverage up to all packet processing.
  • In pfi_initialize_vnet() rely on IFNET_RLOCK() which is sx(9) for stability of ifnet and ifgroup lists. First allocate enough pfi_kif structs, then enter epoch and attach them.
  • pfi_get_ifaces() NET_EPOCH_ENTER since pfi_skip_if() traverses ifgroup list.
Feb 21 2019, 12:52 AM

Feb 20 2019

glebius created D19276: Support struct ip_mreqn in IP_ADD_MEMBERSHIP..
Feb 20 2019, 10:56 PM

Feb 18 2019

glebius committed rS344269: With r343051 UMA switched from atomic counts to counter(9) and now kernel.
With r343051 UMA switched from atomic counts to counter(9) and now kernel
Feb 18 2019, 9:27 PM

Feb 15 2019

glebius committed rS344190: Imaginary cat jumped my keyboard!.
Imaginary cat jumped my keyboard!
Feb 15 2019, 11:46 PM
glebius committed rS344188: For 32-bit machines rollback the default number of vnode pager pbufs.
For 32-bit machines rollback the default number of vnode pager pbufs
Feb 15 2019, 11:36 PM
glebius committed rS344139: Merge r343895:.
Merge r343895:
Feb 15 2019, 12:30 AM

Feb 11 2019

glebius added a comment to D19111: Summary: widen net_epoch coverage up to all packet processing.

The plan is to not be in epoch during full ifattach/ifclone event since these events have many places that allocate memory. Needs to be more fine grained. I'll ponder more over that.

Feb 11 2019, 10:39 PM
glebius updated the diff for D19111: Summary: widen net_epoch coverage up to all packet processing.
  • Enter epoch in DAD timer.
  • Revert entering epoch for setsockopt. This needs to be fine grained.
Feb 11 2019, 8:06 PM

Feb 9 2019

glebius committed rS343927: Remove remnants of byte order manipulation, back when FreeBSD stack.
Remove remnants of byte order manipulation, back when FreeBSD stack
Feb 9 2019, 3:00 AM

Feb 8 2019

glebius committed rS343895: Allow some nesting of ng_iface(4) interfaces and add a configuration knob..
Allow some nesting of ng_iface(4) interfaces and add a configuration knob.
Feb 8 2019, 6:19 AM

Feb 7 2019

glebius created D19111: Summary: widen net_epoch coverage up to all packet processing.
Feb 7 2019, 10:40 PM
glebius accepted D19063: mlx5en: add pfil ethernet hook.
Feb 7 2019, 10:26 PM
glebius committed rS343858: Now that there is only one way to allocate a slab, remove uz_slab method..
Now that there is only one way to allocate a slab, remove uz_slab method.
Feb 7 2019, 3:55 AM
glebius committed rS343857: Report cache zones in UMA stats sysctl, that 'vmstat -z' uses. This.
Report cache zones in UMA stats sysctl, that 'vmstat -z' uses. This
Feb 7 2019, 3:32 AM

Feb 3 2019

glebius committed rS343707: Teach pfil_ioctl() about VIMAGE..
Teach pfil_ioctl() about VIMAGE.
Feb 3 2019, 8:28 AM

Feb 2 2019

glebius committed rS343678: Return PFIL_CONSUMED if packet was consumed. While here gather all.
Return PFIL_CONSUMED if packet was consumed. While here gather all
Feb 2 2019, 5:49 AM

Feb 1 2019

glebius committed rS343646: Repair siftr(4): PFIL_IN and PFIL_OUT are defines of some value, relying.
Repair siftr(4): PFIL_IN and PFIL_OUT are defines of some value, relying
Feb 1 2019, 8:10 AM
glebius committed rS343645: Unbreak call to ipf_check(): it expects the out parameter to be 0 or 1..
Unbreak call to ipf_check(): it expects the out parameter to be 0 or 1.
Feb 1 2019, 7:48 AM
glebius committed rS343636: Hopefully fix compilation by other compilers..
Hopefully fix compilation by other compilers.
Feb 1 2019, 12:34 AM
glebius committed rS343635: Fix build without INET6..
Fix build without INET6.
Feb 1 2019, 12:33 AM

Jan 31 2019

glebius committed rS343627: Add new m_ext type for data for M_NOFREE mbufs, which doesn't actually do.
Add new m_ext type for data for M_NOFREE mbufs, which doesn't actually do
Jan 31 2019, 10:37 PM
glebius updated the diff for D18951: New pfil(9).

Rebase on top of r343619.

Jan 31 2019, 10:31 PM
glebius committed rS343619: Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock..
Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock.
Jan 31 2019, 9:05 PM
glebius updated the diff for D18951: New pfil(9).
  • Remove "all rights reserved" from new files.
Jan 31 2019, 8:57 PM
glebius added inline comments to D18951: New pfil(9).
Jan 31 2019, 8:53 PM
glebius updated the diff for D18951: New pfil(9).
  • Obsolete MLINKS.
  • My copyrights.
Jan 31 2019, 7:05 PM
glebius updated the diff for D18951: New pfil(9).

This is a rebase.

Jan 31 2019, 6:23 PM
glebius committed rS343616: In zone_alloc_bucket() max argument was calculated based on uz_count..
In zone_alloc_bucket() max argument was calculated based on uz_count.
Jan 31 2019, 5:52 PM
glebius updated the diff for D18951: New pfil(9).
  • Address ae@ review, fix multiple mismerges and bugs in ip_fw_pfil.
Jan 31 2019, 5:22 PM
glebius added inline comments to D18951: New pfil(9).
Jan 31 2019, 5:19 PM
glebius updated the diff for D18951: New pfil(9).
  • Set max names length to MAXPFILNAME equal to 64.
  • Go through all pfil_run_hooks() and properly compare against PFIL_PASS
Jan 31 2019, 12:28 AM
glebius added inline comments to D18951: New pfil(9).
Jan 31 2019, 12:27 AM

Jan 29 2019

glebius added a comment to D18951: New pfil(9).

Did you happen to do any benchmarking on this? I'd have expected "Sync pfil hooks epoch(9)" to give us a (small) performance improvement, but my initial test shows a small reduction in forwarding performance (with pf loaded).

Jan 29 2019, 10:45 PM
glebius updated the diff for D18951: New pfil(9).
  • Improve wording. [1]
  • Fix two .Nd present. Since mdoc(7) says that .Nd doesn't accept
Jan 29 2019, 4:29 PM
glebius accepted D19006: ipfilter #ifdef cleanup.

Very happy to see this.

Jan 29 2019, 4:28 PM
glebius updated the diff for D18951: New pfil(9).
  • Create /dev/pfil only for the default VNET.
  • Corrections from Mateusz.
  • mandoc -T lint
  • igor
Jan 29 2019, 2:01 AM
glebius added a comment to D18951: New pfil(9).

This panics during the netipsec and pf regression tests:

Jan 29 2019, 1:49 AM
glebius added inline comments to D18951: New pfil(9).
Jan 29 2019, 1:48 AM
glebius added inline comments to D18951: New pfil(9).
Jan 29 2019, 12:43 AM

Jan 25 2019

glebius created D18951: New pfil(9).
Jan 25 2019, 1:13 AM

Jan 24 2019

glebius accepted D18949: Document that `sendfile` will return an invalid value for `sbytes` if provided an invalid address.
Jan 24 2019, 11:18 PM
glebius added inline comments to D18949: Document that `sendfile` will return an invalid value for `sbytes` if provided an invalid address.
Jan 24 2019, 10:33 PM
glebius added a comment to D18623: Address the fact that errors from `copyout(9)` are not properly percolated up on failure.
  1. Remove sbytes from the API.
Jan 24 2019, 2:44 PM
glebius added a comment to D18623: Address the fact that errors from `copyout(9)` are not properly percolated up on failure.

To be clear, this approach induces a certain amount of pain, and it should not be undertaken unless the benefits are worth it. Some justification based on actual users of sendfile() is needed. If it's not worth it, then this problem is just a wart.

Jan 24 2019, 2:40 PM

Jan 16 2019

glebius committed rS343101: Fix mistake in r343030: move nswbuf calculation back to.
Fix mistake in r343030: move nswbuf calculation back to
Jan 16 2019, 8:20 PM
glebius committed rS343100: Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now.
Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now
Jan 16 2019, 8:14 PM