Re: Adding current bandwidth to ftp(1)

2018-04-09 Thread Matthias Schmidt
Hi Christian, On 08.04.2018 22:42, Christian Barthel wrote: Hello, i am often sitting behind a very slow internet link and thought, it might be useful to show the current bandwidth while downloading something with ftp(1). Since I sometimes work with crappy WLANs/connections I very much appre

Re: ldomctl.8: Do not discourage IPv6 usage

2018-04-09 Thread Stefan Sperling
On Mon, Apr 09, 2018 at 01:04:00AM +0200, Jeremie Courreges-Anglas wrote: > On Mon, Apr 09 2018, Klemens Nanni wrote: > > I was wondering for a second whether vnet(4) had IPv6 related bugs or so. > > Probably Mark's preferences, from when link-local IPv6 addresses were > created by default. > >

httpd: listen on all IPv4 and IPv6 addresses for "listen on *"

2018-04-09 Thread Florian Obser
This shuffles things around to make httpd listen on v4 and v6 for *. OK? diff --git httpd.conf.5 httpd.conf.5 index afda0ac132b..3194a3400c2 100644 --- httpd.conf.5 +++ httpd.conf.5 @@ -52,12 +52,12 @@ addresses of the specified network interface. If .Sq * is given as an address, -it will be

Re: fstat -r flag to display rdomains on sockets

2018-04-09 Thread Henning Brauer
* Stuart Henderson [2018-04-07 12:51]: > How about skipping the -r flag, but printing it after the existing > "internet [...] addr:port", and only printing if it's a non-default > table? This should minimise breakage, and it's not like the format > is cast in stone (spliced sockets were added in t

Re: httpd: listen on all IPv4 and IPv6 addresses for "listen on *"

2018-04-09 Thread Klemens Nanni
On Mon, Apr 09, 2018 at 10:58:43AM +0200, Florian Obser wrote: > This shuffles things around to make httpd listen on v4 and v6 for *. Thanks for beating me to it! This also fixes `listen on egress', as it would previously listen on my IPv6 link-local address only. With this diff httpd listens on a

SCHED_LOCK() vs kprintf_mutex

2018-04-09 Thread Martin Pieuchot
Diff below avoids a lock ordering issue between the SCHED_LOCK() and printf(9)'s mutex. This problem has been reported multiple times in drm(4) code where debug printfs are placed between sleep_setup() and sleep_finish(). The problem is easily fixed. logwakeup() must not be called while holding t

C99 def for 'struct fileops'

2018-04-09 Thread Martin Pieuchot
Like we did for 'struct protosw', I'd like to convert these definitions to help for grepping. Ok? Index: kern/kern_event.c === RCS file: /cvs/src/sys/kern/kern_event.c,v retrieving revision 1.86 diff -u -p -r1.86 kern_event.c --- ker

Re: SCHED_LOCK() vs kprintf_mutex

2018-04-09 Thread Mark Kettenis
> Date: Mon, 9 Apr 2018 13:51:34 +0200 > From: Martin Pieuchot > > Diff below avoids a lock ordering issue between the SCHED_LOCK() and > printf(9)'s mutex. This problem has been reported multiple times in > drm(4) code where debug printfs are placed between sleep_setup() and > sleep_finish(). >

subr_autoconf: allow _attach to fail? w/no void2int churn option

2018-04-09 Thread Artturi Alm
Hi, could we allow config_attach() to 'fail' without leaving dead device behind? ie. with gpioow(4) it's easy to make a load of these while testing stuff, which does lead to inconsistent unit numbering unless you manually detach the broken ones before attaching another.. for devices which are fou

vput(9) for NFS

2018-04-09 Thread Martin Pieuchot
Diff below implements most of the missing locking goo for NFS without enabling it. It does the following: - Add a missing PDIRUNLOCK in nfs_lookup() - Change vrele(9) into vput(9) where necessary. nfs_nget() will in future return a locked NFSnode. Just like ffs_vget() returns a locked vnod

Re: [PATCH 4/7] em: Improve access logic for software flag

2018-04-09 Thread Jonathan Gray
On Thu, Apr 05, 2018 at 09:57:20PM +0200, Stefan Fritsch wrote: > Some em chips have a semaphore ("software flag") to synchronize access > to certain registers between OS and firmware (ME/AMT). > > Make the logic to get the flag match the logic in freebsd. This includes > higher timeouts and waiti

Re: [PATCH 7/7] em: Add magic delay for HP elitebook 820 G3

2018-04-09 Thread Jonathan Gray
On Sat, Apr 07, 2018 at 01:35:31PM +0200, Stefan Fritsch wrote: > On Fri, 6 Apr 2018, Jonathan Gray wrote: > > > On Thu, Apr 05, 2018 at 09:57:23PM +0200, Stefan Fritsch wrote: > > > Add another magic 1ms delay that seems to help with some remaining > > > issues on an HP elitebook 820 G3 with i219

re(4): try to map 64-bit mem space first

2018-04-09 Thread Patrick Wildt
Hi, some (probably newer) re(4) cards don't have the 32-bit memory BAR that we try to map first. Instead there's a 64-bit memory BAR in the follow- ing BAR. On the MacchiatoBIN, where we currently do not support the IO space, this means we need to attempt to map the 64-bit memory BAR. This dif

Re: C99 def for 'struct fileops'

2018-04-09 Thread Alexander Bluhm
On Mon, Apr 09, 2018 at 02:21:13PM +0200, Martin Pieuchot wrote: > Like we did for 'struct protosw', I'd like to convert these definitions > to help for grepping. > > Ok? OK bluhm@ > Index: kern/kern_event.c > === > RCS file: /cvs/s

video(1): don't use optarg as format string

2018-04-09 Thread Scott Cheloha
Always nifty: $ video -f '%d%d%d' video: 31668978116843009-2139062144: No such file or directory So, use strlcpy and check for truncation. ok? -- Scott Cheloha Index: app/video/video.c === RCS file: /cvs/xenocara/app/video/video.c

Re: video(1): don't use optarg as format string

2018-04-09 Thread Todd C. Miller
On Mon, 09 Apr 2018 11:56:46 -0500, Scott Cheloha wrote: > Always nifty: > > $ video -f '%d%d%d' > video: 31668978116843009-2139062144: No such file or directory > > So, use strlcpy and check for truncation. > > ok? OK millert@ - todd

Re: subr_autoconf: allow _attach to fail? w/no void2int churn option

2018-04-09 Thread Theo de Raadt
I think this approach is wrong, insane, and fragile. DVF_ACTIVE doesn't work precisely that way. A better approach would be a whole-tree change such that attach functions are non-void. This has been proposed a few times, but noone ever sat down and did the whole-tree work. > could we allow conf

more netinet bcopy -> mem{cpy|move}

2018-04-09 Thread David Hill
Hello - Two bcopy->memmove conversions where src and dst are in the same memory space. Perhaps not overlapping, but just being safe. Convert the bcopy's in tcp_respond to memcpy since the destination is a new mbuf header. OK? Index: netinet/ip_ah.c =

Re: try to map 64-bit mem space first

2018-04-09 Thread Mark Kettenis
> Date: Mon, 9 Apr 2018 18:31:49 +0200 > From: Patrick Wildt > > Hi, > > some (probably newer) re(4) cards don't have the 32-bit memory BAR that > we try to map first. Instead there's a 64-bit memory BAR in the follow- > ing BAR. On the MacchiatoBIN, where we currently do not support the IO >

ksh: fix buffer overflow in u64ton

2018-04-09 Thread Tobias Stoeckmann
As tb@ pointed out, u64ton can overflow on ULONG_MAX. It could also happen on systems with 64 bit int and INT_MIN, although we don't have such a system supported by our code base. You can reach the u64ton function by printing the length of a string within a variable like this: $ a=string $ echo $

Re: ksh: fix buffer overflow in u64ton

2018-04-09 Thread Theo Buehler
On Mon, Apr 09, 2018 at 08:56:28PM +0200, Tobias Stoeckmann wrote: > As tb@ pointed out, u64ton can overflow on ULONG_MAX. It could also > happen on systems with 64 bit int and INT_MIN, although we don't have > such a system supported by our code base. > > You can reach the u64ton function by prin

Re: try to map 64-bit mem space first

2018-04-09 Thread Mike Larkin
On Mon, Apr 09, 2018 at 08:27:49PM +0200, Mark Kettenis wrote: > > Date: Mon, 9 Apr 2018 18:31:49 +0200 > > From: Patrick Wildt > > > > Hi, > > > > some (probably newer) re(4) cards don't have the 32-bit memory BAR that > > we try to map first. Instead there's a 64-bit memory BAR in the follow-