DragonFlyBSD/src 908aca8sys/dev/drm drm_ioctl.c, sys/dev/drm/radeon radeon_drv.c

drm: Reduce ioctl differences with Linux 4.7.10

Add a pair of missing generic drm ioctls.

DragonFlyBSD/src dc676ealib/libc/gen tls.c

libc - Use sbrk() system call, remove brk() (2)

* Change the initial TLS allocation to use mmap() instead of sbrk()
  in order to maintain compatibility with older kernels.

* Using sbrk() will work with a fully updated system, but will not
  work with an old kernel because it returns an error and sets errno,
  but setting errno requires the TLS to already be installed.  So
  even though we have back-off code in libc, it seg-faults before
  it gets to it.

* Only affects a few programs in base such as 'chflags' so not a
  disaster.  But still, the intent was to maintain compatibility
  with older kernels.
+16-51 files

DragonFlyBSD/src 15ae7f0sys/config LINT64

+1-01 files

DragonFlyBSD/src 05d5479share/man/man4 cd.4, sys/sys cdio.h

<sys/cdio.h>: Remove definitions that are related to unimplemented ioctls.

None of this is handled in the kernel.

DragonFlyBSD/src b6a7357lib/libutil libutil.h

<libutil.h>: Remove an orphaned prototype.

Reported-by: tuxillo

DragonFlyBSD/src 102fd22share/man/man4 ktr.4

ktr.4: Add a few words about KTR_LAPIC.

DragonFlyBSD/src 4b56655lib/libc/sys brk.2, sys/kern kern_fork.c

kernel - Implement sbrk(), change low-address mmap hinting

* Change mmap()'s internal lower address bound from dmax (32GB)
  to RLIMIT_DATA's current value.  This allows the rlimit to be
  e.g. reduced and for hinted mmap()s to then map space below
  the 4GB mark.  The default data rlimit is 32GB.

  This change is needed to support several languages, at least
  lua and probably another one or two, who use mmap hinting
  under the assumption that it can map space below the 4GB
  address mark.  The data limit must be lowered with a limit command
  too, which can be scripted or patched for such programs.

* Implement the sbrk() system call.  This system call was already
  present but just returned EOPNOTSUPP and libc previously had its
  own shim for sbrk() which used the ancient break() system call.
  (Note that the prior implementation did not ENOSYS or signal).

  sbrk() in the kernel is thread-safe for positive increments and
  is also byte-granular (the old libc sbrk() was only page-granular).

  sbrk() in the kernel does not implement negative increments and
  will return EOPNOTSUPP if asked to.  Negative increments were
  historically designed to be able to 'free' memory allocated with
  sbrk(), but it is not possible to implement the case in a modern

    [18 lines not shown]

DragonFlyBSD/src 8618d94lib/libc/gen ovsbrk.c Makefile.inc, lib/libc/x86_64/sys sbrk.S fake_sbrk.S

libc - Use sbrk() system call, remove brk()

* Attempt to use the kernel sbrk() system call.  If it fails
  with EOPNOTSUPP, back-off to the older libc sbrk() emulation
  code which uses still-present but obsolete break() system call.

* Changes support both old and new kernels.  Older kernels do not
  implement the sbrk() system call, causing the call to return
  -1/EOPNOTSUPP.  Note that older kernels did not generate an
  ENOSYS/signal for sbrk().

* sbrk() cannot support negative increments.  Allow only 0 and positive

* Fix MPSAFE issues (requires new kernels) while we are here.

* Remove brk() support entirely.  This was also emulated in older
  kernels using break().

* These changes are necessary in order to support mmap() hinting above
  RLIMIT_DATA's current value.  Older kernels only support hinting above
  the system maximum value (above the 32GB mark).  Several languages in
  dports really want to mmap() addresses below 4GB.

DragonFlyBSD/src 58a7919usr.bin/xinstall xinstall.c

install(1): Fix usage(), we don't have -T.

DragonFlyBSD/src 00ffa11sys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/source/compiler aslxref.c dttemplate.h

Sync ACPICA with Intel's version 20190215.

* Add support for the ACPI specification version 6.3.

* Fix skipping erroneous extended opcodes.

* Some improvements in iasl(8).

* Remove the legacy AcpiGbl_ExecuteTablesAsMethods global and all
  associated code, i.e. the debug.acpi.group_module_level_code tunable
  and acpiexec(8)'s -dp option.

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

DragonFlyBSD/src 67ceb61gnu/usr.bin/man/manpath manpath.config

manpath.config: Add ravenports paths.

While here, remove an obsolete line.

Reported-by: marino

DragonFlyBSD/src 6cee0fdshare/misc pci_vendors

Update the pciconf(8) database.

February 13, 2019 snapshot from https://pci-ids.ucw.cz
+498-641 files

DragonFlyBSD/src 5a3bdc9usr.bin/xinstall xinstall.c

install(1): Fix usage(), we don't have -T.

DragonFlyBSD/src c6002f7sys/dev/drm/include/asm processor.h cpufeature.h, sys/dev/drm/include/linux mm.h mutex.h

drm/linux: Add asm/processor.h

DragonFlyBSD/src d653c72sys/dev/drm drm_bufs.c, sys/dev/drm/i915 i915_gem_gtt.c i915_gem_execbuffer.c

drm: Fix Linux/DragonFly PAGE_MASK confusion

* Both Linux and the DragonFly kernel use a PAGE_MASK constant,
  which is unfortunately defined differently in each one

* Define a LINUX_PAGE_MASK macro and use it when applicable in the
  drm code to fix this confusion

* One or two drm/radeon bugs were possibly caught during the process

* This commit based on a patch by tuxillo

Spotted-by: tuxillo
Fixes: https://bugs.dragonflybsd.org/issues/3171

DragonFlyBSD/src 19b1d97share/man/man5 fstab.5

fstab.5: Remove trailing whitespace from 828221af1c1fe3514.

DragonFlyBSD/src 5eed46dsys/vfs/autofs autofs.h Makefile

sys/vfs/autofs: Drop <sys/bus.h>

Looks like this is no longer needed just to compile.

DragonFlyBSD/src 828221ashare/man/man5 fstab.5

Move some accidentally separated text back to the correct spot.

DragonFlyBSD/src 5b77ed3share/man/man9 mutex.9, sys/sys mutex2.h

sys/sys/mutex2: Fix mutex(9) man page

"mtxex" does no exist after cabfc9f6989fa1e4dbccc61162309bd2ec6891c9.

DragonFlyBSD/src 0eeb0a9bin/dd args.c dd.c

dd(1): Sync with FreeBSD

Some highlights:
* Add the "fillchar" operand.
* Add the "speed" operand to limit the speed.
* Support to specify the output data parity in the "conv" operand.
* Add tests, which can be run with "make test".

I adjusted the device names in the examples of the man page.  Some minor
tweaks (e.g., styles, function prototypes, comments) were also applied.

DragonFlyBSD/src 739ce91bin/dd misc.c args.c

dd(1): Implement GNU's extension of "status" operand

* status=none: do not print status information
* status=noxfer: do not print transfer  statistics

  This feature is useful because the statistics information can
  sometimes be annoying, and redirecting stderr to /dev/null would also
  lost error messages.

  Obtained from FreeBSD (revision 264059)

* status=progress: report the current status on a single line every

  Obtained from FreeBSD (revisions 337505,337865,338646)

DragonFlyBSD/src fc98fc7bin/dd misc.c dd.c

dd(1): Rework the time interval calculation

dd(1) uses gettimeofday(2) to compute the throughput statistics.
However, gettimeofday returns the system clock, which may jump forward
or back, especially if NTP is in use.  If the time jumps backwards, then
dd will see negative elapsed time, round it up to 1usec, and print an
absurdly fast transfer rate.

The solution is to use clock_gettime(2) with CLOCK_MONOTONIC as the
clock_id.  That clock advances steadily, regardless of changes to the
system clock.

Don't sacrifice precision by converting the output of clock_gettime() to
a double and then comparing the results.  Instead, subtract the values
of the two clock_gettime() calls, then convert to double.

Obtained-from: FreeBSD (revisions 265472,265698)

DragonFlyBSD/src 493fd20bin/dd extern.h misc.c

dd(1): Make signal handler async safe

Obtained-from: FreeBSD (revision 250469)

DragonFlyBSD/src b7cb635libexec/rtld-elf rtld.h

rtld-elf - Allow dynamic (late) relocations to relro section (2)

* Add missing header file adjustment

DragonFlyBSD/src 72ce8e0sys/net/ipfw3 ip_fw3.c

ipfw3: allow the ipfw_insn with only the basic action

DragonFlyBSD/src 1f732d3libexec/rtld-elf rtld.c, libexec/rtld-elf/x86_64 reloc.c

rtld-elf - Allow dynamic (late) relocations to relro section

* Normally the relro section is mprotect()ed to read-only after normal
  load relocations.

* It appears that some programs can issue dynamic relocations at
  run-time to such sections.

* If the relro mprotect has been done on an object, temporarily mprotect
  the object back to RW to execute the relocation, then mprotect it back
  to RO.

Reported-by: marino

DragonFlyBSD/src 4d589fcshare/misc bsd-family-tree

bsd-family-tree: Sync with FreeBSD (add macOS 10.14).

DragonFlyBSD/src 811c203usr.sbin/makefs ffs.h ffs.c, usr.sbin/makefs/ffs mkfs.c ffs_alloc.c

makefs(8): DragonFly porting.

Some notes:

* UFS2 support has been disabled for now. It would require more UFS2
  related pieces in our UFS kernel headers. I might look at enabling
  this in the future.

* Our CGSIZE() macro causes issues when used in makefs(8), which is
  why I'm using FreeBSD's currently.

* makefs(8) uses a local daddr_t type which is 64 bits wide, since
  ours is 32 bits.

* I added cg_blks() and cg_blktot() calls in a few places because
  our fsck(8) checks them in pass 5. I'm not sure if the associated
  fields are actually needed anymore.

DragonFlyBSD/src 5978408usr.sbin/makefs cd9660.c ffs.c, usr.sbin/makefs/cd9660 iso9660_rrip.c cd9660_eltorito.c

Bring in most of makefs(8) from FreeBSD unchanged.

To create filesystem images without kernel involvement. We can use it
to create our initrd without needing vn(4).

Originally from NetBSD.

DragonFlyBSD/src bc14b95. Makefile

Fix pkg "-f" flag in the "make upgrade" message
+1-11 files

DragonFlyBSD/src dcd3d47etc/rc.d sysctl

rc.d/sysctl: Only set a sysctl when give a new value

For a sysctl, compare the given value with its current value, and only
update the value if the new value is different.  This suppresses
unhelpful messages on the console.

Reported-by: sephe
+6-41 files

DragonFlyBSD/src 0b29ed9sys/vm vm_mmap.c

kernel - Fix panic in mlock() and munlock()

* Fix a degenerate case when mlock() or munlock() is called
  with a size of 0.  Silently allow the case and return success

* Fixes vm_map panic.
+5-11 files

DragonFlyBSD/src bf4a499usr.bin/gcore gcore.1 gcore.c

gcore(1): Some cleanup.

* Update usage(). While here, remove void casts.

* Sentences in manual pages should start on a new line.

* Flags without arguments should be specified first in the SYNOPSIS
  grouped together.

* Bump manual page date.

DragonFlyBSD/src f45b9d7usr.bin/gcore gcore.c elfcore.c

gcore - Fix /proc map reading, add verbose option, add limit option

* Our /proc/*/map code allows incremental reads so the old
  code that detects an insufficient buffer size no longer works.
  Fix the code so processes with long maps are properly processed.

* Add -v to verbosely print the segments being dumped.

* Add -l <limit>{,k,m,g,t} to ignore segments larger than the
  specified limitm.

DragonFlyBSD/src d822312sys/vfs/autofs autofs.h autofs_vfsops.c

sys/vfs/autofs: Drop unused autofs_mount/autofs_softc fields

Drop unused ones which originate from FreeBSD.

DragonFlyBSD/src 5864a00usr.bin/gcore elfcore.c

gcore - Handle segments > 2GB

* Fix an improper 'int' plus a little cleanup.  This allows gcore to
  operate on processes which map segments greater than 2GB.

DragonFlyBSD/src 529ea5bsys/bus/u4b/controller xhci_pci.c

kernel - Sync usb3.0 pci ids w/FreeBSD

* Add missing PCI ids for Sunrise Point, Lewisburg, Union Point,
  and Cavium ThunderX.

Reported-by: dualcyclo

DragonFlyBSD/src bf92d57sys/bus/u4b/controller xhci_pci.c

kernel - Sync usb3.0 pci ids w/FreeBSD

* Add missing PCI ids for Sunrise Point, Lewisburg, Union Point,
  and Cavium ThunderX.

Reported-by: dualcyclo

DragonFlyBSD/src 2f04535sys/vfs/autofs autofs_ioctl.h autofs.h

sys/vfs/autofs: Whitespace cleanups

Use space rather than tab (originates from FreeBSD).

DragonFlyBSD/src 05b6823sys/vfs/autofs autofs_vnops.c

sys/vfs/autofs: Don't calculate dirent reclen twice

when autofs_readdir() may call autofs_dirent_reclen() after
returned from autofs_readdir_one().

DragonFlyBSD/src 67d5844sys/vfs/autofs autofs_vnops.c

sys/vfs/autofs: Rename autofs_readdir_one() -> autofs_write_dirent()

DragonFlyBSD/src 030e342sys/cpu/x86_64/include atomic.h, sys/cpu/x86_64/misc atomic.c

atomic: Alway use inline functions.

Originally only builtin functions use the inline version of the
atomic ops, while modules only use real function call, which is
designed for binary compatibility.  However, this kind of
compatibility is not necessary for DragonFly.

DragonFlyBSD/src 89343b2sys/boot/common loader.8, sys/platform/pc64/x86_64 machdep.c

Add work-around for bug #3167

"UEFI boot hangs right after initializing UEFI framebuffer."
It actually boots but the system console is not shown.

I had this issue on a TUXEDO InfinityBook Pro 14v4.
This commits allows me to boot by setting loader tunable

This commit is not intended to be there forever.
It's there for people who experience the same issue and want
a quick and easy way to test if this fixes their booting issue.

Discussed-with: dillon

DragonFlyBSD/src ce273e1sys/dev/drm/include/linux export.h

drm/linux: Add EXPORT_SYMBOL_GPL()

DragonFlyBSD/src 237ffc6sys/dev/drm/include/linux preempt.h spinlock.h

drm/linux: Add preempt.h

DragonFlyBSD/src 2e4be81share/man/man4 pcm.4

pcm.4: Use .Dx

DragonFlyBSD/src 0f077a5sys/vfs/tmpfs tmpfs_vnops.c

tmpfs - Fix periodic syncer cpu-bound stalls w/tmpfs on big-mem boxes

* A bug in tmpfs leaves dirty tmpfs vnodes (which is basically all
  of them) on the syncer list, causing the syncer to scan the entire
  list every few seconds.  When a large number of vnodes are involved,
  this can lead to noticable cpu-bound stalls on the cpu the syncer is
  running on.

* Generally speaking this should significantly improve applications
  which use tmpfs a lot, such as synth runs, but was probably not noticed
  on machines with less than 32GB of ram due to the lower kern.maxvnodes

* Solved by unconditionally removing the vnode from the syncer list
  in tmpfs_fsync(), but otherwise leaving the vnode marked VISDIRTY and
  usually also VOBJDIRTY.  Tmpfs's reclaim code properly handles the
  disconnect regardless of the syncer state of the vnode.

  Removing the vnode ensures that only one syncer pass is performed on
  it, instead of repeated passes every few seconds.

DragonFlyBSD/src e337742share/man/man9 efirt.9

efirt.9: Comment out a non-existant function.

DragonFlyBSD/src da43775sys/dev/drm drm_gem.c

drm: Fix excessive wired memory usage

* This is a partial revert of 7ca4ece0a85bea451332580015344d3f12333419:
  "drm: Rename struct drm_gem_object.vm_obj to filp".

* That commit caused wired memory usage to become excessive over time.
+14-71 files

DragonFlyBSD/src ab5862fsys/dev/drm drm_gem.c, sys/dev/drm/include/drm drm_gem.h

drm/gem: de-inline the ref/unref functions

Reducing differences with Linux 4.7.10