Re: Interesting behavior of 7.4 -> 7.5 upgrade on Protectli VP2420

2024-04-10 Thread Ollie Strickland
I had a similar experience on a VP2410, but solved it in a different way. I did 
not connect a display and keyboard.

I attempted a remote 7.4 -> 7.5 sysupgrade a few days ago on a Protectli 
VP2410; mine also came back after the upgrade reboot as 7.4.

So today I dispatched to the client site with a console cable to see what was 
happening, here is what I see on the console after a reboot - 
https://imgur.com/a/o7WMgkc

I found the message - "/bsd.upgrade is not u+x" - I looked at the upgrade 
kernel and it did lack the execute bit; it was 600.

Here is the rest of the sequence of events:

1 - I manually set the execute bit with "chmod 700 /bsd.upgrade"
2 - I rebooted, and it went through the auto upgrade procedure and appeared to 
succeed
3 - but again it was booting into 7.4 after the reboot
4 - I saw that bsd.upgrade still existed and the execute bit was gone, it was 
back to 600
5 - I then deleted bsd.upgrade and ran sysupgrade again
6 - this time the process was successful
7 - I was in via ssh simultaneously along with watching the console
8 - I never hooked up a keyboard or display
9 - FYI - I ordered my Protectli with coreboot firmware (not the AMI option)

I saved the Putty session and pasted below. This will not show my actions from 
the ssh session though, such as changing the execute bit and deleting 
/bsd.upgrade.

Ollie Strickland

---
DEL   to enter Setup
F11   to enter Boot Manager Menu
ENTER to boot directly


probing: pc0 mem[636K 255M 1377M 19M 44K 2M 2048M]
disk: hd0 hd1* hd2*
>> OpenBSD/amd64 BOOTX64 3.65
/bsd.upgrade is not u+x
boot>
booting hd0a:/bsd: 17245516+4142088+364576+0+1241088 
[1347582+128+1321104+1013340]=0x1973370
entry point at 0x1001000

DEL   to enter Setup
F11   to enter Boot Manager Menu
ENTER to boot directly

probing: pc0 mem[636K 255M 1377M 19M 44K 2M 2048M]
disk: hd0 hd1* hd2*
>> OpenBSD/amd64 BOOTX64 3.65
upgrade detected: switching to /bsd.upgrade
boot>
booting hd0a:/bsd.upgrade: 4076463+1688576+3891240+0+708608 
[109+464016+317541]=0xaa40e8
entry point at 0x1001000

DEL   to enter Setup
F11   to enter Boot Manager Menu
ENTER to boot directly

probing: pc0 mem[636K 255M 1377M 19M 44K 2M 2048M]
disk: hd0 hd1* hd2*
>> OpenBSD/amd64 BOOTX64 3.65
/bsd.upgrade is not u+x
boot>
NOTE: random seed is being reused.
booting hd0a:/bsd: 17245516+4142088+364576+0+1241088 
[1347582+128+1321104+1013340]=0x1973370
entry point at 0x1001000

DEL   to enter Setup
F11   to enter Boot Manager Menu
ENTER to boot directly

probing: pc0 mem[636K 255M 1377M 19M 44K 2M 2048M]
disk: hd0 hd1* hd2*
>> OpenBSD/amd64 BOOTX64 3.65
/bsd.upgrade is not u+x
boot> set tty com0
switching console to com0
>> OpenBSD/amd64 BOOTX64 3.65
boot>
booting hd0a:/bsd: 17245516+4142088+364576+0+1241088 
[1347582+128+1321104+1013340]=0x1973370
entry point at 0x1001000
[ using 3683184 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.4 (GENERIC.MP) #3: Wed Feb 28 06:23:33 MST 2024

r...@syspatch-74-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3843108864 (3665MB)
avail mem = 3706884096 (3535MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.3 @ 0x697be000 (15 entries)
bios0: vendor 3mdeb version "coreboot 4.13, Dasharo  1.0.15" date 05/31/2022
bios0: Protectli VP2410
efi0 at bios0: UEFI 2.7
efi0: EDK II rev 0x1
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC DMAR HPET
acpi0: wakeup devices XHCI(S3) HDAS(S3) SLP_(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpimadt0 at acpi0 addr 0xfee0
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz, 2000.00 MHz, 06-7a-08, patch 
0024
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,IF_PSCHANGE,MISC_PKG_CT,ENERGY_FILT,GDS_NO,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 24KB 64b/line 6-way D-cache, 32KB 64b/line 8-way I-cache, 4MB 64b/line 
16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 19MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz, 2000.00 MHz, 06-7a-08, patch 
0024
cpu1: 

Restic rest server broken with relayd.

2024-04-10 Thread a
Hi all.

I've updated my server to OpenBSD 7.5, where relayd(8)
works as a reverse proxy for a bunch of services, including
the restic-rest-server from ports.

However, with the change in version 1.87 of the
usr.sbin/relayd/relay_http.c file, relayd(8) stopped
forwarding the content-length header in response to
HEAD requests.

The restic client, before doing anything, does a HEAD
request to understand the size of the repository config file
but, of course, restic gives up because of the absence of
the content-length header in the respone.

Is there a way to restore the previous behaviour in relayd(8)
or, is there a known workaround for restic, in this case?

I know that relayd(8) is right and, luckily, the important
files are backed-up locally using just http, so it's not
an emergency.

Thanks in advance.

-- 
absc



No internet connection (firewall block)

2024-04-10 Thread Karel Lucas

Hi all,

With the new firewall I am setting up I cannot connect to the internet. 
That starts with traceroute, so let's start there. Ping works fine. 
Below I have listed my pf.conf file.




/etc/pf.conf:

ext_if = igc0 # Extern interface
int_if = "{ igc1, igc2 }" # Intern interfaces
localnet = "192.168.2.0/24"
tcp_services = "{ smtp, domain, www, auth, http, https, pop3, pop3s }"
udp_services = "{ domain, ntp }"
email = "{ smtp, imap, imaps, imap3, pop3, pop3s }"
icmp_types = "{ echoreq, unreach }"
icmp6_types = "{ echoreq, unreach }"
nameservers = "{ 195.121.1.34, 195.121.1.66 }"
client_out = "{ ssh, domain, pop3, auth, nportntp, http, https, \
                      446, cvspserver, 2628, 5999, 8000, 8080 }"
Martians = "{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, \
                    10.0.0.0/8, 169.254, 0.0/16, 192.0.2.0/24, \
                    0.0.0.0/8, 240.0.0.0/4 }"

set skip on lo
# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010

block log all                # block stateless traffic

block in quick on $ext_if from $martians to any
block out quick on $ext_if from any to $martians

# Letting ping through:
pass log on inet proto icmp icmp-type $icmp_types
pass log on inet6 proto icmp6 icmp6-type $icmp6_types

# Allow out the default range for traceroute(*):
# "base+nhops*nqueries-1" (3434+64*3-1)
pass log out on egress inet proto udp to port 33433:33626 # for IPv4
pass log out on egress inet6 proto udp to port 33433:33626 # for IPv6

pass log quick on $ext_if inet proto {tcp, udp} from $localnet \
        to port $udp_services
pass log on $ext_if inet proto icmp all icmp-type $icmp_types
pass log on $ext_if inet proto tcp from $localnet to port $client_out
pass log out proto tcp to port $tcp_services   # establish keep-stat
pass log log proto udp to port $udp_services   # Establish keep-state



Re: Ping blocked by firewall

2024-04-10 Thread Peter N. M. Hansteen
On Wed, Apr 10, 2024 at 11:01:18PM +0200, Peter N. M. Hansteen wrote:
> Another gentle introduction can be found in the latest PF tutorial,
> the slides for the AsiaBSDCon 2024 version can be found as
> https://nxdomain.no/~peter/pf_asiabsdcon2024.pdf which in turn has
> references to various useful resources.

and I should add that the labs referenced there are almost certainly
not available at the moment. They tend to be turned on specifically
for the sessions and are generally only left running for a few days.

- P

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Ping blocked by firewall

2024-04-10 Thread Peter N. M. Hansteen
On Wed, Apr 10, 2024 at 04:41:58PM -0400, Steve Litt wrote:
> I found out where to buy your book, and will buy it once I have the
> "for dummies" level of knowledge. In the meantime, what other PF
> references do you recommend? I know just enough PF to be dangerous, but
> want to make my own BSD/PF firewall/router.

The Book of PF was meant to be accessible to people with only basic
networking knowledge, but anyway -

I'd start with the official PF user guide at 
https://www.openbsd.org/faq/pf/index.html
and look up the relevant man pages.

Another gentle introduction can be found in the latest PF tutorial,
the slides for the AsiaBSDCon 2024 version can be found as
https://nxdomain.no/~peter/pf_asiabsdcon2024.pdf which in turn has
references to various useful resources.

And of course, this mailing list tends to be receptive to reasonably
formulated questions.

All the best,
Peter


-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Interesting behavior of 7.4 -> 7.5 upgrade on Protectli VP2420

2024-04-10 Thread Amarendra Godbole
I remotely upgraded the protectli vp2420 firewall appliance from 7.4
to 7.5 (amd64), and the upgrades went smoothly. However, the reboot
showed 7.4. Had bsd.upgrade, etc. created.

I then attached a monitor and keyboard to this appliance and ran
sysupgrade again, this time around the upgrade went fine, and it booted
up in 7.5.

I am curious to understand why my remote upgrade attempt did not
produce the desired result, while local upgrade with keyboard/monitor
did. Any pointers will be helpful.

Thanks in advance.

-ag



Re: newfs fast, but newfs_msdos and newfs_ext2fs very slow

2024-04-10 Thread Stanislav Syekirin
Thanks, I will experiment with a correctly partitioned USB stick and 
with different block sizes. But could you please clarify the 
following:



I don't think there's
really much you can do. There's no "quick format" option for 
newfs_msdos

like there is on Windows.


I thought the difference between quick format and slow format was that 
the latter overwrites the whole disk and the former only writes as 
much as necessary to get a working filesystem. But it looks to me that 
newfs_msdos actually doesn't write a lot. I did the following 
experiment (didn't verify it with the USB stick yet): I generated a 
binary file with a pattern of all bytes from 0 to 255 repeated 256 
times. For the resulting 64K file, I configured a device with 
vnconfig. Then I called newfs_msdos on the corresponding raw device. 
Hexdump on the original file shows that only the bytes before 
0x4600 were overwritten, after that, the pattern is still there. 
So I'm confused about how this is different from quick format.


Best regards
Stanislav Syekirin



Re: 7.5 /var/log/messages - vfprintf %s NULL in "%.*s"

2024-04-10 Thread Eivind Eide
> Now I wanted to start testing environmental variables so I completely
> removed the ~/.terminfo/ directory, expecting the previous behavior to
> return. However, I cannot reproduce! I even tried rebooting, but no. I
> have no rational explanation for this.

UPDATE: If the ~/.terminfo/ directory EXIST in users home but the
termcap file is missing, the behaviour returns.
It's to late now, but I will do the tests and report back tomorrow.


-- 



Eivind Eide

"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts



Re: [dmesg] Framework Laptop 16 (AMD Ryzen 7040 Series)

2024-04-10 Thread Johannes Thyssen Tishman
> When you are ready and have a chance, could you post to dmesgd.nycbug.org 
> please?

Didn't know about this, very nice. Done!

https://dmesgd.nycbug.org/index.cgi?do=view=7654



Re: [dmesg] Framework Laptop 16 (AMD Ryzen 7040 Series)

2024-04-10 Thread Johannes Thyssen Tishman
> ...
> urtwn0 at uhub4 port 1 configuration 1 interface 0 "Realtek 802.11n NIC" rev 
> 2.10/2.00 addr 4
> urtwn0: MAC/BB RTL8192EU, RF 6052 2T2R, address a8:42:a1:91:20:eb
> ...

Just noticed I had my wireless usb adapter connected when I got this
dmesg. The above dmesg excerpt corresponds to it and can be ignored.



7.5 problems with browser video and audio, part 2

2024-04-10 Thread whistlez
Hello I write again about the following sent mail to misc:

https://marc.info/?l=openbsd-misc=171260331305047=2

I use the link to the archive because I deleted all the mailing list
mails then I can'f do a follow up.

Anyway I have some news. 
If I run sndiod as my user with the following:
$ sndiod -dd
the browsers audio (firefox, chromium, ungoogled-chromium and iridium)
works for about 10-15 seconds.
After that it stops to work.
The following are the logs:
snd0: rec hw xrun, rused = 6720/7680
snd0: play hw xrun, pused = 960/7680
snd0: watchdog timeout  
firefox0: detached at -7200 + 0/480
snd0: software master level control enabled
0/output.level=127 at 6 -> dev_master:0: added
0/output.level=127 at 6 -> dev_master:0: removed

The error seems:
snd0: watchdog timeout   

If I run sndiod as user like the following (with -m play):
$ sndiod -m play
 works very well. With ps aux | grep sndiod ti say that the process run
as my user.

If I run the rc script the process take the defaul user  permission:
_sndiop and _sndio
with these permessions the audio doesn't work neither for few seconds.
Other userful info:
# audioctl
name=auich0
mode=
pause=1
active=0
nblks=16
blksz=480
rate=48000
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0
# ls -l /dev/audi*
crw-rw  1 root  wheel   42,   0 Apr 10 20:08 /dev/audio0
crw-rw  1 root  wheel   42,   1 Apr  7 17:34 /dev/audio1
crw-rw  1 root  wheel   42,   2 Apr  7 17:34 /dev/audio2
crw-rw  1 root  wheel   42,   3 Apr  7 17:34 /dev/audio3
crw-rw  1 root  wheel   42, 192 Apr  7 17:34 /dev/audioctl0
crw-rw  1 root  wheel   42, 193 Apr  7 17:34 /dev/audioctl1
crw-rw  1 root  wheel   42, 194 Apr  7 17:34 /dev/audioctl2
crw-rw  1 root  wheel   42, 195 Apr  7 17:34 /dev/audioctl3

Thus it seems a permission problem. But as I already said If I run "mpv
my_video.mp4" audio works even with the default permission but now with
browsers.
Hope this is useful.
Thanks all.
Have a nice day.
W.

  



Re: [dmesg] Framework Laptop 16 (AMD Ryzen 7040 Series)

2024-04-10 Thread Pat McEvoy


> On Apr 10, 2024, at 13:19, Johannes Thyssen Tishman 
>  wrote:
> 
> (See dmesg and sysctl hw.sensors below)
> 
> Working:
> Audio
> Keyboard backlight
> Hibernation
> Camera
> Microphone
> USB-A Expansion Card
> USB-C Expansion Card
> HDMI Expansion Card[0]
> 
> Not working:
> Suspend/Resume[1]
> Touchpad[2]
> Bluetooth
> WiFi[3]
> Fingerprint sensor[4]
> Audio Jack Expansion Card
> DisplayPort Expansion Card
> 
> What's not working above seems to be OpenBSD specific as it was also
> tested on Linux (Ubuntu 22.04 Live) and it is working (with the
> exception of the DisplayPort Expansion Card that also didn't work in
> Linux). The expansion cards were connected based on the slot description
> from Frameworks documentation[5].
> 
> [0] It seems to only work when booting with the HDMI cable already
> connected
> 
> [1] /var/log/messages: /bsd: acpi0 state S3 unavailable
> 
> [2] For some reason it only works when using 5 fingers (no more, no
> less), so maybe this is a configuration issue? Any clues on how to solve
> this?
> 
> [3] There was a recent commit[6] by claudio@ adding a new mwx(4) driver
> that should support this WiFi card (MT7922) in the future. claudio@: If
> it helps, I'd be happy to test patches or even mail you the WiFi card.
> 
> [4] Sensor seems to be detected (see dmesg below, 'Goodix'?) but runing
> enroll_fingerprint from the login_fingerprint package returns 'No
> devices detected.'
> 
> [5] 
> https://knowledgebase.frame.work/en_us/expansion-card-slot-functionality-on-framework-laptop-16-rkUjGm7cn
> [6] https://marc.info/?l=openbsd-cvs=170851239831123=2

When you are ready and have a chance, could you post to dmesgd.nycbug.org 
please?





> 
> 
> OpenBSD 7.5-current (GENERIC.MP) #20: Tue Apr  9 19:33:09 MDT 2024
>dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 33474949120 (31924MB)
> avail mem = 32438943744 (30936MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.5 @ 0x51675000 (40 entries)
> bios0: vendor INSYDE Corp. version "03.02" date 01/23/2024
> bios0: Framework Laptop 16 (AMD Ryzen 7040 Series)
> efi0 at bios0: UEFI 2.8
> efi0: INSYDE Corp. rev 0x302
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S4 S5
> acpi0: tables DSDT FACP UEFI SSDT SSDT SSDT ASF! BOOT HPET APIC MCFG SLIC 
> VFCT SSDT SSDT CRAT CDIT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
> SSDT SSDT SSDT FPDT WSMT TPM2 SSDT MHSP SSDT IVRS SSDT SSDT SSDT SSDT SSDT 
> SSDT SSDT SSDT SSDT SSDT SSDT SSDT BGRT
> acpi0: wakeup devices GPP0(S4) SWUS(S4) SWDS(S4) GPP1(S4) GPP2(S4) GPP5(S4) 
> GPP6(S4) GPP7(S4) GP11(S4) SWUS(S4) GP12(S4) SWUS(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpihpet0 at acpi0: 14318180 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.01 MHz, 19-74-01, 
> patch 0a704103
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,HWPSTATE,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,L1DF,IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
> 8-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 24MHz
> cpu0: mwait min=64, max=64, C-substates=1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.00 MHz, 19-74-01, 
> patch 0a704103
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,HWPSTATE,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,L1DF,IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
> 8-way L2 cache, 16MB 64b/line 16-way L3 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.00 MHz, 19-74-01, 
> patch 0a704103
> cpu2: 
> 

Re: 7.5 /var/log/messages - vfprintf %s NULL in "%.*s"

2024-04-10 Thread Eivind Eide
> Given 'if I do "env -i TERM=tmux-256color mutt" mutt opens WITHOUT
> triggering the message', that implies that one of the other variables
> set would be triggering it, can you either figure out which one or
> show the list so someone else can try to replicate it please?

Yes, I would really like to do so. However, something really weird happened.
The described behaviour was consistent and persistent after upgrade to
7.5, also across reboot.
Due to Jeremy Mates mail, I tested copying termcap files to my home
directory, and the behaviour stopped.
Now I wanted to start testing environmental variables so I completely
removed the ~/.terminfo/ directory, expecting the previous behavior to
return. However, I cannot reproduce! I even tried rebooting, but no. I
have no rational explanation for this.


-- 



Eivind Eide

"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronautsmi



[dmesg] Framework Laptop 16 (AMD Ryzen 7040 Series)

2024-04-10 Thread Johannes Thyssen Tishman
(See dmesg and sysctl hw.sensors below)

Working:
Audio
Keyboard backlight
Hibernation
Camera
Microphone
USB-A Expansion Card
USB-C Expansion Card
HDMI Expansion Card[0]

Not working:
Suspend/Resume[1]
Touchpad[2]
Bluetooth
WiFi[3]
Fingerprint sensor[4]
Audio Jack Expansion Card
DisplayPort Expansion Card

What's not working above seems to be OpenBSD specific as it was also
tested on Linux (Ubuntu 22.04 Live) and it is working (with the
exception of the DisplayPort Expansion Card that also didn't work in
Linux). The expansion cards were connected based on the slot description
from Frameworks documentation[5].

[0] It seems to only work when booting with the HDMI cable already
connected

[1] /var/log/messages: /bsd: acpi0 state S3 unavailable

[2] For some reason it only works when using 5 fingers (no more, no
less), so maybe this is a configuration issue? Any clues on how to solve
this?

[3] There was a recent commit[6] by claudio@ adding a new mwx(4) driver
that should support this WiFi card (MT7922) in the future. claudio@: If
it helps, I'd be happy to test patches or even mail you the WiFi card.

[4] Sensor seems to be detected (see dmesg below, 'Goodix'?) but runing
enroll_fingerprint from the login_fingerprint package returns 'No
devices detected.'

[5] 
https://knowledgebase.frame.work/en_us/expansion-card-slot-functionality-on-framework-laptop-16-rkUjGm7cn
[6] https://marc.info/?l=openbsd-cvs=170851239831123=2


OpenBSD 7.5-current (GENERIC.MP) #20: Tue Apr  9 19:33:09 MDT 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 33474949120 (31924MB)
avail mem = 32438943744 (30936MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.5 @ 0x51675000 (40 entries)
bios0: vendor INSYDE Corp. version "03.02" date 01/23/2024
bios0: Framework Laptop 16 (AMD Ryzen 7040 Series)
efi0 at bios0: UEFI 2.8
efi0: INSYDE Corp. rev 0x302
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP UEFI SSDT SSDT SSDT ASF! BOOT HPET APIC MCFG SLIC VFCT 
SSDT SSDT CRAT CDIT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT FPDT WSMT TPM2 SSDT MHSP SSDT IVRS SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT SSDT SSDT SSDT BGRT
acpi0: wakeup devices GPP0(S4) SWUS(S4) SWDS(S4) GPP1(S4) GPP2(S4) GPP5(S4) 
GPP6(S4) GPP7(S4) GP11(S4) SWUS(S4) GP12(S4) SWUS(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.01 MHz, 19-74-01, patch 
0a704103
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,HWPSTATE,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,L1DF,IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
8-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 24MHz
cpu0: mwait min=64, max=64, C-substates=1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.00 MHz, 19-74-01, patch 
0a704103
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,HWPSTATE,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,AVX512CD,SHA,AVX512BW,AVX512VL,AVX512VBMI,UMIP,PKU,L1DF,IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 
8-way L2 cache, 16MB 64b/line 16-way L3 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Ryzen 7 7840HS w/ Radeon 780M Graphics, 3800.00 MHz, 19-74-01, patch 
0a704103
cpu2: 

Re: Upgrade 7.5 /usr full

2024-04-10 Thread Ben Jahmine

Thanks for your answers. I will prepare the reinstall based on your
suggestions.

Cheers

Ben



Re: newfs fast, but newfs_msdos and newfs_ext2fs very slow

2024-04-10 Thread Dan


As last resort, if you are one that lives with usb sticks
indipendent hardware duplicators like those from startech.com
have a quick format option (almost my old version of it has)
further than other useful functionalities.

-Dan

Apr 10, 2024 10:34:38 Stuart Henderson :

>> How can I speed the creation of a FAT32 or Ext2 file system up?
> 
> Maybe increasing block size will help. If not, I don't think there's
> really much you can do. There's no "quick format" option for newfs_msdos
> lile there is on Windows.



IPv6 with umb(4)

2024-04-10 Thread Julian Huhn

Moin!

I tried unsuccessfully to obtain an IPv6 address with an umb(4) interface. As 
umb(4) supports IPv6 since 6.7, I seem to be doing something wrong. Can anyone 
give me a hint what I need to do?


For testing purposes, I have already deactivated pf and tried to use dhcpcd. But 
I still had no success.


I have attached my umb0 config and an excerpt from dmesg. If more information is 
needed for assistance, I will provide it later.


--Huhn

x270$ cat /etc/hostname.umb0   
apn internet

pin 
roaming
up

x270$ ifconfig umb0
umb0: flags=8851 mtu 1500
index 5 priority 6 llprio 3
roaming enabled registration home network
state up cell-class LTE rssi -89dBm speed 47.7Mbps up 286Mbps down
SIM initialized PIN valid (3 attempts left)
subscriber-id  ICC-id 
device EM7455 IMEI  firmware SWI9X30C_02.24.03.00
phone# +49xxx APN internet provider Telekom.de provider-id 26201
dns 10.74.210.210 10.74.210.211
groups: egress
status: active
inet 10.72.239.216 --> 10.72.239.217 netmask 0xfff0

x270$ dmesg
OpenBSD 7.5-current (GENERIC.MP) #19: Mon Apr  8 08:39:06 MDT 2024
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
[...]
umb0 at uhub0 port 3 configuration 1 interface 12 "Sierra Wireless, Incorporated 
Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A" rev 2.00/0.06 addr 2
ugen0 at uhub0 port 3 configuration 1 "Sierra Wireless, Incorporated Sierra Wireless 
EM7455 Qualcomm Snapdragon X7 LTE-A" rev 2.00/0.06 addr 2
[...]



MANGOPI - anyone else have reboot problems?

2024-04-10 Thread Peter J. Philipp
Hi,

I have found that my Mango Pi is very jittery, also when I reboot it there
is probably garble on the UART link causing it to fall into u-boot prompt.

I have tried:

env set bootdelay 0
env set bootdelay -1

saveenv

and reset

but it doesn't seem to work.  Any garble will still cause a break to u-boot
console.  There is a firmware image on the flash and in DTB under config
but how do I access that from OpenBSD?  Is there any drivers I can look at
for making this work?  I believe it goes on the "binman" device that is not
configured.

deneb# dmesg|grep binman
"binman" at mainbus0 not configured

Granted that there isn't an easy answer, I'll look at this perhaps in autumn.

Here is my dmesg:

OpenBSD 7.5-current (GENERIC) #5: Mon Apr  8 08:27:57 MDT 2024
dera...@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/GENERIC
real mem  = 1073741824 (1024MB)
avail mem = 1008369664 (961MB)
SBI: OpenSBI v1.3, SBI Specification Version 1.0
random: good seed from bootblocks
mainbus0 at root: MangoPi MQ Pro
cpu0 at mainbus0: T-Head arch 0 imp 0 rv64imafdc
intc0 at cpu0
cpu0: 32KB 64b/line 128-way L1 I-cache, 32KB 64b/line 256-way L1 D-cache
"fit-images" at mainbus0 not configured
"dcxo-clk" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
sxipio0 at simplebus0: 88 pins
sxiccmu0 at simplebus0
plic0 at simplebus0
sxitimer0 at simplebus0: 24000 kHz
sxidog0 at simplebus0
com0 at simplebus0: dw16550
com0: console
com1 at simplebus0: dw16550
"syscon" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
"efuse" at simplebus0 not configured
"crypto" at simplebus0 not configured
"dram-controller" at simplebus0 not configured
sximmc0 at simplebus0
sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
sximmc1 at simplebus0
sdmmc1 at sximmc1: 4-bit, sd high-speed, mmc high-speed, dma
"usb" at simplebus0 not configured
"phy" at simplebus0 not configured
ehci0 at simplebus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at simplebus0: version 1.0
"clock-controller" at simplebus0 not configured
"mixer" at simplebus0 not configured
"mixer" at simplebus0 not configured
"phy" at simplebus0 not configured
"tcon-top" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"power-controller" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
sxirtc0 at simplebus0
sxidog1 at simplebus0
sxidog2 at simplebus0
gpio0 at sxipio0: 32 pins
gpio1 at sxipio0: 32 pins
gpio2 at sxipio0: 32 pins
gpio3 at sxipio0: 32 pins
gpio4 at sxipio0: 32 pins
gpio5 at sxipio0: 32 pins
gpio6 at sxipio0: 32 pins
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
"opp-table-cpu" at mainbus0 not configured
"pmu" at mainbus0 not configured
"vcc" at mainbus0 not configured
"vcc-3v3" at mainbus0 not configured
"leds" at mainbus0 not configured
"avdd2v8" at mainbus0 not configured
"dvdd" at mainbus0 not configured
"vdd-cpu" at mainbus0 not configured
"wifi-pwrseq" at mainbus0 not configured
"binman" at mainbus0 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0:  removable
sd0: 121942MB, 512 bytes/sector, 249737216 sectors
manufacturer 0x024c, product 0xd723 at sdmmc1 function 1 not configured
uhub2 at uhub0 port 1 configuration 1 interface 0 "vendor 0x1a40 USB 2.0 Hub" 
rev 2.00/1.11 addr 2
ure0 at uhub2 port 4 configuration 1 interface 0 "Realtek USB 10/100 LAN" rev 
2.10/20.00 addr 3
ure0: RTL8152 (0x4c10), address 00:e0:4c:36:00:e9
rlphy0 at ure0 phy 0: RTL8201E 10/100 PHY, rev. 2
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (ff09abc802626de6.a) swap on sd0b dump on sd0b
sxiccmu_d1_set_frequency: 0x0084
cpu0: clock not implemented

Best Regards,
-pjp

-- 
my associated domains:  callpeter.tel|centroid.eu|dtschland.eu|mainrechner.de



Re: newfs fast, but newfs_msdos and newfs_ext2fs very slow

2024-04-10 Thread Otto Moerbeek
On Wed, Apr 10, 2024 at 08:31:26AM -, Stuart Henderson wrote:

> On 2024-04-09, Stanislav Syekirin 
>  wrote:
> > Hi,
> >
> > I'm trying to figure out the best way to format a USB stick as FAT32. 
> > This is what I've tried:
> >
> > $ time doas newfs_msdos /dev/rsd1c
> > /dev/rsd1c: 60007944 sectors in 7500993 FAT32 clusters (4096 
> > bytes/cluster)
> > bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=63 hds=255 hid=0 bsec=60125184 
> > bspf=58602 rdcl=2 infs=1 bkbs=2
> > 20m08.34s real  0m00.35s user   0m12.81s system
> >
> > As you can see, it takes many minutes, and the elapsed time is much 
> > larger than the CPU time. Looking at top while the command runs shows 
> > that newfs_msdos has PRI -5, its CPU usage fluctuates around 0.5%, 
> > STATE is mostly "sleep" with WAIT being "physio".
> >
> > The same happens if I call newfs_ext2fs -I.
> >
> > For comparison, `newfs /dev/rsd1c` is almost instantaneous: 0m00.88s 
> > real 0m00.06s user 0m00.16s system. It doesn't work if the disk is 
> 
> IIUC newfs_msdos has to wrote a lot more than FFS2 newfs.
> And writes to USB drives are not particularly quick on OpenBSD.
> 
> > already formatted as FAT32, though: I have to call `fdisk -e sd1`, and 
> > reinit, otherwise I get a "can't rewrite disk label" error; I'm not 
> > sure why newfs cares and newfs_msdos doesn't, maybe I'm doing it wrong 
> > somehow.
> 
> sd1c shouldn't be used for filesystems. It is a special device node for
> "the entire disk". See disklabel(8). For a single filesystem on a drive,
> use either a BSD disklabel with an 'a' partition, or a DOS/GPT partition
> (whuch you can setup with fdisk) and the 'spoofed' partition letter
> (/dev/sd1i for the first one).
> 
> > How can I speed the creation of a FAT32 or Ext2 file system up?
> 
> Maybe increasing block size will help. If not, I don't think there's
> really much you can do. There's no "quick format" option for newfs_msdos
> lile there is on Windows.
> 
> 
> -- 
> Please keep replies on the mailing list.
> 

On a side note: when using newfs with ffs1 it does a full write of all
the (empty) inode tables and is also much slower than ffs2. In the
ffs2 case (default since quite a while) a lazy approach is used; only
the superblocks and a small set of inodes is initialized, the rest is
done while the fs is being used and there is need for more inodes.

-Otto



Re: newfs fast, but newfs_msdos and newfs_ext2fs very slow

2024-04-10 Thread Stuart Henderson
On 2024-04-09, Stanislav Syekirin  
wrote:
> Hi,
>
> I'm trying to figure out the best way to format a USB stick as FAT32. 
> This is what I've tried:
>
> $ time doas newfs_msdos /dev/rsd1c
> /dev/rsd1c: 60007944 sectors in 7500993 FAT32 clusters (4096 
> bytes/cluster)
> bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=63 hds=255 hid=0 bsec=60125184 
> bspf=58602 rdcl=2 infs=1 bkbs=2
>   20m08.34s real  0m00.35s user   0m12.81s system
>
> As you can see, it takes many minutes, and the elapsed time is much 
> larger than the CPU time. Looking at top while the command runs shows 
> that newfs_msdos has PRI -5, its CPU usage fluctuates around 0.5%, 
> STATE is mostly "sleep" with WAIT being "physio".
>
> The same happens if I call newfs_ext2fs -I.
>
> For comparison, `newfs /dev/rsd1c` is almost instantaneous: 0m00.88s 
> real 0m00.06s user 0m00.16s system. It doesn't work if the disk is 

IIUC newfs_msdos has to wrote a lot more than FFS2 newfs.
And writes to USB drives are not particularly quick on OpenBSD.

> already formatted as FAT32, though: I have to call `fdisk -e sd1`, and 
> reinit, otherwise I get a "can't rewrite disk label" error; I'm not 
> sure why newfs cares and newfs_msdos doesn't, maybe I'm doing it wrong 
> somehow.

sd1c shouldn't be used for filesystems. It is a special device node for
"the entire disk". See disklabel(8). For a single filesystem on a drive,
use either a BSD disklabel with an 'a' partition, or a DOS/GPT partition
(whuch you can setup with fdisk) and the 'spoofed' partition letter
(/dev/sd1i for the first one).

> How can I speed the creation of a FAT32 or Ext2 file system up?

Maybe increasing block size will help. If not, I don't think there's
really much you can do. There's no "quick format" option for newfs_msdos
lile there is on Windows.


-- 
Please keep replies on the mailing list.



Re: ncurses in 7.5

2024-04-10 Thread Stuart Henderson
On 2024-04-09, f...@disciples.com  wrote:
> Hello,
>  
> https://www.openbsd.org/plus75.html says:
>
> Updated ncurses and associated libraries (form, panel, menu) to 6.4-20230826.
>  
> but https://www.openbsd.org/75.html says: 
>
> Ncurses 5.7 
>  
> Is this an oversight or am I overlooking something?

Just an oversight. Thanks, updated.



Re: 7.5 /var/log/messages - vfprintf %s NULL in "%.*s"

2024-04-10 Thread Stuart Henderson
On 2024-04-09, Why 42? The lists account.  wrote:
>
> On Sat, Apr 06, 2024 at 02:42:25PM +0200, Eivind Eide wrote:
>> After upgrading to 7.5 amd64 -stable  (and all ports updated) I get
>> these messages in /var/log/messages. This is with bash from ports
>> inside tmux over SSH:
>> 
>> tmux: vfprintf %s NULL in "%.*s"
>> bash: vfprintf %s NULL in "%.*s"
>> multitail: vfprintf %s NULL in "%.*s"
>> vim: vfprintf %s NULL in "%.*s"
>
> FYI, I grepped my messages and saw something similar:
> mjoelnir:~ 9.04 14:10:46 % grep printf /var/log/messages
> Apr  4 18:22:26 mjoelnir tumblerd: vfprintf %s NULL in "Unable to find part 
> with type='%s' for '%s'"
> Apr  8 13:57:02 mjoelnir wrapper-2.0: vfprintf %s NULL in "day=%s, sun={%s, 
> %s, %s, %s}, moon={%s, %s, %s, %s, %s} "

Those aren't much of a surprise - and the strings are unique enough
they should be easy to track down.

It's the one from tmux or more likely libcurses that's a surprise
(and imho more worth looking into).



Re: Wireless network with bfwm sometimes works and sometimes doesn't

2024-04-10 Thread Stefan Sperling
On Wed, Apr 10, 2024 at 12:53:12AM +0200, Stanislav Syekirin wrote:
>  Stefan Sperling  wrote:
> > Do you have any of iwn/iwm/iwx or another device which could capture
> > raw 802.11 frames of failed association attempts in monitor mode?
> 
> I have a neglected device with Intel Wireless 3160, which is listed on the
> iwm man page. Assuming OpenBSD will run on that device, what do I have to
> do?

ifconfig iwm0 mediaopt monitor
ifconfig iwm0 chan 112   # assuming the AP has not moved channels
ifconfig iwm0 up

tcpdump -n -i iwm0 -y IEEE802_11_RADIO -s 4096 -w /tmp/iwm0.pcap

Now attempt the failing association, then cancel tcpdump with Ctrl-C
and send me the /tmp/iwm0.pcap file offlist.