Re: macppc bsd.mp pmap's hash lock

2021-05-19 Thread Peter J. Philipp
[cross posting this to ppc@] On Wed, May 19, 2021 at 12:27:51AM -0400, George Koehler wrote: > On Thu, 13 May 2021 02:20:45 -0400 > George Koehler wrote: > > > My last diff (11 May 2021) still has a potential problem with memory > > barriers. I will mail a new diff if I think of a fix. > >

Re: smtpd: remove tls_accept/tls_connect callbacks

2021-05-19 Thread Theo Buehler
On Wed, Apr 28, 2021 at 02:27:11PM +0200, Eric Faurot wrote: > On Wed, Apr 21, 2021 at 11:21:51AM +0200, Eric Faurot wrote: > > There is actually no reason to defer calls to tls_accept_socket() and > > tls_connect_socket() in an event callback. The code can be simplified > > by a great deal. It

Re: [patch] tcpdump: Sync DNS types with IANA

2021-05-19 Thread Matthew Martin
On Wed, May 19, 2021 at 08:01:00AM +0100, Stuart Henderson wrote: > For the love of $deity if we're updating this file can we please change > these T_XXX to the ns_t_xxx used by everything else so we don't have to > patch everything in ports using them? In that case judging from a quick look at

Re: smtp(1): protocols and ciphers

2021-05-19 Thread Theo Buehler
On Fri, May 14, 2021 at 03:38:12PM +0200, Eric Faurot wrote: > Hello. > > This diff allows to specify protcols and ciphers in smtp(1). > I thought it was cleaner to added a generic -O option flag for this. I'm ok with this. Two small points to consider: Perhaps using -T as in nc(1) might make

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Florian Obser
Can you try Matthias' patch from the other mail please? This is better and seems to fix the nextcloud app for me. This is on top of my patch. --- usr.sbin/httpd/server_fcgi.cThu May 20 05:57:23 2021 +++ usr.sbin/httpd/server_fcgi.cThu May 20 06:03:40 2021 @@ -620,6 +620,12 @@

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Matthias Pressfreund
My previous statement was not entirely correct as the Content-Length header is not set for ALL traffic, but just in case Content-Length is not set already. However, I'd still suggest to move the fix to where it belongs (in my opinion). On 2021-05-20 06:43, Matthias Pressfreund wrote: > Fix works

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Florian Obser
Yes, ugh, this is much better, thanks! I'll wait for Steve to confirm that it fixes nextclown for him, too and then I'll put it in. On 2021-05-20 06:43 +02, Matthias Pressfreund wrote: > Fix works for me, too. Thanks. > > It now sets the "Content-Length: 0" header for ALL traffic that > is not

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Matthias Pressfreund
Fix works for me, too. Thanks. It now sets the "Content-Length: 0" header for ALL traffic that is not chunk-encoded. But chunk-encoding may be disabled already (e.g. for http/1.0). I'd therefore suggest to move the fix to where the handling of zero-length bodies actually takes place. ---

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Steve Williams
Hi, Now that I have my head out of my ass (php/redis issue), I can confirm that the Nextcloud Android client does NOT work with this latest patch for me. I am getting the same "Connection Error" that I do with the stock httpd that's supplied in 6.9.  I am running Nextcloud Andriod client

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Steve Williams
Hi, I applied this patch to the base OpenBSD 6.9 httpd source tree, recompiled & installed. Wordpress works in both Firefox and Chrome, Roundcubemail works in both Firefox and Chrome. However, my Andriod Nextcloud client is now broken again.  I get a "Connection Error". Is there a way I

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Steve Williams
Please disregard.  It seems like I somehow broke my Nextcloud install cleaning up packages :( On 19/05/2021 9:59 p.m., Steve Williams wrote: Hi, I applied this patch to the base OpenBSD 6.9 httpd source tree, recompiled & installed. Wordpress works in both Firefox and Chrome,

Re: [patch] tcpdump: Sync DNS types with IANA

2021-05-19 Thread Stuart Henderson
For the love of $deity if we're updating this file can we please change these T_XXX to the ns_t_xxx used by everything else so we don't have to patch everything in ports using them? -- Sent from a phone, apologies for poor formatting. On 19 May 2021 04:24:40 Matthew Martin wrote: Sync the

xhci early enumeration

2021-05-19 Thread Christian Ludwig
The usb(4) driver allows to enumerate the bus early during boot by setting its driver flags to 0x1 in UKC. This mechanism can enable a USB console keyboard early during autoconf(9), which can come in handy at times. This needs USB polling mode to work, which is a bit broken. Here is my attempt to

Re: Use atomic op for UVM map refcount

2021-05-19 Thread Mark Kettenis
> Date: Tue, 18 May 2021 13:24:42 +0200 > From: Martin Pieuchot > > On 18/05/21(Tue) 12:07, Mark Kettenis wrote: > > > Date: Tue, 18 May 2021 12:02:19 +0200 > > > From: Martin Pieuchot > > > > > > This allows us to not rely on the KERNEL_LOCK() to check reference > > > counts. > > > > > >

Re: uao_dropswap_range()

2021-05-19 Thread Mark Kettenis
> Date: Mon, 17 May 2021 12:32:02 +0200 > From: Martin Pieuchot > > Diff below makes use of uao_dropswap_range() in uao_free() instead of > duplicating it. This function has been imported from NetBSD along with > TMPFS. I'd like to use it to reduce the difference with their tree and > reduce

Re: Regarding May 17 patch

2021-05-19 Thread Matthias Pressfreund
While trying to figure out why the May 17 patch in my case does not behave as expected, I was adding some extra debug output to server_fcgi_read, server_fcgi_header and server_fcgi_writechunk and started a httpd debug session during which I was signing in and out of a WordPress site's admin

Very little patch : ref getrtable in rdomain

2021-05-19 Thread Sven F.
Index: rdomain.4 === RCS file: /cvs/src/share/man/man4/rdomain.4,v retrieving revision 1.17 diff -u -p -r1.17 rdomain.4 --- rdomain.4 24 Sep 2020 11:05:32 - 1.17 +++ rdomain.4 19 May 2021 14:51:37 - @@ -139,7 +139,8

Re: Very little patch : ref getrtable in rdomain

2021-05-19 Thread Sven F.
On Wed, May 19, 2021 at 10:55 AM Sven F. wrote: > Index: rdomain.4 > === > RCS file: /cvs/src/share/man/man4/rdomain.4,v > retrieving revision 1.17 > diff -u -p -r1.17 rdomain.4 > --- rdomain.4 24 Sep 2020 11:05:32 - 1.17

Re: setitimer(2): don't round up it_value

2021-05-19 Thread Scott Cheloha
On Wed, May 12, 2021 at 01:15:05PM -0500, Scott Cheloha wrote: > > [...] > > Paul de Weerd mentioned off-list that the initial expiration for an > ITIMER_REAL timer is always at least one tick. I looked into it and > yes, this is the case, because the kernel rounds it_value up to one > tick if

Re: Regarding May 17 patch

2021-05-19 Thread Florian Obser
On 2021-05-19 11:57 +02, Matthias Pressfreund wrote: > While trying to figure out why the May 17 patch in my case does > not behave as expected, I was adding some extra debug output to > server_fcgi_read, server_fcgi_header and server_fcgi_writechunk > and started a httpd debug session during

Re: Very little patch : ref getrtable in rdomain

2021-05-19 Thread Jason McIntyre
On Wed, May 19, 2021 at 10:55:11AM -0400, Sven F. wrote: > Index: rdomain.4 > === > RCS file: /cvs/src/share/man/man4/rdomain.4,v > retrieving revision 1.17 > diff -u -p -r1.17 rdomain.4 > --- rdomain.4 24 Sep 2020 11:05:32 -

Re: Very little patch : ref getrtable in rdomain

2021-05-19 Thread Sven F.
On Wed, May 19, 2021 at 12:21 PM Jason McIntyre wrote: > On Wed, May 19, 2021 at 10:55:11AM -0400, Sven F. wrote: > > Index: rdomain.4 > > === > > RCS file: /cvs/src/share/man/man4/rdomain.4,v > > retrieving revision 1.17 > > diff

Re: Regarding May 17 patch

2021-05-19 Thread mpfr
On 2021-05-19 17:54, Florian Obser wrote: > Please indicate where you experience a 30 second delay. > You get a 302 Found with no body so it's not chunk encoded and a 200 > which is still chunk encoded. The 302 Found transcript looks fine to me, > too. No idea what's going on. I also can't

httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Florian Obser
The whole point of using Transfer-Encoding: chunked for fastcgi was so that we do not need to provide a Content-Length header if upstream doesn't give us one. (We'd need to slurp in all the data ugh). Now turns out that if we disable chunked encoding for zero sized bodies some browsers are picky

Re: Regarding May 17 patch

2021-05-19 Thread Florian Obser
Fix is in the mail I just send to tech with subject "httpd(8): fastcgi & Content-Length: 0" On 2021-05-19 18:50 +02, m...@fn.de wrote: > On 2021-05-19 17:54, Florian Obser wrote: >> Please indicate where you experience a 30 second delay. >> You get a 302 Found with no body so it's not chunk

Re: Very little patch : ref getrtable in rdomain

2021-05-19 Thread Stuart Henderson
System calls are not a stable interface in OpenBSD. And aren't they now blocked except from libc or am I mistaken? The way to do this from Perl is to write an extension in C. You can probably crib from src/gnu/usr.bin/perl/cpan/OpenBSD-Pledge. -- Sent from a phone, apologies for poor

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Paul de Weerd
For the record: I tested this on a WordPress instance and it fixed the problem for me. It was also visible in roundcubemail and wikimedia (firefox and safari showed the issue, chrome on the company laptop did not). Thanks Florian! Paul On Wed, May 19, 2021 at 08:44:47PM +0200, Florian Obser

Re: Very little patch : ref getrtable in rdomain

2021-05-19 Thread Theo de Raadt
Stuart Henderson wrote: > System calls are not a stable interface in OpenBSD. system calls are stable API. The syscall numbers are not stable ABI. The parameters of syscall() are very much not stable, syscall() is not API access, it is an interface noone should use, as can be witnessed by our

Re: httpd(8): fastcgi & Content-Length: 0

2021-05-19 Thread Tracey Emery
On Wed, May 19, 2021 at 08:56:48PM +0200, Paul de Weerd wrote: > For the record: I tested this on a WordPress instance and it fixed the > problem for me. It was also visible in roundcubemail and wikimedia > (firefox and safari showed the issue, chrome on the company laptop > did not). > > Thanks

Re: nvme: add timeout to nvme_poll() loop

2021-05-19 Thread Ashton Fagg
Ping. Ashton Fagg writes: > I noticed this when looking through the nvme.c code the other day. > > Currently, nvme_poll() has a loop like this: > > while (!ISSET(state.c.flags, htole16(NVME_CQE_PHASE))) { > if (nvme_q_complete(sc, q) == 0) > delay(10);

amd64: softintr_dispatch: remove kernel lock

2021-05-19 Thread Scott Cheloha
Hi, visa@ says I need to unlock softintr_dispatch() before I can unlock softclock(), so let's do that. Additionally, when we call softintr_disestablish() we want to wait for the underlying softintr handle to finish running if it is running. We can start with amd64. I think this approach will

ACPI aml_rwgsb() fix

2021-05-19 Thread Mark Kettenis
My last change to dsdt.c broke one or two of my cheap little Intel "Atom" laptops. Seems my interpretation of the ACPI standard wasn't quite right. I went back to the original bug report and I think I understand a bit better what the AML in that report is trying to do. So here is a diff that

move copyout() in DIOCGETSTATES outside of NET_LOCK() and state_lcok

2021-05-19 Thread Alexandr Nedvedicky
Hello, Hrvoje gave a try to experimental diff, which trades rw-locks in pf(4) for mutexes [1]. Hrvoje soon discovered machine panics, when doing 'pfctl -ss' The callstack looks as follows: panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) vmmaplk Stopped at