Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
From: Otto Moerbeek Date: Fri, 29 Sep 2023 07:36:08 +0200 > In this caseof a single malloc call you'll get a page that is followed > by unmapped memory as the kernel does that. In general, that may not > happen though, depending on what happended previously (i.e. contents > of the caches used by

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Otto Moerbeek
On Fri, Sep 29, 2023 at 12:11:51PM +0900, Masato Asou wrote: > I am investigating what problems can bt detected with MALLOC_OPTIONS. > SEGV occurs even if MALLOC_OPTIONS=G is not specified. Normally, the > areas allocated by malloc() are not contiguous. However, after many > malloc() operations

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
From: "Theo de Raadt" Date: Thu, 28 Sep 2023 21:43:47 -0600 > Our kernel also has the concept of guard-pages, meaning it will try to > keep a gap of 1 page between mmap() allocations. I didn't know about guard-pages feature. > The way it is coded, it isn't perfect, but it tends to work and > ca

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Theo de Raadt
Our kernel also has the concept of guard-pages, meaning it will try to keep a gap of 1 page between mmap() allocations. The way it is coded, it isn't perfect, but it tends to work and catch some issues.

Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
I am investigating what problems can bt detected with MALLOC_OPTIONS. SEGV occurs even if MALLOC_OPTIONS=G is not specified. Normally, the areas allocated by malloc() are not contiguous. However, after many malloc() operations and not free() these areas, contiguous areas may be allocated. I gues

pfkey: forward after validation

2023-09-28 Thread Tobias Heider
Like with route messages we should really only forward pfkey messages that made it past the validation step. This fixes a lot of possible crashes in ipsecctl -m. ok? diff /home/user/got/co/src commit - 1ce2bc211dba4164679169b9248650fd1d6ba9d2 path + /home/user/got/co/src blob - e750ae8bdbe6819473

ixl witness lock order

2023-09-28 Thread Alexander Bluhm
Hi, There is a lock order problem in ixl(4) show by witness. Here I replaced a wrong net lock with kernel lock. revision 1.84 date: 2022/08/05 13:57:16; author: bluhm; state: Exp; lines: +6 -3; commitid: sAcV6NsO35L03mLS; The netlock for SIOCSIFMEDIA and SIOCGIFM

Re: List tracepoints directly in kdump.1

2023-09-28 Thread Ingo Schwarze
Hi Christian, Christian Weisgerber wrote on Thu, Sep 28, 2023 at 07:01:29PM +0200: > It's always the same: > * foobar doesn't behave as expected > * I ktrace foobar > * I run kdump... too much information. > * I check the kdump(1) man page, since I can't remember which letter > represents which

List tracepoints directly in kdump.1

2023-09-28 Thread Christian Weisgerber
It's always the same: * foobar doesn't behave as expected * I ktrace foobar * I run kdump... too much information. * I check the kdump(1) man page, since I can't remember which letter represents which tracepoint. * "See the -t option of ktrace(1) for the meaning of the letters." Sigh. Yes, dupl

Re: Fix function names in imsg_init.3

2023-09-28 Thread Ingo Schwarze
Hi Lucas, Lucas wrote on Thu, Sep 28, 2023 at 04:07:02PM +: > There is no imsg_seek_set_n{32,64}, but imsg_set_n{32,64}. Committed, thanks. Ingo > diff refs/heads/master 34767f41b5371661bc7d3b47c3f780279d1bcd9c > commit - c7bb30c9e72387bdcf13f2516a8d63c49f7eae54 > commit + 34767f41b537166

Fix function names in imsg_init.3

2023-09-28 Thread Lucas
There is no imsg_seek_set_n{32,64}, but imsg_set_n{32,64}. diff refs/heads/master 34767f41b5371661bc7d3b47c3f780279d1bcd9c commit - c7bb30c9e72387bdcf13f2516a8d63c49f7eae54 commit + 34767f41b5371661bc7d3b47c3f780279d1bcd9c blob - 11915f377f9b38df97bd67ca9b1768962a998637 blob + db3021ed6c199c4fef8f

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

2023-09-28 Thread Vitaliy Makkoveev
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 protect `sc_klist' knotes list too. > > > > Tested with iscsid(8). >

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

2023-09-28 Thread Claudio Jeker
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 protect `sc_klist' knotes list too. > > Tested with iscsid(8). Your diff removes a device_unref(&sc->sc_dev) call in filt_vscsidetach() wh

vscsi(4): make `vscsi_filtops' mpsafe

2023-09-28 Thread Vitaliy Makkoveev
filt_vscsiread() checks `sc_ccb_i2t' protected by `sc_state_mtx' mutex(9), so use it to protect `sc_klist' knotes list too. Tested with iscsid(8). Index: sys/dev/vscsi.c === RCS file: /cvs/src/sys/dev/vscsi.c,v retrieving revision 1.

Re: Buffer overflow in /usr/bin/deroff

2023-09-28 Thread Ingo Schwarze
Hi, up front, thanks for finding and fixing this and sorry for not coming round to testing the patch before commit. Crystal Kolipe wrote on Wed, Sep 27, 2023 at 06:04:01PM -0300: > On Wed, Sep 27, 2023 at 02:05:14PM -0600, Todd C. Miller wrote: >> As written, deroff will not emit a line that doe