Daniel Fojt [Wed, 4 Nov 2020 20:19:57 +0000 (21:19 +0100)]
Upgrade libressl. 1/2
Merge branch 'vendor/LIBRESSL' into master.
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.
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.
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
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
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.
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.
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.
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.
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
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
Tomohiro Kusumi [Tue, 3 Nov 2020 16:30:19 +0000 (01:30 +0900)]
sys/vfs/hammer2: Illustrate level1-6 freemap
zrj [Mon, 2 Nov 2020 18:38:20 +0000 (18:38 +0000)]
kernel: Avoid spurious diagnostic with older gcc47.
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.
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.
Sascha Wildner [Sun, 1 Nov 2020 19:59:43 +0000 (20:59 +0100)]
script.7: Fix description of the length of the '#!' line.
Sascha Wildner [Sun, 1 Nov 2020 19:58:49 +0000 (20:58 +0100)]
environ.7: Sync with FreeBSD.
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
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.
Roy Marples [Sun, 1 Nov 2020 14:37:48 +0000 (14:37 +0000)]
Note dhcpcd update
Roy Marples [Sun, 1 Nov 2020 14:35:46 +0000 (14:35 +0000)]
Merge branch 'vendor/DHCPCD'
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
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).
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.
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.
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.
zrj [Sat, 31 Oct 2020 08:31:02 +0000 (08:31 +0000)]
Switch to binutils234 as default base binutils.
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.
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.
zrj [Sat, 31 Oct 2020 06:42:39 +0000 (06:42 +0000)]
kernel: Disable use of clang's integrated as.
zrj [Sat, 31 Oct 2020 06:40:22 +0000 (06:40 +0000)]
dsynth(1): Ignore dot files in CRC sums.
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)
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
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-
Sascha Wildner [Fri, 30 Oct 2020 17:20:05 +0000 (18:20 +0100)]
bsd-family-tree: Sync with FreeBSD (FreeBSD 12.2).
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.
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
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().
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.
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
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.
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.
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.
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.
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.
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
Sascha Wildner [Fri, 23 Oct 2020 07:12:28 +0000 (09:12 +0200)]
rc.d: Fix indent.
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.
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.
Sascha Wildner [Wed, 21 Oct 2020 18:57:06 +0000 (20:57 +0200)]
hammer2(8): Oops, unbreak build.
Sascha Wildner [Wed, 21 Oct 2020 18:54:42 +0000 (20:54 +0200)]
hammer2(8): Point out dead code a bit clearer.
Tomohiro Kusumi [Tue, 20 Oct 2020 16:18:11 +0000 (01:18 +0900)]
sys/vfs/ext2fs: Enable VFCF_MPSAFE
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.
Sascha Wildner [Wed, 21 Oct 2020 02:45:36 +0000 (04:45 +0200)]
hostname(1): Remove unneeded extra parentheses.
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.
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.
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.
Sascha Wildner [Tue, 20 Oct 2020 10:48:57 +0000 (12:48 +0200)]
<sys/exislock.h>: Add include guard and adjust includes.
Sascha Wildner [Mon, 19 Oct 2020 16:29:49 +0000 (18:29 +0200)]
Adjust permissions of various files.
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
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.
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()
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.
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().
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.
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.
Daniel Fojt [Thu, 15 Oct 2020 17:06:23 +0000 (19:06 +0200)]
Upgrade libedit. 2/2
Update README.{DELETED,DRAGONFLY}.
Daniel Fojt [Thu, 15 Oct 2020 16:42:16 +0000 (18:42 +0200)]
Upgrade libedit. 1/2
Merge branch 'vendor/LIBEDIT' into master.
Daniel Fojt [Wed, 14 Oct 2020 19:42:25 +0000 (21:42 +0200)]
vendor/libedit: upgrade from 2019-03-24 to 2019-12-31
Most significant changes:
- avoid screwed terminal when going back in history [1]
- fix undefined terminal behavior in terminal_move_to_line() [2]
- avoid uninitialized memory access in hist_get() [3]
- fix segfault from re_fastputc() in certain situations [4]
[1] http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=52359
[2] http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54329
[3] http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54399
[4] http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54654
Daniel Fojt [Fri, 16 Oct 2020 05:19:38 +0000 (07:19 +0200)]
etc/regdomain.xml: sync with FreeBSD
Sascha Wildner [Thu, 15 Oct 2020 18:51:10 +0000 (20:51 +0200)]
Update the pciconf(8) database.
October 11, 2020 snapshot from https://pci-ids.ucw.cz
Sascha Wildner [Thu, 15 Oct 2020 18:48:25 +0000 (20:48 +0200)]
Sync zoneinfo database with tzdata2020b from ftp://ftp.iana.org/tz/releases
* Revised predictions for Morocco's changes starting in 2023.
* Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
* Macquarie Island has stayed in sync with Tasmania since 2011.
* Casey, Antarctica is at +08 in winter and +11 in summer.
* Various other fixes and corrections in past timestamps.
For a detailed list of changes, see share/zoneinfo/NEWS.
Tomohiro Kusumi [Wed, 14 Oct 2020 17:56:07 +0000 (02:56 +0900)]
sys/vfs/hammer2: Redo
428dc73dec68fbb23a2d18e7a7ef1048287709a6
Should detect invalid blockrefs other than empty if any,
and keep the behavior unchanged.
Tomohiro Kusumi [Wed, 14 Oct 2020 15:30:20 +0000 (00:30 +0900)]
sys/vfs/hammer2: Simplify chain allocation in hammer2_chain_alloc()
This initially had different behavior depending on blockref type,
but today all it does is allocate a chain, so just test invalid empty
blockref case for empty blockref slot and then allocate.
Tomohiro Kusumi [Wed, 14 Oct 2020 15:19:20 +0000 (00:19 +0900)]
sys/vfs/hammer2: Cleanup invalid blockref type switch cases
Tomohiro Kusumi [Tue, 13 Oct 2020 15:50:46 +0000 (00:50 +0900)]
sys/vfs/hammer2: Remove unused chain size variable in hammer2_chain_rename()
This local variable is unused.
It used to be in around
a4dc31e022f821212e65d95b025bca4d77c73ca6 in 2013.
Also remove obsolete comment.
Sascha Wildner [Wed, 14 Oct 2020 14:25:41 +0000 (16:25 +0200)]
mt(1): Change c_code to u_long because it has to hold an ioctl command.
Forgotten porting to x86_64.
Sascha Wildner [Sun, 11 Oct 2020 21:49:47 +0000 (23:49 +0200)]
kernel: Remove unused memmove() and memset() from libkern.
Sascha Wildner [Wed, 14 Oct 2020 14:22:23 +0000 (16:22 +0200)]
df(1): Remove an unused function.
François Tigeot [Wed, 14 Oct 2020 08:54:21 +0000 (10:54 +0200)]
drm: fix a bug in ttm_bo_add_to_lru()
Sascha Wildner [Tue, 13 Oct 2020 20:47:48 +0000 (22:47 +0200)]
ipcrm(1): semctl() needs no argument for IPC_RMID.
Matthew Dillon [Tue, 13 Oct 2020 17:23:56 +0000 (10:23 -0700)]
newfs_hammer2 - Cleanup slight code mess
* Cleanup the use of NLabels in the strlen() tests.
* Require -L labels to not be 0-length, and change the string length
limit from 64 to 63. 64 should work just fine since we store the
length field, but its easier to debug with termination.
Reported-by: kHacks
Matthew Dillon [Tue, 13 Oct 2020 06:38:31 +0000 (23:38 -0700)]
kernel - Remove unintended debug kprintf() from vfs_mount.c
* Remove unintended debug kprintf()
Matthew Dillon [Mon, 12 Oct 2020 22:57:46 +0000 (15:57 -0700)]
kernel - Initial commit for Existential structural tracking
* Initial commit for exislock (existance-lock) support, based on
cpu tick interlocks. Requires a bit more work.
(see also previous commit 'Add missing sys/exislock.h' which wasn't
actually missing at the time).
This is a type-safe critical section plus a cache-friendly soft-lock
type for system data structures that allows interlocking against structural
existance and usability.
The critical path has no atomic operations or cache ping-ponging. Cache
ping-ponging occurs at most once per pseudo_tick (once every 2 real
ticks) to reset the timeout field.
* Implements a global 'pseudo_ticks' counter. This counter is only able
to count when all cpus are armed. All cpus are armed on every 1->0
transition of their mycpu->gd_exislockcnt field. This, while the
interlock is held, the global pseudo_ticks counter will increment
by at most one, then stall.
The cpus are disarmed when this increment occurs on even ticks
and rearmed (if gd_exislockcnt is 0) on odd ticks. This the global
pseudo_ticks counter increments at roughly hz / 2 under most conditions.
This means that even when the per-cpu type-safe critical section is
under very heavy load, cycling constantly, the global pseudo_ticks
still tends to increment on a regular basis becaues there are a lot
of 1->0 transitions occurring on each cpu. Importantly, the cpus do
not need to be synchronized in order for pseudo_ticks to increment.
* This codebase will be used to implement type-safe storage and
lockless hash-table based caches. It works like this:
- You use exis_hold() and exis_drop() around the type-safe
code sections.
While held, the global pseudo_ticks variable is guaranteed to
increment no more than once (due to a prior arming condition).
- You access the hash table or other robust structural topology
(with or without locks depending), then call exis_isusable() on
the structure you get to determine if it is usable. If TRUE is
returned, the structure will remain type-safe and will not be
repurposed for the duration of the exis_hold().
You then proceed to use the structure as needed, with or without
further locking depending on what you are doing. For example,
accessing stat information from a vnode structure could potentially
proceed without further locking.
Matthew Dillon [Mon, 12 Oct 2020 21:44:07 +0000 (14:44 -0700)]
kernel - Add missing sys/exislock.h
* Add missing sys/exislock.h
Tomohiro Kusumi [Mon, 12 Oct 2020 15:32:01 +0000 (00:32 +0900)]
sys/vfs/hammer2: Remove redundant chain size calculation in hammer2_chain_create()
hammer2_chain_alloc() sets ->bytes, so no need to recalculate.
hammer2_chain_alloc() was implemented differently when this was
written in
6934ae32a6b0216475b705fb6831ae2ca9da7672 in 2012.
Also remove obsolete comment from
b7add6753e221920947c96fab3314c39a2f67fe4 in 2015.
Tomohiro Kusumi [Sun, 11 Oct 2020 15:29:24 +0000 (00:29 +0900)]
sys/vfs/hammer2: Cleanup static chain function prototypes
Tomohiro Kusumi [Sun, 11 Oct 2020 15:12:27 +0000 (00:12 +0900)]
sys/vfs/hammer2: Remove wrong comment on chain
This union was removed in
10252dc74a966f1dbb2cb131b287e03d95807a15 in 2013.
Roy Marples [Mon, 12 Oct 2020 14:20:37 +0000 (15:20 +0100)]
Note update to dhcpcd-9.3.1
Roy Marples [Mon, 12 Oct 2020 14:19:09 +0000 (15:19 +0100)]
Merge branch 'vendor/DHCPCD'
Roy Marples [Mon, 12 Oct 2020 14:17:22 +0000 (15:17 +0100)]
Update to dhcpcd-9.3.1 with the following changes:
* dhcpcd: carrier handling issue fixed from 9.3.0
* dhcpcd: log if interface type is unsupported in debug
* duid: memory leak fixed if UUID wanted but none available
* privsep: fix receiving inet and no BPF running
* privsep: allow gettimeofday for SECCOMP
* privsep: fix stderr redirection again
Sascha Wildner [Mon, 12 Oct 2020 08:17:38 +0000 (10:17 +0200)]
installer: Fix hammer2 install.
The -f option was removed from newfs_hammer2 in
7b2944d3f07cfec26f629f9e.
Reported-by: zrj
Daniel Fojt [Sun, 11 Oct 2020 13:48:00 +0000 (15:48 +0200)]
uname(1): implement -K and -U options
Add two new options to print version of the running kernel (-K) and
user environment (-U).
Taken from: FreeBSD
Disscussed with: Sascha Wildner, Pierre-Alain TORET
Tomohiro Kusumi [Sat, 10 Oct 2020 17:30:16 +0000 (02:30 +0900)]
usr.sbin/fstyp: Test all HAMMER2 volume headers
Tomohiro Kusumi [Sat, 10 Oct 2020 15:45:11 +0000 (00:45 +0900)]
usr.sbin/fstyp: Fix style
Tomohiro Kusumi [Fri, 9 Oct 2020 19:32:59 +0000 (04:32 +0900)]
sys/vfs/hammer2: Add hammer2_inode_{data,inode}_count()
Should hide chain details from vnops frontend.
Tomohiro Kusumi [Fri, 9 Oct 2020 17:17:27 +0000 (02:17 +0900)]
sys/vfs/hammer2: Remove unused ITOV()
For inode to vnode, HAMMER2 (and most fs) just use ->vp.
Daniel Fojt [Sat, 10 Oct 2020 08:26:53 +0000 (10:26 +0200)]
Upgrade file(1) and libmagic. 2/2
Update README.{DELETED,DRAGONFLY} and regenerate config.h.
Daniel Fojt [Sat, 10 Oct 2020 08:24:20 +0000 (10:24 +0200)]
Upgrade file(1) and libmagic. 1/2
Merge branch 'vendor/FILE' into master.
Daniel Fojt [Fri, 9 Oct 2020 16:22:09 +0000 (18:22 +0200)]
vendor/file: upgrade from 5.38 to 5.39
Summary:
- add guid support
- avoid misbehaviour with hand-crafted magic file
- add missing DER types and document DER better in man page
- fix memory leaks
For details, see ChangeLog.