Re: amd64: do CPU identification before TSC sync test

2022-05-10 Thread Yuichiro NAITO
Hi, Scott. After applying your patch, cpu1 is not identified on my current kernel. Dmesg shows as follows. I'll see it further more. OpenBSD 7.1-current (GENERIC.MP) #3: Wed May 11 12:27:53 JST 2022 yuich...@yuichiro-obsd.soum.co.jp:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 21295

Re: Mark pw_error __dead in util.h

2022-05-10 Thread Matthew Martin
On Tue, May 03, 2022 at 10:37:36PM -0500, Matthew Martin wrote: > The function is already marked __dead in passwd.c, so appears to just be > an oversight. ping diff --git util.h util.h index dd64f478e23..752f8bb9fc5 100644 --- util.h +++ util.h @@ -97,7 +97,7 @@ void pw_edit(int, const char *);

Re: [v2] amd64: simplify TSC sync testing

2022-05-10 Thread Scott Cheloha
On Wed, May 11, 2022 at 10:52:55AM +0900, Yuichiro NAITO wrote: > Hi, Scott. > > Recently I started running OpenBSD on ESXi. > I'm facing monotonic time going back problem as same as Yasuoka-san's report. > > https://marc.info/?l=openbsd-tech&m=161657532610882&w=2 > > I've tried your v2 patch. I

Re: amd64: do CPU identification before TSC sync test

2022-05-10 Thread Scott Cheloha
On Tue, Mar 29, 2022 at 10:24:03AM -0500, Scott Cheloha wrote: > On Tue, Mar 29, 2022 at 03:26:49PM +1100, Jonathan Gray wrote: > > On Mon, Mar 28, 2022 at 10:52:09PM -0500, Scott Cheloha wrote: > > > I want to use the IA32_TSC_ADJUST MSR where available when testing TSC > > > synchronization. We

Re: [v2] amd64: simplify TSC sync testing

2022-05-10 Thread Yuichiro NAITO
Hi, Scott. Recently I started running OpenBSD on ESXi. I'm facing monotonic time going back problem as same as Yasuoka-san's report. https://marc.info/?l=openbsd-tech&m=161657532610882&w=2 I've tried your v2 patch. It seems the problem has been solved in my enviroment. But I'm a little bit conf

ssh: double fclose() in sshkey_save_public()

2022-05-10 Thread Tobias Heider
Hey, it looks like in sshkey_save_public() the same fd will be closed twice if the first fclose() returns something other than 0. The patch below should make sure everything only gets closed once. I moved the close() call and refactored a bit to improve readability. Index: authfile.c ===

Add support for Advantech multi-port serial device to puc(4)

2022-05-10 Thread Greg Winterstein
This patch adds support for the Advantech PCIE-1612B multi-port serial device to puc(4). The device has an Exar XR17V354 UART and the changes use the existing code that supports XR17V35x devices. This patch was minimally tested. All four ports were tested with several different serial devices. I o

rpki-client: remove verify_cb()

2022-05-10 Thread Theo Buehler
With RSC and recent cert.c changes, rpki-client now has a hard dependency on RFC 3779 support in libcrypto, so this code is no longer useful. Index: validate.c === RCS file: /cvs/src/usr.sbin/rpki-client/validate.c,v retrieving revisi

Re: move vmm(4) spinout paranoia behind MP_LOCKDEBUG

2022-05-10 Thread Dave Voutila
ping Dave Voutila writes: > This tucks all the spinout paranoia behind `#ifdef MP_LOCKDEBUG` and > uses the same approach used in amd64's pmap's TLB shootdown code. > > Part of me wants to remove this altogether, but I'm not sure it's > outlived its usefulness quite yet. > > Three areas that b

rpki-client: deserialize ASIdentifiers in libcrypto

2022-05-10 Thread Theo Buehler
The ASIdentifiers code is a bit strangely factored presumably due to constraints of the low-level shoveling. I kept the coarse structure of the code and left some house keeping for later. The changes in sbgp_asrange() and sbgp_asid() should be easy. The in-tree sbgp_assysnum() is tricky to follow.

Re: uvm_pagedequeue()

2022-05-10 Thread Mark Kettenis
> Date: Tue, 10 May 2022 18:45:21 +0200 > From: Martin Pieuchot > > On 05/05/22(Thu) 14:54, Martin Pieuchot wrote: > > Diff below introduces a new wrapper to manipulate active/inactive page > > queues. > > > > ok? > > Anyone? Sorry I started looking at this and got distracted. I'm not sure a

rpki-client: shuffle two IP address functions down a bit

2022-05-10 Thread Theo Buehler
This moves two helper functions down so that the file starts with the code parsing ASIdentifiers, then the code dealing with IPAddrBlocks. Index: cert.c === RCS file: /cvs/src/usr.sbin/rpki-client/cert.c,v retrieving revision 1.74 dif

Re: uvm_pagedequeue()

2022-05-10 Thread Martin Pieuchot
On 05/05/22(Thu) 14:54, Martin Pieuchot wrote: > Diff below introduces a new wrapper to manipulate active/inactive page > queues. > > ok? Anyone? > Index: uvm/uvm_page.c > === > RCS file: /cvs/src/sys/uvm/uvm_page.c,v > retrieving

Re: rpki-client: deserialize IPAddrBlocks in libcrypto

2022-05-10 Thread Claudio Jeker
On Tue, May 10, 2022 at 01:27:17PM +0200, Theo Buehler wrote: > This is a straightforward conversion to letting libcrypto's RFC 3779 > code parse a cert's IPAddrBlocks. The magic happens in X509V3_EXT_d2i() > in sbgp_ipaddrblk(). After that, we simply have to walk the returned > structure. The fact

Re: rpki-client: three leaks in cert.c

2022-05-10 Thread Claudio Jeker
On Tue, May 10, 2022 at 01:47:44PM +0200, Theo Buehler wrote: > In sbgp_asrange() and sbgp_addr_range(), the ASN1_SEQUENCE_ANY *seq is > potentially leaked due to early return 0 instead of goto out. The last > hunk collides with my IPAddrBlocks diff. Sending this out so I don't > forget. > > Index

Re: [External] : Re: move memory allocation in pfr_add_tables() outside of NET_LOCK()/PF_LOCK()

2022-05-10 Thread Alexander Bluhm
On Tue, May 10, 2022 at 12:40:39AM +0200, Alexandr Nedvedicky wrote: > updated diff is below. Although this makes the code more complex, I see no simple solution. We must get the sleeps out of the pf lock. As seen from the mail on bugs@, sleeping in pf is not a good thing. Also mbuhl@ is hunting

rpki-client: three leaks in cert.c

2022-05-10 Thread Theo Buehler
In sbgp_asrange() and sbgp_addr_range(), the ASN1_SEQUENCE_ANY *seq is potentially leaked due to early return 0 instead of goto out. The last hunk collides with my IPAddrBlocks diff. Sending this out so I don't forget. Index: cert.c =

rpki-client: deserialize IPAddrBlocks in libcrypto

2022-05-10 Thread Theo Buehler
This is a straightforward conversion to letting libcrypto's RFC 3779 code parse a cert's IPAddrBlocks. The magic happens in X509V3_EXT_d2i() in sbgp_ipaddrblk(). After that, we simply have to walk the returned structure. The fact that it parsed only means that it is well-formed as far as the templa

Re: rpki-client: consider CA:FALSE certs to be invalid

2022-05-10 Thread Theo Buehler
On Tue, May 10, 2022 at 08:32:15AM +, Job Snijders wrote: > Hi, > > Following this errata report https://www.rfc-editor.org/errata/eid6854 > > If the Basic Constraints extension is present, and the certificate is > *not* a CA - as determined by X509_check_ca(3), leave the purpose as > CERT_PU

rpki-client: consider CA:FALSE certs to be invalid

2022-05-10 Thread Job Snijders
Hi, Following this errata report https://www.rfc-editor.org/errata/eid6854 If the Basic Constraints extension is present, and the certificate is *not* a CA - as determined by X509_check_ca(3), leave the purpose as CERT_PURPOSE_INVALID. While there, use the value name rather than 0. OK? Kind re

Re: I got the RALINK RT5372 usb wifi adapter working

2022-05-10 Thread Stefan Sperling
On Mon, May 09, 2022 at 08:17:35PM +, molotov31337 wrote: > I recently picked up a Panda Wireless PAU06 and got it working, can this be > committed? > Here is the cvs diff Committed, thanks! > Index: usbdevs > === > RCS file: /c

fix mac address on iwx(4) AX210

2022-05-10 Thread Stefan Sperling
As noticed by jsg@ and kevlo@ we use a bad MAC address on AX210 devices. Patch below fixes the issue on AX210, and still works on AX200. The old way of reading the MAC no longer works on AX210; apparently this new way of reading the MAC was introduced in the 9k hw generation but the old way was st