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

2020-05-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat May  9 08:01:38 UTC 2020

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

Log Message:
Also set x86_delay to xen_delay, unbreaks PVH


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/xen/xen/hypervisor.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/usb

2020-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 08:16:54 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-9]: if_cdce.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #896):

sys/dev/usb/if_cdce.c: revision 1.71

Search the descriptors of the appropriate interface to ensure correct
match.

PR kern/55240 cdce(4) error "no data interface" when ECM USB IF are
preceded by ACM USB IF


To generate a diff of this commit:
cvs rdiff -u -r1.53.2.1 -r1.53.2.2 src/sys/dev/usb/if_cdce.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/cddl/osnet/dist/uts/common/fs/zfs

2020-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 08:20:34 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-9]: zfs_vnops.c
zfs_znode.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #897):

external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c: revision 1.33
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.65

Revert Rev. 1.63 and add a comment why we have to zil_commit() here:

Operation zfs_znode.c::zfs_zget_cleaner() depends on this
zil_commit() as a barrier to guarantee the znode cannot
get freed before its log entries are resolved.

Operation zfs_zget_cleaner() cannot fail, comment and add assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.7 -r1.50.2.8 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
cvs rdiff -u -r1.29 -r1.29.2.1 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.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-05-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat May  9 08:21:36 UTC 2020

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

Log Message:
Tickets #896 and #897


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.54 -r1.1.2.55 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: src/lib/libc/arch/hppa/sys

2020-05-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat May  9 08:25:34 UTC 2020

Modified Files:
src/lib/libc/arch/hppa/sys: __vfork14.S ptrace.S

Log Message:
No need to .import __cerror as SYS.h does it


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/hppa/sys/__vfork14.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/hppa/sys/ptrace.S

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



CVS commit: src/sys/dev/nvmm

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat May  9 08:39:07 UTC 2020

Modified Files:
src/sys/dev/nvmm: nvmm.c nvmm_internal.h
src/sys/dev/nvmm/x86: nvmm_x86_vmx.c

Log Message:
On Intel CPUs, CPUID leaf 0xB, too, provides topology information, so
filter it correctly, to avoid inconsistencies if the host has SMT.

This fixes HaikuOS which fetches SMT information from there and would
panic because of the inconsistencies.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/nvmm/nvmm_internal.h
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

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



CVS commit: src/tests/lib/libi386

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat May  9 09:08:41 UTC 2020

Modified Files:
src/tests/lib/libi386: t_user_ldt.c

Log Message:
A kernel without USER_LDT returns ENOSYS, not ENOTSUP.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libi386/t_user_ldt.c

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  9 12:20:50 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: evp.inc

Log Message:
Ensure that -DOPENSSL_CPUID_OBJ is passed when compiling AES EVP bits

This way CPUs that support AES-NI actually get detected properly ;_;

(... just one part of the puzzle)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2020-05-09 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat May  9 13:16:43 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: crypto.inc evp.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64:
crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax: crypto.inc
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64: crypto.inc

Log Message:
Define OPENSSL_CPUID_OBJ in general CPPFLAGS instead of CRYPTOCPPFLAGS

This is used in various parts of the distribution, defining it here
avoids future problems with CPU-specific features not being detected.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/openssl/lib/libcrypto/crypto.inc \
src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc
cvs rdiff -u -r1.10 -r1.11 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/crypto.inc
cvs rdiff -u -r1.11 -r1.12 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/crypto.inc

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



CVS commit: src/sys/uvm

2020-05-09 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May  9 15:13:19 UTC 2020

Modified Files:
src/sys/uvm: uvm_extern.h uvm_map.c

Log Message:
Make the uvm_voaddr structure more compact, only occupying 2 pointers
worth of space, by encoding the type in the lower bits of the object
pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.382 -r1.383 src/sys/uvm/uvm_map.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/nvmm/x86

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat May  9 16:18:57 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86.c nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
Improve the CPUID emulation of basic leaves:
 - Hide DCA and PQM, they cannot be used in guests.
 - On Intel, explicitly handle each basic leaf until 0x16.
 - On AMD, explicitly handle each basic leaf until 0x0D.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  9 21:50:39 UTC 2020

Modified Files:
src/sys/uvm: uvm_swap.c

Log Message:
Implement swap encryption.

Enabled by sysctl -w vm.swap_encrypt=1.  Key is generated lazily when
we first need to swap a page.  Key is chosen independently for each
swap device.  The ith swap page is encrypted with AES256-CBC using
AES256_k(le32enc(i) || 0^96) as the initialization vector.  Can be
changed at any time; no need for compatibility with on-disk formats.
Costs one bit of memory per page in each swapdev, plus a few hundred
bytes per swapdev to store the expanded AES key.

Shoulda done this decades ago!  Plan to enable this by default;
performance impact is unlikely to matter because it only happens when
you're already swapping anyway.  Much easier to set up than cgd, so
we can rip out all the documentation about carefully setting up
random-keyed cgd at the right time.


To generate a diff of this commit:
cvs rdiff -u -r1.186 -r1.187 src/sys/uvm/uvm_swap.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

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat May  9 22:00:48 UTC 2020

Modified Files:
src/sys/uvm: uvm_swap.c

Log Message:
Avoid overflow if a very large number of pages are swapped at once.

Unlikely, but let's make sure we don't hit this ever.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/uvm/uvm_swap.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-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 00:08:12 UTC 2020

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

Log Message:
Use a temporary pool to consolidate entropy atomically.

There was a low-probability race with the entropy consolidation
logic: calls to entropy_extract at the same time as consolidation is
happening might witness partial contributions from the CPUs when
needed=256, say 64 bits at a time.

To avoid this, feed everything from the per-CPU pools into a
temporary pool, and then feed the temporary pool into the global pool
under the lock at the same time as we update needed.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/kern_entropy.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-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 01:29:40 UTC 2020

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

Log Message:
Fix comments.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/kern_entropy.c

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



CVS commit: src/share/man/man7

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 02:30:33 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Tweak kern.arandom documentation.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/share/man/man7/sysctl.7

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



CVS commit: src/share/man/man7

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 02:31:29 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Document vm.swap_encrypt.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/share/man/man7/sysctl.7

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



CVS commit: src/share/man/man7

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 02:32:32 UTC 2020

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Mark experimental-default-off knobs clearly as such.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/share/man/man7/sysctl.7

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



CVS commit: src/sys/uvm

2020-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 02:38:10 UTC 2020

Modified Files:
src/sys/uvm: uvm_swap.c

Log Message:
Rename things so the symbol better matches the sysctl name.

No functional change intended, except that the symbol that was
previously `uvm_swap_encryption' is now `uvm_swap_encrypt', backing
the sysctl knob `vm.swap_encrypt'.


To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/uvm/uvm_swap.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-05-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun May 10 02:56:12 UTC 2020

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

Log Message:
Make rndctl -E/-C reset entropy accounting.

If we don't trust a source, it's unreasonable to trust any entropy it
previously provided, and we don't have any way to undo only the
effects of that source, so just zero our estimate of the entropy in
the pool and start over.

(However, keep the samples already in the pool -- just treat them as
though they had zero entropy and start gathering more.)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/kern_entropy.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/nvmm/x86

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun May 10 06:24:16 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
Respect the convention for the hypervisor information: return the highest
hypervisor leaf in 0x4000.EAX.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun May 10 06:30:57 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/x86/include: cpu_rng.h
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Reintroduce cpu_rng_early_sample(), but this time with embedded detection
for RDRAND/RDSEED, because TSC is not very strong.


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/include/cpu_rng.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/x86/cpu_rng.c

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



CVS commit: src

2020-05-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun May 10 06:38:24 UTC 2020

Modified Files:
src/doc: HACKS
src/share/mk: bsd.lib.mk

Log Message:
Pass -Wno-unused-command-line-argument for LLVM, discussed on
tech-toolchain@.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/doc/HACKS
cvs rdiff -u -r1.380 -r1.381 src/share/mk/bsd.lib.mk

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



CVS commit: src/libexec/ld.elf_so/arch/hppa

2020-05-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun May 10 06:42:38 UTC 2020

Modified Files:
src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c rtld_start.S

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c
cvs rdiff -u -r1.12 -r1.13 src/libexec/ld.elf_so/arch/hppa/rtld_start.S

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