Re: libcrypto for powerpc g5 xonly

2023-01-31 Thread Theo de Raadt
All the functions in libcrypto need to be fixed, or for the ones which are not fixed, they need to be disabled to use the C versions instead. There should be no broken functions in the library. It's not about what you manage to use, it's about what something else will eventually use. The same

libcrypto for powerpc g5 xonly

2023-01-31 Thread George Koehler
OpenBSD/macppc can enforce xonly on the PowerPC G5. libcrypto linked with cc -Wl,--execute-only will SIGSEGV as the PowerPC asm of sha256 tries to read a table from text. The fix is to move the table to rodata. To find the table, I would do bcl 20, 31, 1f 1: mflr%r7

Re: refactor mbuf parsing on driver level

2023-01-31 Thread Jan Klemkow
On Tue, Jan 31, 2023 at 09:12:51PM +0100, Christian Weisgerber wrote: > Jan Klemkow: > > > - I turned the KASSERTS to returns. > > - Check if the mbuf is large enough for an ether header. > > - additionally #ifdef'd INET6 around the ip6_hdr in the new struct > > For non-initial fragments of

Re: refactor mbuf parsing on driver level

2023-01-31 Thread Christian Weisgerber
Jan Klemkow: > - I turned the KASSERTS to returns. > - Check if the mbuf is large enough for an ether header. > - additionally #ifdef'd INET6 around the ip6_hdr in the new struct For non-initial fragments of TCP/UDP packets, ether_extract_headers() will create ext.tcp/ext.udp pointers that do

Re: Replace selwakeup() with KNOTE() in tun(4) and tap(4)

2023-01-31 Thread Vitaliy Makkoveev
> On 30 Jan 2023, at 06:39, Visa Hankala wrote: > > Replace selwakeup() with KNOTE() in tun(4) and tap(4). > > This patch makes the tun(4) and tap(4) event filters MP-safe. > > This is similar to the change that just got committed to pppac(4) > and pppx(4). However, tun(4) and tap(4) can be

Re: Replace selwakeup() with KNOTE() in tun(4) and tap(4)

2023-01-31 Thread Vitaliy Makkoveev
On Tue, Jan 31, 2023 at 06:21:01PM +, Visa Hankala wrote: > On Mon, Jan 30, 2023 at 08:34:29PM +0300, Vitaliy Makkoveev wrote: > > > On 30 Jan 2023, at 06:39, Visa Hankala wrote: > > > > > > Replace selwakeup() with KNOTE() in tun(4) and tap(4). > > > > > > This patch makes the tun(4) and

Re: Move duplicating initialization to soalloc()

2023-01-31 Thread Vitaliy Makkoveev
On Tue, Jan 31, 2023 at 06:00:45PM +, Visa Hankala wrote: > On Tue, Jan 31, 2023 at 12:44:47PM +0300, Vitaliy Makkoveev wrote: > > Since we have soalloc() to do common socket initialization, move the > > rest within. I mostly need to do this because standalone socket's buffer > > locking

timecounting: remove incomplete PPS support

2023-01-31 Thread Scott Cheloha
When the timecounting code was ported from FreeBSD in 2004 [1], stubs for pulse-per-second (PPS) polling were brought in but left disabled. They remain disabled [2]: 1.1 tholo 710: 711: #ifdef notyet 712:/* 713:

Re: Replace selwakeup() with KNOTE() in tun(4) and tap(4)

2023-01-31 Thread Visa Hankala
On Mon, Jan 30, 2023 at 08:34:29PM +0300, Vitaliy Makkoveev wrote: > > On 30 Jan 2023, at 06:39, Visa Hankala wrote: > > > > Replace selwakeup() with KNOTE() in tun(4) and tap(4). > > > > This patch makes the tun(4) and tap(4) event filters MP-safe. > > > > This is similar to the change that

Re: Move duplicating initialization to soalloc()

2023-01-31 Thread Visa Hankala
On Tue, Jan 31, 2023 at 12:44:47PM +0300, Vitaliy Makkoveev wrote: > Since we have soalloc() to do common socket initialization, move the > rest within. I mostly need to do this because standalone socket's buffer > locking require to introduce another klistops data for buffers and there > is no

Re: bgpd: improve RTR error handling

2023-01-31 Thread Claudio Jeker
On Tue, Jan 31, 2023 at 12:13:00PM +, Job Snijders wrote: > When the RTR's Session ID changes (for example when the RTR server is > restarted), bgpd would incorreectly branch into the "received %s: bad > msg len:" path. > > The length fields in the RTR PDU error messages are 32-bits, so we >

Re: PKU ?

2023-01-31 Thread Dave Voutila
And I should have prefaced this with: the reason we have to use PKU is because it's the only way we can get a read-deny bit on Intel, that still allows instruction fetches. Otherwise, PROT_EXEC implies PROT_READ. Dave Voutila writes: > Marc Espie writes: > >> I'm curious about the new

Re: PKU ?

2023-01-31 Thread Dave Voutila
Marc Espie writes: > I'm curious about the new enforcement strategies. Unfortunately I'm a bit > lost in the 1000+ pages of the intel manual. The protection keys documentation is thin because it's just another layer in the rules for paging. I'll try to summarize and I'm sure someone will

bgpd: improve RTR error handling

2023-01-31 Thread Job Snijders
When the RTR's Session ID changes (for example when the RTR server is restarted), bgpd would incorreectly branch into the "received %s: bad msg len:" path. The length fields in the RTR PDU error messages are 32-bits, so we should use ntohl() instead of ntohs(). While there, add an additional

Re: hardclock: don't call statclock(), stathz is always non-zero

2023-01-31 Thread Mark Kettenis
> Date: Tue, 31 Jan 2023 04:50:59 -0600 > From: Scott Cheloha > > On Mon, Jan 30, 2023 at 05:08:38PM +0100, Mark Kettenis wrote: > > > Date: Sat, 21 Jan 2023 17:02:48 -0600 > > > From: Scott Cheloha > > > > > > All the platforms have switched to clockintr. > > > > > > Let's start by isolating

Re: hardclock: don't call statclock(), stathz is always non-zero

2023-01-31 Thread Scott Cheloha
On Mon, Jan 30, 2023 at 05:08:38PM +0100, Mark Kettenis wrote: > > Date: Sat, 21 Jan 2023 17:02:48 -0600 > > From: Scott Cheloha > > > > All the platforms have switched to clockintr. > > > > Let's start by isolating statclock() from hardclock(). stathz is now > > always non-zero: statclock()

Re: PKU ?

2023-01-31 Thread Crystal Kolipe
On Tue, Jan 31, 2023 at 11:27:17AM +0100, Marc Espie wrote: > I'm curious about the new enforcement strategies. Unfortunately I'm a bit > lost in the 1000+ pages of the intel manual. > > Could someone point me to the document that describes PKU, specifically ? Well the intel SDM is surely the

PKU ?

2023-01-31 Thread Marc Espie
I'm curious about the new enforcement strategies. Unfortunately I'm a bit lost in the 1000+ pages of the intel manual. Could someone point me to the document that describes PKU, specifically ?

Move duplicating initialization to soalloc()

2023-01-31 Thread Vitaliy Makkoveev
Since we have soalloc() to do common socket initialization, move the rest within. I mostly need to do this because standalone socket's buffer locking require to introduce another klistops data for buffers and there is no reason to add more copypaste to sonewconn(). Also this makes

Re: npppd(8): remove "pipex" option

2023-01-31 Thread Vitaliy Makkoveev
On Tue, Jan 31, 2023 at 01:40:19PM +0900, YASUOKA Masahiko wrote: > Hi, > > On Sun, 29 Jan 2023 14:35:05 +0300 > Vitaliy Makkoveev wrote: > > While switchind pppx(4) and pppac(4) from selwakeup() to KNOTE(9), I > > found npppd(8) doesn't create pppx interface with "pipex no" in > > npppd.conf,