tcp(4) sockets are the only sockets which could have NULL `so_pcb' and
we handle this case within tcp_rcvd() handler.
Index: sys/kern/uipc_socket.c
===
RCS file: /cvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.285
diff -u -p -
PRU_ABORT is another candidate to change return type to void. Also
actually we abort only the sockets which are linked to `so_q' or `so_q0'
queues of listening socket. Such sockets have no corresponding file
descriptor and are not accessed from userland, so PRU_ABORT used to
destroy them on listeni
> On 28 Aug 2022, at 20:48, Alexander Bluhm wrote:
>
> Hi,
>
> Since we have no raw_usrreq anymore, we can retire pr_output.
> pfkeyv2 and route can call ther output functions directly.
>
> ok?
>
ok mvs@
> bluhm
>
> Index: net/pfkeyv2.c
>
Another candidate for future refactoring. Except the tcp(4) and unix(4)
cases we do nothing with passed `ub', but in all cases we return no
error.
Index: sys/kern/uipc_usrreq.c
===
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrievin
On Sun, Aug 28, 2022 at 10:42:11PM +0200, Alexander Bluhm wrote:
> On Sun, Aug 28, 2022 at 10:51:31PM +0300, Vitaliy Makkoveev wrote:
> > Another candidate for future refactoring. Except the tcp(4) and unix(4)
> > cases we do nothing with passed `ub', but in all cases we
Index: sys/kern/uipc_usrreq.c
===
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.178
diff -u -p -r1.178 uipc_usrreq.c
--- sys/kern/uipc_usrreq.c 28 Aug 2022 21:35:11 - 1.178
+++ sys/kern/uipc_usrreq.c
PRU_SENDOOB request always consumes passed `top' and `control' mbufs. We
don't want to have dummy m_freem(9) handlers for all protocols, so we
release passed mbufs in the pru_sendoob() EOPNOTSUPP error path.
Also we had the `control' mbuf(9) leak in the tcp(4) PRU_SENDOOB error
path, which was fix
> On 29 Aug 2022, at 20:34, Alexander Bluhm wrote:
>
> Hi,
>
> The diff below is needed to protect the receive socket buffer in
> UDP input with per PCB mutex.
>
> With that, parallel UDP input and soreceive can be activated. There
> are still issues with socket splicing and maybe pipex. So I
Looks good by me.
> On 29 Aug 2022, at 14:15, Alexander Bluhm wrote:
>
> Anyone?
>
> On Sat, Aug 20, 2022 at 03:24:28PM +0200, Alexander Bluhm wrote:
>> Hi,
>>
>> Can we rename the the function in_pcbhashlookup() to in_pcblookup()?
>> Then we have in_pcblookup() and in_pcblookup_listen() as pu
On Tue, Aug 30, 2022 at 03:41:29PM +0200, Alexander Bluhm wrote:
> Hi,
>
> I looks like syzkaller has found a missing input validation in pipex.
>
> https://syzkaller.appspot.com/bug?id=c7ac769bd7ee15549b8a2be188bcee07d98a5357
>
> As I have no pipex setup, can anyone test this diff please?
>
o
Index: sys/kern/uipc_usrreq.c
===
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.181
diff -u -p -r1.181 uipc_usrreq.c
--- sys/kern/uipc_usrreq.c 31 Aug 2022 21:23:02 - 1.181
+++ sys/kern/uipc_usrreq.c
On Thu, Sep 01, 2022 at 05:59:44PM +0200, Alexander Bluhm wrote:
> On Thu, Sep 01, 2022 at 01:27:18AM +0300, Vitaliy Makkoveev wrote:
> > +int
> > +uipc_connect2(struct socket *so, struct socket *so2)
> > +{
> > + struct unpcb *unp = sotounpcb(so), *unp2 = sotoun
The 'proc *' is not used for PRU_CONTROL request, so remove it from
pru_control() wrapper.
I want to use existing in{6,}_control for tcp(4) and udp(4) sockets, so
for inet6 case I introduced `tcp6_usrreqs' and `udp6_usrreqs'
structures. I also want to use them for the following PRU_SOCKADDR and
PR
On Thu, Sep 01, 2022 at 09:00:50PM +0200, Alexander Bluhm wrote:
> On Mon, Aug 15, 2022 at 05:12:22PM +0200, Alexander Bluhm wrote:
> > System calls should not fail due to temporary memory shortage in
> > malloc(9) or pool_get(9).
> >
> > Pass down a wait flag to pru_attach(). During syscall sock
On Thu, Sep 01, 2022 at 10:58:49PM +0300, Vitaliy Makkoveev wrote:
> On Thu, Sep 01, 2022 at 09:00:50PM +0200, Alexander Bluhm wrote:
> > On Mon, Aug 15, 2022 at 05:12:22PM +0200, Alexander Bluhm wrote:
> > > System calls should not fail due to temporary memory shortage in
Introduce in{,6}_sockaddr() and in{,6}_peeraddr() functions, and use
them for all except tcp(4) sockets. Use tcp_sockaddr() and
tcp_peeraddr() functions to keep debug ability.
The key management and route domain sockets returns EINVAL error for
PRU_SOCKADDR request, so keep this behaviour for a wh
We always call in6_setpeeraddr() and never call in_setpeeraddr() fro the
inet6 case.
Index: sys/netinet/in_pcb.c
===
RCS file: /cvs/src/sys/netinet/in_pcb.c,v
retrieving revision 1.273
diff -u -p -r1.273 in_pcb.c
--- sys/netinet/in_pc
On Fri, Sep 02, 2022 at 10:48:56PM +0200, Alexander Bluhm wrote:
> On Fri, Sep 02, 2022 at 05:56:33PM +0300, Vitaliy Makkoveev wrote:
> > Introduce in{,6}_sockaddr() and in{,6}_peeraddr() functions, and use
> > them for all except tcp(4) sockets. Use tcp_sockaddr() and
> > tcp
On Fri, Sep 02, 2022 at 10:46:12PM +0200, Alexander Bluhm wrote:
> On Fri, Sep 02, 2022 at 06:01:20PM +0300, Vitaliy Makkoveev wrote:
> > We always call in6_setpeeraddr() and never call in_setpeeraddr() fro the
> > inet6 case.
>
> Should we do it the other way around?
>
On Fri, Sep 02, 2022 at 11:56:02AM +0200, Alexander Bluhm wrote:
> On Thu, Sep 01, 2022 at 11:04:19PM +0300, Vitaliy Makkoveev wrote:
> > On Thu, Sep 01, 2022 at 10:58:49PM +0300, Vitaliy Makkoveev wrote:
> > > On Thu, Sep 01, 2022 at 09:00:50PM +0200, Alexander Bluhm wrote:
>
The last one.
As for the previous PRU_SOCKADDR, introduce in{,6}_peeraddr() and use it
for inet and inet sockets, except tcp(4).
Also remove *_usrreq() handlers. This makes diff bigger, but I guess we
don't want to commit code like below:
rip_usrreq(struct socket *so, int req, struct mbuf *m, st
> On 4 Sep 2022, at 00:56, Alexander Bluhm wrote:
>
> On Sat, Sep 03, 2022 at 11:20:17PM +0200, Hrvoje Popovski wrote:
>> with this diff while booting I'm getting this witness trace
>
> It is not related to soreceive() diff, but TCP diff I commited
> before. I forgot a mutex initalization which
> On 3 Sep 2022, at 23:47, Alexander Bluhm wrote:
>
> Hi,
>
> The next small step towards parallel network stack is to use shared
> netlock in soreceive(). The UDP and IP divert layer provide locking
> of the PCB. If that is possible, use shared instead of exclusive
> netlock in soreceive().
We have no interest on pru_rcvd() return value. Also, we call pru_rcvd()
only if the socket's protocol have PR_WANTRCVD flag set. Such sockets
are route domain, tcp(4) and unix(4) sockets.
This diff keeps the PR_WANTRCVD check. In other hand we could always
call pru_rcvd() and do "pru_rcvd != NULL
As it was done for udp and divert sockets.
Index: sys/netinet/ip_var.h
===
RCS file: /cvs/src/sys/netinet/ip_var.h,v
retrieving revision 1.104
diff -u -p -r1.104 ip_var.h
--- sys/netinet/ip_var.h3 Sep 2022 22:43:38 -
We have no interest on pru_abort() return value. Also we call it only
through soabort() which is dummy pru_abort() wrapper and has no return
value.
Also only the connection oriented sockets need to implement
(*pru_abort)() handler. Such sockets are tcp(4) and unix(4) sockets, so
we could remove ex
ping
> On 17 Sep 2022, at 22:44, Vitaliy Makkoveev wrote:
>
> We have no interest on pru_abort() return value. Also we call it only
> through soabort() which is dummy pru_abort() wrapper and has no return
> value.
>
> Also only the connection oriented sockets need to im
On Fri, Oct 21, 2022 at 10:28:04AM +, Klemens Nanni wrote:
> All interface ioctls always run with the kernel lock anyway, so this
> doesn't make a difference, except that it reflects how ifnetlist is not
> modified.
>
> OK?
>
netlock could be completely dropped here.
> diff --git a/sys/net/
On Fri, Oct 21, 2022 at 12:14:16PM +, Klemens Nanni wrote:
> On Fri, Oct 21, 2022 at 03:02:33PM +0300, Vitaliy Makkoveev wrote:
> > netlock could be completely dropped here.
>
> We could probably drop the net lock around ifnetlist wherever the kernel
> lock is currently he
Push netlock down to pppx_add_session(). The 'pppx_if' structure has
the `pxi_ready' member to prevent access to incomplete `pxi', so we
don't need to hold netlock during all initialisation process. This
removes potential PR_WAITOK/M_WAITOK allocations impact on packet
processing. Also this removes
Each pflow(4) interface has associated socket, referenced as sc->so. We
set this socket in pflowioctl() which is called with both kernel and net
locks held. In the pflow_output_process() task we do sc->so dereference,
which is protected by kernel lock. But the sosend(), called deeper by
pflow_outpu
guenther@ proposed to split out handlers for SOCK_DGRAM unix(4)
sockets from SOCK_STREAM and SOCK_SEQPACKET.
The diff below introduces `uipc_dgram_usrreqs' to store pointers to
dgram specific handlers.
The dgram pru_shutdown and pru_send handlers were splitted to
uipc_dgram_shutdown() and uipc_dg
The `if_cloners’ list is immutable. You don't need kernel lock
around if_clone_list() call.
> case SIOCIFGCLONERS:
> + KERNEL_LOCK();
> error = if_clone_list((struct if_clonereq *)data);
> + KERNEL_UNLOCK();
> return (error);
With this fi
No reason to keep kernel lock around if_clone_list() call.
> On 8 Nov 2022, at 20:27, Klemens Nanni wrote:
>
> On Tue, Nov 08, 2022 at 08:04:16PM +0300, Vitaliy Makkoveev wrote:
>> The `if_cloners’ list is immutable. You don't need kernel lock
>> around if_clone_lis
> On 8 Nov 2022, at 21:08, Klemens Nanni wrote:
>
> Now properly. How about a single comment block at the top instead of
> repeating it for every struct?
>
>
You forgot to mark [I] `if_cloners’ within net/if.c.
> diff --git a/sys/net/if_var.h b/sys/net/if_var.h
> index 28514a0bfcd..6272be882
> On 8 Nov 2022, at 21:26, Klemens Nanni wrote:
>
> On Tue, Nov 08, 2022 at 09:18:47PM +0300, Vitaliy Makkoveev wrote:
>>> On 8 Nov 2022, at 21:08, Klemens Nanni wrote:
>>>
>>> Now properly. How about a single comment block at the top instead
ok
> On 8 Nov 2022, at 21:38, Klemens Nanni wrote:
>
> On Tue, Nov 08, 2022 at 09:34:36PM +0300, Vitaliy Makkoveev wrote:
>>> On 8 Nov 2022, at 21:26, Klemens Nanni wrote:
>>>
>>> On Tue, Nov 08, 2022 at 09:18:47PM +0300, Vitaliy Makkoveev wrote:
>>
ping...
On Tue, Nov 01, 2022 at 03:16:02PM +0300, Vitaliy Makkoveev wrote:
> Push netlock down to pppx_add_session(). The 'pppx_if' structure has
> the `pxi_ready' member to prevent access to incomplete `pxi', so we
> don't need to hold netlock during all init
ping...
On Fri, Nov 04, 2022 at 10:04:35PM +0300, Vitaliy Makkoveev wrote:
> Each pflow(4) interface has associated socket, referenced as sc->so. We
> set this socket in pflowioctl() which is called with both kernel and net
> locks held. In the pflow_output_process() task we do sc->
uipc_bind() only calls unp_bind(). Also it is the only caller of
unp_bind().
Index: sys/kern/uipc_usrreq.c
===
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.192
diff -u -p -r1.192 uipc_usrreq.c
--- sys/kern/uipc_us
On Mon, Nov 14, 2022 at 09:28:34AM +, Klemens Nanni wrote:
> On Mon, Nov 14, 2022 at 12:11:46PM +0300, Vitaliy Makkoveev wrote:
> > uipc_bind() only calls unp_bind(). Also it is the only caller of
> > unp_bind().
>
> For *_bind() alone this looks like zapping a useless i
We have soreadable() already presented as inline function, but
corresponding sowriteable() is still macro. Also it's no reason to keep
sballoc() and sbfree() as macro.
Index: sys/sys/protosw.h
===
RCS file: /cvs/src/sys/sys/protosw.h,
On Mon, Nov 14, 2022 at 12:00:28PM +, Klemens Nanni wrote:
> On Mon, Nov 14, 2022 at 02:14:27PM +0300, Vitaliy Makkoveev wrote:
> > We have soreadable() already presented as inline function, but
> > corresponding sowriteable() is still macro. Also it's no reason to ke
> On 10 Nov 2022, at 13:54, Klemens Nanni wrote:
>
> Purely mechanical, then in6_control() and in_control() can be pushed
> further individually.
>
> Feedback? OK?
SS_PRIV is immutable, no reason to check it with kernel lock held.
> ---
> sys/kern/sys_socket.c | 2 --
> sys/netinet/in.c |
Kernel lock is always taken when we do access to `pxd_pxis' lists and
`pppx_ifs' tree, so rely on it instead of netlock. The search in
`pppx_ifs' tree has no context switch. We also have no context switch
between the `pxi' free unit search and tree insertion.
Use reference counters to make `pxi' d
On Tue, Nov 22, 2022 at 11:25:55AM +0100, Claudio Jeker wrote:
> On Tue, Nov 22, 2022 at 09:25:08AM +, Stuart Henderson wrote:
> > Need to query (and set $if, which might be used in route commands etc) I
> > think.
> >
>
> I would prefer if people took a step back from configuring interfaces
On Tue, Nov 22, 2022 at 06:28:31AM -0700, Theo de Raadt wrote:
> Vitaliy Makkoveev wrote:
>
> > On Tue, Nov 22, 2022 at 11:25:55AM +0100, Claudio Jeker wrote:
> > > On Tue, Nov 22, 2022 at 09:25:08AM +, Stuart Henderson wrote:
> > > > Need to query (and set
On Wed, Nov 23, 2022 at 08:46:41AM +, Klemens Nanni wrote:
> Mechanical move that "unlocks" the errno(2) cases.
>
> This is another step towards more read-only interface ioctls running
> with the shared net lock alone.
>
> Feedback? OK?
>
Could this be merged with the following non "Mec
On Wed, Nov 23, 2022 at 11:09:31AM +, Klemens Nanni wrote:
> On Wed, Nov 23, 2022 at 11:04:55AM +, Klemens Nanni wrote:
> > > I don't mind them to be two commits but please share both of them at the
> > > same time. Because they should hit the tree at the same time. Changing
> > > header fi
On Wed, Nov 23, 2022 at 02:56:27PM +, Klemens Nanni wrote:
> A single cast-free struct pointer dereference needs no indirection.
> ND_IFINFO() is under _KERNEL.
>
> OK?
>
ok mvs@
> diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
> index 1924c36c813..d6ccfd3a272 100644
> --- a/sys/netin
On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote:
> Do it like the rest of at/detach routines which modify a struct ifnet
> pointer without returning anything.
>
> OK?
>
ok mvs@
> diff --git a/sys/net/if.c b/sys/net/if.c
> index c30d7e30e4f..3cb8bbf9176 100644
> --- a/sys/net/if.c
On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote:
> Hello -
>
> I am seeing splasserts on boot (before kern.splassert=2 can be set) with
> -current.
>
>
>
> spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
> isa0 at pcib0
> isadma0 at isa0
> vga0 at isa0 port 0x3b0/48 i
> On 24 Nov 2022, at 00:47, Claudio Jeker wrote:
>
> On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote:
>> Do it like the rest of at/detach routines which modify a struct ifnet
>> pointer without returning anything.
>>
>> OK?
>>
>> diff --git a/sys/net/if.c b/sys/net/if.c
>> index c
On Wed, Nov 23, 2022 at 09:36:28PM -0700, Theo de Raadt wrote:
> Theo de Raadt wrote:
>
> > > The other, that if both exist,
> > > /etc/hostname.$if will override /etc/hostname.$lladdr.
> >
> > We do need to decide which one is priority, and document that.
> >
> > I am still unsure which is bet
On Thu, Nov 24, 2022 at 01:34:30PM +, Stuart Henderson wrote:
> On 2022/11/24 14:36, Vitaliy Makkoveev wrote:
> > On Wed, Nov 23, 2022 at 09:36:28PM -0700, Theo de Raadt wrote:
> > > Theo de Raadt wrote:
> > >
> > > > > The other, that if both exist,
> On 24 Nov 2022, at 19:20, Theo de Raadt wrote:
>
>> I like to exclude pseudo devices. The pseudo device list is immutable,
>> so we need to get only once during /etc/netstart.
>
> Why do we need to excluse them?
>
> The users will learn when to use this, and when not to.
>
So, I can't use h
On Fri, May 26, 2023 at 01:03:13PM +, Klemens Nanni wrote:
> snmpd(8) and 'pfctl -s Interfaces' dump pf's internal list of interfaces.
>
> pf.conf's 'set skip on ifN' and 'pfctl -F all|Reset' set and clear flags,
> PFI_IFLAG_SKIP being the only flag.
>
> (There's no other usage of these ioctl
On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote:
> mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so
> rtable_walk() could be called with shared netlock.
>
Regardless on sysctl(2) unlocking backout, the netlock around
mrt_sysctl_mfc() could be r
On Wed, May 17, 2023 at 01:08:52PM +0300, Vitaliy Makkoveev wrote:
> Also read-only access to netlock protected data.
>
Regardless on sysctl(2) unlocking backout, the netlock around
mrt_sysctl_vif() could be relaxed to shared netlock.
> Index: sys/netinet/i
On Fri, May 26, 2023 at 05:08:06PM +0200, Alexander Bluhm wrote:
> On Fri, May 26, 2023 at 05:29:58PM +0300, Vitaliy Makkoveev wrote:
> > On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote:
> > > mrt_rtwalk_mfcsysctl() performs read-only access to
On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
> Hi,
>
> I would suggest to rename ifconfig tcprecvoffload to tcplro. Maybe
> it's just because I had to type that long name too often.
>
> With that we have consistent naming:
> # ifconfig ix0 tcplro
> # sysctl net.inet.tcp.tso=1
> On 6 Jun 2023, at 19:37, Chris Cappuccio wrote:
>
> Jan Klemkow [j.klem...@wemelug.de] wrote:
>> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkoveev wrote:
>>> On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
>>>> I would suggest
> On 6 Jun 2023, at 20:29, Alexander Bluhm wrote:
>
> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkoveev wrote:
>> On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
>>> Hi,
>>>
>>> I would suggest to rename ifconfig tcprecvofflo
On Wed, Jun 07, 2023 at 10:19:32AM +1000, David Gwynne wrote:
>
>
> > On 7 Jun 2023, at 06:33, Vitaliy Makkoveev wrote:
> >
> >> On 6 Jun 2023, at 20:29, Alexander Bluhm wrote:
> >>
> >> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkove
In this point, the interface is disconnected from everywhere. No need to
hold netlock for dummy 'nd_ifinfo' release. Netlock is also not needed
for TAILQ_EMPTY(&ifp->if_*hooks) assertions.
Index: sys/net/if.c
===
RCS file: /cvs/src/sy
In this point the interface is already removed from the list of all
interfaces and from the interface index map and all possible
concurrent ioctl() threads finished. Remove this dead code.
Index: sys/net/if.c
===
RCS file: /cvs/src/s
On Wed, Jun 07, 2023 at 01:29:09PM +0200, Alexander Bluhm wrote:
> On Wed, Jun 07, 2023 at 12:59:11PM +0300, Vitaliy Makkoveev wrote:
> > On Wed, Jun 07, 2023 at 10:19:32AM +1000, David Gwynne wrote:
> > >
> > >
> > > > On 7 Jun 2023, at 06:33, Vitaliy M
> On 22 Jun 2023, at 22:50, Alexander Bluhm wrote:
>
> Hi,
>
> I am working on a diff to run UDP input in parallel. Btrace kstack
> analysis shows that SIP hash for PCB lookup is quite expensive.
> When running in parallel we get lock contention on the PCB table
> mutex.
>
> So it results in b
M_TEMP seems unreasonable for interface groups data allocations.
Don't forget to recompile systat(1) and vmstat(8) with new sys/malloc.h.
Index: sys/net/if.c
===
RCS file: /cvs/src/sys/net/if.c,v
retrieving revision 1.700
diff -u -p
On Tue, Jun 27, 2023 at 11:09:32AM +, Klemens Nanni wrote:
> On Tue, Jun 27, 2023 at 01:32:37PM +0300, Vitaliy Makkoveev wrote:
> > M_TEMP seems unreasonable for interface groups data allocations.
>
> After claudio pointed out the wrong type, I thought of the same name,
>
On Tue, Jul 04, 2023 at 03:26:30PM +1000, David Gwynne wrote:
> tl;dr: this adds sec(4) p2p ip interfaces. Traffic in and out of these
> interfaces is protected by IPsec security associations (SAs), but
> there's no flows (security policy database (SPD) entries) associated
> with these SAs. The pol
On Fri, Jul 07, 2023 at 11:48:13AM +0300, Alexander Bluhm wrote:
> Hi,
>
> When we preserve M_TCP_TSO we also must keep ph_mss. In lo(4)
> LRO/TSO this logic was missing. As this may be relevant only for
> weird pf configs that forward from loopback and ifconfig tcplro is
> disabled by default,
On Fri, Jul 07, 2023 at 12:31:02PM +0300, YASUOKA Masahiko wrote:
> Hi,
>
> I'd like to expand the counters in struct mbstat from u_short to u_long.
>
> When I was debugging a mbuf leak, I saw the result of "netstat -m"
> ---
> 28647 mbufs in use:
> 28551 mbufs allocated to data
>
> On 9 Jul 2023, at 15:15, Alexander Bluhm wrote:
>
> Hi,
>
> While testing my ART reference couting fix, I discovered a rtentry
> leak that is triggered by regress/sbin/route and detected with
> btrace(8) refcnt.
>
> The reference returned by rtalloc() must be freed with rtfree() in
> all case
Use per 'wseventvar' structure `mtx' mutex(9) to protect `put' and `get'
circular buffer indexes together with klist data. Not a big deal, but
Xorg will not kernel lock while polling keyboard and mouse events. Also
removed obsolete selinfo.
Feedback, objections, oks?
Not related to this diff, bu
This is a part of my standalone sblock() work. I need this movement
because buffers related SO_SND* and SO_RCV* socket options modification
should be protected with sblock(). However, standalone sblock() has
different lock orders with solock() for receive and send buffers. At
least sblock() for `so
It contains SS_CANTSENDMORE, SS_ISSENDING, SS_CANTRCVMORE and
SS_RCVATMARK bits. Also do `sb_flags' output as hex, it contains flags
too.
Index: sys/kern/uipc_socket.c
===
RCS file: /cvs/src/sys/kern/uipc_socket.c,v
retrieving revisio
On Thu, Jul 20, 2023 at 09:57:00PM +0200, Alexander Bluhm wrote:
> Hi,
>
> I wonder why UDP echo does not work with inetd on 127.0.0.1.
>
> Note that it is default off. One of my regress machines has it
> enabled for other tests. There perl dist/Net-Ping/t/510_ping_udp.t
> expects that UDP echo
On Fri, Jul 21, 2023 at 07:38:17PM +0200, Alexander Bluhm wrote:
> On Thu, Jul 13, 2023 at 02:22:17AM +0300, Vitaliy Makkoveev wrote:
> > This is a part of my standalone sblock() work. I need this movement
> > because buffers related SO_SND* and SO_RCV* socket options modificatio
On Sat, Jul 29, 2023 at 11:16:14AM +0200, Claudio Jeker wrote:
> proc0 aka the swapper does not do anything. So there is no need to wake it
> up. Now the problem is that last time this was tried some inteldrm systems
> did hang during bootup because the drm code unexpectedly depended on this
> wake
This is the culprit:
schedule_timeout_uninterruptible(long timeout)
{
tsleep(curproc, PWAIT, "schtou", timeout);
return 0;
}
On Mon, Jul 31, 2023 at 09:49:30PM +0200, Claudio Jeker wrote:
> On Mon, Jul 31, 2023 at 08:03:41PM +0300, Vitaliy Makkoveev wrote:
> > This is the culprit:
> >
> > schedule_timeout_uninterruptible(long timeout)
> > {
> > tsleep(curproc, PWAIT, "s
On Mon, Jul 31, 2023 at 10:04:44PM +0200, Claudio Jeker wrote:
> On Mon, Jul 31, 2023 at 09:49:30PM +0200, Claudio Jeker wrote:
> > On Mon, Jul 31, 2023 at 08:03:41PM +0300, Vitaliy Makkoveev wrote:
> > > This is the culprit:
> > >
> > > schedule_
On Tue, Aug 01, 2023 at 11:24:01AM +0200, Claudio Jeker wrote:
> Now that the issue in inteldrm was resolved we can finally remove this
> old wakeup of the swapper.
>
> OK?
ok mvs
> --
> :wq Claudio
>
> Index: uvm_meter.c
> ===
>
The only difference is the socket buffer.
As bonus, in the future solock() will be easily replaced by sblock()
instead pushing it down to each SO_SND* and SO_RCV* case.
Index: sys/kern/uipc_socket.c
===
RCS file: /cvs/src/sys/kern/ui
On Tue, Aug 08, 2023 at 10:40:46PM +0200, Alexander Bluhm wrote:
> On Fri, Aug 04, 2023 at 12:38:23AM +0300, Vitaliy Makkoveev wrote:
> > @@ -1856,6 +1856,9 @@ sosetopt(struct socket *so, int level, i
> > case SO_SNDLOWAT:
> >
> On 3 Sep 2023, at 21:08, Alexander Bluhm wrote:
>
> Hi,
>
> Avoid a useless increment and decrement of of the tcp syn cache
> refcount by unexpanding the SYN_CACHE_TIMER_ARM() macro in the timer
> callback.
>
> ok?
>
ok mvs
> bluhm
>
> Index: netinet/tcp_input.c
>
> On 4 Sep 2023, at 16:19, Alexander Bluhm wrote:
>
> Hi,
>
> Variable scs_use is basically counting packet insertions to syn
> cache, so I would prefer type long to exclude overflow on fast
> machines. With the current limits int should be enough, but long
> does not hurt.
>
> It can be negat
> On 4 Sep 2023, at 19:52, Alexander Bluhm wrote:
>
> On Mon, Sep 04, 2023 at 07:22:03PM +0300, Vitaliy Makkoveev wrote:
>>> On 4 Sep 2023, at 16:19, Alexander Bluhm wrote:
>>>
>>> Hi,
>>>
>>> Variable scs_use is basically counting pack
> On 4 Sep 2023, at 23:43, Christian Weisgerber wrote:
>
> Alexander Bluhm:
>
>> Variable scs_use is basically counting packet insertions to syn
>> cache, so I would prefer type long to exclude overflow on fast
>> machines. With the current limits int should be enough, but long
>> does not hurt
Remove the remnants of the leftover selinfo from vnode(9) layer. Just
mechanical replacement because knote(9) API is already used. I don't
want make klist MP safe with this diff.
headers added where is was required. Disabled tmpsfs was
also tested.
ok?
Index: sys/dev/hotplug.c
=
On Fri, Sep 08, 2023 at 07:39:10PM +0200, Alexander Bluhm wrote:
> On Thu, Sep 07, 2023 at 10:32:58PM +0300, Vitaliy Makkoveev wrote:
> > Remove the remnants of the leftover selinfo from vnode(9) layer. Just
> > mechanical replacement because knote(9) API is already used. I don&
Replace selinfo remnants with knote(9) API. Mechanical conversion
because `fuse_rd_filtops' left non MP safe. knote_locked(9) used because
the path covered by kernel lock.
We have some places where selinfo is still used. All of them could be
mechanically converted in this way and obsolete selwakeu
`log_mtx' mutex(9) already used for message buffer protection, so use it
to protect `logread_filtops' too.
ok?
Index: sys/kern/subr_log.c
===
RCS file: /cvs/src/sys/kern/subr_log.c,v
retrieving revision 1.77
diff -u -p -r1.77 subr_lo
On Fri, Sep 15, 2023 at 04:18:13PM +0200, Martin Pieuchot wrote:
> On 11/09/23(Mon) 21:05, Martin Pieuchot wrote:
> > On 06/09/23(Wed) 23:13, Alexander Bluhm wrote:
> > > On Wed, Sep 06, 2023 at 12:23:33PM -0500, Scott Cheloha wrote:
> > > > On Wed, Sep 06, 2023 at 01:04:19PM +0100, Martin Pieuchot
Context switch looks fine here.
Index: sys/dev/pv/hypervic.c
===
RCS file: /cvs/src/sys/dev/pv/hypervic.c,v
retrieving revision 1.19
diff -u -p -r1.19 hypervic.c
--- sys/dev/pv/hypervic.c 11 Apr 2023 00:45:08 - 1.19
+++
Also use this mutex to protect `evqueue_head', `evqueue_tail' and
`evqueue_count'.
Index: sys/dev/hotplug.c
===
RCS file: /cvs/src/sys/dev/hotplug.c,v
retrieving revision 1.23
diff -u -p -r1.23 hotplug.c
--- sys/dev/hotplug.c 8 Sep
On Mon, Sep 18, 2023 at 02:03:08PM +0300, Vitaliy Makkoveev wrote:
> Also use this mutex to protect `evqueue_head', `evqueue_tail' and
> `evqueue_count'.
>
Sorry, the right diff:
Index: sys/dev/hotplug.c
==
On Fri, Sep 22, 2023 at 12:21:42PM +0900, YASUOKA Masahiko wrote:
> A leak may happens when wgpeer is deleted.
>
> ok?
>
ok mvs@
> The state queue should be freeed when wg_peer is destroyed.
> diff from IIJ.
>
> Index: sys/net/if_wg.c
> =
`evqueue' is simple circular buffer. Its pretty enough to set head equal
to tail to make it empty.
Index: sys/dev/hotplug.c
===
RCS file: /cvs/src/sys/dev/hotplug.c,v
retrieving revision 1.24
diff -u -p -r1.24 hotplug.c
--- sys/dev/ho
101 - 200 of 780 matches
Mail list logo