arm64/llvm: default to strict alignment

2017-01-20 Thread Patrick Wildt
Hi, currently our clang for ARM64 creates code thinking it can do unaligned access. Which is kinda true, since our kernel does not enforce strict alignment yet. The Pine64 on the other hand enforces strict alignment at least as long as EFI is running. This means efiboot needs to be compiled

OpenBGPd: expand rib list (updated for r1.295)

2017-01-20 Thread Denis Fondras
Hello, Here is a patch to expand RIB names in rules. When playing with multi-RIBs, it allows to simplify ruleset. Ex : # cat /etc/bgpd.conf [...] peer_ribs = "{ m1, m2, m3 }" deny rib m2 from any allow rib $peer_ribs from any prefix { 2001:db8:1::/48, 2001:db8:2::/48 } # bgpd -dnv [...] deny

Re: NET_LOCK() take 2, tests wanted!

2017-01-20 Thread Alexander Bluhm
On Fri, Jan 20, 2017 at 05:16:50PM +0100, Alexander Bluhm wrote: > I am currently running a full regress test with this diff. > It hangs at /usr/src/regress/lib/libpthread/socket Tests have finished, libpthread was aborted after 1 hour, process socket1 still lives. The machine is running a

remove raw_input()

2017-01-20 Thread Alexander Bluhm
Hi, The function raw_input() gets not called since netiso has been removed in 2004. The comment above rip_input() has been added in 1981, but it is wrong since 1992. pr_input is never called with parameters (*pr_input)(mbuf, sockproto, sockaddr, sockaddr). So I think it is time to retire

Re: arm64/llvm: default to strict alignment

2017-01-20 Thread Mark Kettenis
> Date: Fri, 20 Jan 2017 21:41:37 +1000 > From: Patrick Wildt > > Hi, > > currently our clang for ARM64 creates code thinking it can do unaligned > access. Which is kinda true, since our kernel does not enforce strict > alignment yet. The Pine64 on the other hand enforces

Re: rtsock refactoring

2017-01-20 Thread Claudio Jeker
On Fri, Jan 20, 2017 at 02:51:52AM +0100, Claudio Jeker wrote: > I sent this diff out some time ago and would really like to get this in. > This is one step on makeing rtsock.c less of a hornets nest. > This reduces the side effects in route_output and simplifies some other > bits as well. For

allow 'make obj' for users not belonging to group wobj

2017-01-20 Thread Theo Buehler
Following up on semarie's bug report, only try to chown to the group obj if this call is going to succeed. So that the bsd.prog.mk infrastructure can be used by all users independently of they belong to wobj or not. Index: share/mk/bsd.obj.mk

man.openbsd.org upgraded

2017-01-20 Thread Ingo Schwarze
Hi, this is merely for your information: I just completed a major cleanup, started about one and a half weeks ago, of both the mandoc(1) -Thtml code itself and the HTML code it generates, both in multiple respects, and installed the new version on man.openbsd.org. If you notice anything odd

Re: sunxi: add Allwinner A64 support for USB and USB clocks

2017-01-20 Thread Patrick Wildt
On Sat, Jan 21, 2017 at 10:50:20AM +1000, Patrick Wildt wrote: > Hi, > > so this diff makes the Pine64 work with EHCI. The only not nice thing > is the switch. It would be better if this depends on the compatible > since the A64 and H3 have different numbers (and clock parents) for the > APB2

Re: remove raw_input()

2017-01-20 Thread Philip Guenther
On Fri, 20 Jan 2017, Alexander Bluhm wrote: > The function raw_input() gets not called since netiso has been removed > in 2004. The comment above rip_input() has been added in 1981, but it > is wrong since 1992. pr_input is never called with parameters > (*pr_input)(mbuf, sockproto, sockaddr,

Re: NET_LOCK() ordering issue

2017-01-20 Thread Alexander Bluhm
On Thu, Jan 19, 2017 at 07:14:59PM +1000, Martin Pieuchot wrote: > Index: kern/uipc_syscalls.c > === > RCS file: /cvs/src/sys/kern/uipc_syscalls.c,v > retrieving revision 1.144 > diff -u -p -r1.144 uipc_syscalls.c > ---

Re: NET_LOCK() take 2, tests wanted!

2017-01-20 Thread Martin Pieuchot
On 20/01/17(Fri) 12:04, Martin Pieuchot wrote: > Diff below enables the NET_LOCK(), again. > > What's new? > > - The lock ordering problem with fdplock() should now be fixed. It is >also documented, fdplock() should be taken first if both locks are >needed. > > - Page faults

Re: NET_LOCK() take 2, tests wanted!

2017-01-20 Thread Martin Pieuchot
On 20/01/17(Fri) 17:16, Alexander Bluhm wrote: > > --- sys/kern/kern_rwlock.c > > +++ sys/kern/kern_rwlock.c > > @@ -195,6 +195,9 @@ retry: > > unsigned long set = o | op->wait_set; > > int do_sleep; > > > > + if (panicstr) > > + return (0); >

Re: NET_LOCK() ordering issue

2017-01-20 Thread Martin Pieuchot
On 20/01/17(Fri) 22:25, Alexander Bluhm wrote: > On Thu, Jan 19, 2017 at 07:14:59PM +1000, Martin Pieuchot wrote: > > Index: kern/uipc_syscalls.c > > === > > RCS file: /cvs/src/sys/kern/uipc_syscalls.c,v > > retrieving revision 1.144

sunxi: add Allwinner A64 support for USB and USB clocks

2017-01-20 Thread Patrick Wildt
Hi, so this diff makes the Pine64 work with EHCI. The only not nice thing is the switch. It would be better if this depends on the compatible since the A64 and H3 have different numbers (and clock parents) for the APB2 clock. I would still like to go ahead with this version since I don't think

hook up libcompiler_rt, libcxx(abi) to the build

2017-01-20 Thread Patrick Wildt
Hi, now that the Makefiles in libcompiler_rt, libcxx and libcxxabi are guarded to not compile for !CLANG architectures, I am hopefuly that we can simply hook them up to the build. ok? Patrick diff --git a/lib/Makefile b/lib/Makefile index 7bca1e4bf2d..70cade57caa 100644 --- a/lib/Makefile +++

Re: hook up libcompiler_rt, libcxx(abi) to the build

2017-01-20 Thread Mark Kettenis
> Date: Sat, 21 Jan 2017 11:23:07 +1000 > From: Patrick Wildt > > Hi, > > now that the Makefiles in libcompiler_rt, libcxx and libcxxabi are > guarded to not compile for !CLANG architectures, I am hopefuly that > we can simply hook them up to the build. > > ok? ok kettenis@

Re: rtsock refactoring

2017-01-20 Thread Claudio Jeker
On Sat, Jan 21, 2017 at 01:28:02AM +0100, Claudio Jeker wrote: > On Fri, Jan 20, 2017 at 02:51:52AM +0100, Claudio Jeker wrote: > > I sent this diff out some time ago and would really like to get this in. > > This is one step on makeing rtsock.c less of a hornets nest. > > This reduces the side

Re: iwm: fix a timeout race

2017-01-20 Thread Richard Procter
Hi, On 18/01/2017, Stefan Sperling wrote: > I managed to trigger the following uvm fault by continously switching an > iwm(4) client between two APs on different channels, i.e. a loop that runs: > ifconfig iwm0 chan X; sleep 10; ifconfig iwm chan Y; sleep 10; > >

sunxi: clock for PIO

2017-01-20 Thread Patrick Wildt
Hi, this diff adds the clock for the Allwinner A64 PIO. ok? Patrick diff --git a/sys/arch/armv7/sunxi/sxiccmu_clocks.h b/sys/arch/armv7/sunxi/sxiccmu_clocks.h index fdd0282623b..5a8f36f9993 100644 --- a/sys/arch/armv7/sunxi/sxiccmu_clocks.h +++ b/sys/arch/armv7/sunxi/sxiccmu_clocks.h @@ -19,6

Re: NET_LOCK() ordering issue

2017-01-20 Thread Alexander Bluhm
On Thu, Jan 19, 2017 at 07:14:59PM +1000, Martin Pieuchot wrote: > Turns out that the NET_LOCK() related hang reported by many is a > deadlock. One way to prevent it is to ensure that fdplock() is > always taken before the NET_LOCK() when both have to been hold. > > This generates the diff

net: constant conversion

2017-01-20 Thread Patrick Wildt
Hi, the new clang complains when variables might unintentionally switch from a positive to a negative number. This happens on the MULTICAST flag which sets the uppermost bit. ../../../../net/if.h:#defineIFF_MULTICAST 0x8000 /* supports multicast */ Thus if_flags = IFF_MULTICAST

Re: NET_LOCK() take 2, tests wanted!

2017-01-20 Thread Hrvoje Popovski
On 20.1.2017. 3:04, Martin Pieuchot wrote: > Diff below enables the NET_LOCK(), again. > > What's new? > > - The lock ordering problem with fdplock() should now be fixed. It is >also documented, fdplock() should be taken first if both locks are >needed. > > - Page faults involving

Re: NET_LOCK() take 2, tests wanted!

2017-01-20 Thread Alexander Bluhm
On Fri, Jan 20, 2017 at 12:04:31PM +1000, Martin Pieuchot wrote: > - Page faults involving NFS, or any other code path already holding the >NET_LOCK(), have been fixed. The recursion is similar to the existing >vnode problem, so I simply added a hack there. It survives my nfs mmap

unify log.c in daemons [rtadvd]

2017-01-20 Thread Sebastian Benoit
work on making log.c similar in all daemons: reduce the (mostly whitespace) differences so that log.c's can be diffed easily. need to set verbose in main() when option -d is used. ok? diff --git usr.sbin/rtadvd/log.c usr.sbin/rtadvd/log.c index 9b6c8980590..d3a5ba20727 100644 ---

Re: iwm: fix a timeout race

2017-01-20 Thread Stefan Sperling
Anyone? This could crash all your iwm(4) machines any time you run ifconfig... On Tue, Jan 17, 2017 at 08:22:27PM +0100, Stefan Sperling wrote: > I managed to trigger the following uvm fault by continously switching an > iwm(4) client between two APs on different channels, i.e. a loop that runs:

Re: net: constant conversion

2017-01-20 Thread Theo de Raadt
if_flags is in-kernel, so definately this should become unsigned. But what about if_msghdr.ifm_flags? That is exposed to userland, but I'd support moving it to unsigned because the route socket is a less standardized interface. struct ipoption is a little less clear. It is exposed to userland;