sparc64: delete old "traptrace" bits

2016-10-16 Thread Philip Guenther
In 2003(!) a pile of code was deleted from sparc64's locore.s: revision 1.35 date: 2003/05/17 07:09:08; author: art; state: Exp; lines: +1 -957; Get rid of lots of hairy ifdefs that we'll most likely never use. TRAPTRACE, TRAPSTATS, FLTTRACE and SCHED_DEBUG. mdw@ h

Re: vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Theo de Raadt
> On Sun, Oct 16, 2016 at 02:55:39PM -0700, Philip Guenther wrote: > > > > Instead of using errno as a hidden argument to vfatal(), make it an > > _actual_ argument named 'code', ala the errc/warnc family, and rename it > > to vfatalc() to match the pattern set. > > > > ok? > > > > Philip Guen

Re: vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Mike Larkin
On Sun, Oct 16, 2016 at 02:55:39PM -0700, Philip Guenther wrote: > > Instead of using errno as a hidden argument to vfatal(), make it an > _actual_ argument named 'code', ala the errc/warnc family, and rename it > to vfatalc() to match the pattern set. > > ok? > > Philip Guenther > Isn't thi

Re: use x2apic if it is enabled by BIOS

2016-10-16 Thread YASUOKA Masahiko
Hi, Thanks your comments, On Fri, 14 Oct 2016 16:23:40 +0200 (CEST) s...@openbsd.org wrote: > On Fri, 14 Oct 2016, YASUOKA Masahiko wrote: >> I'm working on NEC Express5800/R110h-1 (dmesg is attached). On this >> machine, our kernel panics with following message. >> >> cpu0 at mainbus0panic:

minor diff for ldapd.conf.5

2016-10-16 Thread Rob Pierce
Fix a couple of grammar mistakes, remove a redundant word, and add a FILES reference for the /etc/ldap/certs directory. Rob Index: ldapd.conf.5 === RCS file: /cvs/src/usr.sbin/ldapd/ldapd.conf.5,v retrieving revision 1.19 diff -u -p

syslogd max unix sockets

2016-10-16 Thread Alexander Bluhm
Hi, I would like to remove the artificial maximum number of unix domain sockets in syslogd(8). Just malloc(3) them dynamically which also gives a more random address space layout. ok? bluhm Index: usr.sbin/syslogd/syslogd.8 === RC

xenocara: make the ws driver reboust to EIO

2016-10-16 Thread Philip Guenther
On my Lenovo Yoga12, the touchscreen** will go into low power mode or some such if I leave the system alone to make dinner or something productive like that. At that point the wsmouse device for it vanishes and the X server sees an infinite stream of EIO errors which it handlesby looping

vmd: simplify fatal/fatalx errno handling

2016-10-16 Thread Philip Guenther
Instead of using errno as a hidden argument to vfatal(), make it an _actual_ argument named 'code', ala the errc/warnc family, and rename it to vfatalc() to match the pattern set. ok? Philip Guenther Index: log.c === RCS file: /d

CVS: cvs.openbsd.org: src (fwd)

2016-10-16 Thread Philip Guenther
Should have sent this to tech... -- Forwarded message -- Date: Sun, 16 Oct 2016 13:57:42 -0700 From: Philip Guenther To: Jeremie Courreges-Anglas Cc: source-chan...@openbsd.org Subject: Re: CVS: cvs.openbsd.org: src On Sun, 16 Oct 2016, Jeremie Courreges-Anglas wrote: > CVSROOT

make ssh -qO {stop,exit} less noisy

2016-10-16 Thread Tim Kuijsten
Hi tech@ This makes the tear down of ssh control masters better play with shell scripts that are run by cron. If nothing unexpected happens and in quiet mode, then don't echo back the command that is being requested. -Tim Index: mux.c

vm.conf(5) manual tweak for switches

2016-10-16 Thread Edd Barrett
Hi, In vm.conf(5): ---8<--- Virtual switches can be configured at any point in the configuration file; they allow switchd to add network interfaces of VMs to the underlying switch interfaces automatically. --->8--- This confused me, since i've been using virtual switches without switchd. I have

Re: usb disk dirty after every reboot

2016-10-16 Thread Theo de Raadt
> * When sync(2) is called. Though I am not 100% sure if we really want to do a > cache flush for every sync. Thoughts? We definately cannot it there. The system call is asyncronous, and makes no gaurantees. Furthermore note that any user can call sync(2), so unknown performance would come unde

Re: diff3: use boolean OR, not bitwise

2016-10-16 Thread Otto Moerbeek
On Sun, Oct 16, 2016 at 08:44:34AM -0600, Todd C. Miller wrote: > On Sun, 16 Oct 2016 16:06:39 +0200, Otto Moerbeek wrote: > > > On Sun, Oct 16, 2016 at 07:07:36AM -0600, Todd C. Miller wrote: > > > > > It is effectively the same in this case but using the boolean OR > > > is less surprising and

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Todd C. Miller
On Sun, 16 Oct 2016 11:47:32 +0200, Theo Buehler wrote: > Many files already include and there's a mix of hand-rolled > warning messages and there's incorrect usage warn("config: ..."). This > is a first sweep at unifying them. > > In mkheaders.c, there is an err() function, rename it to emitwar

add c11 static_assert definition to assert.h

2016-10-16 Thread Jonathan Gray
I encountered static_assert when trying to build an optional part of a newer version of Mesa with clang. Definition taken from FreeBSD. Index: sys/sys/cdefs.h === RCS file: /cvs/src/sys/sys/cdefs.h,v retrieving revision 1.39 diff -u

Re: FAQ entry for vmm

2016-10-16 Thread Josh Grosse
On Sat, Oct 15, 2016 at 05:11:49PM +0100, Edd Barrett wrote: > * attaching to a console by name would be nice touch. This works. For example, I can use: # vmctl cons i386

Re: diff3: use boolean OR, not bitwise

2016-10-16 Thread Todd C. Miller
On Sun, 16 Oct 2016 16:06:39 +0200, Otto Moerbeek wrote: > On Sun, Oct 16, 2016 at 07:07:36AM -0600, Todd C. Miller wrote: > > > It is effectively the same in this case but using the boolean OR > > is less surprising and may quiet over zealous compilers. > > Are you sure? For example, in cvs/dif

Re: diff3: use boolean OR, not bitwise

2016-10-16 Thread Otto Moerbeek
On Sun, Oct 16, 2016 at 07:07:36AM -0600, Todd C. Miller wrote: > It is effectively the same in this case but using the boolean OR > is less surprising and may quiet over zealous compilers. Are you sure? For example, in cvs/diff3.c t2 is not always initialized with this change. -Otto >

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Martin Natano
On Sun, Oct 16, 2016 at 01:35:34PM +0200, Theo Buehler wrote: > On Sun, Oct 16, 2016 at 11:47:32AM +0200, Theo Buehler wrote: > > Many files already include and there's a mix of hand-rolled > > warning messages and there's incorrect usage warn("config: ..."). This > > is a first sweep at unifying

diff3: use boolean OR, not bitwise

2016-10-16 Thread Todd C. Miller
It is effectively the same in this case but using the boolean OR is less surprising and may quiet over zealous compilers. OK? - todd Index: cvs/diff3.c === RCS file: /cvs/src/usr.bin/cvs/diff3.c,v retrieving revision 1.61 diff -u -

Re: /usr/src beforeinstall: make prereq as BUILDUSER

2016-10-16 Thread Theo Buehler
New version that cleans up all of /usr/obj on amd64, i386 and macppc (including the machine@ symlinks). I verified that it survives make build and make release on these three architectures. The previous diff had a bug that made make 'includes error' out on archs different from amd64 and i386 becau

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Theo Buehler
On Sun, Oct 16, 2016 at 11:47:32AM +0200, Theo Buehler wrote: > Many files already include and there's a mix of hand-rolled > warning messages and there's incorrect usage warn("config: ..."). This > is a first sweep at unifying them. > > In mkheaders.c, there is an err() function, rename it to em

malloc canaries for > page sized objects

2016-10-16 Thread Otto Moerbeek
Hi, this diff is somewhat big since I decided to rewrite wrterror() to be able to get better error messages. Please review and test this with malloc option C (and other flags). An example run: a.out(85360) in free(): chunk canary corrupted 0x13c68f696000 0x18a92@0x18a88 This means I overwrote a

Re: config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Jeremie Courreges-Anglas
Theo Buehler writes: > Many files already include and there's a mix of hand-rolled > warning messages and there's incorrect usage warn("config: ..."). This > is a first sweep at unifying them. > > In mkheaders.c, there is an err() function, rename it to emitwarn() > since there are emit* functio

make obj in config

2016-10-16 Thread Martin Natano
We don't need to re-run 'make obj' when obj exists. Ok? natano Index: main.c === RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving revision 1.55 diff -u -p -r1.55 main.c --- main.c 16 Oct 2016 09:36:46 - 1.55 +++

config(8): use {err,warn}{,x} instead of fprintf(stderr, ...)

2016-10-16 Thread Theo Buehler
Many files already include and there's a mix of hand-rolled warning messages and there's incorrect usage warn("config: ..."). This is a first sweep at unifying them. In mkheaders.c, there is an err() function, rename it to emitwarn() since there are emit* functions already and it is non-fatal. I

remove config -g option

2016-10-16 Thread Martin Natano
The -g option is obsolete (and undocumented) at least since the initial import in '95. Your finger memory should be updated by now. Ok to remove? natano Index: main.c === RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving revis

config(8): printf attributes for custom error functions

2016-10-16 Thread Theo Buehler
Add format attributes for the printf-like custom error functions in util.c. ok? Index: config.h === RCS file: /var/cvs/src/usr.sbin/config/config.h,v retrieving revision 1.28 diff -u -p -r1.28 config.h --- config.h16 Jan 2015 06:

config(8) getopt cleanup

2016-10-16 Thread Martin Natano
The declarations for optarg and optind are pulled in from . No need to declare them again. Ok? natano Index: main.c === RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving revision 1.53 diff -u -p -r1.53 main.c --- main.c 16

ffs/msdosfs: Flush cache when updating mount to R/O

2016-10-16 Thread Stefan Fritsch
On Sun, 16 Oct 2016, Stefan Fritsch wrote: > > * When a R/W mount is updated to R/O. I will send patches for this in a > > separate mail. Part 2: Use it msdosfs & ffs: flush cache if updating mount to r/o Other filesystems can be changed later. ok? diff --git sys/msdosfs/msdosfs_vfsops.c sys

Add ioctl for disk cache flush

2016-10-16 Thread Stefan Fritsch
On Sun, 16 Oct 2016, Stefan Fritsch wrote: > * When a R/W mount is updated to R/O. I will send patches for this in a > separate mail. Part 1: Add an ioctl: add DIOCCACHESYNC Add an ioctl to tell storage devices to flush their internal caches. Ported from netbsd by pedro@ OK? diff --git s

Re: usb disk dirty after every reboot

2016-10-16 Thread Stefan Fritsch
[moving to tech@] On Tuesday, 20 September 2016 08:03:32 CEST Stefan Fritsch wrote: > On Tue, 20 Sep 2016, Darren Tucker wrote: > > On Tue, Sep 20, 2016 at 1:43 AM, Jan Stary wrote: > > > This is current/i386 on an ALIX.1E (demsg below). > > > I have an USB disk connected for /backup. > > > > >