Re: Recursive NET_LOCK()

2017-01-05 Thread Mike Belopuhov
On 3 January 2017 at 20:08, Ted Unangst wrote: > Martin Pieuchot wrote: >> It seems that most of the problems exposed by the introduction of the >> NET_LOCK() are related to the non-recursive nature of the rwlock. Some >> known issues involve pflow(4), cloning interfaces an

Re: fix iwm ioctl races ('could not initiate scan', 'device timeout')

2017-01-05 Thread Martin Pieuchot
On 05/01/17(Thu) 14:56, Stefan Sperling wrote: > I've received reports from various folks over the last year where iwm > would print messages like these while various ifconfig commands are used: > > iwm0: could not initiate scan > iwm0: device timeout > > I found this also happens on one of my

Re: NET_LOCK in sppp_keepalive

2017-01-05 Thread Alexander Bluhm
On Thu, Jan 05, 2017 at 10:38:00PM +0100, Alexander Bluhm wrote: > Manual inspection shows that the last function is used in a timeout. > timeout_set(_ch, sppp_keepalive, NULL); Of course we need a process context to call NET_LOCK(). New diff. bluhm Index: net/if_spppsubr.c

Re: Allow install from https server w/ self signed cert

2017-01-05 Thread Alexander Hall
What's the point of installing over https if you don't care about validating the cert? On January 5, 2017 12:24:11 PM GMT+01:00, RD Thrush wrote: >Rather than add load to the OpenBSD snapshot servers, for years I >download a snapshot to a local netgear nas server. With

Re: Recursive NET_LOCK()

2017-01-05 Thread Ted Unangst
Mike Belopuhov wrote: > The big problem with the non-recursive netlock is that to fix > recursions in many cases we have to release the netlock in one > of the callers up the chain which makes the interim code run > without any protection and we don't have a way of assessing > the situation short

Re: C11 max_align_t

2017-01-05 Thread Todd C. Miller
I think you need to also define __CLANG_MAX_ALIGN_T_DEFINED and perhaps _GCC_MAX_ALIGN_T to avoid libcxx from redefining max_align_t as a different type. E.g. in src/lib/libcxx/include/stddef.h // Re-use the compiler's max_align_t where possible. #if !defined(__CLANG_MAX_ALIGN_T_DEFINED) &&

C11 max_align_t

2017-01-05 Thread Mark Kettenis
Diff below adds C11 support to the feature test macros in and uses those to conditionally define the max_align_t type in . All systems/compilers seem to use the same construct. See https://reviews.llvm.org/rL201729 for a bit more background. This will make it possible to remove clang's

Re: Allow install from https server w/ self signed cert

2017-01-05 Thread Alexander Hall
On January 5, 2017 11:10:06 PM GMT+01:00, Alexander Hall wrote: >What's the point of installing over https if you don't care about >validating the cert? Oh, I read too fast. Please disregard. /Alexander > >On January 5, 2017 12:24:11 PM GMT+01:00, RD Thrush

NET_LOCK in sppp_keepalive

2017-01-05 Thread Alexander Bluhm
Hi, My static code analysis has found a missing netlock. Starting from a given function it finds reverse traces that have no NET_LOCK(). Lock not found: [CGNode: if_linkstate, CGNode: if_down, CGNode: sppp_keepalive] Manual inspection shows that the last function is used in a timeout.

Re: fix iwm ioctl races ('could not initiate scan', 'device timeout')

2017-01-05 Thread Ted Unangst
Stefan Sperling wrote: > The problem seems to be that iwm's various tasks will sleep while waiting > for a device command to finish. If an ioctl process now sneaks in it will > trigger new commands to be sent in parallel, which the hardware does not like. > > I see one way of fixing this: grab

Ansify cpu_sysctl() on mips64 platforms

2017-01-05 Thread Frederic Cambus
Hi tech@, Here is a diff to ansify cpu_sysctl() on mips64 platforms. Comments? OK? Index: sys/arch/loongson/loongson/machdep.c === RCS file: /cvs/src/sys/arch/loongson/loongson/machdep.c,v retrieving revision 1.70 diff -u -p -r1.70

Re: tls_config_parse_protocols vs httpd in snapshot

2017-01-05 Thread Carlin Bingham
On Thu, Jan 05, 2017 at 06:02:53PM -0500, Michael W. Lucas wrote: > > Hi, > > Something doesn't seem right between httpd.conf and > tls_config_parse_protocols. Running today's snapshot, but was first > attempted in the 15 Dec snapshot. > > httpd.conf(5) says to get TLS protocols from >

tls_config_parse_protocols vs httpd in snapshot

2017-01-05 Thread Michael W. Lucas
Hi, Something doesn't seem right between httpd.conf and tls_config_parse_protocols. Running today's snapshot, but was first attempted in the 15 Dec snapshot. httpd.conf(5) says to get TLS protocols from tls_config_parse_protocols(3). That page says: The tls_config_parse_protocols()

yacc: loop -> memcpy

2017-01-05 Thread Michael W. Bombardieri
Hi, Two loops in yacc/lalr.c can be converted into memcpy(). I quickly tested this on i386 and amd64 against rcs/date.y and the output matched y.tab.c of unpatched yacc. - Michael Index: lalr.c === RCS file:

Re: ld.so diff that needs testing on landisk

2017-01-05 Thread Mark Kettenis
> From: Philip Guenther > Date: Wed, 4 Jan 2017 17:21:03 -0700 > > On Tue, Jan 3, 2017 at 2:13 PM, Mark Kettenis wrote: > > The diff below (partly by guenther@) removes ld.so's dependency on the > > __got_{start,end} symbols by looking at

Re: yacc: loop -> memcpy

2017-01-05 Thread Otto Moerbeek
On Thu, Jan 05, 2017 at 05:13:24PM +0800, Michael W. Bombardieri wrote: > Hi, > > Two loops in yacc/lalr.c can be converted into memcpy(). > I quickly tested this on i386 and amd64 against rcs/date.y > and the output matched y.tab.c of unpatched yacc. Some remarks: 1. use of magic nunber 2.

arm: fixup allocate idle pcb

2017-01-05 Thread Patrick Wildt
Hi, we don't have SMP, but there are a few things one could start with already. For instance allowing the code to work/compile, even though not all components are there yet. This diff allows allocating the idle pcb / kernelstack. Rename of idlepcb to idle_pcb to be comparable with amd64. ok?

Re: Unable to boot since latest installer HTTPS changes

2017-01-05 Thread Stefan Sperling
On Tue, Jan 03, 2017 at 05:26:04PM +0100, Leo Unglaub wrote: > Hey tech@ > i wanted to upgrade to the latest snapshot (as i always do, every week) but > since you added the HTTPS support to the installer i am unable to boot my > system or the install.fs from a flash drive. > > I get to the MBR

Allow install from https server w/ self signed cert

2017-01-05 Thread RD Thrush
Rather than add load to the OpenBSD snapshot servers, for years I download a snapshot to a local netgear nas server. With the recent https changes, I'm no longer able to install from that server. I've appended a console log of a failed install attempt. Per src/distrib/miniroot/install.sub

Re: arm: fixup allocate idle pcb

2017-01-05 Thread Mark Kettenis
> Date: Thu, 5 Jan 2017 14:05:16 +0100 > From: Patrick Wildt > > Hi, > > we don't have SMP, but there are a few things one could start with > already. For instance allowing the code to work/compile, even though > not all components are there yet. > > This diff allows

Installing clang headers

2017-01-05 Thread Mark Kettenis
The clang in base installs several header files in /usr/lib/clang/3.8.1/include that are interfering somewhat with our own headers. In particular these headers don't include which leads to issues because our own headers expect that they don't have to include themselves because some other

Re: Installing clang headers

2017-01-05 Thread Patrick Wildt
On Thu, Jan 05, 2017 at 03:37:43PM +0100, Mark Kettenis wrote: > The clang in base installs several header files in > /usr/lib/clang/3.8.1/include that are interfering somewhat with our > own headers. In particular these headers don't include > which leads to issues because our own headers

fix iwm ioctl races ('could not initiate scan', 'device timeout')

2017-01-05 Thread Stefan Sperling
I've received reports from various folks over the last year where iwm would print messages like these while various ifconfig commands are used: iwm0: could not initiate scan iwm0: device timeout I found this also happens on one of my machines during bsd.rd upgrades. While the upgrade script

Re: Recursive NET_LOCK()

2017-01-05 Thread Martin Pieuchot
On 05/01/17(Thu) 16:09, Mike Belopuhov wrote: > [...] > The big problem with the non-recursive netlock is that to fix > recursions in many cases we have to release the netlock in one > of the callers up the chain which makes the interim code run > without any protection and we don't have a way of