CVS commit: src/sys/dev/sdmmc

2020-05-11 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May 11 09:51:47 UTC 2020

Modified Files:
src/sys/dev/sdmmc: sdmmc_mem.c

Log Message:
If the controller doesn't support switch func (opcode 6) then skip
setting this but continue with other settings.  This allows us to use
a card, albeit at a lower speed.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/sdmmc/sdmmc_mem.c

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



CVS commit: src/share/mk

2020-05-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 11 10:21:24 UTC 2020

Modified Files:
src/share/mk: bsd.kmodule.mk

Log Message:
Update the list of hppa options to build working kernel modules.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/share/mk/bsd.kmodule.mk

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



CVS commit: src/sys/arch/hppa/conf

2020-05-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 11 10:23:37 UTC 2020

Modified Files:
src/sys/arch/hppa/conf: GENERIC

Log Message:
Enable modules


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hppa/conf/GENERIC

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



CVS commit: src/doc

2020-05-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 11 10:34:37 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
Note hppa modules default


To generate a diff of this commit:
cvs rdiff -u -r1.2685 -r1.2686 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/tests/lib/libc/sys

2020-05-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon May 11 11:03:15 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_register_wait.h

Log Message:
Do not fail when trying to kill a dying process

A dying process can disappear for a while. Rather than aborting, retry
sending SIGKILL to it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_ptrace_register_wait.h

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



CVS commit: src/tests/lib/libc/sys

2020-05-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon May 11 12:17:57 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_register_wait.h

Log Message:
Simplify previous

Emit SIGKILL without a loop and without checking for exact process status
once it is collected.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_register_wait.h

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



CVS commit: src/usr.bin/calendar/calendars

2020-05-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon May 11 12:42:58 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars: calendar.birthday

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/calendar/calendars/calendar.birthday

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-05-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 11 14:44:16 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: cpu.c

Log Message:
Add support for the ARMv8.5-RNG CPU random number generator.

We use the RNDRRS system register.  I made the following two
wild-arse guesses about the architecture of real implementations,
which might not exist yet:

1. There's only one physical source per CPU package, so not worth
   attaching one per core.

2. Like other CPU RNGs -- RDSEED, VIA C3 -- this probably gives about
   half a bit of entropy per bit of data (although perhaps we should
   say zero and revisit this once it arrives on real silicon).

Tested in qemu as well as I can, using `-cpu max' (which doesn't get
to userland for unrelated reasons).

This uses the numeric notation `mrs %0, s3_3_c2_c4_1' for the rndrrs
system register instead of the more legible `mrs %0, rndrrs' as
suggested in the ARMv8.5 ARM.  Why?

- clang doesn't like `mrs %0, rndrrs' for reasons unclear to me.

- gas only likes it with `.arch armv8.5-a+rng', but there's no clear
  way to keep that scoped; the `.set push/pop' stack that would be an
  obvious choice for this works only on mips.

- gcc supports __attribute__((target("arch=..."))) on functions, but
  the version we use doesn't yet know about armv8.5-a+rng.

Later on, we should replace this by a target attribute and the more
obvious `mrs %0, rndrrs' notation.

ok nick


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/aarch64/cpu.c

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



CVS commit: src/lib/libc/gen

2020-05-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May 11 14:54:34 UTC 2020

Modified Files:
src/lib/libc/gen: posix_spawnp.c

Log Message:
Do as the manual says, and use _PATH_DEFPATH if PATH is not present in
the environment rather than simply turning into posix_spawn() in that case.

Also, we cannot use strtok() to parse PATH, the semantics don't fit the API.
Borrow the guts of execvp for the PATH search.

We still simply check for a file with 'x' permission, and assume that one
will do, whatever it is, which isn't really correct, but ...


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gen/posix_spawnp.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/ic

2020-05-11 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May 11 14:55:20 UTC 2020

Modified Files:
src/sys/dev/ic: w83l518d.c w83l518d_sdmmc.c w83l518dvar.h

Log Message:
Make the driver endian-independent.
Add a quirk so that the bus front end can specify 1-bit only mode.
Remove unused isa includes.
Change the error returned for unsupported opcodes to ENOTSUP, so that
we can pass this back to sdmmc_mem, where it's handled since r1.72 of
  src/sys/dev/sdmmc/sdmmc_mem.c


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/w83l518d.c \
src/sys/dev/ic/w83l518dvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/w83l518d_sdmmc.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-11 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon May 11 15:15:15 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: Makefile.amd64
src/sys/arch/i386/conf: Makefile.i386

Log Message:
Fix GCC flags for Spectre mitigation to really only apply to GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/amd64/conf/Makefile.amd64
cvs rdiff -u -r1.195 -r1.196 src/sys/arch/i386/conf/Makefile.i386

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



CVS commit: src/usr.sbin/sysinst

2020-05-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 11 15:27:41 UTC 2020

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
Redo the root-size-limit check again after we grew the root partition
for kernel dumps. Auto-enable the /usr partition if it overflows.
For all non-root partitions, default to FFSv2.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/sysinst/bsddisklabel.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/sparc64

2020-05-11 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May 11 15:56:15 UTC 2020

Modified Files:
src/sys/arch/sparc64/conf: files.sparc64
Added Files:
src/sys/arch/sparc64/dev: wb_ebus.c

Log Message:
Add an ebus frontend for the Winbond W83l518D SD card reader as found on
Tadpole SPARCLE latops.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/sparc64/conf/files.sparc64
cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/dev/wb_ebus.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-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 11 17:27:48 UTC 2020

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

Log Message:
Work around early calls to cprng_strong.

The bottleneck here is getting percpu_create to work early enough.
We should really fix that, but for now, this workaround will serve.

Should fix PR port-arm32/55252.


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

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



CVS commit: src/usr.sbin/sysinst

2020-05-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 11 17:40:50 UTC 2020

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
When extending a partition (to fill the total disk size) do respect
size limits.
Do not suggest a size limited partition for extension by default.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/bsddisklabel.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/sparc64/conf

2020-05-11 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May 11 18:29:59 UTC 2020

Modified Files:
src/sys/arch/sparc64/conf: GENERIC

Log Message:
Add "wb at ebus" and sdmmc, ld for the SD card reader on SPARCle.


To generate a diff of this commit:
cvs rdiff -u -r1.226 -r1.227 src/sys/arch/sparc64/conf/GENERIC

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



CVS commit: src/sys/arch/sparc/sparc

2020-05-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon May 11 18:38:27 UTC 2020

Modified Files:
src/sys/arch/sparc/sparc: process_machdep.c

Log Message:
Reject setting unaligned Program Counter

Patch taken from OpenBSD.

Tested in qemu.

Fixes PR port-sparc/54734 by Andreas Gustafsson


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/process_machdep.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

2020-05-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May 11 18:49:05 UTC 2020

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

Log Message:
msk(4): moderate no interrupts globally

The global interrupt moderator on mskc(4) is mostly redundant with the Status 
Unit's tx and rx interrupt coalescing for our purpouses

Revisits interrupt moderation change in 1.108.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 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/sys/dev/pci

2020-05-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May 11 19:17:46 UTC 2020

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

Log Message:
msk(4): simplify interrupt return value creation

This also corrects a problem where we would not claim we handled an
interrupt that was ours.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 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/sys/secmodel

2020-05-11 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Mon May 11 19:36:40 UTC 2020

Modified Files:
src/sys/secmodel/securelevel: secmodel_securelevel.c
src/sys/secmodel/suser: secmodel_suser.c

Log Message:
KAUTH_MACHDEP_SVS_DISABLE is deprecated.

sysctl machdep.svs.enabled can't be changed anymore
at runtime because it's now a boot option.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 \
src/sys/secmodel/securelevel/secmodel_securelevel.c
cvs rdiff -u -r1.52 -r1.53 src/sys/secmodel/suser/secmodel_suser.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/libc/sys

2020-05-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon May 11 20:58:48 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_fork_wait.h

Log Message:
Fix race in fork_singalmasked

ELF RTLD after rtld.c r. 1.204 introduced locking that wraps the fork
syscall. This locking changes signal mask of the calling process during
the forking process.

Instead of comparing old and new signal mask, just after the forking
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_ptrace_fork_wait.h

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



CVS commit: src/tests/lib/libc/sys

2020-05-11 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon May 11 21:18:11 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_clone_wait.h

Log Message:
Fix potential race in ptrace(2) clone(2) tests

Instead of comparing old and new signal mask, just after the cloning
operation, check whether the expected signal is still masked and in
another test whether it is still ignored.

Catch up after t_ptrace_fork_wait.h r. 1.2.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_clone_wait.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

2020-05-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 11 21:37:31 UTC 2020

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

Log Message:
Teach percpu to run constructors on CPU attach.

This should make percpu work reliably for things like cprng_strong
much earlier -- not just after all CPUs have been detected.  This is
also necessary (though not on its own sufficient) for CPU hotplug.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/subr_percpu.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-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 11 21:38:54 UTC 2020

Modified Files:
src/sys/kern: init_main.c subr_cprng.c

Log Message:
Move cprng_init before configure.

This makes it available to device drivers, e.g. to generate MAC
addresses at random, without initialization order hacks.

Requires a minor initialization hack for cpu_name(primary cpu) early
on, since that doesn't get set until mi_cpu_attach which may not run
until the middle of configure.  But this hack is less bad than other
initialization order hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.524 -r1.525 src/sys/kern/init_main.c
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/subr_cprng.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-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 11 21:40:12 UTC 2020

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

Log Message:
Remove cprng initialization order hack.

cprng_init now runs early enough that the hack should no longer be
needed to address PR port-arm32/55252.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/subr_cprng.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-11 Thread Yorick Hardy
Module Name:src
Committed By:   yhardy
Date:   Mon May 11 21:51:25 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: md.amd64
src/distrib/sets/lists/tests: md.amd64
src/tests/lib/libi386: Makefile

Log Message:
Fix the build for MKCOMPAT=no.

The t_user_ldt test needs the i386 compat library which is only built
when MKCOMPAT=yes.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/distrib/sets/lists/debug/md.amd64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/tests/md.amd64
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libi386/Makefile

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

2020-05-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon May 11 23:47:45 UTC 2020

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

Log Message:
msk(4): ack Status BMU IRQ only if we're (apparently) caught up with it

Possibility for acking an unprocessed Status BMU IRQ still exists, and
remains handled by the watchdog.  Nevertheless this should reduce the
likelyhood that path is taken.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 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/usr.sbin/sysinst

2020-05-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue May 12 06:23:07 UTC 2020

Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c

Log Message:
Minor tweak to previous: when forcing a /usr partition just to have an
arbitrary extendable partition, still use its default size initially.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/sysinst/bsddisklabel.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/x86/x86

2020-05-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue May 12 06:32:05 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c identcpu_subr.c

Log Message:
Don't use TSC freq value from CPUID if calibration works.

 - When it's the first call of cpu_get_tsc_freq() the HPET is not initialized,
   so try to use CPUID to get TSC freq.
 - If it's the 2nd call, don't use CPUID. Instead, print the difference
   between the calibrated value and CPUID's value if the verbose mode is set.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/identcpu_subr.c

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