Re: fix check of return value

2020-09-03 Thread Tracey Emery
On Thu, Sep 03, 2020 at 02:52:49PM +0200, Robert Klein wrote: > Hi, > > on lib/libc/uuid/uuid_to_string.c the return value for asprintf is > checked for -1 while the manpage only says "For all these functions if > an output or encoding error occurs, a value less than 0 is returned." > > The

Re: fix check of return value

2020-09-03 Thread Tracey Emery
On Thu, Sep 03, 2020 at 08:09:08AM -0600, Tracey Emery wrote: > On Thu, Sep 03, 2020 at 02:52:49PM +0200, Robert Klein wrote: > > Hi, > > > > on lib/libc/uuid/uuid_to_string.c the return value for asprintf is > > checked for -1 while the manpage only says "For all these functions if > > an output

fix check of return value

2020-09-03 Thread Robert Klein
Hi, on lib/libc/uuid/uuid_to_string.c the return value for asprintf is checked for -1 while the manpage only says "For all these functions if an output or encoding error occurs, a value less than 0 is returned." The patch below adjusts to code to the man page (checking for less than zero). Best

Re: ldapd(8): fix, simplify UUID timestamp code

2020-09-03 Thread Robert Klein
Hi, On Fri, 21 Aug 2020 22:34:35 +1000 Jonathan Matthew wrote: > On Wed, Aug 19, 2020 at 09:28:41PM -0500, Scott Cheloha wrote: > > Hi, > > > > I was auditing the tree for odd-looking time structure usage and I > > came across the UUID code in ldapd(8), uuid.c. > > > > time_cmp() is

Re: undwind(8): request for data

2020-09-03 Thread Klemens Nanni
On Thu, Sep 03, 2020 at 06:13:41PM +0200, Florian Obser wrote: > Then reload the ruleset and restart unwind: > > # pfctl -f /etc/pf.conf > # rcctl restart unwind > > You can now get stats on how often your machine talks to the root name > servers: > > # pfctl -s label > rootdns_tcp 2730 0 0 0

Add more errnos to ober_read_elements

2020-09-03 Thread Martijn van Duren
Just reminded myself of this one. The manpage says nothing about ober_read_elements setting errno upon failure, yet it does in most cases. Furthermore, applications like snmpd use errno in ober_read_elements to determine if a read is incomplete (checking for ECANCELED), without initializing errno

undwind(8): request for data

2020-09-03 Thread Florian Obser
If you are running unwind(8) on your laptop / workstation or unbound(8) for a small home network I'd be interested to know how often they talk to the root zone during a typical day. Could you please add the following table and match rules to /etc/pf.conf: table const { \ 198.41.0.4,

Re: [PATCH] Add common PCIE capability list

2020-09-03 Thread Mark Kettenis
> Date: Wed, 2 Sep 2020 15:19:55 +1000 > From: Jonathan Gray > > On Tue, Sep 01, 2020 at 11:44:03PM -0500, Jordan Hargrave wrote: > > This patch adds a common function for scanning PCIE Express Capability list > > The PCIE Capability list starts at 0x100 in extended PCI configuration > > space.

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-03 Thread Mark Kettenis
> Date: Tue, 1 Sep 2020 17:20:19 -0500 > From: Jordan Hargrave > > [PATCH] Add IOMMU support for Intel VT-d and AMD Vi > > This hooks each pci device and overrides bus_dmamap_xxx to issue > remap of DMA requests to virtual DMA space. It protects devices > from issuing I/O requests to memory in

Document errno for ober_read_elements

2020-09-03 Thread Martijn van Duren
So here's my attempt at documenting errno for ober_read_elements. martijn@ Index: ober_read_elements.3 === RCS file: /cvs/src/lib/libutil/ober_read_elements.3,v retrieving revision 1.1 diff -u -p -r1.1 ober_read_elements.3 ---

Re: Document errno for ober_read_elements

2020-09-03 Thread Theo Buehler
On Thu, Sep 03, 2020 at 08:50:39PM +0200, Martijn van Duren wrote: > So here's my attempt at documenting errno for ober_read_elements. > Two small things below, otherwise this looks correct to me. > martijn@ > > Index: ober_read_elements.3 >

Re: Add more errnos to ober_read_elements

2020-09-03 Thread Theo de Raadt
Yep. Martijn van Duren wrote: > Just reminded myself of this one. > The manpage says nothing about ober_read_elements setting errno upon > failure, yet it does in most cases. Furthermore, applications like > snmpd use errno in ober_read_elements to determine if a read is > incomplete (checking

Re: Add more errnos to ober_read_elements

2020-09-03 Thread Theo Buehler
On Thu, Sep 03, 2020 at 08:47:58PM +0200, Martijn van Duren wrote: > Apparently I missed one... I double checked more carefully this time, and I think you got them all now. ok tb

Re: Add more errnos to ober_read_elements

2020-09-03 Thread Martijn van Duren
Apparently I missed one... On Thu, 2020-09-03 at 18:00 +0200, Martijn van Duren wrote: > Just reminded myself of this one. > The manpage says nothing about ober_read_elements setting errno upon > failure, yet it does in most cases. Furthermore, applications like > snmpd use errno in

Re: Document errno for ober_read_elements

2020-09-03 Thread Jason McIntyre
On Thu, Sep 03, 2020 at 09:25:11PM +0200, Theo Buehler wrote: > On Thu, Sep 03, 2020 at 08:50:39PM +0200, Martijn van Duren wrote: > > So here's my attempt at documenting errno for ober_read_elements. > > > > Two small things below, otherwise this looks correct to me. > > > martijn@ > > > >

Re: [PATCH] Add IOMMU support for Intel VT-d and AMD-Vi

2020-09-03 Thread Jordan Hargrave
On Thu, Sep 03, 2020 at 09:06:59PM +0200, Mark Kettenis wrote: > > Date: Tue, 1 Sep 2020 17:20:19 -0500 > > From: Jordan Hargrave > > > > [PATCH] Add IOMMU support for Intel VT-d and AMD Vi > > > > This hooks each pci device and overrides bus_dmamap_xxx to issue > > remap of DMA requests to

Re: m_defrag(9) leak

2020-09-03 Thread Stefan Sperling
On Thu, Sep 03, 2020 at 07:15:23AM +0200, Claudio Jeker wrote: > On Thu, Sep 03, 2020 at 06:34:38AM +0200, Bjorn Ketelaars wrote: > > The diff below should fix this. At least I'm able to build a kernel > > (amd64 only), which doesn't explode when actually using it. > > This is probably not

snmp df, use smi_print_element

2020-09-03 Thread Martijn van Duren
At the moment it's not wise to run "snmp df" against untrusted instances, since it outputs the hrStorageDescr without checking the bytes being printed. Make use of the new DISPLAY-HINT functionality of smi.c to make sure the string is actually DisplayHint compliant. While here add the extra

Re: snmp df, use smi_print_element

2020-09-03 Thread Martijn van Duren
On Thu, 2020-09-03 at 09:49 +0200, Martijn van Duren wrote: > At the moment it's not wise to run "snmp df" against untrusted > instances, since it outputs the hrStorageDescr without checking the > bytes being printed. > > Make use of the new DISPLAY-HINT functionality of smi.c to make sure > the