dragonfly.git
3 years agoFix 2500_T.
Sepherosa Ziehau [Fri, 20 Nov 2020 07:40:31 +0000 (15:40 +0800)]
Fix 2500_T.

3 years agoFix interrupt registers
Sepherosa Ziehau [Fri, 20 Nov 2020 03:48:35 +0000 (11:48 +0800)]
Fix interrupt registers

3 years agoPrepare for 4 bytes ISR and IMR
Sepherosa Ziehau [Fri, 20 Nov 2020 03:26:51 +0000 (11:26 +0800)]
Prepare for 4 bytes ISR and IMR

3 years agoFix transmit start and faste detection.
Sepherosa Ziehau [Fri, 20 Nov 2020 03:22:52 +0000 (11:22 +0800)]
Fix transmit start and faste detection.

3 years agoAdd RT8125
Sepherosa Ziehau [Fri, 20 Nov 2020 02:58:48 +0000 (10:58 +0800)]
Add RT8125

3 years agoFix remainder of the 8125 stuff
Sepherosa Ziehau [Thu, 19 Nov 2020 11:48:28 +0000 (19:48 +0800)]
Fix remainder of the 8125 stuff

3 years agoLinking.
Sepherosa Ziehau [Thu, 19 Nov 2020 11:42:35 +0000 (19:42 +0800)]
Linking.

3 years agoUnbreak most of the compile.
Sepherosa Ziehau [Thu, 19 Nov 2020 11:27:06 +0000 (19:27 +0800)]
Unbreak most of the compile.

3 years agofinish sync.
Sepherosa Ziehau [Wed, 18 Nov 2020 15:22:33 +0000 (23:22 +0800)]
finish sync.

3 years agosync re_hw_phy_config()
Sepherosa Ziehau [Wed, 18 Nov 2020 15:14:05 +0000 (23:14 +0800)]
sync re_hw_phy_config()

3 years agosync before re_hw_phy_config()
Sepherosa Ziehau [Wed, 18 Nov 2020 15:00:48 +0000 (23:00 +0800)]
sync before re_hw_phy_config()

3 years agosync before re_set_phy_mcu_8168g_1()
Sepherosa Ziehau [Wed, 18 Nov 2020 11:52:43 +0000 (19:52 +0800)]
sync before re_set_phy_mcu_8168g_1()

3 years agosync till disable EEE
Sepherosa Ziehau [Tue, 17 Nov 2020 13:23:05 +0000 (21:23 +0800)]
sync till disable EEE

3 years agosync till re_enable_EEE
Sepherosa Ziehau [Tue, 17 Nov 2020 13:18:47 +0000 (21:18 +0800)]
sync till re_enable_EEE

3 years agoSync send packet and receive packet.
Sepherosa Ziehau [Tue, 17 Nov 2020 11:53:49 +0000 (19:53 +0800)]
Sync send packet and receive packet.

3 years agoSync till clrwol
Sepherosa Ziehau [Mon, 9 Nov 2020 12:44:37 +0000 (20:44 +0800)]
Sync till clrwol

3 years agoMerge till re_hw_start_unlock_8125
Sepherosa Ziehau [Mon, 9 Nov 2020 12:35:58 +0000 (20:35 +0800)]
Merge till re_hw_start_unlock_8125

3 years agoMerge till re_attach.
Sepherosa Ziehau [Sat, 7 Nov 2020 11:24:02 +0000 (19:24 +0800)]
Merge till re_attach.

3 years agoMerge re_init_software_variable
Sepherosa Ziehau [Fri, 6 Nov 2020 12:30:10 +0000 (20:30 +0800)]
Merge re_init_software_variable

3 years agoMerge till re_exit_oob
Sepherosa Ziehau [Fri, 6 Nov 2020 12:03:05 +0000 (20:03 +0800)]
Merge till re_exit_oob

3 years agoMerge declaration part
Sepherosa Ziehau [Fri, 6 Nov 2020 11:43:16 +0000 (19:43 +0800)]
Merge declaration part

3 years agoUpdate re.h from 196.04
Sepherosa Ziehau [Wed, 4 Nov 2020 12:35:53 +0000 (20:35 +0800)]
Update re.h from 196.04

3 years agodrm/linux: Add atomic_dec_if_positive()
François Tigeot [Tue, 10 Nov 2020 13:58:11 +0000 (14:58 +0100)]
drm/linux: Add atomic_dec_if_positive()

Obtained-from: FreeBSD

3 years agolibdialog: Add missing function attribute definitions. Raise WARNS to 6.
Sascha Wildner [Tue, 10 Nov 2020 10:03:28 +0000 (11:03 +0100)]
libdialog: Add missing function attribute definitions. Raise WARNS to 6.

For some reason, 'configure' does not define them ootb.

3 years agokernel/ufs: Add some __dead2 to the stubs for the non-SOFTUPDATES case.
Sascha Wildner [Mon, 9 Nov 2020 15:59:58 +0000 (16:59 +0100)]
kernel/ufs: Add some __dead2 to the stubs for the non-SOFTUPDATES case.

3 years agobuild - Adjust message output after a make build-all
Matthew Dillon [Mon, 9 Nov 2020 01:25:03 +0000 (17:25 -0800)]
build - Adjust message output after a make build-all

* Clarify that the recommended pkg upgrade -f should be run after
  rebooting into the new system.

3 years agodmesg - Check current directory when -n is used
Matthew Dillon [Mon, 9 Nov 2020 01:24:09 +0000 (17:24 -0800)]
dmesg - Check current directory when -n is used

* When -n is used, first check the current directory for kern.n and
  vmcore.n.  If either is not found, then check /var/crash as before.

3 years agokernel: Use howmany() in a couple of places.
Sascha Wildner [Sat, 7 Nov 2020 23:18:43 +0000 (00:18 +0100)]
kernel: Use howmany() in a couple of places.

3 years agokernel - Incorporate drm79.patch to master, cleaned up
Matthew Dillon [Sat, 7 Nov 2020 18:42:33 +0000 (10:42 -0800)]
kernel - Incorporate drm79.patch to master, cleaned up

* Should fix a number of niggling issues in master now,
  that are already incorporated into the next drm sync.

3 years agokernel - Change pager interface to pass page index 3/*
Matthew Dillon [Sat, 7 Nov 2020 18:19:17 +0000 (10:19 -0800)]
kernel - Change pager interface to pass page index 3/*

* Don't shortcut vm_object_page_remove() with a resident_page_count
  test for MGTDEVICE objects.  These objects are not required to have
  their VM pages entered into them.

* in vm_object_page_remove(), change pmap_remove_pages() to
  pmap_remove().  The former is meant to be used only in the
  exit code and does not bother with TLB synchronization.
  pmap_remove() properly handles any TLB synchronization.

3 years agoAdd a minimal kernel configuration file.
Sascha Wildner [Fri, 6 Nov 2020 16:13:14 +0000 (17:13 +0100)]
Add a minimal kernel configuration file.

For testing the kernel build without any options.

3 years agoLINT64: Note that 'ident' and 'cpu' are mandatory, too.
Sascha Wildner [Fri, 6 Nov 2020 16:10:05 +0000 (17:10 +0100)]
LINT64: Note that 'ident' and 'cpu' are mandatory, too.

3 years agokernel: Fix building without 'options _KPOSIX_PRIORITY_SCHEDULING'.
Sascha Wildner [Fri, 6 Nov 2020 15:06:40 +0000 (16:06 +0100)]
kernel: Fix building without 'options _KPOSIX_PRIORITY_SCHEDULING'.

Prototype generation for this case was broken after 80d831e1ad5c5886e458.

Reported-by: zrj
3 years agoUpgrade libressl. 2/2
Daniel Fojt [Wed, 4 Nov 2020 20:52:19 +0000 (21:52 +0100)]
Upgrade libressl. 2/2

Update README.{DELETED,DRAGONFLY} and adapt Makefiles.

3 years agoUpgrade libressl. 1/2
Daniel Fojt [Wed, 4 Nov 2020 20:19:57 +0000 (21:19 +0100)]
Upgrade libressl. 1/2

Merge branch 'vendor/LIBRESSL' into master.

3 years agovendor/libressl: upgrade from 3.1.4 to 3.2.2
Daniel Fojt [Tue, 3 Nov 2020 18:37:17 +0000 (19:37 +0100)]
vendor/libressl: upgrade from 3.1.4 to 3.2.2

Summary of notable changes:

  * new TLSv1.3 implementation enabled by default for both client
    and server

  * new X509 certificate chain validator that correctly handles
    multiple paths through intermediate certificates

  * new name constraints verification implementation which passes
    the bettertls.com certificate validation check suite

  * numerous leaks and out-of-bounds write fixed

  * many improvements, refactoring, optimizations and code cleanups

See ChangeLog for details.

3 years agokernel: Reindent a few functions that were not using tabs.
Sascha Wildner [Thu, 5 Nov 2020 05:04:55 +0000 (06:04 +0100)]
kernel: Reindent a few functions that were not using tabs.

While here, fix a typo in the comments.

3 years agokernel/amd{smn,temp}: Sync with FreeBSD.
Sascha Wildner [Thu, 5 Nov 2020 03:13:11 +0000 (04:13 +0100)]
kernel/amd{smn,temp}: Sync with FreeBSD.

Adds support for Ryzen 4000 APU (Zen 2, "Renoir").

Reported-by: zrj
3 years agolib/csu: Add ifunc support for statically linked programs.
zrj [Wed, 4 Nov 2020 10:31:21 +0000 (10:31 +0000)]
lib/csu: Add ifunc support for statically linked programs.

 This assumes that both _init_tls() and _rtld_call_init() paths in libc
 will not contain ifunc calls.  For now should be enough since there was
 no ifunc support previously.

Derived-from: NetBSD crt0-common.c implementation

3 years agortld: Handle non-PLT type 37 relocations.
zrj [Tue, 3 Nov 2020 17:28:17 +0000 (17:28 +0000)]
rtld: Handle non-PLT type 37 relocations.

 Mainly to unbreak certain use cases of ifunc.

3 years agortld: Extract reloc_iresolve_one().
zrj [Tue, 3 Nov 2020 17:22:11 +0000 (17:22 +0000)]
rtld: Extract reloc_iresolve_one().

 Will be used to properly handle non-PLT 37 ifunc relocations in -pie.

3 years agokernel - Change pager interface to pass page index 2/2
Matthew Dillon [Wed, 4 Nov 2020 21:51:40 +0000 (13:51 -0800)]
kernel - Change pager interface to pass page index 2/2

* Adjust the DRM calls to vm_pager_get_page() to pass the
  page index.

* Greatly simplify drm/linux_shmem.c and drm/ttm/ttm_bo_vm.c,
  removing the need to deal with placemarker pages for
  VM faults on OBJT_MGTDEVICE objects.

3 years agokernel - Change pager interface to pass page index 1/2
Matthew Dillon [Wed, 4 Nov 2020 21:49:03 +0000 (13:49 -0800)]
kernel - Change pager interface to pass page index 1/2

* Change the *getpage() API to include the page index as
  an argument.  This allows us to avoid passing any vm_page_t
  for OBJT_MGTDEVICE VM pages.

  By removing this requirement, the VM system no longer has to
  pre-allocate a placemarker page for DRM faults and the DRM
  system can directly install the page in the pmap without
  tracking it via a vm_page_t.

3 years agokernel - Fix uninitialized variable in kqueue_register()
Matthew Dillon [Wed, 4 Nov 2020 21:34:09 +0000 (13:34 -0800)]
kernel - Fix uninitialized variable in kqueue_register()

* Fix another uninitialized variable that gcc didn't detect,
  this time in kqueue_register().

* Caused kernel compiled with -O0 to not operate properly.

* Initializing the error variable to 0 solves the problem.

Reported-by: zrj
3 years agokernel - Fix missing initialization in vnode_pager_lock()
Matthew Dillon [Wed, 4 Nov 2020 18:35:22 +0000 (10:35 -0800)]
kernel - Fix missing initialization in vnode_pager_lock()

* struct vnode *vp was not being initialized to NULL, causing
  a garbage return not caught by gcc if no while() condition
  is met.

* Only occurred with -O0.  The optimized case doesn't seem to hit
  the issue through luck.

Reported-by: zrj
3 years agosys/vfs/hammer2: Illustrate level1-6 freemap
Tomohiro Kusumi [Tue, 3 Nov 2020 16:30:19 +0000 (01:30 +0900)]
sys/vfs/hammer2: Illustrate level1-6 freemap

3 years agokernel: Avoid spurious diagnostic with older gcc47.
zrj [Mon, 2 Nov 2020 18:38:20 +0000 (18:38 +0000)]
kernel: Avoid spurious diagnostic with older gcc47.

3 years agobsd.sys.mk: Make -Wmissing-field-initializers non-fatal.
zrj [Mon, 2 Nov 2020 18:34:45 +0000 (18:34 +0000)]
bsd.sys.mk: Make -Wmissing-field-initializers non-fatal.

 It was decided that gcc47 gives few diagnostics wrongly in C99 mode.

3 years agoSync zoneinfo database with tzdata2020d from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Sun, 1 Nov 2020 20:45:06 +0000 (21:45 +0100)]
Sync zoneinfo database with tzdata2020d from ftp://ftp.iana.org/tz/releases

* Palestine ends DST earlier than predicted, on 2020-10-24.

* Fiji starts DST later than usual, on 2020-12-20.

For a detailed list of changes, see share/zoneinfo/NEWS.

3 years agoscript.7: Fix description of the length of the '#!' line.
Sascha Wildner [Sun, 1 Nov 2020 19:59:43 +0000 (20:59 +0100)]
script.7: Fix description of the length of the '#!' line.

3 years agoenviron.7: Sync with FreeBSD.
Sascha Wildner [Sun, 1 Nov 2020 19:58:49 +0000 (20:58 +0100)]
environ.7: Sync with FreeBSD.

3 years agokernel: fix getcwd(3) return value for non-existing directory
Daniel Fojt [Sun, 1 Nov 2020 16:53:52 +0000 (17:53 +0100)]
kernel: fix getcwd(3) return value for non-existing directory

In case current directory no longer exists, properly return ENOENT
from getcwd(), as described in manpage.

Issue: https://bugs.dragonflybsd.org/issues/3250

3 years agosys/vfs/hammer2: Remove obsolete comment on copyids
Tomohiro Kusumi [Sun, 1 Nov 2020 15:10:09 +0000 (00:10 +0900)]
sys/vfs/hammer2: Remove obsolete comment on copyids

copyids in inode was removed in
ae183399278ee71fba31527cd18a7545ac9af2e4 in 2012.

3 years agoNote dhcpcd update
Roy Marples [Sun, 1 Nov 2020 14:37:48 +0000 (14:37 +0000)]
Note dhcpcd update

3 years agoMerge branch 'vendor/DHCPCD'
Roy Marples [Sun, 1 Nov 2020 14:35:46 +0000 (14:35 +0000)]
Merge branch 'vendor/DHCPCD'

3 years agoUpdate to dhcpcd-9.3.2 with the following changes:
Roy Marples [Sun, 1 Nov 2020 14:33:08 +0000 (14:33 +0000)]
Update to dhcpcd-9.3.2 with the following changes:

 * DHCP: Add support for IPv6-Only Preferred option, RFC 8925.
 * BSD: `LINK_STATE_UNKNOWN` is treated as UP once again
 * privsep: pass logging to the privileged actioneer
 * privsep: allow logfile re-opening to work
 * privsep: close BPF socket on ENXIO
 * privsep: don't leave a BOOTP BPF listener rebooting in non master mode

3 years agoboot/pc32: Fix ambiguity in legacy loaders for Hammer selection.
zrj [Sat, 31 Oct 2020 19:19:42 +0000 (19:19 +0000)]
boot/pc32: Fix ambiguity in legacy loaders for Hammer selection.

 Explicitly name both variants.  Default Hammer2 stays in legacy loader.
 Allow to built loader with HAMMER(5) support for testing purposes.
 Adjust libstand(3).

3 years agoboot/pc32: Reorder fs probe list.
zrj [Sat, 31 Oct 2020 18:57:55 +0000 (18:57 +0000)]
boot/pc32: Reorder fs probe list.

 Sort by: disk, cd, net, file.
 This should increase lookup speed for network loaders.

3 years agoboot/pc32: Conditionalize splitfs support in legacy loaders.
zrj [Sat, 31 Oct 2020 18:11:03 +0000 (18:11 +0000)]
boot/pc32: Conditionalize splitfs support in legacy loaders.

 This floppy feature was inherited and not so useful anymore.  Disabling
 it reduces filename lookups by half.  Also put it last, if enabled.

3 years agoSwitch to ld.bfd as default ld for world stage.
zrj [Sat, 31 Oct 2020 09:12:38 +0000 (09:12 +0000)]
Switch to ld.bfd as default ld for world stage.

 Until boot/efi issues are resolved:
 * ld.gold not respecting linker script for section merges;
 * clang built boot1.efi and loader.efi failures.

 Default can be restored by setting WORLD_LDVER=ld.gold in make.conf(5).
 Final installed ld(1) will still default to ld.gold to not disturb
 things in DPorts.

 NOTE: this might produce different final binaries if building in tree,
 but it should not be fatal as we support both ld.bfd and ld.gold.
 Use "make LDVER=ld.bfd" to mimic buildworld behaviour when needed.

3 years agoSwitch to binutils234 as default base binutils.
zrj [Sat, 31 Oct 2020 08:31:02 +0000 (08:31 +0000)]
Switch to binutils234 as default base binutils.

3 years agoboot/efi: Objcopy more sections to final *.efi objects.
zrj [Sat, 31 Oct 2020 08:29:40 +0000 (08:29 +0000)]
boot/efi: Objcopy more sections to final *.efi objects.

 Unbreaks uefi boot with when compiled with ld.gold from binutils234.

3 years agoboot/pc32: Consistently disable integrated-as for intermediates.
zrj [Sat, 31 Oct 2020 06:44:42 +0000 (06:44 +0000)]
boot/pc32: Consistently disable integrated-as for intermediates.

 This ensures that produced assembly intermediates are compatible with
 external as(1) when compiling with clang.

3 years agokernel: Disable use of clang's integrated as.
zrj [Sat, 31 Oct 2020 06:42:39 +0000 (06:42 +0000)]
kernel: Disable use of clang's integrated as.

3 years agodsynth(1): Ignore dot files in CRC sums.
zrj [Sat, 31 Oct 2020 06:40:22 +0000 (06:40 +0000)]
dsynth(1): Ignore dot files in CRC sums.

3 years agocpdup - Bump version to 1.22
Matthew Dillon [Fri, 30 Oct 2020 21:47:58 +0000 (14:47 -0700)]
cpdup - Bump version to 1.22

* Bump cpdup version to 1.22 (supporting symlink utimes/etc)

3 years agocpdup - Add support for lchmod(), lutimes(), and lchflags()
Matthew Dillon [Fri, 30 Oct 2020 21:43:52 +0000 (14:43 -0700)]
cpdup - Add support for lchmod(), lutimes(), and lchflags()

* Add support for these functions, allowing symlinks to be fully
  replicated.

* Fix issues when the destination of a rename is chflagged in a way
  that causes the rename to fail.

* Delete temporary files when a rename files.

* Set SrcHost/DstHost.version for local sources or targets
  to make version tests easier.

Reported-by: Oliver Fromme
3 years agokernel - Fix buffer overflow in legacy (non EFI) boot loader
Matthew Dillon [Fri, 30 Oct 2020 18:25:23 +0000 (11:25 -0700)]
kernel - Fix buffer overflow in legacy (non EFI) boot loader

* Fix a buffer overflow primarily in bd_read().  The code contains
  a work-around for segment boundary crossings that very old BIOSes
  would sometimes blow-up on, but was improperly calculating the
  bounce-buffer I/O limit to be the full bounce-buffer size
  instead of 1/2 the bounce buffer size.

  Thus if the bounce buffer's base address happened to be certain
  values, large I/O requests would overflow the buffer.

* Make sure the bounce-buffer is 16-byte aligned, again for old
  BIOSes.

Reported-by: zrj
Debugging-by: dillon, zrj, Naabed-
3 years agobsd-family-tree: Sync with FreeBSD (FreeBSD 12.2).
Sascha Wildner [Fri, 30 Oct 2020 17:20:05 +0000 (18:20 +0100)]
bsd-family-tree: Sync with FreeBSD (FreeBSD 12.2).

3 years agobsd.own.mk: Remove some obsolete variables.
Sascha Wildner [Thu, 29 Oct 2020 20:59:53 +0000 (21:59 +0100)]
bsd.own.mk: Remove some obsolete variables.

Those were overlooked in c880cbafebe60271ee and 086b69d307ad34d5d4.

3 years agokernel - Fix slow memory leak in kernel
Matthew Dillon [Wed, 28 Oct 2020 18:23:00 +0000 (11:23 -0700)]
kernel - Fix slow memory leak in kernel

* Fix a slow memory leak with the resource limit structure when
  forking a heavily-threaded process.

* Fixes a kmalloc limit panic related to M_PLIMIT.

Reported-by: tuxillo
3 years agosys/vfs/hammer2: Remove #if0'd code using removed function
Tomohiro Kusumi [Mon, 26 Oct 2020 15:54:16 +0000 (00:54 +0900)]
sys/vfs/hammer2: Remove #if0'd code using removed function

hammer2_sync_scan2() was removed in
ecfe89b8868b30c9ddfa9c86cb4b0a20365a248d in 2018,
so remove #if0'd code using hammer2_sync_scan2().

3 years agosys/vfs/hammer2: Remove unused hammer2_dev_{ex,sh,un}lock()
Tomohiro Kusumi [Mon, 26 Oct 2020 15:11:23 +0000 (00:11 +0900)]
sys/vfs/hammer2: Remove unused hammer2_dev_{ex,sh,un}lock()

Added in 506bd6d145b6429947d572e34575b4a2a864193c in 2015,
but unused since 6f445d15835c6677a0a79c8d168ef44d0b9b22c3 in 2018.

It currently takes vchain lock via hammer2_chain_lock(),
so this function won't be needed or used again.

3 years agosys/vfs/hammer2: Fix comments on rbtree which should be radix tree
Tomohiro Kusumi [Sun, 25 Oct 2020 16:41:23 +0000 (01:41 +0900)]
sys/vfs/hammer2: Fix comments on rbtree which should be radix tree

3 years agosbin/hammer2: Fix hammer2_pfssubtype_to_str() retval for NONE
Tomohiro Kusumi [Sun, 25 Oct 2020 14:40:26 +0000 (23:40 +0900)]
sbin/hammer2: Fix hammer2_pfssubtype_to_str() retval for NONE

cac06d4ec621562239475e76988ab16c661f3430 initially added this
based on cmd_pfs_list() implementation, but change it to return
"NONE" for HAMMER2_PFSSUBTYPE_NONE so that this function makes
sense in other contexts.

3 years agodrm/ttm: Use workqueues everywhere
François Tigeot [Wed, 28 Oct 2020 13:01:48 +0000 (14:01 +0100)]
drm/ttm: Use workqueues everywhere

Remove the last direct usage of taskqueues.

3 years agokernel: Staticize some variables in platform/pc64.
Sascha Wildner [Sun, 25 Oct 2020 00:03:51 +0000 (02:03 +0200)]
kernel: Staticize some variables in platform/pc64.

Also, remove some unused variables and move some extern declarations
to header files.

3 years agosbin/hammer2: Don't use 1 byte size for 0 radix bits
Tomohiro Kusumi [Thu, 22 Oct 2020 18:03:08 +0000 (03:03 +0900)]
sbin/hammer2: Don't use 1 byte size for 0 radix bits

Same as 893aa36e0111c1418f260bd8d1092b7f22ea010e for userspace code.

3 years agosbin/hammer2: Improve "printinode"
Tomohiro Kusumi [Wed, 21 Oct 2020 17:15:01 +0000 (02:15 +0900)]
sbin/hammer2: Improve "printinode"

Inmemory inode only has meta part of ondisk inode (no blockrefs),
so remove unused code which won't be implemented.

3 years agolibexec/dma: sync with upstream
Daniel Fojt [Fri, 23 Oct 2020 06:10:16 +0000 (08:10 +0200)]
libexec/dma: sync with upstream

- avoid double free in reallocf()
- fix use-after-free in deliver()
- more meaningful reporting of server greeting errors
- minor code cleanup

3 years agorc.d: Fix indent.
Sascha Wildner [Fri, 23 Oct 2020 07:12:28 +0000 (09:12 +0200)]
rc.d: Fix indent.

3 years agokernel: Fix two more -Wcast-qual warnings reported by clang.
Sascha Wildner [Thu, 22 Oct 2020 17:56:14 +0000 (19:56 +0200)]
kernel: Fix two more -Wcast-qual warnings reported by clang.

Use __DECONST() in another case that I had fixed in cebef8bba30e3313d8f2
with a (void *) cast.

3 years agosystat(1): Remove dead code.
Sascha Wildner [Thu, 22 Oct 2020 13:23:19 +0000 (15:23 +0200)]
systat(1): Remove dead code.

It was inactivated by c8cad1a46f5d4e9ee689c3da2c3909245b783200 but
forgotten to be removed.

3 years agohammer2(8): Oops, unbreak build.
Sascha Wildner [Wed, 21 Oct 2020 18:57:06 +0000 (20:57 +0200)]
hammer2(8): Oops, unbreak build.

3 years agohammer2(8): Point out dead code a bit clearer.
Sascha Wildner [Wed, 21 Oct 2020 18:54:42 +0000 (20:54 +0200)]
hammer2(8): Point out dead code a bit clearer.

3 years agosys/vfs/ext2fs: Enable VFCF_MPSAFE
Tomohiro Kusumi [Tue, 20 Oct 2020 16:18:11 +0000 (01:18 +0900)]
sys/vfs/ext2fs: Enable VFCF_MPSAFE

3 years agosys/vfs/hammer2: Don't use 1 byte size for 0 radix bits
Tomohiro Kusumi [Mon, 19 Oct 2020 16:04:07 +0000 (01:04 +0900)]
sys/vfs/hammer2: Don't use 1 byte size for 0 radix bits

Not using 1 byte size for 0 radix bits is part of ondisk spec.
This may not be expected to happen in these cases, but other ones
always consider 0 radix or assert radix != 0.

--
 * WARNING! A radix of 0 (such as when data_off is all 0's) is a special
 *     case which means no data associated with the blockref, and
 *     not the '1 byte' it would otherwise calculate to.

3 years agohostname(1): Remove unneeded extra parentheses.
Sascha Wildner [Wed, 21 Oct 2020 02:45:36 +0000 (04:45 +0200)]
hostname(1): Remove unneeded extra parentheses.

3 years agodefaults/compilers.conf: Clean up old CCVERs and add one for clang10.
Sascha Wildner [Tue, 20 Oct 2020 15:41:34 +0000 (17:41 +0200)]
defaults/compilers.conf: Clean up old CCVERs and add one for clang10.

With devel/llvm10 installed, this builds world and kernel like
described in compilers.conf(5)'s EXAMPLES section.

Note that it is only build-tested. I haven't ever tried running a
clang compiled world/kernel.

3 years agoboot/boot2 (legacy): Add -fno-addrsig for clang compilation.
Sascha Wildner [Tue, 20 Oct 2020 14:07:43 +0000 (16:07 +0200)]
boot/boot2 (legacy): Add -fno-addrsig for clang compilation.

We need this because in this case, the assembler used is binutil's,
which does not understand .addrsig/.addrsig_sym.

3 years agogcc: Add clang's -Wno-c++11-narrowing where we have gcc's -Wno-narrowing.
Sascha Wildner [Sat, 17 Oct 2020 08:16:22 +0000 (10:16 +0200)]
gcc: Add clang's -Wno-c++11-narrowing where we have gcc's -Wno-narrowing.

This fixes some clang buildworld issues.

Not sure why it errors without this flag even though no -Werror is set.

3 years ago<sys/exislock.h>: Add include guard and adjust includes.
Sascha Wildner [Tue, 20 Oct 2020 10:48:57 +0000 (12:48 +0200)]
<sys/exislock.h>: Add include guard and adjust includes.

3 years agoAdjust permissions of various files.
Sascha Wildner [Mon, 19 Oct 2020 16:29:49 +0000 (18:29 +0200)]
Adjust permissions of various files.

3 years agoperiodic: add daily check for kernel vs. userland consistency
Daniel Fojt [Sun, 18 Oct 2020 15:22:19 +0000 (17:22 +0200)]
periodic: add daily check for kernel vs. userland consistency

- import new daily periodic script 510.status-world-kernel
- extend default periodic.conf
- update manpage periodic.conf.5

Taken from: FreeBSD
Reviewed by: Sascha Wildner

3 years agosys/vfs/hammer2: Remove obsolete comments on blockset/blockref
Tomohiro Kusumi [Sun, 18 Oct 2020 15:15:35 +0000 (00:15 +0900)]
sys/vfs/hammer2: Remove obsolete comments on blockset/blockref

Apparently blockrefs are sorted with possible holes.
1897c66ea31ca9d7b3fb03ba08889054bf36ef04 in 2013 changed how blockrefs
within inode's blockset or indirect block are created/deleted.

Inode has "ncopies" field, but redundancy isn't implemented.

"blockrefs in a set can shortcut multiple levels of indirections"
seems to have only existed in this comment.

3 years agosys/vfs/hammer2: Remove unused local variable in hammer2_chain_dirent_test()
Tomohiro Kusumi [Sat, 17 Oct 2020 16:15:07 +0000 (01:15 +0900)]
sys/vfs/hammer2: Remove unused local variable in hammer2_chain_dirent_test()

3 years agosys/vfs/hammer2: Move voldata functions to hammer2_vfsops.c
Tomohiro Kusumi [Sat, 17 Oct 2020 16:12:23 +0000 (01:12 +0900)]
sys/vfs/hammer2: Move voldata functions to hammer2_vfsops.c

These should be in hammer2_vfsops.c, not much to do with chain
functions.

3 years agosys/vfs/hammer2: Remove unused hammer2_chain_[rw]data()
Tomohiro Kusumi [Fri, 16 Oct 2020 15:23:14 +0000 (00:23 +0900)]
sys/vfs/hammer2: Remove unused hammer2_chain_[rw]data()

HAMMER2 code directly access chain->data without these wrappers,
except for two places using hammer2_chain_rdata().

3 years agosys/vfs/hammer2: Remove unused hammer2_chain_wait()
Tomohiro Kusumi [Thu, 15 Oct 2020 17:12:24 +0000 (02:12 +0900)]
sys/vfs/hammer2: Remove unused hammer2_chain_wait()

This should have been removed along with other chain functions
in 278ab2b27e913575840951f625eb2d8620aafa34 in 2014 when cluster
functions replaced them.

3 years agoboot/boot2 (legacy): Remove an unneeded Makefile rule.
Sascha Wildner [Fri, 16 Oct 2020 13:19:58 +0000 (15:19 +0200)]
boot/boot2 (legacy): Remove an unneeded Makefile rule.

This is covered by our suffix-transformation rules in sys.mk.