zrj [Fri, 20 May 2016 15:54:04 +0000 (18:54 +0300)]
drm/i915: Avoid dead-locking the userland.
Was happening for some time and the cause is still unclear.
On exit Xorg doesn't return from kernel and is unkillable.
Sometimes even panics on haswell, it is better to avoid that.
Also reduce spam on laptops with eDP panels on i915 load.
Great opportunity to use just implemented DRM_ERROR_RATELIMITED()
macro that uses krateprintf().
zrj [Fri, 20 May 2016 15:26:15 +0000 (18:26 +0300)]
drm/i915: Lost changes after update to v4.3
* init ring->last_submitted_seqno that got lost in:
a05eeebfe8ec06e5625c15c535aed68dbf568bd6
internal commit removing "outstanding_lazy_request"
* missing "else" statement that looks like got lost in:
477eb7f9b36d138314225b3b077de1c692e5e1a8
internal commit removing pipe_enable checks
While there, fix unsafe i915 specific WARN_ON() macros.
Linux-commit:
4eee4920f05e39e22571deb57f1c314ce7a46e7f v4.4
Sascha Wildner [Fri, 20 May 2016 09:40:13 +0000 (11:40 +0200)]
kernel/drm: Add dma_{alloc,free}_coherent() from FreeBSD.
zrj [Thu, 19 May 2016 11:56:46 +0000 (14:56 +0300)]
drm cleanup 19/x: Switch more calls to kzalloc/kfree helpers.
Slightly reduces differences in already complicated codes.
No functional change.
zrj [Thu, 19 May 2016 10:23:06 +0000 (13:23 +0300)]
drm cleanup 18/x: Gently remove drm_core_has_AGP, DRIVER_REQUIRE_AGP
Whole AGP handling is very fuzzy currently, specially in ttm.
This however this attempt seems to work.
While there remove two unused structs: drm_magic_head, drm_waitlist.
The stucts drm_gem_mm and drm_magic_entry will require some extra
work in drm_fops.c
zrj [Thu, 19 May 2016 08:30:58 +0000 (11:30 +0300)]
drm cleanup 17/x: Cleanup drmP.h header.
Changes:
* change drm_setversion() to static, used only in drm_ioctl.c
* move out some macros to linux layer
* move helper DRM_GEM_* macros to drm_gem.h
* remove FreeBSD legacy prototypes and compat macros(TTM)
* remove drm_gem_pager_dtr(), was never used
* remove many prototypes that have no functions available
* regroup some blocks
* keep structs untouched for now
No functional change.
zrj [Wed, 18 May 2016 16:40:04 +0000 (19:40 +0300)]
drm.4: Document drm.debug tunable.
Applies for run-time hw.dri.debug and hw.drm.debug variables.
Note: in future releases only one sysctl variable will be kept.
While there, add a hint about video group.
zrj [Wed, 18 May 2016 15:24:30 +0000 (18:24 +0300)]
drm cleanup 16/x: Add names to internal ioctl debug traces.
With this it prints same output as linux, just 3 years later.
Aimed at drm_debug=0x600 mode.
Easier on the eyes and saves time:
-[drm:drm_ioctl] pid=904, cmd=0xc03064b7, nr=0xb7, dev 0xffffffe1d6299720, auth=1
-[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
-[drm:drm_ioctl] pid=904, cmd=0x2000641f, nr=0x1f, dev 0xffffffe1d6299720, auth=1
-[drm:drm_ioctl] ret = 22
-[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
-[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
-[drm:drm_ioctl] pid=904, cmd=0xc010646c, nr=0x2c, dev 0xffffffe1d6299720, auth=1
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_MODE_SETPLANE
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_DROP_MASTER
+[drm:drm_ioctl] ret = 22
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
+[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, I915_GEM_WAIT
zrj [Wed, 18 May 2016 14:11:34 +0000 (17:11 +0300)]
drm cleanup 15/x: Separate vblank DRM_DEBUG spam.
Attempt to make drm_debug=1 a bit more usable.
Rationale: vblank events are very noisy and makes live debugging
almost impossible. Also create problems with dmesg buffers etc.
By separating it into separate debug bit, hw.drm.debug=0x21f mode
is very useful to notice problems as they happen, spec during
reboot sequence when root fs is already unmounted and debugging
relies on dmesg contents getting into next boot to be read.
Bigger part of changes are in radeonkms side to prevent running
verbose diagnostics.
zrj [Wed, 18 May 2016 11:02:01 +0000 (14:02 +0300)]
drm cleanup 14/x: Slightly rewrite drm debug subsystem.
Changes:
* Bring back kernel options handling through opt_drm.h that
got lost in:
ba55f2f542af67c1331fd80f611891b0a29f57bc
* Explicitly disable DRM_LINUX option, breaks LINT64
* Add some DragonFly specific debug categories to ease up
the debugging, some DRM_DEBUG prints are quite noisy
* By default don't include PID number, hard on diffs
* Handle ioctl debug prints with separate debug bits
* Implement DRM_ERROR_RATELIMITED that uses krateprintf()
* Implement and use drm_err() and drm_ut_debug_printk()
note: that current implementation might lead to more
garbled text on a very frequent writes by several cpus
After this cleanup drm modules shrink a bit in size:
[rw@_ drm]$ size z*/*.ko
text data bss dec hex filename
281585 3592 944 286121 45da9 znew/drm.ko
780618 8180 608 789406 c0b9e znew/i915.ko
1262735 45896 100 1308731 13f83b znew/radeonkms.ko
301045 3592 944 305581 4a9ad zref/drm.ko
887378 8180 608 896166 daca6 zref/i915.ko
1377609 45896 100 1423605 15b8f5 zref/radeonkms.ko
zrj [Wed, 18 May 2016 10:43:01 +0000 (13:43 +0300)]
drm cleanup 13/x: Gather scattered debug macros to common places.
No functional change except for dev_dbg() in radeonkms
that now prints unconditionally.
zrj [Wed, 18 May 2016 10:37:08 +0000 (13:37 +0300)]
drm/i915: Fix DPCD debug print.
Port commit from radeonkms:
f39d438d596d248b476a864849733e081f61f688
Diff:
-[drm:KMS:pid909:intel_dp_get_dpcd] DPCD: ffffffe2061d2d6ch
+[drm:KMS:pid904:intel_dp_get_dpcd] DPCD: 11 0a 82 41 00 00 01 c0 02 00 00 00 0f 03 00
Peter Avalos [Tue, 17 May 2016 20:00:43 +0000 (13:00 -0700)]
Merge branch 'vendor/LIBARCHIVE'
Bring in two bug fixes from libarchive's master branch. This should fix
some dports breakage.
Requested-by: zrj@
Peter Avalos [Tue, 17 May 2016 19:58:51 +0000 (12:58 -0700)]
Disable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode.
Obtained-from: libarchive
199d5c79b547cebe3d7d33e5acd10ae03008c4a2
Peter Avalos [Tue, 17 May 2016 19:57:30 +0000 (12:57 -0700)]
Reject cpio symlinks that exceed 1MB.
Obtained-from: libarchive
fd7e0c02e272913a0a8b6d492c7260dfca0b1408
zrj [Tue, 17 May 2016 09:06:30 +0000 (12:06 +0300)]
drm/radeon: Backport two bugfixes from drm v3.19
In attempt to keep radeon at v3.18 level for drm/ttm update.
zrj [Tue, 17 May 2016 09:02:14 +0000 (12:02 +0300)]
drm/radeon: Disable some unused functions.
Remove or #if 0 for future reference them.
While there, make TRACE_TODO consistent through code.
No functional change.
Spotted-by: swildner
Sascha Wildner [Sun, 15 May 2016 10:17:24 +0000 (12:17 +0200)]
Update the pciconf(8) database.
May 11, 2016 snapshot from http://pciids.sourceforge.net/
David Shao [Sat, 14 May 2016 07:48:14 +0000 (09:48 +0200)]
drm/uapi_drm: Update to Linux 4.6
Added definition of __kernel_size_t to linux/types.h.
Preserved current definitions of invalid flags in i915_drm.h.
François Tigeot [Sat, 14 May 2016 06:44:58 +0000 (08:44 +0200)]
drm/linux: Add asm/ioctl.h
zrj [Thu, 12 May 2016 17:48:11 +0000 (20:48 +0300)]
drm cleanup 12/x: Layout fixes to match upstream in drmP.h
Mainly to reduce differences for upcomming further cleanup.
Strictly no functional change.
zrj [Thu, 12 May 2016 17:26:04 +0000 (20:26 +0300)]
drm cleanup 11/x: Remove some unused callbacks from drm_driver.
zrj [Thu, 12 May 2016 17:02:29 +0000 (20:02 +0300)]
drm cleanup 10/x: Move DRM_WAIT_ON and DRM_CURRENTPID macros.
DRM_CURRENTPID macro will no longer be used after v4.4
zrj [Thu, 12 May 2016 16:41:28 +0000 (19:41 +0300)]
drm cleanup 09/x: Move EREMOTEIO to linux/errno.h
Technically <linux/errno.h> should be included in:
radeon/atombios_dp.c and i915/intel_dp.c
zrj [Thu, 12 May 2016 16:36:47 +0000 (19:36 +0300)]
drm cleanup 08/x: Move memset_XXX helpers to linux asm/io.h
zrj [Thu, 12 May 2016 16:14:55 +0000 (19:14 +0300)]
drm cleanup 07/x: Move byte order functions to linux layer.
BITS_PER_LONG and [un]likely() are already defined elsewhere.
zrj [Thu, 12 May 2016 15:42:25 +0000 (18:42 +0300)]
drm cleanup 06/x: Remove KIB_NOTYET macro.
Not used even at FreeBSD.
While there, remove few other from initial port.
zrj [Thu, 12 May 2016 15:17:11 +0000 (18:17 +0300)]
drm cleanup 05/x: Move IS_ALIGNED macro to linux/kernel.h
Only used in radeon/r600_cs.c
It is cleaner to have it in compat layer.
zrj [Thu, 12 May 2016 14:32:54 +0000 (17:32 +0300)]
drm cleanup 04/x: Remove some unused radeon compat defines.
These were only used in radeon UMS driver, that is removed now.
zrj [Thu, 12 May 2016 14:10:47 +0000 (17:10 +0300)]
drm cleanup 03/x: Move all includes in drmP.h to the top.
Hide struct videomode under CONFIG_VIDEOMODE_HELPERS option.
There is no need for it in DragonFly.
While there, resort include order to match one at Linux v4.3
No functional change intended.
zrj [Thu, 12 May 2016 13:19:49 +0000 (16:19 +0300)]
drm cleanup 02/x: Fix drm_legacy_sg_cleanup() prototype.
Make it take struct drm_device as in Linux.
No functional change.
zrj [Thu, 12 May 2016 13:07:11 +0000 (16:07 +0300)]
drm cleanup 01/x: Move legacy buffer structs to drm_leagcy.h
As was done in Linux v3.18 commit:
ba8286fab52652e431784d066b075c1bb4933ea1
This cleans drmP.h header a bit.
While there, move LOCK_TEST_WITH_RETURN macro too.
No functional change intended.
zrj [Thu, 12 May 2016 10:50:50 +0000 (13:50 +0300)]
drm: Sync drm_agpsupport.h with Linux 4.3
Fix build w/o __OS_HAS_AGP
Perform some cleanup in drmP.h as well.
No functional change intended.
Submitted-by: ftigeot@ with few changes
zrj [Thu, 12 May 2016 08:34:09 +0000 (11:34 +0300)]
drm/radeon: Preparations for AGP cleanup.
No functional change intended.
François Tigeot [Fri, 13 May 2016 08:58:58 +0000 (10:58 +0200)]
drm/i915: Comment out a DRM_DEBUG_KMS statement
Sysfs interface for connectors is not implemented.
Requested-by: zrj
Peter Avalos [Fri, 13 May 2016 01:26:30 +0000 (18:26 -0700)]
bsdcat(1): Bump WARNS down for contrib code.
Peter Avalos [Fri, 13 May 2016 00:51:24 +0000 (17:51 -0700)]
Adjust files for libarchive-3.2.0 import.
Peter Avalos [Fri, 13 May 2016 00:44:10 +0000 (17:44 -0700)]
Merge branch 'vendor/LIBARCHIVE'
Matthew Dillon [Thu, 12 May 2016 21:44:16 +0000 (14:44 -0700)]
rc - Add unconfigured wifi interfaces to the netif list
* Use sysctl net.wlan.devices to get a list of wifi interfaces.
This sysctl is not yet active in master but will be when the wifi
update goes in (at which point the devices no longer show up in
ifconfig -l).
* This will allow existing wifi configurations in /etc/rc.conf to just
work with the upcoming update.
Matthew Dillon [Thu, 12 May 2016 21:27:09 +0000 (14:27 -0700)]
sysctl - Add -i and -q from FreeBSD
Enhance the sysctl code, will be used by /etc/network.subr
* sysctl -i - Exit cleanly with exit code 0 if a sysctl mib does not
exist. No warning or error message is output for this
case.
* sysctl -q - Exit with exit code N if a sysctl mib does not exist.
N is the number of mib's on the command line which failed.
No warning or error message is output for this case.
Peter Avalos [Thu, 12 May 2016 20:58:50 +0000 (13:58 -0700)]
Import libarchive-3.2.0.
Peter Avalos [Thu, 12 May 2016 19:00:30 +0000 (12:00 -0700)]
chown(8)/chgrp(1): Sync with FreeBSD
- Be consistent with chmod(1) for symlinks.
- Use basename(3).
- Use uid_t.
- Allocate buffers for getgroups(3) dynamically.
- Add -x option to prevent crossing of mountpoints.
- Sprinkle some static.
Obtained-from: FreeBSD
Peter Avalos [Thu, 12 May 2016 03:28:34 +0000 (20:28 -0700)]
chflags(1): symlink handling similar to chmod(1)
Obtained-from: FreeBSD
Peter Avalos [Thu, 12 May 2016 02:31:08 +0000 (19:31 -0700)]
chmod(1): Bring in some changes from FreeBSD.
- Change directory permissions in pre-order.
- Allow "-v -v" to mean very verbose.
- Follow symbolic links named as command line arguments if run w/o -R.
Obtained-from: FreeBSD
zrj [Tue, 10 May 2016 17:32:32 +0000 (20:32 +0300)]
kernel/drm: Resort radeon sources alphabetically.
While there, add hint for module depends in LINT64.
zrj [Tue, 10 May 2016 16:29:10 +0000 (19:29 +0300)]
drm: Destroy events consistently.
Fixes wrong function casting in drm_atomic.c
While there, make all call sites more similar.
zrj [Tue, 10 May 2016 14:10:50 +0000 (17:10 +0300)]
bwn.4: Update firmware dport reference.
Reported-and-tested-by: basedacid@
zrj [Tue, 10 May 2016 13:10:27 +0000 (16:10 +0300)]
drm/radeon: Add ACPI function stubs.
Reduces diffs in radeon_bios with Linux v3.18
zrj [Tue, 10 May 2016 12:59:03 +0000 (15:59 +0300)]
drm/radeon: Fix some leaks on module unload.
This prevents leaking of whopping 1008 bytes of M_DRM memory:
* 512 bytes from radeon/atom.c
* 440 bytes from radeon/radeon_atombios.c voltage_tables
* 56 bytes from allocation of struct fb_info *info
fb_info case needs help from syscons, for now let it leak those 56 bytes.
zrj [Tue, 10 May 2016 06:07:52 +0000 (09:07 +0300)]
drm/radeon: Nuke some orphaned externs.
Spotted-by: swildner
Imre Vadász [Sat, 7 May 2016 21:14:46 +0000 (23:14 +0200)]
80211 - Further ifp->if_softc -> ic_softc conversions in wlan drivers.
Imre Vadász [Sat, 7 May 2016 20:38:31 +0000 (22:38 +0200)]
u4b/wlan - Convert ifp->if_softc -> ic->ic_softc.
Taken-From: FreeBSD
Imre Vadász [Sat, 7 May 2016 17:57:15 +0000 (19:57 +0200)]
u4b/wlan - Mechanically convert to IFNET_STAT_INC.
Inspired-by: FreeBSD (SVN r271866)
Imre Vadász [Tue, 5 Jan 2016 14:46:41 +0000 (15:46 +0100)]
if_iwm: Utilize updated net80211 stuff, improves scanning behaviour.
* Just remove some #if defined(__DragonFly__) workarounds that were
previously needed.
* Now scanning should find access points on all channels, and not just on
the currently selected channel.
Imre Vadász [Sat, 7 May 2016 07:41:03 +0000 (09:41 +0200)]
80211 - Add missing ic_softc initializations in sys/bus/u4b/wlan drivers.
Matthew Dillon [Fri, 6 May 2016 00:57:54 +0000 (17:57 -0700)]
80211 - Fixup missing ic_name, ic_softc
* Fixup missing ic_name and ic_softc assignments.
Imre Vadász [Tue, 3 May 2016 22:18:00 +0000 (00:18 +0200)]
80211 - Update README.DRAGONFLY, we use "if_inc_counter -> IFNET_STAT_INC".
Imre Vadász [Thu, 5 May 2016 23:05:57 +0000 (01:05 +0200)]
80211 - Check if_clone_destroy return value.
* Otherwise ieee80211_ifdetach can end up in an infinite loop, when
if_clone_destroy fails.
Imre Vadász [Mon, 4 Jan 2016 11:14:51 +0000 (12:14 +0100)]
80211 - Update up to FreeBSD's r287029 (only skipping a few minor changes)
Taken-From: FreeBSD
Imre Vadász [Tue, 3 May 2016 20:07:19 +0000 (22:07 +0200)]
80211 - Migrate the scan iterator lock typedefs into ieee80211_dragonfly.h
Now only wlan_global_serializer locking remains, all other os-specific
locking is inside ieee80211_dragonfly.h.
Taken-From: FreeBSD (SVN r283556)
zrj [Mon, 9 May 2016 12:08:42 +0000 (15:08 +0300)]
drm/radeon: Release firmware on CIK at driver fini.
While testing on Bonaire noticed that firmware stays behind
after kldunload radeonkms. Fix it.
zrj [Tue, 1 Dec 2015 16:26:19 +0000 (18:26 +0200)]
drm/radeon: Expand atomic_cmpxchg() use in UVD/VCE
I somehow lost this one in a pile. Likely fixes few bugs on msg packet destroy.
zrj [Mon, 9 May 2016 05:58:14 +0000 (08:58 +0300)]
drm/radeon: Revert "drm/radeon: Partial sync with Linux 3.18"
This partially reverts commit
bd519ccc430654ba519981ec2781920010d5bb19
Caused driver teardown problems.
Tomohiro Kusumi [Mon, 9 May 2016 08:15:12 +0000 (17:15 +0900)]
sys/vfs/tmpfs: Use vop_write_dirent()
Make filesystem code independent of struct dirent format.
struct dirent is basically for userspace to retrieve entries.
zrj [Sun, 8 May 2016 15:42:08 +0000 (18:42 +0300)]
drm/radeon/dp: Fix long-standing bug in Display Port handling.
This fixes EDID information fetching from monitor through aux/iic
when using Display Port and no longer requires providing binary
EDID block with drm.edid_firmware="DP-1:edidfw_MONITOR" tunable.
From testing/disecting looks like bug was from initial radeonkms port.
While there, add hpd (hot plug detection) pin assignment for future
reference when common drm i2c/iic over aux will be implemented.
Changes intended only for Display-Port.
Note that currently on DP cable remove or monitor power off when monitor
is plugged-in DP connector stays in disconnected state (DP-only quirk).
Tested-on: R7 360 BONAIRE w/ HP LA DP-1(1920x1200), HP LP DVI(1600x1200)
HD5770 JUNIPER w/ DELL P2416D DP-1(2560x1440) and
HDMI(1920x1200)[card limit]
zrj [Sun, 8 May 2016 16:07:39 +0000 (19:07 +0300)]
drm/radeon/dp: Sync Display Port code with drm v3.18
Some heavy changes were needed because of missing common
i2c/iic over aux helpers in drm.
Actual fix to fetch EDID info through Display Port will follow.
Sascha Wildner [Sun, 8 May 2016 19:12:57 +0000 (21:12 +0200)]
Remove some duplicated #include's in thread.h and queue.h.
Sascha Wildner [Sun, 8 May 2016 06:54:26 +0000 (08:54 +0200)]
ifconfig(8): Adjust for
cec7392796354.
Commit
cec7392796354c53ac6469588a64f6536ed22659 changed ia6t_vltime
and ia6t_pltime to use time_uptime instead of time_second in
sys/netinet6/in6.c.
This change had not been reflected in the userland 'ifconfig'
command which still tried to interpret inet6 vltime and pltime
values as wall clock seconds.
The commit fixes the issue. It was adapted from FreeBSD r268049.
Submitted-by: Yann Grossel
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2889>
Matthew Dillon [Sun, 8 May 2016 18:47:09 +0000 (11:47 -0700)]
upgrade - Make sure /var/run/sem exists
* Make sure /var/run/sem exists and is mode 1777. Newer mtrees already
handle this, but upgrades from older installs might not have the directory.
Reported-by: benjolitz
zrj [Sat, 7 May 2016 15:50:03 +0000 (18:50 +0300)]
drm/radeon: Clean up DPCD debug hex output print.
Linux uses "%*ph" format that does different thing on DragonFly.
It already got into into i915(4), so in radeonkms use hexncpy().
Tomohiro Kusumi [Fri, 6 May 2016 14:11:47 +0000 (23:11 +0900)]
sys/vfs/hammer: Add missing \n in debug kprintf
Sascha Wildner [Fri, 6 May 2016 11:29:19 +0000 (13:29 +0200)]
ctags(1): Sync with FreeBSD.
* -t is now default, per POSIX. A new option -T specifies the old default
(to not create tags for typedefs, structs, unions, and enums).
* Stop using system(3).
* Fix a parsing bug in the FORTRAN code.
While here, remove (void) casts.
François Tigeot [Fri, 6 May 2016 06:29:53 +0000 (08:29 +0200)]
drm/i915: Update to Linux 4.3
* Generic stability improvements
* Stability fixes and support improvements for various GPU families, including
Broxton, Valleyview, Cherryview, Broadwell and Skylake
* Skylake support is no longer considered experimental
* HDMI now uses 12 bits per color component if the screen supports it.
* Power saving features improvements: many fixes have been made to the
PSR (panel self refresh) and FBC (framebuffer compression) code.
These features are not yet enabled by default though.
Sascha Wildner [Thu, 5 May 2016 09:35:53 +0000 (11:35 +0200)]
<sys/msg.h>: Define msglen_t and msgqnum_t, use them in struct msqid_ds.
See:
http://pubs.opengroup.org/onlinepubs/
9699919799/basedefs/sys_msg.h.html
Justin C. Sherrill [Thu, 5 May 2016 03:17:34 +0000 (23:17 -0400)]
Fix filename and also misspelled word.
Sascha Wildner [Wed, 4 May 2016 21:04:48 +0000 (23:04 +0200)]
<stdio.h>/<wchar.h>: Reduce namespace pollution in <wchar.h>.
Instead of including the whole of <stdio.h> in <wchar.h>, just define
FILE there too, which is all it needs.
Based on FreeBSD's similar definitions.
zrj [Wed, 4 May 2016 07:15:03 +0000 (10:15 +0300)]
drm/radeon: Add missing new bonaire pci id
Tested-on: Gigabyte R7 360 (rev 2.0) card
Sascha Wildner [Tue, 3 May 2016 19:57:45 +0000 (21:57 +0200)]
Local adjustments for OpenSSL 1.0.1t.
Sascha Wildner [Tue, 3 May 2016 19:53:00 +0000 (21:53 +0200)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Tue, 3 May 2016 19:47:42 +0000 (21:47 +0200)]
Import OpenSSL 1.0.1t.
* Fix CVE-2016-2107, CVE-2016-2105, CVE-2016-2106, CVE-2016-2109,
CVE-2016-2176, CVE-2016-0702
For a more detailed list of changes, see crypto/openssl/CHANGES.
Sepherosa Ziehau [Tue, 3 May 2016 12:29:11 +0000 (20:29 +0800)]
Revert "kqueue: Avoid reprocessing processed knotes in KNOTE."
This reverts commit
ed9db6a1912db34af387ff6978a265003258df16.
This cause panic under certain network load.
Reported-by: pavalos@
Sepherosa Ziehau [Tue, 3 May 2016 12:27:50 +0000 (20:27 +0800)]
Revert "kqueue: Return value of knote_release is no longer useful."
This reverts commit
b75b5648541ea38deaf678ee62466780ffe62374.
Prepare to revert
ed9db6a1912db34af387ff6978a265003258df16, which causes
panic under certain network load.
Reported-by: pavalos@
François Tigeot [Sun, 3 Apr 2016 11:46:08 +0000 (13:46 +0200)]
drm/linux: Add linux/pwm.h
François Tigeot [Tue, 3 May 2016 11:31:21 +0000 (13:31 +0200)]
drm/linux: Add linux/gpio/consumer.h
François Tigeot [Tue, 3 May 2016 11:13:03 +0000 (13:13 +0200)]
drm/linux: Define U64_MAX
François Tigeot [Tue, 3 May 2016 09:28:37 +0000 (11:28 +0200)]
drm/linux: Add __test_and_clear_bit
Obtained-from: NetBSD
Imre Vadász [Sun, 1 May 2016 15:10:45 +0000 (17:10 +0200)]
gpio_intel: Slightly simplify interface to chipset-specific code.
* The intidx value in struct pin_intr_map is slightly redundant at the
moment, but it avoids needless lookups for now.
Imre Vadász [Sat, 30 Apr 2016 20:07:57 +0000 (22:07 +0200)]
gpio_intel: Use a cookie object for gpio interrupt allocation as well.
* This tries to improve the gpio_if.m api, e.g. only the interrupt pin
allocation can legitimately fail. The interrupt setup and teardown
functions can't really fail for proper input values (and for bogus
arguments it can just panic).
Tomohiro Kusumi [Sun, 1 May 2016 00:12:10 +0000 (09:12 +0900)]
sys/dev/disk/dm: Remove read/write support for /dev/mapper/control
It's obvious that /dev/mapper/control has nothing to read/write.
Running below results in kernel panic as the code requires properly
initialized a per-table lock while this chrdev has no tables mapped.
(control chrdev and dm blkdevs use the same dm device structures)
-----
[root@]~# cat ./dm1.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(void)
{
int fd;
char buf[1024];
fd = open("/dev/mapper/control", O_RDWR);
if (fd == -1) {
perror("open");
exit(1);
}
if (read(fd, buf, sizeof(buf)) == -1)
perror("read");
if (write(fd, buf, sizeof(buf)) == -1)
perror("write");
close(fd);
return 0;
}
With this commit.
-----
[root@]~# uname
DragonFly
[root@]~# kldload dm
[root@]~# ls -l /dev/mapper/control
crw-r----- 1 root operator 65, 0x00000000 May 1 09:25 /dev/mapper/control
[root@]~# gcc -Wall -g ./dm1.c -o ./dm1
[root@]~# ./dm1
read: Operation not supported by device
write: Operation not supported by device
With Linux kernel.
-----
[root@localhost]~# uname
Linux
[root@localhost]~# ls -l /dev/mapper/control
crw-rw---- 1 root root 10, 236 Apr 25 12:44 /dev/mapper/control
[root@localhost]~# gcc -Wall -g ./dm1.c -o ./dm1
[root@localhost]~# ./dm1
read: Invalid argument
write: Invalid argument
Imre Vadász [Fri, 29 Apr 2016 20:32:09 +0000 (22:32 +0200)]
gpio_acpi: Introduce separate setup_intr and teardown_intr functions.
* This allows us to actually reserve the gpio pin before, and separately
from actually setting up the interrupt handler.
* XXX This interface is still a bit inconvenient to use, because the
code allows gpio_setup_intr to fail. Instead the gpio_alloc_intr
function should be returning a cookie to use for gpio_setup_intr
(which could obviously never fail then).
Sascha Wildner [Fri, 29 Apr 2016 14:02:44 +0000 (16:02 +0200)]
libstand: Fix -Wstrict-prototypes warning.
Sascha Wildner [Fri, 29 Apr 2016 12:05:07 +0000 (14:05 +0200)]
sys/boot: Fix a prototype (pointed out by zrj).
Sascha Wildner [Fri, 29 Apr 2016 08:42:56 +0000 (10:42 +0200)]
sys/boot: Ansify the remaining cases found by -Wold-style-definition.
Imre Vadász [Thu, 28 Apr 2016 20:54:08 +0000 (22:54 +0200)]
boot/common: Clean up, ansify some functions, remove unneeded statements.
* No functional changes.
* Change some int variables into size_t in boot/common/module.c.
* Use MAX macro.
zrj [Thu, 28 Apr 2016 16:29:22 +0000 (19:29 +0300)]
drm/radeon: Retire old UMS driver.
Cleanup before next, removed upstream.
Sepherosa Ziehau [Thu, 28 Apr 2016 14:37:58 +0000 (22:37 +0800)]
tcp: Count connections by TCP state
Inspired-by: FreeBSD 'netstat -s -p tcp' output
zrj [Thu, 28 Apr 2016 13:09:18 +0000 (16:09 +0300)]
Use size_t to remove casts.
While there, perform some style(9) fixes.
No functional change.
zrj [Tue, 26 Apr 2016 14:30:32 +0000 (17:30 +0300)]
examples: Add binary firmware wrapping reference script.
Mainly to keep base with dports synchronized.
Also could be used while developing drivers to quickly make
firmware modules for testing.
zrj [Tue, 26 Apr 2016 14:28:27 +0000 (17:28 +0300)]
boot/loader: Handle the /boot/modules.local
Weather /boot/modules.local is used during boot or by kldload(8)
is controlled by a new "local_modules" loader variable.
If local_modules is set to "YES", /boot/modules.local is also
appended to kern.module_path sysctl variable for use by kldload(8).
Setting variable to any other value disables that.
By default allow modules to searched in /boot/modules.local directory
since it does not shadow the default kernel modules and has lower
directory search priority.
zrj [Tue, 26 Apr 2016 13:53:23 +0000 (16:53 +0300)]
mtree: Create /boot/modules.local
Intended for external modules and firmware e.g. from dports or for
user driver testing to keep base system clean during development.
This directory does not get affected when upgrading base system.