Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

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

Recent Activity

Fri, May 29

glebius added reviewers for D57316: src.opts.mk: enable OPENSSL_KTLS by default on riscv64: gallatin, jhb.
Fri, May 29, 12:57 AM

Thu, May 28

glebius requested review of D57291: inpcb: make net.inet.ip.portrange port number limiting sysctls unsigned.
Thu, May 28, 5:09 AM
glebius committed rGd62e8c5c6fdc: inpcb: update inpcb multipath routing information only on success (authored by glebius).
inpcb: update inpcb multipath routing information only on success
Thu, May 28, 5:07 AM
glebius closed D57241: inpcb: a pcb may travel only from the wild hash to exact, not vice versa.
Thu, May 28, 5:07 AM
glebius committed rGca91300c0749: inpcb: a pcb may travel only from the wild hash to exact, not vice versa (authored by glebius).
inpcb: a pcb may travel only from the wild hash to exact, not vice versa
Thu, May 28, 5:07 AM

Wed, May 27

glebius added a comment to D56912: VIRF_KNOTE->V2_KNOTE.

This is supposed to fix this INVARIANTS only panic:

VNASSERT failed: (flags & tounset) == tounset not true at /usr/src/ocafirmware/FreeBSD/sys/kern/vfs_subr.c:7446 (vn_irflag_unset_locked)
0xfffff8047bdb0c08: type VREG state VSTATE_CONSTRUCTED op 0xffffffff812a4508
    usecount 2, writecount 1, refcount 40 seqc users 0
    hold count flags ()
    flags (VIRF_PGREAD|VMP_LAZYLIST) VI_LOCKed
    v_object 0xfffff81a41ace2b0 ref 0 pages 148 cleanbuf 12 dirtybuf 25
    lock type ufs: EXCL by thread 0xfffff806d43d8000 (pid 14038, nginx, tid 104106)
        nlink=1, effnlink=1, size=2350813, extsize=0
        generation=2d3a9092, uid=80, gid=0, flags=0x0
        ino 9003324, on dev nda3p8
panic: vn_irflag_unset_locked: some of the passed flags not set (have 2, passed 512)
Wed, May 27, 6:26 PM
glebius added a reviewer for D57271: install: Bump compare size limit (128MB) to support large binaries: Src Committers.
Wed, May 27, 5:47 PM
glebius accepted D57271: install: Bump compare size limit (128MB) to support large binaries.

Makes sense to me. Thanks for good explanation in the commit message.

Wed, May 27, 5:47 PM
glebius accepted D57230: install: add -z <max_cmp_size> option.
Wed, May 27, 5:45 PM

Tue, May 26

glebius committed rG77fd9e0ceabc: upstream: fix hard-to-reach NULL deref during pubkey auth (authored by djm@openbsd.org <djm@openbsd.org>).
upstream: fix hard-to-reach NULL deref during pubkey auth
Tue, May 26, 7:28 PM
glebius committed rG2750d957870a: tcp: fix TCP_ACCOUNTING build (authored by glebius).
tcp: fix TCP_ACCOUNTING build
Tue, May 26, 5:24 PM
glebius added a comment to D57247: virtio-scsi: handle device capacity change event.

P.S. Oleksandr, if you got review from any other domain expert than Warner, consider this approved by mentor (me).

Tue, May 26, 3:38 PM
glebius resigned from D57247: virtio-scsi: handle device capacity change event.

Not a domain expert, so leaving this 100% to Warner. Code & style wise everything LGTM.

Tue, May 26, 3:37 PM
glebius requested review of D57241: inpcb: a pcb may travel only from the wild hash to exact, not vice versa.
Tue, May 26, 4:06 AM

Mon, May 25

glebius added inline comments to D57230: install: add -z <max_cmp_size> option.
Mon, May 25, 6:26 PM
glebius added a reviewer for D57230: install: add -z <max_cmp_size> option: ziaee.
Mon, May 25, 6:26 PM
glebius added a comment to D57230: install: add -z <max_cmp_size> option.

I'd suggest to split the default increase and the added new option into two separate commits.

Mon, May 25, 6:24 PM
glebius added a comment to D57231: watchdogd: Add -k kenv option to store the process ID..

To me this looks like a more generic problem rather than just the watchdogd's problem. Should every daemon have this feature? Or should we say that /var/run shall be mdmfs(8) on hosts with read-only root?

Mon, May 25, 6:17 PM
glebius added reviewers for D57231: watchdogd: Add -k kenv option to store the process ID.: pjd, jmg.
Mon, May 25, 6:14 PM

Fri, May 22

glebius accepted D57171: netlink: Check for NULL return from npt_alloc().
Fri, May 22, 6:21 PM
glebius accepted D57167: netlink: Fix interface type match.
Fri, May 22, 6:20 PM
glebius added inline comments to D57158: netlink: Avoid undefined behaviour.
Fri, May 22, 4:40 AM

Thu, May 21

glebius added a comment to D57154: net: Fix handling of unmapped user pages in if_getgroup().

The ioctl path shall not use the epoch.

Why? What about the sysctl path?

Thu, May 21, 9:53 PM
glebius added a comment to D57155: tcp: remove ddb(4) support.
In D57155#1309850, @bz wrote:

Unrelated but FYI I recently started to extend show ifnet again which helped me to fix two bugs so far; just in case that's on anyone's list as well.

Thu, May 21, 8:59 PM
glebius updated the diff for D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.
  • Update the ddb(4) handler. The porthash is now empty.
Thu, May 21, 8:59 PM
glebius abandoned D57155: tcp: remove ddb(4) support.
Thu, May 21, 8:53 PM
glebius requested review of D57155: tcp: remove ddb(4) support.
Thu, May 21, 8:12 PM
glebius added a reviewer for D57154: net: Fix handling of unmapped user pages in if_getgroup(): zlei.
Thu, May 21, 8:03 PM
glebius requested changes to D57154: net: Fix handling of unmapped user pages in if_getgroup().

The ioctl path shall not use the epoch. The list is protected by IFNET_WLOCK(). Ideally the IFNET_WLOCK should become a sleepable lock. A temporary solution would be to keep IFNET_WLOCK() as is and allocate a temporary buffer to fill, then unlock and do copyout from this buffer. To make buffer size guessing easier we can track number of members in the V_ifg_head and try to allocate this size.

Thu, May 21, 8:01 PM
glebius added reviewers for D55203: svc_vc.c: Add support for an xp_extpg boolean: melifaro, pouria.
Thu, May 21, 4:56 PM
glebius added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

For this particular patch, I'd suggest the following.

Thu, May 21, 4:55 PM
glebius added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

Sorry for widening the discussion, but I think it is better to discuss this more rather then end up with a quick fix. At Netflix Drew is working on a module that is very different from NFS, but is also a fat source of traffic. We have a very similar function in there.

Thu, May 21, 4:39 PM
glebius added inline comments to D57134: sendfile: Fix bug when using headers with SW KTLS offload.
Thu, May 21, 4:26 PM

Wed, May 20

glebius accepted D57134: sendfile: Fix bug when using headers with SW KTLS offload.
Wed, May 20, 7:34 PM
glebius added a comment to D57104: tcp: improve TCP fast open with source routing.

Of course this gets things a bit more sophisticated. I don't like that syncache_socket() will again pull the ipopts from the mbuf as the syncache_add() already just did. Maybe after the fix try to make this less sophisticated?

Wed, May 20, 7:32 PM
glebius added a comment to D57104: tcp: improve TCP fast open with source routing.

I like Patrick's change more, but maybe with more verbose comment.

Wed, May 20, 7:29 PM
glebius added a comment to D57023: lagg: Fix SIOCSLAGG ioctl.

Is this a quick fix mentioned in D56942 that later is to be refactored to delayed free in lagg protocol detach?

Wed, May 20, 6:32 PM
glebius added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

I don't think this is a right fix. A route lookup now doesn't guarantee the same interface will be used in the future. There is dynamic routing, weighted routing, policy routing, etc etc etc.

Wed, May 20, 6:31 PM
glebius added a reviewer for D55203: svc_vc.c: Add support for an xp_extpg boolean: gallatin.
Wed, May 20, 6:23 PM
glebius added a comment to D56942: lagg: Handle a port count of zero.

I do not see how protocol switching can be fixed without updating protocol pr_attach and pr_detach implementations to be epoch-aware. This means, at minimum:

  1. sc_proto must be loaded/updated using acquire/release semantics.
  2. pr_detach implementations must use deferred free(), i.e., NET_EPOCH_CALL().
Wed, May 20, 6:22 PM
glebius committed rGe924a2c80b9e: netlink: fix unsigned overflow on a truncated message (authored by glebius).
netlink: fix unsigned overflow on a truncated message
Wed, May 20, 2:30 PM
glebius closed D56916: netlink: fix unsigned overflow on a truncated message.
Wed, May 20, 2:30 PM
glebius closed D56915: netlink: factor out compatibility code from inlined function.
Wed, May 20, 2:30 PM
glebius committed rGe145afc9eb91: netlink: factor out compatibility code from inlined function (authored by glebius).
netlink: factor out compatibility code from inlined function
Wed, May 20, 2:30 PM

Mon, May 11

glebius accepted D56947: igmp: Avoid leaving dangling pointers in the state-change queue.

In the commit text, in the phrase it'll drop packets from the queue but fail to remove them, I'd suggest to change drop to free or m_freem.

Mon, May 11, 8:37 PM

Sun, May 10

glebius requested review of D56916: netlink: fix unsigned overflow on a truncated message.
Sun, May 10, 4:29 AM
glebius requested review of D56915: netlink: factor out compatibility code from inlined function.
Sun, May 10, 4:25 AM

Sat, May 9

glebius added a comment to D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.

Do you plan to document this new behavior in bind(2)?

Sat, May 9, 4:02 PM

Tue, May 5

glebius added a comment to D56778: if_vlan: Use the exclusive lock everywhere.

But the integration of net_epoch and preexisting locks is still messy and unclear, and in order to fix that we must first simplify existing locking as much as possible, IMHO.

Tue, May 5, 4:37 PM
glebius accepted D56778: if_vlan: Use the exclusive lock everywhere.

As Zhenlei said, we don't need much parallelism in the configuration path.

Tue, May 5, 4:34 PM
glebius retitled D56706: tests/socket_afinet: make child_bind() return a full spectrum of results from tests/socket_afinet: make child_bind() return a full spectre of results to tests/socket_afinet: make child_bind() return a full spectrum of results.
Tue, May 5, 4:30 PM

May 2 2026

glebius accepted D56764: unix: Make sure we signal EOF on the write side when disconnecting.

Mark, thanks a lot for fixing that. I just started to investigate yesterday, but you were faster. Thanks!

May 2 2026, 3:06 PM

May 1 2026

glebius accepted D56761: tests/carp: Rework unicast_v4.

Thanks for working on this, Zhenlei!

May 1 2026, 9:50 PM
glebius accepted D56759: ping: use CLOCK_REALTIME for ICMP Originate Timestamp.
May 1 2026, 9:43 PM
glebius added a comment to D56743: net/bone-kmods: Add port.

Dave, I'm very sorry for not looking at your earlier submissions. Trust me, this is not a reluctance to add them to the src, but just a lack of time. Would you like me to review your nodes on github or would you prefer to refresh the phabricator revisions where you suggested the nodes to add to src? I will try to find some time.

May 1 2026, 4:08 AM

Apr 30 2026

glebius accepted D56742: devfs: add bpf examples.

Please take into account Mark's suggestion.

Apr 30 2026, 6:49 PM
glebius added a comment to D56742: devfs: add bpf examples.

Sorry for slightly switching context. This actually links to the recent "regression" that I planted. With a new API to get exact list of possible bpf taps, instead of guessing via getifaddrs(3) + list USB buses, the building of the list requires privileges. Previously you could run tcpdump -D without privileges on FreeBSD, now it can't. The wireshark/tcpdump guys think that it is a regression and should be fixed.

Apr 30 2026, 6:48 PM
glebius requested review of D56750: netlink: store osreldate of the process in the netlink pcb.
Apr 30 2026, 5:45 PM
glebius added inline comments to D56322: routing: Add support for route metric.
Apr 30 2026, 3:43 PM
glebius requested review of D56727: tests/netinet/socket_afinet: reduce tautology in test cases names.
Apr 30 2026, 12:57 AM
glebius requested review of D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.
Apr 30 2026, 12:50 AM

Apr 29 2026

glebius closed D56705: inpcb: allow to specify different sizes for port and load balance hashes.
Apr 29 2026, 4:20 PM
glebius committed rG6883b120c537: inpcb: allow to specify different sizes for port and load balance hashes (authored by glebius).
inpcb: allow to specify different sizes for port and load balance hashes
Apr 29 2026, 4:20 PM
glebius closed D56482: inpcb: improve some internal function names.
Apr 29 2026, 4:20 PM
glebius committed rG9b8eb70ca974: inpcb: improve some internal function names (authored by glebius).
inpcb: improve some internal function names
Apr 29 2026, 4:20 PM
glebius added a comment to D56482: inpcb: improve some internal function names.

@markj I adjusted naming per your suggestion. Can you please approve?

Apr 29 2026, 2:37 PM

Apr 28 2026

glebius updated the summary of D56482: inpcb: improve some internal function names.
Apr 28 2026, 9:28 PM
glebius requested review of D56707: tests/socket_afinet: extend bind_connected_port_test to cover more cases.
Apr 28 2026, 9:27 PM
glebius requested review of D56706: tests/socket_afinet: make child_bind() return a full spectrum of results.
Apr 28 2026, 9:26 PM
glebius requested review of D56705: inpcb: allow to specify different sizes for port and load balance hashes.
Apr 28 2026, 9:25 PM
glebius updated the diff for D56482: inpcb: improve some internal function names.
  • Use in_pcblookup_with_lock() instead of in_pcblookup_locked().
Apr 28 2026, 9:24 PM
glebius abandoned D56489: inpcb: remove port hash and relax port "stealing" constraint.

This one to be abandoned as is. An alternative better be a new revision.

Apr 28 2026, 9:18 PM

Apr 27 2026

glebius resigned from D56616: Add ipfw 32-bit KBI detection via ophandler version .

If you find a committer (maybe @ae ?), there is no objection from my side, as the added cruft is isolated to stable/14 and won't travel with us into the future.

Apr 27 2026, 4:16 PM
glebius committed rGb5f4d40951c3: kgss: de-virtualize kgss_gssd_handle (authored by glebius).
kgss: de-virtualize kgss_gssd_handle
Apr 27 2026, 4:12 PM
glebius committed rGf8c8cc64ff0d: kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks (authored by glebius).
kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks
Apr 27 2026, 4:12 PM
glebius committed rG8695b968815f: kgss: remove KGSS_VNET_* macros family (authored by glebius).
kgss: remove KGSS_VNET_* macros family
Apr 27 2026, 4:12 PM
glebius added a comment to D56651: if_awg: Add missing awg_poll() prototype.

I wonder if anybody have actually tested that old mode on this relatively new driver. I wonder if anybody in the world runs with the device polling today at all.

Apr 27 2026, 1:57 AM

Apr 25 2026

glebius added a comment to D56616: Add ipfw 32-bit KBI detection via ophandler version .

Maybe we need kern.trueosreldate added?

Apr 25 2026, 5:52 PM
glebius added a comment to D56616: Add ipfw 32-bit KBI detection via ophandler version .

Appears I was wrong. We have an instrument for jails to fake the kernel version, added in https://reviews.freebsd.org/D1948. With jails configured this way we can't use kern.osreldate to tell ipfw version.

Apr 25 2026, 5:50 PM
glebius added reviewers for D56616: Add ipfw 32-bit KBI detection via ophandler version : imp, jamie, emaste, rpaulo, jhb, allanjude.
Apr 25 2026, 5:50 PM
glebius accepted D56610: tcp: release nic ktls send tags before time wait.

Excellent. Once we have TCP own socket buffer, it could be part of soisdisconnected() method of TCP. Now it just sits next to this call.

Apr 25 2026, 2:59 AM
glebius committed rG4602d45eb3b1: kgss: de-virtualize kgss_gssd_handle (authored by glebius).
kgss: de-virtualize kgss_gssd_handle
Apr 25 2026, 2:57 AM
glebius closed D56562: kgss: de-virtualize kgss_gssd_handle.
Apr 25 2026, 2:57 AM
glebius committed rG2bd2f267f344: kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks (authored by glebius).
kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks
Apr 25 2026, 2:57 AM
glebius closed D56561: kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks.
Apr 25 2026, 2:56 AM
glebius closed D56560: kgss: remove KGSS_VNET_* macros family.
Apr 25 2026, 2:56 AM
glebius committed rG50c5715159f1: kgss: remove KGSS_VNET_* macros family (authored by glebius).
kgss: remove KGSS_VNET_* macros family
Apr 25 2026, 2:56 AM
glebius requested changes to D56616: Add ipfw 32-bit KBI detection via ophandler version .

You don't need a special sysctl for that. You can use kern.osreldate, which is generic sysctl designed exactly for such kind of problems.

Apr 25 2026, 2:52 AM

Apr 24 2026

glebius added a comment to D56616: Add ipfw 32-bit KBI detection via ophandler version .

IMHO, Vova's plan sounds better than a sysctl.

Apr 24 2026, 9:17 PM
glebius added inline comments to D56610: tcp: release nic ktls send tags before time wait.
Apr 24 2026, 9:16 PM
glebius added inline comments to D56610: tcp: release nic ktls send tags before time wait.
Apr 24 2026, 3:32 AM
glebius accepted D56374: ifnet: if_detach(): Fix races with if_vmove().

No objections! Good plan for the stable branches. Thanks!

Apr 24 2026, 3:25 AM

Apr 23 2026

glebius accepted D56559: pf: Document broadcast/multicast forwarding through route-to.

Thanks!

Apr 23 2026, 4:59 PM · pfsense

Apr 22 2026

glebius added a comment to D56559: pf: Document broadcast/multicast forwarding through route-to.
In D56559#1294810, @rcm wrote:

So I think the question is really: are we okay with pf_route
forwarding broadcasts when ip_forward (nominally) doesn't? If yes, then I do agree at least a few lines in the man page be introduced that calls out this difference, and maybe prescribes example rules that can be used to plug any undesirable leaks.

Apr 22 2026, 3:52 PM · pfsense
glebius added a comment to D56562: kgss: de-virtualize kgss_gssd_handle.

For the old way done in FreeBSD-14, the kgss_gssd_handle
would be set NULL when the gssd daemon terminated, at least
when it happened gracefully.

I assume that, for netlink, this never happens?
(ie. Once clnt_nl_create() creates it, it lives forever.)
--> Which means checking for it being non-NULL is a waste

of time?
Apr 22 2026, 2:42 PM
glebius added a comment to D56560: kgss: remove KGSS_VNET_* macros family.

Bjoern, can you please confirm you are fine with the change.

Apr 22 2026, 2:34 PM
glebius added a reviewer for D56560: kgss: remove KGSS_VNET_* macros family: bz.
Apr 22 2026, 2:34 PM

Apr 21 2026

glebius accepted D56563: divert: Define semantics for SO_REUSEPORT_LB on divert sockets.

P.S. Touch to raw_ip.c reminds me of my long desire to move those pointers to some more appropriate place at least.

Apr 21 2026, 8:01 PM
glebius added a comment to D56559: pf: Document broadcast/multicast forwarding through route-to.

I always assumed "policy routing" by packet filters a tool that allows to shoot into ones leg. I can imagine some weird scenarios where people would use pf to actually inject packets where it won't be routed by the normal stack.

Apr 21 2026, 6:18 PM · pfsense
glebius requested review of D56562: kgss: de-virtualize kgss_gssd_handle.
Apr 21 2026, 5:55 PM