Re: Unlock select(2) and pselect(2)

2023-02-06 Thread Claudio Jeker
On Sat, Feb 04, 2023 at 01:24:58AM +0300, Vitaliy Makkoveev wrote: > Hi, > > kevent(2) system call is ulocked more than year ago. Since select(2) > and pselect(2) are kqueue(2)/kevent(2) wrappers, it makes sense to > unlock them too. select(2) does the temporary kernel event queue >

modf & modff return invalid result for Inf/NaN

2023-02-06 Thread Willemijn Coene
Hi, The patch below fixes the result of modf() and modff() for Inf and NaN. Similar changes were made in NetBSD a while ago (see lib/libc/gen/modf_ieee754.c rev 1.3 and lib/libm/src/s_modff.c rev 1.9); modfl already gave the expected results. This fixes the swi-prolog 9.0.x test set on

Re: pf.conf bug

2023-02-06 Thread Alexandr Nedvedicky
Hello, [ cc'ing also tech@ ] On Mon, Feb 06, 2023 at 06:44:38PM +0300, r...@bh0.amt.ru wrote: > >Synopsis:pf.conf bug > >Category:system > >Environment: > System : OpenBSD 7.2 > Details : OpenBSD 7.2 (GENERIC.MP) #6: Sat Jan 21 01:03:04 MST 2023 >

Re: Unlock select(2) and pselect(2)

2023-02-06 Thread Vitaliy Makkoveev
On Mon, Feb 06, 2023 at 11:01:00AM +0100, Claudio Jeker wrote: > On Sat, Feb 04, 2023 at 01:24:58AM +0300, Vitaliy Makkoveev wrote: > > Hi, > > > > kevent(2) system call is ulocked more than year ago. Since select(2) > > and pselect(2) are kqueue(2)/kevent(2) wrappers, it makes sense to > >

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Christian Weisgerber
Christian Weisgerber: > I also switched over em(4) to this and have successfully used it > for a full 30-hour package build on the four amd64 ports machines > with their I350 interfaces. Additionally, I've done some IPv6 > testing at home over an I210. ok for this? igc(4) has very similar

Re: pf.conf bug

2023-02-06 Thread Alexander Bluhm
On Mon, Feb 06, 2023 at 09:37:47PM +0100, Alexandr Nedvedicky wrote: > if we want to allow firewall administrator to specify a match > on icmptype 255 then extending type from uint8_t to uint16_t > is the right change. > > another option is to change logic here to allow matching

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Jan Klemkow
On Mon, Feb 06, 2023 at 09:47:57PM +0100, Christian Weisgerber wrote: > Christian Weisgerber: > > > I also switched over em(4) to this and have successfully used it > > for a full 30-hour package build on the four amd64 ports machines > > with their I350 interfaces. Additionally, I've done some

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Christian Weisgerber
Jan Klemkow: > > igc(4) has very similar code, but I don't have access to a machine > > with that hardware. > > Send me an ssh-key and I give you access to this machine: Alternatively, here's the diff, so other people can test it. diff a0c537a1c9d84e98322b55d8f71438a147aaa7c4

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Theo de Raadt
Alexander Bluhm wrote: > > > > - additionally #ifdef'd INET6 around the ip6_hdr in the new struct > > Why? Usually I prefer the same struct size also for non generic > kernels. If you compile special kernels, user land debugging tools > behave stange and counting bytes in ddb gets hard. No

Re: pf.conf bug

2023-02-06 Thread Theo de Raadt
> This creates an ABI change. People have to recompile their pfctl. > I think we never guarantee this level of compatibility. Correct. It is a binary suppled with the kernel. We pay attention if it is inconvenient. That means if you need a new binary before a new kernel. But this is in the

Re: patch for 7.2 to fix pfsync panics in pf_state_export()

2023-02-06 Thread Mark Kane
On 2023-01-09 17:29, Alexandr Nedvedicky wrote: Hello, if you don't use pfsync on 7.2 stop reading now. There are two reports already [1] which have the same cause: NULL pointer dereference in pf_state_export(). dlg@ has fixed this bug in CUURENT back in December [2]. Unfortunately the patch

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Alexander Bluhm
On Tue, Jan 31, 2023 at 11:32:44PM +0100, Jan Klemkow wrote: > On Tue, Jan 31, 2023 at 09:12:51PM +0100, Christian Weisgerber wrote: > > > - I turned the KASSERTS to returns. The old code only parsed the TCP|UDP header if the driver needed it and M_(TCP|UDP)_CSUM_OUT was set. So we may have

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Theo de Raadt
I hope this API and the way drivers use it is sufficient for strict-alignment architectures.

Internal libevent functions that should be private

2023-02-06 Thread Ted Bullock
Pretty sure these functions shouldn't be exported in the shared library: event_err event_warn event_errx event_warnx event_msgx _event_debugx I think this is correct usage of __BEGIN_HIDDEN_DECLS? diff /usr/src commit - c91a0f502346babf19c59a6b6d974a94c32ea1b1 path + /usr/src blob -

Add ASMedia ASM2142 xhci

2023-02-06 Thread Kevin Lo
Hi, I have a machine with the ASMedia USB 3.1 controller: xhci1 at pci3 dev 0 function 0 vendor "ASMedia", unknown product 0x2142 rev 0x00: msi, xHCI 1.10 ok? Index: sys/dev/pci/pcidevs === RCS file:

Re: refactor mbuf parsing on driver level

2023-02-06 Thread Florian Obser
On 2023-02-07 01:35 +01, Alexander Bluhm wrote: > On Tue, Jan 31, 2023 at 11:32:44PM +0100, Jan Klemkow wrote: >> On Tue, Jan 31, 2023 at 09:12:51PM +0100, Christian Weisgerber wrote: >> > > - Check if the mbuf is large enough for an ether header. > >> if (m == NULL || m->m_len - hoff <