Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

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

Recent Activity

Yesterday

glebius abandoned D60738: net*: remove remnants of caddr_t.

Commited d7cf2e714e29a52264fa4bc67e7d727948003afb

Fri, Oct 16, 11:16 PM
glebius accepted D60738: net*: remove remnants of caddr_t.
Fri, Oct 16, 11:15 PM
glebius updated the diff for D60689: net*: use inlined m_pullup().

Rebase over ng_pppoe fix.

Fri, Oct 16, 11:13 PM
glebius added a comment to D60787: netinet, netinet6: wait for the net epoch before freeing the lltable.

Was detected while running an experimental version of net/frr10 full regression test (topotest).

Fri, Oct 16, 9:29 PM
glebius added a comment to D60787: netinet, netinet6: wait for the net epoch before freeing the lltable.

The NET_EPOCH_WAIT() is actually a crutch. I would agree with this change if we were very close to stable/16. For main, I'd like to make it right. The table shall be freed with deferred free. Do you have a good repro for this panic? I can create this change.

Fri, Oct 16, 9:29 PM
glebius requested review of D60788: ng_pppoe: fix m_pullup() logic.
Fri, Oct 16, 9:25 PM
glebius committed rGd7cf2e714e29: net*: remove remnants of caddr_t (authored by glebius).
net*: remove remnants of caddr_t
Fri, Oct 16, 9:18 PM
glebius committed rG690c3fbbe1ed: mbuf: remove remnants of caddr_t (authored by glebius).
mbuf: remove remnants of caddr_t
Fri, Oct 16, 9:18 PM
glebius committed rG9bcc1e97dda8: ipfw: cleanup SYSINIT(9)s (authored by glebius).
ipfw: cleanup SYSINIT(9)s
Fri, Oct 16, 9:18 PM
glebius closed D60736: mbuf: remove remnants of caddr_t.
Fri, Oct 16, 9:18 PM
glebius closed D59450: loopback: set MTU to IF_MAXMTU.
Fri, Oct 16, 9:18 PM
glebius committed rGa44c11974c82: loopback: set MTU to IF_MAXMTU (authored by glebius).
loopback: set MTU to IF_MAXMTU
Fri, Oct 16, 9:18 PM
glebius closed D60685: ipfw: cleanup SYSINIT(9)s.
Fri, Oct 16, 9:17 PM
glebius accepted D60759: tcp/rack: reject wma_divisor values <= 0.

The change is good as is, of course.

Fri, Oct 16, 9:07 PM
glebius added inline comments to D60759: tcp/rack: reject wma_divisor values <= 0.
Fri, Oct 16, 9:06 PM
glebius added a comment to D60738: net*: remove remnants of caddr_t.

There are many places where memcpy() can be used. I don't want to mix that into this commit.

Fri, Oct 16, 5:23 PM
glebius added a comment to D60759: tcp/rack: reject wma_divisor values <= 0.

I'd suggest to make the variable and the sysctl unsigned.

Fri, Oct 16, 5:19 PM

Thu, Oct 15

glebius added inline comments to D60689: net*: use inlined m_pullup().
Thu, Oct 15, 4:57 AM
glebius updated the diff for D60689: net*: use inlined m_pullup().
  • Rebase over fixed bug in pfsync and over caddr_t cleanup D60738
Thu, Oct 15, 4:55 AM
glebius committed rGf84cdc258430: pfsync: use result of m_pullup() (authored by glebius).
pfsync: use result of m_pullup()
Thu, Oct 15, 4:53 AM
glebius added a comment to D60736: mbuf: remove remnants of caddr_t.

mtodo() is not used widely, I don't yet want to proliferate its use. At least not with this change.

Thu, Oct 15, 4:48 AM
glebius requested review of D60738: net*: remove remnants of caddr_t.
Thu, Oct 15, 4:46 AM
glebius updated the diff for D60736: mbuf: remove remnants of caddr_t.

Use void * where char * isn't needed.

Thu, Oct 15, 4:44 AM

Wed, Oct 14

glebius updated subscribers of D60731: tcp: refactor tcp_autorcvbuf() and associated sysctls.

Note that this conflicts with bugfix from @rrs that we are discussing with @tuexen in email and this revision will be updated.

Wed, Oct 14, 9:08 PM
glebius updated the diff for D60736: mbuf: remove remnants of caddr_t.

Change m_append, m_copyback, m_copydata prototypes to use void *.

Wed, Oct 14, 9:06 PM
glebius added a comment to D60736: mbuf: remove remnants of caddr_t.

Sorry, dropped unfinished diff. Will update.

Wed, Oct 14, 7:59 PM
glebius requested review of D60736: mbuf: remove remnants of caddr_t.
Wed, Oct 14, 7:46 PM
glebius committed rG1da1ad38d073: tests/netpfil: reference manual pages in atf_skip statements (authored by glebius).
tests/netpfil: reference manual pages in atf_skip statements
Wed, Oct 14, 7:35 PM
glebius requested review of D60733: tcp: update the send/recv pipes in hostcache during connection lifetime.
Wed, Oct 14, 6:59 PM
glebius requested review of D60732: tcp: refactor tcp_autosndbuf() and associated sysctls.
Wed, Oct 14, 6:58 PM
glebius requested review of D60731: tcp: refactor tcp_autorcvbuf() and associated sysctls.
Wed, Oct 14, 6:58 PM

Tue, Oct 13

glebius added a comment to D60659: linux: Allow connect() on DGRAM sockets with port 0.

Note: commit message singles out the datagram sockets, but the change applies to all sockets. How does it work on Linux? We should emulate their bug completely.

Tue, Oct 13, 10:07 PM
glebius accepted D60659: linux: Allow connect() on DGRAM sockets with port 0.

Thanks! LGTM Let's get ack from @kib and give some time to emulation people to review.

Tue, Oct 13, 9:33 PM
glebius committed rG90c8c8e45105: netinet: garbage collect __IPPROTO_DIVERT (authored by glebius).
netinet: garbage collect __IPPROTO_DIVERT
Tue, Oct 13, 7:52 PM
glebius committed rGa20bbabe3431: ipfw: re-arrange declarations so that they match comments (authored by glebius).
ipfw: re-arrange declarations so that they match comments
Tue, Oct 13, 7:52 PM
glebius added reviewers for D60702: tests: Add Linuxulator regression test infrastructure: tests, ngie, igoro, olivier, dchagin, kib.
Tue, Oct 13, 7:39 PM
glebius added a comment to D60702: tests: Add Linuxulator regression test infrastructure.

Thanks a lot for this project! It is definitely very valuable. Adding more reviewers.

Tue, Oct 13, 7:38 PM
glebius added a comment to D60659: linux: Allow connect() on DGRAM sockets with port 0.
In D60659#1391791, @kib wrote:

No, we prefer to have flags in sv_sysent to qualify modifications to the common syscall code paths, See the suggestion in D60701 and flags like SV_SIG_DISCIGN

Tue, Oct 13, 4:09 PM
glebius requested changes to D60659: linux: Allow connect() on DGRAM sockets with port 0.

Usually in the kernel when we do Linux compatibility checks we check SV_PROC_ABI(p) == SV_ABI_LINUX. The sockets may outlive the process, so for a worst case we would put the flag on the socket. However in a connect(2) syscall the process is always present. Other important moment is that sockets may also be shared between processes. Weird to share one between a Linux process and FreeBSD process, but possible.

Tue, Oct 13, 4:00 PM
glebius added a comment to D60691: mbuf: move leaf_rcv union farther back in the pkthdr.

No objection.

Tue, Oct 13, 5:56 AM
glebius added inline comments to D60688: mbuf: make m_pullup() an inline over most expected case.
Tue, Oct 13, 5:55 AM
glebius accepted D60664: sbni: Remove the sbni(4) driver.

These were a legend already when I first touched FreeBSD :)

Tue, Oct 13, 5:52 AM
glebius accepted D60690: pfil: prevent tag leak in pfil_fake_mbuf().
Tue, Oct 13, 5:51 AM
glebius added a comment to D60686: mbuf: simplify m_free.

If a packet filter attached a tag to this mbuf and then it (or an other packet filter) called m_free(), then it would not leak before this change. With this change would leak. However, it a packet filter allocated a tag and then nobody called m_free() -- yes, this bug was pre-existing. Thanks for D60690.

Tue, Oct 13, 5:50 AM

Mon, Oct 12

glebius committed R11:25cd6b3c7600: net/norm: use upstream divert(4) patch to make it working on modern FreeBSD (authored by glebius).
net/norm: use upstream divert(4) patch to make it working on modern FreeBSD
Mon, Oct 12, 11:45 PM
glebius requested review of D60689: net*: use inlined m_pullup().
Mon, Oct 12, 11:27 PM
glebius requested review of D60688: mbuf: make m_pullup() an inline over most expected case.
Mon, Oct 12, 11:26 PM
glebius added a comment to D60686: mbuf: simplify m_free.

Okay, indeed this revision would open up the leak described. Normally m_tag_delete_chain is called from UMA destructor that is called via uma_zfree(zone_mbuf, m) and for M_NOFREE mbufs it is called here. AFAIR, those cxgbe's M_NOFREE mbufs were some kind of a pool. The pfil fake mbuf is on stack. So, if this change is combined with adding m_tag_delete_chain to the end of pfil_fake_mbuf, everything should be alright.

pfil_fake_mbuf(...) {
...
...
...
	if (!SLIST_EMPTY(&m.m_pkthdr.tags))
		m_tag_delete_chain(&m, NULL);
}
Mon, Oct 12, 11:15 PM
glebius requested changes to D60686: mbuf: simplify m_free.

Wait please... I think actually this revision would expose the bug I described above.

Mon, Oct 12, 11:09 PM
glebius added a comment to D60686: mbuf: simplify m_free.

I think the only way it can get a tag is via m_pkthdr_init() calling mac_mbuf_init(). But I don't think that mac tags can be used in the pfil fake mbuf path.
I was going to suggest just skipping the call to mac_mbuf_init() for M_NOFREE mbufs

Or are there other ways a tag can get attached there?

Mon, Oct 12, 10:36 PM
glebius accepted D60686: mbuf: simplify m_free.

Looks like pfil(9) in compatibility mode remains the only user of M_NOFREE. And this change hints that pfil_fake_mbuf() actually needs to call m_tag_delete_chain.

Mon, Oct 12, 10:01 PM
glebius added a reviewer for D60685: ipfw: cleanup SYSINIT(9)s: lytboris_gmail.com.
Mon, Oct 12, 7:50 PM
glebius requested review of D60685: ipfw: cleanup SYSINIT(9)s.
Mon, Oct 12, 7:50 PM
glebius added a comment to D60650: carp: Unregister the netlink family without holding carp_mtx.

Here is another idea. I'm sorry that I didn't suggest that before and you already produced a version.

Mon, Oct 12, 7:48 PM
glebius added a comment to D60650: carp: Unregister the netlink family without holding carp_mtx.

I don't like that we may return 0 from MOD_QUIESCE and then return EBUSY from MOD_UNLOAD. I would suggest to keep a global 'static bool carp_unloading` and set it at MOD_QUIESCE when we return 0. Then carp_nl_set shall check this boolean. It should be protected by the carp_sx and carp_modevent should also use this lock.

Mon, Oct 12, 6:57 PM
glebius added inline comments to D60552: ip_encap: Recompute flowid for packets received over tunnel.
Mon, Oct 12, 4:20 AM
glebius added a comment to D60602: iflib: unify prefetching & enable for non-x86.

My intention is to just get prefetching working for arm64 in iflib. His kern_prefetch uses a different level assembly instruction (nt0 in iflib, vs nt1 in rrs code).

Mon, Oct 12, 4:17 AM
glebius added inline comments to D60602: iflib: unify prefetching & enable for non-x86.
Mon, Oct 12, 4:13 AM

Sat, Oct 10

glebius accepted D60589: netgraph/ng_ksocket: Enter epoch on NG_SEND_DATA_ONLY.

This is correct fix, thanks! The commit message should be like this:

Sat, Oct 10, 4:53 PM
glebius added a comment to D60589: netgraph/ng_ksocket: Enter epoch on NG_SEND_DATA_ONLY.

Can you please share the trace? I wonder how did we come with ng_ppp not working in the epoch in the first place.

Sat, Oct 10, 4:37 PM
glebius added inline comments to D60552: ip_encap: Recompute flowid for packets received over tunnel.
Sat, Oct 10, 4:36 PM
glebius committed rG16bc669facc5: libalias: index fully specified inbound links by remote endpoint (authored by paulo_nlink.com.br).
libalias: index fully specified inbound links by remote endpoint
Sat, Oct 10, 3:21 AM
glebius closed D60083: libalias: index fully specified inbound links by remote endpoint.
Sat, Oct 10, 3:21 AM
glebius added inline comments to D60545: pf: Hash rule and pool addresses by type.
Sat, Oct 10, 2:53 AM
glebius accepted D60541: netlink: Make room for the unfinished message when growing the buffer.

Thank for the fix! It is good as is. But feel free to rethink the buffer allocation in general. Netlink initially used mbufs(9), and then I changed that. However, when doing that I didn't invest enough time into thinking on how to properly do that. There could be some bits of logic left that were relevant to mbufs. I mean that if this code was written from scratch and not as a refactor of the very first implementation of netlink it could have been different (better).

Sat, Oct 10, 2:48 AM
glebius added inline comments to D60552: ip_encap: Recompute flowid for packets received over tunnel.
Sat, Oct 10, 2:31 AM
glebius added a comment to D60523: ktls: Do direct dispatch of asynch crypto when possible.

I wonder if you just use THREAD_CAN_SLEEP()?

Sat, Oct 10, 2:14 AM
glebius added a comment to D60523: ktls: Do direct dispatch of asynch crypto when possible.

Pretty sure you meant me, so reviewers updated.

Sat, Oct 10, 2:12 AM
glebius edited reviewers for D60523: ktls: Do direct dispatch of asynch crypto when possible, added: glebius; removed: gleb.
Sat, Oct 10, 2:12 AM
glebius added a comment to D60521: netlink: Let a generic netlink family keep state per socket.

I guess you definitely considering to put list of family specific softcs right on nlpcb. Why did you choose to have list of known socket softcs on a family instead?

Sat, Oct 10, 2:07 AM
glebius added a comment to D60491: netlink: Wait for running handlers before a generic family is freed.

Here is an idea: we can create an unloading mechanism that will queue unload requests to the same taskqueue thread that processes the netlink messages. This will guarantee there are no messages being processed. The actual unload syscall will sleep on the unload request, and the taskqueue will perform the unload, then wake up the syscall.

Sat, Oct 10, 2:02 AM
glebius added a comment to D60491: netlink: Wait for running handlers before a generic family is freed.

The problem is real and patch of course is correct. However, we are adding two atomics per-message to protect against a race that happens only at kldunload(8). This degrades performance for the sake of a problem that only developers and fuzzers hit.

Sat, Oct 10, 1:56 AM

Thu, Oct 8

glebius accepted D60460: tcp: count only the SACK blocks that fit in tcp_maxseg().

Looks correct, but let's check with @rscheff. Thanks!

Thu, Oct 8, 10:21 PM
glebius added reviewers for D60460: tcp: count only the SACK blocks that fit in tcp_maxseg(): tuexen, rscheff.
Thu, Oct 8, 10:20 PM
glebius accepted D55859: kyua: Add external setup and teardown mechanism.

Okay, I'm not a test guy, but throwing in my green light to threaten the rest of the reviewers to actually review the test. So that Igor has more greens and the revision will look closer to being pushed.

Thu, Oct 8, 10:16 PM
glebius added a comment to D60423: tests/netinet: make connect_bound_socket_from_2address_jail self-contained.

Having that patch applied, the udp_bindings:connect_bound_socket_from_2address_jail test case could be wrapped into a jail with pre-configuration like this:

Thu, Oct 8, 10:14 PM
glebius accepted D60083: libalias: index fully specified inbound links by remote endpoint.

Paulo, do you have a public git repo (e.g. github) with your branch? I'd like to take your commit as is (with your name and your commit message) for pushing.

Thu, Oct 8, 10:03 PM
glebius accepted D60488: nd6: Do not allocate an ifaddr for the interface ID in in6_ifadd().
Thu, Oct 8, 9:59 PM

Wed, Oct 7

glebius accepted D60444: sysctl: don't loop when EAGAIN is returned.

Please include in the commit log references to the original phk's commit hashes and maybe our discussion in D60281.

Wed, Oct 7, 4:51 PM
glebius added inline comments to D60083: libalias: index fully specified inbound links by remote endpoint.
Wed, Oct 7, 2:48 AM
glebius updated subscribers of D60281: tcp: improve stack switching.

Wait... Maybe we should understand why userland_sysctl() does this and is it needed at all today? It originates from 7a69d9230f834f562d2c5c36c837e67eacdf5ab3. @phk maybe you can comment on this one?

Wed, Oct 7, 2:24 AM
glebius added a comment to D60281: tcp: improve stack switching.

So what happens here is that the KPI of TCP stack switching is being changed under pressure of one of its consumers that has a special handling of EAGAIN. And we are substituting this EAGAIN to factually incorrect EINVAL. No, the argument is valid, the connection exists it is just its state that doesn't allow the switch (supposedly temporarily).

Wed, Oct 7, 2:20 AM
glebius updated subscribers of D60423: tests/netinet: make connect_bound_socket_from_2address_jail self-contained.

No objection. When writing this test I relied on @igoro and other test team members to deliver a framework where you would describe a jail for a test to be delivered real soon.

Wed, Oct 7, 1:55 AM

Tue, Oct 6

glebius accepted D60388: epair: Make vnet_epair_uninit() run earlier.

The change is correct, but as Pouria noted all the stuff around here is fragile. There could be bugs fixing other bugs :) Let's proceed with this change and see if there is any fallout that needs to be dealt with.

Tue, Oct 6, 4:41 PM
glebius accepted D60390: socket: Remove divert(4) socket compat shim.

Thanks!

Tue, Oct 6, 4:39 PM
glebius accepted D60389: linux: Initialize per-VNET state earlier.
Tue, Oct 6, 4:37 PM
glebius added a comment to D60404: Draft: systm.h: Remove unused <sys/kpilite.h>.

I'm not a voting srcmgr member, so not putting my approval here.

Tue, Oct 6, 4:36 PM
glebius added a comment to D60404: Draft: systm.h: Remove unused <sys/kpilite.h>.

There was a period of time when Mr. Macy was committing a lot of his draft ideas right into svn HEAD. Most of them were never finished or continued. This is one of them.

Tue, Oct 6, 4:33 PM

Mon, Oct 5

glebius added a comment to D60273: jail: declare argument structure of jail(2) with const fields.

Yeah, that's true. I can also imagine a program that would modify a string as a member of struct jail before passing to jail(2). :(

Mon, Oct 5, 8:31 PM
glebius accepted D60247: netinet: Deprecate OSIOCAIFADDR and OSIOCAIFADDR_IN6.
Mon, Oct 5, 8:23 PM

Sat, Oct 3

glebius added a reviewer for D60273: jail: declare argument structure of jail(2) with const fields: Jails.
Sat, Oct 3, 4:40 AM
glebius requested review of D60273: jail: declare argument structure of jail(2) with const fields.
Sat, Oct 3, 4:39 AM

Fri, Oct 2

glebius added inline comments to D60184: netinet6: Fix the OSIOCAIFADDR_IN6 handler.
Fri, Oct 2, 3:08 AM
glebius abandoned D59454: tcp: provide tcp_rttupdated() and call it periodically.

Per discussion with Michael, will do that differently.

Fri, Oct 2, 2:55 AM
glebius committed rG6948f4d5e2b2: sendfile: keep the lowat hack more conservative (authored by glebius).
sendfile: keep the lowat hack more conservative
Fri, Oct 2, 2:55 AM
glebius committed rGe65b7079db12: tcp: use SB_AUTOSIZE flag to tell if socket buffer was set (authored by glebius).
tcp: use SB_AUTOSIZE flag to tell if socket buffer was set
Fri, Oct 2, 2:54 AM
glebius closed D60106: sendfile: keep the lowat hack more conservative.
Fri, Oct 2, 2:54 AM
glebius closed D60105: tcp: use SB_AUTOSIZE flag to tell if socket buffer was set.
Fri, Oct 2, 2:54 AM

Mon, Sep 28

glebius added inline comments to D60106: sendfile: keep the lowat hack more conservative.
Mon, Sep 28, 9:49 PM
glebius requested review of D60106: sendfile: keep the lowat hack more conservative.
Mon, Sep 28, 7:09 PM