Re: Issues booting alpine linux > 3.5 on vmm - openbsd7.2

2023-01-06 Thread Dave Voutila


Dave Voutila  writes:

> di...@santanas.co.za writes:
>
>> Hi OpenBSD friends,
>>
>> Just a report, not sure if it's helpful, but @voutilad requested [1] I
>> send the details to the mailing list.
>>
>> I have seen a few reports online[1][2], about some users not being able to
>> boot newer alpine linux versions (and other linux OS' in my
>> experience).  Specifically I've seen the last version that boots is
>> 3.5.3.
>>
>> My system is openbsd 7.2 on my hardware Lenovo ThinkPad E14 Gen 4
>> laptop.
>>
>> The issue, when the alpine linux VM boots, it kernel panics.
>>
>> [0.052602]local IPI:
>> [0.052602] invalid opcode:  [#1] SMP PTI
>> [0.052602] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.79-0-virt 
>> #1-Alpine
>> [0.052602] Hardware name: OpenBSD VMM, BIOS 1.14.0p0-OpenBSD-vmm 
>> 01/01/2011
>> [0.052602] RIP: 0010:delay_halt_tpause+0xd/0x20
>> [ 0.052602] Code: 75 fb 48 ff c8 31 c0 31 ff c3 cc cc cc cc 66 66 2e
> 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 8d 04 37 31 c9 48 89 c2 48 c1
> ea 20 <66> 0f ae f1 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc 53 48
> c7
>
> The key issue here is the invalid opcode error coming from the
> instruction starting with 66 0f ae, which is a TPAUSE
> instruction. Hence the RIP pointing to "delay_halt_tpause" in the Linux
> kernel.
>
> I don't think I have any newer Intel hardware that supports the "User
> Wait" instructions (aka WAITPKG). My Intel research says it premiered in
> Tremont, Alder Lake, Sapphire Rapids so I can't test locally, but the
> docs from Intel (SDM Vol. 2B 4-719) say:
>
>  Prior to executing the TPAUSE instruction, an operating system may
>  specify the maximum delay it allows the processor to suspend its
>  operation. It can do so by writing TSC-quanta value to the
>  following 32-bit MSR (IA32_UMWAIT_CONTROL at MSR index E1H)...
>
> We probably should be masking the CPUID value for TPAUSE in the values
> vmm(4) communicates via vmm_handle_cpuid.
>
>

The below diff defines the cpuid bit for detecting the WAITPKG
feature. It adds the value to vmm's cpuid mask and also updates the
i386/amd64 cpu identification info.

Can someone with a newer Intel system try this out?


diff refs/heads/master refs/heads/vmm-tsleep
commit - 515b7b0d87d9ff8cd5eae1449555f3d6e625fa49
commit + 6343cff9c1cfbbf9ba2cb06cfeca507caa06fc8c
blob - 001a437045be145322be30288c1f47d63fb07634
blob + 0bd908e273a1c0e6324e1bc9f8c8ca921555c86f
--- sys/arch/amd64/amd64/identcpu.c
+++ sys/arch/amd64/amd64/identcpu.c
@@ -208,6 +208,7 @@ const struct {
{ SEFF0ECX_AVX512VBMI,  "AVX512VBMI" },
{ SEFF0ECX_UMIP,"UMIP" },
{ SEFF0ECX_PKU, "PKU" },
+   { SEFF0ECX_WAITPKG, "WAITPKG" },
 }, cpu_seff0_edxfeatures[] = {
{ SEFF0EDX_AVX512_4FNNIW, "AVX512FNNIW" },
{ SEFF0EDX_AVX512_4FMAPS, "AVX512FMAPS" },
blob - cbde6cf9b02fc882a8ed17aa6adb5c43249e0302
blob + b26bd32e2d9ea7386b1f58960dea40b787d6a341
--- sys/arch/amd64/include/specialreg.h
+++ sys/arch/amd64/include/specialreg.h
@@ -201,6 +201,7 @@
 #define SEFF0ECX_AVX512VBMI0x0002 /* AVX-512 vector bit inst */
 #define SEFF0ECX_UMIP  0x0004 /* UMIP support */
 #define SEFF0ECX_PKU   0x0008 /* Page prot keys for user mode */
+#define SEFF0ECX_WAITPKG   0x0010 /* UMONITOR/UMWAIT/TPAUSE insns */
 /* SEFF EDX bits */
 #define SEFF0EDX_AVX512_4FNNIW 0x0004 /* AVX-512 neural network insns */
 #define SEFF0EDX_AVX512_4FMAPS 0x0008 /* AVX-512 mult accum single prec */
blob - 6b4802abf4b508495cdbc961bd799d3fa83b9c36
blob + bbe10bd4cfd7e778132eca1d97594e10513ac172
--- sys/arch/amd64/include/vmmvar.h
+++ sys/arch/amd64/include/vmmvar.h
@@ -672,7 +672,12 @@ struct vm_mprotect_ept_params {
 SEFF0EBX_AVX512IFMA | SEFF0EBX_AVX512PF | \
 SEFF0EBX_AVX512ER | SEFF0EBX_AVX512CD | \
 SEFF0EBX_AVX512BW | SEFF0EBX_AVX512VL)
-#define VMM_SEFF0ECX_MASK ~(SEFF0ECX_AVX512VBMI)
+/*
+ * Copy from host minus:
+ *  AVX-512 vector bit (SEFF0ECX_AVX512VBMI)
+ *  UMONITOR/UMWAIT/TPAUSE (SEFF0ECX_WAITPKG)
+ */
+#define VMM_SEFF0ECX_MASK ~(SEFF0ECX_AVX512VBMI | SEFF0ECX_WAITPKG)

 /* EDX mask contains the bits to include */
 #define VMM_SEFF0EDX_MASK (SEFF0EDX_MD_CLEAR)
blob - 310208ac4cdb262aaedfa9b78d869fd5911607b2
blob + ccf1164fd658a69dc383e1602ae0ce1f269de4e4
--- sys/arch/i386/i386/machdep.c
+++ sys/arch/i386/i386/machdep.c
@@ -1038,6 +1038,7 @@ const struct cpu_cpuid_feature cpu_seff0_ecxfeatures[]
{ SEFF0ECX_UMIP,"UMIP" },
{ SEFF0ECX_AVX512VBMI,  "AVX512VBMI" },
{ SEFF0ECX_PKU, "PKU" },
+   { SEFF0ECX_WAITPKG, "WAITPKG" },
 };

 const struct cpu_cpuid_feature cpu_seff0_edxfeatures[] = {
blob - 392b4ff412e2dd3c4c48ed6c9c84aa2358721c6a
blob + 7ce77ca3fdc6bd1a51571dd0b5dbf5afc311a138
--- sys/arch/i386/include/specialreg.h
+++ sys/arch/i386/include/specialreg.h
@@ -190,6 +190,7 @@
 #define SEFF0ECX_AVX512VBMI0x0002 /* AVX-512 vector bit inst */
 #define 

Re: openbsd 7.2 suspend / sleep issues on Lenovo ThinkPad E14 Gen 4

2023-01-06 Thread Jan Stary
On Jan 07 00:00:31, di...@santanas.co.za wrote:
> 
> >> The camera.  Which is less important, because I can plug an external
> >> usb web cam.  The camera is detected, but doesn't work.  I think it
> >> was recording weirdly or in some crippled fashion.
> 
> About the camera, here is some more useful info on how it doesn't work:

Make sure you have sysctl kern.video.record=1,
and try with video(1) first before bringing ffmpeg into it.

Jan

> I've enabled the webcam in the bios now and here is a more useful report
> with a dmesg[1] with integrated cam enabled.
> 
> The issue is it failed to record.  Specifically:
> 
> ds:/home/ds:5010$ ffplay -f v4l2 -list_formats all -i /dev/video0
> ffplay version 4.4.2 Copyright (c) 2003-2021 the FFmpeg developers
>   built with OpenBSD clang version 13.0.0
>   configuration: --enable-shared --arch=amd64 --cc=cc --disable-debug 
> --disable-indev=jack --disable-indev=oss --disable-outdev=oss 
> --disable-outdev=sdl2 --enable-avresample --enable-fontconfig --enable-frei0r 
> --enable-gpl --enable-ladspa --enable-libaom --enable-libass 
> --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libgsm 
> --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libtheora 
> --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 
> --enable-libx265 --enable-libxml2 --enable-libxvid --enable-nonfree 
> --enable-openssl --enable-libvidstab --extra-cflags='-I/usr/local/include 
> -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
> --extra-ldsoflags= --mandir=/usr/local/man --objcc=/usr/bin/false 
> --optflags='-O2 -pipe -Wno-redundant-decls'
>   libavutil  56. 70.100 / 56. 70.100
>   libavcodec 58.134.100 / 58.134.100
>   libavformat58. 76.100 / 58. 76.100
>   libavdevice58. 13.100 / 58. 13.100
>   libavfilter 7.110.100 /  7.110.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale  5.  9.100 /  5.  9.100
>   libswresample   3.  9.100 /  3.  9.100
>   libpostproc55.  9.100 / 55.  9.100
> [video4linux2,v4l2 @ 0x69de87bc800] Compressed:   mjpeg :
> MJPEG : 1920x1080 320x180 320x240 352x288 424x240 640x360 640x480 848x480 
> 960x540 1280x720
> [video4linux2,v4l2 @ 0x69de87bc800] Raw   : yuyv422 : 
> YUYV : 1920x1080 320x180 320x240 352x288 424x240 640x360 640x480 848x480 
> 960x540 1280x720
> /dev/video0: Immediate exit requestedB vq=0KB sq=0B f=0/0
> nan:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0
> 
> ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0 
> ~/video.mkv
> 
> ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
>   built with OpenBSD clang version 13.0.0
>   configuration: --enable-shared --arch=amd64 --cc=cc --disable-debug 
> --disable-indev=jack --disable-indev=oss --disable-outdev=oss 
> --disable-outdev=sdl2 --enable-avresample --enable-fontconfig --enable-frei0r 
> --enable-gpl --enable-ladspa --enable-libaom --enable-libass 
> --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libgsm 
> --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libtheora 
> --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 
> --enable-libx265 --enable-libxml2 --enable-libxvid --enable-nonfree 
> --enable-openssl --enable-libvidstab --extra-cflags='-I/usr/local/include 
> -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
> --extra-ldsoflags= --mandir=/usr/local/man --objcc=/usr/bin/false 
> --optflags='-O2 -pipe -Wno-redundant-decls'
>   libavutil  56. 70.100 / 56. 70.100
>   libavcodec 58.134.100 / 58.134.100
>   libavformat58. 76.100 / 58. 76.100
>   libavdevice58. 13.100 / 58. 13.100
>   libavfilter 7.110.100 /  7.110.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale  5.  9.100 /  5.  9.100
>   libswresample   3.  9.100 /  3.  9.100
>   libpostproc55.  9.100 / 55.  9.100
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data found in image
> [mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
> [mjpeg @ 0x4d6db15d800] No JPEG data 

Re: openbsd 7.2 suspend / sleep issues on Lenovo ThinkPad E14 Gen 4

2023-01-06 Thread Divan Santana


>> The camera.  Which is less important, because I can plug an external
>> usb web cam.  The camera is detected, but doesn't work.  I think it
>> was recording weirdly or in some crippled fashion.

About the camera, here is some more useful info on how it doesn't work:

I've enabled the webcam in the bios now and here is a more useful report
with a dmesg[1] with integrated cam enabled.

The issue is it failed to record.  Specifically:

ds:/home/ds:5010$ ffplay -f v4l2 -list_formats all -i /dev/video0
ffplay version 4.4.2 Copyright (c) 2003-2021 the FFmpeg developers
  built with OpenBSD clang version 13.0.0
  configuration: --enable-shared --arch=amd64 --cc=cc --disable-debug 
--disable-indev=jack --disable-indev=oss --disable-outdev=oss 
--disable-outdev=sdl2 --enable-avresample --enable-fontconfig --enable-frei0r 
--enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
--enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame 
--enable-libopus --enable-libspeex --enable-libtheora --enable-libv4l2 
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 
--enable-libxml2 --enable-libxvid --enable-nonfree --enable-openssl 
--enable-libvidstab --extra-cflags='-I/usr/local/include -I/usr/X11R6/include' 
--extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --extra-ldsoflags= 
--mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe 
-Wno-redundant-decls'
  libavutil  56. 70.100 / 56. 70.100
  libavcodec 58.134.100 / 58.134.100
  libavformat58. 76.100 / 58. 76.100
  libavdevice58. 13.100 / 58. 13.100
  libavfilter 7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc55.  9.100 / 55.  9.100
[video4linux2,v4l2 @ 0x69de87bc800] Compressed:   mjpeg :
MJPEG : 1920x1080 320x180 320x240 352x288 424x240 640x360 640x480 848x480 
960x540 1280x720
[video4linux2,v4l2 @ 0x69de87bc800] Raw   : yuyv422 : 
YUYV : 1920x1080 320x180 320x240 352x288 424x240 640x360 640x480 848x480 
960x540 1280x720
/dev/video0: Immediate exit requestedB vq=0KB sq=0B f=0/0
nan:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0

ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0 
~/video.mkv

ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
  built with OpenBSD clang version 13.0.0
  configuration: --enable-shared --arch=amd64 --cc=cc --disable-debug 
--disable-indev=jack --disable-indev=oss --disable-outdev=oss 
--disable-outdev=sdl2 --enable-avresample --enable-fontconfig --enable-frei0r 
--enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
--enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame 
--enable-libopus --enable-libspeex --enable-libtheora --enable-libv4l2 
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 
--enable-libxml2 --enable-libxvid --enable-nonfree --enable-openssl 
--enable-libvidstab --extra-cflags='-I/usr/local/include -I/usr/X11R6/include' 
--extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --extra-ldsoflags= 
--mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe 
-Wno-redundant-decls'
  libavutil  56. 70.100 / 56. 70.100
  libavcodec 58.134.100 / 58.134.100
  libavformat58. 76.100 / 58. 76.100
  libavdevice58. 13.100 / 58. 13.100
  libavfilter 7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc55.  9.100 / 55.  9.100
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in image
[mjpeg @ 0x4d6db15d800] Found EOI before any SOF, ignoring
[mjpeg @ 0x4d6db15d800] No JPEG data found in 

Re: Issues booting alpine linux > 3.5 on vmm - openbsd7.2

2023-01-06 Thread Dave Voutila


di...@santanas.co.za writes:

> Hi OpenBSD friends,
>
> Just a report, not sure if it's helpful, but @voutilad requested [1] I
> send the details to the mailing list.
>
> I have seen a few reports online[1][2], about some users not being able to
> boot newer alpine linux versions (and other linux OS' in my
> experience).  Specifically I've seen the last version that boots is
> 3.5.3.
>
> My system is openbsd 7.2 on my hardware Lenovo ThinkPad E14 Gen 4
> laptop.
>
> The issue, when the alpine linux VM boots, it kernel panics.
>
> [0.052602]local IPI:
> [0.052602] invalid opcode:  [#1] SMP PTI
> [0.052602] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.79-0-virt 
> #1-Alpine
> [0.052602] Hardware name: OpenBSD VMM, BIOS 1.14.0p0-OpenBSD-vmm 
> 01/01/2011
> [0.052602] RIP: 0010:delay_halt_tpause+0xd/0x20
> [0.052602] Code: 75 fb 48 ff c8 31 c0 31 ff c3 cc cc cc cc 66 66 2e 0f 1f 
> 84 00 00 00 00 00 0f 1f 40 00 48 8d 04 37 31 c9 48 89 c2 48 c1 ea 20 <66> 0f 
> ae f1 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc 53 48 c7

The key issue here is the invalid opcode error coming from the
instruction starting with 66 0f ae, which is a TPAUSE
instruction. Hence the RIP pointing to "delay_halt_tpause" in the Linux
kernel.

I don't think I have any newer Intel hardware that supports the "User
Wait" instructions (aka WAITPKG). My Intel research says it premiered in
Tremont, Alder Lake, Sapphire Rapids so I can't test locally, but the
docs from Intel (SDM Vol. 2B 4-719) say:

 Prior to executing the TPAUSE instruction, an operating system may
 specify the maximum delay it allows the processor to suspend its
 operation. It can do so by writing TSC-quanta value to the
 following 32-bit MSR (IA32_UMWAIT_CONTROL at MSR index E1H)...

We probably should be masking the CPUID value for TPAUSE in the values
vmm(4) communicates via vmm_handle_cpuid.


> [0.052602] RSP: :abb88000be58 EFLAGS: 00010207
> [0.052602] RAX: 0400ed7bcebe RBX: 0400ed7bc48a RCX: 
> 
> [0.052602] RDX: 0400 RSI: 0a34 RDI: 
> 0400ed7bc48a
> [0.052602] RBP: 0a34 R08:  R09: 
> 
> [0.052602] R10:  R11:  R12: 
> 000f423f
> [0.052602] R13: 34f08bbb5552eaa2 R14: 7d508ff23393eff5 R15: 
> 49ec817d3937
> [0.052602] FS:  () GS:93e07e60() 
> knlGS:
> [0.052602] CS:  0010 DS:  ES:  CR0: 80050013
> [0.052602] CR2: 93e04c801000 CR3: 0c00a000 CR4: 
> 00150eb0
> [0.052602] Call Trace:
> [0.052602]  
> [0.052602]  delay_halt+0x36/0x60
> [0.052602]  test_nmi_ipi.constprop.0+0xce/0x147
> [0.052602]  dotest.constprop.0+0x1e/0xf2
> [0.052602]  nmi_selftest+0x9b/0x213
> [0.052602]  native_smp_cpus_done+0x4c/0x10e
> [0.052602]  kernel_init_freeable+0x1bd/0x369
> [0.052602]  ? rest_init+0xc0/0xc0
> [0.052602]  kernel_init+0x11/0x120
> [0.052602]  ret_from_fork+0x22/0x30
> [0.052602]  
> [0.052602] Modules linked in:
> [0.052618] ---[ end trace 710ae769548b59b6 ]---
> [0.054142] RIP: 0010:delay_halt_tpause+0xd/0x20
> [0.055698] Code: 75 fb 48 ff c8 31 c0 31 ff c3 cc cc cc cc 66 66 2e 0f 1f 
> 84 00 00 00 00 00 0f 1f 40 00 48 8d 04 37 31 c9 48 89 c2 48 c1 ea 20 <66> 0f 
> ae f1 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc 53 48 c7
> [0.061264] RSP: :abb88000be58 EFLAGS: 00010207
> [0.062602] RAX: 0400ed7bcebe RBX: 0400ed7bc48a RCX: 
> 
> [0.062602] RDX: 0400 RSI: 0a34 RDI: 
> 0400ed7bc48a
> [0.062614] RBP: 0a34 R08:  R09: 
> 
> [0.064880] R10:  R11:  R12: 
> 000f423f
> [0.067126] R13: 34f08bbb5552eaa2 R14: 7d508ff23393eff5 R15: 
> 49ec817d3937
> [0.069334] FS:  () GS:93e07e60() 
> knlGS:
> [0.071885] CS:  0010 DS:  ES:  CR0: 80050013
> [0.072602] CR2: 93e04c801000 CR3: 0c00a000 CR4: 
> 00150eb0
> [0.072602] Kernel panic - not syncing: Attempted to kill init! 
> exitcode=0x000b
> [0.072602] ---[ end Kernel panic - not syncing: Attempted to kill init! 
> exitcode=0x000b ]---
>
> my vm.conf
>
> vm "docker" {
> disable
> memory 1G
> cdrom "/home/ds/vms/alpine-virt-3.17.0-x86_64.iso"
> disk "/home/ds/vms/docker.img"
> local interface
> }
>
>
> My dmesg is below[3].
>
> I have attempted below actions, however they haven't made any difference:
> - try debian-11.6.0-amd64-netinst.iso.  It doesnt panic, that I can
>   see, but seems to freeze right at the beginning.
> - pass "console=/dev/ttyS0,115200" to the kernel command line arguments.
> - boot my system with default sysctl values.
>
> @voutilad 

Re: Change (spoof) MAC address

2023-01-06 Thread Tomaž Kokolj
Hi everyone,

Work week is over and I have time to play with real hardware.
Just wanted to let you know that this configuration did work:

# cat /etc/hostname.re0
inet autoconf lladdr 00:11:22:33:44:55

# ifconfig re0
re0: flags=808843 mtu 1500
lladdr 00:11:22:33:44:55
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.0.208 netmask 0x broadcast 192.168.255.255

But it did not work within VirtualBox.
Possibly a bug?

Best regards


openbsd 7.2 suspend / sleep issues on Lenovo ThinkPad E14 Gen 4

2023-01-06 Thread Divan Santana
Greetings All :)

Generally openbsd7.2 works well on Lenovo ThinkPad E14 Gen 4.

Their is two main things that aren't working.

The camera.  Which is less important, because I can plug an external
usb web cam.  The camera is detected, but doesn't work.  I think it
was recording weirdly or in some crippled fashion.

The main issue is trying to put the laptop to sleep / suspend or
hibernate.

In the BIOS if it's set to "s3 state", when I do =apm -S= or =apm -z=
it does put the system to sleep but when I resume it powers the
machine on from scratch.

If in the BIOS I have power sleep state set to "windows or linux" (the
default), then both =apm -z= or =apm -S= simply, do nothing (except
print to the screen that it will go to sleep).

I guess it is new hardware.  Not a great idea to have the latest
hardware I guess when you want to run openbsd I guess.  Sadly, it's
what workplaces tend to buy (and they not flexible).

Lastly when I try hibernate the system, it invokes hibernation and it
appears to resume.  However it doesn't restore it properly.  It seems
to get stuck right at the end of the hibernation and when switching to
X, one just sees a cursor flash.

Here is my system dmesg[1](dups removed).  Here is a dmesg from a failed 
hibernation
resume[2](dups removed).

Let me know if anyone wants more info or has any suggestions for me to
try to get it working.

These lines look concerning...

drm:pid91368:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080

[1]:

R* Fault errors on pipe A: 0x0080
drm:pid91368:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid86263:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 
0x0080
drm:pid28195:gen8_de_irq_handler *ERROR* [drm] *ERROR* Fault errors on pipe A: 

Issues booting alpine linux > 3.5 on vmm - openbsd7.2

2023-01-06 Thread divan
Hi OpenBSD friends,

Just a report, not sure if it's helpful, but @voutilad requested [1] I
send the details to the mailing list.

I have seen a few reports online[1][2], about some users not being able to
boot newer alpine linux versions (and other linux OS' in my
experience).  Specifically I've seen the last version that boots is
3.5.3.

My system is openbsd 7.2 on my hardware Lenovo ThinkPad E14 Gen 4
laptop.

The issue, when the alpine linux VM boots, it kernel panics.

[0.052602]local IPI:
[0.052602] invalid opcode:  [#1] SMP PTI
[0.052602] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.79-0-virt 
#1-Alpine
[0.052602] Hardware name: OpenBSD VMM, BIOS 1.14.0p0-OpenBSD-vmm 01/01/2011
[0.052602] RIP: 0010:delay_halt_tpause+0xd/0x20
[0.052602] Code: 75 fb 48 ff c8 31 c0 31 ff c3 cc cc cc cc 66 66 2e 0f 1f 
84 00 00 00 00 00 0f 1f 40 00 48 8d 04 37 31 c9 48 89 c2 48 c1 ea 20 <66> 0f ae 
f1 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc 53 48 c7
[0.052602] RSP: :abb88000be58 EFLAGS: 00010207
[0.052602] RAX: 0400ed7bcebe RBX: 0400ed7bc48a RCX: 
[0.052602] RDX: 0400 RSI: 0a34 RDI: 0400ed7bc48a
[0.052602] RBP: 0a34 R08:  R09: 
[0.052602] R10:  R11:  R12: 000f423f
[0.052602] R13: 34f08bbb5552eaa2 R14: 7d508ff23393eff5 R15: 49ec817d3937
[0.052602] FS:  () GS:93e07e60() 
knlGS:
[0.052602] CS:  0010 DS:  ES:  CR0: 80050013
[0.052602] CR2: 93e04c801000 CR3: 0c00a000 CR4: 00150eb0
[0.052602] Call Trace:
[0.052602]  
[0.052602]  delay_halt+0x36/0x60
[0.052602]  test_nmi_ipi.constprop.0+0xce/0x147
[0.052602]  dotest.constprop.0+0x1e/0xf2
[0.052602]  nmi_selftest+0x9b/0x213
[0.052602]  native_smp_cpus_done+0x4c/0x10e
[0.052602]  kernel_init_freeable+0x1bd/0x369
[0.052602]  ? rest_init+0xc0/0xc0
[0.052602]  kernel_init+0x11/0x120
[0.052602]  ret_from_fork+0x22/0x30
[0.052602]  
[0.052602] Modules linked in:
[0.052618] ---[ end trace 710ae769548b59b6 ]---
[0.054142] RIP: 0010:delay_halt_tpause+0xd/0x20
[0.055698] Code: 75 fb 48 ff c8 31 c0 31 ff c3 cc cc cc cc 66 66 2e 0f 1f 
84 00 00 00 00 00 0f 1f 40 00 48 8d 04 37 31 c9 48 89 c2 48 c1 ea 20 <66> 0f ae 
f1 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc 53 48 c7
[0.061264] RSP: :abb88000be58 EFLAGS: 00010207
[0.062602] RAX: 0400ed7bcebe RBX: 0400ed7bc48a RCX: 
[0.062602] RDX: 0400 RSI: 0a34 RDI: 0400ed7bc48a
[0.062614] RBP: 0a34 R08:  R09: 
[0.064880] R10:  R11:  R12: 000f423f
[0.067126] R13: 34f08bbb5552eaa2 R14: 7d508ff23393eff5 R15: 49ec817d3937
[0.069334] FS:  () GS:93e07e60() 
knlGS:
[0.071885] CS:  0010 DS:  ES:  CR0: 80050013
[0.072602] CR2: 93e04c801000 CR3: 0c00a000 CR4: 00150eb0
[0.072602] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b
[0.072602] ---[ end Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b ]---

my vm.conf

vm "docker" {
disable
memory 1G
cdrom "/home/ds/vms/alpine-virt-3.17.0-x86_64.iso"
disk "/home/ds/vms/docker.img"
local interface
}


My dmesg is below[3].

I have attempted below actions, however they haven't made any difference:
- try debian-11.6.0-amd64-netinst.iso.  It doesnt panic, that I can
  see, but seems to freeze right at the beginning.
- pass "console=/dev/ttyS0,115200" to the kernel command line arguments.
- boot my system with default sysctl values.

@voutilad suggested:

> Are you on Intel-based hardware for the OpenBSD host? If so, it's
> probably the Linux kernel probing some expected Intel hardware via
> MMIO registers. vmm(4) and vmd(8) do not implement support for
> emulating that access yet, but there is some preliminary support I
> committed a few months ago that's gated behind an #ifdef. It requires
> a -current host and building vmd(8) from source and twiddling the
> MMIO_NOTYET definition.

I'm not on -current and not familiar with openbsd enough to switch (or
have the time to look at it now).

Any suggestions would be good.

[1]: https://gist.github.com/voutilad/a5080909e88e8dcffd1960312b5f9510
[2]: 
https://www.reddit.com/r/openbsd/comments/zwvswv/cant_get_a_virtual_os_started_on_72/

[3]:

OpenBSD 7.2 (GENERIC.MP) #4: Mon Dec 12 06:06:42 MST 2022

r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16823484416 (16044MB)
avail mem = 16296214528 (15541MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at 

Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

On 1/6/23 13:42, Alexandre Ratchov wrote:

could you post the output of dmesg (at least the midi-related lines).


I haven't been able to find any. I should add that this is a fresh 
install of OpenBSD 7.2. For thoroughness, The entire dmesg is available 
Here:


https://pastebin.com/McSXuvu9




Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

On 1/6/23 18:40, Alexandre Ratchov wrote:

On Fri, Jan 06, 2023 at 10:18:37AM +0100, Brian Durant wrote:

Hi,
Completely lost as to the cause for the error. I have read the relevant man
pages as well as searching the mail archive.

System info:
OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 4600G
and Radeon Graphics.

Error messages:
$ midicat -d -q midi/0 -q midithru/0
midi/0: couldn't open port
$ midicat -d -q midi/1 -q midithru/0
midi/1: couldn't open port



according to your dmesg (other mail), you don't any MIDI ports on your
machine.


Relevant output:
$ dmesg ...
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3



Do you know if this is class-compliant (aka "driverless")? OpenBSD
supports only class-compliant MIDI devices.


Interesting question. I know that it works with various Linux 
distributions, which to my understanding also work with class compliant 
devices as a point of reference. However, the Roland A-800 Pro also has 
an "ACT" mode which requires a Windows driver if used. I have never used 
it in "ACT" mode and never needed a special driver.


Unfortunately, I will probably have to assume that OpenBSD at least, 
doesn't consider this device class compliant. A pity as it is difficult 
to find MIDI keyboards with better than average keys...



Not all old devices are class-compliant because in the 2000's, Windows
used to have a bug that hardware designers tried to
workaround. Certain devices from the 2000's have a switch (or
configuration parameter) to switch between vendor-specific and
class-compliant modes. Try to dig in the manual. If you can't switch
the device to class-compliant mode, get a USB-MIDI interface, they are
cheap nowadays and just work.


$ cat /etc/rc.conf.local
pkg_scripts=avahi_daemon messagebus gdm cups_browsed
sndiod_flags=-z 128 -f rsnd/1

$ cat /etc/sysctl.conf
kern.audio.record=1

sndiod flags are for reduced latency and for audio to work properly on my
Huawei MateStation.


seems correct


Thanks for your time.



Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Alexandre Ratchov
On Fri, Jan 06, 2023 at 10:18:37AM +0100, Brian Durant wrote:
> Hi,
> Completely lost as to the cause for the error. I have read the relevant man
> pages as well as searching the mail archive.
> 
> System info:
> OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 4600G
> and Radeon Graphics.
> 
> Error messages:
> $ midicat -d -q midi/0 -q midithru/0
> midi/0: couldn't open port
> $ midicat -d -q midi/1 -q midithru/0
> midi/1: couldn't open port
> 

according to your dmesg (other mail), you don't any MIDI ports on your
machine.

> Relevant output:
> $ dmesg ...
> uaudio0: sync play xfer, err = 6
> uaudio0: sync play xfer, err = 6
> uaudio0: sync play xfer, err = 6
> ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3
> 

Do you know if this is class-compliant (aka "driverless")? OpenBSD
supports only class-compliant MIDI devices.

Not all old devices are class-compliant because in the 2000's, Windows
used to have a bug that hardware designers tried to
workaround. Certain devices from the 2000's have a switch (or
configuration parameter) to switch between vendor-specific and
class-compliant modes. Try to dig in the manual. If you can't switch
the device to class-compliant mode, get a USB-MIDI interface, they are
cheap nowadays and just work.

> $ cat /etc/rc.conf.local
> pkg_scripts=avahi_daemon messagebus gdm cups_browsed
> sndiod_flags=-z 128 -f rsnd/1
> 
> $ cat /etc/sysctl.conf
> kern.audio.record=1
> 
> sndiod flags are for reduced latency and for audio to work properly on my
> Huawei MateStation.

seems correct



回复: 回复: 回复: 回复: Softraid crypto metadata backup

2023-01-06 Thread Nathan Carruth
None of those issues are of the form “a hundred bad bytes will
permanently and irrevocably destroy all data on your entire disk”.
Unless I am mistaken, crypto header corruption is.



On Jan 05 22:22:44, n.carr...@alum.utoronto.ca wrote:
> Given that one of the goals of the OpenBSD project is to produce
> reliable documentation, I would have expected that this kind of potential
> corruption would have been at least mentioned
> somewhere. Surely we don’t expect every user to read the code for
> all the software they use to be sure there are no well-known but
> undocumented data holes?

If a ffs's superblocks get corrupted, the fs will be unusable.
If a file's inode gets corrupted, the file will bu unusable.
Should this be mentioned in the respective manpages?

Also, libc.so corruption will break all dynamicaly linked binaries.
And if /bsd gets corrupted, the system will be unbootable.

Are these undocumented data holes? Are you distressed to find
so potentially huge an issue completely undocumented?


    Jan


> Even just a line like this would be useful:
>
> “Note: bioctl(8) writes header information (such as salt values for
> crypto volumes) at the start of the original partition. See [relevant source
> file] for details. If this information should become corrupted, the 
> softraid(4)
> volume will become unusable.”
>
> Thanks!
> Nathan
>
> PS I have been using OpenBSD since 2010. I like it very much in many
> ways, but I am distressed to find so potentially huge an issue completely
> undocumented.
>
>



Re: obsd install initial boot process slowed down

2023-01-06 Thread Alexander Hall
Hi Sylvain,

[Cc: tech@ removed. Do not cross post.]

While Nick and Stuart has assisted you with the question per se,
I'd like to point out a totally non-technical issue that at least
caused me a little confusion from the beginning:

On Wed, Jan 04, 2023 at 07:13:23AM +0100, Sylvain Saboua wrote:
> ...
> The initial boot process, right after I type the security
> key in, which displays cyphers aligning in between rotating
> semicolumns (I hope this is clear), is slow, on this install.

I believe the word you're looking for is not "cyphers", but rather
"digits". Assuming you're french, "chiffres" would also be a proper
translation for "cyphers" (or "ciphers"), but that refers to 
cryptographic methods, and not the digits [0-9].

Cheers,
Alexander



Re: (video) obsd install initial boot process slowed down

2023-01-06 Thread Eric Elena
On Fri, 6 Jan 2023 11:04:46 - (UTC) Stuart Henderson wrote:
> >> On 1/4/23 01:13, Sylvain Saboua wrote:
> >>> Hi, my openbsed (encrypted) install is functionning really
> >>> well, apart from one thing, that would signal a bug or smth:
> ..
> 
> On 2023-01-05, Sylvain Saboua  wrote:
> > https://youtu.be/lzGT1TAGG1Y
> 
> So just under 30 seconds. Not super fast but I don't think it signals a bug.

When I upgraded my VPS to 7.2 it took more than 10 minutes (no kidding)
to load the kernel and reach the "entry point at..." step after typing
my passphrase, then everything was normal. I only rebooted the OS to
either (7.2) bsd.rd or (7.2) bsd, I didn't try to turn the machine off
or boot another kernel after that. It was the first time I observed
such a thing with this instance in 6 years. Dmesg below just in case,
as it is a virtual machine there could be many reasons to explain this behavior.

OpenBSD 7.2 (GENERIC) #728: Tue Sep 27 11:49:18 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 1056813056 (1007MB)
avail mem = 1007554560 (960MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf5940 (9 entries)
bios0: vendor Vultr
bios0: Vultr VC2
acpi0 at bios0: ACPI 1.0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC HPET WAET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Core Processor (Broadwell, no TSX, IBRS), 2400.56 MHz,
06-3d-02 cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,SSBD,ARAT,XSAVEOPT,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 4MB
64b/line 16-way L2 cache, 16MB 64b/line 16-way L3 cache cpu0: smt 0,
core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88
fixed ranges cpu0: apic clock running at 1000MHz ioapic0 at mainbus0:
apid 0 pa 0xfec0, version 20, 24 pins acpihpet0 at acpi0: 1
Hz acpiprt0 at acpi0: bus 0 (PCI0)
"ACPI0006" at acpi0 not configured
acpipci0 at acpi0 PCI0
acpicmos0 at acpi0
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
acpicpu0 at acpi0: C1(@1 halt!)
cpu0: using Broadwell MDS workaround
pvbus0 at mainbus0: KVM
pvclock0 at pvbus0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives) atapiscsi0 at pciide0 channel 1
drive 0 scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0:  removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 0 int
11 piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03:
apic 0 int 9 iic0 at piixpm0
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 56:00:00:6e:5b:9b
virtio0: msix shared
virtio1 at pci0 dev 4 function 0 "Qumranet Virtio Storage" rev 0x00
vioblk0 at virtio1
scsibus2 at vioblk0: 1 targets
sd0 at scsibus2 targ 0 lun 0: 
sd0: 25600MB, 512 bytes/sector, 52428800 sectors
virtio1: msix shared
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory Balloon" rev
0x00 viomb0 at virtio2
virtio2: apic 0 int 10
virtio3 at pci0 dev 6 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio3
virtio3: apic 0 int 10
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1 uhidev0 at uhub0 port 1 configuration 1 interface 0
"QEMU QEMU USB Tablet" rev 2.00/0.00 addr 2 uhidev0: iclass 3/0
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd1 at scsibus4 targ 1 lun 0: 
sd1: 25595MB, 512 bytes/sector, 52419503 sectors
root on sd1a (e7c50e2c7957eecd.a) swap on sd1b dump on sd1b
fd0 at fdc0 drive 1: density unknown



Re: OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Alexandre Ratchov
On Fri, Jan 06, 2023 at 10:18:37AM +0100, Brian Durant wrote:
> Hi,
> Completely lost as to the cause for the error. I have read the relevant man
> pages as well as searching the mail archive.
> 
> System info:
> OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 4600G
> and Radeon Graphics.
> 
> Error messages:
> $ midicat -d -q midi/0 -q midithru/0
> midi/0: couldn't open port
> $ midicat -d -q midi/1 -q midithru/0
> midi/1: couldn't open port
> 

could you post the output of dmesg (at least the midi-related lines).

> Relevant output:
> $ dmesg ...
> uaudio0: sync play xfer, err = 6
> uaudio0: sync play xfer, err = 6
> uaudio0: sync play xfer, err = 6
> ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3
> 
> $ cat /etc/rc.conf.local
> pkg_scripts=avahi_daemon messagebus gdm cups_browsed
> sndiod_flags=-z 128 -f rsnd/1
> 
> $ cat /etc/sysctl.conf
> kern.audio.record=1
> 
> sndiod flags are for reduced latency and for audio to work properly on my
> Huawei MateStation.
> 
> Brian
> 
> 



OpenBSD 7.2 amd64, MIDI error "midi/0: couldn't open port".

2023-01-06 Thread Brian Durant

Hi,
Completely lost as to the cause for the error. I have read the relevant 
man pages as well as searching the mail archive.


System info:
OpenBSD 7.2 amd64, GNOME 42.5, Huawei MateStation S with AMD Ryzen 5 
4600G and Radeon Graphics.


Error messages:
$ midicat -d -q midi/0 -q midithru/0
midi/0: couldn't open port
$ midicat -d -q midi/1 -q midithru/0
midi/1: couldn't open port

Relevant output:
$ dmesg ...
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
uaudio0: sync play xfer, err = 6
ugen2 at uhub2 port 2 "Roland A-PRO" rev 1.10/1.20 addr 3

$ cat /etc/rc.conf.local
pkg_scripts=avahi_daemon messagebus gdm cups_browsed
sndiod_flags=-z 128 -f rsnd/1

$ cat /etc/sysctl.conf
kern.audio.record=1

sndiod flags are for reduced latency and for audio to work properly on 
my Huawei MateStation.


Brian



Re: (video) obsd install initial boot process slowed down

2023-01-06 Thread Stuart Henderson
>> On 1/4/23 01:13, Sylvain Saboua wrote:
>>> Hi, my openbsed (encrypted) install is functionning really
>>> well, apart from one thing, that would signal a bug or smth:
..

On 2023-01-05, Sylvain Saboua  wrote:
> https://youtu.be/lzGT1TAGG1Y

So just under 30 seconds. Not super fast but I don't think it signals a bug.




Re: 回复: 回复: 回复: Softraid crypto metadata backup

2023-01-06 Thread Jan Stary
On Jan 05 22:22:44, n.carr...@alum.utoronto.ca wrote:
> Given that one of the goals of the OpenBSD project is to produce
> reliable documentation, I would have expected that this kind of potential
> corruption would have been at least mentioned
> somewhere. Surely we don’t expect every user to read the code for
> all the software they use to be sure there are no well-known but
> undocumented data holes?

If a ffs's superblocks get corrupted, the fs will be unusable.
If a file's inode gets corrupted, the file will bu unusable.
Should this be mentioned in the respective manpages?

Also, libc.so corruption will break all dynamicaly linked binaries.
And if /bsd gets corrupted, the system will be unbootable.

Are these undocumented data holes? Are you distressed to find
so potentially huge an issue completely undocumented?


Jan


> Even just a line like this would be useful:
> 
> “Note: bioctl(8) writes header information (such as salt values for
> crypto volumes) at the start of the original partition. See [relevant source
> file] for details. If this information should become corrupted, the 
> softraid(4)
> volume will become unusable.”
> 
> Thanks!
> Nathan
> 
> PS I have been using OpenBSD since 2010. I like it very much in many
> ways, but I am distressed to find so potentially huge an issue completely
> undocumented.
> 
>