dragonfly.git
4 years agoinstallworld - Generate /etc/os-release
Matthew Dillon [Sat, 28 Sep 2019 21:10:01 +0000 (14:10 -0700)]
installworld - Generate /etc/os-release

* Generate an /etc/os-release file during an installworld.

4 years agohammer2 - Optimize hammer2 support threads and dispatch
Matthew Dillon [Sat, 28 Sep 2019 21:03:06 +0000 (14:03 -0700)]
hammer2 - Optimize hammer2 support threads and dispatch

* Refactor the XOP groups in order to be able to queue strategy
  calls, whenever possible, to the same CPU as the issuer.  This
  optimizes several cases and reduces unnecessary IPI traffic between
  cores.  The next best thing to do would be to not queue certain XOPs
  to an H2 support thread at all, but I would like to keep the threads
  intact for later clustering work.

  The best scaling case for this is when one has a large number of user
  threads doing I/O.  One instance of a single-threaded program on
  an otherwise idle machine might see a slightly reduction in performance
  but at the same time we completely avoid unnecessarily spamming all
  cores in the system on the behalf of a single program, so overhead is
  also significantly lower.

* This will tend to increase the number of H2 support threads since
  we need a certain degree of multiplication for domain separation.

* This should significantly increase I/O performance for multi-threaded
  workloads.

4 years agosbin/hammer2: Minor adjustments for "volhdr"
Tomohiro Kusumi [Sat, 28 Sep 2019 21:01:58 +0000 (06:01 +0900)]
sbin/hammer2: Minor adjustments for "volhdr"

* Fix argument name in prototype.
* volhdr is which=2 out of (0,1,2).
* Align volhdr line with other commands.

4 years agosbin/hammer2: Add "volhdr" to man
Tomohiro Kusumi [Sat, 28 Sep 2019 21:01:42 +0000 (06:01 +0900)]
sbin/hammer2: Add "volhdr" to man

4 years agosbin/hammer2: Sync checksum format in "show"/"freemap" with aa2131f062
Tomohiro Kusumi [Sat, 28 Sep 2019 20:20:52 +0000 (05:20 +0900)]
sbin/hammer2: Sync checksum format in "show"/"freemap" with aa2131f062

HAMMER2_CHECK_XXHASH64, HAMMER2_CHECK_SHA192, HAMMER2_CHECK_FREEMAP
were left with old output format, so update those.

4 years agohammer2 - add 'volhdr' directive to dump volume header
Matthew Dillon [Sat, 28 Sep 2019 18:58:40 +0000 (11:58 -0700)]
hammer2 - add 'volhdr' directive to dump volume header

* Add the 'volhdr' directive to dump the volume header.

* Correct a bug in 'show' and 'freemap' where it was always dumping
  the last volume header and not the best volume header.

* Reformat the output a bit to make it neater.

4 years agolib/libdmsg: Use libkern instead of lib/libdmsg/icrc.c
Tomohiro Kusumi [Fri, 27 Sep 2019 19:16:49 +0000 (04:16 +0900)]
lib/libdmsg: Use libkern instead of lib/libdmsg/icrc.c

Remove yet another copy of icrc file in lib/libdmsg, with only
difference in function names which start with dmsg_ prefix.

4 years agoshare/mk: Install bsd.crunchgen.mk
Antonio Huete Jimenez [Fri, 27 Sep 2019 22:37:51 +0000 (00:37 +0200)]
share/mk: Install bsd.crunchgen.mk

- Allows using the functionality it provides from outside the source tree.

4 years agorc: Rename jail's rc default variables
Antonio Huete Jimenez [Fri, 27 Sep 2019 22:27:21 +0000 (00:27 +0200)]
rc: Rename jail's rc default variables

- Also add the remaining sysctls that were not handled. Here's
  the current list:

      jail_default_set_hostname_allow       (default: enabled)
      jail_default_socket_unixiproute_only  (default: enabled)
      jail_default_sysvipc_allow            (default: disabled)
      jail_default_chflags_allow            (default: disabled)
      jail_default_raw_sockets_allow        (default: disabled)

- You can override the default by editing rc.conf(5) as usual, please
  make sure you adjust these variables if you're using them.

4 years agodsynth - Allow the package suffix to be configured
Matthew Dillon [Fri, 27 Sep 2019 19:28:15 +0000 (12:28 -0700)]
dsynth - Allow the package suffix to be configured

* Add support for a 'Package_suffix' configuration variable in
  dsynth.ini.  This may be set to any of:

  .tar
  .tgz
  .txz
  .tbz

* By default .txz is used for maximum compression, at the cost of
  longer bulk build times due to decompression overhead, the same
  as synth.

  For faster bulk builds we recommend using .tgz.  This will
  significant increase the size of the repo since the compression is
  not as good.

4 years agodsynth - Dump final summary to the 00 log as well
Matthew Dillon [Fri, 27 Sep 2019 19:15:02 +0000 (12:15 -0700)]
dsynth - Dump final summary to the 00 log as well

* Dump the final summary the 00 log in addition to stdout.

* Ensure that the monitor picks up the final log lines before
  exiting.

4 years agoSome cleanup regarding the removal of the old clang 3.8 framework.
Sascha Wildner [Fri, 27 Sep 2019 11:16:40 +0000 (13:16 +0200)]
Some cleanup regarding the removal of the old clang 3.8 framework.

Forgotten in 9f47dde1b3a468c6ec0f5593a50c214b95f51ebc.

4 years agodsynth - add 'dsynth monitor' directive
Matthew Dillon [Thu, 26 Sep 2019 21:10:54 +0000 (14:10 -0700)]
dsynth - add 'dsynth monitor' directive

* Create a statistics monitoring file in LOGS/stats/monitor.dat and a
  lock file in LOGS/stats/monitor.lk that can be used to test whether
  dsynth is running or not.

* Add 'dsynth monitor', a front-end which monitors a dsynth already
  running in the background.  Any number of monitors can be in
  operation and killing the monitor has no effect on the running dsynth.

  If no additional argument is given the directive locates the
  monitor.dat file via the configuration (LOGS/stats/monitor.dat).

  You may specify a specific monitor.dat file if desired but note
  that if you do so logs will not be available and the monitor will
  also not be able to detect if dsynth is not running or when dsynth
  exits.

* Reorganize a few things so we can use the ncurses code for both
  the ncurses display feature and the monitor feature.

* Compartmentalize the log line reading code.

4 years agonmalloc(3): Add missing #include "namespace.h" and adjust.
Sascha Wildner [Thu, 26 Sep 2019 18:43:44 +0000 (20:43 +0200)]
nmalloc(3): Add missing #include "namespace.h" and adjust.

4 years agofsck_msdosfs(8): Add missing free()s.
Sascha Wildner [Thu, 26 Sep 2019 18:17:32 +0000 (20:17 +0200)]
fsck_msdosfs(8): Add missing free()s.

4 years agosort(1): Remove duplicate option check.
Sascha Wildner [Thu, 26 Sep 2019 18:16:12 +0000 (20:16 +0200)]
sort(1): Remove duplicate option check.

4 years agodsynth - Check template change / worker count change
Matthew Dillon [Thu, 26 Sep 2019 16:06:07 +0000 (09:06 -0700)]
dsynth - Check template change / worker count change

* Be more robust when creating the template, detect
  if the worker count has changed or if a new world
  has been installed in the system base, and check
  $/bin/ls in all template copies instead of just one.

* The source of the "x\n" in the logs has been identified
  but not yet fixed.  Its due to the master/slave handshake.
  Master pty echo causes it to also get logged.

4 years agosys/vfs/msdosfs: Reduce size of struct defid
Tomohiro Kusumi [Thu, 26 Sep 2019 21:11:56 +0000 (06:11 +0900)]
sys/vfs/msdosfs: Reduce size of struct defid

freebsd/freebsd@149e5a04f74fb1cfc857fa0f9ef9b70cd86520f5

4 years agosys/vfs/msdosfs: Whitespace fixes (minimize diff noises against FreeBSD)
Tomohiro Kusumi [Thu, 26 Sep 2019 20:55:17 +0000 (05:55 +0900)]
sys/vfs/msdosfs: Whitespace fixes (minimize diff noises against FreeBSD)

4 years agoSync zoneinfo database with tzdata2019c from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Thu, 26 Sep 2019 09:19:12 +0000 (11:19 +0200)]
Sync zoneinfo database with tzdata2019c from ftp://ftp.iana.org/tz/releases

* Fiji observes DST from 2019-11-10 to 2020-01-12.

* Norfolk Island starts observing Australian-style DST.

* Many corrections to time in Turkey from 1940 through 1985.
    (Thanks to Oya Vulaş via Alois Treindl, and to Kıvanç Yazan.)

* The Norfolk Island 1975-03-02 transition was at 02:00 standard
    time, not 02:00 DST.  (Thanks to Michael Deckers.)

* South Korea observed DST from 1948 through 1951.  Although this
    info was supposed to appear in release 2014j, a typo inadvertently
    suppressed the change.  (Thanks to Alois Treindl.)

* Detroit observed DST in 1967 and 1968 following the US DST rules,
    except that its 1967 DST began on June 14 at 00:01.  (Thanks to
    Alois Treindl for pointing out that the old data entries were
    probably wrong.)

* Fix several errors in pre-1970 transitions in Perry County, IN.
    (Thanks to Alois Triendl for pointing out the 1967/9 errors.)

* Edmonton did not observe DST in 1967 or 1969.  In 1946 Vancouver
    ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not
    10-06.  In 1945 Königsberg (now Kaliningrad) switched from +01/+02
    to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated
    EET/EEST, not CET/CEST.  (Thanks to Alois Triendl.)  In 1946
    Königsberg switched to +03 on 04-07 not 01-01.

* In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not
    01-01 at 00:00.  (Thanks to Alois Treindl and Michael Deckers.)
    Also, it switched from CST to CDT on 1950-04-30, not 1947-04-27.

* The 1892-05-01 transition in Brussels was at 00:17:30, not at noon.
    (Thanks to Michael Deckers.)

* Hong Kong Winter Time, observed from 1941-10-01 to 1941-12-25,
    is now flagged as DST and is abbreviated HKWT not HKT.

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

4 years agoRemove Theory. Available via https://data.iana.org/time-zones/theory.html
Sascha Wildner [Thu, 26 Sep 2019 09:16:01 +0000 (11:16 +0200)]
Remove Theory. Available via https://data.iana.org/time-zones/theory.html

4 years agodsynth(1): Some minor fixes / cleanup.
Sascha Wildner [Thu, 26 Sep 2019 07:03:34 +0000 (09:03 +0200)]
dsynth(1): Some minor fixes / cleanup.

* Remove a duplicate return.

* Remove an "if (force)" within an "if (force)".

4 years agodsynth(1): Change script perms to 644. install(1) handles final ones.
Sascha Wildner [Thu, 26 Sep 2019 06:41:46 +0000 (08:41 +0200)]
dsynth(1): Change script perms to 644. install(1) handles final ones.

4 years agousr.sbin/autofs: Change autounmountd(8) to use time_t for duration instead of double
Tomohiro Kusumi [Thu, 26 Sep 2019 11:50:01 +0000 (20:50 +0900)]
usr.sbin/autofs: Change autounmountd(8) to use time_t for duration instead of double

freebsd/freebsd@d1115235daf2a6a2f3bcdb3c840722fbc548d2ee

4 years agousr.sbin/autofs: Fix segfault that could occur on "automount -LL"
Tomohiro Kusumi [Thu, 26 Sep 2019 11:33:22 +0000 (20:33 +0900)]
usr.sbin/autofs: Fix segfault that could occur on "automount -LL"

freebsd/freebsd@6481c0f9038450666abe90d235d2a8454b12a7cb

4 years agousr.sbin/autofs: Add DOLLAR
Tomohiro Kusumi [Thu, 26 Sep 2019 11:30:09 +0000 (20:30 +0900)]
usr.sbin/autofs: Add DOLLAR

freebsd/freebsd@abc2058c6033886873a3c02254eb3e9cb8d4e489

4 years ago<sys/time.h>: Add 3rd arg to timespecadd()/sub() and make them public.
Sascha Wildner [Wed, 25 Sep 2019 17:40:52 +0000 (19:40 +0200)]
<sys/time.h>: Add 3rd arg to timespecadd()/sub() and make them public.

* Switch to the three argument versions of the timespecadd() and
  timespecsub() macros. These are now the predominant ones. FreeBSD,
  OpenBSD, NetBSD, and Solaris (albeit only for the kernel) have them.

* Make those macros public too. This allows for a number of cleanups
  where they were defined locally.

Pointed-out-by: zrj
Reviewed-by: dillon
4 years agosys/vfs/msdosfs: Use timespec2fattime()/fattime2timespec()
Tomohiro Kusumi [Wed, 25 Sep 2019 16:35:08 +0000 (01:35 +0900)]
sys/vfs/msdosfs: Use timespec2fattime()/fattime2timespec()

freebsd/freebsd@abedeeee558af25b4abd739c4dbe7cf90e743857

4 years agosys/kern: Bring in timespec2fattime()/fattime2timespec() from FreeBSD
Tomohiro Kusumi [Wed, 25 Sep 2019 16:20:18 +0000 (01:20 +0900)]
sys/kern: Bring in timespec2fattime()/fattime2timespec() from FreeBSD

freebsd/freebsd@e74f0ab1401b205bfe9ee22d26d1800157598185
freebsd/freebsd@cc74fcabb418a714919dc9abc75e57e47b0a058c
says

"""
    Add two new functions to convert FAT filesystem format timestamps
    to and from struct timespec, to replace the crummy conversion
    function which have been copy&pasted into three different
    filesystems already.

    Apart from general crummyness as indicated by code like:

            for (year = 1970;; year++) {
                    inc = year & 0x03 ? 365 : 366;
                    if (days < inc)
                            break;
                    days -= inc;
            }

    They also contain specialized crummyness which tries to compensate
    for the general crummyness by caching recent conversion results,
    with no regard for locking or consistency.

    These replacement functions are smaller, O(1) and handle the Y2.1K
    leap-year correctly.

    Ideally, these functions should live in a module of their own,
    which the three offending filesystems would depend on, but the
    size is 877 bytes of code (on i386), so that would be false
    economy.
"""

Note that utc argument is ignored in DragonFly (unused by FAT).

4 years agosys/vfs/msdosfs: b*() -> mem*() (sync with FreeBSD mostly)
Tomohiro Kusumi [Tue, 24 Sep 2019 18:03:48 +0000 (03:03 +0900)]
sys/vfs/msdosfs: b*() -> mem*() (sync with FreeBSD mostly)

4 years agohier.7: Mention /usr/share/dsynth.
Sascha Wildner [Tue, 24 Sep 2019 18:53:17 +0000 (20:53 +0200)]
hier.7: Mention /usr/share/dsynth.

4 years agodsynth.1: Fix document title.
Sascha Wildner [Tue, 24 Sep 2019 18:49:53 +0000 (20:49 +0200)]
dsynth.1: Fix document title.

4 years agosys/vfs/msdosfs: Minimize diff vs FreeBSD
Tomohiro Kusumi [Tue, 24 Sep 2019 15:30:10 +0000 (00:30 +0900)]
sys/vfs/msdosfs: Minimize diff vs FreeBSD

Just move some functions around within a same file.

4 years agoshowmount(8): Staticize and fix an unnecessary enum -> int cast.
Sascha Wildner [Tue, 24 Sep 2019 09:29:11 +0000 (11:29 +0200)]
showmount(8): Staticize and fix an unnecessary enum -> int cast.

4 years agolibc/nsdispatch: Use libc_dlopen().
Sascha Wildner [Tue, 24 Sep 2019 08:10:42 +0000 (10:10 +0200)]
libc/nsdispatch: Use libc_dlopen().

4 years agosbin/fsck_hammer2: Make blockref error message more verbose
Tomohiro Kusumi [Mon, 23 Sep 2019 16:30:03 +0000 (01:30 +0900)]
sbin/fsck_hammer2: Make blockref error message more verbose

Keep a copy of blockref in blockref_msg, and print
type and key/keybits in addition to offset and message.

Also use lower case for offset and key.

4 years agosbin/hammer2: Implement HAMMER2_CHECK_SHA192 case in "show"
Tomohiro Kusumi [Sun, 22 Sep 2019 19:15:36 +0000 (04:15 +0900)]
sbin/hammer2: Implement HAMMER2_CHECK_SHA192 case in "show"

Taken from hammer2_chain_testcheck().

4 years agosbin/fsck_hammer2: Fix read(2) retvals to use ssize_t
Tomohiro Kusumi [Sun, 22 Sep 2019 17:23:08 +0000 (02:23 +0900)]
sbin/fsck_hammer2: Fix read(2) retvals to use ssize_t

4 years agosbin/fsck_hammer2: Add initial fsck support for HAMMER2
Tomohiro Kusumi [Sun, 22 Sep 2019 11:30:10 +0000 (20:30 +0900)]
sbin/fsck_hammer2: Add initial fsck support for HAMMER2

Add initial fsck support for HAMMER2,
although CoW fs doesn't require fsck as a concept.
Currently no repairing (no write), just verifying.

Keep this as a separate command for now.

4 years agosbin/hammer2: Use SEEK_SET
Tomohiro Kusumi [Thu, 19 Sep 2019 16:27:57 +0000 (01:27 +0900)]
sbin/hammer2: Use SEEK_SET

4 years agomake_autoclone_dev.9: Fix for return value of devfs_clone_bitmap_set().
Sascha Wildner [Fri, 20 Sep 2019 17:31:01 +0000 (19:31 +0200)]
make_autoclone_dev.9: Fix for return value of devfs_clone_bitmap_set().

4 years agonetwork: Don't report deletion of cloned routes
Roy Marples [Fri, 20 Sep 2019 09:09:46 +0000 (10:09 +0100)]
network: Don't report deletion of cloned routes

ARP and ND6 expiration works around one big timer vs timers
per address. As such, when expiry happens a flood of RTM_DELETE
messages can easily overflow the route(4) socket.

Now that RTM_MISS is reported for any unresolvable address via
these protocols, the reporting of the address expiring or being
maually deleted becomes questionable for any use cases pertaining
to it.

If we do want to report this in the future, we should move to
per address timers rather than one big timer.

4 years agoopenresolv: The pdns_recursor manual page is in section 1, not 8.
Sascha Wildner [Thu, 19 Sep 2019 21:04:47 +0000 (23:04 +0200)]
openresolv: The pdns_recursor manual page is in section 1, not 8.

Fixed upstream too and will just merge when we upgrade again.

4 years agosbin/hammer2: Explicitly clear stats in each show/freemap run
Tomohiro Kusumi [Wed, 18 Sep 2019 22:58:27 +0000 (07:58 +0900)]
sbin/hammer2: Explicitly clear stats in each show/freemap run

4 years agosbin/hammer2: Don't show 0 freemap stats in quiet mode
Tomohiro Kusumi [Wed, 18 Sep 2019 21:35:34 +0000 (06:35 +0900)]
sbin/hammer2: Don't show 0 freemap stats in quiet mode

Quiet mode has been ignoring freemap stats, so separate freemap
stats from data.

4 years agosbin/hammer2: Show freemap stats for all bitmap states
Tomohiro Kusumi [Wed, 18 Sep 2019 17:01:46 +0000 (02:01 +0900)]
sbin/hammer2: Show freemap stats for all bitmap states

Add "Total possibly free storage" and "Total allocated storage"
stats which correspond to bitmap value of 2 and 3.

In addition to above, add "Total unavailable storage" (boot/aux/etc)
and "Total freemap storage". The total freemap storage value should
be sum of all others.

Note that unallocated or allocated stats represent space out of
freemap leaf that can be traversed from root, excluding space for
boot/aux/etc area. Not out of the entire device.

4 years agosbin/hammer2: Use appropriate macros and typedefs in CountFreeBlocks()
Tomohiro Kusumi [Wed, 18 Sep 2019 16:33:52 +0000 (01:33 +0900)]
sbin/hammer2: Use appropriate macros and typedefs in CountFreeBlocks()

4 years agosbin/hammer2: Fix CountFreeBlocks()
Tomohiro Kusumi [Tue, 17 Sep 2019 17:46:25 +0000 (02:46 +0900)]
sbin/hammer2: Fix CountFreeBlocks()

Need to do 2 or 8 bit shift in each loop.

4 years agodsynth.1: Ada is the name of a person, not an acronym.
Sascha Wildner [Tue, 17 Sep 2019 20:31:08 +0000 (22:31 +0200)]
dsynth.1: Ada is the name of a person, not an acronym.

While here, start sentences on a new line and change 'cpu' to 'CPU',
because _that_ is an acronym. :)

4 years agosys/vfs/hammer2: hammer2_chain_t is unneeded for dummy blockref
Tomohiro Kusumi [Mon, 16 Sep 2019 16:34:11 +0000 (01:34 +0900)]
sys/vfs/hammer2: hammer2_chain_t is unneeded for dummy blockref

hammer2_chain_create_indirect() only needs hammer2_blockref_t
part of chain as a local variable. Do the same as hammer2_chain_create()
to save stack a bit.

4 years agosys/vfs/hammer2: Cleanup freemap index calculation
Tomohiro Kusumi [Mon, 16 Sep 2019 13:02:13 +0000 (22:02 +0900)]
sys/vfs/hammer2: Cleanup freemap index calculation

Freemap bitmaps (64KB x 5levels x 8rotations) exist in the first
4MB area of every 1GB, so bitmap offset mask should be 4MB-1 rather
than 1GB-1. It explicitly wants to clear bit 22-29.

This doesn't change the result since bref->data_off for freemap
itself has to have 0 for bit 22-29.

4 years agosbin/hammer2: Add assertion for freemap index in "show"
Tomohiro Kusumi [Mon, 16 Sep 2019 12:58:31 +0000 (21:58 +0900)]
sbin/hammer2: Add assertion for freemap index in "show"

Test lower end of index.

4 years agowtmpcvt.1: Fix a path and use .Mt for email addresses.
Sascha Wildner [Tue, 17 Sep 2019 07:40:49 +0000 (09:40 +0200)]
wtmpcvt.1: Fix a path and use .Mt for email addresses.

4 years agovkernel - Add MD_PAGE_FREEABLE() dummy macro
Matthew Dillon [Sun, 15 Sep 2019 20:19:50 +0000 (13:19 -0700)]
vkernel - Add MD_PAGE_FREEABLE() dummy macro

* Add a dummy macro for MD_PAGE_FREEABLE() so the vkernel builds.

* Fix vkernel compile error due to st_blksize size change.

Reported-by: swildner
4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sun, 15 Sep 2019 19:36:42 +0000 (21:36 +0200)]
Update the pciconf(8) database.

September 14, 2019 snapshot from https://pci-ids.ucw.cz

4 years agosbin/hammer2: Remove dofreemap argument from show_bref()
Tomohiro Kusumi [Sun, 15 Sep 2019 19:19:09 +0000 (04:19 +0900)]
sbin/hammer2: Remove dofreemap argument from show_bref()

208afee512 removed `dofreemap` test from show_bref() by having
HAMMER2_BREF_TYPE_FREEMAP switch/case for blockref type,
so `dofreemap` is no longer needed in show_bref().

Blockref itself contains `dofreemap` information.

4 years agoboot/efi: Sync our TianoCore EDK II headers with the edk2-stable201908 tag.
Sascha Wildner [Sun, 15 Sep 2019 15:12:29 +0000 (17:12 +0200)]
boot/efi: Sync our TianoCore EDK II headers with the edk2-stable201908 tag.

Not much to see here. Mostly whitespace in comments.

4 years agosbin/fsck_msdosfs: u_int32_t -> uint32_t
Tomohiro Kusumi [Sat, 14 Sep 2019 22:54:03 +0000 (07:54 +0900)]
sbin/fsck_msdosfs: u_int32_t -> uint32_t

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@853a3e49 (fix cluster chain check)
Tomohiro Kusumi [Sat, 14 Sep 2019 22:33:39 +0000 (07:33 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@853a3e49 (fix cluster chain check)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@7716a7c6 (be permissive)
Tomohiro Kusumi [Sat, 14 Sep 2019 22:30:50 +0000 (07:30 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@7716a7c6 (be permissive)

and freebsd/freebsd@4216ffd6.

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@915380d5 (preen flag)
Tomohiro Kusumi [Sat, 14 Sep 2019 22:12:00 +0000 (07:12 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@915380d5 (preen flag)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@f4323232 (style(9))
Tomohiro Kusumi [Sat, 14 Sep 2019 21:49:11 +0000 (06:49 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@f4323232 (style(9))

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@55bd3d12 (fix index)
Tomohiro Kusumi [Sat, 14 Sep 2019 22:02:15 +0000 (07:02 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@55bd3d12 (fix index)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@3bf7697a (prevent OOB access when corrupted)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:58:37 +0000 (06:58 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@3bf7697a (prevent OOB access when corrupted)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@7a3e0d6f (fix readboot() check)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:56:07 +0000 (06:56 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@7a3e0d6f (fix readboot() check)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@9d029ca4 (fix build)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:53:15 +0000 (06:53 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@9d029ca4 (fix build)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@3b04951c (use MAX())
Tomohiro Kusumi [Sat, 14 Sep 2019 21:42:07 +0000 (06:42 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@3b04951c (use MAX())

and remaining bits from freebsd/freebsd@d704245c.

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@e2cfe252 (optimize memsets)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:39:30 +0000 (06:39 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@e2cfe252 (optimize memsets)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@89f9bddc (properly restore lfcl)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:35:43 +0000 (06:35 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@89f9bddc (properly restore lfcl)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@375de295 (fixes from other BSDs)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:32:11 +0000 (06:32 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@375de295 (fixes from other BSDs)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@9503e2d6 (distinguish lseek)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:22:49 +0000 (06:22 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@9503e2d6 (distinguish lseek)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@f7ba4b24 (assertion)
Tomohiro Kusumi [Sat, 14 Sep 2019 21:16:04 +0000 (06:16 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@f7ba4b24 (assertion)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@4438d719 (boot block)
Tomohiro Kusumi [Sat, 14 Sep 2019 20:49:56 +0000 (05:49 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@4438d719 (boot block)

Also bring in
freebsd/freebsd@d0f63ec230e612c0a7e95af6f95e401ddace4ac3
freebsd/freebsd@37cb22f7f4cfc363dfe7e014ca1155275ac2e55c
freebsd/freebsd@d85e2bfb0863227627e47856cb9a556a8f42a7ad

4 years agosbin/fsck_msdosfs: Minor fixes/sync with FreeBSD
Tomohiro Kusumi [Sat, 14 Sep 2019 20:32:31 +0000 (05:32 +0900)]
sbin/fsck_msdosfs: Minor fixes/sync with FreeBSD

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@ce102225 (respect FSFIXFAT)
Tomohiro Kusumi [Sat, 14 Sep 2019 20:24:18 +0000 (05:24 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@ce102225 (respect FSFIXFAT)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@39c1449b (fix prompts)
Tomohiro Kusumi [Sat, 14 Sep 2019 20:21:37 +0000 (05:21 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@39c1449b (fix prompts)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@53d879fa (mix of unrelated changes...)
Tomohiro Kusumi [Sat, 14 Sep 2019 19:59:49 +0000 (04:59 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@53d879fa (mix of unrelated changes...)

4 years agokernel - Fix improper use of CMSG_ALIGN() in unp_internalize()
Matthew Dillon [Sun, 15 Sep 2019 03:14:18 +0000 (20:14 -0700)]
kernel - Fix improper use of CMSG_ALIGN() in unp_internalize()

* The data portion of a control message must be aligned, but the
  data length does not have to be (and in fact, should not be since
  it might represent an array of smaller elements and we do not
  want to calculate the wrong number of elements).

* Fixes chrome, xpdf, etc (sendmsg() calls were failing).

* Problem revealed after the CMSG alignment was upped from 4 to 8
  bytes.

4 years agonfs - Fix utimes() bugs in NFS
Matthew Dillon [Sat, 14 Sep 2019 21:59:11 +0000 (14:59 -0700)]
nfs - Fix utimes() bugs in NFS

* Over the years I have tried very hard to avoid flushing pending writes
  when issuing [l]utimes() operations (i.e. setattr VOPs) in NFS, but
  it just causes issues every time.

* Give up.  We now flush pending writes prior to setattr() operations which
  adjust mtime.  This will slow down certain operations such as cp -Rp,
  cpdup, etc, but should improve the consistency and reliability of
  timestamps.

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@437a93c1 (test ./.. for dir dirents)
Tomohiro Kusumi [Sat, 14 Sep 2019 18:29:38 +0000 (03:29 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@437a93c1 (test ./.. for dir dirents)

Also bring in freebsd/freebsd@76844b29.

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@c4e91f79 (cleanup)
Tomohiro Kusumi [Sat, 14 Sep 2019 18:24:32 +0000 (03:24 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@c4e91f79 (cleanup)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@136be466 (s/filesystem/file system/)
Tomohiro Kusumi [Sat, 14 Sep 2019 18:16:44 +0000 (03:16 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@136be466 (s/filesystem/file system/)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@07ebfe1b (add va_end())
Tomohiro Kusumi [Sat, 14 Sep 2019 17:56:17 +0000 (02:56 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@07ebfe1b (add va_end())

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@95647bc8 (fix ask())
Tomohiro Kusumi [Sat, 14 Sep 2019 17:53:30 +0000 (02:53 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@95647bc8 (fix ask())

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@cbe11b37 (add \n)
Tomohiro Kusumi [Sat, 14 Sep 2019 17:00:06 +0000 (02:00 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@cbe11b37 (add \n)

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@d704245c (s/perror/perr/)
Tomohiro Kusumi [Sat, 14 Sep 2019 03:23:31 +0000 (12:23 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@d704245c (s/perror/perr/)

Ignore most of sbin/fsck part (not in sync with FreeBSD at all).

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@ce3384ad (bsdl changes from NetBSD)
Tomohiro Kusumi [Sat, 14 Sep 2019 02:23:37 +0000 (11:23 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@ce3384ad (bsdl changes from NetBSD)

and freebsd/freebsd@7551d83c.

4 years agosbin/fsck_msdosfs: Bring in freebsd/freebsd@1bb580c8 (rename struct fields)
Tomohiro Kusumi [Sat, 14 Sep 2019 00:18:43 +0000 (09:18 +0900)]
sbin/fsck_msdosfs: Bring in freebsd/freebsd@1bb580c8 (rename struct fields)

4 years agotmpfs - Close rare vnode recycle race
Matthew Dillon [Sat, 14 Sep 2019 14:35:51 +0000 (07:35 -0700)]
tmpfs - Close rare vnode recycle race

* Keep the node lock held when clearing tn_vnode in tmpfs_reclaim()
  to protect against a use-after-free race on tn_vnode against another
  thread.

* Keep the node locked across the node type check and vnode
  ref in tmpfs_unmount() to protect against asynchronous
  reclamation races.

4 years agokernel - Add needed ccfence and more error checks
Matthew Dillon [Sat, 14 Sep 2019 14:33:15 +0000 (07:33 -0700)]
kernel - Add needed ccfence and more error checks

* Add a cpu_ccfence() to PMAP_PAGE_BACKING_SCAN in order to prevent
  over-optimization of the ipte load by the compiler.

* Add machine-dependent assertion in the vm_page_free*() path to
  ensure that the page is not normally mapped at the time of the
  free.

4 years agodsynth(1): Fix DPADD situation in the Makefile.
Sascha Wildner [Sat, 14 Sep 2019 12:58:39 +0000 (14:58 +0200)]
dsynth(1): Fix DPADD situation in the Makefile.

4 years agodsynth(1): Fix 'make install' with $DESTDIR set.
Sascha Wildner [Sat, 14 Sep 2019 12:40:20 +0000 (14:40 +0200)]
dsynth(1): Fix 'make install' with $DESTDIR set.

Now that the creation of /usr/share/dsynth is in the mtree file
(see 652cecd95046a092589807c7eea9799b71530ca4) and given that dsynth
is hooked into the build too, we could remove the beforeinstall
target, but it might still be useful for people running release,
for example. So keep it instead and fix it for when $DESTDIR is set.

4 years agomtree: Fix installworld
Antonio Huete Jimenez [Sat, 14 Sep 2019 11:42:38 +0000 (13:42 +0200)]
mtree: Fix installworld

4 years agossh: Declare that we have memset_s().
Sascha Wildner [Sat, 14 Sep 2019 08:47:59 +0000 (10:47 +0200)]
ssh: Declare that we have memset_s().

This doesn't seem to do anything in openssh's source but set it
anyway.

4 years agolibc/string: Add memset_s(3).
Sascha Wildner [Sat, 14 Sep 2019 08:47:04 +0000 (10:47 +0200)]
libc/string: Add memset_s(3).

Taken-from: FreeBSD

4 years ago<stdlib.h>: Fix typedef guard.
Sascha Wildner [Sat, 14 Sep 2019 08:45:58 +0000 (10:45 +0200)]
<stdlib.h>: Fix typedef guard.

4 years agolibc/string: Sort MLINKS
Sascha Wildner [Sat, 14 Sep 2019 07:55:07 +0000 (09:55 +0200)]
libc/string: Sort MLINKS

4 years agogetifaddrs.3: Fix .Dd
Sascha Wildner [Sat, 14 Sep 2019 07:36:59 +0000 (09:36 +0200)]
getifaddrs.3: Fix .Dd

4 years agodsynth - Fix repository generation
Matthew Dillon [Sat, 14 Sep 2019 02:17:02 +0000 (19:17 -0700)]
dsynth - Fix repository generation

* pkg repo generates .txz files no matter what the suffix.  So if the
  suffix is not .txz we have to recompress the results.

* Supply the base path to pkg repo (sans the '/All') so the generated
  yaml properly specififes the relative path "All/blahblah".  Otherwise
  the generated yaml will just generate "blahblah" and rmeote accesses
  wont be able to find the packages.

4 years agosynth.1: Fix some typos/markup.
Sascha Wildner [Fri, 13 Sep 2019 20:52:06 +0000 (22:52 +0200)]
synth.1: Fix some typos/markup.