CVS commit: src/doc

2020-04-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Apr 13 06:24:52 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note PAC and BTI.


To generate a diff of this commit:
cvs rdiff -u -r1.2669 -r1.2670 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/arch/aarch64/aarch64

2020-04-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Apr 13 06:02:03 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: cpuswitch.S

Log Message:
Meant to do a store here, not a load. Ie we want to replace the initial
weak key by the stronger one we just generated.

Rototilled this place too many times.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/cpuswitch.S

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



CVS commit: src/sys/arch

2020-04-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Apr 13 05:40:26 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c cpuswitch.S pmap.c
pmapboot.c trap.c vectors.S
src/sys/arch/aarch64/conf: Makefile.aarch64
src/sys/arch/arm/conf: files.arm
src/sys/arch/arm/include: asm.h
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add support for Branch Target Identification (BTI).

On the executable pages that have the GP (Guarded Page) bit, the semantic
of the "br" and "blr" instructions is changed: the CPU expects the first
instruction of the jump/call target to be "bti", and faults if it isn't.

We add the GP bit on the kernel .text pages (and incidentally the .rodata
pages, but we don't care). The compiler adds a "bti c" instruction at the
beginning of each C function. We modify the ENTRY() macros to manually add
"bti c" in the asm functions.

cpuswitch.S needs a specific change: with "br x27" the CPU expects "bti j",
which is bad because the functions begin with "bti c"; switch to "br x16",
for the CPU to accept "bti c".

BTI helps defend against JOP/COP. Tested on Qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/cpuswitch.S
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/pmapboot.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/aarch64/aarch64/trap.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/aarch64/vectors.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/conf/Makefile.aarch64
cvs rdiff -u -r1.154 -r1.155 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/include/asm.h
cvs rdiff -u -r1.150 -r1.151 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: src

2020-04-12 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Apr 13 00:27:17 UTC 2020

Modified Files:
src/share/man/man9: pool.9 pool_cache.9
src/sys/arch/arm/arm32: pmap.c
src/sys/arch/xen/x86: xen_shm_machdep.c
src/sys/arch/xen/xen: xbdback_xenbus.c
src/sys/dev/ic: ncr53c9x.c
src/sys/dev/raidframe: rf_netbsdkintf.c rf_reconmap.c
src/sys/dev/scsipi: scsipi_base.c
src/sys/kern: subr_pool.c
src/sys/opencrypto: cryptodev.c
src/sys/sys: pool.h

Log Message:
slightly change and fix the semantics of pool_set*wat(), pool_sethardlimit()
and pool_prime() (and their pool_cache_* counterparts):

 - the pool_set*wat() APIs are supposed to specify thresholds for the count of
   free items in the pool before pool pages are automatically allocated or freed
   during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
   are supposed to specify minimum and maximum numbers of total items
   in the pool (both free and allocated).  these were somewhat conflated
   in the existing code, so separate them as they were intended.

 - change pool_prime() to take an absolute number of items to preallocate
   rather than an increment over whatever was done before, and wait for
   any memory allocations to succeed.  since pool_prime() can no longer fail
   after this, change its return value to void and adjust all callers.

 - pool_setlowat() is documented as not immediately attempting to allocate
   any memory, but it was changed some time ago to immediately try to allocate
   up to the lowat level, so just fix the manpage to describe the current
   behaviour.

 - add a pool_cache_prime() to complete the API set.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/share/man/man9/pool.9
cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/pool_cache.9
cvs rdiff -u -r1.402 -r1.403 src/sys/arch/arm/arm32/pmap.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/xen/x86/xen_shm_machdep.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/xen/xen/xbdback_xenbus.c
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/ic/ncr53c9x.c
cvs rdiff -u -r1.381 -r1.382 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/raidframe/rf_reconmap.c
cvs rdiff -u -r1.185 -r1.186 src/sys/dev/scsipi/scsipi_base.c
cvs rdiff -u -r1.266 -r1.267 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.104 -r1.105 src/sys/opencrypto/cryptodev.c
cvs rdiff -u -r1.89 -r1.90 src/sys/sys/pool.h

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



CVS commit: src/tests/fs/ffs

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 23:52:20 UTC 2020

Modified Files:
src/tests/fs/ffs: t_extattr.c

Log Message:
make sure that 0 length files get their extattrs cleaned up on deletion
(there was an optimization to not call truncate if size == 0).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/ffs/t_extattr.c

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 22:06:18 UTC 2020

Modified Files:
src/sys/kern: syscalls.master

Log Message:
put back the MODULAR attributes accidentally removed.


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 src/sys/kern/syscalls.master

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



CVS commit: [bouyer-xenpvh] src/sys/arch/xen/x86

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 21:19:49 UTC 2020

Modified Files:
src/sys/arch/xen/x86 [bouyer-xenpvh]: autoconf.c

Log Message:
remove stray 'else'


To generate a diff of this commit:
cvs rdiff -u -r1.23.8.1 -r1.23.8.2 src/sys/arch/xen/x86/autoconf.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/amd64/conf

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 21:20:16 UTC 2020

Modified Files:
src/sys/arch/amd64/conf [bouyer-xenpvh]: XEN3_DOM0

Log Message:
no MULTIPROCESSOR so NO_PREEMTION


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.175.4.1 src/sys/arch/amd64/conf/XEN3_DOM0

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



CVS commit: src/sys/arch/xen/xen

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 20:17:36 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
convert to bus_dma(9)

simplify and fix error handling in xbd_handler(), expect backend
to not use the grant once request is finished, and avoid leaking
bounce buffer when the request using it happens to end with error

in xbd_diskstart() only do the RING_PUSH_REQUESTS_AND_CHECK_NOTIFY()
when actually the request was pushed successfully


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/xen/xen/xbd_xenbus.c

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 19:56:14 UTC 2020

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

Log Message:
Oops missed one more NULL -> NOCRED


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/sys/kern/vfs_vnops.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/xen/x86

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 19:53:37 UTC 2020

Modified Files:
src/sys/arch/xen/x86 [bouyer-xenpvh]: xen_intr.c

Log Message:
We need to call x86_init_preempt() for all CPUs now.


To generate a diff of this commit:
cvs rdiff -u -r1.21.2.2 -r1.21.2.3 src/sys/arch/xen/x86/xen_intr.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/xen/xen

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 18:14:09 UTC 2020

Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
add KASSERT() for unaligned case to make sure it indeed happens only
for requests via physio


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/xen/xen/xbd_xenbus.c

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



CVS commit: [netbsd-9] src/external/bsd/dhcpcd/dist/src

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 17:57:13 UTC 2020

Modified Files:
src/external/bsd/dhcpcd/dist/src [netbsd-9]: dhcp6.c

Log Message:
Fix SMALL builds (requested by roy informally)


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.6 -r1.11.2.7 src/external/bsd/dhcpcd/dist/src/dhcp6.c

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



CVS commit: src/doc

2020-04-12 Thread Leonardo Taccari
Module Name:src
Committed By:   leot
Date:   Sun Apr 12 17:49:00 UTC 2020

Modified Files:
src/doc: HACKS

Log Message:
Hack removed in src/external/bsd/nvi/usr.bin/nvi/Makefile,-r1.21

It is no longer needed, per PR bin/54656.


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/doc/HACKS

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



CVS commit: [netbsd-9] src/doc

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 17:34:34 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Ticket #830


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-9.1

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



CVS commit: [netbsd-9] src

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 17:33:24 UTC 2020

Modified Files:
src/doc [netbsd-9]: 3RDPARTY
src/external/bsd/dhcpcd/dist/src [netbsd-9]: defs.h dhcp6.c

Log Message:
Apply patch, requested by roy in ticket #830:

external/bsd/dhcpcd/dist/src/dhcp6.c(apply patch)
external/bsd/dhcpcd/dist/src/defs.h (apply patch)
doc/3RDPARTY(apply patch)

Update to dhcpcd-8.1.8 which fixes a compile issue.


To generate a diff of this commit:
cvs rdiff -u -r1.1640.2.13 -r1.1640.2.14 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.25.2.7 -r1.1.1.25.2.8 \
src/external/bsd/dhcpcd/dist/src/defs.h
cvs rdiff -u -r1.11.2.5 -r1.11.2.6 src/external/bsd/dhcpcd/dist/src/dhcp6.c

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



CVS commit: src/external/bsd/nvi/usr.bin/nvi

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 17:28:57 UTC 2020

Modified Files:
src/external/bsd/nvi/usr.bin/nvi: Makefile

Log Message:
Remove no longer needed workaround for PR/54656.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/bsd/nvi/usr.bin/nvi/Makefile

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



CVS commit: [bouyer-xenpvh] src/sys/arch

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 17:25:53 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64 [bouyer-xenpvh]: genassym.cf lock_stubs.S
spl.S vector.S
src/sys/arch/i386/i386 [bouyer-xenpvh]: genassym.cf i386_trap.S
locore.S spl.S vector.S
src/sys/arch/x86/include [bouyer-xenpvh]: cpu.h intrdefs.h
src/sys/arch/x86/isa [bouyer-xenpvh]: isa_machdep.c
src/sys/arch/x86/x86 [bouyer-xenpvh]: i8259.c intr.c
src/sys/arch/xen/include [bouyer-xenpvh]: hypervisor.h intr.h
src/sys/arch/xen/x86 [bouyer-xenpvh]: hypervisor_machdep.c xen_intr.c
src/sys/arch/xen/xen [bouyer-xenpvh]: clock.c evtchn.c xenevt.c

Log Message:
Get rid of xen-specific ci_x* interrupt handling:
- use the general SIR mechanism, reserving 3 more slots for IPL_VM, IPL_SCHED
  and IPL_HIGH
- remove specific handling from C sources, or change to ipending
- convert IPL number to SIR number in various places
- Remove XUNMASK/XPENDING in assembly or change to IUNMASK/IPENDING
- remove Xen-specific ci_xsources, ci_xmask, ci_xunmask, ci_xpending from
  struct cpu_info
- for now remove a KASSERT that there are no pending interrupts in
  idle_block(). We can get there with some software interrupts pending
  in autoconf XXX needs to be looked at.


To generate a diff of this commit:
cvs rdiff -u -r1.82.4.2 -r1.82.4.3 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.35.6.1 -r1.35.6.2 src/sys/arch/amd64/amd64/lock_stubs.S
cvs rdiff -u -r1.43.4.5 -r1.43.4.6 src/sys/arch/amd64/amd64/spl.S
cvs rdiff -u -r1.73.6.2 -r1.73.6.3 src/sys/arch/amd64/amd64/vector.S
cvs rdiff -u -r1.119.4.2 -r1.119.4.3 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.20 -r1.20.6.1 src/sys/arch/i386/i386/i386_trap.S
cvs rdiff -u -r1.179.2.1 -r1.179.2.2 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.50.4.4 -r1.50.4.5 src/sys/arch/i386/i386/spl.S
cvs rdiff -u -r1.85.6.3 -r1.85.6.4 src/sys/arch/i386/i386/vector.S
cvs rdiff -u -r1.117.4.3 -r1.117.4.4 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/arch/x86/include/intrdefs.h
cvs rdiff -u -r1.44 -r1.44.10.1 src/sys/arch/x86/isa/isa_machdep.c
cvs rdiff -u -r1.23 -r1.23.10.1 src/sys/arch/x86/x86/i8259.c
cvs rdiff -u -r1.150.6.1 -r1.150.6.2 src/sys/arch/x86/x86/intr.c
cvs rdiff -u -r1.49 -r1.49.10.1 src/sys/arch/xen/include/hypervisor.h
cvs rdiff -u -r1.53 -r1.53.6.1 src/sys/arch/xen/include/intr.h
cvs rdiff -u -r1.36 -r1.36.8.1 src/sys/arch/xen/x86/hypervisor_machdep.c
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/xen/x86/xen_intr.c
cvs rdiff -u -r1.80.6.1 -r1.80.6.2 src/sys/arch/xen/xen/clock.c
cvs rdiff -u -r1.88.2.2 -r1.88.2.3 src/sys/arch/xen/xen/evtchn.c
cvs rdiff -u -r1.56 -r1.56.2.1 src/sys/arch/xen/xen/xenevt.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/xen/x86

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 17:17:38 UTC 2020

Modified Files:
src/sys/arch/xen/x86 [bouyer-xenpvh]: xen_ipi.c

Log Message:
Add XEN_IPI_KPREEMPT to list of valid IPIs


To generate a diff of this commit:
cvs rdiff -u -r1.35.6.1 -r1.35.6.2 src/sys/arch/xen/x86/xen_ipi.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/xen/x86

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 17:16:58 UTC 2020

Modified Files:
src/sys/arch/xen/x86 [bouyer-xenpvh]: xenfunc.c

Log Message:
kpreempt_disable() only for x86_64 (which calls pmap_changeprot_local)).
On i386 curcpu() is not valid yet and we don't need preemption disabled.


To generate a diff of this commit:
cvs rdiff -u -r1.26.8.1 -r1.26.8.2 src/sys/arch/xen/x86/xenfunc.c

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



CVS commit: src/distrib/notes/hp300

2020-04-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Apr 12 17:13:30 UTC 2020

Modified Files:
src/distrib/notes/hp300: hardware

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/distrib/notes/hp300/hardware

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



CVS commit: src/sys/kern

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 17:02:52 UTC 2020

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

Log Message:
fix wapbl_discard() to actually discard the queued bufs properly - need
to set BC_INVAL for them, and also need to explicitly remove them
from the BQ_LOCKED queue

fixes DIAGNOSTIC panic when force unmounting unresponsive disk device
PR kern/51178 by Michael van Elst


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/vfs_wapbl.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/i386/i386

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 16:35:49 UTC 2020

Modified Files:
src/sys/arch/i386/i386 [bouyer-xenpvh]: vector.S

Log Message:
The critical section handling is gone, remove comment about it


To generate a diff of this commit:
cvs rdiff -u -r1.85.6.2 -r1.85.6.3 src/sys/arch/i386/i386/vector.S

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 15:55:53 UTC 2020

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

Log Message:
delete debugging printf.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/vfs_vnops.c

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



CVS commit: src/sys/uvm/pmap

2020-04-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Apr 12 15:36:18 UTC 2020

Modified Files:
src/sys/uvm/pmap: pmap.c pmap_tlb.c

Log Message:
Use UVMHIST_CALLARGS


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.31 -r1.32 src/sys/uvm/pmap/pmap_tlb.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/xen/xen

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 13:57:07 UTC 2020

Modified Files:
src/sys/arch/xen/xen: if_xennet_xenbus.c

Log Message:
move IFNET_UNLOCK() immediatelly after xennet_stop() call in detach,
doesn't need to be held for the disestablish


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/xen/xen/if_xennet_xenbus.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/xen/xen

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 13:55:06 UTC 2020

Modified Files:
src/sys/arch/xen/xen: if_xennet_xenbus.c

Log Message:
fix locking against myself panic in xennet_stop() on 'ifconfig xennet0 down'

xennet_stop() is called with IFNET already held


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/xen/xen/if_xennet_xenbus.c

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 13:37:12 UTC 2020

Modified Files:
src/sys/kern: syscalls.master

Log Message:
change ' \t' to '\t'


To generate a diff of this commit:
cvs rdiff -u -r1.299 -r1.300 src/sys/kern/syscalls.master

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 13:30:16 UTC 2020

Modified Files:
src/sys/kern: syscalls.master

Log Message:
Change STD[:random-whitespace:]RUMP to STD\tRUMP


To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/kern/syscalls.master

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



CVS commit: src/sys/kern

2020-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 12 13:12:42 UTC 2020

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

Log Message:
Pass NOCRED instead of NULL for credentials. These routines are supposed
to be accessing system ACL's on behalf of the kernel. This code appears
to be copied from FreeBSD, but there it works because in FreeBSD NOCRED
is 0, ours is -1. I guess nobody has used system extended attributes on
NetBSD yet :-)


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/sys/kern/vfs_vnops.c

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



CVS commit: src/sys/netinet6

2020-04-12 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Apr 12 12:13:52 UTC 2020

Modified Files:
src/sys/netinet6: nd6.c

Log Message:
nd6: RTM_MISS reports RTA_AUTHOR once more

Just moves the logic to send RTM_MISS after the ICMP6 report as we
rely on that function to extract the requesting address.

Fixes PR kern/55164.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/netinet6/nd6.c

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



CVS commit: [bouyer-xenpvh] src/sys/arch/xen/xen

2020-04-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Apr 12 11:16:59 UTC 2020

Modified Files:
src/sys/arch/xen/xen [bouyer-xenpvh]: evtchn.c

Log Message:
Now that we return from hypervisor_callback via Xdoreti, no need to emulate it
in evtchn_do_event() any more.


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.1 -r1.88.2.2 src/sys/arch/xen/xen/evtchn.c

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



CVS commit: src/sys/kern

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 08:51:41 UTC 2020

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

Log Message:
fix race between wapbl_discard() and wapbl_biodone() on forced
unmount on shutdown with slow I/O device

wapbl_discard() needs to hold both wl_mtx and bufcache_lock while
manipulating wl_entries - the rw lock is not enough, because
wapbl_biodone() only takes wl_mtx while removing the finished entry
from list

wapbl_biodone() must take bufcache_lock before reading we->we_wapbl,
so it's blocked until wapbl_discard() finishes, and takes !wl path
appropriately

this is supposed to fix panic on shutdown:
[ 67549.6304123] forcefully unmounting / (/dev/wd0a)...
...
[ 67549.7272030] panic: mutex_vector_enter,510: uninitialized lock 
(lock=0xa722a4f4f5b0, from=80a884fa)
...
[ 67549.7272030] wapbl_biodone() at netbsd:wapbl_biodone+0x4d
[ 67549.7272030] biointr() at netbsd:biointr+0x7d
[ 67549.7272030] softint_dispatch() at netbsd:softint_dispatch+0x12c
[ 67549.7272030] Xsoftintr() at netbsd:Xsoftintr+0x4f


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/kern/vfs_wapbl.c

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



CVS commit: [netbsd-9] src/sys/dev/acpi

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:48:57 UTC 2020

Modified Files:
src/sys/dev/acpi [netbsd-9]: acpi_ec.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #829):

sys/dev/acpi/acpi_ec.c: revision 1.78
sys/dev/acpi/acpi_ec.c: revision 1.79
sys/dev/acpi/acpi_ec.c: revision 1.80
sys/dev/acpi/acpi_ec.c: revision 1.81

Revert acpi_ec.c 1.77.
We will do this another way.
ok msaitoh

Revert acpi_ec.c 1.76.
We will do this another way, and separate KNF fixes from the critical
functional change.
ok msaitoh

KNF

Reject overly large widths, from mlelstv.
We are returning an ACPI_INTEGER (= uint64_t), so it doesn't make
sense to handle more than 64 bits.

Apparently there are some ACPIs out there that ask for unreasonably
large widths here.  Just reject those requests, rather than writing
past the caller's stack buffer.

Previously we attempted to fix this by copying byte by byte as large
as the caller asked, in order to avoid the undefined behaviour of
shifting past the size of ACPI_INTEGER, but that just turned a shift
(which might have been harmless on real machines) into a stack buffer
overflow (!).

ok msaitoh


To generate a diff of this commit:
cvs rdiff -u -r1.75.20.1 -r1.75.20.2 src/sys/dev/acpi/acpi_ec.c

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



CVS commit: [netbsd-9] src/doc

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:50:25 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Tickets #824 - #829


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-9.1

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



CVS commit: [netbsd-9] src/sys/dev/usb

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:45:31 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-9]: usbdevs.h usbdevs_data.h

Log Message:
Regen for ticket #828 (uxrcom addition)


To generate a diff of this commit:
cvs rdiff -u -r1.760.4.3 -r1.760.4.4 src/sys/dev/usb/usbdevs.h \
src/sys/dev/usb/usbdevs_data.h

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



CVS commit: [netbsd-9] src

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:44:43 UTC 2020

Modified Files:
src/distrib/sets/lists/man [netbsd-9]: mi
src/share/man/man4 [netbsd-9]: Makefile ucom.4
src/sys/dev/usb [netbsd-9]: files.usb ukyopon.c umodem.c
umodem_common.c usbdevices.config usbdevs
Added Files:
src/share/man/man4 [netbsd-9]: uxrcom.4
src/sys/dev/usb [netbsd-9]: uxrcom.c

Log Message:
Pull up following revision(s) (requested by simonb in ticket #828):

share/man/man4/uxrcom.4: revision 1.1
distrib/sets/lists/man/mi: revision 1.1687
share/man/man4/uxrcom.4: revision 1.2
share/man/man4/ucom.4: revision 1.28
sys/dev/usb/uxrcom.c: revision 1.1
sys/dev/usb/umodem.c: revision 1.74
sys/dev/usb/umodem_common.c: revision 1.33
sys/dev/usb/ukyopon.c: revision 1.26
sys/dev/usb/files.usb: revision 1.173
share/man/man4/Makefile: revision 1.704
sys/dev/usb/usbdevs: revision 1.781
sys/dev/usb/usbdevices.config: revision 1.38

Add uxrcom driver for Exar XR21V141x USB serial adapters.  Based in part
on the OpenBSD single-port XR21V1410 uxrcom driver, but adds support
for multi-port chipsets and uses the common umodem framework instead of
being a standalone driver.

Thanks to skrll@ for much USB clue and mrg@ for financing the
development of this driver.

Add NetBSD CVS tag.


To generate a diff of this commit:
cvs rdiff -u -r1.1649.2.5 -r1.1649.2.6 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.680.2.3 -r1.680.2.4 src/share/man/man4/Makefile
cvs rdiff -u -r1.27 -r1.27.2.1 src/share/man/man4/ucom.4
cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/uxrcom.4
cvs rdiff -u -r1.156.2.1 -r1.156.2.2 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/dev/usb/ukyopon.c
cvs rdiff -u -r1.72 -r1.72.2.1 src/sys/dev/usb/umodem.c
cvs rdiff -u -r1.30 -r1.30.2.1 src/sys/dev/usb/umodem_common.c
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/dev/usb/usbdevices.config
cvs rdiff -u -r1.770.4.3 -r1.770.4.4 src/sys/dev/usb/usbdevs
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/usb/uxrcom.c

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



CVS commit: [netbsd-9] src/sys/external/bsd/ipf/netinet

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:39:42 UTC 2020

Modified Files:
src/sys/external/bsd/ipf/netinet [netbsd-9]: fil.c ip_frag.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #827):

sys/external/bsd/ipf/netinet/fil.c: revision 1.32
sys/external/bsd/ipf/netinet/fil.c: revision 1.33
sys/external/bsd/ipf/netinet/ip_frag.c: revision 1.8

PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
Fix incorrect byte order.

PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
- make sure frag is initialized to 0
- initialize ipfr_p field

PR/55149: Kouichi Hashikawa: Get morefrag before we strip it out from off


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.2 -r1.29.2.3 src/sys/external/bsd/ipf/netinet/fil.c
cvs rdiff -u -r1.7 -r1.7.6.1 src/sys/external/bsd/ipf/netinet/ip_frag.c

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



CVS commit: [netbsd-9] src

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:35:40 UTC 2020

Modified Files:
src/lib/libpthread/arch/powerpc [netbsd-9]: pthread_md.h
src/sys/arch/powerpc/powerpc [netbsd-9]: sig_machdep.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #826):

lib/libpthread/arch/powerpc/pthread_md.h: revision 1.9
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.48

Revert previous:
http://mail-index.netbsd.org/source-changes/2020/02/20/msg114173.html
Comment turned out to be wrong, and KASSERT fires for oea.

XXX
Need to revisit shortly...


To generate a diff of this commit:
cvs rdiff -u -r1.7.46.1 -r1.7.46.2 \
src/lib/libpthread/arch/powerpc/pthread_md.h
cvs rdiff -u -r1.46.4.1 -r1.46.4.2 src/sys/arch/powerpc/powerpc/sig_machdep.c

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



CVS commit: [netbsd-9] src

2020-04-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 12 08:29:41 UTC 2020

Modified Files:
src/doc [netbsd-9]: 3RDPARTY
src/external/bsd/dhcpcd/dist/src [netbsd-9]: arp.c arp.h bpf.c bpf.h
common.h defs.h dhcp.c dhcp6.c dhcp6.h dhcpcd.c eloop.h if-bsd.c
if-options.c if.c if.h ipv4ll.c ipv6.c ipv6nd.c ipv6nd.h logerr.c
logerr.h

Log Message:
Apply patch, requested by roy in ticket #825:

external/bsd/dhcpcd/dist/src/arp.c  (apply patch)
external/bsd/dhcpcd/dist/src/arp.h  (apply patch)
external/bsd/dhcpcd/dist/src/bpf.c  (apply patch)
external/bsd/dhcpcd/dist/src/bpf.h  (apply patch)
external/bsd/dhcpcd/dist/src/common.h   (apply patch)
external/bsd/dhcpcd/dist/src/defs.h (apply patch)
external/bsd/dhcpcd/dist/src/dhcp.c (apply patch)
external/bsd/dhcpcd/dist/src/dhcp6.c(apply patch)
external/bsd/dhcpcd/dist/src/dhcp6.h(apply patch)
external/bsd/dhcpcd/dist/src/dhcpcd.c   (apply patch)
external/bsd/dhcpcd/dist/src/eloop.h(apply patch)
external/bsd/dhcpcd/dist/src/if-bsd.c   (apply patch)
external/bsd/dhcpcd/dist/src/if-options.c   (apply patch)
external/bsd/dhcpcd/dist/src/if.c   (apply patch)
external/bsd/dhcpcd/dist/src/if.h   (apply patch)
external/bsd/dhcpcd/dist/src/ipv4ll.c   (apply patch)
external/bsd/dhcpcd/dist/src/ipv6.c (apply patch)
external/bsd/dhcpcd/dist/src/ipv6nd.c   (apply patch)
external/bsd/dhcpcd/dist/src/ipv6nd.h   (apply patch)
external/bsd/dhcpcd/dist/src/logerr.c   (apply patch)
external/bsd/dhcpcd/dist/src/logerr.h   (apply patch)
doc/3RDPARTY(apply patch)

Update to dhcpcd-8.1.7 which fixes the following issues:
* Decode interface complex interface names eth0.100:2 eth0i100:2.
  This allows us to ignore some virtual interfaces by default
* ARP: Report L2 header address on conflict for more clarity
* DHCP: Support jumbo frames (untested)
* DHCP6: Clean up old lease on failure to confirm/rebind, etc
* RA: Prefer older routers - fixes PR bin/54997
* INET6: Obscure prefixes are now calculated correctly
* macro logerr commands to allow an alternative logger


To generate a diff of this commit:
cvs rdiff -u -r1.1640.2.12 -r1.1640.2.13 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.11.2.2 -r1.1.1.11.2.3 \
src/external/bsd/dhcpcd/dist/src/arp.c
cvs rdiff -u -r1.1.1.8.2.1 -r1.1.1.8.2.2 \
src/external/bsd/dhcpcd/dist/src/arp.h \
src/external/bsd/dhcpcd/dist/src/common.h
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/external/bsd/dhcpcd/dist/src/bpf.c
cvs rdiff -u -r1.1.1.6.2.1 -r1.1.1.6.2.2 \
src/external/bsd/dhcpcd/dist/src/bpf.h
cvs rdiff -u -r1.1.1.25.2.6 -r1.1.1.25.2.7 \
src/external/bsd/dhcpcd/dist/src/defs.h
cvs rdiff -u -r1.23.2.6 -r1.23.2.7 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.11.2.4 -r1.11.2.5 src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.1.1.12 -r1.1.1.12.2.1 \
src/external/bsd/dhcpcd/dist/src/dhcp6.h
cvs rdiff -u -r1.23.2.5 -r1.23.2.6 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.1.1.5.2.1 -r1.1.1.5.2.2 \
src/external/bsd/dhcpcd/dist/src/eloop.h
cvs rdiff -u -r1.10.2.4 -r1.10.2.5 src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.16.2.3 -r1.16.2.4 \
src/external/bsd/dhcpcd/dist/src/if-options.c
cvs rdiff -u -r1.1.1.14.2.3 -r1.1.1.14.2.4 \
src/external/bsd/dhcpcd/dist/src/if.c
cvs rdiff -u -r1.1.1.10.2.3 -r1.1.1.10.2.4 \
src/external/bsd/dhcpcd/dist/src/if.h
cvs rdiff -u -r1.1.1.9.2.1 -r1.1.1.9.2.2 \
src/external/bsd/dhcpcd/dist/src/ipv4ll.c
cvs rdiff -u -r1.3.2.5 -r1.3.2.6 src/external/bsd/dhcpcd/dist/src/ipv6.c
cvs rdiff -u -r1.10.2.5 -r1.10.2.6 src/external/bsd/dhcpcd/dist/src/ipv6nd.c
cvs rdiff -u -r1.1.1.10.2.2 -r1.1.1.10.2.3 \
src/external/bsd/dhcpcd/dist/src/ipv6nd.h
cvs rdiff -u -r1.2 -r1.2.2.1 src/external/bsd/dhcpcd/dist/src/logerr.c
cvs rdiff -u -r1.1.1.5 -r1.1.1.5.2.1 \
src/external/bsd/dhcpcd/dist/src/logerr.h

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



CVS commit: src/sys/arch

2020-04-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Apr 12 07:49:58 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c cpufunc.c cpuswitch.S
db_trace.c genassym.cf locore.S vectors.S vm_machdep.c
src/sys/arch/aarch64/conf: Makefile.aarch64
src/sys/arch/aarch64/include: armreg.h asm.h cpufunc.h proc.h
src/sys/arch/arm/conf: files.arm
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add support for Pointer Authentication (PAC).

We use the "pac-ret" option, to sign the return instruction pointer on
function entry, and authenticate it on function exit. This acts as a
mitigation against ROP.

The authentication uses a per-lwp (secret) I-A key stored in the 128bit
APIAKey register and part of the lwp context. During lwp creation, the
kernel generates a random key, and during context switches, it installs
the key of the target lwp on the CPU.

Userland cannot read the APIAKey register directly. However, it can sign
its pointers with it, because the register is architecturally shared
between userland and the kernel. Although part of the CPU design, it is
a bit of an undesired behavior, because it allows to forge valid kernel
pointers from userland. To avoid that, we don't share the key with
userland, and rather switch it in EL0<->EL1 transitions. This means that
when userland executes, a different key is loaded in APIAKey than the one
the kernel uses. For now the userland key is a fixed 128bit zero value.

The DDB stack unwinder is changed to strip the authentication code from
the pointers in lr.

Two problems are known:

 * Currently the idlelwps' keys are not really secret. This is because
   the RNG is not yet available when we spawn these lwps. Not overly
   important, but would be nice to fix with UEFI RNG.
 * The key switching in EL0<->EL1 transitions is not the most optimized
   code on the planet. Instead of checking aarch64_pac_enabled, it would
   be better to hot-patch the code at boot time, but there currently is
   no hot-patch support on aarch64.

Tested on Qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/cpufunc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/aarch64/aarch64/cpuswitch.S
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/aarch64/db_trace.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/aarch64/aarch64/genassym.cf
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/aarch64/aarch64/locore.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/vectors.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/vm_machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/conf/Makefile.aarch64
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/aarch64/include/armreg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/asm.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/include/cpufunc.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/include/proc.h
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/arm/conf/files.arm
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: src/sys/dev/usb

2020-04-12 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Apr 12 07:41:11 UTC 2020

Modified Files:
src/sys/dev/usb: ums.c

Log Message:
further tweaks for USB_PRODUCT_MICROSOFT_24GHZ_XCVR80 from PR kern/55161

remove case for USB_PRODUCT_MICROSOFT_24GHZ_XCVR70, likely needs similar
tweaks and can't really be added untested


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/usb/ums.c

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



CVS commit: src/sys

2020-04-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Apr 12 07:16:09 UTC 2020

Modified Files:
src/sys/kern: subr_cprng.c
src/sys/sys: cprng.h

Log Message:
Don't inline cprng_strong{32,64}(), so they can be called from asm.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/kern/subr_cprng.c
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/cprng.h

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