dragonfly.git
8 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.

8 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.

8 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/

8 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.

8 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

8 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

8 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

8 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.

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

8 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.

8 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.

8 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

8 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
8 months agoBring amdsmn from FreeBSD
Pierre-Alain TORET [Mon, 27 Jul 2020 19:41:06 +0000 (21:41 +0200)]
Bring amdsmn from FreeBSD

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

8 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.

8 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.

8 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)
8 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
8 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
8 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

8 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>).

8 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.

8 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

8 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.

8 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

8 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.

8 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.

8 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.

8 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

8 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.

8 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

8 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

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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

8 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

8 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
8 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

8 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+

8 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

8 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).

8 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.

8 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
8 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().

8 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.

8 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.

8 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.

8 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
8 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.

8 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.

8 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

8 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%).

8 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.

8 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

8 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

8 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

8 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)

8 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

8 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

8 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.

8 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>

8 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.

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

8 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

8 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

8 months agodrm/linux: Add get_task_pid()
François Tigeot [Wed, 22 Jul 2020 16:21:01 +0000 (18:21 +0200)]
drm/linux: Add get_task_pid()

8 months agoRemove fuse.ko via 'make upgrade'.
Sascha Wildner [Wed, 22 Jul 2020 16:18:28 +0000 (18:18 +0200)]
Remove fuse.ko via 'make upgrade'.

So the ever older module doesn't stay around.

8 months agoUpgrade libressl. 2/2
Daniel Fojt [Tue, 21 Jul 2020 11:07:52 +0000 (13:07 +0200)]
Upgrade libressl. 2/2

Update README.{DELETED,DRAGONFLY} and adapt Makefiles to vendor changes.

8 months agoUpgrade libressl. 1/2
Daniel Fojt [Mon, 20 Jul 2020 08:59:26 +0000 (10:59 +0200)]
Upgrade libressl. 1/2

Merge branch 'vendor/LIBRESSL' into master.

8 months agovendor/libressl: upgrade from 2.9.1 to 3.1.3
Daniel Fojt [Sat, 18 Jul 2020 07:42:07 +0000 (09:42 +0200)]
vendor/libressl: upgrade from 2.9.1 to 3.1.3

Summary of notable changes:

- fixed CVE-2019-1547 and CVE-2019-1563
- various side channels in DSA and ECDSA were addressed
- fixed PVK format output issue with openssl(1) dsa and rsa subcommand
- added cms subcommand to openssl(1)
- added -addext option to openssl(1) req subcommand
- added -groups option to openssl(1) s_server subcommand
- improved compatibility by backporting functionality and documentation
  from OpenSSL 1.1.1
- added RSA-PSS and RSA-OAEP methods from OpenSSL 1.1.1
- completed the port of RSA_METHOD accessors from the OpenSSL 1.1 API
- ported Cryptographic Message Syntax (CMS) implementation from OpenSSL
  1.1.1 and enabled by default
- completed initial TLS 1.3 implementation, TLS 1.3 is now enabled
  by default for the client side, with the server side to be enabled
  in a future release
- provided TLSv1.3 cipher suite aliases to match the names used
  in RFC 8446

For details see ChangeLog.

8 months agolibc/sys : display the table properly in sigaction(2) manual page
Pierre-Alain TORET [Wed, 22 Jul 2020 08:51:46 +0000 (10:51 +0200)]
libc/sys : display the table properly in sigaction(2) manual page

Taken-from: FreeBSD (r306496)

8 months agodrm: Implement dma-buf operations, enable most drm_prime code
François Tigeot [Wed, 22 Jul 2020 06:16:12 +0000 (08:16 +0200)]
drm: Implement dma-buf operations, enable most drm_prime code

Inspired-by: OpenBSD
8 months agosys/vfs/ext2fs: Remove ext2_{bread,brelse}() wrapper variants
Tomohiro Kusumi [Tue, 21 Jul 2020 16:54:07 +0000 (01:54 +0900)]
sys/vfs/ext2fs: Remove ext2_{bread,brelse}() wrapper variants

Given f9507b19dfcb670d0003163dcff7a6722eb4abda,
remove ext2_{bread,brelse}() wrapper variants which initially
emulated FreeBSD behavior, and use regular bread()/brelse() variants.

8 months agolibdmsg: Fix wrong check in dmsg_crypto_negotiate()'s error path.
Sascha Wildner [Mon, 20 Jul 2020 22:53:13 +0000 (00:53 +0200)]
libdmsg: Fix wrong check in dmsg_crypto_negotiate()'s error path.

8 months agosys/vfs/ext2fs: Add redundant ext2_brelse() on ext2_bread() error
Tomohiro Kusumi [Mon, 20 Jul 2020 17:10:11 +0000 (02:10 +0900)]
sys/vfs/ext2fs: Add redundant ext2_brelse() on ext2_bread() error

Preparation to remove ext2_{bread,brelse}() wrappers that were
initially adopted, and use regular bread()/brelse() variants.

Although not interested in making cleanups that would cause
nonfunctional diff from its origin, this one is better without
FreeBSD compat wrappers.

8 months ago<sys/objcache.h>: Mark two kernel functions as being like malloc().
Sascha Wildner [Mon, 20 Jul 2020 16:58:18 +0000 (18:58 +0200)]
<sys/objcache.h>: Mark two kernel functions as being like malloc().

8 months agosys/vfs/ext2fs: Fix function name in ihash collision message
Tomohiro Kusumi [Mon, 20 Jul 2020 16:16:15 +0000 (01:16 +0900)]
sys/vfs/ext2fs: Fix function name in ihash collision message

8 months agokernel - Detect fixed meltdown hardware on Intel (2)
Matthew Dillon [Mon, 20 Jul 2020 06:36:46 +0000 (23:36 -0700)]
kernel - Detect fixed meltdown hardware on Intel (2)

* Adjust last commit to work as intended.

Reported-by: mjg
8 months agosys/vfs/ext2fs: Drop i_devvp initialization in ext2_vget()
Tomohiro Kusumi [Sun, 19 Jul 2020 16:40:47 +0000 (01:40 +0900)]
sys/vfs/ext2fs: Drop i_devvp initialization in ext2_vget()

This line originally came from ext2_vget() in sys/gnu/vfs/ext2fs
is meaningless in sys/vfs/ext2fs.

8 months agosys/vfs/ext2fs: Add ext2_alloc_vnode()
Tomohiro Kusumi [Sun, 19 Jul 2020 16:08:44 +0000 (01:08 +0900)]
sys/vfs/ext2fs: Add ext2_alloc_vnode()

8 months agosys/vfs/ext2fs: Cleanup ext2_vget()/ext2_valloc()
Tomohiro Kusumi [Sun, 19 Jul 2020 15:12:07 +0000 (00:12 +0900)]
sys/vfs/ext2fs: Cleanup ext2_vget()/ext2_valloc()

ext2_valloc() shouldn't use VFS_VGET() (whereas sys/gnu/vfs/ext2fs does),
but is similar.
No functional changes.

8 months agolinux/kernel.h: Add some __printf() where appropriate.
Sascha Wildner [Sun, 19 Jul 2020 10:46:18 +0000 (12:46 +0200)]
linux/kernel.h: Add some __printf() where appropriate.

8 months ago<sys/stdint.h>: Use __GNUC_PREREQ__.
Sascha Wildner [Sun, 19 Jul 2020 10:03:18 +0000 (12:03 +0200)]
<sys/stdint.h>: Use __GNUC_PREREQ__.

8 months agokernel: Prepare for -fno-common becoming default in future compilers.
Sascha Wildner [Sun, 19 Jul 2020 08:41:29 +0000 (10:41 +0200)]
kernel: Prepare for -fno-common becoming default in future compilers.

Add an explicit -fcommon to the compilation of genassym.c and
vmx_genassym.c, just like we did for asmcontext.c in libc already.

genassym.o and vmx_genassym.o are used for the generation of the
respective *.h files (using genassym.sh) which fails without
-fcommon. They are not themselves linked into the kernel.

See dadd01b6c5da8ff83652d6c3be89b16f373af69a.

8 months agoSync ACPICA with Intel's version 20200717.
Sascha Wildner [Sun, 19 Jul 2020 08:08:09 +0000 (10:08 +0200)]
Sync ACPICA with Intel's version 20200717.

* Do not increment OperationRegion reference counts for field units.

* Fix some issues in iasl(8).

For detailed list, please see sys/contrib/dev/acpica/changes.txt.

8 months agokernel - Detect fixed meltdown hardware on Intel
Matthew Dillon [Sun, 19 Jul 2020 06:19:45 +0000 (23:19 -0700)]
kernel - Detect fixed meltdown hardware on Intel

* Detect fixed meltdown hardware on Intel.

* Display standard cpu features2 and features3 info during boot.

Requested-by: mjg
8 months agosys/vfs/ext2fs: Disable ext3 htree dirents for now
Tomohiro Kusumi [Sat, 18 Jul 2020 17:19:54 +0000 (02:19 +0900)]
sys/vfs/ext2fs: Disable ext3 htree dirents for now

Seeing occasional failure with buildworld test on ext2,
but not when mkfs'd with ^dir_index.

8 months agosys/vfs/fuse: Remove FUSE from Makefile for now
Tomohiro Kusumi [Sat, 18 Jul 2020 16:10:06 +0000 (01:10 +0900)]
sys/vfs/fuse: Remove FUSE from Makefile for now

Disable FUSE build for now.
Not much progress since first committed in 2019.

Note that FUSE is difficult to implement in BSD's from the way
VFS is designed (can't properly implement "fh").

8 months agosys/vfs/fuse: Fix fuse_vop_readdir()
Tomohiro Kusumi [Sat, 18 Jul 2020 15:33:34 +0000 (00:33 +0900)]
sys/vfs/fuse: Fix fuse_vop_readdir()

8 months agosys/vfs/autofs: Fix autofs_readdir()
Tomohiro Kusumi [Sat, 18 Jul 2020 15:33:10 +0000 (00:33 +0900)]
sys/vfs/autofs: Fix autofs_readdir()

8 months agosys/vfs/ext2fs: Use bp->b_loffset in ext2_readdir()
Tomohiro Kusumi [Sat, 18 Jul 2020 17:15:45 +0000 (02:15 +0900)]
sys/vfs/ext2fs: Use bp->b_loffset in ext2_readdir()

8 months agoAdd non-GPL ext2 filesystem (port from FreeBSD)
Tomohiro Kusumi [Fri, 17 Jul 2020 16:12:07 +0000 (01:12 +0900)]
Add non-GPL ext2 filesystem (port from FreeBSD)

The new ext2 will replace the existing sys/gnu/vfs/ext2fs in future,
which is known to have lots of issues. This is already better than
sys/gnu/vfs/ext2fs in many ways, but will keep it as an option for now
as there seems to be htree dirents and/or vop_readdir related bugs.

The new implementation supports ext3 htree dirents. Read support for
ext4 extents which exists in FreeBSD ext2 isn't implemented yet (TODO).
ACL/xattr are unsupported, and likely never will be.

With exception of DragonFly VFS specific part that can't reuse FreeBSD
code (vfsops, many vnops, bread/getblk/bio i/f difference, etc),
the new ext2 is designed to be close to upstream as much as possible.
The code is there for a reason to make clear the *real* diff without
introducing nonfunctional diff noises.

8 months agoUpgrade ldns and drill(1). 2/2
Daniel Fojt [Fri, 17 Jul 2020 05:11:08 +0000 (07:11 +0200)]
Upgrade ldns and drill(1). 2/2

- regenerate config.h, net.h and util.h
- update README.{DELETED,DRAGONFLY}
- update manpage drill.1: remove empty section "BUGS", merge duplicate
  sections "SEE ALSO" and remove a reference to dig(1)

8 months agoUpgrade ldns and drill(1). 1/2
Daniel Fojt [Fri, 17 Jul 2020 05:10:04 +0000 (07:10 +0200)]
Upgrade ldns and drill(1). 1/2

Merge branch 'vendor/LDNS' into master.

8 months agovendor/ldns: upgrade from 1.7.0 to 1.7.1
Daniel Fojt [Thu, 16 Jul 2020 06:54:34 +0000 (08:54 +0200)]
vendor/ldns: upgrade from 1.7.0 to 1.7.1

Notable bugfixes:

- drill -x crashes with malformed IPv4 address
- drill -DT fails for CNAME domain
- CDS & CDNSKEY RRsets should be signed with the KSK
- several potential NULL pointer dereferences
- memory leak with more EDNS sections
- time sensitive TSIG compare vulnerability
- only chase DS if signer is parent of owner

For details see commit history or changelog on github:

https://github.com/NLnetLabs/ldns/blob/release-1.7.1/Changelog