support for malloc allocation canaries

2015-10-22 Thread Daniel Micay
Hi, This patch adds an opt-in malloc configuration option placing canaries after small allocations to detect heap overflows on free(...). It's intended to be used alongside guard pages for large allocations. Since it's essentially adding extra padding to all small allocations, a small heap overflo

Re: A couple of style(9) tweaks

2015-10-22 Thread Philip Guenther
On Tue, Oct 20, 2015 at 3:55 PM, Ilya Kaliman wrote: ... > --- bin/ed/main.c 9 Oct 2015 21:24:05 - 1.53 > +++ bin/ed/main.c 20 Oct 2015 22:49:53 - > @@ -174,7 +174,7 @@ top: > signal(SIGHUP, signal_hup); > signal(SIGQUIT, SIG_IGN); > signal(SIGINT,

Re: connect routing domains on layer 2

2015-10-22 Thread David Gwynne
> On 23 Oct 2015, at 09:00, Reyk Floeter wrote: > > Hi, > > this diff allows to interconnect routing domains. > > It is very useful to route traffic from one routing domain to another, > without using the pf "rtable" hack (tested in production for a long > time). > > eg., > # ifconfig vether0

Re: unused macros in ksh

2015-10-22 Thread Michael McConville
Beat me to it. ok mmcc@ Ilya Kaliman wrote: > === > RCS file: /cvs/src/bin/ksh/shf.c,v > retrieving revision 1.25 > diff -u -p -r1.25 shf.c > --- shf.c 19 Oct 2015 14:42:16 - 1.25 > +++ shf.c 23 Oct 2015 00:27:40

unused macros in ksh

2015-10-22 Thread Ilya Kaliman
=== RCS file: /cvs/src/bin/ksh/shf.c,v retrieving revision 1.25 diff -u -p -r1.25 shf.c --- shf.c 19 Oct 2015 14:42:16 - 1.25 +++ shf.c 23 Oct 2015 00:27:40 - @@ -707,10 +707,6 @@ shf_smprintf(const char *fmt,

mkdir pledge condition

2015-10-22 Thread Ilya Kaliman
& has lower precedence than ==, so this seems to be not what was intended (the condition is always false): === RCS file: /cvs/src/bin/mkdir/mkdir.c,v retrieving revision 1.28 diff -u -p -r1.28 mkdir.c --- mkdir.c 10 Oct 2015 20:18

Re: axphy(4): new dumb driver for axe(4) phys

2015-10-22 Thread Jonathan Gray
What does this do that ukphy doesn't? I don't see any errata or special handling here. On Fri, Oct 23, 2015 at 04:33:22AM +0300, Paul Irofti wrote: > The following diff adds a basic PHY for Axis dongles. > > Changes: > ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI > 0x

change gateway to gateway route

2015-10-22 Thread Alexander Bluhm
Hi, It is possible to create a gateway route pointing to another gateway route by changing the gateway. # route add 1/8 127.0.0.1 # route add 2/8 127.0.0.1 1/8127.0.0.1 UGS00 32768 8 lo0 2/8127.0.0.1 UGS00 32768

connect routing domains on layer 2

2015-10-22 Thread Reyk Floeter
Hi, this diff allows to interconnect routing domains. It is very useful to route traffic from one routing domain to another, without using the pf "rtable" hack (tested in production for a long time). eg., # ifconfig vether0 10.0.1.1/24 # ifconfig vether1 rdomain 1 10.0.1.2/24 # ping 10.1.1.2 # r

axphy(4): new dumb driver for axe(4) phys

2015-10-22 Thread Paul Irofti
The following diff adds a basic PHY for Axis dongles. Changes: ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI 0x000ec6, model 0x0001 ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI 0x000ec6, model 0x0008 To: axphy0 at axe0 phy 16: AX88772 10/100

Re: towards mpsafe rtfree(9)

2015-10-22 Thread Bret Lambert
On Thu, Oct 22, 2015 at 07:42:24PM +0200, Martin Pieuchot wrote: > Now that we have a single refcounting mechanism for route entries, I'd > like to use atomic operations and grab the KERNEL_LOCK only if a CPU is > dropping the last reference on an entry. > > Currently this only matters for MPLS.

Re: mpsafe gem(4)

2015-10-22 Thread Alexey Suslikov
Martin Pieuchot openbsd.org> writes: > + /* > + * If we have enough room, clear IFF_OACTIVE to tell the stack > + * that it iss OK to send packets. > + */ there's a typo here. "that it iss" should be "that it is".

towards mpsafe rtfree(9)

2015-10-22 Thread Martin Pieuchot
Now that we have a single refcounting mechanism for route entries, I'd like to use atomic operations and grab the KERNEL_LOCK only if a CPU is dropping the last reference on an entry. Currently this only matters for MPLS. I intentionally use atomic_* ops because I'd like to see be able to see if

Re: Kill link_rtrequest()

2015-10-22 Thread Claudio Jeker
On Thu, Oct 22, 2015 at 06:50:01PM +0200, Martin Pieuchot wrote: > On 19/10/15(Mon) 14:07, Martin Pieuchot wrote: > > This function is a no-op, let's kill it. > > Anybody? What could go wrong? (mwhahahaha) Put it in and lets see on which dragons tail we're jumping around this time. > > > > I

Re: Kill link_rtrequest()

2015-10-22 Thread Martin Pieuchot
On 19/10/15(Mon) 14:07, Martin Pieuchot wrote: > This function is a no-op, let's kill it. Anybody? > > Index: net/if.c > === > RCS file: /cvs/src/sys/net/if.c,v > retrieving revision 1.389 > diff -u -p -r1.389 if.c > --- net/if.c 1

Re: ifa_ifp and RTF_LOCAL routes

2015-10-22 Thread Alexander Bluhm
On Wed, Oct 21, 2015 at 10:18:49AM +0200, Martin Pieuchot wrote: > Now that (rt_ifa->ifa_ifp == rt_ifp) we can simplify the check below. > > Ok? OK bluhm@ > > Index: net/route.c > === > RCS file: /cvs/src/sys/net/route.c,v > retrie

Re: Fewer ifa_ifp

2015-10-22 Thread Alexander Bluhm
On Thu, Oct 22, 2015 at 04:31:09PM +0200, Martin Pieuchot wrote: > Two more cases, ok? OK bluhm@ > > Index: netinet6/in6_src.c > === > RCS file: /cvs/src/sys/netinet6/in6_src.c,v > retrieving revision 1.64 > diff -u -p -r1.64 in6_sr

Fewer ifa_ifp

2015-10-22 Thread Martin Pieuchot
Two more cases, ok? Index: netinet6/in6_src.c === RCS file: /cvs/src/sys/netinet6/in6_src.c,v retrieving revision 1.64 diff -u -p -r1.64 in6_src.c --- netinet6/in6_src.c 19 Oct 2015 12:11:28 - 1.64 +++ netinet6/in6_src.c 22

Re: Do not change rt_ifa after insertion

2015-10-22 Thread Alexander Bluhm
On Thu, Oct 22, 2015 at 01:34:20PM +0200, Martin Pieuchot wrote: > Either because it has been specified in rt_ifa_add() or because > rt_getifa() returns you the correct one. So if the key of a route > matches an address on the ifp it *must* be the same ifa. > > Let's make sure of that, ok? OK bl

Re: mpsafe gem(4)

2015-10-22 Thread Martin Pieuchot
On 16/10/15(Fri) 15:05, Martin Pieuchot wrote: > I'm a bit late to the party, but here's a diff to bring gem(4) to the > group of cool^WIPL_MPSAFE drivers. > > sparc and sparc64 are only compile tested, I've been running with this > on my dual G5. > > It includes Mark's diff to disable flow contr

Re: Pledge "id" for identd

2015-10-22 Thread Jérémie Courrèges-Anglas
Gregor Best writes: > Hi people, Hi, > identd's parent process needs to pledge "id" so it can call setgroups > and friends later. Likely a victim of the "proc" -> "id" switch. The following diff survived a few tests. Index: identd.c ===

Re: rt_ifa_add() dead code

2015-10-22 Thread Alexander Bluhm
On Thu, Oct 22, 2015 at 01:04:16PM +0200, Martin Pieuchot wrote: > RTAX_IFA is specified so rt_getifa() is never called and this is simply > dead code. > > ok? OK bluhm@ > > Index: net/route.c > === > RCS file: /cvs/src/sys/net/rou

Re: carp_iamatch() tweak

2015-10-22 Thread Alexander Bluhm
On Thu, Oct 22, 2015 at 12:34:56PM +0200, Martin Pieuchot wrote: > Instead of passing an ``ia'' to dereference ``ia_ifp'', pass ``ifp'' > directly, we have it. > > ok? OK bluhm@ > > Index: netinet/if_ether.c > === > RCS file: /cvs/

pledge(2) in quiz(6)

2015-10-22 Thread Jan Stary
games/quiz.c popen()s a PAGER to display the help message. Throw that away and let the use pipe into a PAGER if needed. Then we can just pledge "stdio rpath". Jan Index: quiz.c === RCS file: /cvs/src/games/quiz/quiz.c,v retr

Do not change rt_ifa after insertion

2015-10-22 Thread Martin Pieuchot
Either because it has been specified in rt_ifa_add() or because rt_getifa() returns you the correct one. So if the key of a route matches an address on the ifp it *must* be the same ifa. Let's make sure of that, ok? Index: net/if.c

Fwd: Allow bioctl to go through all controllers at once

2015-10-22 Thread Vadim Zhukov
ping? -- WBR, Vadim Zhukov -- Forwarded message -- From: Vadim Zhukov Date: 2015-10-01 21:59 GMT+03:00 Subject: Allow bioctl to go through all controllers at once To: tech@openbsd.org Hi all. I've recently found that this patch still produces M's in my tree. What it does

rt_ifa_add() dead code

2015-10-22 Thread Martin Pieuchot
RTAX_IFA is specified so rt_getifa() is never called and this is simply dead code. ok? Index: net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.254 diff -u -p -r1.254 route.c --- net/route.c 21 Oct 2015 08:21

carp_iamatch() tweak

2015-10-22 Thread Martin Pieuchot
Instead of passing an ``ia'' to dereference ``ia_ifp'', pass ``ifp'' directly, we have it. ok? Index: netinet/if_ether.c === RCS file: /cvs/src/sys/netinet/if_ether.c,v retrieving revision 1.172 diff -u -p -r1.172 if_ether.c --- neti

Re: make iked not static

2015-10-22 Thread Stuart Henderson
On 2015/10/21 22:30, Theo de Raadt wrote: > >Already, iked is started after /usr has been mounted, so why the > >static requirement? > > Historic theories about ipsec protected nfs? Who knows. > > >> --- etc/rc 18 Oct 2015 21:33:18 - 1.467 > >> +++ etc/rc 20 Oct 2015 18:03:58 - > >>

Re: catopen/catgets: out of boundary access

2015-10-22 Thread Stefan Sperling
On Tue, Oct 06, 2015 at 11:57:40PM +0200, Tobias Stoeckmann wrote: > By the way, this is the second version with miod's feedback. Time to > send it to tech@ now, too. > > Fixed one issue due to missing braces and less ntohl() calls, which > makes the code easier to read. ok with me > Index: cato

Re: smtpd: pledge, chmod and deliver_maildir

2015-10-22 Thread Gilles Chehade
On Wed, Oct 21, 2015 at 10:41:16PM +0200, Gregor Best wrote: > Nice to see rubber duck debugging working. The attached patch seems to > be enough > Thanks. There is work in progress to shring the pledge list but I have committed this meanwhile to fix the immediate issue. -- Gilles Chehade ht

Re: sync bioctl manual

2015-10-22 Thread Jason McIntyre
On Thu, Oct 22, 2015 at 11:10:53AM +0300, Kirill Bychkov wrote: > > Index: bioctl.8 > === > RCS file: /cvs/src/sbin/bioctl/bioctl.8,v > retrieving revision 1.97 > diff -u -r1.97 bioctl.8 > --- bioctl.8 12 Sep 2015 14:21:25 -

Re: sync bioctl manual

2015-10-22 Thread Kirill Bychkov
On Thu, October 22, 2015 00:45, Jason McIntyre wrote: > On Thu, Oct 22, 2015 at 12:35:53AM +0300, Kirill Bychkov wrote: >> On Thu, October 22, 2015 00:16, Jason McIntyre wrote: >> > On Wed, Oct 21, 2015 at 11:19:12PM +0300, Kirill Bychkov wrote: >> >> Hi! >> >> After halex@ removed a restriction to