ldomctl: Move code into hv_config(), defer to commands needing it

2019-12-30 Thread Klemens Nanni
This moves setup code from main() into its own function so instead of upfront it can be used only when and where needed. With the exception of `create-vdisk' all currently open /dev/hvctl; for that command I added a rather quirky goto to avoid this unneeded step, but `list-io' for example does

Re: Remaining infinite sleeps in sys/dev

2019-12-30 Thread Jonathan Gray
On Mon, Dec 30, 2019 at 05:06:53PM +0100, Martin Pieuchot wrote: > Convert the remaining infinite sleeps that my grep-foo found to > {t,m}sleep_nsec(9), ok? more in dev spanning multiple lines diff --git sys/dev/ic/qla.c sys/dev/ic/qla.c index 9ab8a2f4603..d9e14705c2a 100644 --- sys/dev/ic/qla.c

Re: sparc64: find root device on hardware RAID

2019-12-30 Thread Jonathan Matthew
On Mon, Dec 30, 2019 at 03:36:54PM +0100, Klemens Nanni wrote: > On Mon, Dec 30, 2019 at 06:59:35PM +1000, Jonathan Matthew wrote: > > Here's the Solaris explanation: > > > > https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h#L195 >

ldomctl: parse.y: bail earlier on duplicate domains

2019-12-30 Thread Klemens Nanni
No functional change, just a tiny hoisting in the parser I'd like to better reflect the order in which we parse the tokens. If the given domain was already specified, don't bother allocating and initializing it. Drop the obvious comment while here. OK? Index: parse.y

Re: ldom.conf.5: Mention default boot disk

2019-12-30 Thread Klemens Nanni
On Mon, Dec 30, 2019 at 10:57:39AM +, Andrew Grillet wrote: > Whether the config is screwed, there is a typo in a config or a cable has > fallen off somewhere, > it would be very nice to be able to kill the netboot and start again, > regardless of this particular reason. At least on the

Re: snmpd(8): filter pf table addresses

2019-12-30 Thread Klemens Nanni
On Mon, Dec 30, 2019 at 10:08:49PM +0100, Florian Obser wrote: > > My MXs store about 300k addresses in block lists. Trying to export > This adds filter-pf-addresses similar to filter-routers to stop snmpd > from exporting under OPENBSD-PF-MIB::pfTblAddrTable. No snmp* user, just curious: Does

ldomctl: Do not start/stop/panic primary domain

2019-12-30 Thread Klemens Nanni
`ldomctl start|stop primary" silently exits zero not doing anything, `ldomctl panic primary" makes primary panic (and pulls guests down with it). The manual explicitly documents those commands for "guest" domains, code comments say so as well, so lets behave accordingly and prevent stupid admins

snmpd(8): filter pf table addresses

2019-12-30 Thread Florian Obser
My MXs store about 300k addresses in block lists. Trying to export them via the OPENBSD-PF-MIB::pfTblAddrTable oid is not working out. It's also not sensible. snmpbulkwalk will eventually just time out and while snmpd tries to export the tables it spins at 100% cpu. This adds

ldomctl: download: select new configuration

2019-12-30 Thread Klemens Nanni
The example in the manual implies that the download command also selects it: # ldomctl init-system ldom.conf # cd .. # ldomctl delete openbsd # ldomctl download openbsd # ldomctl list factory-default [current] openbsd [next] But `ldomctl

patch: Enable dock audio on Thinkpad dock (Thinkpad L460)

2019-12-30 Thread Abel Abraham Camarillo Ojeda
The following enables audio via the dock station port in my thinkpad L460. But, anyone knows if its possible to automatically disable the laptop speaker when I plug in the audio port in the dock? it doesn't appear to have a *_sense, ideas? this also enables the annoying beep (echo -e "\a"; in

bgpd, fairer imsg processing

2019-12-30 Thread Claudio Jeker
The imsg processing in the RDE is sometimes a bit unfair. The problem is that peers sending many UPDATES starve out the others especially on intial table dumps. This comes from the fact that imsg are processed to completion and so the system sending more just gets more CPU. This diff changes this

Re: Remaining infinite sleeps in sys/dev

2019-12-30 Thread Klemens Nanni
On Mon, Dec 30, 2019 at 05:06:53PM +0100, Martin Pieuchot wrote: > Convert the remaining infinite sleeps that my grep-foo found to > {t,m}sleep_nsec(9), ok? OK kn > @@ -1804,7 +1804,8 @@ ami_mgmt(struct ami_softc *sc, u_int8_t > ami_start(sc, ccb); >

Re: sort: do not perform top level comparison if -k supplied with -c

2019-12-30 Thread Todd C . Miller
On Sat, 28 Dec 2019 18:26:38 +0100, Richard Ipsum wrote: > I think there may be a bug in OpenBSD's sort utility. > The bug is that when -c is used in combination with a key field, > a "top level" sort is performed when the key field does not have > disorder. This differs from what might be

Remaining infinite sleeps in sys/dev

2019-12-30 Thread Martin Pieuchot
Convert the remaining infinite sleeps that my grep-foo found to {t,m}sleep_nsec(9), ok? Index: dev/hotplug.c === RCS file: /cvs/src/sys/dev/hotplug.c,v retrieving revision 1.16 diff -u -p -r1.16 hotplug.c --- dev/hotplug.c 7

Re: ftp(1): separate file:/ URL handling

2019-12-30 Thread Hiltjo Posthuma
On Thu, Dec 26, 2019 at 10:53:45AM +0100, Jeremie Courreges-Anglas wrote: > On Thu, Dec 19 2019, Jeremie Courreges-Anglas wrote: > > A bit late... > > > > Move file: URL handling into its own function. This simplifies > > url_get() and would have prevented problems with bogus redirections. > > >

Re: Remaining infinite sleeps in sys/kern

2019-12-30 Thread Alexander Bluhm
On Mon, Dec 30, 2019 at 12:14:12PM +0100, Martin Pieuchot wrote: > I forgot those previously, convert them to tsleep_nsec(9), ok? OK bluhm@ > Index: kern/init_main.c > === > RCS file: /cvs/src/sys/kern/init_main.c,v > retrieving

Re: sparc64: find root device on hardware RAID

2019-12-30 Thread Klemens Nanni
On Mon, Dec 30, 2019 at 06:59:35PM +1000, Jonathan Matthew wrote: > Here's the Solaris explanation: > > https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h#L195 Thanks for digging. > I think we should copy what they're doing here, that

Re: drm acpi diff - Radeon7520 ?

2019-12-30 Thread pebwindkraft
> Date: Fri, 16 Aug 2019 22:21:33 +0200 (CEST) > From: Mark Kettenis > > cpu0: AMD A4-4355M APU with Radeon(tm) HD Graphics, 1897.56 MHz, 15-10-01 > > ... I'd like to see some more tests, especially on laptops with > amdgpu(4). Diff has some debug printing enabled. Feel free to > share the

Remaining infinite sleeps in sys/kern

2019-12-30 Thread Martin Pieuchot
I forgot those previously, convert them to tsleep_nsec(9), ok? Index: kern/init_main.c === RCS file: /cvs/src/sys/kern/init_main.c,v retrieving revision 1.293 diff -u -p -r1.293 init_main.c --- kern/init_main.c29 Nov 2019

Re: ldom.conf.5: Mention default boot disk

2019-12-30 Thread Andrew Grillet
The fact that netbooting cannot be interrupted has caused me to waste a lot of time over the years. Whether the config is screwed, there is a typo in a config or a cable has fallen off somewhere, it would be very nice to be able to kill the netboot and start again, regardless of this particular

Re: remove special ::1 ours check

2019-12-30 Thread Alexandr Nedvedicky
Hello, On Tue, Dec 24, 2019 at 03:27:44PM +0100, Alexander Bluhm wrote: > Hi, > > The loopback check in ip6_input_if() seems needless. The ::1 > destination address is in the routing table and will be identified > as any other local address. Better use the generic IP input path. > I see no

uhidev(4) use-after-free

2019-12-30 Thread Martin Pieuchot
Close pipes before freeing transfer descriptors on close(2), otherwise a use-after-free is possible in usbd_abort_pipe(9). Ok? Index: uhidev.c === RCS file: /cvs/src/sys/dev/usb/uhidev.c,v retrieving revision 1.77 diff -u -p -r1.77

Re: sparc64: find root device on hardware RAID

2019-12-30 Thread Jonathan Matthew
On Sun, Dec 29, 2019 at 05:58:02AM +0100, Klemens Nanni wrote: > On Sun, Dec 29, 2019 at 01:59:38PM +1000, Jonathan Matthew wrote: > > I think we have the wrong size for the volume name, hence the difference > > between the size reported by the controller and the size of vpg. > Indeed, good catch!