Re: BUFSIZ-related pessimization in fvwrite.c

2024-03-29 Thread Christos Zoulas
In article , enh wrote: >(if anyone knows the equivalent freebsd list, please add them --- this >code is the same between all three bsds.) > >Apple patched their copy of the FreeBSD fvwrite.c to change BUFSIZ to >INT_MAX to massively improve the performance of large unbuffered >writes[1], and pat

Re: snmpd: Move SNMPv2-SMI::snmpV2 to application_internal.c

2023-10-29 Thread Martijn van Duren
On Sun, 2023-10-29 at 20:11 +0100, Martijn van Duren wrote: > Similar reasoning and questions as the move of SNMPv2-MIB::snmp. > This moves SNMP-FRAMEWORK-MIB::snmpEngine and > SNMP-USER-BASED-SM-MIB::usmStats from mib.c to application_internal.c, > under SNMPv2-SMI::snmpV2. The reason for this bro

Re: azalia: use HDMI as second fallback

2023-10-29 Thread Peter Hessler
Yes please! On 2023 Oct 29 (Sun) at 14:55:09 +0100 (+0100), Christopher Zimmermann wrote: :Hi, : :for me azalia HDMI audio playback works fine. According to [1] it had or :still has problems. For machines where the default audio should not be :(possibly broken) rsnd/0, but rsnd/1 this can be conf

Re: Removing syscall(2) from libc and kernel

2023-10-29 Thread Theo de Raadt
sent; + int code, error = ENOSYS; u_int nap = 4, nargs; register_t *ap, *args, copyargs[MAXARGS], rval[2]; @@ -103,32 +103,19 @@ swi_handler(trapframe_t *frame) /* Before enabling interrupts, save FPU state */ vfp_save(); - /* Re-enable interrupts if they were enab

Re: relayd.conf.5: less SSL

2023-10-28 Thread Sebastian Benoit
Klemens Nanni(k...@openbsd.org) on 2023.10.26 13:28:42 +: > On Tue, Oct 24, 2023 at 09:09:21AM +0200, Peter N. M. Hansteen wrote: > > On Tue, Oct 24, 2023 at 06:54:30AM +, Klemens Nanni wrote: > > > - parse.y still accepting undocumented "ssl" with a warning since 2014 > > > - more "SSL/TLS

Re: snmpd: don't move back in oid tree when on/below instance below region

2023-10-28 Thread Theo Buehler
On Sat, Oct 28, 2023 at 09:59:25AM +0200, Martijn van Duren wrote: > Right now when we register a region with below that an instance we > can revert back in the tree. When we request below the instance we > currently use appl_region_next() to find the next region and simply > set the to be find oid

Re: libagentx: don't return responses >= searchrange.end

2023-10-28 Thread Theo Buehler
On Sat, Oct 28, 2023 at 09:41:55AM +0200, Martijn van Duren wrote: > In most cases when a region is registered we have the full ownership. > As soon as a region has been registered below prior mentioned region we > could loose ownership halfway through. This case currently isn't fully > tested and

Re: snmpd: reject OIDS equal to searchrange.end

2023-10-28 Thread Martijn van Duren
On Sat, 2023-10-28 at 09:45 +0200, Martijn van Duren wrote: > RFC 2741 section 5.2 states that searchrange.end is non-inclusive. > appl_varbind_valid() and appl_response() currently tests inclusive. > The appl_varbind_valid() case is for backends that support > searchrange.end (like agentx) and the

Re: snmpd: reject OIDS equal to searchrange.end

2023-10-28 Thread Theo Buehler
On Sat, Oct 28, 2023 at 09:45:25AM +0200, Martijn van Duren wrote: > RFC 2741 section 5.2 states that searchrange.end is non-inclusive. > appl_varbind_valid() and appl_response() currently tests inclusive. > The appl_varbind_valid() case is for backends that support > searchrange.end (like agentx)

Re: snmpd; Fix use after free for appl_request_upstream

2023-10-27 Thread Martijn van Duren
On Thu, 2023-10-26 at 21:38 +0200, Theo Buehler wrote: > On Thu, Oct 26, 2023 at 11:51:00AM +0200, Martijn van Duren wrote: > > This case is covered by the new regress' backend_get_toofew and > > backend_get_toomany tests. However, even with MALLOC_OPTIONS cranked > > to the max it's really hard to

Re: Removing syscall(2) from libc and kernel

2023-10-27 Thread Lucas Gabriel Vuotto
On Fri, Oct 27, 2023 at 09:36:25AM -0600, Theo de Raadt wrote: > Index: sys/arch/m88k/m88k/trap.c > === > RCS file: /cvs/src/sys/arch/m88k/m88k/trap.c,v > diff -u -p -u -r1.128 trap.c > --- sys/arch/m88k/m88k/trap.c 2 Aug 2023 06:14:46

Re: Removing syscall(2) from libc and kernel

2023-10-27 Thread Theo de Raadt
egister_t *ap, *args, copyargs[MAXARGS], rval[2]; @@ -103,32 +103,19 @@ swi_handler(trapframe_t *frame) /* Before enabling interrupts, save FPU state */ vfp_save(); - /* Re-enable interrupts if they were enabled previously */ - if (__predict_true((frame->tf_spsr & PSR_I) == 0)

Re: Removing syscall(2) from libc and kernel

2023-10-27 Thread Theo de Raadt
emen .Sh SEE ALSO .Xr errno 2 , .Xr ktrace 2 , -.Xr syscall 2 , .Xr namei 9 , .Xr syscall 9 .Sh HISTORY Index: share/man/man9/syscall.9 === RCS file: /cvs/src/share/man/man9/syscall.9,v diff -u -p -u -r1.15 syscall.9 --- share/ma

Re: bgpd: cleanup optparamlen handling in session_open

2023-10-27 Thread Theo Buehler
On Fri, Oct 27, 2023 at 01:06:31PM +0200, Claudio Jeker wrote: > In the big ibuf API refactor I also broke the optparamlen handling > by using one variable for two things. > > All the size handling in session_open() can be simplified since > ibuf_size() is cheap to call. > > I think the result is

Re: bgpd fix holdtime in session_open

2023-10-27 Thread Theo Buehler
On Fri, Oct 27, 2023 at 11:27:11AM +0200, Claudio Jeker wrote: > While looking for something else I noticed this error. > > The holdtime is written into the buffer with ibuf_add_n16() so the htons() > call is done in the ibuf add call. So there is no need for the htons() > when assigning holdtime.

Re: snmpd: Fix close after protocol error case

2023-10-26 Thread Theo Buehler
On Thu, Oct 26, 2023 at 10:47:36AM +0200, Martijn van Duren wrote: > So here's an elusive one that can be triggered every now and then by the > new regression test. Once an AgentX session is opened and we send an > invalid packet appl_agentx_recv() goes to appl_agentx_free(), since > there's no rec

Re: snmpd; Fix use after free for appl_request_upstream

2023-10-26 Thread Theo Buehler
On Thu, Oct 26, 2023 at 11:51:00AM +0200, Martijn van Duren wrote: > This case is covered by the new regress' backend_get_toofew and > backend_get_toomany tests. However, even with MALLOC_OPTIONS cranked > to the max it's really hard to trigger (I had to run > backend_get_wrongorder, backend_get_to

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-26 Thread Martin Pieuchot
On 26/10/23(Thu) 07:06, Miod Vallat wrote: > > I wonder if the diff below makes a difference. It's hard to debug and it > > might be worth adding a counter for bad swap slots. > > It did not help (but your diff is probably correct). In that case I'd like to put both diffs in, are you ok with tha

Re: relayd.conf.5: less SSL

2023-10-26 Thread Klemens Nanni
On Tue, Oct 24, 2023 at 09:09:21AM +0200, Peter N. M. Hansteen wrote: > On Tue, Oct 24, 2023 at 06:54:30AM +, Klemens Nanni wrote: > > - parse.y still accepting undocumented "ssl" with a warning since 2014 > > - more "SSL/TLS" instead of "TLS" in manual and code comments > > my take would be t

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-26 Thread Miod Vallat
> I wonder if the diff below makes a difference. It's hard to debug and it > might be worth adding a counter for bad swap slots. It did not help (but your diff is probably correct). > Index: uvm/uvm_anon.c > === > RCS file: /cvs/src

Re: ibuf free fd on close

2023-10-25 Thread Theo Buehler
On Tue, Oct 24, 2023 at 04:00:42PM +0200, Claudio Jeker wrote: > On Tue, Oct 24, 2023 at 03:50:47PM +0200, Theo Buehler wrote: > > On Tue, Oct 24, 2023 at 03:01:26PM +0200, Claudio Jeker wrote: > > > When I added ibuf_get_fd() the idea was to make sure that ibuf_free() will > > > close any fd still

Re: malloc: micro optimizations

2023-10-25 Thread Masato Asou
Hi, It works fine for me. ok asou@ -- ASOU Masato From: Otto Moerbeek Date: Wed, 25 Oct 2023 11:04:01 +0200 > Hi, > > a few micro-optimization, including getting rid of some statistics > that are not actualy very interesting. > > Speedup amounts to a few tenths of percents to a few percents,

Re: dhcpd(8): Parse lease database after dropping privileges

2023-10-25 Thread Stephen Fox
Hello, I just wanted to double check if there is any additional feedback on the patch. I am happy to make changes or discuss alternative approaches. Thank you, Stephen On Tue, Oct 3, 2023 at 11:33 PM Stephen Fox wrote: > > Hello, > > I received feedback from deraadt that the first two unveil(2

Re: patch unveil fail

2023-10-25 Thread Alexander Bluhm
On Wed, Oct 25, 2023 at 07:00:28PM +0200, Omar Polo wrote: > On 2023/10/25 13:38:37 +0200, Alexander Bluhm wrote: > > @@ -213,11 +214,27 @@ main(int argc, char *argv[]) > > perror("unveil"); > > my_exit(2); > > } > > - if (filearg[0] != NULL) >

Re: patch unveil fail

2023-10-25 Thread Omar Polo
On 2023/10/25 13:38:37 +0200, Alexander Bluhm wrote: > Index: patch.c > === > RCS file: /data/mirror/openbsd/cvs/src/usr.bin/patch/patch.c,v > diff -u -p -r1.74 patch.c > --- patch.c 19 Jul 2023 13:26:20 - 1.74 > +++ patch.

Re: patch unveil fail

2023-10-25 Thread Todd C . Miller
On Wed, 25 Oct 2023 13:38:37 +0200, Alexander Bluhm wrote: > Since 7.4 patch(1) does not work if an explicit patchfile is given on > command line. > > https://marc.info/?l=openbsd-cvs&m=168941770509379&w=2 OK millert@ - todd

Re: patch unveil fail

2023-10-25 Thread Florian Obser
reads correct, OK florian On 2023-10-25 13:38 +02, Alexander Bluhm wrote: > Hi, > > Since 7.4 patch(1) does not work if an explicit patchfile is given on > command line. > > https://marc.info/?l=openbsd-cvs&m=168941770509379&w=2 > > root@ot14:.../~# patch /usr/src/usr.bin/patch/patch.c patch-unve

Re: IPv4 on ix(4) slow/nothing - 7.4

2023-10-25 Thread Alexander Bluhm
On Thu, Oct 19, 2023 at 04:04:26PM +0200, Jan Klemkow wrote: > On Wed, Oct 18, 2023 at 08:53:44PM +0200, Alexander Bluhm wrote: > > On Wed, Oct 18, 2023 at 08:19:29PM +0200, Mischa wrote: > > > It's indeed something like that: ix -> vlan (tagged) -> veb > > > > When vlan is added to veb, kernel sh

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-25 Thread Klemens Nanni
10/24/23 14:03, Crystal Kolipe пишет: > On Tue, Oct 24, 2023 at 01:44:08AM +, Klemens Nanni wrote: >> Rereading the code, I now question why it checks the 'a' label type at all. >> >> Taking your sd0d example through devboot(): >> >> |#ifdef SOFTRAID >> |/* >> | * Determine the partit

Re: snmpd_metrics: differentiate between hrSWRunName and hrSWRunPath

2023-10-24 Thread Theo Buehler
On Wed, Oct 18, 2023 at 01:49:00PM +0200, Martijn van Duren wrote: > Right now we return the same value for both hrSWRunName and hrSWRunPath. > hrSWRunPath should return the full path of the binary, and hrSWRunName > a description of the running software. > > Afaik there's no proper way to retriev

Re: snmpd_metrics: add HOST-RESOURCES-MIB:hrSWRunPerfTable

2023-10-24 Thread Theo Buehler
On Wed, Oct 18, 2023 at 11:54:06AM +0200, Martijn van Duren wrote: > This diff adds the two entries from the hrSWRunPerfTable: > hrSWRunPerfCPU, and hrSWRunPerfMem. This allows snmptop from the > net-snmp package to work. Math stolen^Wcopied from top/machine.c. > > OK? ok > > martijn@ > > Inde

Re: ibuf free fd on close

2023-10-24 Thread Theo Buehler
> Thanks. Do we have a list of ports that use ibuf / imsg? Here's a list obtained from the nm output of all ports by grepping for '^ibuf_.* U' and '^imsg_.* U', respectively, then weeding out the obvious false positives:: ibuf: mail/opensmtpd-extras,-main net/ladvd imsg: audio/amused devel/go

Re: ibuf free fd on close

2023-10-24 Thread Theo Buehler
On Tue, Oct 24, 2023 at 04:00:42PM +0200, Claudio Jeker wrote: > On Tue, Oct 24, 2023 at 03:50:47PM +0200, Theo Buehler wrote: > > On Tue, Oct 24, 2023 at 03:01:26PM +0200, Claudio Jeker wrote: > > > When I added ibuf_get_fd() the idea was to make sure that ibuf_free() will > > > close any fd still

Re: ibuf free fd on close

2023-10-24 Thread Claudio Jeker
On Tue, Oct 24, 2023 at 03:50:47PM +0200, Theo Buehler wrote: > On Tue, Oct 24, 2023 at 03:01:26PM +0200, Claudio Jeker wrote: > > When I added ibuf_get_fd() the idea was to make sure that ibuf_free() will > > close any fd still on the buffer. This way even if a fd is unexpectedly > > passed nothin

Re: ibuf free fd on close

2023-10-24 Thread Theo Buehler
On Tue, Oct 24, 2023 at 03:01:26PM +0200, Claudio Jeker wrote: > When I added ibuf_get_fd() the idea was to make sure that ibuf_free() will > close any fd still on the buffer. This way even if a fd is unexpectedly > passed nothing will happen. > > That code was disabled at start because userland w

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-24 Thread Crystal Kolipe
On Tue, Oct 24, 2023 at 01:44:08AM +, Klemens Nanni wrote: > Rereading the code, I now question why it checks the 'a' label type at all. > > Taking your sd0d example through devboot(): > > |#ifdef SOFTRAID > | /* > | * Determine the partition type for the 'a' partition of the > |

Re: snmpd [15/16]: When we have an error, all oids must be identical to the request

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:31:20PM +0200, Martijn van Duren wrote: > RFC3416 section 4.2.1 (and others) tells us that if an error occurs the > varbindlist in the response must be identical to the original request. > > There might be other edge-cases here, but let's at least make sure that > the OI

Re: snmpd [14/16]: Validate the returned error code

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:28:12PM +0200, Martijn van Duren wrote: > > Certain error codes are only intended for certain request-types. Add an > appl_error_valid() function to test for this. ok tb

Re: snmpd [13/16]: registered instances must not return below OID

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:25:29PM +0200, Martijn van Duren wrote: > If a backend registers as an instance it must never return OIDs below > their registration. Add a test for this in appl_varbind_valid(). > > OK? ok with a tiny nit inline > > martijn@ > > diff --git a/application.c b/applicat

Re: snmpd [12/16]: Make ab_range in application_agentx explicit 1

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:21:45PM +0200, Martijn van Duren wrote: > appl_agentx_session doesn't set ab_range explicitly to 1, and thus > relies on malloc randomness to set it. Sit it explicitly. ok, but I haven't verified that all the session's members are now initialized. > > OK? > > martijn@

Re: snmpd [11/16]: When a request results in EOMV we must return the requesting OID

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:17:19PM +0200, Martijn van Duren wrote: > According to RFC3416 section 4.2.2 and 4.2.3 case "(2)" when an > endOfMibView is returned the OID must be identical to originally > requested OID. Currently this can fail when the original request > is in a !last registered regio

Re: snmpd [10/16]: Make retries on open session where connection is closed return early

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:13:57PM +0200, Martijn van Duren wrote: > Here's a special case unlikely to be found in the wild: > When opening 2 sessions on an agentx connection (already unusual) and > registering 2 overlapping regions on the different sessions, e.g. by > differing in priority (even m

Re: snmpd [9/16]: Fix range handling with appl_unregister

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:11:18PM +0200, Martijn van Duren wrote: > Right now (un)registering a region with range_subid set to !0 will > fail. Apparently nothing in the wild uses this, but let's fix it. > > This is the unregister part. ok tb

Re: snmpd [8/16]: Fix range handling with appl_register

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:08:00PM +0200, Martijn van Duren wrote: > Right now (un)registering a region with range_subid set to !0 will > fail. Apparently nothing in the wild uses this, but let's fix it. > > This is the register part. ok tb

Re: snmpd [7/16]: Treat agentx-close-pdu with reasonByManager as a parseerror

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 03:03:16PM +0200, Martijn van Duren wrote: > > RFC2741 section 6.2.2 says that reasonByManager can only be used by the > agentx master. Treat this reason as a parseerror. ok tb

Re: snmpd [6/16]: support close reason for appl_agentx_free

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 02:59:52PM +0200, Martijn van Duren wrote: > appl_agentx_free() closes any potential open sessions before closing the > connection and cleaning up. This function is called from multiple > contexts and the current APPL_CLOSE_REASONSHUTDOWN is not always > applicable. Add a se

Re: snmpd [5/16]: Check context existence in appl_agentx_recv

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 02:56:59PM +0200, Martijn van Duren wrote: > application.c checks the context where applicable, but not every > agentx-pdu goes through there (e.g. agentx-ping-pdu). Make sure > we always check the context in appl_agentx_recv() ok tb

Re: snmpd [4/16]: check agentx-pdu-header flags for validity

2023-10-24 Thread Theo Buehler
On Tue, Oct 17, 2023 at 02:54:07PM +0200, Martijn van Duren wrote: > RFC2741 section 6.1 specifies which PDUs can contain which header flags. > Check that that incoming agentx PDUs have valid flags in > appl_agentx_recv(). While here I cleaned up a few log messages some > minor restructuring to pre

Re: relayd.conf.5: less SSL

2023-10-24 Thread Peter N. M. Hansteen
On Tue, Oct 24, 2023 at 06:54:30AM +, Klemens Nanni wrote: > - parse.y still accepting undocumented "ssl" with a warning since 2014 > - more "SSL/TLS" instead of "TLS" in manual and code comments my take would be that while it's fine to streamline the documentation to use the modern terminolog

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Klemens Nanni
using the letter ‘a’. It does imply that other architectures can boot from non-'a' partitions, I've done so myself, you example shows it and I don't intent to change that. > > This change would unexpectedly break them, and it would potentially be quite > painful for a

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Theo de Raadt
Crystal Kolipe wrote: `> Hi Theo, it's a long time since we last conversed. > > On Mon, Oct 23, 2023 at 03:44:17PM -0600, Theo de Raadt wrote: > > What user without OpenBSD experience is booting from 'd'? > > > > Which also poses the question -- what user with OpenBSD experience > > is booting

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Crystal Kolipe
Hi Theo, it's a long time since we last conversed. On Mon, Oct 23, 2023 at 03:44:17PM -0600, Theo de Raadt wrote: > What user without OpenBSD experience is booting from 'd'? > > Which also poses the question -- what user with OpenBSD experience > is booting from 'd'? > > Why? Some disklabel par

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Theo de Raadt
that boot from other RAID partitions. > > This change would unexpectedly break them, and it would potentially be quite > painful for any users who upgrade to 7.5 and find out afterwards that their > machine doesn't boot, because the work-around would likely be to boot the > ra

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Crystal Kolipe
s worked fine on amd64 for a long time, so it's quite possible that people have machines deployed that boot from other RAID partitions. This change would unexpectedly break them, and it would potentially be quite painful for any users who upgrade to 7.5 and find out afterwards that their ma

Re: fix an error in flowspec_get_addr()

2023-10-23 Thread Theo Buehler
On Mon, Oct 23, 2023 at 12:50:39PM +0200, Claudio Jeker wrote: > So flowspec_get_addr() in the IPv6 case is utterly complicated. Indeed. It would probably be worthwhile to add a bit of regress exercising the branches of this function. > Since matching can be done on some sub-part of the prefix. >

Re: boot loaders: softraid volumes must be on RAID partitions

2023-10-23 Thread Klemens Nanni
10/16/23 04:02, Klemens Nanni пишет: > The current check implies one could use, e.g. SWAP or MSDOS partitions > as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID, > thus using chunks with different partition types is not possible: > > # vmctl create -s100M disk.img >

Re: Term::Cap full revamp

2023-10-22 Thread Matthieu Herrb
On Fri, Oct 20, 2023 at 11:52:25AM +0200, Marc Espie wrote: > I guess i will probably leave it alone after this. > This does quite a few things compared to my former patches. > > - totally get rid of eval, it doen't make sense anymore > - declare variables before they get used, which tends to > si

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-22 Thread Martin Pieuchot
On 22/10/23(Sun) 20:29, Miod Vallat wrote: > > On 21/10/23(Sat) 14:28, Miod Vallat wrote: > > > > Stuart, Miod, I wonder if this also help for the off-by-one issue you > > > > are seeing. It might not. > > > > > > It makes the aforementioned issue disappear on the affected machine. > > > > Thank

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-22 Thread Miod Vallat
> On 21/10/23(Sat) 14:28, Miod Vallat wrote: > > > Stuart, Miod, I wonder if this also help for the off-by-one issue you > > > are seeing. It might not. > > > > It makes the aforementioned issue disappear on the affected machine. > > Thanks at lot for testing! Spoke too soon. I have just hit p

Re: nfsd: don't clear SB_NOINTR flag

2023-10-22 Thread Vitaliy Makkoveev
On Fri, Oct 20, 2023 at 10:51:46PM +0200, Alexander Bluhm wrote: > On Mon, Oct 16, 2023 at 10:17:50PM +0300, Vitaliy Makkoveev wrote: > > This socket comes from userland, so this flag is never set. This makes > > SB_NOINTR flag immutable, because we only set this bit on NFS client > > socket buffer

Re: relayd does not delete control socket on shutdown

2023-10-22 Thread Theo de Raadt
Otto Moerbeek wrote: > On Sat, Oct 21, 2023 at 10:40:45PM +0300, Kapetanakis Giannis wrote: > > > On 21/10/2023 20:39, Florian Obser wrote: > > > Which was 8 years ago. I don't understand why you see a change in 7.4. > > > > > > Anyway, we decided to not clean up control sockets in any of our >

Re: relayd does not delete control socket on shutdown

2023-10-22 Thread Otto Moerbeek
On Sat, Oct 21, 2023 at 10:40:45PM +0300, Kapetanakis Giannis wrote: > On 21/10/2023 20:39, Florian Obser wrote: > > Which was 8 years ago. I don't understand why you see a change in 7.4. > > > > Anyway, we decided to not clean up control sockets in any of our > > privsep daemons because leaving

Re: malloc: more info in error message for write-after-free with option D

2023-10-22 Thread Masato Asou
size; > > + if (DO_STATS) { > + struct region_info *r = find(d, bp->page); > + STATS_SETFN(r, k, d->caller); > + } > + > k *= B2ALLOC(bp->bucket); > > p = (char *)bp->page + k; > @@ -1194,8 +1220,8 @@ validate_c

Re: bt(5), btrace(8): execute END probe and print maps after exit() statement

2023-10-21 Thread Scott Cheloha
On Sat, Oct 21, 2023 at 07:17:05PM +0200, Martin Pieuchot wrote: > On 18/10/23(Wed) 12:56, Scott Cheloha wrote: > > Hi, > > > > A bt(5) exit() statement causes the btrace(8) interpreter to exit(3) > > immediately. > > > > A BPFtrace exit() statement is more nuanced: the END probe is executed > >

Re: Virtio fix for testing

2023-10-21 Thread Andrew Cagney
On Mon, 21 Aug 2023 at 15:31, Andrew Cagney wrote: > > On Sun, 20 Aug 2023 at 06:23, Stefan Fritsch wrote: > > > > Am 13.08.23 um 17:38 schrieb Tobias Heider: > > You could try something like > > > > -device virtio-scsi-pci,id=scsi > > -drive file=install73.iso,format=raw,id=cdinst,if=none > > -

Re: relayd does not delete control socket on shutdown

2023-10-21 Thread Kapetanakis Giannis
On 21/10/2023 20:39, Florian Obser wrote: Which was 8 years ago. I don't understand why you see a change in 7.4. Anyway, we decided to not clean up control sockets in any of our privsep daemons because leaving them behind does not cause any issues. I just noticed it today when I tried to use t

Re: relayd does not delete control socket on shutdown

2023-10-21 Thread Florian Obser
On 2023-10-21 14:49 +03, Kapetanakis Giannis wrote: > Rev 1.140 by florian@ seems to have changed that. > > Do not try to unlink the control socket in an unprivileged child > process on shutdown. > Found while working ontame(2) . > OK benno@ > Which was 8 years ago

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-21 Thread Martin Pieuchot
On 21/10/23(Sat) 14:28, Miod Vallat wrote: > > Stuart, Miod, I wonder if this also help for the off-by-one issue you > > are seeing. It might not. > > It makes the aforementioned issue disappear on the affected machine. Thanks at lot for testing! > > Comments, ok? > > > diff --git sys/uvm/uvm_

Re: bt(5), btrace(8): execute END probe and print maps after exit() statement

2023-10-21 Thread Martin Pieuchot
On 18/10/23(Wed) 12:56, Scott Cheloha wrote: > Hi, > > A bt(5) exit() statement causes the btrace(8) interpreter to exit(3) > immediately. > > A BPFtrace exit() statement is more nuanced: the END probe is executed > and the contents of all maps are printed before the interpreter exits. > > This

Re: Prevent off-by-one accounting hang in out-of-swap situations

2023-10-21 Thread Miod Vallat
> Stuart, Miod, I wonder if this also help for the off-by-one issue you > are seeing. It might not. It makes the aforementioned issue disappear on the affected machine. > Comments, ok? > diff --git sys/uvm/uvm_pdaemon.c sys/uvm/uvm_pdaemon.c > index 284211d226c..a26a776df67 100644 > --- sys/uvm

Re: relayd does not delete control socket on shutdown

2023-10-21 Thread Kapetanakis Giannis
Rev 1.140 by florian@ seems to have changed that. Do not try to unlink the control socket in an unprivileged child process on shutdown. Found while working ontame(2) . OK benno@ G On 21/10/2023 14:41, Kapetanakis Giannis wrote: After 7.4 relayd does not unlink

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-21 Thread Stuart Henderson
On 2023/10/21 09:31, Silamael Darkomen wrote: > On 20 Oct 2023 19:33, Stuart Henderson wrote: > > After a few hours digging around, I eventually figured out where the > > relevant sockets are created and have added a patch (to 7.4-stable and > > -current) to bump buffers on them. > > Hi Stuart, >

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-21 Thread Silamael Darkomen
On 20 Oct 2023 19:33, Stuart Henderson wrote: After a few hours digging around, I eventually figured out where the relevant sockets are created and have added a patch (to 7.4-stable and -current) to bump buffers on them. Hi Stuart, Meanwhile I also did some digging and opened a bug at Squid wi

Re: nfsd: don't clear SB_NOINTR flag

2023-10-20 Thread Alexander Bluhm
On Mon, Oct 16, 2023 at 10:17:50PM +0300, Vitaliy Makkoveev wrote: > This socket comes from userland, so this flag is never set. This makes > SB_NOINTR flag immutable, because we only set this bit on NFS client > socket buffers for all it's lifetime. > > I want to do this because this flag modifie

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-20 Thread Stuart Henderson
After a few hours digging around, I eventually figured out where the relevant sockets are created and have added a patch (to 7.4-stable and -current) to bump buffers on them.

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-20 Thread Stuart Henderson
On 2023/10/20 13:57, Stuart Henderson wrote: > On 2023/10/19 15:09, Silamael Darkomen wrote: > > Hi, > > > > Today I upgraded to the brand new Squid version 6.3 from ports and noticed, > > that Squid no longer starts properly if configured with multiple worker > > processes. > > > > After some de

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-20 Thread Stuart Henderson
On 2023/10/19 15:09, Silamael Darkomen wrote: > Hi, > > Today I upgraded to the brand new Squid version 6.3 from ports and noticed, > that Squid no longer starts properly if configured with multiple worker > processes. > > After some debugging the limit from net.unix.dgram.sendspace came up as >

Re: HAMMER2 filesystem for OpenBSD

2023-10-20 Thread Stuart Henderson
On 2023/10/20 11:51, Chris Narkiewicz wrote: > On Thu, 2023-10-19 at 15:03 +0200, Denis Fondras wrote: > > > > https://marc.info/?l=openbsd-misc&m=169272174500676&w=2 > > > > > > Thank you, I missed that one. > > So the key piece of information from that thread is that > Kusumi's implementatio

Re: HAMMER2 filesystem for OpenBSD

2023-10-20 Thread Chris Narkiewicz
On Thu, 2023-10-19 at 15:03 +0200, Denis Fondras wrote: > > https://marc.info/?l=openbsd-misc&m=169272174500676&w=2 > > Thank you, I missed that one. So the key piece of information from that thread is that Kusumi's implementation of HAMMER2 for OpenBSD is read-only. Cheers, Chris

Re: 7.3: Squid 6.3 with multiple workers - net.unix.dgram.sendspace too low

2023-10-19 Thread Claudio Jeker
On Thu, Oct 19, 2023 at 03:09:08PM +0200, Silamael Darkomen wrote: > Hi, > > Today I upgraded to the brand new Squid version 6.3 from ports and noticed, > that Squid no longer starts properly if configured with multiple worker > processes. > > After some debugging the limit from net.unix.dgram.se

Re: 7.3: Squid 6.3 with multiple workers not starting - net.unix.dgram.sendspace too low

2023-10-19 Thread Silamael Darkomen
On 19 Oct 2023 16:36, Silamael Darkomen wrote: Hi, I just upgraded to Squid 6.3 under 7.3 and noticed that it no longer starts if configured to use multiple worker processes. After some debugging I found that net.unix.dgram.sendspace with its 2k limit is the reason. Squid uses Unix sockets f

Re: snmpd: remove filter-pf-addresses support

2023-10-19 Thread Theo Buehler
On Thu, Oct 19, 2023 at 04:13:41PM +0200, Martijn van Duren wrote: > OpenBSD 7.4 is here. upgrade72.html already mentions it's deprecation. > > OK? ok > > martijn@ > > Index: parse.y > === > RCS file: /cvs/src/usr.sbin/snmpd/parse

Re: IPv4 on ix(4) slow/nothing - 7.4

2023-10-19 Thread Jan Klemkow
On Wed, Oct 18, 2023 at 08:53:44PM +0200, Alexander Bluhm wrote: > On Wed, Oct 18, 2023 at 08:19:29PM +0200, Mischa wrote: > > It's indeed something like that: ix -> vlan (tagged) -> veb > > When vlan is added to veb, kernel should disable LRO on ix. > All testing before release did not find this

Re: HAMMER2 filesystem for OpenBSD

2023-10-19 Thread Denis Fondras
Le Tue, Oct 17, 2023 at 10:14:25PM +0100, Chris Narkiewicz a écrit : > Hi, > > Tomohiro Kusumi is currently working on HAMMER2 implementation > for OpenBSD, FreeBSD and NetBSD. > > The repository is here: > https://github.com/kusumi/openbsd_hammer2 > > > He maintains repositories for NetBSD, Fr

Re: bgpd convert rtr_proto.c to new ibuf API

2023-10-19 Thread Theo Buehler
On Thu, Oct 19, 2023 at 01:26:49PM +0200, Claudio Jeker wrote: > On Thu, Oct 19, 2023 at 12:59:17PM +0200, Theo Buehler wrote: > > On Thu, Oct 19, 2023 at 10:41:07AM +0200, Claudio Jeker wrote: > > > More ibuf cleanup. rtr_proto.c still uses ibuf_add() where it could use > > > the new functions. >

Re: bgpd convert rtr_proto.c to new ibuf API

2023-10-19 Thread Claudio Jeker
On Thu, Oct 19, 2023 at 12:59:17PM +0200, Theo Buehler wrote: > On Thu, Oct 19, 2023 at 10:41:07AM +0200, Claudio Jeker wrote: > > More ibuf cleanup. rtr_proto.c still uses ibuf_add() where it could use > > the new functions. > > > > Two bits I'm unsure about: > > - I had to change some sizeof() t

Re: bgpd convert rtr_proto.c to new ibuf API

2023-10-19 Thread Theo Buehler
On Thu, Oct 19, 2023 at 10:41:07AM +0200, Claudio Jeker wrote: > More ibuf cleanup. rtr_proto.c still uses ibuf_add() where it could use > the new functions. > > Two bits I'm unsure about: > - I had to change some sizeof() to use native types (I especially dislike > the sizeof(struct rtr_header)

Re: log.c use buffered IO

2023-10-18 Thread Theo Buehler
On Wed, Oct 18, 2023 at 11:34:09AM +0200, Claudio Jeker wrote: > On Tue, Oct 17, 2023 at 10:06:54AM +0200, Sebastian Benoit wrote: > > Theo Buehler(t...@theobuehler.org) on 2023.10.17 09:13:15 +0200: > > > On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > > > > I dislike how log.c do

Re: installer: support encryption with key disks

2023-10-18 Thread Andrew Hewus Fresh
On Mon, Oct 16, 2023 at 07:46:10PM +, Klemens Nanni wrote: > On Mon, Sep 04, 2023 at 09:57:40PM +, Klemens Nanni wrote: > > Extend the yes/no question to no/passphrase/keydisk and have users pick an > > existing, preformated RAID partition; no support (yet) for creating one. > > > > Thank

Re: dwge(4): don't panic on truncated input packet

2023-10-18 Thread Mark Kettenis
> Date: Wed, 18 Oct 2023 16:40:20 + > From: Miod Vallat > > I had the misfortune of hitting a KASSERT in dwge: > > panic: kernel diagnostic assertion "len > 0" failed: file > "/usr/src/sys/dev/fdt > /if_dwge.c", line 1102 > Stopped at panic+0x106:addia0,zero,256TIDPID

Re: better fix for Term::Cap

2023-10-18 Thread Andrew Hewus Fresh
On Wed, Oct 18, 2023 at 10:25:59AM +0200, Marc Espie wrote: > Instead of an archaic limit, just keep track of tc's. > This is actually slightly faster, because the termcap links is a tree, > not a list. I like it, but I don't want to carry this patch against upstream. I will happily pull in this

Re: TSO for ixl(4)

2023-10-18 Thread Alexander Bluhm
On Wed, Oct 18, 2023 at 05:29:41PM +0200, Jan Klemkow wrote: > This diff implements TCP Segmentation Offloading for ixl(4). I tested > it successfully on amd64 and sparc64 with Intel X710. It should > increase the TCP bulk performance to 10 Gbit/s. On sparc64 I got an > increase from 600 MBit/s

Re: bgpd session.c convert to new ibuf API

2023-10-18 Thread Theo Buehler
On Wed, Oct 18, 2023 at 05:19:29PM +0200, Claudio Jeker wrote: > This is a bit overdue. Convert session.c to also use the new ibuf API. > This simplifies some code since there is no need for local variables. > Also kill the struct msg_header and especially msg_open. The are of very > little use. >

Re: smtpd: implement nullmx RFC 7505

2023-10-18 Thread Philipp
[2023-10-18 11:42] Omar Polo > On 2023/10/18 08:40:14 +0100, Stuart Henderson wrote: > > On 2023/10/17 22:27, Philipp wrote: > > > [2023-10-17 17:32] Omar Polo > > > > [...] > > > > But I don't think your proposed patch is a good solution, because the > > > result depend on the order of the RR i

Re: IPv4 on ix(4) slow/nothing - 7.4

2023-10-18 Thread Mischa Peters
> On Oct 18, 2023, at 15:44, Hrvoje Popovski wrote: > > On 18.10.2023. 15:35, Mischa wrote: >> Hi All, >> >> Just upgraded a couple of machines to 7.4. smooth as always!! >> >> I am however seeing issues with IPv4, slowness or no throughput at all. >> The machines I have upgraded are using a

Re: IPv4 on ix(4) slow/nothing - 7.4

2023-10-18 Thread Hrvoje Popovski
On 18.10.2023. 15:35, Mischa wrote: > Hi All, > > Just upgraded a couple of machines to 7.4. smooth as always!! > > I am however seeing issues with IPv4, slowness or no throughput at all. > The machines I have upgraded are using an Intel X540-T network card and > is connected on 10G. > > ix0 at

Re: smtpd: implement nullmx RFC 7505

2023-10-18 Thread Omar Polo
On 2023/10/18 08:40:14 +0100, Stuart Henderson wrote: > On 2023/10/17 22:27, Philipp wrote: > > [2023-10-17 17:32] Omar Polo > > > There is one part of the RFC7505 that I'd like to quote and discuss > > > with you however. The last paragraph of the section 3 says: > > > > > > : A domain that adv

Re: log.c use buffered IO

2023-10-18 Thread Claudio Jeker
On Tue, Oct 17, 2023 at 10:06:54AM +0200, Sebastian Benoit wrote: > Theo Buehler(t...@theobuehler.org) on 2023.10.17 09:13:15 +0200: > > On Mon, Oct 16, 2023 at 12:19:17PM +0200, Claudio Jeker wrote: > > > I dislike how log.c does all these asprintf() calls with dubious > > > workaround calls in ca

Re: smtpd: implement nullmx RFC 7505

2023-10-18 Thread Stuart Henderson
On 2023/10/17 22:27, Philipp wrote: > [2023-10-17 17:32] Omar Polo > > > > There is one part of the RFC7505 that I'd like to quote and discuss > > with you however. The last paragraph of the section 3 says: > > > > : A domain that advertises a null MX MUST NOT advertise any other MX > > : RR. > >

Re: Why store pointers for some functions in malloc.c?

2023-10-17 Thread Masato Asou
From: Otto Moerbeek Date: Wed, 18 Oct 2023 07:28:47 +0200 > On Wed, Oct 18, 2023 at 09:23:49AM +0900, Masato Asou wrote: > >> Hello tech@ and otto, >> >> Why do only some calling functions store the pinttes in region_info as >> below: >> >> static void * >> malloc_bytes(struct dir_info *d, siz

  1   2   3   4   5   6   7   8   9   10   >