Re: [RFC resend v1 2/2] Use arc4random_range() instead of arc4random_uniform() when appropriate

2022-12-31 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Sun, Jan 01, 2023 at 01:08:17AM +0100: > On 12/31/22 20:08, Alejandro Colomar wrote: >> This makes the code much more readable and self-documented. While doing >> this, I noticed a few bugs, and other cases which may be bugs or not. >> Switching to this

Re: [v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Scott Cheloha
On Sat, Dec 31, 2022 at 11:31:21PM +0100, Ingo Schwarze wrote: > Hi Scott, > > in the NAME section, please put timeout_add_nsec after timeout_add_usec > to agree with the order in the SYNOPSIS. Whoops, done. > In any case, please go ahead. It appears jmc@ is developing a sore > elbow from more

Re: [trivial patch] remove superflous #ifdef

2022-12-31 Thread Philip Guenther
On Sat, Dec 31, 2022 at 3:41 PM Crystal Kolipe wrote: > The KASSERT macro is a NOP unless DIAGNOSTIC is defined, so it doesn't > need to > be in an #ifdef here: > ok guenther@ Note: you should hold this diff until 2023 in Calgary and then commit, so you can start 2023 with a perfect "negative

Re: [RFC resend v1 2/2] Use arc4random_range() instead of arc4random_uniform() when appropriate

2022-12-31 Thread Alejandro Colomar
On 12/31/22 20:08, Alejandro Colomar wrote: This makes the code much more readable and self-documented. While doing this, I noticed a few bugs, and other cases which may be bugs or not. Switching to this specialized API makes it easier to spot such bugs, but since I'm not familiar with the

[trivial patch] remove superflous #ifdef

2022-12-31 Thread Crystal Kolipe
The KASSERT macro is a NOP unless DIAGNOSTIC is defined, so it doesn't need to be in an #ifdef here: --- dev/wscons/wsemul_vt100.c.dist Mon May 25 06:55:49 2020 +++ dev/wscons/wsemul_vt100.c Sat Dec 31 20:37:14 2022 @@ -204,9 +204,7 @@ if (console) { edp =

Making wscons a bit more like xterm

2022-12-31 Thread Crystal Kolipe
The following patch adds five escape sequences to the wscons vt100 emulation. It's one part of a larger set of patches I am working on to make the console more like xterm. Note: Casual readers of -tech and those not familar with terminfo might prefer to read my write-up at

Re: [v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Ingo Schwarze
Hi Scott, in the NAME section, please put timeout_add_nsec after timeout_add_usec to agree with the order in the SYNOPSIS. In any case, please go ahead. It appears jmc@ is developing a sore elbow from more than a year of medicine ball ping pong. ;-) The following are merely suggestions /

Re: df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 02:32:30PM -0700, Todd C. Miller wrote: > Updated version. I kept "The BLOCKSIZE environment variable" in > the -P description since it is the first time the man page metions > BLOCKSIZE. > > - todd > certainly ok by me. jmc > Index: bin/df/df.1 >

Re: ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Joerg Sonnenberger
On Sat, Dec 31, 2022 at 04:16:18PM -0500, Scott Cheloha wrote: > Even Windows went with Linux: WSL2 has Linux syscall compatibility, WSL2 is running a Linux kernel under HyperV. WSL1 is the system call translation layer. Joerg

Re: df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Todd C . Miller
Updated version. I kept "The BLOCKSIZE environment variable" in the -P description since it is the first time the man page metions BLOCKSIZE. - todd Index: bin/df/df.1 === RCS file: /cvs/src/bin/df/df.1,v retrieving revision 1.48

Re: ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Todd C . Miller
On Sat, 31 Dec 2022 19:05:20 +0100, Mark Kettenis wrote: > Bad idea. The setitimer(2) interface is marked as "OB XSI" in POSIX, > which means that it is considerent "Obsolescent" and may be removed in > a future version of POSIX. Since we want ssh to be as portable as > possible we shouldn't

Re: ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Scott Cheloha
On Sat, Dec 31, 2022 at 07:05:20PM +0100, Mark Kettenis wrote: > > Date: Sat, 31 Dec 2022 10:33:26 -0500 > > From: Scott Cheloha > > > > Here's another one. > > > > The progress meter in scp(1) and sftp(1) updates periodically, once > > per second. But using alarm(3) to repeatedly rearm the

Re: [RFC resend v1 2/2] Use arc4random_range() instead of arc4random_uniform() when appropriate

2022-12-31 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Sat, Dec 31, 2022 at 08:08:14PM +0100: > This makes the code much more readable and self-documented. I object. I is a needless detour that invites confusion and bugs. In C code, it is customary to deal with half-open intervals, and closed intervals are

Re: [RFC v1 1/2] Add arc4random_range(min, max)

2022-12-31 Thread Ingo Schwarze
Hi Alexandro, i fail to see the point. We do not usually add extra functions if the same effect can be be attained with one-liners. There is significant value in keeping the API as small as possible, it makes the API easier to learn and it makes programming mistakes less likely. On top of

Re: [v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Vitaliy Makkoveev
Thanks! ok mvs@ > On 31 Dec 2022, at 19:22, Scott Cheloha wrote: > > mvs@ is nudging me to realign the timeout.9 page with the state of the > kernel. > > Here is my rewrite (again). > > There are some bits that I want to rework. The opening paragraph is > especially clickety-clackety. > >

[RFC resend v1 2/2] Use arc4random_range() instead of arc4random_uniform() when appropriate

2022-12-31 Thread Alejandro Colomar
This makes the code much more readable and self-documented. While doing this, I noticed a few bugs, and other cases which may be bugs or not. Switching to this specialized API makes it easier to spot such bugs, but since I'm not familiar with the code, I kept some bugs unfixed. The most obvious

[RFC resend v1 1/2] Add arc4random_range(min, max)

2022-12-31 Thread Alejandro Colomar
Signed-off-by: Alejandro Colomar --- [resent, but to tech@, per Dave's advice] Hi, The patch to the manual page is still a draft; I know it has formatting issues; I don't know mdoc(7) enough to write in it. I CCd Ingo so that he may help me improve it. Theo, and any others, please consider

Re: [v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 11:22:22AM -0500, Scott Cheloha wrote: > mvs@ is nudging me to realign the timeout.9 page with the state of the > kernel. > > Here is my rewrite (again). > i'm losing track of what i'm reviewing! maybe just put it in and we can adjust it as needed, if needed. ok jmc

Re: df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Jason McIntyre
On Sat, Dec 31, 2022 at 10:54:27AM -0700, Todd C. Miller wrote: > In POSIX mode, df(1) does not honor the BLOCKSIZE environment > variable. > > Any comments on the wording? > > - todd > hi > Index: bin/df/df.1 > === > RCS file:

Re: ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Mark Kettenis
> Date: Sat, 31 Dec 2022 10:33:26 -0500 > From: Scott Cheloha > > Here's another one. > > The progress meter in scp(1) and sftp(1) updates periodically, once > per second. But using alarm(3) to repeatedly rearm the signal causes > that update period to drift forward: > > $ kdump -ts -R -f

df.1: document that -P disables BLOCKSIZE

2022-12-31 Thread Todd C . Miller
In POSIX mode, df(1) does not honor the BLOCKSIZE environment variable. Any comments on the wording? - todd Index: bin/df/df.1 === RCS file: /cvs/src/bin/df/df.1,v retrieving revision 1.48 diff -u -p -u -r1.48 df.1 --- bin/df/df.1

Re: ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Todd C . Miller
On Sat, 31 Dec 2022 10:33:26 -0500, Scott Cheloha wrote: > The progress meter in scp(1) and sftp(1) updates periodically, once > per second. But using alarm(3) to repeatedly rearm the signal causes > that update period to drift forward: OK millert@ - todd

[v3] timeout.9: document missing interfaces, miscellaneous rewrites

2022-12-31 Thread Scott Cheloha
mvs@ is nudging me to realign the timeout.9 page with the state of the kernel. Here is my rewrite (again). There are some bits that I want to rework. The opening paragraph is especially clickety-clackety. Still, I think this is an improvement over what's in-tree. And the technical content

Re: ESRT support for the amd64 bootloader

2022-12-31 Thread Jeremie Courreges-Anglas
On Wed, Dec 28 2022, Mark Kettenis wrote: > Dear Sergii, > > Sorry for the delay, but I have finally found the time to work on the > EFI variable and ESRT support for OpenBSD. As a first step, here is a > diff that adds support for copying the ESRT in the bootloader and > passing it on to the

ssh: progress meter: prefer setitimer(2) to alarm(3)

2022-12-31 Thread Scott Cheloha
Here's another one. The progress meter in scp(1) and sftp(1) updates periodically, once per second. But using alarm(3) to repeatedly rearm the signal causes that update period to drift forward: $ kdump -ts -R -f scp-current.ktrace.out 25343 scp 1672500224.844047 PSIG SIGALRM caught

net80211: ignore beacons on secondary HT/VHT channels

2022-12-31 Thread Stefan Sperling
One of my 80MHz 11ac APs transmits beacons on several channels, while indicating its actual primary channel in the HT operation information element (HT OP IE). We currently ignore the primary channel given in the HT OP IE, and this leads to a problem. (We do read the AP's idea of its primary

Re: [PATCH] Correctly (per POSIX) round up df usage percentage

2022-12-31 Thread наб
Hi! Ran into this /again/ in my CI environment; I've validated, again, that this patch applies to current git, and that it applies the rounding correctly. Best, On Mon, Aug 29, 2022 at 01:51:14PM +0200, наб wrote: > Subject: [PATCH] Correctly (per POSIX) round up df usage percentage > > Quoth

Re: crunchgen and llvm 15

2022-12-31 Thread Jeremie Courreges-Anglas
On Sat, Dec 31 2022, Theo de Raadt wrote: > It seems some changes are being pushed without actually testing > on the non-clang architectures. > > Can this get backed out until the correct procedure is followed? Well nothing has been committed regarding this crunchgen change. I hope you're not

Re: clang 15 and zlib

2022-12-31 Thread Theo de Raadt
A third alternative is to change the clang default to not be so aggressive. Why is that option not on the list of choices we have? This is causing so much chaos in our base tree. Is there an assumption this will be roses and daisies when these new default options start chewing on the ports