mpsafe malloc(9)

2017-07-04 Thread David Gwynne
the following adds a mutex to malloc and free to protect their internal state. this should be enough to make the api mpsafe, assuming the way they interact with uvm is mpsafe. this only uses a single mutex around the entire malloc subsystem, but shuffles the code slightly to avoid holding it

Re: ktrace: Following symlinks

2017-07-04 Thread Klemens Nanni
On Thu, Jun 29, 2017 at 11:33:36PM -0700, Philip Guenther wrote: On Thu, Jun 29, 2017 at 10:42 PM, Klemens Nanni wrote: On Thu, Jun 29, 2017 at 09:50:25PM -0700, Philip Guenther wrote: On Thu, Jun 22, 2017 at 7:17 PM, Klemens Nanni wrote: So I just

Re: armv7 small bootstrap improvement/simplification

2017-07-04 Thread Artturi Alm
On Wed, Jul 05, 2017 at 02:27:46AM +0300, Artturi Alm wrote: > Hi, > > instead of messing w/bs_tags, use the fact pmap_kernel()->pm_refs is going > to be 0 until pmap_bootstrap() has ran. tmp_bs_tag was unused, and > bootstrap_bs_map doesn't need/use the void *t-arg when being ran indirectly >

armv7 small bootstrap improvement/simplification

2017-07-04 Thread Artturi Alm
Hi, instead of messing w/bs_tags, use the fact pmap_kernel()->pm_refs is going to be 0 until pmap_bootstrap() has ran. tmp_bs_tag was unused, and bootstrap_bs_map doesn't need/use the void *t-arg when being ran indirectly via armv7_bs_map(). the whole existence of bootstrap_bs_map is another

Re: patch: fix inteldrm for Intel P4000 graphics

2017-07-04 Thread Mark Kettenis
> Date: Tue, 4 Jul 2017 17:24:27 -0400 > From: "Joe Gidi" > > I have a machine with a Xeon E3-1225v2 CPU, which includes integrated > Intel P4000 graphics. This required a patch back in 2015 to avoid matching > on the mythical "Intel Quanta Transcode" device, which

Re: armv7 alignment faults

2017-07-04 Thread Artturi Alm
On Tue, Jul 04, 2017 at 05:14:00AM +0200, Jeremie Courreges-Anglas wrote: > Artturi Alm writes: > > > Hi, > > > > i think i've noted about this before, around 13months ago freebsd > > first disabled alignment faults, and they haven't enabled them since. > > deja vu, or

Re: ping: Style fixes/cleanups

2017-07-04 Thread Klemens Nanni
Purely cosmetic/style(9) fixes: Remove unneeded indent in prototypes, add space after return keyword. Feedback/OK? Index: ping.c === RCS file: /cvs/src/sbin/ping/ping.c,v retrieving revision 1.220 diff -u -p -r1.220 ping.c ---

Re: ping: Style fixes/cleanups

2017-07-04 Thread Klemens Nanni
On Tue, Jul 04, 2017 at 03:58:13PM +, Florian Obser wrote: I like most (all? of the correct ones), can you have another go at trying to fix the pointed out changes in behaviour? Thanks natano for pointing out these stupid mistakes. Unify option checking, check for F_RROUTE only if

patch: fix inteldrm for Intel P4000 graphics

2017-07-04 Thread Joe Gidi
I have a machine with a Xeon E3-1225v2 CPU, which includes integrated Intel P4000 graphics. This required a patch back in 2015 to avoid matching on the mythical "Intel Quanta Transcode" device, which kettenis@ committed here: http://marc.info/?l=openbsd-cvs=144342287923444=2 The recent update to

Re: ifstated diff rename variables to avoid state confusion

2017-07-04 Thread Sebastian Benoit
Rob Pierce(r...@2keys.ca) on 2017.07.04 07:34:27 -0400: > On Mon, Jul 03, 2017 at 04:24:30PM -0400, Rob Pierce wrote: > > ifstated monitors interface state and the return state of invoked commands, > > and takes action accordingly, all of which is managed with the help of a > > finite state

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

2017-07-04 Thread Remi Locherer
On Sun, Jun 25, 2017 at 11:47:09PM +0200, Remi Locherer wrote: > Hi, > > ospfd does not react nicely when running "sh /etc/netstart if". > > This is because adding the same address again do an interface results > in RTM_DELADDR and RTM_NEWADDR. ospfd handles the former but the later. > If this

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-04 Thread Sebastian Benoit
Florian Obser(flor...@openbsd.org) on 2017.07.04 19:27:15 +: > On Fri, Jun 23, 2017 at 01:52:52PM +0300, Kapetanakis Giannis wrote: > > Hi, > > > > Using relayd's redirect/forward on ipv6 addresses I discovered problems > > relating to setting TTL. > > > > There is no check for address

Re: install.sub: ieee80211_{scan,config}: Allow quoted SSIDs

2017-07-04 Thread Klemens Nanni
On Mon, Jul 03, 2017 at 12:45:32AM +0200, Klemens Nanni wrote: Thanks for looking into it. On Sun, Jul 02, 2017 at 04:32:43PM +, Robert Peichaer wrote: ieee80211_scan() - Extract the needed information (nwid, bssid) using a very specific sed expression. Any line, not matching this expr

Re: elf.h

2017-07-04 Thread Karel Gardas
On Tue, 4 Jul 2017 11:48:27 +0200 Martin Pieuchot wrote: > Hello, > > I think that moving towards is a good thing. However are you > sure that provides all the definitions required by > ? Not yet. At least a lot of machine related definitions are missing, but they are not

Re: ping: Style fixes/cleanups

2017-07-04 Thread Klemens Nanni
On Tue, Jul 04, 2017 at 04:00:43PM +, Florian Obser wrote: yeah, this is arse backwards, I'm willing to commit the oposite though, i.e. get rid of the void casts for printf Casts removed, cosecutive calls merged where suitable. Feedback/OK? Index: ping.c

Re: CVS: cvs.openbsd.org: src

2017-07-04 Thread J Doe
Hi, On Jul 4, 2017, at 7:40 AM, Mark Kettenis wrote: >> From: Frank Groeneveld >> Date: Tue, 04 Jul 2017 09:38:18 +0200 >> >>> On Mon, Jul 3, 2017, at 08:30, Martijn van Duren wrote: >>> This change *STILL* breaks my $DAYJOB machine. >>> >>>

Re: fix relayd dns protocol

2017-07-04 Thread Florian Obser
OK florian@ On Thu, Jun 29, 2017 at 09:26:16PM +, Rivo Nurges wrote: > Hi! > > config_setrelay>relay_privinit>relay_udp_privinit doesn't set env > since env isn't set in relay.c yet, causing dns relay to SIGSEGV > in relay_udp_server. Move setting env to relay_udp_init. > > Rivo > > Index:

Re: relayd ipv6 ttl check_icmp / check_tcp

2017-07-04 Thread Florian Obser
On Fri, Jun 23, 2017 at 01:52:52PM +0300, Kapetanakis Giannis wrote: > Hi, > > Using relayd's redirect/forward on ipv6 addresses I discovered problems > relating to setting TTL. > > There is no check for address family and setsockopt tries to apply IP_TTL > always. > > Without ip ttl on ipv6

Re: Missed ifconfig [[-]txpower dBm] option for 802.11

2017-07-04 Thread Ted Unangst
Denis wrote: > Looking for ifconfig '[[-]txpower dBm]' option which was present in > OpenBSD 5.4 amd64. Try to find 'txpower' on 6.0 amd64 but seems it > missed out. > > Actively using it to match power for 802.11 card and it's RF recipient > (post amp). What mechanism of output power matching is

Re: ping: Style fixes/cleanups

2017-07-04 Thread Florian Obser
yeah, this is arse backwards, I'm willing to commit the oposite though, i.e. get rid of the void casts for printf On Tue, Jun 13, 2017 at 08:12:47PM +0200, Klemens Nanni wrote: > printf's return value is ignored allmost all the times so do the same > for the rest of them as well for consistency.

Re: ping: Style fixes/cleanups

2017-07-04 Thread Florian Obser
I like most (all? of the correct ones), can you have another go at trying to fix the pointed out changes in behaviour? On Tue, Jun 13, 2017 at 08:02:13PM +0200, Klemens Nanni wrote: > Unify option checking and simply logic. > > F_HDRINCL and F_ROUTE are mutually exclusive, thus check the latter

Re: ping: Style fixes/cleanups

2017-07-04 Thread Florian Obser
commited, thanks On Tue, Jun 13, 2017 at 07:56:32PM +0200, Klemens Nanni wrote: > The intent here is to get the highest multiple of four smaller or equal > than i + 3. Instead of relying on integer division to get rid of the > remainder just to "undo" everything, simply clear the lowest two bits

Re: ping: Style fixes/cleanups

2017-07-04 Thread Florian Obser
Meh, personal taste. Also the idea is to keep AF switches to a minimum and use them as an indication that something important is going on. I'd rather just read over the memset as something boring. Maybe we are even lucky and compilers are smart enough to figure this out on their own? On Tue, Jun

Re: ping: Style fixes/cleanups

2017-07-04 Thread Florian Obser
commited, thanks! On Tue, Jun 13, 2017 at 07:48:27PM +0200, Klemens Nanni wrote: > On Tue, Jun 13, 2017 at 10:45:57AM -0600, Theo de Raadt wrote: > >Sorry, but that type of diff is a no-go. You've made a large variety > >of different decisions on your own and mixed them up with ones which > >are

Re: CVS: cvs.openbsd.org: src

2017-07-04 Thread Mark Kettenis
> From: Frank Groeneveld > Date: Tue, 04 Jul 2017 09:38:18 +0200 > > On Mon, Jul 3, 2017, at 08:30, Martijn van Duren wrote: > > This change *STILL* breaks my $DAYJOB machine. > > > > dmesg with DRMDEBUG enabled > > Maybe you shouldn't chose Apple hardware ;-) Well.

Re: ifstated diff rename variables to avoid state confusion

2017-07-04 Thread Rob Pierce
On Mon, Jul 03, 2017 at 04:24:30PM -0400, Rob Pierce wrote: > ifstated monitors interface state and the return state of invoked commands, > and takes action accordingly, all of which is managed with the help of a > finite state machine. That makes for a lot of "state" references in the code. > >

Re: elf.h

2017-07-04 Thread Martin Pieuchot
Hello, On 03/07/17(Mon) 18:58, Karel Gardas wrote: > I'm curious if it's possible to provide /usr/include/elf.h file on OpenBSD to > improve its niceness to software porting from other Unixes. Following patch > adds this for me and is tested with GHC where I'd like to kill code like: > > #if

ifstated parse.y removed unused tokens

2017-07-04 Thread Rob Pierce
These tokens have existed since version 1.1 but have never been used. Can we delete them? Rob Index: parse.y === RCS file: /cvs/src/usr.sbin/ifstated/parse.y,v retrieving revision 1.43 diff -u -p -r1.43 parse.y --- parse.y 2

Re: CVS: cvs.openbsd.org: src

2017-07-04 Thread Frank Groeneveld
On Mon, Jul 3, 2017, at 08:30, Martijn van Duren wrote: > This change *STILL* breaks my $DAYJOB machine. > > dmesg with DRMDEBUG enabled Maybe you shouldn't chose Apple hardware ;-) Works great here on a Thinkpad X260 Mark, thank you very much! Frank