Use after free in X config parser

2023-10-05 Thread Crystal Kolipe
This is an interesting one... There is a use after free bug in the X config parser, which can be trivially demonstrated by creating a config file with the first line being a comment and the second line containing invalid syntax: $ echo "#foo\nfoo" > custom_config $ X -config custom_config [...]

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-10-05 Thread S V
чт, 5 окт. 2023 г., 22:17 Mark Kettenis : > > > Really, if those secondary CPUs don't come up, your system is beyond > > > repair. You need to do some low-level debugging at that point and DDB > > > isn't going to help you. So no, let's keep this code as simple as we > > > can. > > > > > > >

Re: fuse(4): make `fuse_rd_filtops' mpsafe

2023-10-05 Thread Vitaliy Makkoveev
ping > On 27 Sep 2023, at 16:07, Vitaliy Makkoveev wrote: > > Introduce `fd_mtx' mutex(9) and use it for `fd_fbufs_in' fuse buffers > queue and `fd_rklist' knotes list protection. > > Index: sys/miscfs/fuse/fuse_device.c > === >

Re: video(4): make `video_filtops' mpsafe

2023-10-05 Thread Vitaliy Makkoveev
ping > On 27 Sep 2023, at 23:19, Vitaliy Makkoveev wrote: > > Introduce `sc_mtx` mutex(9) and use it for `sc_frames_ready' and > `sc_rklist' knotes list protection. > > Index: sys/dev/video.c > === > RCS file:

Re: vscsi(4): make `vscsi_filtops' mpsafe

2023-10-05 Thread Vitaliy Makkoveev
ping > On 28 Sep 2023, at 14:28, Vitaliy Makkoveev wrote: > > On Thu, Sep 28, 2023 at 01:16:17PM +0200, Claudio Jeker wrote: >> On Thu, Sep 28, 2023 at 01:58:45PM +0300, Vitaliy Makkoveev wrote: >>> filt_vscsiread() checks `sc_ccb_i2t' protected by `sc_state_mtx' >>> mutex(9), so use it to

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-10-05 Thread Mark Kettenis
> From: S V > Date: Thu, 5 Oct 2023 12:58:51 +0300 > > чт, 5 окт. 2023 г., 09:59 Mark Kettenis : > > > > > Date: Thu, 5 Oct 2023 04:10:10 + > > > From: Klemens Nanni > > > > > > On Mon, Sep 25, 2023 at 01:33:31PM +, Klemens Nanni wrote: > > > > On Tue, Jul 25, 2023 at 01:30:43PM +0300,

Re: tcp syn cache unlock

2023-10-05 Thread Vitaliy Makkoveev
On Thu, Oct 05, 2023 at 11:09:52AM -0500, Scott Cheloha wrote: > On Thu, Oct 05, 2023 at 12:57:24AM +0200, Alexander Bluhm wrote: > > > > This is a first step to unlock TCP syn cache. The timer function > > is independent of the socket code. That makes it easy to start > > there. > > > > [...]

Re: /bin/ls print format bugs

2023-10-05 Thread Crystal Kolipe
Hi Ingo, On Thu, Oct 05, 2023 at 05:32:07PM +0200, Ingo Schwarze wrote: > In general, ls(1) strives to dynamically determine the required > column width. It already does that for the file size column. > Given that device numbers use the same column, i think the solution > that is cleanest, most

Re: tcp syn cache unlock

2023-10-05 Thread Scott Cheloha
On Thu, Oct 05, 2023 at 12:57:24AM +0200, Alexander Bluhm wrote: > > This is a first step to unlock TCP syn cache. The timer function > is independent of the socket code. That makes it easy to start > there. > > [...] > > Still missing: > - [...] > - Run timer without kernel lock. I am not

Re: /bin/ls print format bugs

2023-10-05 Thread Ingo Schwarze
Hi Crystal, Crystal Kolipe wrote on Tue, Oct 03, 2023 at 06:47:42PM -0300: > Two display format bugs seems to have crept in to ls due to the > addition of scaled human readable values and large minor numbers. I think you are right that the current situation isn't good. Thank you for bringing

Patch: solve IPSEC collisions for IKE1/L2TP peers coming from same IP address

2023-10-05 Thread mathieu . papineau
Hello, This patch allows handling multiple IKE1/L2TP tunnels that come from the same IP address. It happens when clients are behind the same NAT gateway, thus seen using the same IP address. Currently, the issue is that it works for only one client at a time. The idea is to rely on identifiers

Re: ifq_start_task(): purge queue before exit when IFF_RUNNING flag is not set

2023-10-05 Thread David Gwynne
> On 5 Oct 2023, at 21:50, Vitaliy Makkoveev wrote: > > Otherwise `if_snd' could still contain packets. If any of them has > associated data with bumped reference counter, the corresponding > refcnt_finalize() will sleep forever. I don't think we need to > transmit these packets when

ifq_start_task(): purge queue before exit when IFF_RUNNING flag is not set

2023-10-05 Thread Vitaliy Makkoveev
Otherwise `if_snd' could still contain packets. If any of them has associated data with bumped reference counter, the corresponding refcnt_finalize() will sleep forever. I don't think we need to transmit these packets when interface became running again. I don't like this unlocked if_flags check

Re: wg destroy hangs

2023-10-05 Thread Alexander Bluhm
On Thu, Oct 05, 2023 at 07:15:23AM +0200, Kirill Miazine wrote: > > This diff checks IFF_RUNNING flag within while (!ifq_empty()) loop of > > wg_peer_destroy(). If the flag is not set queue will be purged and check > > performed again. I intentionally keep netlock to prevent ifconfig > >

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-10-05 Thread S V
чт, 5 окт. 2023 г., 09:59 Mark Kettenis : > > > Date: Thu, 5 Oct 2023 04:10:10 + > > From: Klemens Nanni > > > > On Mon, Sep 25, 2023 at 01:33:31PM +, Klemens Nanni wrote: > > > On Tue, Jul 25, 2023 at 01:30:43PM +0300, Slava Voronzoff wrote: > > > > Hi, pinging and refreshing this patch

Re: [patch] [arm64] cpu.c patch based on amd64 idea, provides more debug for multicore kernel

2023-10-05 Thread Mark Kettenis
> Date: Thu, 5 Oct 2023 04:10:10 + > From: Klemens Nanni > > On Mon, Sep 25, 2023 at 01:33:31PM +, Klemens Nanni wrote: > > On Tue, Jul 25, 2023 at 01:30:43PM +0300, Slava Voronzoff wrote: > > > Hi, pinging and refreshing this patch > > > > > > What it does: > > > allow arm64 cpus to