Re: Small change in sysupgrade for custom release and test

2023-05-16 Thread Theo de Raadt
No. First of all, because there is no justification. Secondly, because it is not documented. But thirdly, because we keep shit simple so that people don't build their own stuff on top of our infrastructure, so that if we feel the need to change/break our own infrastructure we don't need to give

Small change in sysupgrade for custom release and test

2023-05-16 Thread Sven F.
Bienvenue, --- /usr/sbin/sysupgrade.oldTue May 16 18:53:13 2023 +++ /usr/sbin/sysupgradeTue May 16 19:04:46 2023 @@ -143,6 +143,7 @@ case ${_LINE} in *\ ${_KEY})SIGNIFY_KEY=/etc/signify/${_KEY} ;; *\ ${_NEXTKEY})SIGNIFY_KEY=/etc/signify/${_NEXTKEY} ;; +*\ *.pub)

Re: installer: amd64 EFI: default to GPT

2023-05-16 Thread Mark Kettenis
> Date: Tue, 16 May 2023 20:25:36 + > From: Klemens Nanni > > On Tue, May 16, 2023 at 10:07:20AM -0700, Chris Cappuccio wrote: > > I don't quite understand the case this patch solves, because my installs to > > fresh media always get EFI/GPT. It doesn't default to MBR. However, if > > there

Re: installer: amd64 EFI: default to GPT

2023-05-16 Thread Klemens Nanni
On Tue, May 16, 2023 at 10:07:20AM -0700, Chris Cappuccio wrote: > I don't quite understand the case this patch solves, because my installs to > fresh media always get EFI/GPT. It doesn't default to MBR. However, if > there is a case where it tries to use MBR, that isn't going to work so well. If

Re: missing malloc failure check at /src/lib/libcrypto/asn1/bio_ndef.c

2023-05-16 Thread Илья Шипицин
вт, 16 мая 2023 г. в 21:18, Theo Buehler : > > I tried to find "missing malloc null check" using the following > coccinelle > > script (easy to run from within CI) > > Cool, that's nice. We tend to be strict with error checking in new code, > but having such a sanity check certainly won't hurt.

Re: Unlock ip_sysctl()

2023-05-16 Thread Alexander Bluhm
On Tue, May 16, 2023 at 10:40:12PM +0300, Vitaliy Makkoveev wrote: > We have "error == 0" in assertion, so I used this idiom instead of > "!error". This is not the fast path, so dropping "maxlen != > mq->mq_maxlen" doesn't provide any performance impact. > > ok? OK bluhm@ > Index:

Re: cwm: add fvwm and tvm as default wm entries

2023-05-16 Thread Marc Espie
As another rant: we old farts know which window manager we want to use. But for newer users, there might be a chance to find something cool before they get totally fossilized. And secondary rant: X is a failure, in that there is a *choice* of window managers, but so many of them haven't been

Re: Unlock ip_sysctl()

2023-05-16 Thread Vitaliy Makkoveev
On Tue, May 16, 2023 at 08:26:37PM +0300, Vitaliy Makkoveev wrote: > > On 16 May 2023, at 18:35, Alexander Bluhm wrote: > > > > I saw one issue in sysctl_niq(). Another CPU could write mq_maxlen > > and our logic is inconsistent. Below is a fix with read once. Each > > CPU detects its own

Re: cwm: add fvwm and tvm as default wm entries

2023-05-16 Thread Marc Espie
On Tue, May 16, 2023 at 02:33:34AM +, Klemens Nanni wrote: > On Mon, May 15, 2023 at 09:42:47AM -0400, Bryan Steele wrote: > > On Mon, May 15, 2023 at 09:17:00AM -0400, Okan Demirmen wrote: > > > On Mon 2023.05.15 at 10:41 +0200, Matthieu Herrb wrote: > > > > On Mon, May 15, 2023 at 06:26:41AM

Re: missing malloc failure check at /src/lib/libcrypto/asn1/bio_ndef.c

2023-05-16 Thread Theo Buehler
> I tried to find "missing malloc null check" using the following coccinelle > script (easy to run from within CI) Cool, that's nice. We tend to be strict with error checking in new code, but having such a sanity check certainly won't hurt. If we only need to fix half a dozen functions, it might

Add LRO counter in ix(4)

2023-05-16 Thread Jan Klemkow
Hi, This diff introduces new counters for LRO packets, we get from the network interface. It shows, how many packets the network interface has coalesced into LRO packets. In followup diff, this packet counter will also be used to set the ph_mss variable to valid value. So, the stack is able to

Re: useradd: use "cp" instead of "pax" to copy dot files

2023-05-16 Thread Omar Polo
On 2023/05/16 11:39:17 -0600, Todd C. Miller wrote: > We can just use "cp -a skeldir/. homedir" to copy the skeleton dot > files to the new user's homedir. There's no good reason to use pax > when cp will do and this will simplify a future commit of mine. hard links are handled differently, but

Re: ix hardware tso

2023-05-16 Thread Todd C . Miller
On Tue, 16 May 2023 19:26:07 +0200, Alexander Bluhm wrote: > On Tue, May 16, 2023 at 11:15:31AM -0600, Todd C. Miller wrote: > > Would it be possible to move the forward declaration of struct tdb > > to netinet/tcp_var.h so it is not required in every driver? > > sure Thanks, that looks better

useradd: use "cp" instead of "pax" to copy dot files

2023-05-16 Thread Todd C . Miller
We can just use "cp -a skeldir/. homedir" to copy the skeleton dot files to the new user's homedir. There's no good reason to use pax when cp will do and this will simplify a future commit of mine. - todd Index: usr.sbin/user/user.c

Re: Unlock ip_sysctl()

2023-05-16 Thread Vitaliy Makkoveev
> On 16 May 2023, at 18:35, Alexander Bluhm wrote: > > I saw one issue in sysctl_niq(). Another CPU could write mq_maxlen > and our logic is inconsistent. Below is a fix with read once. Each > CPU detects its own change, last write wins. Or should we protect > everything with mq_mtx? Then

Re: ix hardware tso

2023-05-16 Thread Alexander Bluhm
On Tue, May 16, 2023 at 11:15:31AM -0600, Todd C. Miller wrote: > Would it be possible to move the forward declaration of struct tdb > to netinet/tcp_var.h so it is not required in every driver? sure Index: dev/pci/if_ix.c === RCS

Re: installer: amd64 EFI: default to GPT

2023-05-16 Thread Chris Cappuccio
Klemens Nanni [k...@openbsd.org] wrote: > On Sun, May 07, 2023 at 06:22:55PM +0200, Mark Kettenis wrote: > > > Date: Sat, 6 May 2023 22:47:55 + > > > From: Klemens Nanni > > > > > > On Sat, Apr 29, 2023 at 06:47:48PM +, Klemens Nanni wrote: > > > > Installing to a wiped disk on EFI

Re: ix hardware tso

2023-05-16 Thread Alexander Bluhm
On Tue, May 16, 2023 at 10:48:24AM +0200, Hrvoje Popovski wrote: > I've tested this diff with x552 and it's working as expected. > > ix0 at pci5 dev 0 function 0 "Intel X552 SFP+" rev 0x00, msix, 4 queues, > ix1 at pci5 dev 0 function 1 "Intel X552 SFP+" rev 0x00, msix, 4 queues, My test setup

Re: smtpd: some fatal -> fatalx

2023-05-16 Thread Todd C . Miller
On Tue, 16 May 2023 14:51:44 +0200, Omar Polo wrote: > while debugging a pebkac in -portable, I noticed that in various > places we use fatal() for libtls failures. errno doesn't generally > contains anything useful after libtls functions, and in most it's > explicitly cleared to avoid misuse. >

Re: Unlock ip_sysctl()

2023-05-16 Thread Alexander Bluhm
On Tue, May 16, 2023 at 01:55:32PM +0300, Vitaliy Makkoveev wrote: > Let's start to unlock (*pr_sysctl)() handlers. We have many of them, so > introduce temporary PR_MPSAFE flag to mark MP safe instead of pushing > kernel lock within handlers. I had the same idea and flag name for pr_input

Re: missing malloc failure check at /src/lib/libcrypto/asn1/bio_ndef.c

2023-05-16 Thread Илья Шипицин
I'm totally fine with your approach. I tried to find "missing malloc null check" using the following coccinelle script (easy to run from within CI) malloc.cocci: // find calls to malloc @call@ expression ptr; position p; @@ ptr@p = malloc(...); // find ok calls to malloc @ok@ expression ptr;

Re: missing malloc failure check at /src/lib/libcrypto/asn1/bio_ndef.c

2023-05-16 Thread Theo Buehler
On Sun, May 14, 2023 at 05:51:16PM +0200, Илья Шипицин wrote: > patch attached. Thank you. While we could add these malloc checks, I do not think it is enough. For example, derlen could be <= 0 after the first call and the second call to ASN1_item_ndef_i2d() is not guaranteed to succeed and to

Re: Status of Virtual Function driver for Intel 82599 series port?

2023-05-16 Thread Theo de Raadt
Yuichiro NAITO wrote: > 2. MTU 9000 is required for 10Gbps performance. > > The default MTU size 1500 is too small for 10Gbps link for now. It is dangerous to give this suggestion without caveats. MTU over 1500 does not work on even small parts of the internet, and many people will

smtpd: some fatal -> fatalx

2023-05-16 Thread Omar Polo
while debugging a pebkac in -portable, I noticed that in various places we use fatal() for libtls failures. errno doesn't generally contains anything useful after libtls functions, and in most it's explicitly cleared to avoid misuse. just to provide a quick example, with `listen on ... ciphers

Re: fill_file(): use solock_shared() to protect socket data

2023-05-16 Thread Vitaliy Makkoveev
On Thu, Apr 27, 2023 at 02:54:38PM +0200, Claudio Jeker wrote: > On Thu, Apr 27, 2023 at 01:55:33PM +0300, Vitaliy Makkoveev wrote: > > Now only direct netlock used for inet sockets protection. The unlocked > > access to all other sockets is safe, but we could lost consistency for a > > little.

Re: seperate LRO/TSO flags

2023-05-16 Thread Alexander Bluhm
This diff passed a make release. I think it should be commited now, so that we can proceed with TSO in the driver layer. bluhm On Mon, May 15, 2023 at 11:16:59PM +0200, Jan Klemkow wrote: > Index: sbin/ifconfig/ifconfig.8 > === >

Unlock ip_sysctl()

2023-05-16 Thread Vitaliy Makkoveev
Let's start to unlock (*pr_sysctl)() handlers. We have many of them, so introduce temporary PR_MPSAFE flag to mark MP safe instead of pushing kernel lock within handlers. Unlock ip_sysctl(). Still take kernel lock within IPCTL_MRTSTATS case. It looks like `mrtstat' protection is inconsistent, so

Re: ix hardware tso

2023-05-16 Thread Hrvoje Popovski
On 15.5.2023. 19:39, Alexander Bluhm wrote: > On Sun, May 14, 2023 at 11:39:01PM +0200, Hrvoje Popovski wrote: >> I've tested this on openbsd box with 4 iperf3's. 2 for ip4 and 2 for ip6 >> and with 16 tcp streams per iperf. When testing over ix(4) there is big >> differences in output

Re: cwm: add fvwm and tvm as default wm entries

2023-05-16 Thread Walter Alejandro Iglesias
I'm not an OpenBSD developer but, allow me to share my opinion about this, please. On May 15 2023, Okan Demirmen wrote: > On Mon 2023.05.15 at 10:41 +0200, Matthieu Herrb wrote: > > Last year I mentionned that I think we should retire twm. It's really > > too old and missing support for the