CVS: cvs.openbsd.org: src

2017-11-24 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/11/24 23:46:22

Modified files:
usr.bin/ssh: misc.c misc.h packet.c ssh-keyscan.c 
 sshconnect.c 

Log message:
Add monotime_ts and monotime_tv that return monotonic timespec and
timeval respectively.  Replace calls to gettimeofday() in packet timing
with monotime_tv so that the callers will work over a clock step.
Should prevent integer overflow during clock steps reported by wangle6
at huawei.com. "I like" markus@



CVS: cvs.openbsd.org: src

2017-11-24 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2017/11/24 22:58:47

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

Log message:
Remove get_current_time() and replace with calls to monotime_double()
which uses CLOCK_MONOTONIC and works over clock steps.  "I like" markus@



CVS: cvs.openbsd.org: src

2017-11-24 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/11/24 22:55:40

Modified files:
games/fortune/datfiles: fortunes2 

Log message:
than -> then

from scott cheloha



CVS: cvs.openbsd.org: src

2017-11-24 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/24 16:11:42

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

Log message:
Revert my change to ignore EIO errors when writing to log files.
Syslogd continued logging messages to a file that had an EIO error.
This could slow down the whole system.  File system errors may cause
huge delays at every access.  This prevented debugging the issue.
Now syslogd will log a warning and shut down logging to this file
until restart or SIGHUP.
OK deraadt@ espie@ millert@



CVS: cvs.openbsd.org: src

2017-11-24 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/24 15:53:55

Modified files:
regress/sbin/pfctl: Makefile if2ip pfr.exec 

Log message:
Use the environment variable PFCTL to specify a different executable
for testing.  Default is /sbin/pfctl.  This makes test driven
development easier.



CVS: cvs.openbsd.org: src

2017-11-24 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/24 07:39:15

Modified files:
regress/sys/net/loop: Makefile 

Log message:
Do not run sysctl and pfctl by != during make clean and make obj.
requested by miod@



CVS: cvs.openbsd.org: src

2017-11-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/24 06:48:12

Modified files:
usr.bin/openssl: apps_posix.c 

Log message:
Use clock_gettime and getrusage to compute real and user time.

Better handling of clock jumps, from Scott Cheloa.



CVS: cvs.openbsd.org: src

2017-11-23 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/11/24 00:02:55

Modified files:
sys/arch/armv7/sunxi: sxie.c 

Log message:
rework transmit to get rid of ifq_deq_begin, and to improve speed.

i had a diff that did a small change to replace
ifq_deq_begin/commit/rollback with ifq_dequeue, and Eduard Nicodei
tweaked it a bit with Artturi Alm to use the fifo registers properly
and bump the ifq len.

the latter changes improve performance significantly.

"if you think that diff is correct, commit it" kettenis@



CVS: cvs.openbsd.org: src

2017-11-23 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/11/23 19:36:53

Modified files:
sys/kern   : kern_timeout.c 
sys/sys: timeout.h 
share/man/man9 : timeout.9 

Log message:
add timeout_barrier, which is like intr_barrier and taskq_barrier.

if you're trying to free something that a timeout is using, you
have to wait for that timeout to finish running before doing the
free. timeout_del can stop a timeout from running in the future,
but it doesn't know if a timeout has finished being scheduled and
is now running.

previously you could know that timeouts are not running by simply
masking softclock interrupts on the cpu running the kernel. however,
code is now running outside the kernel lock, and timeouts can run
in a thread instead of softclock.

timeout_barrier solves the first problem by taking the kernel lock
and then masking softclock interrupts. that is enough to ensure
that any further timeout processing is waiting for those resources
to run again.

the second problem is solved by having timeout_barrier insert work
into the thread. when that work runs, that means all previous work
running in that thread has completed.

fixes and ok visa@, who thinks this will be useful for his work
too.



CVS: cvs.openbsd.org: src

2017-11-23 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/11/23 18:39:29

Modified files:
sbin/dhclient  : dhclient.c dhcpd.h 

Log message:
Remove 'renewal' field from struct client_lease. Add lease_renewal() to
calculate the value when required for a particular lease.



CVS: cvs.openbsd.org: src

2017-11-23 Thread Ulf Brosziewski
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2017/11/23 15:59:42

Modified files:
sys/dev/wscons : wsmouseinput.h wsmouse.c wstpad.c 

Log message:
1. Prepare a consistent treatment of edge areas.  2. Add mechanisms
that identify and mask touches resting in the bottom area.



CVS: cvs.openbsd.org: src

2017-11-23 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/23 13:49:38

Modified files:
sbin/ipsecctl  : ipsec.conf.5 
sbin/isakmpd   : isakmpd.8 

Log message:
in isakmpd(8), provide a hint: from scott cheloha
also some minor tweaks while here...



CVS: cvs.openbsd.org: src

2017-11-23 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/23 13:47:26

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

Log message:
Add fibocom L831-EAU to umb man

Confirmed on Thinkpad X270



CVS: cvs.openbsd.org: src

2017-11-23 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/11/23 11:20:40

Modified files:
share/man/man5 : bsd.port.mk.5 

Log message:
document minor changes



CVS: cvs.openbsd.org: src

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

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
Fix use of lease_expiry() in set_lease_times(). lease_expiry() returns
wall clock time, not length of lease time.



CVS: cvs.openbsd.org: src

2017-11-23 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/23 06:45:46

Modified files:
sys/kern   : uipc_domain.c uipc_socket.c 
sys/netinet: in_proto.c ip_input.c 
sys/sys: domain.h protosw.h socketvar.h 
sys/netinet6   : in6_proto.c ip6_input.c ip6protosw.h 

Log message:
Constify protocol tables and remove an assert now that ip_deliver() is
mp-safe.

ok bluhm@, visa@



CVS: cvs.openbsd.org: src

2017-11-23 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/23 06:42:53

Modified files:
sys/kern   : uipc_socket.c uipc_socket2.c 
sys/sys: socketvar.h 

Log message:
We want `sb_flags' to be protected by the socket lock rather than the
KERNEL_LOCK(), so change asserts accordingly.

This is now possible since sblock()/sbunlock() are always called with
the socket lock held.

ok bluhm@, visa@



CVS: cvs.openbsd.org: src

2017-11-23 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/23 06:32:25

Modified files:
sys/netinet: ip_carp.h ip_carp.c 
sys/netinet6   : in6.c nd6_nbr.c 

Log message:
Replace non mp-safe carp_iamatch6() with mp-safe carp_iamatch().

They have the same functionnality since friehm@ cleaned up
balancing code.

ok florian@, visa@, patrick@, bluhm@, jmatthew@



CVS: cvs.openbsd.org: src

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

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

Log message:
simplify imsg handler.

ok sunil@ gilles@



CVS: cvs.openbsd.org: src

2017-11-22 Thread Alexandre Ratchov
CVSROOT:/cvs
Module name:src
Changes by: ratc...@cvs.openbsd.org 2017/11/22 23:26:45

Modified files:
usr.bin/sndiod : dev.c 

Log message:
Fix slot leak occuring when the device mode doesn't match
the client mode. Found by landry@.



CVS: cvs.openbsd.org: src

2017-11-22 Thread Alexandre Ratchov
CVSROOT:/cvs
Module name:src
Changes by: ratc...@cvs.openbsd.org 2017/11/22 23:07:55

Modified files:
sys/dev: audio.c 

Log message:
No need to grab the audio lock to call audio_canstart() as it checks
whether the device is started before using structures shared with the
interrupt handler. From Michael W. Bombardieri, tested by me.



CVS: cvs.openbsd.org: src

2017-11-22 Thread Alexandre Ratchov
CVSROOT:/cvs
Module name:src
Changes by: ratc...@cvs.openbsd.org 2017/11/22 23:03:55

Modified files:
usr.bin/aucat  : afile.c 

Log message:
Remove useless variable assignments in .au header parsing code. From
Michael W. Bombardieri. Thanks.



CVS: cvs.openbsd.org: src

2017-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/22 14:22:40

Modified files:
sys/arch/armv7/stand/efiboot: Makefile 

Log message:
Add __aeabi_ldivmod.S.  Needed for clang.

ok deraadt@, patrick@



CVS: cvs.openbsd.org: src

2017-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/22 13:36:02

Modified files:
lib/libc/arch/aarch64/sys: Ovfork.S brk.S sbrk.S 

Log message:
Avoid .align 0 here as well.  Also fix a .word that should be a .quad.

ok patrick@



CVS: cvs.openbsd.org: src

2017-11-22 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/22 05:28:49

Modified files:
sys/net: pf.c 
sys/netinet: ip_output.c 

Log message:
It does not make sense to call pcb lookup from pf during packet
forwarding.  It should never match and would cause MP locking
problems.  While there remove an useless ifp parameter from
ip_output_ipsec_send().
from markus@; OK visa@ sashan@



CVS: cvs.openbsd.org: src

2017-11-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/22 05:17:34

Modified files:
bin/ksh: emacs.c ksh.1 

Log message:
Fix some incorrectness related to Emacs editing mode in ksh:

- Keep the order of bindings in sync between the manual and implementation
- Fix wrongly documented bindings in the manual
- Break out commands without a default binding in the manual

ok jmc@ tb@



CVS: cvs.openbsd.org: src

2017-11-21 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/21 12:25:46

Modified files:
regress/bin/ksh/edit: emacs.sh subr.sh 

Log message:
Add tests for emacs editing mode in ksh. While here, improve the output on test
failure.



CVS: cvs.openbsd.org: src

2017-11-21 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/21 12:22:45

Modified files:
regress/bin/ksh/edit: edit.c 

Log message:
Do not exit 0 if the program was terminated due to receipt of a signal other
than SIGHUP.



CVS: cvs.openbsd.org: src

2017-11-21 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/21 12:08:36

Modified files:
lib/libc/arch/arm/sys: Ovfork.S brk.S sbrk.S 

Log message:
Avoid .align 0.  Clang's integrated assembler actually honors this directive
and the resulting byte-alignment triggers unaligned access.

ok patrick@, deraadt@



CVS: cvs.openbsd.org: src

2017-11-21 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/11/21 10:57:41

Modified files:
bin/ksh: history.c 

Log message:
Initialize *histbase to NULL to fix a bus error in emacs editing mode
found by anton. To reproduce, run "env EDITOR=emacs MALLOC_OPTIONS=J ksh"
then press "^[_".

ok anton, jca



CVS: cvs.openbsd.org: src

2017-11-21 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/11/21 10:48:19

Modified files:
lib/libc/stdio : vfprintf.c 

Log message:
Use a simple forward search to find '%' in the format string instead of
using mbrtowc(3). Thus, we now treat the format string as a bytestring,
not as a multibyte character string.

We think that ANSI C made a small error when adding wide characters:
The committees essentially replaced "characters" with "wide characters"
in the existing printf documentation, which was written before the
concept of processing was established. Doing processing on the format
string would break some 8-bit format strings in the wild, and that
isn't something these committees gave themselves license to do.

Based on the "10x printf speedup" commit from android found by tedu:
https://github.com/aosp-mirror/platform_bionic/commit/5305a4d4a723b06494b93f2df81733b83a0c46d3

Thanks to millert and schwarze for digging into the history and
testing *printf behavior on other platforms.

ok deraadt, millert



CVS: cvs.openbsd.org: src

2017-11-21 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2017/11/21 09:23:46

Modified files:
share/man/man5 : port-modules.5 

Log message:
Delete mentions of the gettext module, which has been obsoleted and removed.



CVS: cvs.openbsd.org: src

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

Modified files:
usr.sbin/smtpd : ca.c lka.c mda.c mta.c queue.c smtp.c smtpd.c 

Log message:
no need to check the sending process in imsg handlers when there is no
ambiguity: just use a single switch.

ok gilles@ sunil@



CVS: cvs.openbsd.org: src

2017-11-21 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/11/21 05:07:00

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

Log message:
The call to setegid(2) was replaced with setresgid(2) a while ago.
Adjust error message accordingly.



CVS: cvs.openbsd.org: src

2017-11-21 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/21 05:05:09

Modified files:
sys/netinet6   : ip6_forward.c 

Log message:
Do not assume if_get(9) returns a non NULL ifp when using a route
interface index.

This assumption is true for the moment iff the route lookup *and* the
if_get() are done under KERNEL_LOCK().  This is not the case here.

Found the hardway by Hrvoje Popovski.

ok florian@, visa@, bluhm@



CVS: cvs.openbsd.org: src

2017-11-21 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/11/21 02:08:55

Modified files:
sys/netinet: ip_carp.c 

Log message:
Move the addrhook disestablish from carpdetach() to carp_clone_destroy()
to make it symmetric to the addrhook establish which is being done in
carp_clone_create().  This fixes the issue that carp does not recognize
address changes on the carp after an interface has detached, which could
cause issues like carp not recovering or even panics.  Unfortunately
there are more bugs lurking in carp.

ok bluhm@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Todd Mortimer
CVSROOT:/cvs
Module name:src
Changes by: morti...@cvs.openbsd.org2017/11/20 20:01:58

Modified files:
gnu/llvm/lib/Target/X86: X86RegisterInfo.td 

Log message:
The compiler is generally free to allocate general purpose registers in whatever
order it chooses. Reasons for choosing one register before another usually incl
ude compiled instruction size (avoidance of REX prefixes, etc.) or usage convent
ions, but somehow haven't included security implications in the compiled bytecod
e. Some bytecode is more useful in polymorphic ROP sequences than others, so it
seems prudent to try to avoid that bytecode when possible.

This patch moves EBX/RBX towards the end of the allocation preference for 32 and
64 bit general purpose registers. Some instructions using RBX/EBX/BX/BL as a de
stination register end up with a ModR/M byte of C3 or CB, which is often useful
in ROP gadgets. Because these gadgets often occur in the middle of functions, th
ey exhibit somewhat higher diversity than some other C3/CB terminated gadgets. T
his change removes about 3% of total gadgets from the kernel, but about 6% of un
ique gadgets.

There are other possible changes in this direction. BX/BL are obvious next targe
ts for avoidance, and MM3/XMM3 may also be useful to try to avoid if possible.

ok deraadt@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/20 13:49:14

Modified files:
sys/dev/fdt: sxiccmu_clocks.h 

Log message:
Add Allwinner A10 EMAC clock.

>From Artturi Alm.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Alexandre Ratchov
CVSROOT:/cvs
Module name:src
Changes by: ratc...@cvs.openbsd.org 2017/11/20 10:26:39

Modified files:
usr.bin/sndiod : fdpass.c 

Log message:
Free memory in the error code-path, when we run out of descriptors
during initialization. From Michael W. Bombardieri, thanks.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/20 08:52:25

Modified files:
regress/sys/net/loop: Makefile 

Log message:
Skip the test and print a warning if pf does not process packets
on additional loopback devices.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/20 08:20:03

Modified files:
sys/arch/octeon/dev: octrtc.c 
sys/arch/octeon/include: octeonvar.h 

Log message:
Add the board ID of the Unifi Security Gateway PRO-4.
Not tested with the hardware.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/20 08:13:09

Modified files:
sys/arch/octeon/dev: cn30xxgmx.c cn30xxsmi.c octrtc.c 
sys/arch/octeon/include: octeonvar.h 

Log message:
Fix the product code of the Unifi Security Gateway.

Prompted by Justin Hibbits



CVS: cvs.openbsd.org: src

2017-11-20 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/20 07:21:29

Modified files:
sys/net: if_etherip.h 

Log message:
Remove #if'0ed decls

Stop pretending that we will migrate the content of this file to
if_etherip.h.  Those declarations are needed by userland, and it's
easier to keep them in netinet/ip_ether.h.  ok visa@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 07:14:26

Modified files:
sys/netinet: ip_ipsp.h 

Log message:
Keep kernel defines under #ifdef _KERNEL.

ok bluhm@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/11/20 06:33:58

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
Wnen purging dhclient.leases and when looking for unexpired offers to
use, always recalculate offer expiry time based on the information in
the original offer.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/20 05:49:56

Modified files:
regress/sys/kern/pledge/sockopt: Makefile 

Log message:
Now pledge("inet") allows socket option IPV6_V6ONLY.  Adapt test.



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 03:56:52

Modified files:
sys/net: pfkeyv2.c pfkeyv2.h 
sys/netinet: ip_spd.c 

Log message:
Flush flows using the radix-tree instead of a global list.

This will allows us to get rid of the list.

ok visa@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 03:51:24

Modified files:
sbin/ipsecctl  : ipsecctl.8 ipsecctl.c ipsecctl.h 

Log message:
Support collapsing flow outputs.

Makes it easier to check live status of complex setups.

ok hshoexer@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 03:35:24

Modified files:
sys/net: if_etherip.c if_gif.c if_pfsync.c if_vxlan.c 
 pf.c pipex.c 
sys/netinet: igmp.c in.h ip_carp.c ip_ether.c ip_gre.c 
 ip_input.c ipsec_input.c raw_ip.c tcp_input.c 
 tcp_usrreq.c udp_usrreq.c 
sys/netinet6   : in6.h ip6_input.c raw_ip6.c 

Log message:
Sprinkle some NET_ASSERT_LOCKED(), const and co to prepare running
pr_input handlers without KERNEL_LOCK().

ok visa@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 03:17:40

Modified files:
sys/net: if_bridge.c if_switch.c 

Log message:
Remove duplicated code working around the fact that ifpromisc() required
a DOWN interface.

ok visa@



CVS: cvs.openbsd.org: src

2017-11-20 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/11/20 03:16:25

Modified files:
sys/net: if.c 

Log message:
Do not fail if an interface is DOWN when calling ifpromisc().

As soon as the interface will be brough UP, its device driver will
recognize it has the IFF_PROMISC flag and will configure its filters
accordingly.

ok visa@



CVS: cvs.openbsd.org: src

2017-11-19 Thread Andrew Fresh
CVSROOT:/cvs
Module name:src
Changes by: afre...@cvs.openbsd.org 2017/11/19 21:41:28

Modified files:
gnu/usr.bin/perl/lib/File: Copy.pm Copy.t 

Log message:
Support Time::HiRes::utime in File::Copy

Fixes issues with cross-device moves, noticed with autoconf



Re: CVS: cvs.openbsd.org: src

2017-11-19 Thread Alexander Hall


On November 19, 2017 1:11:54 PM GMT+01:00, Job Snijders  
wrote:
>CVSROOT:   /cvs
>Module name:   src
>Changes by:j...@cvs.openbsd.org2017/11/19 05:11:54
>
>Modified files:
>   distrib/alpha/bsd.rd: list.local 
>   distrib/amd64/ramdisk_cd: list.local 
>   distrib/arm64/ramdisk: list 
>   distrib/armv7/ramdisk: list 
>   distrib/hppa/ramdisk: list.local 
>   distrib/i386/ramdisk_cd: list.local 
>   distrib/landisk/ramdisk: list 
>   distrib/loongson/ramdisk: list 
>   distrib/luna88k/ramdisk: list 
>   distrib/macppc/ramdisk: list 
>   distrib/octeon/ramdisk: list 
>   distrib/sgi/ramdisk: list 
>   distrib/socppc/ramdisk: list 
>   distrib/sparc64/ramdisk: list 
>   distrib/special: Makefile 
>Added files:
>   distrib/special/growfs: Makefile 
>
>Log message:
>add growfs(8) to ramdisk

Hah, I first thought you had added growfs capability to mfs, which made me 
raise an eyebrow or two. :-D

/Alexander 

>
>Some resizing scenarios can be done from within single user mode, but
>resizing the root partition required you to bring your own growfs(8)
>binary into the ramdisk environment. This commit adds growfs(8) to the
>ramdisks (the ones that don't have space constraints) to simplify such
>operations.
>
>OK deraadt@



CVS: cvs.openbsd.org: src

2017-11-19 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/19 08:42:07

Modified files:
sys/dev/fdt: sxiccmu.c sxiccmu_clocks.h 

Log message:
Implement support for the "next-generation" clock bindings for the
Allwinner A10/A20.



CVS: cvs.openbsd.org: src

2017-11-19 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2017/11/19 06:43:06

Modified files:
sys/dev: rnd.c 

Log message:
Remove interlocks between producers and consumers of randomness data

A lot of randomness event producers are executed in the interrupt
context increasing the time spent in the interrupt handler resulting
in extra costs when adding randomness data to the pool.  However, in
practice randomness event producers require interlocking between each
other, but not with with consumers due to the opportunistic nature of
event consumers.

To be able to take advantage of this idea, the ring buffer indexing
is now done with two free running producer and consumer counters modulo
power of 2 size of the ring buffer.

With input from and OK visa, tb, jasper



CVS: cvs.openbsd.org: src

2017-11-19 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/19 06:18:13

Removed files:
sys/arch/amd64/amd64: lock_machdep.c 
sys/arch/i386/i386: lock_machdep.c 
sys/arch/mips64/mips64: lock_machdep.c 
sys/arch/sparc64/sparc64: lock_machdep.c 

Log message:
Remove lock_machdep.c from amd64, i386, mips64 and sparc64.
The architectures have been using the MI mplock for a while.

OK deraadt@, kettenis@



CVS: cvs.openbsd.org: src

2017-11-19 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/19 05:11:54

Modified files:
distrib/alpha/bsd.rd: list.local 
distrib/amd64/ramdisk_cd: list.local 
distrib/arm64/ramdisk: list 
distrib/armv7/ramdisk: list 
distrib/hppa/ramdisk: list.local 
distrib/i386/ramdisk_cd: list.local 
distrib/landisk/ramdisk: list 
distrib/loongson/ramdisk: list 
distrib/luna88k/ramdisk: list 
distrib/macppc/ramdisk: list 
distrib/octeon/ramdisk: list 
distrib/sgi/ramdisk: list 
distrib/socppc/ramdisk: list 
distrib/sparc64/ramdisk: list 
distrib/special: Makefile 
Added files:
distrib/special/growfs: Makefile 

Log message:
add growfs(8) to ramdisk

Some resizing scenarios can be done from within single user mode, but
resizing the root partition required you to bring your own growfs(8)
binary into the ramdisk environment. This commit adds growfs(8) to the
ramdisks (the ones that don't have space constraints) to simplify such
operations.

OK deraadt@



CVS: cvs.openbsd.org: src

2017-11-19 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/19 05:07:50

src/distrib/special/growfs

Update of /cvs/src/distrib/special/growfs
In directory cvs.openbsd.org:/tmp/cvs-serv84227/distrib/special/growfs

Log Message:
Directory /cvs/src/distrib/special/growfs added to the repository



CVS: cvs.openbsd.org: src

2017-11-18 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/18 14:03:23

Modified files:
sys/dev/ofw: ofw_regulator.h 

Log message:
Extend regulator "framework" with functions to get/set voltages.

ok jsg@



CVS: cvs.openbsd.org: src

2017-11-18 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/18 13:29:51

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

Log message:
Add support for voltage regulators.



CVS: cvs.openbsd.org: src

2017-11-18 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/11/18 09:33:25

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
Generate correct time comments (renewal/rebind/expiry) in
dhclient.leases and the 'offered' lease generated by -L. i.e. the
times contained in the actual offer, and not the 'effective' times
that reflect changes imposed by dhclient.conf or -i.



CVS: cvs.openbsd.org: src

2017-11-18 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/18 07:43:29

Modified files:
sys/arch/octeon/dev: if_cnmac.c 

Log message:
Submit incoming packets to the network stack in batches like is done
in many other NIC drivers. This reduces submission overhead.



CVS: cvs.openbsd.org: src

2017-11-18 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/18 06:48:50

Modified files:
sys/dev/ofw: ofw_regulator.c 

Log message:
Extend regulator "framework" with functions to get/set voltages.

ok jsg@



CVS: cvs.openbsd.org: src

2017-11-18 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/18 04:27:37

Modified files:
sys/arch/octeon/dev: cn30xxpow.c cn30xxpowvar.h if_cnmac.c 

Log message:
Move the packet input work requesting inside if_cnmac.c. This removes
a layer of abstraction that would complicate upcoming changes.



CVS: cvs.openbsd.org: src

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

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

Log message:
merge the masquerade and missing domain header callbacks into one function.

ok gilles@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/17 23:11:58

Modified files:
sys/arch/octeon/dev: if_cnmac.c 

Log message:
Pass the software context as an argument to the interrupt handler.
This is now possible because each port has a dedicated work queue
interrupt.



CVS: cvs.openbsd.org: src

2017-11-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/17 22:53:02

Modified files:
sys/arch/octeon/dev: if_cnmac.c if_cnmacvar.h 

Log message:
Rename octeon_eth_* to cnmac_* for consistency with the driver's name.
This also makes the code a bit less noisy to read.



CVS: cvs.openbsd.org: src

2017-11-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/11/17 21:59:27

Modified files:
sys/arch/octeon/dev: cn30xxgmx.c cn30xxsmi.c octrtc.c 
sys/arch/octeon/include: octeonvar.h 

Log message:
Add the board ID for the Ubiquiti Unifi Security Gateway.

>From Justin Hibbits, thanks!



CVS: cvs.openbsd.org: src

2017-11-17 Thread Aaron Bieber
CVSROOT:/cvs
Module name:src
Changes by: abie...@cvs.openbsd.org 2017/11/17 16:08:10

Modified files:
sys/kern   : kern_pledge.c 

Log message:
permit IPV6_V6ONLY in sockopt

OK deraadt@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 13:48:30

Modified files:
usr.sbin/pppd  : auth.c chap.c pppd.h upap.c 

Log message:
Use explicit_bzero to erase secrets

from Scott Cheloa, ok tb@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 13:38:33

Modified files:
sys/net: if_gif.c 

Log message:
#if -> #ifdef for consistency

ok visa@ as part of a larger diff



CVS: cvs.openbsd.org: src

2017-11-17 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/11/17 13:30:43

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

Log message:
Make OF_getnodebyname() scan its child nodes instead of its peer nodes.

This still deviates from the implementation we have on macppc, but we only
ever use OF_getnodebyname() to find child nodes in our tree.

ok tom@, visa@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 11:58:41

Modified files:
share/man/man4/man4.macppc: openprom.4 
share/man/man4/man4.sparc64: openprom.4 

Log message:
add some missing markup; from artturi alm



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 11:22:52

Modified files:
sys/net: if_etherip.c if_etherip.h 
sys/netinet: in_proto.c 

Log message:
Rename etherip sysctl handler, there's no conflict with ip_ether.c any more

ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 11:21:33

Modified files:
sys/netinet: ip_ether.c ip_ether.h 

Log message:
Add ifdef MPLS around all the MPLS-in-IP code

ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 11:20:49

Modified files:
sys/net: if_gif.c 
sys/netinet: in_proto.c ip_ether.c ip_ether.h 

Log message:
Rename functions that now handle only MPLS-in-IP

ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2017/11/17 11:04:51

Modified files:
sbin/ifconfig  : ifconfig.8 ifconfig.c 

Log message:
replace the deletetunnel option with -tunnel
ok bluhm@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Helg Bredow
CVSROOT:/cvs
Module name:src
Changes by: h...@cvs.openbsd.org2017/11/17 08:56:12

Modified files:
lib/libfuse: fuse.c 

Log message:
Implement safe signal handling and handle unmount failure gracefully.

ok mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Helg Bredow
CVSROOT:/cvs
Module name:src
Changes by: h...@cvs.openbsd.org2017/11/17 08:45:17

Modified files:
lib/libfuse: fuse.h fuse_ops.c 
sys/miscfs/fuse: fuse_vnops.c 

Log message:
Fixes the following bugs when getcwd(3) is used on a fuse file system

Endless loop if directory nested more than one level from root of file system
Current directory not found if the parent directory contains more children than
will fit in the buffer passed to VOP_READDIR(9)
Open and close directory in fusefs_readdir if dir is not already open.
Now behaves as if readdir_ino option was passed to fuse so that directories in
path have a valid ino.

ok mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/17 08:39:51

Modified files:
regress/sys/net/loop: Makefile pf.conf 

Log message:
Let packets jump between routing domains until the ttl is used up.
Use tcpdump to check that the ttl decrements to one.



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 07:52:51

Modified files:
sys/net: if_etherip.c if_etherip.h 
sys/netinet: ip_ether.c ip_ether.h 

Log message:
Move etherip_allow where it is used

While here, drop the declaration in headers, since the variable is used
in a single file.  ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 07:51:48

Modified files:
sys/netinet: ip_ether.c 

Log message:
Drop etheripstat use in ip_ether.c

Those functions only handle MPLS-in-IP packets, it makes little sense to
count those as ethernet-in-IP.  ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 07:51:13

Modified files:
sys/netinet: ip_ether.c in_proto.c 
sys/netinet6   : in6_proto.c 

Log message:
Drop all Ethernet-in-IP support from gif(4)

As a result, ip_ether.c now only deals with MPLS-in-IP.  The next
commits will move & rename stuff to make this clear.  ok visa@ mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 07:50:17

Modified files:
sys/net: if_etherip.c 

Log message:
Don't pass unhandled packets to gif(4)

This was useful for the migration path, it's not since gif(4) can't be
added to a bridge any more.  ok visa@ as part of a larger diff, ok mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/17 06:36:04

Modified files:
sys/net: if_etherip.c 
sys/netinet: in_proto.c ip_ether.c ip_ether.h 

Log message:
Move etherip counters and their allocation to etherip(4)

gif(4) now depends on etherip(4) but this is a temporary drawback: we
can get rid of etherip_init(), called from the protocol switch, and
ip_ether.c should stop using etherip counters once it is clear that this
file doesn't handle ethernet-in-IP any more.

ok visa@ as part of a larger diff, ok mpi@



CVS: cvs.openbsd.org: src

2017-11-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/17 04:50:00

Modified files:
share/dict : web2 

Log message:
Add the word "software" to our dictionary to help passing the test
of Sub::Attribute Perl module.
OK jmc@



CVS: cvs.openbsd.org: src

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

Modified files:
regress/sys/net: Makefile 

Log message:
Link loopback test to build.



CVS: cvs.openbsd.org: src

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

Log message:
Set up two loopback interfaces in different routing domains.  Try
to ping existing and non existing addresses in these domains.  Also
test pinging to different rdomains via pf.  Create routing loops
and check that the packet vanishes.

Status:

Vendor Tag: bluhm
Release Tags:   bluhm_20171117

N src/regress/sys/net/loop/Makefile
N src/regress/sys/net/loop/pf.conf

No conflicts created by this import



CVS: cvs.openbsd.org: src

2017-11-17 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2017/11/17 02:52:18

Modified files:
usr.bin/tmux   : cmd-select-pane.c 

Log message:
Allow formats in selectp -T, from Thomas Adam.



CVS: cvs.openbsd.org: src

2017-11-16 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2017/11/16 21:44:14

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

Log message:
vmmvar.h changes for upcoming cdrom support in vmd(8).

Diff from carlos cardenas, thanks



CVS: cvs.openbsd.org: src

2017-11-16 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2017/11/16 20:51:32

Modified files:
share/man/man9 : if_rxr_init.9 
sys/net: if_var.h if.c 

Log message:
add if_rxr_livelocked so rxr users can request backpressure themselves.

right now the rx ring moderation code makes a decision globally
that a machine is livelocked, and uses that to apply backpressure
on all the rx rings. we're moving toward having the network stack
run on multiple cpus, and fed from multiple rx rings. if_rxr_livelocked
lets a driver apply backpressure explicitely if something tells it
that whatever is consuming previous packets cannot keep up.

while here expose the current ring watermark with if_rxr_cwm.

tweaks and ok visa@



CVS: cvs.openbsd.org: src

2017-11-16 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2017/11/16 17:26:11

Modified files:
share/man/man5 : bsd.port.mk.5 

Log message:
the COMPILER transition mechanism is gone



CVS: cvs.openbsd.org: src

2017-11-16 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/16 14:08:42

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

Log message:
fix SEE ALSO;



CVS: cvs.openbsd.org: src

2017-11-16 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/11/16 12:40:46

Modified files:
distrib/sets/lists/comp: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2017-11-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/16 12:22:33

Modified files:
bin/csh: file.c 

Log message:
In revision 1.35 of file.c, tenex() was modified to respect the inputline_size
argument but I forgot to adapt one conditional. Still no functional change since
tenex() only has one call site where `inputline_size == sizeof(buf)`.



CVS: cvs.openbsd.org: src

2017-11-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/16 12:08:16

Modified files:
bin/csh: file.c 

Log message:
Zap a redundant cast.



CVS: cvs.openbsd.org: src

2017-11-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2017/11/16 12:05:44

Modified files:
regress/bin/csh: Makefile filec.sh 

Log message:
Add a variable referencing the csh binary to test.



CVS: cvs.openbsd.org: src

2017-11-16 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/11/16 11:12:27

Modified files:
share/man/man4 : dwiic.4 
sys/conf   : files 
sys/dev/pci: files.pci 
sys/arch/amd64/conf: GENERIC RAMDISK_CD 
sys/dev/acpi   : acpi.c files.acpi 
Added files:
sys/dev/pci: dwiic_pci.c 
sys/dev/acpi   : dwiic_acpi.c 
sys/dev/ic : dwiic.c dwiicreg.h dwiicvar.h 
Removed files:
sys/dev/acpi   : dwiic.c 

Log message:
Add PCI attachment for dwiic(4) needed by Intel 100 Series machines

ok kettenis



CVS: cvs.openbsd.org: src

2017-11-16 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/11/16 08:35:07

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

Log message:
sync struct ifreq with if.h.  ifr_vnetid is now a proper member of
struct ifreq and is no longer overloaded with ifr_metric.  Moreover,
ifr_index and ifr_llprio were missing and mandoc -Tlint complained
about a "useless macro: Tn".

ok jmc, benno, visa



CVS: cvs.openbsd.org: src

2017-11-16 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2017/11/16 07:24:34

Modified files:
usr.sbin/relayd: parse.y 

Log message:
Check that http options are only configured in http protocols.
OK benno@



  1   2   3   4   5   6   7   8   9   10   >