awk fpecatch() update

2017-09-04 Thread Michael W. Bombardieri
Hello, Updated version of awk (Dec 20, 2012) [1] has a simplification in fpecatch() function. I tried to test this to compare the error output. Old version: $ /usr/bin/awk '{}' *** receive SIGFPE via kill(1) *** floating point exception source line number 1 New version: $ ./awk '{}' ***

Re: iwn/iwm/wpi: scanning for 2 vs 5 GHz APs

2017-09-04 Thread Kevin Lo
On Sun, Sep 03, 2017 at 09:37:02PM +0200, Stefan Sperling wrote: > > Starting out in associated (not down!) state: > ifconfig iwn0 down; ifconfig iwn0 scan > shows 2 GHz and 5 GHz APs, whereas just > ifconfig iwn0 scan > does not show all APs. The diff below makes both cases show all APs. > >

efiboot: Restore GOP mode on SetMode() failure

2017-09-04 Thread Klemens Nanni
This diff fixes missing video output when booting in UEFI mode on the ThinkPad X121e (and possibly other boards with crappy implemenatations) as reported earlier: https://marc.info/?l=openbsd-bugs=150407033628497=2 When looking for the best mode in terms of resolution, we might end up

[vmd] vmctl console hung

2017-09-04 Thread Mikhael Lialin
Hi i'm running 6.2-current on Lenovo TP x240, Installed alpine linux 3.6.2-virt as vmm guest. I Faced issue that sometimes vmctl console connection hungs and reconnection just point me to the thread that output that i'm typing without interaction. However while this happened i could connect

divert_output() without ifa_ifwithaddr()

2017-09-04 Thread Alexander Bluhm
Hi, This replaces the call to ifa_ifwithaddr() in divert_output() with a route lookup to make it MP safe. Only set the mbuf header fields that are needed. Validate the name input. ok? bluhm Index: netinet/ip_divert.c === RCS

Re: ospfd: add IMSG_IFADDRADD to deal with "sh /etc/netstart if"

2017-09-04 Thread Florian Riehm
On 08/23/17 00:22, Florian Riehm wrote: On 08/21/17 18:57, Remi Locherer wrote: On Mon, Jul 24, 2017 at 04:59:46PM +0200, Remi Locherer wrote: On Fri, Jul 21, 2017 at 06:24:06PM +0200, Remi Locherer wrote: On Fri, Jul 21, 2017 at 02:45:03PM +0200, Florian Riehm wrote: On 06/25/17 23:47, Remi

Re: update mi_switch(9)

2017-09-04 Thread Philip Guenther
On Sat, Sep 2, 2017 at 8:39 PM, Jonathan Matthew wrote: > Having looked through various parts of the context switching code this > week, > I noticed that mi_switch() has a man page, and it's quite out of date. > > tsleep() isn't the only sleep function, but I don't think

Re: ftp: leak in progressmeter()

2017-09-04 Thread Alexander Bluhm
On Sun, Sep 03, 2017 at 03:19:15PM -0500, Scott Cheloha wrote: > Feedback? It looks like progressmeter() can be called with flag -1 consecutively due to some error path. So better free the title. It cannot hurt. OK bluhm@ > Index: usr.bin/ftp/util.c >

Re: refactoring of pf_find_or_create_ruleset()

2017-09-04 Thread Alexander Bluhm
On Mon, Sep 04, 2017 at 10:29:01AM +0200, Alexandr Nedvedicky wrote: > anyway below is the patch, which Hrvoje was testing and it worked for him. > I'd like to get some OK to proceed to commit. I think it is correct. OK bluhm@ > + if (parent != NULL) { > + /* > +

Re: *usrreq() need a socket lock

2017-09-04 Thread Alexander Bluhm
On Mon, Sep 04, 2017 at 10:03:32AM +0200, Martin Pieuchot wrote: > For some of them it happens to be the NET_LOCK(), but not all of them > need it. So use the correct macro. For consistency rip6_usrreq() and divert6_usrreq() should get that, too. > ok? OK bluhm@ > Index: net/rtsock.c >

Re: solock() & nfs_connect

2017-09-04 Thread Alexander Bluhm
On Fri, Sep 01, 2017 at 06:29:33PM +0200, Martin Pieuchot wrote: > Here's an alternative approach that pre-allocate mbufs. This reduce > the number of MGET() in the function an allow us to do a single > solock()/sounlock() dance. Yes, I like that. You could rename m to nam to be consistent with

sdio: assert write lock instead of taking lock

2017-09-04 Thread Patrick Wildt
Hi, apparently one of the main concepts in the SDMMC I/O subsystem is that the driver attached to an SDIO card always holds the lock and only releases it if it detaches. Now with that in mind, some time ago the sdmmc_io_function_disable() and sdmmc_io_function_ready() was changed to only assert

Re: readlink: be quiet about overlong argument without '-f' option

2017-09-04 Thread Theo de Raadt
I feel the same way about this. It can help in deep trees. > On Mon, Sep 04, 2017 at 11:43:56AM -0500, Scott Cheloha wrote: > > Thoughts? > > The PATH_MAX check was introduced in rev 1.10 1997/09/23. That was > after the doumentation, so it might be a mistake that the man page > was not

Re: readlink: be quiet about overlong argument without '-f' option

2017-09-04 Thread Alexander Bluhm
On Mon, Sep 04, 2017 at 11:43:56AM -0500, Scott Cheloha wrote: > Thoughts? The PATH_MAX check was introduced in rev 1.10 1997/09/23. That was after the doumentation, so it might be a mistake that the man page was not updated. The feature worked for 20 years, I see no reason to remove it.

readlink: be quiet about overlong argument without '-f' option

2017-09-04 Thread Scott Cheloha
Hi, readlink(1) has a check before calling readlink(2) that prints a hand-rolled error message if your argument exceeds (PATH_MAX - 1) bytes. $ readlink $(perl -e 'print "z"x1024') This contradicts the documentation, which says that absent the '-f' flag nothing will be printed if the

Re: [patch] Initialize "cur" to avoid undefined behavior is dmesg.c

2017-09-04 Thread Nan Xiao
Hi Tom, Updated, thanks! Best Regards Nan Xiao Index: dmesg.c === RCS file: /cvs/src/sbin/dmesg/dmesg.c,v retrieving revision 1.29 diff -u -p -r1.29 dmesg.c --- dmesg.c 1 Sep 2017 07:31:45 - 1.29 +++ dmesg.c 4 Sep

Re: Routing table update on link state change

2017-09-04 Thread Gerhard Roth
Hi Martin, On Mon, 4 Sep 2017 14:18:50 +0200 Martin Pieuchot wrote: > On 04/09/17(Mon) 13:10, Gerhard Roth wrote: > > Hi, > > > > I noticed a problem with the routing table that is easy to reproduce: put > > multiple IPs on the same carp interface: > > Great bug analysis,

Re: Routing table update on link state change

2017-09-04 Thread Martin Pieuchot
On 04/09/17(Mon) 13:10, Gerhard Roth wrote: > Hi, > > I noticed a problem with the routing table that is easy to reproduce: put > multiple IPs on the same carp interface: Great bug analysis, however returning EAGAIN for every route update is a no go if you have a big routing table like BGP full

Re: [patch] Initialize "cur" to avoid undefined behavior is dmesg.c

2017-09-04 Thread Tom Cosgrove
> - free(allocated); > + if (allocated) > + free(allocated); This is unnecessary, since free(NULL) is clearly defined as a no-op. See the malloc(3) man page. Tom >>> Nan Xiao 4-Sep-17 12:11 >>> > > Hi tech@, > > This patch fixes the extreme case in dmesg.c: if memf or nlistf

[patch] Initialize "cur" to avoid undefined behavior is dmesg.c

2017-09-04 Thread Nan Xiao
Hi tech@, This patch fixes the extreme case in dmesg.c: if memf or nlistf is not NULL, and "NOKVM" macro is defined. Current code in dmesg.c: struct msgbuf cur; Since "cur" is not initialized, so the following code has undefined behavior: if (cur.msg_bufx >=

Routing table update on link state change

2017-09-04 Thread Gerhard Roth
Hi, I noticed a problem with the routing table that is easy to reproduce: put multiple IPs on the same carp interface: # ifconfig em0 em0: flags=8843 mtu 1500 lladdr 00:0a:e4:31:9d:6e index 1 priority 0 llprio 3 groups: egress

Re: refactoring of pf_find_or_create_ruleset()

2017-09-04 Thread Alexandr Nedvedicky
Hello, > with this patch i can't trigger panic with or without WITH_PF_LOCK if > that's matter for some reason. anyway below is the patch, which Hrvoje was testing and it worked for him. I'd like to get some OK to proceed to commit. > thank you sasha for great work on MP pf :) I'm

align struct rcs_num between cvs(1) and rcs(1)

2017-09-04 Thread Michael W. Bombardieri
Hi, The struct rcs_num in rcs(1) had a pointer for rn_id, but the version in cvs(1) had an array of size RCSNUM_MAX. This patch tries to make rcs(1) follow cvs(1) here, so rn_id doesn't need to be freed. As a result the rcsnum_free() function is replaced by one free(). After applying this patch

*usrreq() need a socket lock

2017-09-04 Thread Martin Pieuchot
For some of them it happens to be the NET_LOCK(), but not all of them need it. So use the correct macro. ok? Index: net/rtsock.c === RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.249 diff -u -p -r1.249 rtsock.c ---

[PATCH v2 0/2] VMD: Prevent from crashing

2017-09-04 Thread Carlos Cardenas
This patch series contains: 1) Place plenty of log_debug statements in key places to assist with troubleshooting and debugging 2) Add new error code when attempting to stop a non-running vm (used by vmctl) Prevent vmd from crashing with updated logic when stopping a vm Difference

[PATCH v2 2/2] VMD: Prevent vmd crashing when stopping a stopped vm

2017-09-04 Thread Carlos Cardenas
* Fix logic handling stopping a VM. Prevents VMD from crashing. * Add additional error code to notify the user that a vm cannot be stopped when not running. * Add additional log_debug statements. diff --git usr.sbin/vmctl/vmctl.c usr.sbin/vmctl/vmctl.c index 64d82ca847d..5fb7fbfd74c 100644 ---

[PATCH v2 1/2] VMD: Place log_debug statements in key places

2017-09-04 Thread Carlos Cardenas
Add log_debug statements in key places to assist with troubleshooting. diff --git usr.sbin/vmd/config.c usr.sbin/vmd/config.c index 9ea87eb86e8..623a9b9d4f3 100644 --- usr.sbin/vmd/config.c +++ usr.sbin/vmd/config.c @@ -81,14 +81,18 @@ config_purge(struct vmd *env, unsigned int reset)

sendbug categories

2017-09-04 Thread Michael W. Bombardieri
Hello, Are sparc and vax still considered valid categories for sendbug or should people now use only sparc64? - Michael Index: sendbug.c === RCS file: /cvs/src/usr.bin/sendbug/sendbug.c,v retrieving revision 1.78 diff -u -p -u

Re: lex: action_m4_define

2017-09-04 Thread Michael W. Bombardieri
I forgot to mention that action_m4_define() was previously removed from upstream flex here: https://github.com/westes/flex/commit/925549475edb3c8921227fdd96aa0d90a2c0745a On Sun, Aug 27, 2017 at 06:41:31PM +0800, Michael W. Bombardieri wrote: > Hello, > > In lex(1) the function