dragonfly.git
5 hours agovnconfig.8: Mention comment lines in the configuration file. master
Sascha Wildner [Wed, 19 Jan 2022 05:51:20 +0000 (06:51 +0100)]
vnconfig.8: Mention comment lines in the configuration file.

37 hours agobuild - Update pkg-static to version 04
Antonio Huete Jimenez [Mon, 17 Jan 2022 22:09:55 +0000 (23:09 +0100)]
build - Update pkg-static to version 04

  - Should fix a problem with the metadata versioning.

    pkg-static: repository meta has wrong version 2
    pkg-static: Repository Avalon load error: meta cannot be loaded
    Undefined error: 0

4 days agoAdd the auto-bound IPv6 address to the wildcard hash
YONETANI Tomokazu [Fri, 5 Nov 2021 00:37:39 +0000 (09:37 +0900)]
Add the auto-bound IPv6 address to the wildcard hash

Dragonfly-bug: https://bugs.dragonflybsd.org/issues/3294

11 days agohammer2 - Fix excess chain structure allocations during bulkfree
Matthew Dillon [Sat, 8 Jan 2022 00:41:35 +0000 (16:41 -0800)]
hammer2 - Fix excess chain structure allocations during bulkfree

* On H2 filesystems with a very large number of inodes, such as
  those used for backups or which contain many snapshots (e.g.
  tens of millions of inodes), the bulkfree process may attempt
  to track more hammer2_chain structures than the kmalloc subsystem
  allows.

* This issue might also have contributed to reported lockups during
  bulkfree (if the bulkfree wound up eating too much non-pagable kernel
  memory), though the more typical outcome is a kernel panic when
  the kmalloc limit is exceeded for the pool.

* During bulkfree, H2 must control recursion depth during the scan.
  It does this by deferring deep nodes in the topology by recording
  a pointer to a referenced hammer2_chain structure on a list.
  Once the recursion backs out, H2 then processes these saved chains.
  Topologies greater than 32 nodes deep can wind up being deferred
  more than once to cover the entire depth.

  It is possible for an excessive number of chains to accumulate on the
  deferral list during the scan, each structure burning up kernel memory.

* Emplace a limit on the number of chains which can be deferred,
  vfs.hammer2.limit_saved_chains, with a reasonable default.  When
  the limit is reached, the bulkfree simply records a chain higher-up
  in the recursion instead of going deeper, thus limiting the number
  of chains that will be deferred.

  This has the effect is capping memory use during the bulkfree scan.
  The cost is slightly less scan efficiency, but it should mostly be in
  the noise.

12 days agolibc/isc: Stop using self assignment for unused variables.
Sascha Wildner [Thu, 6 Jan 2022 19:48:42 +0000 (20:48 +0100)]
libc/isc: Stop using self assignment for unused variables.

Some checkers complain about this.

Taken-from: FreeBSD

2 weeks agodsynth - Add config var for Meta_version and make the default 2
Matthew Dillon [Mon, 3 Jan 2022 20:13:18 +0000 (12:13 -0800)]
dsynth - Add config var for Meta_version and make the default 2

* Add the 'Meta_version' configuration variable.

* Make the default 2 (it was previously 1), to remain compatible
  with future pkg versions.

Requested-by: zrj
2 weeks agostand: Fix a typo in comment
Aaron LI [Mon, 3 Jan 2022 09:21:34 +0000 (17:21 +0800)]
stand: Fix a typo in comment

While there, adjust header inclusion a bit.

2 weeks agolibc: Fix environment passing in posix_spawnp(3)
zrj [Mon, 3 Jan 2022 06:18:15 +0000 (06:18 +0000)]
libc: Fix environment passing in posix_spawnp(3)

 The execvPe() was always passing the parent process environment to
 children (a long standing bug).

 While there, replace the deprecated index(3) with strchr(3).

Reported-by: falsifian (breakage in hs-git-annex)
2 weeks ago6.3 version changes. v6.3.0
Justin C. Sherrill [Mon, 3 Jan 2022 03:13:40 +0000 (22:13 -0500)]
6.3 version changes.

2 weeks agohammer2 - (when used for booting @BOOT) (2)
Matthew Dillon [Mon, 3 Jan 2022 00:51:22 +0000 (16:51 -0800)]
hammer2 - (when used for booting @BOOT) (2)

* Adjust the range to use HAMMER2_DIRHASH_LOMASK

Reported-by: aly
2 weeks agohammer2 - (when used for booting @BOOT)
Matthew Dillon [Sun, 2 Jan 2022 20:21:44 +0000 (12:21 -0800)]
hammer2 - (when used for booting @BOOT)

* Fix the @BOOT lookup to allow the whole hash range for "BOOT".
  This can come up if you delete the BOOT pfs and re-create it.
  hammer2 incremental the name hash collision counter to ensure
  that new PFSs are unique.

Reported-by: aly, mneumann
2 weeks agoAdd a getentropy(3) manual page.
Sascha Wildner [Fri, 31 Dec 2021 18:29:14 +0000 (19:29 +0100)]
Add a getentropy(3) manual page.

Taken-from: FreeBSD

2 weeks agoBump copyrights. Happy new year!!
Sascha Wildner [Fri, 31 Dec 2021 17:54:49 +0000 (18:54 +0100)]
Bump copyrights. Happy new year!!

2 weeks agokernel - Fix if_sn, if_sbsh issue (not in kernel by default)
Matthew Dillon [Fri, 31 Dec 2021 00:43:25 +0000 (16:43 -0800)]
kernel - Fix if_sn, if_sbsh issue (not in kernel by default)

* Fix a security problem with a data field.  Note that these drivers
  are not loaded into the kernel by default.

2 weeks agokernel - Add SIOCGHWADDR, fix SIOCGIFADDR
Matthew Dillon [Fri, 31 Dec 2021 00:40:59 +0000 (16:40 -0800)]
kernel - Add SIOCGHWADDR, fix SIOCGIFADDR

* Add SIOCGHWADDR, this is more commonly used to obtain the
  ether mac address of an interface these days.

* Fix SIOCGIFADDR which had a security problem with a data field.

2 weeks agopsm - Do not freeze mouse for 2 seconds upon encountering a single sync error
Michael Neumann [Thu, 30 Dec 2021 23:26:05 +0000 (00:26 +0100)]
psm - Do not freeze mouse for 2 seconds upon encountering a single sync error

The original code would drop all PS/2 packets for the next 2 seconds
upon missing a *single* sync byte. Instead, just discard the byte and in
case we cannot find the sync byte within the next few bytes, fall back
to the old behaviour.

Fixes bug: #3309

2 weeks agokernel - Add DIOCGMEDIASIZE and DIOCGSECTORSIZE
Matthew Dillon [Thu, 30 Dec 2021 21:15:44 +0000 (13:15 -0800)]
kernel - Add DIOCGMEDIASIZE and DIOCGSECTORSIZE

* Add DIOCGMEDIASIZE and DIOCGSECTORSIZE for 'go' and other dports.
  At the moment this requires #include <sys/diskslice.h>.

Requested-by: zrj (for dports)
2 weeks agolibc - Add getentropy()
Matthew Dillon [Thu, 30 Dec 2021 21:13:55 +0000 (13:13 -0800)]
libc - Add getentropy()

* Add getentropy().  This function uses getrandom() internally.

Requested-by: zrj, for dports
2 weeks agoRemove the old <sys/dir.h> compat header. Nothing needs it anymore.
Sascha Wildner [Thu, 30 Dec 2021 14:38:51 +0000 (15:38 +0100)]
Remove the old <sys/dir.h> compat header. Nothing needs it anymore.

The world has since switched over to <dirent.h>. Thanks to zrj for
confirming that with a full dports bulk build.

The libssh and RPC examples adjustments are just cosmetics. libssh
includes it only on NeXTSTEP and the RPC examples don't build.

3 weeks agosys/vfs/hammer2: Use HAMMER2_METH_DEFAULT
Tomohiro Kusumi [Tue, 28 Dec 2021 16:14:03 +0000 (01:14 +0900)]
sys/vfs/hammer2: Use HAMMER2_METH_DEFAULT

hammer2_chain_create() callers use HAMMER2_METH_DEFAULT, not '-1'.

3 weeks agodrm/i915: Enable WhiskeyLake GPUs
Michael Neumann [Sun, 26 Dec 2021 15:38:25 +0000 (16:38 +0100)]
drm/i915: Enable WhiskeyLake GPUs

* The PCI ids were added in commit a8138aa83 but the ids were never
  added to `pciidlist` so that the i915 driver did not recognize
  WhiskeyLake GPUs.

* Successfully tested with WhiskeyLake-U GT2 [UHD Graphics 620]
  (device=0x3ea0).

* As in Linux 5.8, they use the same configuration as CoffeeLake GPUs.

3 weeks agoAdd a small ksscanf(9) manual page.
Sascha Wildner [Sat, 25 Dec 2021 22:41:21 +0000 (23:41 +0100)]
Add a small ksscanf(9) manual page.

3 weeks agokprintf.9: Fix function argument name.
Sascha Wildner [Sat, 25 Dec 2021 22:40:10 +0000 (23:40 +0100)]
kprintf.9: Fix function argument name.

3 weeks agonvme - Back-off if driver lies about reported queue limits
Matthew Dillon [Sat, 25 Dec 2021 20:30:52 +0000 (12:30 -0800)]
nvme - Back-off if driver lies about reported queue limits

* Apparently some low-rent nvme controllers lie about how many
  queues they support.

* If the nvme driver lies about queue support and a queue
  create command fails, attempt to back-off to fewer queues
  first, rather than giving up immediately.  Complain mightily
  on the console.

3 weeks agohammer2 - Do not panic on freemap block I/O error
Matthew Dillon [Sat, 25 Dec 2021 06:45:17 +0000 (22:45 -0800)]
hammer2 - Do not panic on freemap block I/O error

* During bulkfree, do not panic if a freemap block has an I/O error.

Reported-by: aly
3 weeks agoAdd some more printf(1) tests.
Sascha Wildner [Sat, 25 Dec 2021 10:09:32 +0000 (11:09 +0100)]
Add some more printf(1) tests.

Taken-from: FreeBSD

3 weeks agolibc: Add a clearenv() function.
Sascha Wildner [Thu, 23 Dec 2021 17:33:17 +0000 (18:33 +0100)]
libc: Add a clearenv() function.

Seems useful for dports, as pointed out by zrj.

Taken-from: FreeBSD

4 weeks agogcc: Define ElfW() if it is not defined.
Sascha Wildner [Sat, 18 Dec 2021 22:41:28 +0000 (23:41 +0100)]
gcc: Define ElfW() if it is not defined.

Better than commenting it out.

Suggested-by: zrj
4 weeks agoedk2: Sync our TianoCore EDK II headers with the edk2-stable202111 tag.
Sascha Wildner [Sat, 18 Dec 2021 19:16:36 +0000 (20:16 +0100)]
edk2: Sync our TianoCore EDK II headers with the edk2-stable202111 tag.

4 weeks agoSync ACPICA with Intel's version 20211217.
Sascha Wildner [Fri, 17 Dec 2021 21:23:17 +0000 (22:23 +0100)]
Sync ACPICA with Intel's version 20211217.

* S4/S5 related fixes.

* Fix a buffer overflow.

* Add support for PCC Opregion special context data.

* Various improvements, such as adding support for various tables,
  in iasl(8).

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

4 weeks agokernel: Remove a.out and gzipped a.out executable support.
Sascha Wildner [Thu, 16 Dec 2021 21:16:00 +0000 (22:16 +0100)]
kernel: Remove a.out and gzipped a.out executable support.

This isn't useful for anything anymore. Likely never was.

Also point out that our current executable format is ELF on the
a.out(5) manual page, which we keep along with <sys/a.out.h> because
ports need it.

4 weeks agokernel/proc0_init: Do not reuse the a.out sysvec.
Sascha Wildner [Thu, 16 Dec 2021 20:45:07 +0000 (21:45 +0100)]
kernel/proc0_init: Do not reuse the a.out sysvec.

Also use correct types now.

In preparation for removing a.out executable support.

4 weeks agokernel: Remove an unnecessary include.
Sascha Wildner [Thu, 16 Dec 2021 20:40:36 +0000 (21:40 +0100)]
kernel: Remove an unnecessary include.

4 weeks agoUpdate the pciconf(8) database.
Sascha Wildner [Wed, 15 Dec 2021 15:46:46 +0000 (16:46 +0100)]
Update the pciconf(8) database.

December 10, 2021 snapshot from https://pci-ids.ucw.cz

5 weeks agogcc8: Fix the fix.
Sascha Wildner [Mon, 13 Dec 2021 20:09:33 +0000 (21:09 +0100)]
gcc8: Fix the fix.

5 weeks agogccs had ElfW() already. Comment out for now.
Sascha Wildner [Mon, 13 Dec 2021 20:04:04 +0000 (21:04 +0100)]
gccs had ElfW() already. Comment out for now.

5 weeks ago<sys/elf_generic.h>: Add ElfW() macro, for dports' benefit.
Sascha Wildner [Mon, 13 Dec 2021 19:45:17 +0000 (20:45 +0100)]
<sys/elf_generic.h>: Add ElfW() macro, for dports' benefit.

Taken-from:  FreeBSD
Reported-by: zrj
5 weeks agokernel - Fix posix_fallocate()
Matthew Dillon [Thu, 9 Dec 2021 18:18:03 +0000 (10:18 -0800)]
kernel - Fix posix_fallocate()

* Our newly minted posix_fallocate() system call was ignoring the
  offset field.

* Should fix samba, however any tdb databases that were created are
  probably corrupt so you may need to rm -rf /var/db/samba4, restart
  samba, and re-create your smb passwords.

Reported-by: Tim Darby
5 weeks agoRemove a number of duplicate struct declarations in header files.
Sascha Wildner [Wed, 8 Dec 2021 21:12:15 +0000 (22:12 +0100)]
Remove a number of duplicate struct declarations in header files.

5 weeks agoRemove the ext2fs_freebsd.ko module via 'make upgrade'.
Sascha Wildner [Wed, 8 Dec 2021 15:53:55 +0000 (16:53 +0100)]
Remove the ext2fs_freebsd.ko module via 'make upgrade'.

5 weeks agokernel/acpi: Improve an error message a bit.
Sascha Wildner [Wed, 8 Dec 2021 15:51:55 +0000 (16:51 +0100)]
kernel/acpi: Improve an error message a bit.

6 weeks agokernel/acpica: Clean up the module's .PATH a little bit more.
Sascha Wildner [Tue, 7 Dec 2021 22:49:49 +0000 (23:49 +0100)]
kernel/acpica: Clean up the module's .PATH a little bit more.

6 weeks agokernel/acpica: Remove some unneeded -I and .PATH from the Makefile.
Sascha Wildner [Tue, 7 Dec 2021 20:35:19 +0000 (21:35 +0100)]
kernel/acpica: Remove some unneeded -I and .PATH from the Makefile.

6 weeks agoBring in FreeBSD's ext2fs(5) manual page.
Sascha Wildner [Tue, 7 Dec 2021 17:52:40 +0000 (18:52 +0100)]
Bring in FreeBSD's ext2fs(5) manual page.

With some modifications as suggested by tkusumi.

6 weeks agokernel/ext2fs: Add some line breaks in SRCS in the Makefile.
Sascha Wildner [Tue, 7 Dec 2021 16:56:38 +0000 (17:56 +0100)]
kernel/ext2fs: Add some line breaks in SRCS in the Makefile.

6 weeks agoSome more adjustments regarding the recent switch to sys/vfs/ext2fs.
Sascha Wildner [Tue, 7 Dec 2021 15:35:33 +0000 (16:35 +0100)]
Some more adjustments regarding the recent switch to sys/vfs/ext2fs.

* Remove /usr/include/gnu via 'make upgrade'.

* Remove a no longer needed #undef in kdump and friends' ioctl.c.

6 weeks agoext2fs: Remove sys/gnu/vfs/ext2fs and make sys/vfs/ext2fs the default
Tomohiro Kusumi [Sun, 5 Dec 2021 16:23:39 +0000 (01:23 +0900)]
ext2fs: Remove sys/gnu/vfs/ext2fs and make sys/vfs/ext2fs the default

This commit removes the old+unstable GPL ext2 implementation,
and makes the new FreeBSD based ext2 implementation
(since cfe603905713d4e92a7956678970d5dff8e913f2) the default.

- Remove sys/gnu/vfs.
- Rename sys/vfs/ext2fs/ext2fs_freebsd.ko -> ext2fs.ko.
- Modify unusual userspace program which includes kernel struct.
- Bump __DragonFly_version to 600107.

6 weeks agobus_dma.9: Fix typo.
Sascha Wildner [Mon, 6 Dec 2021 20:23:44 +0000 (21:23 +0100)]
bus_dma.9: Fix typo.

6 weeks agosys/vfs/ext2fs: Check for e2fs_first_dblock in ext2_compute_sb_data()
Tomohiro Kusumi [Sun, 5 Dec 2021 13:00:23 +0000 (22:00 +0900)]
sys/vfs/ext2fs: Check for e2fs_first_dblock in ext2_compute_sb_data()

This prevents a kernel panic on a damaged ext2 superblock.

taken-from FreeBSD 3dd3a395ba975d0fbe13320e6e69fb85b037da5e

6 weeks agoMakefile.inc1: Fix a typo.
Sascha Wildner [Sun, 5 Dec 2021 07:08:01 +0000 (08:08 +0100)]
Makefile.inc1: Fix a typo.

6 weeks agocallout.9: Add callout_init_mp() to the SYNOPSIS.
Sascha Wildner [Wed, 1 Dec 2021 19:48:02 +0000 (20:48 +0100)]
callout.9: Add callout_init_mp() to the SYNOPSIS.

7 weeks agodrm - Hack i915 to workaround startup crash
Matthew Dillon [Tue, 30 Nov 2021 17:45:17 +0000 (09:45 -0800)]
drm - Hack i915 to workaround startup crash

* Work around a startup crash (at least on my i5-6500) caused by
  a ring timeout and request-not-completed.  Replace the BUG_ON
  with a warning and document the hack.

7 weeks agokernel - Do not block indefinitely in exit1() when draining controlling tty
Matthew Dillon [Mon, 29 Nov 2021 20:46:07 +0000 (12:46 -0800)]
kernel - Do not block indefinitely in exit1() when draining controlling tty

* exit1() tries to drain the controlling terminal.  This can block
  indefinitely and signals are no longer operational.  Force a
  1-second timeout for drain attempts.

  This is a bit of a hack but it works.

Reported-by: zach, pikrzyszt, piecuch, bug #3239
7 weeks agokernel/drmP.h: Use Linux' __printf() macro.
Sascha Wildner [Mon, 29 Nov 2021 20:41:25 +0000 (21:41 +0100)]
kernel/drmP.h: Use Linux' __printf() macro.

7 weeks agoacpi.4: Fix typo, ACPI_POWER -> ACPI_POWERRES.
Sascha Wildner [Sat, 27 Nov 2021 23:15:44 +0000 (00:15 +0100)]
acpi.4: Fix typo, ACPI_POWER -> ACPI_POWERRES.

7 weeks agokernel: Rename BUILDING_WITH_KERNEL to KERNBUILDDIR.
Sascha Wildner [Thu, 25 Nov 2021 22:17:56 +0000 (23:17 +0100)]
kernel: Rename BUILDING_WITH_KERNEL to KERNBUILDDIR.

Fits better with e.g. KERNCONFDIR.

Add a small paragraph in kmod.mk which was taken from FreeBSD.

7 weeks agokernel: Staticize some variables.
Sascha Wildner [Thu, 25 Nov 2021 20:54:21 +0000 (21:54 +0100)]
kernel: Staticize some variables.

7 weeks agonrelease: Switch to makefs(8) for the ISO's EFI system partition image.
Sascha Wildner [Thu, 25 Nov 2021 16:45:40 +0000 (17:45 +0100)]
nrelease: Switch to makefs(8) for the ISO's EFI system partition image.

Tested-by: tuxillo
7 weeks ago<sys/param.h>: Bump __DragonFly_version for makefs(8)'s msdosfs support.
Sascha Wildner [Thu, 25 Nov 2021 16:43:47 +0000 (17:43 +0100)]
<sys/param.h>: Bump __DragonFly_version for makefs(8)'s msdosfs support.

7 weeks agonrelease: Add a $WORLD_VERSION variable.
Sascha Wildner [Thu, 25 Nov 2021 16:42:24 +0000 (17:42 +0100)]
nrelease: Add a $WORLD_VERSION variable.

Can be useful when using new features in the release build.

7 weeks agonrelease: DPorts not needed for binpkgs/nopkgs
Antonio Huete Jimenez [Thu, 25 Nov 2021 00:15:21 +0000 (01:15 +0100)]
nrelease: DPorts not needed for binpkgs/nopkgs

7 weeks agoinitrd/mkinitrd.sh: Switch the initrd generation from vn(4) to makefs(8).
Sascha Wildner [Wed, 24 Nov 2021 19:21:32 +0000 (20:21 +0100)]
initrd/mkinitrd.sh: Switch the initrd generation from vn(4) to makefs(8).

We lose the 'df -h' output because nothing is mounted anymore.

7 weeks agomkinitrd.sh: Fix typo.
Sascha Wildner [Wed, 24 Nov 2021 16:49:35 +0000 (17:49 +0100)]
mkinitrd.sh: Fix typo.

8 weeks ago<machine/stdint.h>: Add platform specific __double_t and __float_t types.
Sascha Wildner [Sun, 21 Nov 2021 20:08:02 +0000 (21:08 +0100)]
<machine/stdint.h>: Add platform specific __double_t and __float_t types.

It's mostly just cosmetics but it reduces differences with OpenBSD's
<math.h>.

Also, looks like at least www/firefox is wrongly using __float_t.

Reported-by: tuxillo
8 weeks agosys/vfs/hammer2: Remove unused local variables in freemap
Tomohiro Kusumi [Sun, 21 Nov 2021 15:23:40 +0000 (00:23 +0900)]
sys/vfs/hammer2: Remove unused local variables in freemap

8 weeks agosys/vfs/hammer2: Rename **bresp -> **brefp
Tomohiro Kusumi [Sun, 21 Nov 2021 12:02:19 +0000 (21:02 +0900)]
sys/vfs/hammer2: Rename **bresp -> **brefp

hammer2_blockref_t pointer is *bref, then
the double pointer should be **brefp.

8 weeks agolibedit: Remove unused Symbol.map/Versions.def.
Sascha Wildner [Sat, 20 Nov 2021 14:26:42 +0000 (15:26 +0100)]
libedit: Remove unused Symbol.map/Versions.def.

8 weeks agolibc: Adjust the private namespace's parent to 6.2.
Sascha Wildner [Sat, 20 Nov 2021 10:45:24 +0000 (11:45 +0100)]
libc: Adjust the private namespace's parent to 6.2.

I forgot this in c89c8747ca2bf3b7292cc93bbdbefdfbfed7c821.

8 weeks agoFix select()/kqueue() bug with pipe()s
Matthew Dillon [Fri, 19 Nov 2021 18:10:29 +0000 (10:10 -0800)]
Fix select()/kqueue() bug with pipe()s

* This causes select() / kqueue() was not returning a writable condition
  on a pipe() whos other end was closed early.

  If a select/kqueue test is performed prior to the other end closing,
  then future calls will later properly detect when the other end closes.

* Should fix numerous niggling issues, including csh sometimes failing
  to recognize early exits of children.

Reported-by: tmunro, deef, bug #3307
2 months agodfregress: Add missing copyright
Antonio Huete Jimenez [Thu, 18 Nov 2021 12:37:25 +0000 (13:37 +0100)]
dfregress: Add missing copyright

2 months ago.gitignore: Ignore dfregress output files
Antonio Huete Jimenez [Wed, 17 Nov 2021 23:28:58 +0000 (00:28 +0100)]
.gitignore: Ignore dfregress output files

2 months agoRevert "bin/test: Temporarily break world"
Antonio Huete Jimenez [Wed, 17 Nov 2021 18:22:54 +0000 (19:22 +0100)]
Revert "bin/test: Temporarily break world"

This reverts commit 655933d6558d16623b4af8e48844c5c37cff5ab3.

Sorry for the noise!

2 months agobin/test: Temporarily break world
Antonio Huete Jimenez [Wed, 17 Nov 2021 18:17:53 +0000 (19:17 +0100)]
bin/test: Temporarily break world

2 months agotest/test: dummy commit
Antonio Huete Jimenez [Wed, 17 Nov 2021 17:19:10 +0000 (18:19 +0100)]
test/test: dummy commit

2 months agosys/vfs/hammer2: Fix wrong comment on freemap zone/rotation
Tomohiro Kusumi [Mon, 15 Nov 2021 16:12:06 +0000 (01:12 +0900)]
sys/vfs/hammer2: Fix wrong comment on freemap zone/rotation

Freemaps are in every 1GB, and there are 8 rotations in each freemap.
It was 2GB and 4 when this was written in
1a7cfe5ae3c897f704a358fd3e556a55e430dcb1 in 2013.

2 months agoUpdate the pciconf(8) database.
Sascha Wildner [Mon, 15 Nov 2021 14:04:06 +0000 (15:04 +0100)]
Update the pciconf(8) database.

November 11, 2021 snapshot from https://pci-ids.ucw.cz

2 months ago<sys/cdefs.h>: Fix comment.
Sascha Wildner [Sat, 13 Nov 2021 10:40:01 +0000 (11:40 +0100)]
<sys/cdefs.h>: Fix comment.

2 months agoUse ${PRIVATELIB_CFLAGS} in two more Makefiles.
Sascha Wildner [Fri, 12 Nov 2021 19:27:00 +0000 (20:27 +0100)]
Use ${PRIVATELIB_CFLAGS} in two more Makefiles.

2 months agortadvd.conf.5: Fix some typos (a 8-bit -> an 8-bit).
Sascha Wildner [Fri, 12 Nov 2021 17:49:16 +0000 (18:49 +0100)]
rtadvd.conf.5: Fix some typos (a 8-bit -> an 8-bit).

10 years agosbin/fsck_msdosfs: truncate directory entry when the head pointer is invalid.
Tomohiro Kusumi [Tue, 9 Nov 2021 16:12:26 +0000 (01:12 +0900)]
sbin/fsck_msdosfs: truncate directory entry when the head pointer is invalid.

As far as we know, there is no FAT implementation that supported hard
links, and our msdosfs driver assumed one cluster chain is only
referenced by one directory entry and clears it out when the file is
deleted.  On the other hand, the current code would proceed with
checkchain() when the directory entry's head cluster is a valid numbered
cluster without checking if it was a valid head node of a cluster chain.

So if the cluster do not being a chain (e.g. CLUST_FREE, CLUST_BAD),
or was already referenced by another directory entry, this would
trigger an assertion in check_chain() at a later time.

Fix this by giving the user an option to truncate the directory entry
when the head cluster is an invalid cluster, an visited head node,
or not a head node.

taken from FreeBSD 890cae197737b463e56d1cc5a3f61f84cb49c807

2 months agokernel/amdgpu: Remove -DLITTLEENDIAN_CPU from the Makefile.
Sascha Wildner [Mon, 8 Nov 2021 16:44:10 +0000 (17:44 +0100)]
kernel/amdgpu: Remove -DLITTLEENDIAN_CPU from the Makefile.

Maybe this was needed during porting at some point but it all
resolves fine now via amdgpu's os_types.h which defines it based
on the __{BIG,LITTLE}_ENDIAN defines that we have in based.

In-discussion-with: Sergey Zigachev <s.zi@outlook.com>

2 months agodrm - Increase hacked stolen framebuffer memory for vega9 (2400G, 3550H, ...)
Matthew Dillon [Mon, 8 Nov 2021 03:38:17 +0000 (19:38 -0800)]
drm - Increase hacked stolen framebuffer memory for vega9 (2400G, 3550H, ...)

* Increase from 9MB to 64MB, fixing a amdgpu crash on kldload when a
  4K monitor is attached.

  The assignment being fixed is already a hack as of linux 4.19.  Hack it
  some more.

2 months agodrm/radeon: Remove some unused code.
Sascha Wildner [Sun, 7 Nov 2021 12:20:05 +0000 (13:20 +0100)]
drm/radeon: Remove some unused code.

The last usage of it was removed in 857ba049f77abf52192114507b738ab0.

Reported-by: Sergey Zigachev <s.zi@outlook.com>
2 months agodrm - restore idr_alloc() functionality from amdgpu
Matthew Dillon [Sun, 7 Nov 2021 07:02:33 +0000 (00:02 -0700)]
drm - restore idr_alloc() functionality from amdgpu

* Restore idr_alloc() functionality

* Fix the IDA initializer to properly initialize the lwkt_token.

In-conversation-with: hjarvard

2 months agokernel - Fix linux_idr.c
Matthew Dillon [Sun, 7 Nov 2021 06:59:46 +0000 (23:59 -0700)]
kernel - Fix linux_idr.c

* Fix the linux compat IDR code.  Fixes an endless grow loop that
  panics the system.  lim is set to end - 1 and prevented the
  find loop from succeeding.  In addition, we want to distinguish
  between the find loop hitting the limit and the find loop not
  finding anything, so pass INT_MAX as the limit so the later limit
  check can distinguish the two cases.

In-conversation-with: hjarvard

2 months agolibc: Fix a number of .PATH related issues in the Makefiles.
Sascha Wildner [Sat, 6 Nov 2021 10:23:42 +0000 (11:23 +0100)]
libc: Fix a number of .PATH related issues in the Makefiles.

* Adjust a couple of .PATHs in libc's Makefiles so that libc_rtld can
  reuse them.

* Remove non-existent .PATHs.

2 months agolibc/Makefile.inc: Sort includes alphabetically.
Sascha Wildner [Sat, 6 Nov 2021 10:20:56 +0000 (11:20 +0100)]
libc/Makefile.inc: Sort includes alphabetically.

2 months agofile(1): Fix a small issue in a magic(5) file.
Sascha Wildner [Fri, 5 Nov 2021 19:07:41 +0000 (20:07 +0100)]
file(1): Fix a small issue in a magic(5) file.

2 months agokernel: Fix LINT64 build.
Sascha Wildner [Thu, 4 Nov 2021 09:03:23 +0000 (10:03 +0100)]
kernel: Fix LINT64 build.

* Add a needed file to sys/conf/files.

* Shield the drm code from 'DEBUG' being defined via opt_global.h (DEBUG
  is a kernel configuration option). This was breaking amdgpu's atom.c
  that defines its own 'DEBUG' macro.

2 months agokernel/files: Remove duplicate line.
Sascha Wildner [Wed, 3 Nov 2021 21:04:07 +0000 (22:04 +0100)]
kernel/files: Remove duplicate line.

2 months agodrm: enable amdgpu module build; update radeon to use updated ttm api
Sergey Zigachev [Wed, 3 Nov 2021 12:17:47 +0000 (17:17 +0500)]
drm: enable amdgpu module build; update radeon to use updated ttm api

2 months agodrm/ttm: Update to match amdgpu driver, Linux 4.19 based
Sergey Zigachev [Wed, 3 Nov 2021 12:04:02 +0000 (17:04 +0500)]
drm/ttm: Update to match amdgpu driver, Linux 4.19 based

2 months agodrm/amdgpu: Replace firmware names
Sergey Zigachev [Wed, 3 Nov 2021 11:55:24 +0000 (16:55 +0500)]
drm/amdgpu: Replace firmware names

2 months agodrm/amdgpu: Port to DragonFly
Sergey Zigachev [Wed, 3 Nov 2021 10:34:41 +0000 (15:34 +0500)]
drm/amdgpu: Port to DragonFly

* This commit does not build as it requires ttm changes from
  the corresponding commit

Amdgpu driver changes:
* Builds with CONFIG_DRM_AMD_DC and CONFIG_DRM_AMD_DC_DCN1_0 defined
* Support for older GPUs (SI, CIK) is not implemented
* Several functions for display core module require msse and
  mhard-float gcc flags to be set; and they require special
  treatment from kernel by utilizing kernel_fpu_begin/kernel_fpu_end
  functions
* It is required that tunable set amdgpu_hw_i2c=1 to work around
  panic during module load
* Thunderbolt support is disabled
* Amdgpu trace infrastructure replaced by a stub

Drm changes:
* register_framebuffer is called at the later stage, after crtcs
  were properly initialized
* drm_close implemented
* drm_connector_update_edid_property implemented
* Fix drm device stays locked in case of an error or module shutdown
* Imported drm gem framebuffer helper functions
* Fixed null pointer deref in the drm mmap ioctl
* Imported atomic64_inc and atomic_long_* functions from Linux
* Imported bitmap_complement function from Linux
* Imported kfifo struct from Linux
* Implemented dma fence array properly
* Imported rb_root_cached struct from Linux
* Implemented several dma fence functions

Co-authored-by: Fran├žois Tigeot <ftigeot@wolfpond.org>
Co-authored-by: Matthew Dillon <dillon@apollo.backplane.com>
2 months agodrm: Import the amdgpu driver from Linux 4.19
Sergey Zigachev [Wed, 3 Nov 2021 09:30:23 +0000 (14:30 +0500)]
drm: Import the amdgpu driver from Linux 4.19

2 months agousr.sbin/fstyp: Fix intra-object buffer overread for labeled msdosfs volumes
Tomohiro Kusumi [Wed, 3 Nov 2021 13:35:00 +0000 (22:35 +0900)]
usr.sbin/fstyp: Fix intra-object buffer overread for labeled msdosfs volumes

Volume labels, like directory entries, are padded with spaces and so
have no NUL terminator. Whilst the MIN for the dsize argument to strlcpy
ensures that the copy does not overflow the destination, strlcpy is
defined to return the number of characters in the source string,
regardless of the provided dsize, and so keeps reading until it finds a
NUL, which likely exists somewhere within the following fields, but On
CHERI with the subobject bounds enabled in the compiler this buffer
overread will be detected and trap with a bounds violation.

taken from FreeBSD
34fb1c133c5b8616f14f1d740d99747b427f5571
63d24336fd1aad81a4bdefb11d8c487cee5f88a0

2 months ago<readpassphrase.h>: Remove duplicate include.
Sascha Wildner [Tue, 2 Nov 2021 20:24:28 +0000 (21:24 +0100)]
<readpassphrase.h>: Remove duplicate include.

2 months agomakefs.8: Document msdos fs support.
Sascha Wildner [Tue, 2 Nov 2021 16:26:52 +0000 (17:26 +0100)]
makefs.8: Document msdos fs support.

Taken-from: FreeBSD

2 months agokernel: Add xdisk to LINT64.
Sascha Wildner [Tue, 2 Nov 2021 16:09:26 +0000 (17:09 +0100)]
kernel: Add xdisk to LINT64.

2 months agoxdisk.4: Some cleanup.
Sascha Wildner [Tue, 2 Nov 2021 16:09:08 +0000 (17:09 +0100)]
xdisk.4: Some cleanup.

Also add an xdisk(4) reference to hammer2.8.