CVS: cvs.openbsd.org: src

2018-07-12 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2018/07/12 23:56:57

Modified files:
sys/lib/libkern/arch/amd64: ffs.S strchr.S strlen.S 

Log message:
Use _ALIGN_TRAPS instead of _ALIGN_TEXT where nops aren't needed.

ok deraadt@



CVS: cvs.openbsd.org: www

2018-07-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2018/07/12 23:49:07

Modified files:
faq: current.html 

Log message:
wording tweak from jmc



CVS: cvs.openbsd.org: src

2018-07-12 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/07/12 23:25:29

Modified files:
usr.sbin/rad   : rad.conf.5 

Log message:
various tweaks; ok florian



CVS: cvs.openbsd.org: src

2018-07-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2018/07/12 23:25:24

Modified files:
sys/arch/amd64/conf: GENERIC.MP 

Log message:
zap some garbage that snuck in.

spotted by kevlo



CVS: cvs.openbsd.org: src

2018-07-12 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/07/12 23:22:34

Modified files:
sbin/ifconfig  : ifconfig.8 

Log message:
- differentiate between join and nwid
- remove some duplication between them
- document -join
- sort

ok phessler



CVS: cvs.openbsd.org: src

2018-07-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2018/07/12 20:13:50

Modified files:
regress/usr.bin/ssh: allow-deny-users.sh 

Log message:
make this use ssh_proxy rather than starting/stopping a daemon for
each testcase



CVS: cvs.openbsd.org: src

2018-07-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2018/07/12 20:13:19

Modified files:
regress/usr.bin/ssh/unittests/sshkey: test_sshkey.c 

Log message:
fix leaks in unit test; with this, all unit tests are leak free
(as far as valgrind can spot anyway)



Re: CVS: cvs.openbsd.org: src

2018-07-12 Thread Stuart Henderson
On 2018/07/12 14:42, Philip Guenther wrote:
> On Thu, Jul 12, 2018 at 2:30 PM Alexandr Nedvedicky 
> wrote:
> 
> > CVSROOT:/cvs
> > Module name:src
> > Changes by: sas...@cvs.openbsd.org  2018/07/12 08:28:08
> >
> > Modified files:
> > sys/net: pf.c
> >
> > Log message:
> 
>  
> 
> We've corrected the commit message to this:

Oh, I bet that's why cvsync had issues...

> 
> trade few 'goto unlock: for 'break' in pf_test()
> 
> OK mpi@, OK henning@, OK jca@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/07/12 16:09:04

Modified files:
sys/arch/amd64/conf: GENERIC.MP 

Log message:
we will be toggling witness on/off a few times.  when it is on, it raises
awareness of problems.  when it is off, development cycles are faster.
let's do the faster cycle for a little while.
discussion with naddy



CVS: cvs.openbsd.org: src

2018-07-12 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/07/12 16:07:57

Modified files:
distrib/sets/lists/base: mi 
distrib/sets/lists/man: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2018-07-12 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/07/12 15:45:37

Modified files:
usr.sbin/bgpctl: bgpctl.c 
usr.sbin/bgpd  : kroute.c bgpd.h 

Log message:
store and print the rdomain of the interfaces we see.
ok phessler@ henning@



Re: CVS: cvs.openbsd.org: src

2018-07-12 Thread Paul Irofti
> Because you can tuna meltover, but you can't tune a fish.
> (hat tip to the author of the tunefs(8) manpage.)

And to REO Speedwagon!



CVS: cvs.openbsd.org: src

2018-07-12 Thread Henning Brauer
CVSROOT:/cvs
Module name:src
Changes by: henn...@cvs.openbsd.org 2018/07/12 13:31:05

Modified files:
usr.sbin/ntpd  : ntp.c 

Log message:
if we couldn't update the clock for ~1h due to lack of data from peers and
sensors, mark us unsynced again. ok reyk krw, pt out / discussion / help naddy



CVS: cvs.openbsd.org: src

2018-07-12 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/07/12 12:45:13

Modified files:
usr.sbin/ospf6d: ospf6d.conf.5 

Log message:
missing .Ek;



CVS: cvs.openbsd.org: src

2018-07-12 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2018/07/12 10:59:59

Modified files:
sbin/disklabel : editor.c 

Log message:
Cleanup and clarify getuint64() by using the
same functions as auto-allocation. parse_sizespec()
and apply_unit(). No intentional functional
change.

Looked good to tb@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2018/07/12 10:53:09

Modified files:
sbin/disklabel : editor.c 

Log message:
Cleanup and clarify the has_overlap() logic so it can be read by
normal people and is more efficient to boot.

The only intentional functional change was to use mergesort()
instead of heapsort() so that partitions with the same offset
retain their order in the emitted verbiage.

Looked good to tb@, ok kn@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 10:07:35

Modified files:
sys/net: route.h 
sys/netinet6   : nd6_nbr.c 

Log message:
Introduce RTM_CHGADDRATTR to inform userland on the route socket when
an attribute of an address is changed.
For now it's used when IPv6 duplicate address detection finishes.

With this slaacd(8) can find out if a configured address is not
duplicated without the need to poll.

OK phessler, benno, claudio



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 10:08:02

Modified files:
sbin/route : route.c 

Log message:
RTM_CHGADDRATTR for route monitor
OK phessler, benno, claudio



CVS: cvs.openbsd.org: src

2018-07-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/07/12 09:51:50

Modified files:
sys/netinet: ip_ah.c ip_esp.c ip_ipcomp.c ip_ipsp.h 
 ip_output.c ipsec_output.c 
sys/netinet6   : ip6_output.c 

Log message:
Introduce ipsec_output_cb() to merge duplicate code and account for
dropped packets in the output path.

While here fix a memory leak when compression is not needed w/ IPcomp.

ok markus@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/07/12 09:48:02

Modified files:
sys/arch/i386/i386: vmm.c 
sys/arch/i386/include: vmmvar.h 

Log message:
unbreak i386 build, thanks to pd@ for noticing. Same diff as I committed
earlier for amd64



CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 09:16:03

Modified files:
lib/libXinerama: ChangeLog aclocal.m4 config.h.in configure 
 configure.ac 
lib/libXinerama/src: Xinerama.c 

Log message:
Update to libXinerama 1.1.4



CVS: cvs.openbsd.org: src

2018-07-12 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/07/12 09:13:33

Modified files:
sys/arch/amd64/include: vmmvar.h 

Log message:
zap an extra newline



CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 09:10:29

Modified files:
lib/libXScrnSaver: ChangeLog aclocal.m4 configure configure.ac 
lib/libXScrnSaver/man: Xss.man 
lib/libXScrnSaver/src: XScrnSaver.c 

Log message:
Update to libXScrnSaver 1.2.3



CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 09:00:43

Modified files:
driver/xf86-video-rendition: ChangeLog aclocal.m4 configure 
 configure.ac 
driver/xf86-video-rendition/src: rendition.c 

Log message:
Update to xf86-video-rendition 4.2.7



CVS: cvs.openbsd.org: src

2018-07-12 Thread Reyk Floeter
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/07/12 08:53:37

Modified files:
usr.sbin/vmctl : main.c 

Log message:
The vmctl start -I option was changed to -t.

I committed the manpage but accidentally forgot the main.c part.

OK ccardenas@



CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 08:52:23

Modified files:
driver/xf86-input-synaptics: ChangeLog aclocal.m4 compile 
 configure configure.ac 
driver/xf86-input-synaptics/src: eventcomm.c synaptics.c 

Log message:
Update to xf86-input-synaptics 1.9.1



CVS: cvs.openbsd.org: src

2018-07-12 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/07/12 08:46:45

Modified files:
usr.sbin/ldomctl: mdesc.c mdesc.h 

Log message:
Add a function to delete all nodes with a specific name.
Add a function to determine the size of a machine description.



CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 08:44:41

Modified files:
driver/xf86-input-mouse: ChangeLog aclocal.m4 compile configure 
 configure.ac 
driver/xf86-input-mouse/src: bsd_mouse.c mouse.c 

Log message:
Update to xf86-input-mouse 1.9.3



Re: CVS: cvs.openbsd.org: src

2018-07-12 Thread Philip Guenther
On Thu, Jul 12, 2018 at 2:30 PM Alexandr Nedvedicky 
wrote:

> CVSROOT:/cvs
> Module name:src
> Changes by: sas...@cvs.openbsd.org  2018/07/12 08:28:08
>
> Modified files:
> sys/net: pf.c
>
> Log message:

 

We've corrected the commit message to this:

trade few 'goto unlock: for 'break' in pf_test()

OK mpi@, OK henning@, OK jca@


CVS: cvs.openbsd.org: xenocara

2018-07-12 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2018/07/12 08:38:26

Modified files:
app/xkbcomp: ChangeLog compile configure configure.ac 
 keycodes.c 

Log message:
Update to xkbcomp 1.4.2



Re: CVS: cvs.openbsd.org: src

2018-07-12 Thread Philip Guenther
On Thu, Jul 12, 2018 at 2:11 PM Philip Guenther 
wrote:

> CVSROOT:/cvs
> Module name:src
> Changes by: guent...@cvs.openbsd.org2018/07/12 08:11:11
>
> Modified files:
> sys/arch/amd64/amd64: cpu.c identcpu.c locore.S machdep.c pmap.c
>   vector.S
> sys/arch/amd64/conf: ld.script
> sys/arch/amd64/include: asm.h codepatch.h
>
> Log message:
> Reorganize the Meltdown entry and exit trampolines for syscall and
> traps so that the "mov %rax,%cr3" is followed by an infinite loop
> which is avoided because the mapping of the code being executed is
> changed.  This means the sysretq/iretq isn't even present in that
> flow of instructions in the kernel mapping, so userspace code can't
> be speculatively reached on the kernel mapping and totally eliminates
> the conditional jump over the the %cr3 change that supported CPUs
> without the Meltdown vulnerability.  The return paths were probably
> vulnerable to Spectre v1 (and v1.1/1.2) style attacks, speculatively
> executing user code post-system-call with the kernel mappings, thus
> creating cache/TLB/etc side-effects.


Damnit, I left out that since this evolves the _Meltdown_ fix with mapping
_over_ the trampoline, we're calling this the Tuna Meltover.

Because you can tuna meltover, but you can't tune a fish.
(hat tip to the author of the tunefs(8) manpage.)


Philip Guenther


CVS: cvs.openbsd.org: src

2018-07-12 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2018/07/12 08:24:54

Modified files:
sys/arch/amd64/amd64: vector.S 

Log message:
Unbreak the nmi handler (again): I placed INTR_CLEAR_GPRS in the wrong
place and GS.base was horked on return.  Also, the frame passed to ddb
didn't have the %rbp<-->tf_err swap, which would have confused backtraces.
Now if we can just come up with a way to automate testing the NMI handler
with qemu...



CVS: cvs.openbsd.org: src

2018-07-12 Thread Alexandr Nedvedicky
CVSROOT:/cvs
Module name:src
Changes by: sas...@cvs.openbsd.org  2018/07/12 08:22:54

Modified files:
sys/sys: queue.h 

Log message:
- introducing _Q_INVALID to sys/queue.h

OK @bluhm, OK @otto, OK @guenther



CVS: cvs.openbsd.org: src

2018-07-12 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2018/07/12 08:11:11

Modified files:
sys/arch/amd64/amd64: cpu.c identcpu.c locore.S machdep.c pmap.c 
  vector.S 
sys/arch/amd64/conf: ld.script 
sys/arch/amd64/include: asm.h codepatch.h 

Log message:
Reorganize the Meltdown entry and exit trampolines for syscall and
traps so that the "mov %rax,%cr3" is followed by an infinite loop
which is avoided because the mapping of the code being executed is
changed.  This means the sysretq/iretq isn't even present in that
flow of instructions in the kernel mapping, so userspace code can't
be speculatively reached on the kernel mapping and totally eliminates
the conditional jump over the the %cr3 change that supported CPUs
without the Meltdown vulnerability.  The return paths were probably
vulnerable to Spectre v1 (and v1.1/1.2) style attacks, speculatively
executing user code post-system-call with the kernel mappings, thus
creating cache/TLB/etc side-effects.

Would like to apply this technique to the interrupt stubs too, but
I'm hitting a bug in clang's assembler which misaligns the code and
symbols.

While here, when on a CPU not vulnerable to Meltdown, codepatch out
the unnecessary bits in cpu_switchto().

Inspiration from sf@, refined over dinner with theo
ok mlarkin@ deraadt@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2018/07/12 08:06:39

Modified files:
regress/usr.bin/sed: sedtest.expected 

Log message:
fix Test 7.1 after main.c rev. 1.37;
breaking the output lines earlier with the 'l' command is intentional



CVS: cvs.openbsd.org: src

2018-07-12 Thread Remi Locherer
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/07/12 07:45:03

Modified files:
usr.sbin/ospf6ctl: ospf6ctl.c 
usr.sbin/ospf6d: interface.c kroute.c ospf6d.c ospf6d.conf.5 
 ospf6d.h ospfe.c parse.y printconf.c rde.c 

Log message:
Add support for rdomains.

small quirk from tb@
ok phessler@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Frederic Cambus
CVSROOT:/cvs
Module name:src
Changes by: fcam...@cvs.openbsd.org 2018/07/12 06:47:57

Modified files:
sys/arch/amd64/amd64: efifb.c 

Log message:
Remove cases for 1-bit and 4-bit color depths in efifb_ioctl(), as we
basically can't run in those modes.

OK kettenis@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Frederic Cambus
CVSROOT:/cvs
Module name:src
Changes by: fcam...@cvs.openbsd.org 2018/07/12 06:46:00

Modified files:
sys/arch/amd64/conf: files.amd64 

Log message:
Stop building rasops4 on amd64.

It was pulled in for efifb, but it is extremely unlikely an EFI system
supporting only 4-bit color depth (16 colors) exists. Even if it existed
though, on SMALL_KERNEL rasops4_putchar() simply returns EAGAIN so it
would not be possible to install the system.

For the record, we do not build rasops4 on i386 or on any of our other
platforms either.

OK kettenis@, mpi@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 06:38:56

Modified files:
usr.bin/mg : line.c 

Log message:
Use (mostly) the same capitalisation in the replacement string as in
the replaced string:

replacing foo with bar turns

foo
Foo
FOO

into

bar
Bar
BAR

OK phessler, benno



CVS: cvs.openbsd.org: www

2018-07-12 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:www
Changes by: be...@cvs.openbsd.org   2018/07/12 06:38:49

Modified files:
faq: current.html 

Log message:
sprinkle some  and link to sysmerge. ok tb@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2018/07/12 06:20:11

Modified files:
regress/sys/kern/unveil: syscalls.c 

Log message:
symlinks make my cry.. thanks robert.. don't you care about my feelings?



CVS: cvs.openbsd.org: src

2018-07-12 Thread Remi Locherer
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/07/12 06:19:05

Modified files:
usr.sbin/ospf6d: kroute.c ospf6d.c ospf6d.conf.5 ospf6d.h 
 ospfe.c parse.y printconf.c rde.c 

Log message:
With the "depend on" option routes are sent out with a metric of 65535 if
the referenced interface is down or in state backup. This is especially
useful on a carp cluster to ensure all traffic goes to the carp master.

ok friehm@ jca@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Reyk Floeter
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/07/12 06:04:49

Modified files:
usr.sbin/vmd   : parse.y vm.conf.5 vmd.c vmd.h vmm.c 
usr.sbin/vmctl : main.c vmctl.8 vmctl.c vmctl.h 

Log message:
Allow to use configured/running VMs as templates for other VM instances.

This introduces new grammar and the -t optional in vmctl start.

(For now, only root can create VM instances; but it is planned to allow
users to create their own VMs based on permissions and quota.)

OK ccardenas@ mlarkin@ jmc@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2018/07/12 05:42:33

Modified files:
regress/sys/kern/unveil: syscalls.c 

Log message:
Add regress test for realpath and modify behavior appropriately



CVS: cvs.openbsd.org: src

2018-07-12 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/07/12 04:16:41

Modified files:
sys/arch/amd64/amd64: vmm.c 

Log message:
zap a blank line



CVS: cvs.openbsd.org: src

2018-07-12 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/07/12 04:15:44

Modified files:
sys/arch/amd64/amd64: vmm.c 
sys/arch/amd64/include: vmmvar.h 
usr.sbin/vmd   : i8253.c i8259.c mc146818.c ns8250.c ns8250.h 
 pci.c vm.c vmm.h 

Log message:
vmm(8)/vmm(4): send a copy of the guest register state to vmd on exit,
avoiding multiple readregs ioctls back to vmm in case register content
is needed subsequently.

ok phessler



CVS: cvs.openbsd.org: www

2018-07-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2018/07/12 02:42:03

Modified files:
faq: current.html 

Log message:
whitespace



CVS: cvs.openbsd.org: www

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:www
Changes by: flor...@cvs.openbsd.org 2018/07/12 02:39:31

Modified files:
faq: current.html 

Log message:
explain what is going on when sysmerge complains about _rad user/group



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 02:20:36

Modified files:
etc: Makefile rc rc.conf 
Added files:
etc/rc.d   : rad 

Log message:
rc(8) infrastructure for rad



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 02:19:00

Modified files:
usr.sbin   : Makefile 

Log message:
hook up rad(8) and ractl(8) to the build



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 02:18:10

Modified files:
usr.sbin/rad   : rad.h 

Log message:
use _rad user



CVS: cvs.openbsd.org: src

2018-07-12 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2018/07/12 02:17:27

Modified files:
etc: group master.passwd 

Log message:
Add _rad user and group for rad(8).
This recycles the _btd uid/gid that have been removed in 2013.
Discussed in the hackroom.



CVS: cvs.openbsd.org: src

2018-07-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/07/12 01:58:23

Modified files:
usr.sbin/usbdevs: usbdevs.8 usbdevs.c 

Log message:
Instead of having a button for printing the driver(s) attached to a USB
device, do it when invoked with '-v'.

While here recycle '-d' to specify a specific device node, like pcidump(8)
does.

ok jca@, sthen@



CVS: cvs.openbsd.org: src

2018-07-12 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2018/07/12 00:22:20

Modified files:
usr.sbin/pkg_add: pkg_add.1 

Log message:
synch documentation with reality, noticed by landry@