CVS: cvs.openbsd.org: src

2017-07-24 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2017/07/24 21:46:59

Modified files:
sys/arch/octeon/include: intr.h 
sys/arch/powerpc/include: intr.h 
sys/arch/powerpc/powerpc: softintr.c 

Log message:
Remove leftovers of a past softintr mechanism.

OK mpi@, kettenis@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2017/07/24 17:56:37

Modified files:
bin/ksh: history.c 

Log message:
Fix off-by-one error introduced in the previous commit.

ok jca



CVS: cvs.openbsd.org: src

2017-07-24 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/07/24 17:19:10

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

Log message:
sync



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 16:28:09

Modified files:
bin/ksh: history.c 

Log message:
Prettify, simplify

Input & ok tb@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 16:26:12

Modified files:
bin/ksh: history.c 

Log message:
Use memmove instead of a hand-rolled loop

A tad faster in my HISTFILE "benchmarks".  ok tb@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 16:15:52

Modified files:
bin/test   : test.c 

Log message:
Add < and > to the comment describind the grammar.

Picked in a diff from Klemens Nanni



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 15:25:41

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

Log message:
add pcxrtc;



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/07/24 14:35:26

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

Log message:
Add support for the AXP152 which has a shutdown control register that is
compatible with the AXP209.  Makes the Olimex A10s-OlinuXino-MICRO power
down properly.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/07/24 14:32:07

Modified files:
share/man/man4 : Makefile 
Added files:
share/man/man4 : pcxrtc.4 

Log message:
pcxrtc(4)



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/07/24 14:27:58

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

Log message:
Enable pcxrtc(4).



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/07/24 14:25:29

Modified files:
sys/dev/i2c: files.i2c 
Added files:
sys/dev/i2c: pcf8563.c 

Log message:
pcxrtc(4), a driver for the NXP PCF8563 RTC.

ok deraadt@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2017/07/24 13:23:57

Modified files:
gnu/usr.bin/cc : Makefile 

Log message:
build cpp on gcc4 architectures only, as clang ships with its own

ok naddy@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2017/07/24 13:22:49

Modified files:
gnu/lib/libstdc++-v3: Makefile.common 
gnu/usr.bin/cc : Makefile.inc 
gnu/usr.bin/cc/c++: Makefile 
gnu/usr.bin/cc/cc: Makefile 
gnu/usr.bin/cc/libobjc: Makefile 

Log message:
install gcc, g++ as gcc and g++ instead of cc, c++ and create links
to the latter on non-clang architectures and make sure we build gcc
with itself because clang won't be able to build it

ok naddy@



Re: CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
On Sun, Jul 23 2017, Jeremie Courreges-Anglas  wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   j...@cvs.openbsd.org2017/07/23 08:28:22
>
> Modified files:
>   sbin/pflogd: pflogd.c 
>
> Log message:
> Don't hit pledge(2) restrictions on interface departure
>
> if_exists() can't be used after dropping privileges, since it uses
> socket(2) and ioctl(SIOCGIFDATA).  We're just trying to know whether an
> interface exists, and if_nametoindex(3) is enough for that.
>
> ok deraadt@

also ok benno@

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



CVS: cvs.openbsd.org: src

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

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

Log message:
Throw DHO_STATIC_ROUTES to the floor! Roughly! Ensure
they don't appear in effective leases at all.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2017/07/24 11:42:14

Modified files:
regress/lib/libssl/tlsext: tlsexttest.c 

Log message:
Extend the SNI tests to ensure that we have a hostname in the session
after a successful tlsext_sni_serverhello_parse() and that
tlsext_sni_clienthello_parse() fails if we have an existing session and
the SNI is mismatched.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2017/07/24 11:39:43

Modified files:
lib/libssl : ssl_tlsext.c t1_lib.c 

Log message:
Rewrite and move the last remnants of the ServerHello SNI handling into
tlsext_sni_serverhello_parse(). This also adds a check to ensure that
if we have an existing session, the name matches what we specified via
SNI.

ok doug@



CVS: cvs.openbsd.org: src

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

Modified files:
sbin/dhclient  : dhclient.c dhcpd.h dispatch.c kroute.c 
 privsep.h 

Log message:
Shuffle some declarations and functions into the only
files they are used in. Tweak a bunch of whitespace.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2017/07/24 11:15:27

Modified files:
regress/lib/libssl/tlsext: tlsexttest.c 

Log message:
Add regress coverage for the TLS Renegotiation Indication extension.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2017/07/24 11:10:31

Modified files:
lib/libssl : Makefile ssl_locl.h ssl_tlsext.c ssl_tlsext.h 
 t1_lib.c 
Removed files:
lib/libssl : t1_reneg.c 

Log message:
Rewrite the TLS Renegotiation Indication extension handling using CBB/CBS
and the new extension framework.

Feedback from doug@

ok inoguchi@



CVS: cvs.openbsd.org: src

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

Modified files:
share/man/man3 : tree.3 

Log message:
ansify



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2017/07/24 10:42:56

Modified files:
gnu/gcc/gcc: opts.c 

Log message:
Make gcc accept -Oz as an alias for -Os for compatibility with clang.

With clang -Os doesn't generate the smallest code possible but some middle
ground between optimization for speed and optimization for size.  A new -Oz
option was introduced for optmization for size only.  We need that for our
floppies, otherwise they overflow.  Making gcc accept -Oz too makes our life
easier.

ok millert@, deraadt@, robert@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/07/24 10:17:35

Modified files:
sbin/dhclient  : bpf.c dhclient.c dhcp.h parse.c 

Log message:
Tweak some comments



Re: CVS: cvs.openbsd.org: src

2017-07-24 Thread Robert Nagy
On (2017-07-24 09:31), Robert Nagy wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   rob...@cvs.openbsd.org  2017/07/24 09:31:14
> 
> Modified files:
>   sys/arch/amd64/amd64: amd64errata.c lapic.c pmap.c 
> 
> Log message:
> add some missing MULTIPROCESSOR ifdefs to not compile in code on
> non-multiprocessor kernels to avoid unused function warnings by clang
> 
ok kettenis@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2017/07/24 09:31:14

Modified files:
sys/arch/amd64/amd64: amd64errata.c lapic.c pmap.c 

Log message:
add some missing MULTIPROCESSOR ifdefs to not compile in code on
non-multiprocessor kernels to avoid unused function warnings by clang



CVS: cvs.openbsd.org: src

2017-07-24 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2017/07/24 09:20:46

Modified files:
sys/net: hfsc.c 

Log message:
Don't attempt to deactivate a class that doesn't have any packets in it

Classes are considered "active" when they have packets assigned to them.
Active classes are tracked on various lists and during the purge operation
must be dissociated from them.  During factoring out of the HFSC internal
FIFO operations, the check for whether the class is empty got lost.

Issue reported and fix tested by abieber@ and myself.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2017/07/24 09:17:31

Modified files:
sys/arch/i386/i386: amd64errata.c lapic.c 

Log message:
add MULTIPROCESSOR guards around otherwise unused pieces to satisfy clang
ok deraadt@ kettenis@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/07/24 09:07:39

Modified files:
sys/kern   : uipc_socket.c uipc_syscalls.c 
sys/miscfs/fifofs: fifo_vnops.c 
sys/nfs: nfs_socket.c 

Log message:
Extend the scope of the socket lock to protect `so_state' in connect(2).

As a side effect, soconnect() and soconnect2() now expect a locked socket,
so update all the callers.

ok bluhm@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/07/24 07:51:43

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

Log message:
Move invocations of flush_routes() and delete_addresses() from
bind_lease() into set_routes() and set_address() respectively.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2017/07/24 07:16:06

Modified files:
sbin/dhclient  : dhclient.c 

Log message:
ROUNDUP() adjustment missed by great ROUNDUP() roundup.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 06:57:01

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

Log message:
Simplify mail sending.

No need for asprintf(3) to concat two string literals.  The resulting
helper() function is trivial, so inline it.  ok schwarze@



CVS: cvs.openbsd.org: www

2017-07-24 Thread Reyk Floeter
CVSROOT:/cvs
Module name:www
Changes by: r...@cvs.openbsd.org2017/07/24 06:37:52

Modified files:
.  : ftp.html ftplist 
openbgpd   : ftp.html 
openssh: ftp.html portable.html 
openntpd   : portable.html 

Log message:
sync



CVS: cvs.openbsd.org: www

2017-07-24 Thread Reyk Floeter
CVSROOT:/cvs
Module name:www
Changes by: r...@cvs.openbsd.org2017/07/24 06:37:09

Modified files:
build  : mirrors.dat 

Log message:
Remove anycast CDN mirror from EvoWise.

The CDN uses some kind of rate limiting that doesn't work nicely with
our installer and pkg_add.  ftp(1), tool that is used by the
installer, doesn't support HTTP keep-alive so it opens a TCP/TLS
connection per downloaded file.  This results in connection timeouts
after fetching some files when the CDN's rate limiting kicks in.
The mirror's maintainer doesn't seem to be available anymore.

OK sthen@ tb@ phessler@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/07/24 06:33:59

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

Log message:
Use pledge(2)

Simple promises proposed by Rob Pierce after exploring more complicated
privsep schemes.  ok benno@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Gleydson Soares
CVSROOT:/cvs
Module name:src
Changes by: gsoa...@cvs.openbsd.org 2017/07/24 06:32:32

Modified files:
sys/dev: softraid.c 

Log message:
tweak malloc(9) flags: since that M_NOWAIT might return NULL hence it
doesnt make sense to use M_CANFAIL flag.

ok dlg jsing



CVS: cvs.openbsd.org: src

2017-07-24 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/07/24 06:12:09

Modified files:
sys/arch/arm64/stand/efiboot: conf.c efiboot.c 

Log message:
Port amd64's updates to the device path comparison to arm64 as well.



CVS: cvs.openbsd.org: src

2017-07-24 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/07/24 06:08:15

Modified files:
usr.bin/make   : engine.c 

Log message:
turn stupid message into a proper warning.
noticed by Michael W. Bombardieri

okay schwarze@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2017/07/24 06:07:46

Modified files:
usr.bin/make   : arch.c suff.c memory.h 

Log message:
GC old cruft.
noticed and patch Michael W. Bombardieri



CVS: cvs.openbsd.org: src

2017-07-24 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2017/07/24 05:15:34

Modified files:
sys/arch/armv7/stand/efiboot: conf.c efiboot.c 

Log message:
Port amd64's updates to the device path comparison to armv7.  Fixes
bootup on the i.MX6UL evaluation kit.

ok kettenis@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Florian Riehm
CVSROOT:/cvs
Module name:src
Changes by: fri...@cvs.openbsd.org  2017/07/24 05:00:01

Modified files:
sbin/dhclient  : kroute.c 
sbin/slaacd: frontend.c 
usr.sbin/bgpd  : kroute.c 
usr.sbin/dvmrpd: kroute.c 
usr.sbin/eigrpd: kroute.c 
usr.sbin/ldpd  : kroute.c 
usr.sbin/ospfd : kroute.c 
usr.sbin/ripd  : kroute.c 
usr.sbin/snmpd : kroute.c 

Log message:
Unify ROUNDUP macros for parsing route messages.
Use the macro from route(8) / ospf6d(8) since it works also with argument 0.

OK claudio@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/07/24 03:38:25

Modified files:
sys/net: if.c 

Log message:
Reduce NET_LOCK() contention by moving the linktstate and watchdog
tasks from `systq' to `softnettq'.

ok kettenis@, visa@



CVS: cvs.openbsd.org: src

2017-07-24 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/07/24 03:29:15

Modified files:
sys/kern   : sys_socket.c 

Log message:
Grab the socket lock in soo_ioctl() where `so_state', `so_rcv'
and `so_snd' are modified.

ok bluhm@, visa@



CVS: cvs.openbsd.org: src

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

Modified files:
sys/net: route.c route.h rtsock.c 

Log message:
rt_getifa() is only needed for routing commands submited by userland.

So rename it to rtm_getifa(), move it where it belongs and stop calling
it from rtrequest(9).  Route entries created by the kernel must always
specify the corresponding `ifa'.

ok claudio@