CVS: cvs.openbsd.org: src

2017-09-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/09/20 05:21:58

Modified files:
sys/arch/armv7/imx: imxocotp.c 

Log message:
Raise match priority such that imxocotp(4) wins over syscon(4).

ok patrick@



CVS: cvs.openbsd.org: src

2017-09-20 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/09/20 04:03:34

Modified files:
usr.bin/file   : magic.5 

Log message:
add missing types; from klemens nanni
ok nicm



CVS: cvs.openbsd.org: src

2017-09-19 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/09/19 23:19:00

Modified files:
usr.bin/ssh: mux.c 

Log message:
Use strsignal in debug message instead of casting for the benefit of
portable where sig_atomic_t might not be int.  "much nicer" deraadt@



CVS: cvs.openbsd.org: src

2017-09-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2017/09/19 23:08:11

Modified files:
usr.sbin/lpr/lpd: printjob.c 

Log message:
Avoid overflow/truncation during string->integer converion by eliminating
the 'int' temporary variable.

problem reported by Jacob Zimmermann (jacobz (at) senseofsecurity.com.au)
ok deraadt@



CVS: cvs.openbsd.org: src

2017-09-19 Thread Jasper Lievisse Adriaanse
CVSROOT:/cvs
Module name:src
Changes by: jas...@cvs.openbsd.org  2017/09/19 13:23:57

Modified files:
distrib/sparc64/ramdisk: Makefile 
distrib/sparc64/ramdiskB: Makefile 

Log message:
remove unused GZIPEXT



CVS: cvs.openbsd.org: src

2017-09-19 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/09/19 09:39:23

Modified files:
sys/arch/arm64/conf: GENERIC RAMDISK 

Log message:
Enable syscon(4).



CVS: cvs.openbsd.org: src

2017-09-19 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/09/19 09:37:47

Modified files:
sys/dev/fdt: syscon.c 

Log message:
Add support for being a regmap provider in syscon(4).  So far the driver
supports being used as a regmap client to reset or power down a machine,
so this change implements the other side where we provide the registers
to write into.

ok kettenis@



CVS: cvs.openbsd.org: src

2017-09-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/19 07:09:15

Modified files:
sbin/dhclient  : bpf.c dhclient.c 

Log message:
Make send_packet() usage consistent. i.e. don't exit
if send_packet(DISCOVER) fails.

Distinguish between writev() and sendmsg() errors in
send_packet() log messages.

Check for short writes no matter how the packet is
output. Return failure in this occurs. Check results
of all send_packet() calls.

If send_packet() fails, don't log that the DHCP message
was sent.



CVS: cvs.openbsd.org: src

2017-09-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/19 06:33:52

Modified files:
sbin/dhclient  : dispatch.c 

Log message:
flush_unpriv_ibuf() is now used only once so no
need to complicate things by passing it a string
identifying where it was called. Tweak log
verbiage.



CVS: cvs.openbsd.org: src

2017-09-19 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2017/09/19 06:10:30

Modified files:
usr.bin/ssh: channels.c 

Log message:
Use explicit_bzero() instead of bzero() before free() to prevent
the compiler from optimizing away the bzero() call.  OK djm@



CVS: cvs.openbsd.org: src

2017-09-19 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/09/19 02:28:58

Modified files:
usr.bin/ctfconv: ctfconv.c 
usr.bin/ctfdump: ctfdump.c 

Log message:
fix fd leaks in error paths
ok mpi@



CVS: cvs.openbsd.org: src

2017-09-19 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2017/09/19 00:22:30

Modified files:
usr.sbin/vmd   : vm.c 

Log message:
Clarify a wrong conditional, found by jsg.

ok jsg



CVS: cvs.openbsd.org: src

2017-09-18 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/18 22:24:22

Modified files:
usr.bin/ssh: clientloop.c 

Log message:
fix use-after-free in ~^Z escape handler path, introduced in channels.c
refactor; spotted by millert@ "makes sense" deraadt@



CVS: cvs.openbsd.org: src

2017-09-18 Thread Jasper Lievisse Adriaanse
CVSROOT:/cvs
Module name:src
Changes by: jas...@cvs.openbsd.org  2017/09/18 14:13:53

Modified files:
distrib/alpha/bsd.rd: Makefile 
distrib/alpha/common: Makefile.inc 
distrib/hppa/ramdisk: Makefile 
distrib/ramdisk: Makefile 
distrib/sparc64/bsd.rd: Makefile 
distrib/sparc64/ramdisk: Makefile 
distrib/sparc64/ramdiskB: Makefile 

Log message:
drop ${GZIPCMD} and just use 'gzip'



CVS: cvs.openbsd.org: src

2017-09-18 Thread Jasper Lievisse Adriaanse
CVSROOT:/cvs
Module name:src
Changes by: jas...@cvs.openbsd.org  2017/09/18 14:09:34

Modified files:
distrib/alpha/bsd.rd: Makefile 
distrib/alpha/common: Makefile.inc 
distrib/alpha/inst-common: Makefile.inc 
distrib/hppa/ramdisk: Makefile 
distrib/sparc64/bsd.rd: Makefile 

Log message:
drop ${STRIP}, it's just 'strip'

ok deraadt@



CVS: cvs.openbsd.org: src

2017-09-18 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2017/09/18 13:45:52

Modified files:
share/man/man4 : hyperv.4 

Log message:
Mention that Generation 2 Virtual Machines are currently not supported



CVS: cvs.openbsd.org: src

2017-09-18 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2017/09/18 09:57:02

Modified files:
lib/libc/gen   : directory.3 

Log message:
Document readdir_r() return value and update style of the example
code.  Adapted from a diff by Ross L Richardson.



CVS: cvs.openbsd.org: src

2017-09-18 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/18 09:36:47

Modified files:
regress/usr.sbin/relayd: args-http-chunked-callback.pl 

Log message:
Avoid race in relayd test that uses an invalid chunked header.  Wait
until server has started, then expect error message in server log.



CVS: cvs.openbsd.org: src

2017-09-18 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/09/18 08:10:11

Modified files:
usr.sbin/pkg_add: package.5 pkg_create.1 pkg_info.1 

Log message:
document @version



CVS: cvs.openbsd.org: src

2017-09-18 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/09/18 07:40:32

Modified files:
usr.sbin/pkg_add/OpenBSD: PkgCreate.pm 

Log message:
better diagnostics



CVS: cvs.openbsd.org: src

2017-09-18 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/09/18 07:01:10

Modified files:
usr.sbin/pkg_add/OpenBSD: PkgCreate.pm Signature.pm 

Log message:
-V option for pkg_create and incorporate version into signatures.



CVS: cvs.openbsd.org: src

2017-09-18 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/09/18 06:03:24

Modified files:
usr.bin/ssh: mux.c 

Log message:
Prevent type mismatch warning in debug on platforms where sig_atomic_t
!= int.  ok djm@



CVS: cvs.openbsd.org: src

2017-09-18 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/09/18 03:41:52

Modified files:
usr.bin/ssh: servconf.c 

Log message:
Add braces missing after channels refactor.  ok markus@



CVS: cvs.openbsd.org: src

2017-09-18 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/18 01:42:52

Modified files:
sbin/isakmpd   : exchange.c exchange.h 

Log message:
Check for failures of exchange_establish_p{1,2}() and call the given
`finalize' function with the `fail' argument when this happen.

Introduce some sanity checks in exchange_free() to be able to call if
even if the data structure isn't completely initialized.

Plug memory leaks when exchange_establish() fails.  While here fix a
double free in one of the error paths.

Based on a diff from hshoexer@, ok stsp@, markus@



CVS: cvs.openbsd.org: src

2017-09-17 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/17 18:05:15

Modified files:
usr.sbin/vmd   : i8259.c 

Log message:
protect i8259 state with a mutex.

this allows interrupts to be safely posted by multiple threads.

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/17 18:00:57

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
Missed a log_warnx(). Nuke an extraneous space.



CVS: cvs.openbsd.org: src

2017-09-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/17 17:56:03

Modified files:
regress/usr.sbin/syslogd: Makefile args-fdexhaustion-config.pl 
  args-fdexhaustion-sighup.pl 
  args-fdexhaustion-tcp.pl 

Log message:
If file descriptors are exhausted during initialization, we see
better log messages on the console now.



CVS: cvs.openbsd.org: src

2017-09-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/17 17:49:14

Modified files:
usr.sbin/syslogd: syslogd.c 

Log message:
syslogd has special code to report errors before it has been
initialized.  For every message it did reopen the console with file
descriptor passing from the privsep parent.  Now preopen the console,
so writing the message out works in more cases.  If the console has
been revoked, a reopen via privsep and write again is tried anyway.
OK brynet@ deraadt@ jca@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Pratik Vyas
CVSROOT:/cvs
Module name:src
Changes by: p...@cvs.openbsd.org2017/09/17 17:07:56

Modified files:
usr.sbin/vmd   : pci.c pci.h virtio.c virtio.h vm.c 

Log message:
vmd: send/recv pci config space instead of recreating pci devices on receive

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Pratik Vyas
CVSROOT:/cvs
Module name:src
Changes by: p...@cvs.openbsd.org2017/09/17 16:47:03

Modified files:
usr.sbin/vmd   : vm.c 

Log message:
vmd: re add rtc.per and rtc.sec evtimers on receive

This was missed in receive. mc146818_start is already defined. This fixes rtc
time resync on receive.

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/17 16:25:22

Modified files:
usr.sbin/syslogd: syslogd.c 

Log message:
When writing local output, syslogd ignores EAGAIN.  Unfortunately
it has closed the file descriptor before checking the errno.  So
f_file contained a bad file descriptor that could be reused at the
next open.  Keep the file open if errno is EAGAIN.  Move the close(2)
down where the old file descriptor in f_file is overwritten in all
cases.
OK deraadt@ jca@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/17 16:14:53

Modified files:
sbin/dhclient  : parse.c 

Log message:
Oops. Missed a file.

Create global 'log_procname' and set it to '' or
' [priv]' as appropriate for the process doing the
setting. Use it as the prefix in all log_*() output. Makes
tracking messages for an interface or a process much easier.



CVS: cvs.openbsd.org: src

2017-09-17 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/17 15:20:23

Modified files:
sbin/dhclient  : bpf.c clparse.c dhclient.c dhcpd.h dispatch.c 
 kroute.c options.c packet.c privsep.c 

Log message:
Create global 'log_procname' and set it to '' or
' [priv]' as appropriate for the process doing the
setting. Use it as the prefix in all log_*() output. Makes
tracking messages for an interface or a process much easier.



CVS: cvs.openbsd.org: src

2017-09-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/09/17 10:34:03

Modified files:
distrib/ramdisk: Makefile 

Log message:
use strip directly.  The layers if macros are not actually helpful.



CVS: cvs.openbsd.org: src

2017-09-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/09/17 10:33:08

Modified files:
distrib/alpha/bsd.rd: Makefile 
distrib/alpha/common: Makefile.inc 
distrib/alpha/inst-common: Makefile.inc 

Log message:
Some further shrinking, but obviously not enough.  Something unknown
caused bloat about a month ago (and it wasn't purely the ctf additions
since those are being stripped).  Maybe the compiler generates
different code when stronger debugging information is requested?



CVS: cvs.openbsd.org: src

2017-09-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/09/17 10:31:59

Modified files:
distrib/alpha  : Makefile 

Log message:
Give up on alpha floppies for now



CVS: cvs.openbsd.org: src

2017-09-17 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/17 03:32:07

Modified files:
share/man/man4/man4.amd64: mem.4 
share/man/man4/man4.i386: mem.4 

Log message:
link to mtrr(4) because the mem(4) driver supports ioctl(2)
in addition to read(2) and write(2) and because
that ioctl(2) support is documented in mtrr(4);
OK jmc@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2017/09/17 00:38:03

Modified files:
lib/libc/gen   : setprogname.c 

Log message:
__progname has type char *, we cannot change its type without causing
havoc all over the place. So add some casts to silence the compiler.
ok deraadt@ guenther@



CVS: cvs.openbsd.org: src

2017-09-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/09/17 00:10:53

Modified files:
sys/arch/octeon/octeon: machdep.c 

Log message:
Do not print "cpuX launched" any longer. This reduces dmesg spam
on multicore systems.



CVS: cvs.openbsd.org: src

2017-09-16 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/09/16 06:04:13

Modified files:
usr.sbin/pkg_add/OpenBSD: LibSpec.pm SharedLibs.pm 

Log message:
we already have a comparison function for libobjects, so move it up to
the best class, and sort bad libraries in dependency solving accordingly



CVS: cvs.openbsd.org: src

2017-09-16 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/09/16 05:36:25

Modified files:
usr.sbin/pkg_add/OpenBSD: PackingElement.pm PackingList.pm 

Log message:
recognize @version, to be used for a system-wide version marker



CVS: cvs.openbsd.org: src

2017-09-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/09/16 02:07:15

Modified files:
libexec/login_yubikey: yubikey.c 

Log message:
Make sure to freezero() the wide-character copy of the user supplied password.
While here, change the mbstowcs() error checking making it complaint with what's
documented in the manual and zap some stray whitespace.

ok benno@ tb@



CVS: cvs.openbsd.org: src

2017-09-16 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2017/09/16 01:42:34

Modified files:
bin/pax: cpio.c ftree.c pat_rep.c tables.c tar.c 

Log message:
Carefully add casts to silence clang sign-compare warnings. ok millert@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/09/15 23:04:34

Modified files:
sys/arch/mips64/mips64: fp_emulate.c 

Log message:
Make sure that `fsr' is always initialized. Non-DEBUG kernels
have not been affected.

>From miod@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2017/09/15 20:03:40

Modified files:
sys/arch/amd64/amd64: trap.c copy.S 
sys/arch/arm64/arm64: trap.c 
regress/sys/kern/ptrace: ptrace.c 

Log message:
The copyin(9) family of functions should return EFAULT for all memory
protection issues.  So make amd64 do that instead of passing through
uvm_fault()'s return value, which lead to other possible errors
(particularly EACCES) being returned to userspace.  Clean up a vestige
on arm64 too.

ok bluhn@ deraadt@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/15 13:29:28

Modified files:
sys/kern   : uipc_socket.c 

Log message:
Coverity complains that top == NULL was checked and further down
top->m_pkthdr.len was accessed without check.  See CID 1452933.
In fact top cannot be NULL there and the condition was always false.
m_getuio() did never reserve space for the header.  The correct
check is m == top to find the first mbuf.
OK visa@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/15 12:13:05

Modified files:
sys/kern   : uipc_mbuf.c 

Log message:
Coverity complained that the while loop at the end of m_adj() could
dereference m if it is NULL.  See CID 501458.
- Remove the m NULL check from the final for loop, it is not
necessary.  This cannot happen due to the length calculation.
The inconsistent code caused the coverity issue.
- Move the m = mp close to all the loops where the mbuf
chain is traversed.
- Use mp to access the m_pkthdr consistently.
- Move the next assignemnt from for (;;m = m->m_next) to the
end of the loop to make it consistent to the previous for (;;)
where the total length is calculated.
OK visa@ mpi@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/09/15 10:34:25

Modified files:
distrib/armv7/miniroot/am335x: Makefile 
distrib/armv7/ramdisk: list 

Log message:
Add dtbs the am335x_boneblack U-Boot image may use if a matching model
is found.



CVS: cvs.openbsd.org: src

2017-09-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/15 09:22:14

Modified files:
sbin/dhclient  : kroute.c privsep.c 

Log message:
Use a poll() loop when trying read the default route from
a routing socket. Fixes at least one cause of resolv.conf
confusion and possibly hanging/looping dhclient if the
RTM_GET gets lost.

Fingered by phessler@ when doing many suspend/resumes
while switching between wifi and wired interfaces.

Testing & ok phessler@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:src
Changes by: ajacou...@cvs.openbsd.org   2017/09/15 08:19:56

Modified files:
usr.bin/awk: run.c 

Log message:
Fix bitwise operations error messages; from FreeBSD

ok deraadt@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/15 08:03:14

Modified files:
regress/sys/netinet/frag: Makefile pf.conf 
regress/sys/netinet6/frag6: Makefile pf.conf 

Log message:
Clean up pf rules and states on remote machine so that they do not
interfere with later tests.



CVS: cvs.openbsd.org: src

2017-09-15 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2017/09/15 05:50:39

Modified files:
usr.sbin/smtpd : mta.c 

Log message:
move the envelope handling code to its own function to clarify the
imsg dispatch function.

ok gilles@



CVS: cvs.openbsd.org: src

2017-09-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/15 05:40:05

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
Move/add log_procinit() and setproctitle() calls so they reliably work
both early and after forking. Makes fatal[x]() messages more
informative by always including the relevant interface name. And
"[proc]" in privileged process messages.

Simplify some logic by avoiding error message construction that is
no longer required.



CVS: cvs.openbsd.org: src

2017-09-14 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/14 20:39:33

Added files:
usr.sbin/vmd   : task.c task.h 

Log message:
port taskqs to vmd for use in future work on virtio devices

these are backed by pthreads rather than kthreads and mutexes, and
only support creating a taskq serviced by a single worker thread.
task_set, task_add, and task_del all work the same though.

these are not linked into the build yet.

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-14 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2017/09/14 20:36:29

Modified files:
usr.sbin/vmd   : vmm.c 

Log message:
vmd: improve a debug message with more information



CVS: cvs.openbsd.org: src

2017-09-14 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2017/09/14 20:35:39

Modified files:
usr.sbin/vmd   : ns8250.c 

Log message:
vmd: emulate UART scratch register, seems to be required by GRUB and
doesn't seem to cause any side effects with other guest types.



CVS: cvs.openbsd.org: src

2017-09-14 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2017/09/14 20:33:34

Modified files:
sys/arch/i386/i386: trap.c 

Log message:
wrap a long line



CVS: cvs.openbsd.org: src

2017-09-14 Thread Peter Hessler
CVSROOT:/cvs
Module name:src
Changes by: phess...@cvs.openbsd.org2017/09/14 12:16:28

Modified files:
usr.sbin/bgpd  : rde.c 

Log message:
fix accounting for received prefixes per neighbor

noticed by deraadt@ and job@

OK benno@ deraadt@ job@



CVS: cvs.openbsd.org: src

2017-09-14 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2017/09/14 07:02:12

Modified files:
sbin/ifconfig  : ifconfig.8 

Log message:
clarify what inet6 autoconf does, mention and link to slaacd(8)
ok/feedback sthen@ jmc@



CVS: cvs.openbsd.org: src

2017-09-14 Thread Stuart Henderson
CVSROOT:/cvs
Module name:src
Changes by: st...@cvs.openbsd.org   2017/09/14 06:56:36

Modified files:
usr.sbin/rtadvd: rtadvd.8 
sbin/slaacd: slaacd.8 

Log message:
clarify that slaacd is a client; Xr to rtadvd. feedback/ok benno jmc



CVS: cvs.openbsd.org: src

2017-09-14 Thread Reyk Floeter
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2017/09/14 04:07:17

Modified files:
usr.sbin/vmd   : config.c vmm.c 

Log message:
spacing



CVS: cvs.openbsd.org: src

2017-09-14 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/09/14 02:59:54

Modified files:
usr.sbin/relayd: config.c 

Log message:
Differentiate between a style string not being specified and an empty
style string by including NUL in imsg and set the pointer in the struct
passed over imsg to NULL in the receiving process to be sure nothing
tries to use it.

Avoids a crash when specifying an empty style string reported by
Karl-Andre' Skevik.  ok bluhm@



CVS: cvs.openbsd.org: src

2017-09-13 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/13 22:32:21

Modified files:
usr.bin/ssh: dns.c dns.h sshconnect.c 

Log message:
Revert commitid: gJtIN6rRTS3CHy9b.

-
identify the case where SSHFP records are missing but other DNS RR
types are present and display a more useful error message for this
case; patch by Thordur Bjornsson; bz#2501; ok dtucker@
-

This caused unexpected failures when VerifyHostKeyDNS=yes, SSHFP results
are missing but the user already has the key in known_hosts

Spotted by dtucker@



CVS: cvs.openbsd.org: src

2017-09-13 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/09/13 18:10:17

Modified files:
sbin/dhclient  : bpf.c clparse.c dhclient.c dispatch.c kroute.c 
 options.c parse.c privsep.c 

Log message:
Strive to rationalize fatal[x]() usage and
verbiage.



CVS: cvs.openbsd.org: src

2017-09-13 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/09/13 14:26:26

Modified files:
sys/dev/fdt: sxitwi.c 

Log message:
Add missing pipe in sxitwi(4)'s match code to actually make
it a logical OR intead of a binary OR.

>From Artturi Alm



CVS: cvs.openbsd.org: src

2017-09-13 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/13 09:08:42

Added files:
regress/usr.sbin/syslogd: args-repeat-sighup.pl 
  args-repeat-sigterm.pl 

Log message:
Check that pending "message repeated" is printed at exit and restart.



CVS: cvs.openbsd.org: src

2017-09-13 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/13 08:58:26

Modified files:
regress/usr.bin/ssh: agent-getpeereid.sh 

Log message:
Print SKIPPED if sudo and doas configuration is missing.  Prevents
that running the regression test with wrong environment is reported
as failure.  Keep the fatal there to avoid interfering with other
setups for portable ssh.
OK dtucker@



CVS: cvs.openbsd.org: src

2017-09-13 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/09/13 08:19:57

Modified files:
share/man/man1 : clang-local.1 

Log message:
Fix typo; ok benno@ jmc@ sthen@ tb@



CVS: cvs.openbsd.org: src

2017-09-13 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2017/09/13 01:31:07

Modified files:
usr.bin/tmux   : window-copy.c 

Log message:
Remove unused (always 1) arguments from some functions, from Daniel
Mueller in GitHub issue 1073.



CVS: cvs.openbsd.org: src

2017-09-12 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/12 18:35:53

Modified files:
regress/usr.sbin/syslogd: Client.pm Makefile 
  args-client-multilisten.pl 
  args-dropped-sighup-tcp.pl 
  args-dropped-sighup-tls.pl 
  args-secure-udp.pl 
  args-server-tcp-reconnect.pl 
  args-server-tls-reconnect.pl 
  args-sighup-tcp.pl args-sighup-tls.pl 
  args-sync-tcp.pl funcs.pl 
Added files:
regress/usr.sbin/syslogd: args-hostname.pl 

Log message:
Check that the hostname added by syslogd -h in file and server log
is correct.  Use generic redo functions.  Do syntax check for all
Perl files.



CVS: cvs.openbsd.org: src

2017-09-12 Thread Jasper Lievisse Adriaanse
CVSROOT:/cvs
Module name:src
Changes by: jas...@cvs.openbsd.org  2017/09/12 13:14:35

Modified files:
sys/dev/usb: urng.c 

Log message:
- sprinkle variable name and printf tweaks
- save product type for future use



CVS: cvs.openbsd.org: src

2017-09-12 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2017/09/12 12:36:30

Modified files:
lib/libc/stdlib: malloc.c 

Log message:
mapalign returns MAP_FAILED for failuer; from George Koehler



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 12:20:32

Modified files:
usr.bin/mandoc : mdoc_validate.c 

Log message:
Do not segfault when there are two .Dt macros, the first without
an architecture argument and the second with an invalid one.
Bug found by jsg@ with afl(1).



CVS: cvs.openbsd.org: src

2017-09-12 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2017/09/12 11:11:11

Modified files:
bin/pax: cpio.c extern.h pax.h tables.c tar.c 

Log message:
there is no offical way to get the max value of time_t, but this one works
on any sensible posix system (in which time_t must be an integer type)
ok deraadt@ millert@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/12 09:24:21

Modified files:
regress/usr.sbin/syslogd: args-client-bind-port.pl 
  args-client-bind.pl 
  args-client-bind4-port.pl 
  args-client-bind4.pl 
  args-client-bind6-port.pl 
  args-client-bind6.pl 
  args-client-tcp.pl args-client-tcp4.pl 
  args-client-tcp6.pl args-client-tls.pl 
  args-client-tls4.pl 
  args-client-tls6.pl 
  args-fdexhaustion-sighup.pl 
  args-privsep-daemon.pl 
  args-privsep-foreground.pl 
  args-privsep.pl args-secure-udp.pl 
  args-selector-syslog.pl 
  args-server-tcp.pl args-server-tcp4.pl 
  args-server-tcp6.pl args-server-tls.pl 
  args-server-tls4.pl 
  args-server-tls6.pl args-socket.pl 
  args-zulu.pl 
Added files:
regress/usr.sbin/syslogd: args-send46.pl 

Log message:
Syslogd does no longer keep the *:514 UDP sockets open by default.
Adapt tests.



CVS: cvs.openbsd.org: src

2017-09-12 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/12 09:17:21

Modified files:
usr.sbin/syslogd: syslogd.c 

Log message:
In the default configuration syslogd(8) kept two *:514 UDP sockets
open.  These sockets are used for sending UDP packets if there is
a UDP loghost in syslog.conf(5).  If syslogd is started with -u,
they can receive packets, otherwise they are disabled with
shutdown(SHUT_RD).  In case syslogd does neither send nor receive,
close the sockets after reading the configuration file.  This gives
us a cleaner netstat output, and the ports are not reported by port
scanners.  This has no security implication.
OK benno@ jca@ sthen@ deraadt@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 09:06:20

Modified files:
share/man/man4 : vscsi.4 

Log message:
use .Dv for ioctl(2) request names;
from 



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 09:01:21

Modified files:
share/man/man4 : usb.4 

Log message:
use the standard .Fa idiom for ioctl(2) args, and kill .Tn



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 08:57:15

Modified files:
share/man/man4 : gpio.4 radio.4 uhid.4 

Log message:
use the standard .Fa idiom for ioctl(2) args



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 08:36:46

Modified files:
share/man/man4 : wsdisplay.4 

Log message:
minor markup corrections: Cd for options(4), Vt for data types



CVS: cvs.openbsd.org: src

2017-09-12 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/12 08:29:35

Modified files:
share/man/man4 : wsdisplay.4 

Log message:
standard .Fa markup for ioctl(2) args, and add one missing .Dv;
from 



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:43:14

Modified files:
regress/sbin/route: Makefile rttest30.ok 

Log message:
Sleep for some time to avoid race reporting a different number of reference
count.

Iterating over the routing table implies using SRP which bump the refcount
of routes for a short period of time.  Depending on how work is schedule
the second ifconfig(8) command might run before the timer dereference the
route.

Should fix races on bluhm@'s test setup.



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:32:44

Modified files:
usr.bin/nm : nm.c 

Log message:
Include room for NUL-termination when calculating the length of archive
member name.

Fix an of by one found by sthen@ with MALLOC_OPTIONS=C.

>From Matthew Martin, ok deraadt@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:27:44

Modified files:
share/man/man4 : ddb.4 options.4 

Log message:
option DDB_STRUCT is gone, 'show struct' now work in GENERIC.



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:23:42

Modified files:
sys/conf   : files 
sys/ddb: db_command.c 
sys/arch/alpha/conf: Makefile.alpha 
sys/arch/amd64/conf: Makefile.amd64 
sys/arch/arm64/conf: Makefile.arm64 
sys/arch/armv7/conf: Makefile.armv7 
sys/arch/hppa/conf: Makefile.hppa 
sys/arch/i386/conf: Makefile.i386 
sys/arch/landisk/conf: Makefile.landisk 
sys/arch/loongson/conf: Makefile.loongson 
sys/arch/luna88k/conf: Makefile.luna88k 
sys/arch/macppc/conf: Makefile.macppc 
sys/arch/octeon/conf: Makefile.octeon 
sys/arch/sgi/conf: Makefile.sgi 
sys/arch/socppc/conf: Makefile.socppc 
sys/arch/sparc64/conf: Makefile.sparc64 
Removed files:
sys/ddb: db_struct.c db_structinfo.c parse_structinfo.pl 

Log message:
Remove option DDB_STRUCTINFO.  Now that ddb(4) is CTF aware, similar
functionnalities are available in GENERIC.

ok jasper@, deraadt@, guenther@, dlg@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:20:04

Modified files:
sys/ddb: db_ctf.c 

Log message:
Skip forward declarations until ctfconv(1) properly merge them with
the corresponding struct definitions.

ok dlg@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/09/12 02:16:13

Modified files:
.  : Makefile.cross 

Log message:
Fix cross-compiling GCC toolchains on Clang archs.

ok patrick@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/12 01:55:48

Modified files:
usr.bin/ssh: channels.c 

Log message:
unused variable



CVS: cvs.openbsd.org: src

2017-09-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/12 01:32:04

Modified files:
usr.bin/ssh: channels.c 

Log message:
fix tun/tap forwarding case in previous



CVS: cvs.openbsd.org: src

2017-09-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/12 00:35:32

Modified files:
usr.bin/ssh: channels.c channels.h clientloop.c mux.c 
 nchan.c serverloop.c 

Log message:
Make remote channel ID a u_int

Previously we tracked the remote channel IDs in an int, but this is
strictly incorrect: the wire protocol uses uint32 and there is nothing
in-principle stopping a SSH implementation from sending, say, 0x.

In practice everyone numbers their channels sequentially, so this has
never been a problem.

ok markus@



CVS: cvs.openbsd.org: src

2017-09-12 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/12 00:32:08

Modified files:
usr.bin/ssh: auth-options.c auth.c channels.c channels.h 
 clientloop.c clientloop.h monitor.c 
 monitor_wrap.c mux.c nchan.c packet.c packet.h 
 servconf.c servconf.h serverloop.c serverloop.h 
 session.c session.h ssh.c sshbuf.h sshconnect.c 
 sshconnect.h sshd.c ssherr.c ssherr.h 

Log message:
refactor channels.c

Move static state to a "struct ssh_channels" that is allocated at
runtime and tracked as a member of struct ssh.

Explicitly pass "struct ssh" to all channels functions.

Replace use of the legacy packet APIs in channels.c.

Rework sshd_config PermitOpen handling: previously the configuration
parser would call directly into the channels layer. After the refactor
this is not possible, as the channels structures are allocated at
connection time and aren't available when the configuration is parsed.
The server config parser now tracks PermitOpen itself and explicitly
configures the channels code later.

ok markus@



CVS: cvs.openbsd.org: src

2017-09-11 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/11 20:58:08

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

Log message:
rename setredzone to setguardpage.

a redzone means something else on amd64, so im renaming this to
avoid confusion.



CVS: cvs.openbsd.org: src

2017-09-11 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/11 20:56:54

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

Log message:
add a guard page on the end of each threads kernel stack.

this protects the process control block. it also makes the kernel
fault hard when the guard page gets hit by the stack, allowing
debugging of the problem set of function calls at the time the
problem occurs. without this, a big stack can overwrite the pcb,
which makes the thread generate a fault when it is switched back
onto a cpu, which is way too late.

discussed with guenther@
ok deraadt@



CVS: cvs.openbsd.org: src

2017-09-11 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/09/11 20:22:16

Modified files:
lib/libc/gen   : sysctl.3 
share/man/man7 : securelevel.7 
share/man/man4/man4.alpha: mem.4 
share/man/man4/man4.amd64: mem.4 
share/man/man4/man4.hppa: mem.4 
share/man/man4/man4.i386: mem.4 
share/man/man4/man4.landisk: mem.4 
share/man/man4/man4.loongson: mem.4 
share/man/man4/man4.luna88k: mem.4 
share/man/man4/man4.macppc: mem.4 
share/man/man4/man4.socppc: mem.4 
share/man/man4/man4.sparc64: mem.4 

Log message:
Update the documentation regarding /dev/mem and /dev/kmem;
Theo already clamped down on these devices last year.
Triggered by a question from Nan Xiao .
OK deraadt@



CVS: cvs.openbsd.org: src

2017-09-11 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/11 17:32:34

Modified files:
usr.sbin/vmd   : vm.c vmd.h 

Log message:
add functions to provide direct access to guest memory as vmd addresses

iovec_mem() populates an iovec array based on guest physical
addresses. this allows the use of things like readv and writev for
moving data between the guest and a disk image file without having
to bounce the memory.

vaddr_mem() provides a vmd usable pointer based on a guests physical
address. this makes it possible to directly reference things like
virtio rings without having to bounce that memory either. however,
it assumes that a contiguous range of guest physical memory will
sit in a single vm memory range. mlarkin@ says this is right.

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-11 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/09/11 17:25:05

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

Log message:
bring SET, CLR, and ISSET macros in

they make bit fiddling easier to read in later diffs.

ok mlarkin@



CVS: cvs.openbsd.org: src

2017-09-11 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2017/09/11 14:11:45

Modified files:
usr.bin/tmux   : alerts.c 

Log message:
Check event is initialized before delete; fixes crash reported by
Michael Nickerson in GitHub issue 1068.



CVS: cvs.openbsd.org: src

2017-09-11 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2017/09/11 12:32:31

Modified files:
lib/libc/stdlib: malloc.c 

Log message:
check double free before canary for chunks; ok millert@



CVS: cvs.openbsd.org: src

2017-09-11 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/09/11 12:21:08

Modified files:
regress/usr.sbin/syslogd: ttylog.c 

Log message:
Use signed ssize_t to make read(2) error check actually work.
found by clang warning



CVS: cvs.openbsd.org: src

2017-09-11 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2017/09/11 11:09:09

Modified files:
usr.sbin/smtpd : mta.c 

Log message:
remove dead code.

ok gilles@



  1   2   3   4   5   6   7   8   9   10   >