pf: source tracking limits don't do what the man page says

2023-04-16 Thread Kajetan Staszkiewicz
Hello group, I'm hunting some bugs in FreeBSD's pf and I thought to ask here to better undernstad how the global source tracking is supposed to work in the reference implementation of pf. Or maybe it does not work, maybe this ia s bug report. I have the following ruleset on OpenBSD 7.3. The

mg: enable no-tab-mode

2023-04-16 Thread Omar Polo
The `no-tab-mode' minor mode is currently hidden behind some #ifdef, and I'd like to enable it since it's really useful. It's the equivalent of vi' `expandtab', i.e. makes the TAB key inserting spaces up to the next tab stop. My plan would be to follow-up with a diff to make the tab width customi

vmd(8): fix restoring virtio devs on vm receive

2023-04-16 Thread Dave Voutila
Moving vmd to use zero-copy semantics for virtqueues introduced a bug in the vm send/receive functionality. The host va is potentially invalid on restore if vmd has restarted and re-randomized the address space of the vmm process that forks vm's. This NULL's out the hva to and resets it on restore

installer: indent interface and disk listings

2023-04-16 Thread Klemens Nanni
'?' output could better distuingish from questions and other lines, like sets selection does with four leading spaces. --- Terminal type? [vt220] Available disks are: sd0. Which disk is the root disk? ('?' for details) [sd0] ? -sd0: VirtIO, Block Device (5.0G) -sd1: VirtIO, Block Device (5.0

Call sysctl_ifnames() with shared netlock

2023-04-16 Thread Vitaliy Makkoveev
It performs read-only access to netlock protected data. Index: sys/net/rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.359 diff -u -p -r1.359 rtsock.c --- sys/net/rtsock.c22 Jan 2023 12:05:44 - 1.

Call sysctl_iflist() with shared netlock

2023-04-16 Thread Vitaliy Makkoveev
As sysctl_ifnames(), it performs read-only access to netlock protected data. Index: sys/net/rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.359 diff -u -p -r1.359 rtsock.c --- sys/net/rtsock.c22 Jan 2023 1

Call sysctl_dumpentry() with shared netlock

2023-04-16 Thread Vitaliy Makkoveev
Also performs read-only access to netlock protected data. Index: sys/net/rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.359 diff -u -p -r1.359 rtsock.c --- sys/net/rtsock.c22 Jan 2023 12:05:44 -

Call sysctl_source() with shared netlock

2023-04-16 Thread Vitaliy Makkoveev
It seems rt_setsource() needs some attention, but sysctl_source() could be called with shared netlock just now. Index: sys/net/rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.359 diff -u -p -r1.359 rtsock.c --

Remove kernel lock from ifa_ifwithaddr()

2023-04-16 Thread Vitaliy Makkoveev
We use netlock to protect `if_list' and `ifa_list' lists, and the `ifa' dereference, so kernel lock within ifa_ifwithaddr() is wrong. We have no problems, because we call ifadel()/ifafree() with kernel lock held, but we should not rely on this. So use netlock assertion within ifa_ifwithaddr() inst

Re: installer: indent interface and disk listings

2023-04-16 Thread Theo de Raadt
Yes, that is nice Klemens Nanni wrote: > '?' output could better distuingish from questions and other lines, > like sets selection does with four leading spaces. > > --- > Terminal type? [vt220] > Available disks are: sd0. > Which disk is the root disk? ('?' for details) [sd0] ? > -sd0: Vir

dwmshc(4): emmc on rk3568

2023-04-16 Thread David Gwynne
the emmc controller on rk3568 (so also rk3566) and rk3588 is largely a sdhc(4) controller, but with a bunch of extra registers up top that get involved in handling high speed modes. i could have added this to sdhc_fdt.c, but the names and number of registers involved were going to be cumbersome, a

malloc leak detection available in -current

2023-04-16 Thread Otto Moerbeek
Hi, OpenBSD current now has built-in malloc leak detection. Make sure you run current and have debug symbols (OpenBSD base libraries have debug symbols, compile your own program with -g). To record the leak report: $ MALLOC_OPTIONS=D ktrace -tu a.out To view the leak report: $ kdump -u malloc