Displaying 1 50 of 37,665 commits (0.009s)

DragonFlyBSD — sys/kern kern_physio.c

kernel - Fix bug in physio()

* Fix an integer overflow in physio() when attempting to dd a block size
  >= 2G.  An int was being used instead of size_t.

Reported-by: tpchin
Bug: 2981
Delta File
+2 -2 sys/kern/kern_physio.c
+2 -2 1 file

DragonFlyBSD — sys/kern kern_physio.c

kernel - Fix bug in physio()

* Fix an integer overflow in physio() when attempting to dd a block size
  >= 2G.  An int was being used instead of size_t.

Reported-by: tpchin
Bug: 2981
Delta File
+2 -2 sys/kern/kern_physio.c
+2 -2 1 file

DragonFlyBSD — sys/kern subr_bus.c

kernel - Support FreeBSD style loader.conf hints for resources

* DragonFly uses <device><unit>.<resname>.

* Also support FreeBSD hints which use hint.<device>.<unit>.<resname>.

* Makes it easier for users coming from FreeBSD to bring in sound quirks
  and such.

Reported-by: Damien
Delta File
+25 -0 sys/kern/subr_bus.c
+25 -0 1 file

DragonFlyBSD — sys/kern subr_bus.c

kernel - Support FreeBSD style loader.conf hints for resources

* DragonFly uses <device><unit>.<resname>.

* Also support FreeBSD hints which use hint.<device>.<unit>.<resname>.

* Makes it easier for users coming from FreeBSD to bring in sound quirks
  and such.

Reported-by: Damien
Delta File
+25 -0 sys/kern/subr_bus.c
+25 -0 1 file

DragonFlyBSD — sys/kern usched_dfly.c

kernel - Fix estcpu calculation

* No longer use uload to try to correct estcpu.  It winds up inflating the
  cpu use of other processes that use cpu but are not cpu-bound, creating
  the same estcpu compression problem.  The problem is less pronounced
  without it.

* Remove the uload global.  No longer useful and saves an unnecessary
  cache line ping-pong.

* Refactor how p_nice affects p_priority.  This causes nice levels to have
  a greater effect.

* Make the forkbias programmable with a sysctl and set the default to 1,
  which is a good, safe, all-around default.
Delta File
+108 -30 sys/kern/usched_dfly.c
+108 -30 1 file

DragonFlyBSD — sys/dev/drm/radeon cik.c radeon_object.c

drm/radeon: Replace some spinlocks by lockmgr locks

The original Linux code uses struct mutexes instead of spinlocks for
gem.mutex, gpu_clock_mutex and srbm_mutex.

DragonFlyBSD — sys/kern usched_dfly.c

Revert "kernel - Reduce priority range from dynamic priority"

This reverts commit abc0cda7b4a0a92afab15645d5adfac57af02866.

The change improved how nice ranging works but completely blew up
fork priority reduction, causing parent process dispatches via
fork/exec (such as done by a service or by make) to not immediately
move the child proces to another cpu when the parent has more work
to do.

This caused the kernel build to regress from 3:12 to 3:21 on the
test box, and for the world build to only show minor improvements
instead of more significant improvements.

So revert it for now.  We will improve nice priorities another way.
Delta File
+5 -6 sys/kern/usched_dfly.c
+5 -6 1 file

DragonFlyBSD — sys/bus/cam cam_periph.h cam_periph.c, sys/dev/raid/vinum vinumioctl.c

kernel: MFC the recent -Wswitch fixes.

From master:

1647c7bd435093709089283aa68ef831b34caef9
2c995f40849b20e79621e20576e89e785a0d92a7
f46681358e7500a0505796f5744110299cdc99d8

DragonFlyBSD — sys/bus/u4b usbdevs, sys/bus/u4b/quirk usb_quirk.c

kernel/usb4bsd: Add a quirk for the Corsair STRAFE Gaming keyboard.

Taken-from: FreeBSD

DragonFlyBSD — sys/bus/u4b usbdevs, sys/bus/u4b/quirk usb_quirk.c

kernel/usb4bsd: Add a quirk for the Corsair STRAFE Gaming keyboard.

Taken-from: FreeBSD

DragonFlyBSD — usr.bin/sdpquery Makefile

sdpquery(1): Remove an unneeded explicit -Wno-unused-but-set-variable.

-Wunused-but-set-variable comes in at WARNS==4 only.
Delta File
+0 -2 usr.bin/sdpquery/Makefile
+0 -2 1 file

DragonFlyBSD — lib/libc/stdlib nmalloc.c

libc/nmalloc: Remove some kernel code remains.
Delta File
+1 -133 lib/libc/stdlib/nmalloc.c
+1 -133 1 file

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

kernel - Fix machdep.pmap_mmu_optimize bug

* Fix bug introduced by the recent pv_entry rewrite when MMU segment
  optimization is enabled.

Reported-by: sephe
Delta File
+4 -3 sys/platform/pc64/x86_64/pmap.c
+4 -3 1 file

DragonFlyBSD — sys/conf files, sys/platform/pc64/conf files

Unbreak vkernel build.

Move some hyperv specific but "standard" files into the pc64 specific
'files' file.

Reported-by: tuxillo
Delta File
+0 -2 sys/conf/files
+2 -0 sys/platform/pc64/conf/files
+2 -2 2 files

DragonFlyBSD — share/misc pci_vendors

Update the pciconf(8) database.

February 8, 2017 snapshot from http://pciids.sourceforge.net/
Delta File
+85 -31 share/misc/pci_vendors
+85 -31 1 file

DragonFlyBSD — sys/kern kern_slaballoc.c

kernel/slaballoc: Separate some parts better that need INVARIANTS.
Delta File
+8 -1 sys/kern/kern_slaballoc.c
+8 -1 1 file

DragonFlyBSD — sys/kern subr_diskiocom.c, sys/net/ip_mroute ip_mroute.h

Unbreak kernel building

DragonFlyBSD — sys/dev/raid/vinum vinumioctl.c

kernel/vinum: Fix the position of VINUM_LABEL ioctl handling.

This was touched in ca6d9fb71787f9d013cb789ad2f41d6fc33fb38e back in
2007, but slightly wrong, because the case was moved into the outer
switch() which doesn't actually handle ioctls, so this case was never
hit there.

With this commit, all of clang's -Wswitch warnings in the kernel build
are fixed.
Delta File
+1 -1 sys/dev/raid/vinum/vinumioctl.c
+1 -1 1 file

DragonFlyBSD — sys/bus/cam cam_periph.h cam_periph.c, sys/kern subr_diskiocom.c

kernel: Fix the type of 'cmd' in various ioctl functions (int -> u_long).

These were all found by clang's -Wswitch option.

DragonFlyBSD — sys/dev/virtual/hyperv hyperv.c, sys/dev/virtual/hyperv/x86_64 hyperv_machdep.c

hyperv: Implement cpucounters.

DragonFlyBSD — sys/kern kern_cputimer.c, sys/platform/pc64/isa clock.c

kern: Add cpucounter which returns 64bit monotonic counter.

It will be used to:
- Simplify per-cpu raw time extraction.
- ALTQ machclk.
- Per packet timestamp for CoDel.

As of this commit, dummy cpucounter, which falls back to cputimer,
and TSC cpucounter are implemented.

DragonFlyBSD — sys/net/altq altq_subr.c

altq: Use microuptime() instead of microtime() - boottime.
Delta File
+4 -4 sys/net/altq/altq_subr.c
+4 -4 1 file

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

kernel - Fix bug in pmap_unwire()

* Fix a bug introduced in the recent pmap work.  For kernel pages,
  pmap_unwire() was not testing the V bit and would return a bogus
  vm_page_t for PTE values of 0, instead of returning NULL.

* Triggered by the mpipe code, used primarily by the crypto subsystem.
  Also used for IP fragment reassembly and by tcp_maketemplate().  A
  failed M_NOWAIT slab allocation tries to delete the partially filled
  map_entry_t, encounters 0 PTEs, and gets confused.

Reported-by: Tim Darby, Antonio Huete Jimenez
Delta File
+9 -6 sys/platform/pc64/x86_64/pmap.c
+9 -6 1 file

DragonFlyBSD — sys/kern kern_jail.c, sys/libkern inet_ntoa.c

libkern: Make inet_ntoa MPSAFE by passing string buffer to it.

DragonFlyBSD — sys/dev/drm/i915 intel_pm.c

drm/i915: Set GPU freq to idle_freq initially

Set the initial frequency to idle_freq on Skylake+/Valleyview/Cherryview
GPUs in order to not waste power.
This was already done on all other platforms.

Obtained-from: Linux 4.7, commit 5fd9f52384935dacfdc4adb5cc3531a40346d475
Delta File
+7 -7 sys/dev/drm/i915/intel_pm.c
+7 -7 1 file

DragonFlyBSD — usr.bin/sort bwstring.c coll.c

sort(1): Fix some obvious issues

Taken-from:        FreeBSD

DragonFlyBSD — sys/dev/drm drm_crtc.c, sys/dev/drm/include/drm drm_crtc.h

drm: Partial revert of "drm: Sync drm_crtc.c with Linux 4.6"

This partially reverts commit 917ec290eeeeb73fe8bfa066cfc3303a55646424.
It broke Xorg on some machines.

Reported-by: many people

DragonFlyBSD — sys/kern kern_clock.c, sys/sys param.h

kernel: Add a simple kern.cp_times sysctl.

This is like kern.cp_time, just per CPU.

It will help devel/libgtop, and by extension mate-system-monitor, perhaps
other such utilities/plugins too. Therefore, bump __DragonFly_version as
well.
Delta File
+23 -1 sys/kern/kern_clock.c
+2 -1 sys/sys/param.h
+25 -2 2 files

DragonFlyBSD — sys/net if.c if_ethersubr.c

net: Make sure that local variable is really used.
Delta File
+6 -1 sys/net/if.c
+2 -0 sys/net/if_ethersubr.c
+2 -0 sys/net/pfil.c
+10 -1 3 files

DragonFlyBSD — tools/tools/netrate/pktgen pktgen.c

pktgen: Ifnet lock is required by ifunit.

DragonFlyBSD — sys/kern kern_clock.c

kernel: Use CPUSTATES constant.
Delta File
+1 -1 sys/kern/kern_clock.c
+1 -1 1 file

DragonFlyBSD — sbin/devd Makefile

devd(8): Remove build workaround.

After previous commit change it should be no longer needed.

Spotted-by: swildner
Delta File
+0 -6 sbin/devd/Makefile
+0 -6 1 file

DragonFlyBSD — usr.bin/gencat Makefile gencat.c

gencat(1): Limit and mark bootstrap hack.

By the git history it was only needed for DragonFly 3.6 changes.
But be generous and mark it as 4.1 just in case there were other changes
piggybacking on it during crossworld stage. It no longer should be needed
and might cause unwanted issues for future developments.

While there remove the getline helper too.

DragonFlyBSD — sys/kern vfs_syscalls.c vfs_mount.c

kernel - Fix vmspace termination race (2)

* Fix a race and fix dangling cached mount points.  At the point where
  dounmount() checks to see if there are any dangling cache refs left
  it has already dropped its own ref on the mp.  The test, however,
  was (refs > 1).  The test needs to be (refs > 0).

  This race was probably causing the corruption, and in fact its the
  smoking gun because the mp->mnt_refs field is at the same offset as
  the pmap->copyin field, and the pmap->copyin field was getting
  corrupted by being decremented by 1.

* Fix a race where the unmount code was issuing tue dounmount() call
  without any ref or hold on the mp.  This race was unlikely (requires
  two unmounts of the same partition at the same time).
Delta File
+43 -9 sys/kern/vfs_syscalls.c
+15 -4 sys/kern/vfs_mount.c
+58 -13 2 files

DragonFlyBSD — sys/sys _timeval.h _timespec.h

<sys/{_iovec,_timespec,_timeval}.h>: Namespace cleanup.

Don't include the full <sys/types.h>.

Include <machine/stdint.h> and derive the types which <sys/_timespec.h>
and <sys/_timeval.h> need from the __* versions.

<sys/_iovec.h> just needs __size_t, which is in <machine/stdint.h>.

This commit also fixes a circular #include where <sys/_timeval.h>
was including <sys/types.h> and vice versa.

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

kernel - Fix pmap dynamic deletion code, leave disabled

* Fix the bug that caused pmap dynamic page table deletion to implode,
  but leave the feature disabled by default for now.

* Cleanup the pmap code a bit.  Use pv_put() more generically because
  it turns out that the dynamic page table deletion code is just cleaner
  that way.

* Assert the activated vmspaces are valid.

DragonFlyBSD — sys/vm vm_map.c

kernel - Fix vmspace termination race

* Fix a SMP race which can cause a vmspace structure to be double-freed
  to its objcache, resulting in corruption.

* Typical panic was a kernel seg fault at 'vm_copyin+2'.  What was in fact
  happening was that corruption of the vmspace was racing against reuse and
  a decrement of the pmap copyin function pointer.  This decrement caused
  function calls through the pointer to get very confused.

Reported-by: tuxillo
Delta File
+26 -21 sys/vm/vm_map.c
+26 -21 1 file

DragonFlyBSD — sys/sys aio.h

<aio.h>: Prepare for the removal of <sys/types.h> from <sys/_timespec.h>.

Right now, <sys/aio.h> gets a number of required type definitions via
<sys/_timespec.h>, which includes <sys/types.h>. Instead of including
<sys/types.h> from <sys/aio.h> directly, go for a lighter namespace.
Delta File
+17 -0 sys/sys/aio.h
+17 -0 1 file

DragonFlyBSD — sys/sys sched.h

<sched.h>: Clean up the namespace a bit.

Move CPU_* macros and three non-posix functions into __BSD_VISIBLE.

While here, put the __BEGIN_DECLS/__END_DECLS around prototypes only.
Delta File
+12 -10 sys/sys/sched.h
+12 -10 1 file

DragonFlyBSD — sys/sys sched.h

<sched.h>: Clean up a bit (whitespace etc.). No functional change.
Delta File
+31 -32 sys/sys/sched.h
+31 -32 1 file

DragonFlyBSD — share/man/man4 virtio.4, sys/bus/pci pci.c

virtio: Fix and activate PCI MSI-X support.

* Change pci_msi_blacklisted() test to always assume working MSI and MSI-X
  interrupts on virtual-machines. We should assume that a hypervisor
  without MSI or MSI-X support shouldn't even indicate supported MSI(-X)
  via the PCI config space.

* Move vtblk_alloc_disk() to the end of virtio_blk's attach method.
  This avoids a race between irq enabling in virtio, and the disk probing.

* Fix allocation and teardown of MSI-X interrupts.

* Get rid of rather confusing VIRTIO_PCI_FLAG_NO_MSI and
  VIRTIO_PCI_FLAG_NO_MSIX flags. The VIRTIO_PCI_FLAG_NO_MSI is unneeded
  when using pci_alloc_1intr() for MSI allocation, and
  instead of VIRTIO_PCI_FLAG_NO_MSIX we can just check sc->vtpci_msix_res.

* For now, MSI-X vectors are simply assigned to subsequent cores (plus
  adding the device_get_unit() value to shuffle things a bit), i.e.:
  (device_get_unit(dev) + cnt) % ncpus

* For the if_vtnet network driver this means that the rx and tx queues run
  on different cores, but both queues still use the same serializer for
  now.


    [6 lines not shown]

DragonFlyBSD — sys/kern vfs_bio.c

kernel - Remove some debug warnings for now

* Remove "Warning: bio_page_alloc: memory exhausted " for now
  (conditionalize it on bootverbose).

* The underlying issue is still there, a potential deadlock between
  the pageout system.  But the warnings are confusing users.
Delta File
+1 -1 sys/kern/vfs_bio.c
+1 -1 1 file

DragonFlyBSD — etc/mtree BSD.usr.dist

Add entries for initial clang import in mtree.

These will be used soon populated with initial base clang version.
Delta File
+4 -0 etc/mtree/BSD.usr.dist
+4 -0 1 file

DragonFlyBSD — share/mk sys.mk

Prevent implicit -std=* passing from NXCFLAGS to NXCXXFLAGS.

C and c++ standards are not cross compatible, this is a major issue with clang
import into the base that explictly requires at least the -std=c++11 standard.
It gets complicated because even tablegen utilities used as buildtools depend
explictly on c++11. This implies that we no longer can avoid libstdc++ usage
in hostlib/hostprog infrastructure.

While there, explcitly filter out -flto options from host native tools FLAGS
and add a missing rule to allow generating host native c++ utilities for the
use in buildworld.
Delta File
+6 -3 share/mk/sys.mk
+6 -3 1 file

DragonFlyBSD — share/mk sys.mk

Prevent implicit -Wsystem-headers passing from CFLAGS to CXXFLAGS.

Upcoming clang will be the first base system part that very heavily depends on
c++ headers, this prevents setting any level of WARNS in clang's makefiles
without performing certain unsafe manipulations of CXXFLAGS. To prevent that
it makes sense to allow only explict use directly in CXXFLAGS where it is
needed given c++11 headers are part of contrib and quite noisy with deprecated
attributes for previous features/interfaces to c++11 standard.
Delta File
+1 -1 share/mk/sys.mk
+1 -1 1 file

DragonFlyBSD — sys/dev/drm drm_crtc.c, sys/dev/drm/include/drm drm_crtc.h

drm: Sync drm_crtc.c with Linux 4.6

Start using ida functions.

DragonFlyBSD — share/man/man5 make.conf.5, share/man/man7 build.7

build - Separate out CFLAGS for kernel & module build

* Make COPTFLAGS apply to module builds in addition to kernel builds.

* Implement a new make variable, KCFLAGS, for specifying overrides for
  kernel and module builds.

* Fixup the module build infrastructure to use KCFLAGS, and get rid of
  infiltration from the more generic CFLAGS onto the kernel & modules
  build.

DragonFlyBSD — include Makefile, lib/libfetch Makefile

ssl: Unhook internal usage of include/openssl/.

Redirect all cases to include priv to take needed openssl headers and
remove mistakenly added copying of private base LibreSSL headers back to
public dir used previously by OpenSSL headers.

After this make upgrade REMOVE_OPENSSL_FILES=yes should work as initially
intended.

It is still not clear if LIBMD places also miss the libprivate_crypto.
For now just to prevent conflicts with base vs dports ssl libs and headers.

DragonFlyBSD — lib/libarchive Makefile, lib/libopie Makefile

ssl: Consistently use LibreSSL base headers.

Add missing include paths to prevent implicit search of <openssl/*> headers
where private crypto lib is linked in.