Let futex_wait() run without kernel lock

2021-11-19 Thread Visa Hankala
This patch removes explicit kernel locking from futex_wait(). I think the original reason for the KERNEL_LOCK() was that rwsleep() with PCATCH needed it. Now rwsleep() does the necessary locking internally. As a subtle detail, the copyin32() call is now run outside the kernel lock. Algorithm-wise

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-19 Thread Theo de Raadt
Scott Cheloha wrote: > On Fri, Nov 19, 2021 at 07:42:18PM -0700, Theo de Raadt wrote: > > +#include /* for MAXBSIZE */ > > > > No way, that is non-POSIX namespace. We are going in precisely the opposite > > direction, eliminating this non-portability from the tree. > > > > No biblical scrolls

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-19 Thread Todd C . Miller
On Fri, 19 Nov 2021 21:31:12 -0600, Scott Cheloha wrote: > Is there a nicer way to pick a "reasonable" buffer size when we just > want to move as many bytes as possible on a given platform without > hogging the machine? Not really. But I don't think you need to worry about "hogging the machine"

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-19 Thread Scott Cheloha
On Fri, Nov 19, 2021 at 07:42:18PM -0700, Theo de Raadt wrote: > +#include /* for MAXBSIZE */ > > No way, that is non-POSIX namespace. We are going in precisely the opposite > direction, eliminating this non-portability from the tree. > > No biblical scrolls have it written "all programs must u

Re: tee(1): increase read buffer to MAXBSIZE bytes

2021-11-19 Thread Theo de Raadt
+#include /* for MAXBSIZE */ No way, that is non-POSIX namespace. We are going in precisely the opposite direction, eliminating this non-portability from the tree. No biblical scrolls have it written "all programs must use buffer sizes decided by a system header file". If you want 64*1024 in t

tee(1): increase read buffer to MAXBSIZE bytes

2021-11-19 Thread Scott Cheloha
Expanding the tee(1) read buffer trivially increases the throughput. In most applications the writer or the disk will be the bottleneck, but if tee(1) happens to be the bottleneck then the 8K buffer makes it worse. # dd(1) reading /dev/zero and writing to /dev/null $ for i in $(jot 10); do nanotim

Re: Rework UNIX sockets locking to be fine grained

2021-11-19 Thread Vitaliy Makkoveev
Updated diff. Re-lock dances were simplified in the unix(4) sockets layer. Reference counters added to unix(4) sockets layer too. This makes pointer dereference of peer's control block always safe after re-lock. The `unp_refs' list cleanup done in the unp_detach(). This removes the case where th

openssl(1): convert {dh,dsa}param, gen{dh,rsa} to opaque BN_GENCB

2021-11-19 Thread Theo Buehler
This is three times the same thing since the code is copy-paste + tweak. In genrsa there is a slight twist that involves not reaching into BIGNUM and we can take the opportunity to get rid of some Windows 3.1 things by calling the conversion routines instead of handrolling them. The callbacks them

isakmpd: stop reaching into EVP_PKEY

2021-11-19 Thread Theo Buehler
Straightforward conversion. Note that EVP_PKEY_get0_RSA() can't fail after checking that we have an RSA key. Index: x509.c === RCS file: /cvs/src/sbin/isakmpd/x509.c,v retrieving revision 1.123 diff -u -p -r1.123 x509.c --- x509.c

nl(1): restart numbering at logical page start, not section start

2021-11-19 Thread Scott Cheloha
The manpage for nl(1) reads: The nl utility treats the text it reads in terms of logical pages. Unless specified otherwise, line numbering is reset at the start of each logical page. A logical page consists of a header, a body and a footer section; empty sections are valid. [...] POSIX.

Re: dhcpleased - set ciaddr per RFC

2021-11-19 Thread Joel Knight
On Tue, Nov 16, 2021 at 9:56 AM Joel Knight wrote: > > Inspecting the REQUEST packets showed that dhclient was setting the > ciaddr to the existing leased IP address while dhcpleased was not > setting this field. RFC 2131 4.3.2 (with a nice summary at 4.3.6) is > pretty strict about when ciaddr an

Re: cwm: fix invalid KeyCode in configuration

2021-11-19 Thread Okan Demirmen
On Tue 2021.11.16 at 21:33 +, Lu?s Henriques wrote: > Hi! > > I've tried to setup a line like: > > bind-key XF86MonBrightnessDown "" > > in my .cwmrc and the result was that no key event was sent to my windows. > > Looking at the code, it looks like XKeysymToKeycode() is returning 0 for > t

Re: IPsec tdb ref counting

2021-11-19 Thread Vitaliy Makkoveev
I want to note all the people who testing this diff. Please be sure your test exceeds the lifetime of the `tdb’ and some rekeying cycles have been made. > On 19 Nov 2021, at 20:09, Alexander Bluhm wrote: > > Hi, > > I got a new hardware in my testlab and could panic this machine > easily with t

Re: IPsec tdb ref counting

2021-11-19 Thread Alexander Bluhm
Hi, I got a new hardware in my testlab and could panic this machine easily with the tdb refcount diff. Adding tdb refcounts for timeout fixes this for me. This allows to get rid of the timeout reaper. I refcount all successful timeout_add() and decrease in timeout handler. There are no timeout

Re: iwm/iwx: update last_rx timestamp

2021-11-19 Thread Stefan Sperling
On Mon, Nov 08, 2021 at 01:07:58PM +0100, Stefan Sperling wrote: > The last_rx timestamp which controls timeout of an Rx block ack > session is not updated when a frame is received. > This can result in the session timing out too early. > > Not a huge deal because the AP will simply request a new

Re: Retry sleep in poll/select

2021-11-19 Thread Scott Cheloha
> On Nov 18, 2021, at 23:59, Sebastien Marie wrote: > > On Thu, Nov 18, 2021 at 07:50:01PM -0600, Scott Cheloha wrote: >>> On Thu, Nov 18, 2021 at 12:30:30PM +0100, Martin Pieuchot wrote: >>> On 17/11/21(Wed) 09:51, Scott Cheloha wrote: > On Nov 17, 2021, at 03:22, Martin Pieuchot wrote: >>

Re: cwm: fix invalid KeyCode in configuration

2021-11-19 Thread Luís Henriques
On Fri, Nov 19, 2021 at 08:18:45AM +0100, Jan Stary wrote: > On Nov 19 00:01:04, stef...@sdaoden.eu wrote: > > Jan Stary wrote in > > : > > |On Nov 18 20:13:03, h...@stare.cz wrote: > > |> On Nov 16 21:33:31, hen...@camandro.org wrote: > > |>> I've tried to setup a line like: > > |>> bind-key