Displaying 1 50 of 40,278 commits (0.008s)

DragonFlyBSD — sys/dev/drm/i915 i915_drv.c Makefile

drm/i915: iic(4) is not used anymore

DragonFlyBSD — lib/liby yyerror.h yyerror.c

liby: build with WARNS=6; style

- add header rather than include local details
- add const
- remove extraneous void cast

- See discussion on FreeBSD r335270 for motivation for copyright
details.

DragonFlyBSD — sbin/newfs_hammer2 newfs_hammer2.c

sbin/newfs_hammer2: Explicitly include <sys/ioctl.h>

generally helps become more portable on Linux and other platforms.

DragonFlyBSD — sbin/hammer hammer_util.h

sbin/hammer: Explicitly include <sys/ioctl.h>

generally helps become more portable on Linux and other platforms.
Delta File
+1 -0 sbin/hammer/hammer_util.h
+1 -0 1 file

DragonFlyBSD — usr.bin/undo undo.c

usr.bin/undo: Explicitly include <sys/ioctl.h>

generally helps become more portable on Linux and other platforms.
Delta File
+1 -0 usr.bin/undo/undo.c
+1 -0 1 file

DragonFlyBSD — sys/kern vfs_syscalls.c

Kernel - Fix getvfsstat()/getfsstat() count w/ NULL buffer

* Return the correct count when a NULL buffer is passed in,
  instead of a higher count.

Reported-by: tdfbsd
Delta File
+6 -8 sys/kern/vfs_syscalls.c
+6 -8 1 file

DragonFlyBSD — initrd Makefile, initrd/sbin.libcrypto Makefile

initrd - Add hammer2, fix obj dir

* Include the hammer2 binary in the initrd image.

* Properly make the obj hierarchy so make initrd does not
  put temporary object files in /usr/src.
Delta File
+11 -1 initrd/Makefile
+2 -1 initrd/sbin.libcrypto/Makefile
+13 -2 2 files

DragonFlyBSD — sys/platform/pc64/x86_64 pmap.c

Kernel - Enable NX for PROT_READ by default

* We've had NX support for a while, requiring a loader.conf tunable to
  enable (machdep.pmap_nx_enable).

* Enhance the feature to support two modes.  Mode 1 allows NX support
  for PROT_READ mappings, Mode 2 allows NX support for both PROT_READ
  and PROT_WRITE mappings.

  Third party code should work universally with Mode 1, but apparently
  quite a bit still does not work with mode 2.

* Change the default from disabled to Mode 1 in master, lets see if
  anyone has any problems with it.

Suggested-by: Theo de Raadt
Delta File
+25 -9 sys/platform/pc64/x86_64/pmap.c
+25 -9 1 file

DragonFlyBSD — sys/vfs/autofs autofs.c autofs_vfsops.c

sys/vfs/autofs: Change autofs_softc::sc_lock to use mutex(9)

DragonFlyBSD — sys/dev/drm/radeon radeon_uvd.c

kernel/radeon: Check the right variable in an if ().

This is Linux' 3a61b527b4e1f285d21b6e9e623dc45cf8bb391f.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3102>
Delta File
+1 -1 sys/dev/drm/radeon/radeon_uvd.c
+1 -1 1 file

DragonFlyBSD — sys/dev/drm/radeon radeon_uvd.c

kernel/radeon: Check the right variable in an if ().

This is Linux' 3a61b527b4e1f285d21b6e9e623dc45cf8bb391f.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3102>
Delta File
+1 -1 sys/dev/drm/radeon/radeon_uvd.c
+1 -1 1 file

DragonFlyBSD — sys/dev/video/bktr bktr_core.c

kernel/bktr: Fix variable types.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3103>
Taken-from:    FreeBSD (r249798)
Delta File
+1 -1 sys/dev/video/bktr/bktr_core.c
+1 -1 1 file

DragonFlyBSD — sys/cpu/x86_64/include asmacros.h, sys/platform/pc64/x86_64 exception.S

Kernel - Additional cpu bug hardening part 2/2

* Due to speculative instruction execution, the kernel may
  speculatively execute instructions using data from registers that
  still contain userland-controlled content.

  Reduce the chance of this situation arising by proactively clearing
  all user registers after saving them for syscalls, exceptions, and
  interrupts.  In addition, for system calls, zero-out any
  unrestored registers on-return to avoid leaking kernel data back to
  userland.

* This was discussed over the last few months in various
  OS groups and I've decided to implement it.  After the FP
  debacle, it is prudent to also give general registers similar
  protections.

DragonFlyBSD — sys/cpu/x86_64/include asmacros.h, sys/platform/pc64/x86_64 exception.S

Kernel - Additional cpu bug hardening part 2/2

* Due to speculative instruction execution, the kernel may
  speculatively execute instructions using data from registers that
  still contain userland-controlled content.

  Reduce the chance of this situation arising by proactively clearing
  all user registers after saving them for syscalls, exceptions, and
  interrupts.  In addition, for system calls, zero-out any
  unrestored registers on-return to avoid leaking kernel data back to
  userland.

* This was discussed over the last few months in various
  OS groups and I've decided to implement it.  After the FP
  debacle, it is prudent to also give general registers similar
  protections.

DragonFlyBSD — sys/platform/pc64/include md_var.h globaldata.h, sys/platform/pc64/x86_64 npx.c swtch.s

Kernel - Additional cpu bug hardening part 1/2

* OpenBSD recently made a commit that scraps the use of delayed FP
  state saving due to a rumor that the content of FP registers owned
  by another process can be speculatively detected when they are
  present for the current process, even when the TS bit is used to
  force a DNA trap.

  This rumor has been circulating for a while.  OpenBSD felt that the
  lack of responsiveness from Intel forced their hand.  Since they've
  gone ahead and pushed a fix for this potential problem, we are
  going to as well.

* DragonFlyBSD already synchronously saves FP state on switch-out.
  However, it only cleans the state up afterwords by calling fninit
  and this isn't enough to actually erase the content in the %xmm
  registers.  We want to continue to use delayed FP state restores
  because it saves a considerable amount of switching time when we do
  not have to do a FP restore.

  Most programs touch the FP registers at startup due to rtld linking,
  and more and more programs use the %xmm registers as general purpose
  registers.  OpenBSD's solution of always proactively saving and
  restoring FP state is a reasonable one.  DragonFlyBSD is going to
  take a slightly different tact in order to try to retain more optimal

    [33 lines not shown]

DragonFlyBSD — sys/platform/pc64/include md_var.h globaldata.h, sys/platform/pc64/x86_64 npx.c swtch.s

Kernel - Additional cpu bug hardening part 1/2

* OpenBSD recently made a commit that scraps the use of delayed FP
  state saving due to a rumor that the content of FP registers owned
  by another process can be speculatively detected when they are
  present for the current process, even when the TS bit is used to
  force a DNA trap.

  This rumor has been circulating for a while.  OpenBSD felt that the
  lack of responsiveness from Intel forced their hand.  Since they've
  gone ahead and pushed a fix for this potential problem, we are
  going to as well.

* DragonFlyBSD already synchronously saves FP state on switch-out.
  However, it only cleans the state up afterwords by calling fninit
  and this isn't enough to actually erase the content in the %xmm
  registers.  We want to continue to use delayed FP state restores
  because it saves a considerable amount of switching time when we do
  not have to do a FP restore.

  Most programs touch the FP registers at startup due to rtld linking,
  and more and more programs use the %xmm registers as general purpose
  registers.  OpenBSD's solution of always proactively saving and
  restoring FP state is a reasonable one.  DragonFlyBSD is going to
  take a slightly different tact in order to try to retain more optimal

    [33 lines not shown]

DragonFlyBSD — sys/dev/acpica acpi_resource.c

kernel - Improve ACPI compatibility with older BIOSes

* ACPI alignment field in ACPI resources can sometimes be 0, leading
  to passing 0 for 'align' to acpi_res_set_iorange() which panics the
  box with a division-by-zero fault.

* Relax handling of this argument by setting it to 1 if it is found
  to be 0.

* Fixes DFly panics with certain older BIOSes.

Reported-by: myu
Delta File
+2 -0 sys/dev/acpica/acpi_resource.c
+2 -0 1 file

DragonFlyBSD — sys/dev/acpica acpi_resource.c

kernel - Improve ACPI compatibility with older BIOSes

* ACPI alignment field in ACPI resources can sometimes be 0, leading
  to passing 0 for 'align' to acpi_res_set_iorange() which panics the
  box with a division-by-zero fault.

* Relax handling of this argument by setting it to 1 if it is found
  to be 0.

* Fixes DFly panics with certain older BIOSes.

Reported-by: myu
Delta File
+2 -0 sys/dev/acpica/acpi_resource.c
+2 -0 1 file

DragonFlyBSD — sys/vfs/autofs autofs_vnops.c autofs.c

sys/vfs/autofs: #if0 unsupported vfs.autofs.mount_on_stat

Keep the code since this should be implemented.

DragonFlyBSD — share/man/man4 bge.4

bge.4: Fix a typo.
Delta File
+1 -1 share/man/man4/bge.4
+1 -1 1 file

DragonFlyBSD — sys/vfs/autofs autofs_vfsops.c

sys/vfs/autofs: Add VFCF_MPSAFE
Delta File
+1 -1 sys/vfs/autofs/autofs_vfsops.c
+1 -1 1 file

DragonFlyBSD — sys/vfs/autofs autofs_vfsops.c

sys/vfs/autofs: Drop VFCF_NETWORK

VFCF_NETWORK came from FreeBSD implementation, but autofs really has
nothing to do with network.
Delta File
+1 -1 sys/vfs/autofs/autofs_vfsops.c
+1 -1 1 file

DragonFlyBSD — sys/vfs/autofs autofs_vfsops.c autofs.c

sys/vfs/autofs: Drop unneeded bzero on node/request ctor

DragonFlyBSD — sbin/mount_msdos mount_msdos.8

mount_msdos.8: Fix typo
Delta File
+1 -1 sbin/mount_msdos/mount_msdos.8
+1 -1 1 file

DragonFlyBSD — sys/dev/drm drm_cache.c linux_vmalloc.c, sys/dev/drm/i915 i915_gem.c i915_drv.h

drm: Define struct page and use it everywhere

* Removing countless differences with Linux

* struct page is essentially struct vm_page named differently.
  Both can be casted to the other one without further thought.

DragonFlyBSD — sys/dev/netif/re re.c if_re.c

re: MACFG50 requires defragmentation in software, but no padding for runt.

Reported-by: YONETANI Tomokazu
Tested-by: YONETANI Tomokazu

DragonFlyBSD — sys/dev/netif/re re.c if_re.c

re: MACFG50 requires defragmentation in software, but no padding for runt.

Reported-by: YONETANI Tomokazu
Tested-by: YONETANI Tomokazu

DragonFlyBSD — . Makefile.inc1

initrd: don't leave an empty /rescue after switching location

The recent initrd change will remove the rescue tools from their old
location (/usr/share/initrd) but leave an empty /rescue directory.  Avoid
such a situation by building the rescue tools after installworld if /rescue
is empty.

Suggested-by: François Tigeot
Delta File
+10 -0 Makefile.inc1
+10 -0 1 file

DragonFlyBSD — include/rpc xdr.h, lib/libc/xdr xdr.c xdr.3

libc/xdr: Add xdr_uint16_t() (it's just like xdr_u_int16_t()).

dports might make use of it.

While here, improve the manual page a bit and also bring in some fixes
from FreeBSD.

DragonFlyBSD — include/rpc xdr.h, lib/libc/xdr xdr_rec.c xdr.c

libc/xdr: Use standard types.

DragonFlyBSD — gnu/usr.bin/rcs Makefile.inc, gnu/usr.bin/rcs/ci Makefile

rcs: Clean up the Makefiles.

* Close the Makefile.inc chain to gnu/usr.bin/Makefile.inc.

* Use the SCRIPTS variable instead of using afterinstall.

DragonFlyBSD — nrelease Makefile

nrelease/Makefile: Fix to use GITURL_{SRC,DPORTS} and update help

The GITHOST and GITHOST_DPORTS were updated to be GITURL_SRC and GITURL_DPORTS
in ad8b70e08d7600e3f4eb3b36556d4540b1a9c119.
Delta File
+16 -16 nrelease/Makefile
+16 -16 1 file

DragonFlyBSD — nrelease Makefile

nrelease/Makefile: Fix to use GITURL_{SRC,DPORTS} and update help

The GITHOST and GITHOST_DPORTS were updated to be GITURL_SRC and GITURL_DPORTS
in ad8b70e08d7600e3f4eb3b36556d4540b1a9c119.
Delta File
+16 -16 nrelease/Makefile
+16 -16 1 file

DragonFlyBSD — sys/dev/drm drm_dragonfly.c

drm: rman_get_start() returns u_longs, not ints

This had not been correctly handled in 183e2373896e4ea605435a6bd8f943e8273bf8cd
Delta File
+1 -1 sys/dev/drm/drm_dragonfly.c
+1 -1 1 file

DragonFlyBSD — bin/cpdup hclink.c hcproto.c

cpdup - Fix NULL pointer indirection on lost socket

* Fix a crash which can occur due to a lost socket.  Generate a
  nice error message and exit() instead.
Delta File
+12 -12 bin/cpdup/hclink.c
+11 -5 bin/cpdup/hcproto.c
+1 -1 bin/cpdup/hclink.h
+24 -18 3 files

DragonFlyBSD — lib/libc/sys umtx.2, sys/kern kern_umtx.c

kernel - Fix umtx (pthread_mutex etc) race in kernel

* The umtx code could still race a fork despite the wakeup
  due to certain access paths leading into umtx_sleep() only
  issuing reads, thus not triggering a COW operation post-fork.
  This results in a loss of the interlock.

* Fix the issue by having umtx_sleep() fetch the user data
  with a read-modify-write instead of a read.  It now essentially
  does a lock xadd, adding $0 to the memory to force a write
  fault if necessary.

* Fixes 'go' tests and probably other situations that can arise
  when heavily threaded programs use fork/exec.

Reported-by: Tim Darby (+testing)
Delta File
+34 -20 sys/kern/kern_umtx.c
+6 -1 lib/libc/sys/umtx.2
+40 -21 2 files

DragonFlyBSD — share/man/man5 loader.conf.5, sys/platform/pc64/include pmap.h

kernel - Add fuwordadd32(), fuwordadd64()

* Add locked-bus-cycle fetchadd equivalents for kernel access to
  userland.  Will be used by kern_umtx.c

DragonFlyBSD — sys/cpu/x86_64/include specialreg.h, sys/platform/pc64/acpica acpi_madt.c

x86_64: Implement x2apic support.

Now LAPIC registers are accessed through MSR at fixed location, instead
of going through MMIO region.

Most noticeable is that ICR operation is greatly simplified, i.e. IPI
sending operation:
- Reserved bits are read as 0; there is no need to read ICR first for
  OR with the new values.
- No more pending bit, i.e. ICR write is synchronized; there is no need
  to read ICR to test pending bit.
- ICR is 64 bits in x2apic mode, i.e. two 32 bits writes to ICR-low and
  ICR-high become one write to ICR.

NOTE:
Though Intel SDM says that wrmsr to LAPIC registers are relaxed, we
don't need to put mfence or sfence before them, especially for sending
IPIs, since the generic IPIQ and the machdep code already uses atomic
operation before doing ICR operation.  For the rest of the code, there
really are no needs to add mfence/sfence before rdmsr/wrmsr to LAPIC
registers.

As of this commit, x2apic mode is _not_ enabled by default.  It can be
enabled through hw.x2apic_enable tuneable, and a read-only sysctl node
with the same name is available for debugging purpose.

    [2 lines not shown]

DragonFlyBSD — etc/mtree BSD.usr.dist

mtree: Remove a no longer used directory.
Delta File
+0 -2 etc/mtree/BSD.usr.dist
+0 -2 1 file

DragonFlyBSD — share/man/man4 powernow.4 syscons.4, share/man/man5 rc.conf.5

Resolve some kernel option / .Cd mismatches.

* There is no WATCHDOG option. kern_wdog.c is compiled into the kernel
  by default.

* SC_NO_PALETTE_LOADING was never a kernel option, so remove the
  associated #ifndefs.

* powernow(4) can't be compiled into the kernel

DragonFlyBSD — sbin/init init.c pathnames.h, share/initrd/mini_init pathnames.h

init/oinit: Remove some old, unused/obsolete paths and comments.

Seems the _PATH_SLOGGER was defined but not used since at least 4.4BSD.

Reported-by: aly

DragonFlyBSD — sys/platform/pc64/acpica acpi_madt.c, sys/platform/pc64/apic lapic.c lapic.h

x86_64: Prepare for x2apic support.

- Use macro to access and modify LAPIC registers.
- Use function pointers for hot LAPIC operation, i.e. IPI and timer.
- Refactor the related code a bit.

Global variable 'lapic' is renamed to 'lapic_mem' to ease code search.

Based on work by ivadasz@.

DragonFlyBSD — sys/contrib/dev/acpica/source/components/hardware hwxfsleep.c, sys/contrib/dev/acpica/source/include/platform acdragonfly.h

acpica: Allow designated initialization by defining ACPI_STRUCT_INIT().

To make it compile, bring in a small fix from ACPICA's master that
adjusts a number of names from Linux style to ACPICA style.

DragonFlyBSD — sys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/source/common acfileio.c dmtbinfo2.c

Sync ACPICA with Intel's version 20180531.

* Implemented additional support to help ensure that a DSDT or SSDT is
  fully loaded even if errors are incurred during the load.

* The 'Unload' AML operator is no longer supported.

* Additional improvements and fixes.

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

DragonFlyBSD — . Makefile Makefile.inc1, etc Makefile

initrd: Detach from the world and build on the fly

Why
---
Currently, the files for initrd image creation are built and installed at
/usr/share/initrd by "buildworld" and "installworld", respectively, and then
mkinitrd(8) simply packs them to create the initrd.img.gz.

For normal users, the shipped /usr/share/initrd and mkinitrd(8) don't make
much sense, since they don't need to modify the initrd contents and create
a modified initrd image.

From a developer's perspective, the required steps (buildworld, installworld
and mkinitrd) to create and test a new initrd image can be annoying.

How
---
Detach the build and installation of the initrd contents from the world.
Build the (rescue/initrd) tools on-the-fly when creating the initrd image.

As per ftigeot's suggestion, these statically linked tools can be useful when
dealing with a broken system, so install them under /rescue to be more
intuitive and easier to use (similar to FreeBSD and maybe other BSDs).

What

    [35 lines not shown]
Delta File
+295 -0 initrd/mkinitrd.sh
+0 -240 sbin/mkinitrd/mkinitrd.sh
+0 -189 sbin/mkinitrd/mkinitrd.8
+26 -7 Makefile
+0 -33 share/initrd/etc/Makefile
+30 -0 initrd/Makefile
+90 -56 16 files not shown
+441 -525 22 files

DragonFlyBSD — . Makefile Makefile.inc1

Makefile{,.inc1}: Merge user-driven target descriptions and cleanups

* Merge the descriptions to user-driven targets from Makefile.inc1 to
  Makefile and improve the wordings a bit.

* Delete some obsolete information.

* Whitespace cleanups.
Delta File
+25 -29 Makefile
+11 -28 Makefile.inc1
+36 -57 2 files

DragonFlyBSD — . Makefile_upgrade.inc, share/examples/meteor test-n.c yuvpl.c

Remove some old, now obsolete, examples.

DragonFlyBSD — sbin/mkinitrd mkinitrd.sh

mkinitrd(8): Use getopts instead of getopt(1) for command options

Use the shell built-in getopts to deal with command line options, which is
more easier to use and allows whitespace in the option values.
Delta File
+37 -14 sbin/mkinitrd/mkinitrd.sh
+37 -14 1 file

DragonFlyBSD — share/initrd/etc rc rcmount_crypt

initrd: Clean up the real root mount code

Make the real root mount code/scripts much simpler.  Also use the newly
exported NEW_ROOT variable to be more maintainable.