SHA1(3): remove usage of No macro

2017-01-09 Thread Anton Lindqvist
The following paragraph from the SHA1(3) man-page looks odd in its HTML representation: $ sed -n 214p /usr/src/lib/libcrypto/man/SHA1.3 .Pq Fa len No bytes at Fa data . The No macro causes "bytes at" to be wrapped inside a code-tag and not be rendered as unformatted text. Splitting the line solve

syslogd fd_tls variable

2017-01-09 Thread Alexander Bluhm
Hi, To implement multiple tls listen sockets in syslogd, I have to get rid of the global variable fd_tls first. ok? bluhm Index: usr.sbin/syslogd/syslogd.c === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/syslogd/syslogd.c,v ret

manage HT protection when acting as hostap

2017-01-09 Thread Stefan Sperling
This diff cannot be tested yet -- I'm looking for OKs only :-) Manage the HT protection setting if acting as hostap with 11n enabled. For now we flip-flop only between non-member protection and non-HT protection. Running a HT network without protection would require monitoring environmental condi

Re: ports build failure, max_align_t

2017-01-09 Thread Marc Espie
On Sun, Jan 08, 2017 at 09:53:50PM +, Stuart Henderson wrote: > graphics/ttfautohint > > c++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I.. -I../lib -I../gnulib/src > -I../gnulib/src -I/usr/X11R6/include/freetype2 -O2 -pipe -MT info.o -MD > -MP -MF .deps/info.Tpo -c -o info.o info.cpp > In fil

Re: ftp(1): anonymous login and .netrc

2017-01-09 Thread Vadim Zhukov
2017-01-04 11:51 GMT+03:00 Anton Lindqvist : > I'm running a script as root which drops privileges while fetching files > using ftp(1) with anonymous login enabled: > > # doas -u unpriv ftp -a URL > > ... and was surprised to see the following error: > > ftp: /root/.netrc: Permission denied > > I'm

provide wme params if acting as 11n hostap

2017-01-09 Thread Stefan Sperling
Linux clients won't use 11n with an AP unless the AP provides WME parameters. This is the reverse of the problem we had when Linux APs did not want to use 11n with OpenBSD clients who did not send a wme info element in association requests. Tested with 11n-enabled athn(4) OpenBSD hostap and an Ub

Re: ports build failure, max_align_t

2017-01-09 Thread Mark Kettenis
> Date: Sun, 8 Jan 2017 21:53:50 + > From: Stuart Henderson > > graphics/ttfautohint > > c++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I.. -I../lib -I../gnulib/src > -I../gnulib/src -I/usr/X11R6/include/freetype2 -O2 -pipe -MT info.o -MD > -MP -MF .deps/info.Tpo -c -o info.o info.cpp > In f

Re: SHA1(3): remove usage of No macro

2017-01-09 Thread Ingo Schwarze
Hi, Anton Lindqvist wrote on Mon, Jan 09, 2017 at 09:02:37AM +0100: > The following paragraph from the SHA1(3) man-page looks odd in its HTML > representation: > > $ sed -n 214p /usr/src/lib/libcrypto/man/SHA1.3 > .Pq Fa len No bytes at Fa data . > > The No macro causes "bytes at" to be wrappe

11n support for athn(4)

2017-01-09 Thread Stefan Sperling
This diff adds 11n support to the athn(4) driver. Requires -current net80211 code from today. Tested in hostap mode and client mode with: athn0 at pci1 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 16 athn0: AR9280 rev 2 (2T2R), ROM rev 22, adddress xx:xx:xx:xx:xx:xx And in client mode w

Re: ports build failure, max_align_t

2017-01-09 Thread Mark Kettenis
> Date: Mon, 9 Jan 2017 12:14:21 +0100 > From: Marc Espie > > On Sun, Jan 08, 2017 at 09:53:50PM +, Stuart Henderson wrote: > > graphics/ttfautohint > > > > c++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I.. -I../lib -I../gnulib/src > > -I../gnulib/src -I/usr/X11R6/include/freetype2 -O2 -pipe

Re: SHA1(3): remove usage of No macro

2017-01-09 Thread Ingo Schwarze
Hi, Ingo Schwarze wrote on Mon, Jan 09, 2017 at 01:35:59PM +0100: > Anton Lindqvist wrote on Mon, Jan 09, 2017 at 09:02:37AM +0100: >> The following paragraph from the SHA1(3) man-page looks odd in its HTML >> representation: >> >> $ sed -n 214p /usr/src/lib/libcrypto/man/SHA1.3 >> .Pq Fa len N

Re: 11n support for athn(4)

2017-01-09 Thread Stefan Sperling
On Mon, Jan 09, 2017 at 01:54:55PM +0100, Stefan Sperling wrote: > For Linux clients a fix for WME params is needed which I also posted to tech@. That fix is now committed.

Re: openbgpd: support for bgp administrative shutdown communication

2017-01-09 Thread Peter van Dijk
Hello Sebastian, On 8 Jan 2017, at 22:10, Sebastian Benoit wrote: Job Snijders(j...@instituut.net) on 2017.01.08 20:24:19 +0100: Dear OpenBSD developers, This patch adds support for the "BGP Administrative Shutdown Communication" to bgpd(8) and bgpctl(8). Hi Job and Peter, thanks, this is

fix EDCA problems in hostap

2017-01-09 Thread Stefan Sperling
Currently, an athn(4) hostap in 11n mode sending data a fame looks something like this: AP: RTS client: CTS AP: RTS client: CTS AP: RTS client: CTS AP: RTS client: CTS AP: RTS client: CTS AP: data client: ACK The problem seems to be that while we're sending EDCA parameters

{ah,esp}_input_cb() & NET_LOCK()

2017-01-09 Thread Martin Pieuchot
As reported by Hrvoje Popovski, these two callbacks also need the NET_LOCK(): splassert: ip_output: want 1 have 0 Starting stack trace... ip_output() at ip_output+0x7d pfsync_sendout() at pfsync_sendout+0x499 pfsync_update_tdb() at pfsync_update_tdb+0x13a

Re: Fix memory leak in LibreSSL/tls_conninfo_free()

2017-01-09 Thread Joel Sing
On Sunday 08 January 2017 07:59:34 Shuo Chen wrote: > Valgrind finds out that conninfo->servername is not free()d by > tls_conninfo_free(). > > == HEAP SUMMARY: > == in use at exit: 83,069 bytes in 2,690 blocks > == total heap usage: 4,107 allocs, 1,417 frees, > == 339,66

Re: {ah,esp}_input_cb() & NET_LOCK()

2017-01-09 Thread Mike Belopuhov
On 9 January 2017 at 16:10, Martin Pieuchot wrote: > As reported by Hrvoje Popovski, these two callbacks also need the > NET_LOCK(): > > splassert: ip_output: want 1 have 0 > Starting stack trace... > ip_output() at ip_output+0x7d > pfsync_sendout() at pfsync_sendou

Re: {ah,esp}_input_cb() & NET_LOCK()

2017-01-09 Thread Visa Hankala
On Mon, Jan 09, 2017 at 04:10:48PM +0100, Martin Pieuchot wrote: > As reported by Hrvoje Popovski, these two callbacks also need the > NET_LOCK(): > > splassert: ip_output: want 1 have 0 > Starting stack trace... > ip_output() at ip_output+0x7d > pfsync_sendout() at pfsync_

bpf without KERNEL_LOCK()

2017-01-09 Thread Martin Pieuchot
I reverted the previous version because Hrvoje Popovski reported the following recursion: panic: mtx_enter: locking against myself mtx_enter() bpf_mtap_ether() bnx_start() ifq_serialize() if_enqueue() ether_output() bpfwrite() Turns

Re: Some tweaks for smfb(4)

2017-01-09 Thread Frederic Cambus
On Tue, Dec 27, 2016 at 11:39:26PM +0100, Frederic Cambus wrote: > > > > Here is a diff with some tweaks for smfb(4): > > > > > > - Display resolution and color depth when attaching > > > > We should try to do so in a uniform way though. None of our drivers > > print the words "frame buffer".

Re: {ah,esp}_input_cb() & NET_LOCK()

2017-01-09 Thread Mike Belopuhov
On 9 January 2017 at 17:44, Visa Hankala wrote: > On Mon, Jan 09, 2017 at 04:10:48PM +0100, Martin Pieuchot wrote: >> As reported by Hrvoje Popovski, these two callbacks also need the >> NET_LOCK(): >> >> splassert: ip_output: want 1 have 0 >> Starting stack trace... >> ip_output

Re: bpf without KERNEL_LOCK()

2017-01-09 Thread Alexander Bluhm
On Mon, Jan 09, 2017 at 05:48:17PM +0100, Martin Pieuchot wrote: > bpf_detachd(struct bpf_d *d) > { > - struct bpf_if *bp; > + struct bpf_if *bp = d->bd_bif; > + > + MUTEX_ASSERT_LOCKED(&d->bd_mtx); > > - bp = d->bd_bif; > /* Not attached. */ > if (bp == NULL) >

Re: openssl.pc version

2017-01-09 Thread Sebastien Marie
On Sun, Jan 08, 2017 at 12:29:50PM +0100, Sebastien Marie wrote: > Hi, > > The "OpenSSL bindings for Rust" checks, using pkg-config, the version of > openssl installed, and target 1.0.1 as minimal version. > > Under OpenBSD, /usr/lib/pkgconfig/openssl.pc is generated by > src/lib/libcrypto/genera

Re: openssl.pc version

2017-01-09 Thread Stuart Henderson
On 2017/01/09 19:00, Sebastien Marie wrote: > On Sun, Jan 08, 2017 at 12:29:50PM +0100, Sebastien Marie wrote: > > Hi, > > > > The "OpenSSL bindings for Rust" checks, using pkg-config, the version of > > openssl installed, and target 1.0.1 as minimal version. > > > > Under OpenBSD, /usr/lib/pkgco

Re: Some tweaks for smfb(4)

2017-01-09 Thread Mark Kettenis
> Date: Mon, 9 Jan 2017 17:54:53 +0100 > From: Frederic Cambus > > On Tue, Dec 27, 2016 at 11:39:26PM +0100, Frederic Cambus wrote: > > > > > > Here is a diff with some tweaks for smfb(4): > > > > > > > > - Display resolution and color depth when attaching > > > > > > We should try to do so in

improve realloc(3)

2017-01-09 Thread Otto Moerbeek
Hi, this diff implements some improvements to realloc and some cleanup of the MALLOC_MOVE code. 1. When shrinking a chunk allocation, compare the size of the current allocation to the size of the new allocation (instead of the requested size). Current code does a malloc-free-copy dance in too man

Re: openssl.pc version

2017-01-09 Thread Sebastien Marie
On Mon, Jan 09, 2017 at 06:12:37PM +, Stuart Henderson wrote: > On 2017/01/09 19:00, Sebastien Marie wrote: > > On Sun, Jan 08, 2017 at 12:29:50PM +0100, Sebastien Marie wrote: > > > Hi, > > > > > > The "OpenSSL bindings for Rust" checks, using pkg-config, the version of > > > openssl installe

if() before m_free(9)

2017-01-09 Thread Martin Pieuchot
m_free(9) handles NULL, no need to check for it beforehand. Seems that we missed these because of the (void) cast! ok? Index: netinet/ip_output.c === RCS file: /cvs/src/sys/netinet/ip_output.c,v retrieving revision 1.333 diff -u -p

ldpad(8): fix LDAP_MOD_DELETE operation

2017-01-09 Thread Robert Klein
Hi, ZHANG Huangbin reported a misbehavior in ldapd(8)'s MOD_DELETE operation when connecting to ldapd(8) with the python-ldap library. The MOD_DELETE operation always deletes all values of an attribute and not only those specified to be deleted in the request. (Mails from Zhang Huangbin to bugs@

Re: if() before m_free(9)

2017-01-09 Thread Alexander Bluhm
On Mon, Jan 09, 2017 at 08:12:32PM +0100, Martin Pieuchot wrote: > m_free(9) handles NULL, no need to check for it beforehand. > > Seems that we missed these because of the (void) cast! > > ok? OK bluhm@ > > Index: netinet/ip_output.c > =

clear cached HT capabilities on reassociation

2017-01-09 Thread Stefan Sperling
When a HT node leaves or reassociates as a non-HT node, clear HT capabilities stored in its node cache object. A node may switch from 11n mode to 11a/b/g mode. If we don't clear HT capabilities from the cache the node will be mistaken as 11n-capable after reassociation. Index: ieee80211_input.c =

Re: if() before m_free(9)

2017-01-09 Thread Mark Kettenis
> Date: Mon, 9 Jan 2017 20:12:32 +0100 > From: Martin Pieuchot > > m_free(9) handles NULL, no need to check for it beforehand. > > Seems that we missed these because of the (void) cast! > > ok? ok kettenis@ > Index: netinet/ip_output.c > ===

Pointless use of 'struct route_in6'

2017-01-09 Thread Martin Pieuchot
Simply use a 'struct rtentry' instead, ok? Index: netinet6/ip6_output.c === RCS file: /cvs/src/sys/netinet6/ip6_output.c,v retrieving revision 1.218 diff -u -p -r1.218 ip6_output.c --- netinet6/ip6_output.c 18 Nov 2016 02:53:47

Re: openbgpd: support for bgp administrative shutdown communication

2017-01-09 Thread Job Snijders
Dear all, The below is based on feedback from Sebastian Benoit, Theo de Raadt, and Peter Hessler. The patch adds less lines of code, and adheres better to style(9). Thank you for your time. Kind regards, Job Index: bgpctl/bgpctl.8 ===

Re: FreeType 2.7.1

2017-01-09 Thread Stuart Henderson
On 2017/01/09 15:29, David Coppa wrote: > > Hi all, > > Here's the update to freetype-2.7.1, both inline and as attachment. > > As usual, please test it. > > And, if you can, put it in your next bulk build. I'll start an i386 bulk tomorrow.

Re: NET_LOCK() pr_sysctl

2017-01-09 Thread Alexander Bluhm
On Thu, Dec 22, 2016 at 01:38:17AM +0100, Mateusz Guzik wrote: > In this particular case, what happens if the access results in a page > fault and the area comes from a nfs mapped file? If network i/o is done > from the same context, this should result in 'locking against myself' > assertion failur

Re: Pointless use of 'struct route_in6'

2017-01-09 Thread Sebastian Benoit
Martin Pieuchot(m...@openbsd.org) on 2017.01.09 21:11:54 +0100: > Simply use a 'struct rtentry' instead, ok? ok > Index: netinet6/ip6_output.c > === > RCS file: /cvs/src/sys/netinet6/ip6_output.c,v > retrieving revision 1.218 > diff

Re: 11n support for athn(4)

2017-01-09 Thread Stefan Sperling
On Mon, Jan 09, 2017 at 01:54:55PM +0100, Stefan Sperling wrote: > This diff adds 11n support to the athn(4) driver. > Requires -current net80211 code from today. A better diff which fixes several bugs. Most notably this should fix a crash in hostap mode triggered by clients joining and leaving i

csu: prevent too aggressive optimization by clang

2017-01-09 Thread Patrick Wildt
Hi, while working on OpenBSD/arm64 I stumbled upon the issue that the CTOR and DTOR LIST was optimized away by clang. Instead of the __ctors() call it created an endless loop, doing nothing at all. I don't know why it does exactly that optimization. Marking the lists as __used prevents clang fr

Re: Fix memory leak in LibreSSL/tls_conninfo_free()

2017-01-09 Thread Shuo Chen
On Mon, Jan 9, 2017 at 7:31 AM, Joel Sing wrote: > On Sunday 08 January 2017 07:59:34 Shuo Chen wrote: >> Valgrind finds out that conninfo->servername is not free()d by >> tls_conninfo_free(). >> >> Here's a quick fix. > > Committed, thanks! Thank you!

Re: csu: prevent too aggressive optimization by clang

2017-01-09 Thread Joerg Sonnenberger
On Tue, Jan 10, 2017 at 12:33:49AM +0100, Patrick Wildt wrote: > while working on OpenBSD/arm64 I stumbled upon the issue that the CTOR > and DTOR LIST was optimized away by clang. Instead of the __ctors() > call it created an endless loop, doing nothing at all. I don't know > why it does exactly

Hyper-V entropy driver

2017-01-09 Thread Jonathan Gray
Hyper-V hosts make 64 bytes of entropy available to guests in the form of a OEM0 acpi table. Feed that into the entropy pool. This is less interesting for machines with rdrand, but there are still pre ivy bridge machines running Hyper-V (including parts of Azure). Index: sys/dev/acpi/files.acpi

Re: Hyper-V entropy driver

2017-01-09 Thread Mike Larkin
On Tue, Jan 10, 2017 at 02:19:35PM +1100, Jonathan Gray wrote: > Hyper-V hosts make 64 bytes of entropy available to guests in the form > of a OEM0 acpi table. Feed that into the entropy pool. > > This is less interesting for machines with rdrand, but there are still > pre ivy bridge machines run