Re: armv7/omap: amdisplay(4)

2016-09-01 Thread Ian Sutton
Work on amdisplay(4) continues uneventfully. It is very nearly complete, just need to fix some DMA issues I am having trouble with. Ian Index: arch/armv7/conf/GENERIC === RCS file: /cvs/src/sys/arch/armv7/conf/GENERIC,v retrieving

[patch] www . plat.html - validation nitpick

2016-09-01 Thread lists
Thu, 1 Sep 2016 09:15:29 -0600 (MDT) T.J. Townsend > CVSROOT: /cvs > Module name: www > Changes by: t...@cvs.openbsd.org2016/09/01 09:15:29 > > Modified files: > . : plat.html sparc.html > faq: faq1.html > > Log message: >

Re: constify auth functions

2016-09-01 Thread Todd C. Miller
On Thu, 01 Sep 2016 13:27:49 -0400, "Ted Unangst" wrote: > Ted Unangst wrote: > > I'm getting annoying warnings because these functions aren't const. > > so > > turns out several of these functions *do* modify their parameters. which is > probably chaos, because i think we sometimes call

Re: switch the cubie miniroot to cubieboard2

2016-09-01 Thread Chris Cappuccio
si...@slackware.it [si...@slackware.it] wrote: > Speaking as a Cubieboard owner here ;-) > Would it be too much hassle to provide both images? (and a pony!) > It's fairly easy to take a miniroot image for a similar board, and adapt it to your board. Since both the Cubieboard and Cubieboard2 are

NULL deref in usb_set_config_index()

2016-09-01 Thread Martin Pieuchot
Diff attached fix two NULL dereferences in usb_set_config_index(). Index: usb_subr.c === RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.123 diff -u -p -r1.123 usb_subr.c --- usb_subr.c 23 May 2016 11:31:12 -

Re: constify auth functions

2016-09-01 Thread Ted Unangst
Ted Unangst wrote: > I'm getting annoying warnings because these functions aren't const. so turns out several of these functions *do* modify their parameters. which is probably chaos, because i think we sometimes call them with const parameters.

Re: Drop IPSec traffic that should be encapsulated but is not

2016-09-01 Thread Claer
On Thu, Sep 01 2016 at 46:18, Vincent Gross wrote: > On Thu, 1 Sep 2016 18:02:14 +0200 > Claer wrote: > > > Hello, > > > > In some production systems, I'm still using an old patch to isakmpd for > > Nat-t. When negociating SAs with ASA peers and OpenBSD is nated, you

Re: Drop IPSec traffic that should be encapsulated but is not

2016-09-01 Thread Vincent Gross
On Thu, 1 Sep 2016 18:02:14 +0200 Claer wrote: > Hello, > > In some production systems, I'm still using an old patch to isakmpd > for Nat-t. > When negociating SAs with ASA peers and OpenBSD is nated, you have > issues during negociation. The following discutions explain

Re: Drop IPSec traffic that should be encapsulated but is not

2016-09-01 Thread Claer
Hello, In some production systems, I'm still using an old patch to isakmpd for Nat-t. When negociating SAs with ASA peers and OpenBSD is nated, you have issues during negociation. The following discutions explain the issue

Re: constify auth functions

2016-09-01 Thread Todd C. Miller
On Thu, 01 Sep 2016 10:51:06 -0400, "Ted Unangst" wrote: > I'm getting annoying warnings because these functions aren't const. As we're the only users of BSD auth I think this is fine. - todd

Use after fruit in usbd_set_config_index()

2016-09-01 Thread Martin Pieuchot
Fuzzing our USB stack is interesting. Here's the first panic: panic() at panic+0xfe free() at free+0xed usbd_free_iface_data() at usbd_free_iface_data+0x49 usb_free_device() at usb_free_device+0x83 usbd_new_device() at usbd_new_device+0x1f5 uhub_port_connect() at uhub_port_connect+0x14e

Re: MSI-X support

2016-09-01 Thread Hrvoje Popovski
On 4.5.2016. 16:32, Mark Kettenis wrote: >>> This is great, thanks for doing this! I'm a bit surprised that >>> we don't need to the same suspend/resume dance in ppb(4) as with >>> MSI. >>> >> >> That is an excellent point I overlooked. Kettenis, do we? > > Almost certainly. I committed the

constify auth functions

2016-09-01 Thread Ted Unangst
I'm getting annoying warnings because these functions aren't const. Index: include/bsd_auth.h === RCS file: /cvs/src/include/bsd_auth.h,v retrieving revision 1.10 diff -u -p -r1.10 bsd_auth.h --- include/bsd_auth.h 21 Apr 2014

iwn: enable SGI

2016-09-01 Thread Stefan Sperling
This diff enables the short guard interval (SGI) feature of 802.11n. In theory this should raise the max data rate from 65Mbit/s to 72Mbit/s. To check if your AP supports SGI, associate to your AP and then run: tcpdump -n -i iwn0 -s 1500 -y IEEE802_11_RADIO -v type mgt subtype beacon and look

Malformed USB descriptors & usbd_set_config_index()

2016-09-01 Thread Martin Pieuchot
usbd_set_config_index() is a complex function parsing unstrusted USB descriptors. If a device presents itself with malformed descriptors we should stop probing as soon as possible. Our USB stack has a way to attach unconfigured USB devices to drivers, meaning that such drivers have to call

Unbreak libobjc for ARM EABI

2016-09-01 Thread Mark Kettenis
This diff unbreaks libobjc on arm. I copied bits and pieces from the C++ exception handling code. Seems to be enough to make all the objc exception handling tests in the gcc 4.2.1 testsuite pass. ok? Index: exception.c === RCS

ABI BREAK: OpenBSD/armv7 moves to ARM EABI

2016-09-01 Thread Patrick Wildt
Hi, I just switched OpenBSD/armv7 to ARM EABI. This is a complete ABI break which you cannot easily cross with a build. Instead, you need to upgrade through this break with a snapshot. An EABI snapshot will be synced to the mirrors soon. Patrick

iwm: enable SGI

2016-09-01 Thread Stefan Sperling
This diff enables the short guard interval (SGI) feature of 802.11n. In theory this should raise the max data rate from 65Mbit/s to 72Mbit/s. To check if your AP supports SGI, associate to your AP and then run: tcpdump -n -i iwm0 -s 1500 -y IEEE802_11_RADIO -v type mgt subtype beacon and look

tcpdump: print association requests

2016-09-01 Thread Stefan Sperling
This diff makes tcpdump display details of association requests. These are interesting because clients announce HT capabilities there. We can share some printing code with beacons. Use with something like tcpdump -s 1500 -v -y IEEE802_11_RADIO -i iwn0 Index: print-802_11.c

NAT-on-enc on iked(8)

2016-09-01 Thread Vincent Gross
This diff adds the missing bits to support NAT-on-enc in iked(8). See OUTGOING NETWORK ADDRESS TRANSLATION in iked.conf(5), and also http://undeadly.org/cgi?action=article=20090127205841. Ok ? diff --git sbin/iked/iked.h sbin/iked/iked.h index aa40d70..dfa04ad 100644 --- sbin/iked/iked.h +++

Re: multi-pool malloc wip diff

2016-09-01 Thread Otto Moerbeek
On Tue, Aug 23, 2016 at 09:57:03AM +0200, Otto Moerbeek wrote: > On Mon, Aug 22, 2016 at 08:59:44PM -0400, Ted Unangst wrote: > > > Otto Moerbeek wrote: > > > > > > After a forkl of a threaded program __isthreaded is reset, but > > > existing allocations are spread around the pools. But the new

Re: relayd TLS ticket and session support accross processes

2016-09-01 Thread Reyk Floeter
On Thu, Sep 01, 2016 at 11:27:55AM +0200, Claudio Jeker wrote: > On Tue, Aug 30, 2016 at 03:51:04PM +0200, Claudio Jeker wrote: > > On Tue, Aug 30, 2016 at 02:44:17PM +0200, Reyk Floeter wrote: > > > On Tue, Aug 30, 2016 at 01:22:49PM +0200, Claudio Jeker wrote: > > > > Here is the latest version

Re: iwm(4): iwm_firmware_load_chunk returns uninitialized error value.

2016-09-01 Thread Stefan Sperling
On Thu, Sep 01, 2016 at 11:26:10AM +0200, Imre Vadasz wrote: > Hi, > The iwm_firmware_load_chunk() function returns the value of the > uninitialized int error variable, when the "while (!sc->sc_fw_chunk_done)" > loop terminates immediately. I saw this happen repeatedly in the init > firmware

Re: Array of TAILQs in kern_synch.c

2016-09-01 Thread Mathieu -
Ted Unangst wrote: > Michal Mazurek wrote: > > There is what appears to be a sensless hash in kern_synch.c. It's an > > array of 128 TAILQs which are hashed according to the high bits of the > > wchan. It's possible to write a program that adds kern.maxthread entries > > to one of those TAILQs.

Re: relayd TLS ticket and session support accross processes

2016-09-01 Thread Claudio Jeker
On Tue, Aug 30, 2016 at 03:51:04PM +0200, Claudio Jeker wrote: > On Tue, Aug 30, 2016 at 02:44:17PM +0200, Reyk Floeter wrote: > > On Tue, Aug 30, 2016 at 01:22:49PM +0200, Claudio Jeker wrote: > > > Here is the latest version of the ticket and tls session cache support. > > > Tickets can be

iwm(4): iwm_firmware_load_chunk returns uninitialized error value.

2016-09-01 Thread Imre Vadasz
Hi, The iwm_firmware_load_chunk() function returns the value of the uninitialized int error variable, when the "while (!sc->sc_fw_chunk_done)" loop terminates immediately. I saw this happen repeatedly in the init firmware loading during bootup. Example log output with iwm compiled with debugging

Re: remove ntfs write code

2016-09-01 Thread Theo de Raadt
Removing unfinished write support makes sense. Who knows, maybe it makes read support more sustainable...

Re: remove ntfs write code

2016-09-01 Thread Ted Unangst
Martin Natano wrote: > mount_ntfs forces the mount point to be MNT_RDONLY, so the write parts > in ntfs are never used. OK to remove? i think so. by the way, this code is probably a dead end, compared to the fuse code. is that right? but we should keep it around for a while until we're sure the

Re: passwd(1) - use explicit_bzero(3)

2016-09-01 Thread Ted Unangst
Gleydson Soares wrote: > after recents passwd(1) changes, We should use explicit_bzero(3) for > clearing these sensitive strings. > OK? right, ok

Re: Array of TAILQs in kern_synch.c

2016-09-01 Thread Ted Unangst
Michal Mazurek wrote: > There is what appears to be a sensless hash in kern_synch.c. It's an > array of 128 TAILQs which are hashed according to the high bits of the > wchan. It's possible to write a program that adds kern.maxthread entries > to one of those TAILQs. Just running chrome with 11

Re: iwm(4): Use htole16 for policy field in iwm_time_event_cmd_v2 struct.

2016-09-01 Thread Martin Natano
On Wed, Aug 31, 2016 at 09:39:47PM +0200, Imre Vadasz wrote: > Hi, > The policy field in struct iwm_time_event_cmd_v2 is just a 16bit integer, > so we should use htole16() when setting it, instead of htole32(). Makes sense to me, although I don't have hardware to test this. > > Index:

Re: remove ntfs write code

2016-09-01 Thread Martin Natano
On Wed, Aug 31, 2016 at 05:17:41PM -0600, Bob Beck wrote: > Yes, ok beck@ > > to be shortly followed by the ntfs code - don't we have a fuse version of > this? There's the ntfs_3g port benno uses. Iirc, access via ntfs_3g is somewhat slower than with the native filesystem (not that I care). >

Drop IPSec traffic that should be encapsulated but is not

2016-09-01 Thread Vincent Gross
Our IPSec stack rejects UDP-encapsulated traffic using a non encapsulating SA, but not the other way around. This diff adds the missing check and the corresponding stat counter. Ok ? Index: sys/netinet/ip_esp.h === RCS file:

Re: better return type for usqrt() in factor(6)

2016-09-01 Thread Otto Moerbeek
On Thu, Sep 01, 2016 at 06:36:15AM +0100, Theo Buehler wrote: > In factor(6), there is the line > > 216 stop = usqrt(val) + 1; > > where the u_int64_t stop is the upper bound for the sieve of > Eratosthenes (I cautiously added 1 to be sure to be on the safe side). > Unfortunately, the

Re: better return type for usqrt() in factor(6)

2016-09-01 Thread Tom Cosgrove
ok tom@ >>> Theo Buehler 1-Sep-16 06:36 >>> > > In factor(6), there is the line > > 216 stop = usqrt(val) + 1; > > where the u_int64_t stop is the upper bound for the sieve of > Eratosthenes (I cautiously added 1 to be sure to be on the safe side). > Unfortunately, the right hand side

Re: sys_process.c: remove relebad

2016-09-01 Thread Philip Guenther
On Thu, Sep 1, 2016 at 8:39 AM, Michal Mazurek wrote: > This was OKd but forgotten: > https://marc.info/?l=openbsd-tech=146001680811549=2 You'll have to commit it yourself then. ok guenther@

Re: better return type for usqrt() in factor(6)

2016-09-01 Thread Philip Guenther
On Thu, Sep 1, 2016 at 6:36 AM, Theo Buehler wrote: > In factor(6), there is the line > > 216 stop = usqrt(val) + 1; > > where the u_int64_t stop is the upper bound for the sieve of > Eratosthenes (I cautiously added 1 to be sure to be on the safe side). >

Re: Fix comment in sys/sem.h

2016-09-01 Thread Philip Guenther
On Thu, Sep 1, 2016 at 8:24 AM, Michal Mazurek wrote: > It's _SYS_SEM_H_ not _SEM_H_: > > #ifndef _SYS_SEM_H_ > #define _SYS_SEM_H_ ok guenther@

Re: Remove last mention of nonexistent ktr_kuser().

2016-09-01 Thread Philip Guenther
On Thu, Sep 1, 2016 at 8:27 AM, Michal Mazurek wrote: > --- sys/sys/ktrace.h18 Jun 2016 17:39:44 - 1.31 > +++ sys/sys/ktrace.h1 Sep 2016 07:26:30 - > @@ -206,7 +206,6 @@ void ktrnamei(struct proc *, char *); > void ktrpsig(struct proc *, int, sig_t, int,

sys_process.c: remove relebad

2016-09-01 Thread Michal Mazurek
This was OKd but forgotten: https://marc.info/?l=openbsd-tech=146001680811549=2 relebad used to have more body: relebad: PRELE(t); return (error); But then PRELE(t); was removed. This diff gets rid of what remains of relebad. Index:

remove MPSAFE from makesyscalls.sh

2016-09-01 Thread Michal Mazurek
This was OKd but forgotten: http://openbsd-archive.7691.n7.nabble.com/remove-MPSAFE-from-makesyscalls-sh-td293382.html Index: sys/sys/systm.h === RCS file: /cvs/src/sys/sys/systm.h,v retrieving revision 1.113 diff -u -p -r1.113

Remove last mention of nonexistent ktr_kuser().

2016-09-01 Thread Michal Mazurek
Index: sys/sys/ktrace.h === RCS file: /cvs/src/sys/sys/ktrace.h,v retrieving revision 1.31 diff -u -p -r1.31 ktrace.h --- sys/sys/ktrace.h18 Jun 2016 17:39:44 - 1.31 +++ sys/sys/ktrace.h1 Sep 2016 07:26:30 - @@

Fix comment in sys/sem.h

2016-09-01 Thread Michal Mazurek
It's _SYS_SEM_H_ not _SEM_H_: #ifndef _SYS_SEM_H_ #define _SYS_SEM_H_ Index: sys/sys/sem.h === RCS file: /cvs/src/sys/sys/sem.h,v retrieving revision 1.23 diff -u -p -r1.23 sem.h --- sys/sys/sem.h 23 Nov 2014