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

9 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()

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

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

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

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

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

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

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

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

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

9 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

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

9 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()

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

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

9 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__.

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

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

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

9 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").

9 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()

9 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()

9 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()

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

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

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

9 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

9 months agokernel - use built-in for ffsl()
Matthew Dillon [Thu, 16 Jul 2020 23:30:36 +0000 (16:30 -0700)]
kernel - use built-in for ffsl()

* Use built-in for ffsl(), reduces generated code and improves
  performance by using CMOV

* Remove old unused/dead code in ffs()

Submitted-by: mjg
9 months agoReference efibootmgr(8) in boot(8) manual page.
Sascha Wildner [Thu, 16 Jul 2020 20:00:47 +0000 (22:00 +0200)]
Reference efibootmgr(8) in boot(8) manual page.

9 months agoUpdate the pciconf(8) database.
Sascha Wildner [Thu, 16 Jul 2020 17:38:22 +0000 (19:38 +0200)]
Update the pciconf(8) database.

June 24, 2020 snapshot from https://pci-ids.ucw.cz

9 months agoFix a few typos across the tree.
Sascha Wildner [Thu, 16 Jul 2020 07:30:00 +0000 (09:30 +0200)]
Fix a few typos across the tree.

9 months agokernel: Remove some unused variables and a dead sysctl.
Sascha Wildner [Wed, 15 Jul 2020 18:41:16 +0000 (20:41 +0200)]
kernel: Remove some unused variables and a dead sysctl.

Reported-by: mjg
9 months agolibc/asmcontext: Fix building with -fno-common.
Sascha Wildner [Wed, 15 Jul 2020 09:24:34 +0000 (11:24 +0200)]
libc/asmcontext: Fix building with -fno-common.

asmcontext.h generation using genassym.sh isn't working properly with
-fno-common, so for now just specify -fcommon at the end of the flags.

Right now this is only needed for testing -fno-common because it is
not GCC's default yet.

This concludes the work to make buildworld succeed with -fno-common.

Thanks to Krzysztof Piecuch for helping with it.

9 months agolibc/asmcontext: Remove unneeded ASSYM()s.
Sascha Wildner [Mon, 13 Jul 2020 19:04:53 +0000 (21:04 +0200)]
libc/asmcontext: Remove unneeded ASSYM()s.

9 months agomail(1): Fix building with -fno-common.
Sascha Wildner [Wed, 15 Jul 2020 09:23:53 +0000 (11:23 +0200)]
mail(1): Fix building with -fno-common.

Similar to how we "fixed" tip(1).

-fno-common will be default in future compilers (GCC 10, for example).

9 months agotip(1): Fix building with -fno-common.
Sascha Wildner [Wed, 15 Jul 2020 09:23:19 +0000 (11:23 +0200)]
tip(1): Fix building with -fno-common.

We do so by adding 'EXTERN' to all offending variables and then defining
'EXTERN' to 'extern' for all .c files, except for one (tip.c). This is
the same "fix" that FreeBSD chose, to be cleaned up better at a later
point in time.

-fno-common will be default in future compilers (GCC 10, for example).

9 months agotelnet(1)/telnetd(8): Fix building with -fno-common.
Sascha Wildner [Wed, 15 Jul 2020 09:22:49 +0000 (11:22 +0200)]
telnet(1)/telnetd(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

9 months agodrm: restore pre-Linux 4.10 print functions
François Tigeot [Wed, 15 Jul 2020 09:23:35 +0000 (11:23 +0200)]
drm: restore pre-Linux 4.10 print functions

Newer versions tend to print garbage

9 months agodrm: Update base driver to Linux 4.10.17
François Tigeot [Mon, 13 Jul 2020 21:50:01 +0000 (23:50 +0200)]
drm: Update base driver to Linux 4.10.17

Thanks to Matthew Dillon <dillon@apollo.backplane.com>
for some VM fixes.

9 months agodrm/linux: Do not sleep when not required in schedule_timeout()
François Tigeot [Mon, 13 Jul 2020 05:57:03 +0000 (07:57 +0200)]
drm/linux: Do not sleep when not required in schedule_timeout()

9 months agotftp(1): Fix building with -fno-common
Krzysztof Piecuch [Sat, 11 Jul 2020 17:40:22 +0000 (17:40 +0000)]
tftp(1): Fix building with -fno-common

-fno-common will be default in future compilers (GCC 10, for example).

9 months agofsck(8), fsdb(8): Fix building with -fno-common
Krzysztof Piecuch [Fri, 10 Jul 2020 22:58:31 +0000 (22:58 +0000)]
fsck(8), fsdb(8): Fix building with -fno-common

-fno-common will be default in future compilers (GCC 10, for example).

9 months agodrm/linux: break from wait_event_xxx() loops sooner
François Tigeot [Sun, 12 Jul 2020 07:57:59 +0000 (09:57 +0200)]
drm/linux: break from wait_event_xxx() loops sooner

9 months agodrm/linux: Fix lost wakeup event issues with wait_event_xxx() routines
François Tigeot [Sun, 12 Jul 2020 07:52:15 +0000 (09:52 +0200)]
drm/linux: Fix lost wakeup event issues with wait_event_xxx() routines

Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
9 months agodrm/linux: Implement module_param() directives
François Tigeot [Sun, 12 Jul 2020 07:30:37 +0000 (09:30 +0200)]
drm/linux: Implement module_param() directives

* Properly define KBUILD_MODNAME where required

* Rewrite linux/moduleparam.h, Automatically generate suitable
  TUNABLE_INT() directives

9 months agodrm/linux: Import the radix-tree code from FreeBSD
François Tigeot [Sun, 12 Jul 2020 05:20:52 +0000 (07:20 +0200)]
drm/linux: Import the radix-tree code from FreeBSD

9 months agolibexec/dma: split body of mails not respecting RFC5322
Daniel Fojt [Sat, 11 Jul 2020 17:43:00 +0000 (19:43 +0200)]
libexec/dma: split body of mails not respecting RFC5322

When receiving mails with body not respecting RFC5322 [1] (may happen
with automatically generated mails, for example from cron(8)), try to
split by words finding the last space before 1000's character. If this
fails, then simply refuse to further receive and process such input.

Taken from: FreeBSD (revision 326641)
Discussed with: Sascha Wildner

[1] https://tools.ietf.org/html/rfc5322#section-2.1.1

9 months agodrm/linux: Fix an unlock without lock issue in dma_fence_default_wait()
François Tigeot [Sat, 11 Jul 2020 10:54:04 +0000 (12:54 +0200)]
drm/linux: Fix an unlock without lock issue in dma_fence_default_wait()

9 months agodrm/linux: fix races in the ww mutex code that can cause lockups
François Tigeot [Sat, 11 Jul 2020 09:58:18 +0000 (11:58 +0200)]
drm/linux: fix races in the ww mutex code that can cause lockups

Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
9 months agowsp(4): Clean up the Makefile.
Sascha Wildner [Fri, 10 Jul 2020 20:19:05 +0000 (22:19 +0200)]
wsp(4): Clean up the Makefile.