dragonfly.git
8 months agoUpgrade dialog(1). 1/2
Daniel Fojt [Mon, 10 Aug 2020 15:51:21 +0000 (17:51 +0200)]
Upgrade dialog(1). 1/2

Merge branch 'vendor/DIALOG' into master.

8 months agovendor/dialog: upgrade from 1.2-20150920 to 1.3-20200327 vendor/DIALOG
Daniel Fojt [Wed, 5 Aug 2020 06:08:20 +0000 (08:08 +0200)]
vendor/dialog: upgrade from 1.2-20150920 to 1.3-20200327

Summary of notable changes:

- add "--week-start" option for calendar widget
- modify editbox widget to add a trailing newline if the text has none
  to ensure the last line is not ignored
- use Gregorian algorithm for leap year
- fix a regression from 2015/05/13 changes for escaping; it is necessary
  to retain backslashes within quotes to make "\Z" escapes work
- change explicit checks for space character used for select or toggle
  to make this rebindable to "TOGGLE"
- improve performance with very long command-lines
- interpret $DIALOGOPTS before expanding "--file", etc., to allow
  the environment variable to turn on tracing in that process
- improve handling of SIGWINCH for several widgets
- add options --print-text-only, and --print-text-size for scripts that
  adjust the widget size according to how the captions are formatted
- when trimming blanks, treat unconverted tabs the same as spaces
- allow for underline- and reverse-video flags in the ".rc" file

For detailed list of all changes, bugfixes and improvements, see CHANGES.

8 months agoboot/efi: Fix boot1's compilation with -fno-common.
Sascha Wildner [Mon, 10 Aug 2020 14:19:43 +0000 (16:19 +0200)]
boot/efi: Fix boot1's compilation with -fno-common.

boot1 needs no local definitions of BS, IH, RS and ST because they are
defined in libefi that boot1 links to.

8 months agosbin/hammer2: Use calloc(3)
Tomohiro Kusumi [Mon, 10 Aug 2020 12:05:43 +0000 (21:05 +0900)]
sbin/hammer2: Use calloc(3)

8 months agosbin/hammer2: Use nitems()
Tomohiro Kusumi [Mon, 10 Aug 2020 10:15:09 +0000 (19:15 +0900)]
sbin/hammer2: Use nitems()

8 months agosbin/hammer2: Fix no extern declaration errors
Tomohiro Kusumi [Sun, 9 Aug 2020 15:45:09 +0000 (00:45 +0900)]
sbin/hammer2: Fix no extern declaration errors

8 months agoFix GETATTR_LITE() build breakage with 'pseudo-device gzip' in the config.
Sascha Wildner [Sun, 9 Aug 2020 13:48:43 +0000 (15:48 +0200)]
Fix GETATTR_LITE() build breakage with 'pseudo-device gzip' in the config.

9 months agoboot/efi: Switch from HandleProtocol() to OpenProtocol().
Sascha Wildner [Sun, 9 Aug 2020 10:06:53 +0000 (12:06 +0200)]
boot/efi: Switch from HandleProtocol() to OpenProtocol().

HandleProtocol() is deprecated.

Bring in and use FreeBSD's OpenProtocolByHandle() helper function (which
is like the UEFI Spec's example) and generally reduce differences with
FreeBSD a bit more.

Taken-from: FreeBSD

9 months agoboot/efi: Move the loader's efi_main() from libefi to the loader itself.
Sascha Wildner [Sun, 9 Aug 2020 08:48:06 +0000 (10:48 +0200)]
boot/efi: Move the loader's efi_main() from libefi to the loader itself.

It will allow boot1 (that has its own efi_main()) to use libefi.

While here, reduce differences with FreeBSD a bit more.

Taken-from: FreeBSD

9 months agoboot/efi: Make DevicePathNodeLength()'s result a size_t.
Sascha Wildner [Sun, 9 Aug 2020 07:49:25 +0000 (09:49 +0200)]
boot/efi: Make DevicePathNodeLength()'s result a size_t.

Taken-from: FreeBSD

9 months agosbin/fsck_hammer2: Add HAMMER2_USE_OPENSSL
Tomohiro Kusumi [Sat, 8 Aug 2020 19:59:59 +0000 (04:59 +0900)]
sbin/fsck_hammer2: Add HAMMER2_USE_OPENSSL

9 months ago<sys/sysid.h>: Include <sys/types.h> for self-sufficiency.
Sascha Wildner [Sat, 8 Aug 2020 20:07:59 +0000 (22:07 +0200)]
<sys/sysid.h>: Include <sys/types.h> for self-sufficiency.

9 months agosbin/fsck_hammer2: Use RB_GENERATE() for better userspace portability
Tomohiro Kusumi [Sat, 8 Aug 2020 18:43:39 +0000 (03:43 +0900)]
sbin/fsck_hammer2: Use RB_GENERATE() for better userspace portability

9 months agokernel - Refactor GETATTR_QUICK() -> GETATTR_LITE()
Matthew Dillon [Sat, 8 Aug 2020 04:39:28 +0000 (21:39 -0700)]
kernel - Refactor GETATTR_QUICK() -> GETATTR_LITE()

* Refactor GETATTR_QUICK() into GETATTR_LITE() and use struct
  vattr_lite instead of struct vattr.  The original GETATTR_QUICK()
  just used a struct vattr.

  This change ensures that users of this new VOP do not attempt to
  access attr fields that are not populated.

Suggested-by: mjg
9 months agousb.4: Add urndis(4) reference in SEE ALSO.
Sascha Wildner [Sat, 8 Aug 2020 10:48:58 +0000 (12:48 +0200)]
usb.4: Add urndis(4) reference in SEE ALSO.

9 months agokernel: Remove <machine/npx.h> from two headers that do not need it.
Sascha Wildner [Sat, 8 Aug 2020 07:46:57 +0000 (09:46 +0200)]
kernel: Remove <machine/npx.h> from two headers that do not need it.

9 months agoRemove unneded #includes in three header files.
Sascha Wildner [Sat, 8 Aug 2020 07:26:39 +0000 (09:26 +0200)]
Remove unneded #includes in three header files.

Namely, <sys/ckpt.h>, <sys/posix4.h> and <sys/sfbuf.h>. None of them
needed anything from the headers they were including.

9 months ago<machine/tss.h>: Oops, it should have been <sys/types.h>.
Sascha Wildner [Fri, 7 Aug 2020 18:38:44 +0000 (20:38 +0200)]
<machine/tss.h>: Oops, it should have been <sys/types.h>.

We want integer types too.

9 months agodrm: Add linux/irqhandler.h
François Tigeot [Fri, 7 Aug 2020 16:42:14 +0000 (18:42 +0200)]
drm: Add linux/irqhandler.h

9 months ago<machine/tss.h>: Include <sys/cdefs.h> for __packed.
Sascha Wildner [Fri, 7 Aug 2020 06:24:51 +0000 (08:24 +0200)]
<machine/tss.h>: Include <sys/cdefs.h> for __packed.

9 months ago<machine/segments.h>: Move the inclusion of <sys/tls.h> to the top.
Sascha Wildner [Fri, 7 Aug 2020 06:17:57 +0000 (08:17 +0200)]
<machine/segments.h>: Move the inclusion of <sys/tls.h> to the top.

Mainly to get at <sys/types.h> for u_int* and <sys/cdefs.h> for __packed.

9 months ago<machine/md_var.h>: Include <sys/types.h> for u_int etc.
Sascha Wildner [Fri, 7 Aug 2020 06:16:17 +0000 (08:16 +0200)]
<machine/md_var.h>: Include <sys/types.h> for u_int etc.

9 months agolibarchive: Symbol.map cleanup
Daniel Fojt [Thu, 6 Aug 2020 18:56:59 +0000 (20:56 +0200)]
libarchive: Symbol.map cleanup

Reflect changes in last vendor update:

- __archive_write_open_filter() was made static
- __archive_write_close_filter() was dropped

Remove these from Symbol.map.

Pointed out by: Sascha Wildner

9 months agotools/tools/README: briefly describe chkldd
Daniel Fojt [Fri, 7 Aug 2020 05:36:37 +0000 (07:36 +0200)]
tools/tools/README: briefly describe chkldd

9 months agotools/tools/README: Clean up a bit.
Sascha Wildner [Fri, 7 Aug 2020 01:43:47 +0000 (03:43 +0200)]
tools/tools/README: Clean up a bit.

9 months agolibfetch: Add missing MLINK.
Sascha Wildner [Thu, 6 Aug 2020 15:39:01 +0000 (17:39 +0200)]
libfetch: Add missing MLINK.

9 months agodrm/linux: Add unsafe_put_user()
François Tigeot [Wed, 5 Aug 2020 17:49:40 +0000 (19:49 +0200)]
drm/linux: Add unsafe_put_user()

Obtained-from: FreeBSD

9 months agodrm: Add headers and infrastructure required by Linux 4.13+ code
François Tigeot [Wed, 5 Aug 2020 17:42:54 +0000 (19:42 +0200)]
drm: Add headers and infrastructure required by Linux 4.13+ code

9 months agolibhammer.3: Fix typo.
Sascha Wildner [Tue, 4 Aug 2020 15:37:37 +0000 (17:37 +0200)]
libhammer.3: Fix typo.

9 months agoBuild libssh with ldns support. 2/2
Daniel Fojt [Tue, 4 Aug 2020 09:47:39 +0000 (11:47 +0200)]
Build libssh with ldns support. 2/2

Hook ldns support into libssh via our libprivate_ldns:

- revise libraries build order
- adapt Makefiles
- update libssh/config.h
- drop libssh/openbsd-compat/getrrsetbyname.c, import
  getrrsetbyname-ldns.c instead

Approved by: Rimvydas Jasinskas

9 months agoBuild libssh with ldns support. 1/2
Daniel Fojt [Tue, 4 Aug 2020 09:33:09 +0000 (11:33 +0200)]
Build libssh with ldns support. 1/2

Merge branch 'vendor/LDNS' into master.

9 months agovendor/ldns: add missing header files vendor/LDNS
Daniel Fojt [Tue, 4 Aug 2020 09:16:13 +0000 (11:16 +0200)]
vendor/ldns: add missing header files

Add header files required for OpenSSH to build --with-ldns.

9 months agoUpgrade openssh. 2/2
Daniel Fojt [Tue, 28 Jul 2020 15:12:51 +0000 (17:12 +0200)]
Upgrade openssh. 2/2

- update README.{DELETED,DRAGONFLY)
- adapt Makefiles
- regenerate config.h and openbsd-compat/

9 months agoUpgrade openssh. 1/2
Daniel Fojt [Mon, 27 Jul 2020 09:52:49 +0000 (11:52 +0200)]
Upgrade openssh. 1/2

Merge branch 'vendor/OPENSSH' into master.

9 months agovendor/openssh: upgrade from 8.0p1 to 8.3p1 vendor/OPENSSH
Daniel Fojt [Wed, 22 Jul 2020 15:18:18 +0000 (17:18 +0200)]
vendor/openssh: upgrade from 8.0p1 to 8.3p1

Summary of notable changes:

- ssh(1), sshd(8), ssh-agent(1): add protection for private keys at
  rest in RAM against speculation and memory side-channel attacks like
  Spectre, Meltdown and Rambleed, openssh 8.1 and later encrypts private
  keys when they are not in use with a symmetric key that is derived from
  a relatively large "prekey" consisting of random data (currently 16KB)

- ssh(1), sshd(8), ssh-keygen(1): openssh 8.2 removes the "ssh-rsa"
  (RSA/SHA1) algorithm from those accepted for certificate signatures
  (i.e. the client and server CASignatureAlgorithms option) and will
  use the rsa-sha2-512 signature algorithm by default when the
  ssh-keygen(1) CA signs new certificates

- ssh(1), sshd(8): openssh 8.2 removes diffie-hellman-group14-sha1 from
  the default key exchange proposal for both the client and server

- ssh-keygen(1): the command-line options related to the generation and
  screening of safe prime numbers used by the diffie-hellman-group-* key
  exchange algorithms have changed, most options have been folded under
  the -O flag

- support PKCS8 as an optional format for storage of private keys to disk,
  native key format remains the default, but PKCS8 is a superior format to
  PEM if interoperability with non-OpenSSH software is required

- ssh(1), sshd(8): prefer to use chacha20 from libcrypto

- sshd(8): the sshd listener process title visible to ps(1) has changed
  to include information about the number of connections that are
  currently attempting authentication and the limits configured
  by MaxStartups

- sshd(8): when clients get denied by MaxStartups, send a notification
  prior to the SSH2 protocol banner according to RFC4253 section 4.2

- sshd(8): add an Include sshd_config keyword that allows including
  additional configuration files via glob(3) patterns

- sshd(8): make IgnoreRhosts a tri-state option: "yes" to ignore
  rhosts/shosts, "no" allow rhosts/shosts or (new) "shosts-only"
  to allow .shosts files but not .rhosts

- sshd(8): allow the IgnoreRhosts directive to appear anywhere in a
  sshd_config, not just before any Match blocks

- ssh(1), sshd(8): allow prepending a list of algorithms to the default
  set by starting the list with the '^' character, e.g.
  "HostKeyAlgorithms ^ssh-ed25519"

- ssh(1): allow forwarding a different agent socket to the path specified
  by $SSH_AUTH_SOCK, by extending the existing ForwardAgent option to
  accepting an explicit path or the name of an environment variable in
  addition to yes/no

- ssh(1): add %TOKEN percent expansion for the LocalFoward and
  RemoteForward keywords when used for Unix domain socket forwarding

- ssh(1): allow %n to be expanded in ProxyCommand strings

- sftp(1): reject an argument of "-1" in the same way as ssh(1) and
  scp(1) do instead of accepting and silently ignoring it

- sftp(1): check for user@host when parsing sftp target, this allows
  user@[1.2.3.4] to work without a path

- sftp(1): fix a race condition in the SIGCHILD handler that could
  turn in to a kill(-1)

For detailed list of all improvements, enhancements and bugfixes see
release notes:

https://www.openssh.com/releasenotes.html

9 months agolibressl: keep cms.h
Daniel Fojt [Mon, 3 Aug 2020 08:22:31 +0000 (10:22 +0200)]
libressl: keep cms.h

Now, when we enabled CMS by default with LibreSSL 3.1.3, let's keep
/usr/include/priv/openssl/cms.h.

Pointed out by: Sascha Wildner

9 months ago<sys/cdefs.h>: Add a compat macro for the C11 _Thread_local keyword.
Sascha Wildner [Sun, 2 Aug 2020 20:14:03 +0000 (22:14 +0200)]
<sys/cdefs.h>: Add a compat macro for the C11 _Thread_local keyword.

Taken-from: FreeBSD

9 months agoamdsmn.4: Move DragonFly info to HISTORY.
Sascha Wildner [Sun, 2 Aug 2020 19:06:11 +0000 (21:06 +0200)]
amdsmn.4: Move DragonFly info to HISTORY.

9 months agokm.4: Fix typo.
Sascha Wildner [Sun, 2 Aug 2020 19:03:55 +0000 (21:03 +0200)]
km.4: Fix typo.

9 months agoamd{smn,temp}.4: Clean up manual pages and add references to them.
Sascha Wildner [Sun, 2 Aug 2020 19:01:57 +0000 (21:01 +0200)]
amd{smn,temp}.4: Clean up manual pages and add references to them.

9 months agokernel: Some minor adjustments for amd{smn,temp}(4).
Sascha Wildner [Sun, 2 Aug 2020 18:32:41 +0000 (20:32 +0200)]
kernel: Some minor adjustments for amd{smn,temp}(4).

* Make compilable into the kernel and add to LINT64 and X86_64_GENERIC.

* Reduce some miscellaneous differences with FreeBSD.

* Bump date in manual pages.

9 months ago<sys/systm.h>: Add __assert_unreachable() for FreeBSD compatibility.
Sascha Wildner [Sun, 2 Aug 2020 18:29:54 +0000 (20:29 +0200)]
<sys/systm.h>: Add __assert_unreachable() for FreeBSD compatibility.

Taken-from: FreeBSD

9 months agoBring amdtemp from FreeBSD
Pierre-Alain TORET [Mon, 27 Jul 2020 19:42:49 +0000 (21:42 +0200)]
Bring amdtemp from FreeBSD

Tested-by: aly, deef
9 months agoBring amdsmn from FreeBSD
Pierre-Alain TORET [Mon, 27 Jul 2020 19:41:06 +0000 (21:41 +0200)]
Bring amdsmn from FreeBSD

9 months agokernel/powermng: Sort SUBDIRs.
Sascha Wildner [Sun, 2 Aug 2020 15:52:26 +0000 (17:52 +0200)]
kernel/powermng: Sort SUBDIRs.

9 months agolibc/dlfcn: Move build_phdr_info()'s attribute to the declaration.
Sascha Wildner [Sun, 2 Aug 2020 08:54:03 +0000 (10:54 +0200)]
libc/dlfcn: Move build_phdr_info()'s attribute to the declaration.

9 months agodrm: Fix dma_fence_wait()
François Tigeot [Sat, 1 Aug 2020 18:13:51 +0000 (20:13 +0200)]
drm: Fix dma_fence_wait()

It is supposed to return only 0 or negative values.

9 months agoMakefile.usr: Add '--ff-only' to 'git pull'
Aaron LI [Sat, 1 Aug 2020 06:34:55 +0000 (14:34 +0800)]
Makefile.usr: Add '--ff-only' to 'git pull'

Since version 2.27, Git will warn the pulling if not specified how to
reconcile divergent branch:

    warning: Pulling without specifying how to reconcile divergent
    branches is discouraged. You can squelch this message by running one
    of the following commands sometime before your next pull:

    git config pull.rebase false  # merge (the default strategy)
    git config pull.rebase true   # rebase
    git config pull.ff only       # fast-forward only

As a result, users may come into this issue when doing 'make src-update'
or 'make dports-update' tasks and need to resolve the 'git pull'
manually.  Add the '--ff-only' (i.e., fast-forward only, which is the
safest) to the 'git pull' command.

While there, adjust the update automation note and show it in
'src-update' and 'dports-update' tasks.

Credit: https://stackoverflow.com/a/62653400

Mentioned-by: noob237 (Gonzalo Nemmi)
9 months agoix(4): Fix a wrong check (&& -> ||).
Sascha Wildner [Fri, 31 Jul 2020 21:18:22 +0000 (23:18 +0200)]
ix(4): Fix a wrong check (&& -> ||).

This is also in Intel's ix-3.3.14.

Reviewed-by: sephe
9 months agore(4): Fix a wrong check. Looks like copy/paste but not adjusted properly.
Sascha Wildner [Fri, 31 Jul 2020 21:21:27 +0000 (23:21 +0200)]
re(4): Fix a wrong check. Looks like copy/paste but not adjusted properly.

This is also in Realtek's v196.04.

Reviewed-by: sephe
9 months agomfi(4): Fix a wrong check.
Sascha Wildner [Fri, 31 Jul 2020 21:22:55 +0000 (23:22 +0200)]
mfi(4): Fix a wrong check.

Taken-from: FreeBSD

9 months agolibc/locale: Remove some redundant redeclarations of __mb_sb_limit.
Sascha Wildner [Fri, 31 Jul 2020 17:54:07 +0000 (19:54 +0200)]
libc/locale: Remove some redundant redeclarations of __mb_sb_limit.

We already get an extern declaration from <ctype.h> (via <wchar.h>).

9 months agobuild.7: document more "upgrade" target details
Daniel Fojt [Fri, 31 Jul 2020 06:14:37 +0000 (08:14 +0200)]
build.7: document more "upgrade" target details

Mention "deprecated" objects and describe how to safely remove them from
newly upgraded system.

9 months agoAdd sanity check to "remove-deprecated-files" target.
Daniel Fojt [Sat, 25 Jul 2020 18:02:43 +0000 (20:02 +0200)]
Add sanity check to "remove-deprecated-files" target.

Import helper awk script to detect objects linked to particular
library.

Separate the check to a new target "check-deprecated-files" in
etc/Makefile and utilize the script to report libraries that are
still in use.

Default is to check directories under /usr/local/. Additional places
to search may be specified via CHECK_DEPRECATED_DIRS variable, like:

   make CHECK_DEPRECATED_DIRS="/opt/lib /opt/bin" upgrade

Suggested and reviewed by: Sascha Wildner

9 months agolibstand: Add include guards to headers and cleanup.
Sascha Wildner [Thu, 30 Jul 2020 20:27:47 +0000 (22:27 +0200)]
libstand: Add include guards to headers and cleanup.

9 months agoUpgrade make(1). 2/2
Daniel Fojt [Thu, 30 Jul 2020 10:10:05 +0000 (12:10 +0200)]
Upgrade make(1). 2/2

- update README.{DELETED,DRAGONFLY}
- adapt Makefile
- regenerate config.h

9 months agoUpgrade make(1). 1/2
Daniel Fojt [Thu, 30 Jul 2020 10:09:09 +0000 (12:09 +0200)]
Upgrade make(1). 1/2

Merge branch 'vendor/BMAKE' into master.

9 months agovendor/bmake: upgrade from 20160818 to 20200710
Daniel Fojt [Thu, 30 Jul 2020 03:55:49 +0000 (05:55 +0200)]
vendor/bmake: upgrade from 20160818 to 20200710

Summary of notable changes:

- add :range and :_
- support for .DELETE_ON_ERROR
- allow specifying the utc value used by :{gm,local}time
- allow :_=var and avoid use of special context
- use -C arg "as is" if it contains no relative component
- when setting .OBJDIR, ignore '$' in paths
- add -v option to always fully expand values
- pass SIGINT etc onto child and wait for it to exit
- when target is out-of-date per normal make rules record
  value of .OODATE in meta file
- add :Or for reverse sort
- improvements to avoid unnecessary evaluation use enums
  for flags
- debugging output for :@
- fix for compare_expression when doEval=0

For detailed list see ChangeLog.

9 months agodsynth - Log the portdir for all bulk scan errors
Matthew Dillon [Wed, 29 Jul 2020 21:10:19 +0000 (14:10 -0700)]
dsynth - Log the portdir for all bulk scan errors

* All bulk scan errors are now able to log the portdir for the errors,
  and will also log the errors to 00_last_results.log.

* Implemented by setting stderr to a unix-domain socket during the run
  and using SO_PASSCRED.

* Requires a kernel which supports SO_PASSCRED.  Kernels which do not
  support SO_PASSCRED will still log the errors, but without the
  portdir prefix.

9 months agokernel - Implement SO_PASSCRED
Matthew Dillon [Wed, 29 Jul 2020 20:58:54 +0000 (13:58 -0700)]
kernel - Implement SO_PASSCRED

* Implement SO_PASSCRED.  This allows the receiving end of a local socket
  to request creds even if the sending end did not send any.

* Allows the use of a common local socket with multiple end points, e.g.
  for stderr, such that the receiving entity can distinguish between
  message sources.

Taken-from: Linux

9 months agosys/vfs/ext2fs: Disable calling ext2_htree_add_entry()
Tomohiro Kusumi [Wed, 29 Jul 2020 16:39:57 +0000 (01:39 +0900)]
sys/vfs/ext2fs: Disable calling ext2_htree_add_entry()

4c3802f8a89fcb53ad1112cc71dedbc9a01c3384
disabled creation of a new htree dirent index, but also disable adding
entries to an existing index created at elsewhere as this could also
possibly cause the issue mentioned in the comment right above.

9 months agolibressl: cleanup the build
Daniel Fojt [Wed, 29 Jul 2020 08:53:17 +0000 (10:53 +0200)]
libressl: cleanup the build

Drop our custom CRYPTO_{free,malloc}.c and use libressl's malloc-wrapper.c
instead.

Discussed with: Rimvydas Jasinskas

9 months agoUpdate share/skel/dot.cshrc.
Daniel Fojt [Wed, 29 Jul 2020 05:32:07 +0000 (07:32 +0200)]
Update share/skel/dot.cshrc.

Include also current working directory in default prompt.

Suggested by: Peeter Must
Approved by: Sascha Wildner, Pierre-Alain TORET

9 months agokernel - Cleanup recent DMAP hacks for EFI framebuffers
Matthew Dillon [Wed, 29 Jul 2020 02:40:58 +0000 (19:40 -0700)]
kernel - Cleanup recent DMAP hacks for EFI framebuffers

* Adjust the EFI framebuffer code to test against DMapMaxAddress
  instead of DMAP_MAX_ADDRESS.

* Remove the temporary hack that burned memory with a too-large
  minimum DMAP size.

9 months agokernel - Improve debugging of spurious interrupts
Matthew Dillon [Tue, 28 Jul 2020 20:38:22 +0000 (13:38 -0700)]
kernel - Improve debugging of spurious interrupts

* Report spurious T_RESERVED interrupt vectors / trap numbers.  Report
  the actual trap number and try to ignore it.  If this occurs it
  helps with debugging as a cold boot 'vmstat -i -v' can be matched
  up against the spurious interrupt number (usually spurious# - 0x20)
  to locate the PCI device causing the problem.

9 months agokernel - Disable MSIX mode in pci_teardown_msix()
Matthew Dillon [Tue, 28 Jul 2020 20:34:02 +0000 (13:34 -0700)]
kernel - Disable MSIX mode in pci_teardown_msix()

* Disable MSIX mode when pci_teardown_msix() is called.  This fixes
  issues on some BIOSes which do not fully clear the PCI hardware
  configuration when warm-booting.

  In particular, the NVME controller appears to have this issue with
  some laptops (HP Intel gen 9 and gen 10 laptops) whereby the MSI
  interrupt winds up being stuck on reboot.

9 months agokernel - Hack the DMAP size
Matthew Dillon [Tue, 28 Jul 2020 07:41:04 +0000 (00:41 -0700)]
kernel - Hack the DMAP size

* Make the minimum DMAP size much larger.  This is a hack to accomodate
  EFI framebuffers that have been mapped to very high physical addresses.
  Due to the early initialization, they must use the DMAP.

* Fixes booting on modern intel-based HP laptops.

9 months agokernel - Fix bug in resource_list_alloc() for addresses > 4GB
Matthew Dillon [Tue, 28 Jul 2020 07:34:40 +0000 (00:34 -0700)]
kernel - Fix bug in resource_list_alloc() for addresses > 4GB

* Fix a bug in resource_list_alloc() that was preventing DFly from
  mapping PCI memory above 4GB.  Basically we had a legacy 'max()'
  function use in there that should have been 'ulmax()'.

* Fixes USB device probe on modern Intel laptops.

* Fixes some VMs which use high addresses to map fake devices.

9 months agoboot - Fix 'shift key generates space' in boot loader
Matthew Dillon [Tue, 28 Jul 2020 00:40:04 +0000 (17:40 -0700)]
boot - Fix 'shift key generates space' in boot loader

* Fix an issue where shift, control, and other non-keystroke keys
  generate a space.

  The keyboard read code assumed that there would not be two
  back-to-back EFI_NOT_READY status returns from ReadKeyStroke.

9 months agolibc/sys : add SIGCKPT and SIGCKPTEXIT to sigaction(2) manual page
Pierre-Alain TORET [Mon, 27 Jul 2020 11:42:24 +0000 (13:42 +0200)]
libc/sys : add SIGCKPT and SIGCKPTEXIT to sigaction(2) manual page

9 months agolibc/gen : display the table properly in signal(3) manual page
Pierre-Alain TORET [Mon, 27 Jul 2020 10:28:57 +0000 (12:28 +0200)]
libc/gen : display the table properly in signal(3) manual page

9 months agojail.8: Fix typo.
Sascha Wildner [Mon, 27 Jul 2020 11:35:23 +0000 (13:35 +0200)]
jail.8: Fix typo.

While here, add references to jexec(8) and jls(8).

Reported-by: Peeter Must
9 months agodrm: Update to Linux 4.12.14
François Tigeot [Mon, 27 Jul 2020 06:54:28 +0000 (08:54 +0200)]
drm: Update to Linux 4.12.14

* Initial Geminilake support

* Support improvements and model-specific bug fixes for Broxton, Haswell,
  Broadwell, Skylake and Kabylake hardware

* Various generic i915 bug fixes, including page flipping and memory
  corruption issues

* Minor radeon bug fixes

9 months agodrm/linux: Add pagevec API from Linux 4.15+
François Tigeot [Mon, 27 Jul 2020 06:48:34 +0000 (08:48 +0200)]
drm/linux: Add pagevec API from Linux 4.15+

9 months agodrm/linux: Add kthread parking functions
François Tigeot [Mon, 27 Jul 2020 06:37:56 +0000 (08:37 +0200)]
drm/linux: Add kthread parking functions

9 months agokernel/vmm: Clean up a bit (staticize, un-expose debug code).
Sascha Wildner [Sun, 26 Jul 2020 18:20:07 +0000 (20:20 +0200)]
kernel/vmm: Clean up a bit (staticize, un-expose debug code).

9 months agokernel - Also include file size in VOP_GETATTR_QUICK()
Matthew Dillon [Sun, 26 Jul 2020 17:52:19 +0000 (10:52 -0700)]
kernel - Also include file size in VOP_GETATTR_QUICK()

* Originally VOP_GETATTR_QUICK() was only meant to be used by the
  nlookup code but we are now also using it with lseek().

* Fix hammer2_vop_getattr_quick() to also provide the file size.

* Fixes bug introduced when lseek() was changed to use this
  VOP.

9 months agokernel - Fix type-o
Matthew Dillon [Sun, 26 Jul 2020 16:16:41 +0000 (09:16 -0700)]
kernel - Fix type-o

* Fix type-o in comment

Reported-by: mjg
9 months agokernel - more cleanup of syscall2()
Matthew Dillon [Sun, 26 Jul 2020 16:12:15 +0000 (09:12 -0700)]
kernel - more cleanup of syscall2()

* Implement an actual SYS___nosys system call.

* Convert one conditional to something that can use CMOV, using
  the new SYS___nosys system call code.

* Get rid of special checks for SYS_syscall and SYS___syscall.
  Instead, provide real vectors for these functions.  This also
  cleans up a few other bits of code in syscall2().

9 months agodrm/linux: Fix complete() and complete_all()
François Tigeot [Sun, 26 Jul 2020 08:35:50 +0000 (10:35 +0200)]
drm/linux: Fix complete() and complete_all()

Completion counters are supposed to be bounded by UINT_MAX.

9 months agoFix the vkernel build after recent syscall changes.
Sascha Wildner [Sat, 25 Jul 2020 20:14:37 +0000 (22:14 +0200)]
Fix the vkernel build after recent syscall changes.

9 months agokernel - Add P_SWAPPEDOUT flag back in for deprecated compat
Matthew Dillon [Sat, 25 Jul 2020 19:11:13 +0000 (12:11 -0700)]
kernel - Add P_SWAPPEDOUT flag back in for deprecated compat

* Add this flag back in for backwards compatibility with some
  ports.  The flag doesn't do anything any more.

9 months agokernel - Optimize lseek() SEEK_END
Matthew Dillon [Sat, 25 Jul 2020 17:02:12 +0000 (10:02 -0700)]
kernel - Optimize lseek() SEEK_END

* Use VOP_GETATTR_QUICK() instead of VOP_GETATTR_FP() to omit
  unnecessary locking.

Submitted-by: mjg
9 months agokernel - Remove P_SWAPPEDOUT flag and paging mode
Matthew Dillon [Sat, 25 Jul 2020 05:57:11 +0000 (22:57 -0700)]
kernel - Remove P_SWAPPEDOUT flag and paging mode

* This code basically no longer functions in any worthwhile or
  useful manner, remove it.

  The code harkens back to a time when machines had very little
  memory and had to time-share processes by actually descheduling
  them for long periods of time (like 20 seconds) and paging out
  the related memory.

  In modern times the chooser algorithm just doesn't work well
  because we can no longer assume that programs with large
  memory footprints can be demoted.

* In modern times machines have sufficient memory to rely almost
  entirely on the VM fault and pageout scan.  The latencies caused
  by fault-ins are usually sufficient to demote paging-intensive
  processes while allowing the machine to continue to function.

  If functionality need to be added back in, it can be added back
  in on the fault path and not here.

9 months agokernel - remove old debugging code in syscall2()
Matthew Dillon [Sat, 25 Jul 2020 05:06:08 +0000 (22:06 -0700)]
kernel - remove old debugging code in syscall2()

* Remove old debugging code that is no longer applicable.

9 months agokernel - optimize regcnt assignment a bit in syscall2()
Matthew Dillon [Sat, 25 Jul 2020 05:01:03 +0000 (22:01 -0700)]
kernel - optimize regcnt assignment a bit in syscall2()

* Adjust the regcnt assignment a bit to improve code flow

9 months agokernel - Refactor in-kernel system call API to remove bcopy()
Matthew Dillon [Sat, 25 Jul 2020 04:25:07 +0000 (21:25 -0700)]
kernel - Refactor in-kernel system call API to remove bcopy()

* Change the in-kernel system call prototype to take the
  system call arguments as a separate pointer, and make the
  contents read-only.

  int     sy_call_t (void *);
  int     sy_call_t (struct sysmsg *sysmsg, const void *);

* System calls with 6 arguments or less no longer need to copy
  the arguments from the trapframe to a holding structure.  Instead,
  we simply point into the trapframe.

  The L1 cache footprint will be a bit smaller, but in simple tests
  the results are not noticably faster... maybe 1ns or so
  (roughly 1%).

9 months ago<machine/*.h>: Use our __aligned() macro in various cases.
Sascha Wildner [Sat, 25 Jul 2020 18:12:22 +0000 (20:12 +0200)]
<machine/*.h>: Use our __aligned() macro in various cases.

No functional change.

9 months agodrm/linux: Add __list_del() and __list_del_entry()
François Tigeot [Sat, 25 Jul 2020 08:59:55 +0000 (10:59 +0200)]
drm/linux: Add __list_del() and __list_del_entry()

Obtained-from: FreeBSD

9 months agodrm/linux: dma_fence_get_rcu_safe()
François Tigeot [Sat, 25 Jul 2020 07:41:12 +0000 (09:41 +0200)]
drm/linux: dma_fence_get_rcu_safe()

Obtained-from: OpenBSD

9 months agodrm/linux: Add various rbtree functions
François Tigeot [Sat, 25 Jul 2020 07:39:18 +0000 (09:39 +0200)]
drm/linux: Add various rbtree functions

Obtained-from: OpenBSD

9 months agolibfetch: sync with FreeBSD
Daniel Fojt [Fri, 24 Jul 2020 07:13:02 +0000 (09:13 +0200)]
libfetch: sync with FreeBSD

- document fetchReqHTTP() (revision 351573)
- avoid invalid escape sequences in URL (revision 357579)
- add SOCKS5 support (revisions 357968, 357977-9, 358227)

9 months agolibressl: add back missing header file
Daniel Fojt [Fri, 24 Jul 2020 06:30:17 +0000 (08:30 +0200)]
libressl: add back missing header file

Add back /usr/include/priv/openssl/gost.h that was mistakenly removed
in commit 7dae3d51+.

Pointed out by: Sascha Wildner

9 months agosys/vfs/ext2fs: Modify XXX comment on disabled htree dirents creation
Tomohiro Kusumi [Thu, 23 Jul 2020 22:26:25 +0000 (07:26 +0900)]
sys/vfs/ext2fs: Modify XXX comment on disabled htree dirents creation

9 months agoFix some cases where %zd was used wrongly across the tree.
Sascha Wildner [Thu, 23 Jul 2020 20:52:52 +0000 (22:52 +0200)]
Fix some cases where %zd was used wrongly across the tree.

9 months agodrm/linux: Fix stop_machine()
François Tigeot [Thu, 23 Jul 2020 08:05:47 +0000 (10:05 +0200)]
drm/linux: Fix stop_machine()

It never released the big kernel lock.

Spotted-by: Sascha Wildner <saw@online.de>
Fixed and patch submitted-by: Matthew Dillon <dillon@apollo.backplane.com>

9 months agoFix 'make upgrade' for updated libressl.
Daniel Fojt [Thu, 23 Jul 2020 04:55:15 +0000 (06:55 +0200)]
Fix 'make upgrade' for updated libressl.

Require -DREMOVE_DEPRECATED to remove old versions of libprivate_crypto
and libprivate_ssl, as pkg(8) may still be linked against them.

9 months agokernel/e1000: Add missing 'break'.
Sascha Wildner [Wed, 22 Jul 2020 20:46:19 +0000 (22:46 +0200)]
kernel/e1000: Add missing 'break'.

9 months agosys/vfs/ext2fs: Add XXX comment on disabled htree dirents creation
Tomohiro Kusumi [Wed, 22 Jul 2020 19:12:32 +0000 (04:12 +0900)]
sys/vfs/ext2fs: Add XXX comment on disabled htree dirents creation

9 months agosys/vfs/ext2fs: Stop checking for failures from malloc(M_WAITOK)
Tomohiro Kusumi [Wed, 22 Jul 2020 16:10:17 +0000 (01:10 +0900)]
sys/vfs/ext2fs: Stop checking for failures from malloc(M_WAITOK)

from freebsd/freebsd@193af7936290dc30509e922b19a32be2d421ff6f