Add another Lenovo NVMe device id

2023-04-26 Thread Kevin Lo
Found in my x1 extreme gen 1: nvme0 at pci4 dev 0 function 0 vendor "Lenovo", unknown product 0x0006 rev 0x00: msix, NVMe 1.2 ok? Index: sys/dev/pci/pcidevs === RCS file: /cvs/src/sys/dev/pci/pcidevs,v retrieving revision 1.2032 dif

Re: atactl(8): 'readattr' subcommand quits silently.

2023-04-26 Thread Kevin Lo
On Thu, Apr 27, 2023 at 08:37:23AM +0900, YASUOKA Masahiko wrote: > > Hello, > > On Wed, 26 Apr 2023 16:32:28 +0900 > Yuichiro NAITO wrote: > > These 2 revisions of 'attr_val' and 'attr_thr' are different on this > > disk. > > The comment says that it's wrong vendor implementation but I can see

Re: pass M_CANFAIL to malloc() which use M_WAITOK but are tested for failure

2023-04-26 Thread Kevin Lo
On Wed, Apr 26, 2023 at 08:19:10PM +0200, Alexander Bluhm wrote: > > On Sat, Apr 15, 2023 at 10:44:15PM +0800, Kevin Lo wrote: > > On Fri, Apr 14, 2023 at 02:01:29PM +0200, Alexander Bluhm wrote: > > > I think you are trying to change the kernel in the wrong direction. > > > It should not fail, bu

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread David Gwynne
On Wed, Apr 26, 2023 at 11:45:08PM +0200, Alexandr Nedvedicky wrote: > Hello, > > On Thu, Apr 27, 2023 at 06:51:52AM +1000, David Gwynne wrote: > > > > is that kind of check in KASSET() something you have on your mind? > > > perhaps I can trade KASSERT() to regular code: > > > > > > if

Re: vmd(8): multi-process device emulation (plz test)

2023-04-26 Thread Dave Voutila
Dave Voutila writes: > tech@: > > The below diff splits out virtio device emulation for virtio block and > network devices into separate fork+exec'd & pledge(2)'d subprocesses. > > In order of priority, this diff: > > 1. Isolates common exploit targets (e.g. emulated network devices) from >

Re: atactl(8): 'readattr' subcommand quits silently.

2023-04-26 Thread YASUOKA Masahiko
Hello, On Wed, 26 Apr 2023 16:32:28 +0900 Yuichiro NAITO wrote: > These 2 revisions of 'attr_val' and 'attr_thr' are different on this > disk. > The comment says that it's wrong vendor implementation but I can see > 'smartctl' shows the attributes as follows. NetBSD's atactl doesn't > see these 2

Initialize `rtentry_pool' with IPL_SOFTNET IPL

2023-04-26 Thread Vitaliy Makkoveev
Index: sys/net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.418 diff -u -p -r1.418 route.c --- sys/net/route.c 26 Apr 2023 16:09:44 - 1.418 +++ sys/net/route.c 26 Apr 2023 23:00:02 - @@ -1

Re: Updated virtio.4 man page with viogpu device

2023-04-26 Thread Jason McIntyre
On Wed, Apr 26, 2023 at 07:32:07PM +, Eichert, Diana wrote: > Based on this commit, https://marc.info/?l=openbsd-cvs&m=168201887006175&w=2 > , add viogpu, a VirtIO GPU driver > > Updated virtio.4 man page with viogpu device > > diff -c virtio.4.orig virtio.4 > > fixed, thanks. jmc > ***

Re: DIOCGETRULE is slow for large rulesets (3/3)

2023-04-26 Thread Alexandr Nedvedicky
Hello, updated diff below adopts to recent changes to pf_find_trans() in diff 2/3 [1] in case DIOCGETRULE does not find desired transaction the ioctl(2) call to /dev/pf returns ENXIO. thanks and regards sashan [1] https://marc.info/?l=openbsd-tech&m=168254555211083&w=2 8<--

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Alexandr Nedvedicky
Hello, On Thu, Apr 27, 2023 at 06:51:52AM +1000, David Gwynne wrote: > > is that kind of check in KASSET() something you have on your mind? > > perhaps I can trade KASSERT() to regular code: > > > > if (t->pft_unit != minor(dev)) > > return (EPERM); > > i would pass the

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread David Gwynne
On Wed, Apr 26, 2023 at 01:47:31PM +0200, Alexandr Nedvedicky wrote: > Hello, > > > On Wed, Apr 26, 2023 at 11:37:58AM +1000, David Gwynne wrote: > > > fail: > > > - if (flags & FWRITE) > > > - rw_exit_write(&pfioctl_rw); > > > - else > > > - rw_exit_read(&pfioctl_rw); > > > + rw

Updated virtio.4 man page with viogpu device

2023-04-26 Thread Eichert, Diana
Based on this commit, https://marc.info/?l=openbsd-cvs&m=168201887006175&w=2 , add viogpu, a VirtIO GPU driver Updated virtio.4 man page with viogpu device diff -c virtio.4.orig virtio.4 *** virtio.4.orig Wed Apr 26 13:07:35 2023 --- virtio.4Wed Apr 26 13:10:31 2023 *** *

Remove kernel lock from rtfree(9)

2023-04-26 Thread Vitaliy Makkoveev
Route timers and route labels protected by corresponding mutexes. `ifa' uses references counting for protection. No protection required for `rt' passed to rt_mpls_clear() because only current thread owns it. ok? Index: sys/net/route.c ==

Re: pass M_CANFAIL to malloc() which use M_WAITOK but are tested for failure

2023-04-26 Thread Alexander Bluhm
On Sat, Apr 15, 2023 at 10:44:15PM +0800, Kevin Lo wrote: > On Fri, Apr 14, 2023 at 02:01:29PM +0200, Alexander Bluhm wrote: > > I think you are trying to change the kernel in the wrong direction. > > It should not fail, but handle the requests. Panic if there is a > > bug. > > > > Why do you thi

Re: Introduce `rtlabel_mtx' mutex(9) ...

2023-04-26 Thread Alexander Bluhm
On Mon, Apr 24, 2023 at 06:31:03PM +0300, Vitaliy Makkoveev wrote: > ... and use it to protect route labels storage. This time it is not > clean, which lock protects it because we holding kernel and net locks in > various combinations while accessing it. I see no reason to put kernel > lock to all

Re: arpresolve reduce kernel lock

2023-04-26 Thread Vitaliy Makkoveev
> On 26 Apr 2023, at 15:30, Hrvoje Popovski wrote: > > On 26.4.2023. 12:15, Alexander Bluhm wrote: >> On Wed, Apr 26, 2023 at 11:17:32AM +0200, Alexander Bluhm wrote: >>> On Tue, Apr 25, 2023 at 11:57:09PM +0300, Vitaliy Makkoveev wrote: On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bl

Re: acpithinkpad: do not report fans running at 65535 rpm

2023-04-26 Thread Klemens Nanni
On Mon, Apr 24, 2023 at 02:07:11PM +, Miod Vallat wrote: > After suspending a machine with acpithinkpad(4) and resuming, the fan > senors report a value of 65535 (i.e. 0x) for a few seconds, and > then start reporting correct values. I don't see these bogus values on an intel t14 gen3 when

Re: arpresolve reduce kernel lock

2023-04-26 Thread Hrvoje Popovski
On 26.4.2023. 12:15, Alexander Bluhm wrote: > On Wed, Apr 26, 2023 at 11:17:32AM +0200, Alexander Bluhm wrote: >> On Tue, Apr 25, 2023 at 11:57:09PM +0300, Vitaliy Makkoveev wrote: >>> On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bluhm wrote: Hi, Mutex arp_mtx protects the lli

Re: DIOCGETRULE is slow for large rulesets (3/3)

2023-04-26 Thread Alexandr Nedvedicky
Hello, On Wed, Apr 26, 2023 at 01:25:45AM +0200, Alexandr Nedvedicky wrote: > Hello, > > this is 3rd of three diffs to improve DIOCGETRULE ioctl operation. > the summary of changes done here is as follows: > - add new members to pf_trans structure so it can > hold data for DIOCGETRULE o

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Alexandr Nedvedicky
Hello, On Wed, Apr 26, 2023 at 11:51:26AM +, Gerhard Roth wrote: > On Wed, 2023-04-26 at 13:47 +0200, Alexandr Nedvedicky wrote: > > @@ -293,6 +300,28 @@ pfopen(dev_t dev, int flags, int fmt, struct proc *p) > > ??int > > ??pfclose(dev_t dev, int flags, int fmt, struct proc *p) > > ??{ > > +?

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Gerhard Roth
On Wed, 2023-04-26 at 13:47 +0200, Alexandr Nedvedicky wrote: > Hello, > > > On Wed, Apr 26, 2023 at 11:37:58AM +1000, David Gwynne wrote: > > >  fail: > > > -   if (flags & FWRITE) > > > -   rw_exit_write(&pfioctl_rw); > > > -   else > > > -   rw_exit_read(&pfioct

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Alexandr Nedvedicky
Hello, On Wed, Apr 26, 2023 at 11:37:58AM +1000, David Gwynne wrote: > > fail: > > - if (flags & FWRITE) > > - rw_exit_write(&pfioctl_rw); > > - else > > - rw_exit_read(&pfioctl_rw); > > + rw_exit_write(&pfioctl_rw); > > i dont think having the open mode flags affect w

Re: arpresolve reduce kernel lock

2023-04-26 Thread Alexander Bluhm
On Wed, Apr 26, 2023 at 11:17:32AM +0200, Alexander Bluhm wrote: > On Tue, Apr 25, 2023 at 11:57:09PM +0300, Vitaliy Makkoveev wrote: > > On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bluhm wrote: > > > Hi, > > > > > > Mutex arp_mtx protects the llinfo_arp la_... fields. So kernel > > > loc

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread David Gwynne
On Wed, Apr 26, 2023 at 09:49:18AM +, Gerhard Roth wrote: > On Wed, 2023-04-26 at 19:42 +1000, David Gwynne wrote: > > On Wed, Apr 26, 2023 at 07:48:18AM +, Gerhard Roth wrote: > > > On Wed, 2023-04-26 at 00:39 +0200, Alexandr Nedvedicky wrote: > > > > Hello, > > > > > > > > This is the se

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Gerhard Roth
On Wed, 2023-04-26 at 19:42 +1000, David Gwynne wrote: > On Wed, Apr 26, 2023 at 07:48:18AM +, Gerhard Roth wrote: > > On Wed, 2023-04-26 at 00:39 +0200, Alexandr Nedvedicky wrote: > > > Hello, > > > > > > This is the second diff. It introduces a transaction (pf_trans). > > > It's more or less

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread David Gwynne
On Wed, Apr 26, 2023 at 07:48:18AM +, Gerhard Roth wrote: > On Wed, 2023-04-26 at 00:39 +0200, Alexandr Nedvedicky wrote: > > Hello, > > > > This is the second diff. It introduces a transaction (pf_trans). > > It's more or less diff with dead code. > > > > It's still worth to note those two c

Re: arpresolve reduce kernel lock

2023-04-26 Thread Alexander Bluhm
On Tue, Apr 25, 2023 at 11:57:09PM +0300, Vitaliy Makkoveev wrote: > On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bluhm wrote: > > Hi, > > > > Mutex arp_mtx protects the llinfo_arp la_... fields. So kernel > > lock is only needed for changing the route rt_flags. > > > > Of course there i

Re: DIOCGETRULE is slow for large rulesets (2/3)

2023-04-26 Thread Gerhard Roth
On Wed, 2023-04-26 at 00:39 +0200, Alexandr Nedvedicky wrote: > Hello, > > This is the second diff. It introduces a transaction (pf_trans). > It's more or less diff with dead code. > > It's still worth to note those two chunks in this diff: > > @@ -1142,10 +1172,7 @@ pfioctl(dev_t dev, u_long cm

atactl(8): 'readattr' subcommand quits silently.

2023-04-26 Thread Yuichiro NAITO
Hi, Our IIJ team is planning to run OpenBSD on HPE ProLiant DL20 Gen10 server. Yasuoka-san and I are testing on this host and found that `atactl sd0 readattr` doesn't show any messages, just quits silently. 'sd0' disk is shown in dmesg as follows. ``` sd0 at scsibus1 targ 0 lun 0: naa.5002538e0