CVS commit: src/sys/net

2018-06-12 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Jun 12 07:12:35 UTC 2018

Modified Files:
src/sys/net: if.h if_ethersubr.c

Log Message:
Check if ether_ifdetach is called without INET_LOCK


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/net/if.h
cvs rdiff -u -r1.268 -r1.269 src/sys/net/if_ethersubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/fdt

2018-06-12 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jun 12 10:28:55 UTC 2018

Modified Files:
src/sys/dev/fdt: fdt_clock.c fdtvar.h

Log Message:
Process assigned clock parents and rates on clock provider nodes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdt_clock.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/fdt/fdtvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/i2c

2018-06-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jun 12 13:18:48 UTC 2018

Modified Files:
src/sys/dev/i2c: gttwsi_core.c

Log Message:
When initiating a transfer, if a device isn't present, we won't
get an ACK after sending the address.  Check for this alternate
state and suppress the error message when it occurs.

Fixes PR kern/53356.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/gttwsi_core.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/historical/nawk/dist

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 13:24:28 UTC 2018

Modified Files:
src/external/historical/nawk/dist: lex.c

Log Message:
Do not use index out of bounds in nawk

$ awk '{w=$1}' < /dev/null
/public/src.git/external/historical/nawk/bin/../dist/lex.c:476:16: runtime 
error: index -1 out of bounds for type 'const Keyword [46]'

There used to be documented a bug in the code that index ouf of bounds
can in theory fault (by daniel barrett).

Before assigning the pointer, first check for the index whether it's not
not -1. This was a suggested solution in the comment in the code.

The sanitizer is overcautious as this pointer wasn't dereferenced, but
fix is nonetheless.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/historical/nawk/dist/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/ksh

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 14:13:55 UTC 2018

Modified Files:
src/bin/ksh: eval.c

Log Message:
Change typ of tilde_ok from int to unsigned int in ksh(1)

UBSan can detect that during switching a login to root there is unportable
left shift operation:

$ su -
Password:
/public/src.git/bin/ksh/eval.c:598:13: runtime error: left shift of 1073741824 
by 1 places cannot be represented in type 'int'
#

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/eval.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/kdump

2018-06-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 12 15:40:39 UTC 2018

Modified Files:
src/usr.bin/kdump: Makefile.ioctl-c mkioctls

Log Message:
- instead of hard-coding the include paths in mkioctls, pass them in
  from the Makefile so that they are consistent.
- do more sed so that destination paths are not hard-coded inside #include
  statements.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/kdump/Makefile.ioctl-c
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/kdump/mkioctls

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/kdump

2018-06-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 12 15:41:35 UTC 2018

Modified Files:
src/usr.bin/kdump: Makefile.ioctl-c

Log Message:
remove extra quotes.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/kdump/Makefile.ioctl-c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src

2018-06-12 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jun 12 16:34:04 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_vlan.c
src/tests/net/if_vlan [netbsd-8]: t_vlan.sh

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #876):
sys/net/if_vlan.c: 1.126
tests/net/if_vlan/t_vlan.sh: 1.9
vlan: call ether_ifdetach without IFNET_LOCK
Fix PR kern/53357
--
Add tests of vlan with bridge
The tests trigger a panic reported in PR kern/53357.


To generate a diff of this commit:
cvs rdiff -u -r1.97.2.13 -r1.97.2.14 src/sys/net/if_vlan.c
cvs rdiff -u -r1.1.8.2 -r1.1.8.3 src/tests/net/if_vlan/t_vlan.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/doc

2018-06-12 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jun 12 16:36:26 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.0

Log Message:
876


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.209 -r1.1.2.210 src/doc/CHANGES-8.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/expr

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 18:12:18 UTC 2018

Modified Files:
src/bin/expr: expr.y

Log Message:
Rework perform_arith_op() in expr(1) to omit Undefined Behavior

The current implementation of operations - + * / % could cause Undefined
Behavior and in narrow cases (INT64_MIN / -1 and INT64_MIN % -1) SIGFPE
and crash duping core.

Detected with MKSANITIZER enabled for the Undefined Behavior variation:
# eval expr '4611686018427387904 + 4611686018427387904'
/public/src.git/bin/expr/expr.y:315:12: runtime error: signed integer overflow: 
4611686018427387904 + 4611686018427387904 cannot be represented in type 'long'

All bin/t_expr ATF tests pass now in a sanitized userland.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/expr/expr.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/expr

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 18:54:40 UTC 2018

Modified Files:
src/tests/bin/expr: t_expr.sh

Log Message:
Add 2 new expr(1) ATF tests

Assert that -9223372036854775808 % -1 and -9223372036854775808 / -1 return
message about overflow / underflow detected.

These tests pass correctly.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/expr/t_expr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-06-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jun 12 19:35:00 UTC 2018

Modified Files:
src/sys/dev/pci: if_msk.c

Log Message:
fix whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/if_msk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsck_lfs

2018-06-12 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Tue Jun 12 20:12:22 UTC 2018

Modified Files:
src/sbin/fsck_lfs: lfs.c

Log Message:
Remove duplicate assignments.
Fixes PR bin/51512 by Jose Luis Rodriguez Garcia


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sbin/fsck_lfs/lfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-06-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jun 12 20:25:47 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.1331 -r1.1332 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1330 -r1.1331 src/sys/dev/pci/pcidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-06-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jun 12 20:25:25 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add two more Yukon variants (from OpenBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.1340 -r1.1341 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-06-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jun 12 20:27:54 UTC 2018

Modified Files:
src/sys/dev/pci: if_msk.c if_skreg.h

Log Message:
match three more variants - DGE550T_B1, 8040T, 8042

sync more sk_type conditionals from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_skreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl2/grep/dist/src

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 21:22:47 UTC 2018

Modified Files:
src/external/gpl2/grep/dist/src: dfa.c

Log Message:
Prevent Undefined Behavior in shift of signed integer in grep(1)

There is an interface in grep: dfa.c with functions to test bit, set bit,
clear bit etc. They operate over the INT-wide mask (INTBITS). Use unsigned
shift in these interfaces to prevent UB.

Detected with MKSANITIZER with the undefined behavior sanitizer option.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/grep/dist/src/dfa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/stand/mbr

2018-06-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Jun 12 21:35:17 UTC 2018

Modified Files:
src/sys/arch/i386/stand/mbr: Makefile.mbr

Log Message:
Set NOSANITIZER in i386 mbr files

This is required to build these files and keep then functional with
enabled MKSANITIZER.

Sponsored by 


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/stand/mbr/Makefile.mbr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-06-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jun 12 21:36:34 UTC 2018

Modified Files:
src/sys/dev/pci: if_msk.c if_sk.c if_skreg.h

Log Message:
move SK_HASH_BITS to if_skreg.h and reuse in if_msk.c (from OpenBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/pci/if_sk.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_skreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/clk

2018-06-12 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jun 12 23:08:37 UTC 2018

Modified Files:
src/sys/dev/clk: clk.c

Log Message:
If setting rate on a clock with no set_rate function, and the desired rate
matches the current rate, don't return an error.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/clk/clk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/compat

2018-06-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 12 23:52:56 UTC 2018

Modified Files:
src/tools/compat: compat_defs.h

Log Message:
Move the typedefs before the header inclusions (except ) and
explain why.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/tools/compat/compat_defs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2018-06-12 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Wed Jun 13 00:24:07 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
macppc IPsec change from last week


To generate a diff of this commit:
cvs rdiff -u -r1.2394 -r1.2395 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/wscons

2018-06-12 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jun 13 02:09:09 UTC 2018

Modified Files:
src/sys/dev/wscons: wsevent.c

Log Message:
wsevent_copyout_events50 - don't leak garbage from the kernel stack.

On 64-bit machines struct timespec50 has padding between 32-bit tv_sec
and long tv_nsec that is not affected by normal assignment.  Scrub it
before we uiomove struct owscons_event.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/wscons/wsevent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [pgoyette-compat] src/sys/dev/wscons

2018-06-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun 13 02:29:56 UTC 2018

Modified Files:
src/sys/dev/wscons [pgoyette-compat]: wsevent_50.c

Log Message:
Keep up with -HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/dev/wscons/wsevent_50.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2018-06-12 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 13 03:28:36 UTC 2018

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile hifn.4 ipsec.4 nsp.4 options.4 ubsec.4
Removed Files:
src/share/man/man4: fast_ipsec.4

Log Message:
Retire fast_ipsec.4

We switched to Fast IPsec at NetBSD 6.0 and that's the IPsec implementation of
us now.  So we don't need to have a separate manual.  Merge fast_ipsec.4 into
ipsec.4 and remove fast_ipsec.4.


To generate a diff of this commit:
cvs rdiff -u -r1.1593 -r1.1594 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.655 -r1.656 src/share/man/man4/Makefile
cvs rdiff -u -r1.14 -r0 src/share/man/man4/fast_ipsec.4
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/hifn.4
cvs rdiff -u -r1.43 -r1.44 src/share/man/man4/ipsec.4
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/nsp.4
cvs rdiff -u -r1.487 -r1.488 src/share/man/man4/options.4
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/ubsec.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2018-06-12 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 13 03:34:13 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
Refer ipsec(4) instead of fast_ipsec(4)

Because fast_ipsec(4) is retired and IPSEC is described in ipsec(4) now.


To generate a diff of this commit:
cvs rdiff -u -r1.2395 -r1.2396 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/compat

2018-06-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 13 04:17:43 UTC 2018

Modified Files:
src/tools/compat: compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
Revert my previous config test inclusion for u_longlong_t.

Fixing this differently by avoiding the need for the definition.
It also caused a problem in OS X, as I neglected to include a correct header


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.89 -r1.90 src/tools/compat/configure
cvs rdiff -u -r1.90 -r1.91 src/tools/compat/configure.ac
cvs rdiff -u -r1.43 -r1.44 src/tools/compat/nbtool_config.h.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/dist/uts/common/rpc

2018-06-12 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Wed Jun 13 04:21:21 UTC 2018

Modified Files:
src/external/cddl/osnet/dist/uts/common/rpc: types.h

Log Message:
Avoid declaring ulonglong_t.

Comment here already says it isn't necessary and will be removed.
Hasten the process for us and avoid the problematic typedef.

This is useful because u_longlong_t would otherwise need to be
provided by compat headers.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dist/uts/common/rpc/types.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2018-06-12 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Jun 13 05:26:12 UTC 2018

Modified Files:
src/sys/kern: subr_workqueue.c

Log Message:
Don't wait on workqueue_wait if called from worker itself

Otherwise workqueue_wait never return in such a case.  This treatment
is the same as callout_halt.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/kern/subr_workqueue.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.