5 years agosshlockout - Add sshlockout utility
Matthew Dillon [Thu, 1 Jan 2015 03:21:47 +0000 (19:21 -0800)]
sshlockout - Add sshlockout utility

* Add sshlockout utility, typically setup as a syslog pipe.  This utility
  monitors for failed ssh login attempts and excessive preauth failures
  and will add a rule via IPFW to block the originating IP.

  The operator also typically sets up a cron job to clean out the IPFW rules
  that have accumulated once a day.

* See man page for details.  Still under construction (feel free to submit
  additional features).


  TODO - Use a PF table instead of IPFW, which will greatly improve
 performance if a lot of rules have to be added.

5 years agoroute: Print protocol-cloned routes if -A is specified
Sepherosa Ziehau [Wed, 31 Dec 2014 14:09:44 +0000 (22:09 +0800)]
route: Print protocol-cloned routes if -A is specified

Else the out put of netstat -rnA looks weird if there are protocol-
cloned routes.

5 years agortsock: Const-fy rt_msgsize parameter
Sepherosa Ziehau [Wed, 31 Dec 2014 13:02:11 +0000 (21:02 +0800)]
rtsock: Const-fy rt_msgsize parameter

5 years agortsock: Factor out sysctl_rttable()
Sepherosa Ziehau [Wed, 31 Dec 2014 12:48:49 +0000 (20:48 +0800)]
rtsock: Factor out sysctl_rttable()

While I'm here, remove unnecessary critical section.

5 years agoBump our copyrights to 2015. Happy new year!
Sascha Wildner [Wed, 31 Dec 2014 19:45:55 +0000 (20:45 +0100)]
Bump our copyrights to 2015. Happy new year!

5 years agoMark some legacy XSI functions as no longer present in _XOPEN_SOURCE=700.
Sascha Wildner [Wed, 31 Dec 2014 07:33:23 +0000 (08:33 +0100)]
Mark some legacy XSI functions as no longer present in _XOPEN_SOURCE=700.

This applies if _XOPEN_SOURCE=700 is explicitly requested. Our default
environment still exposes the prototypes, of course.

5 years agousbconfig(8): Sync with FreeBSD (decodes bDeviceClass/bInterfaceClass).
Sascha Wildner [Wed, 31 Dec 2014 03:46:11 +0000 (04:46 +0100)]
usbconfig(8): Sync with FreeBSD (decodes bDeviceClass/bInterfaceClass).

5 years agoinet6: Simplify in6ifa_ functions
Sepherosa Ziehau [Tue, 30 Dec 2014 13:14:05 +0000 (21:14 +0800)]
inet6: Simplify in6ifa_ functions

And fix indentation of in6ifa_llaonifp() while I'm here.

5 years agoin_control: Merge two switch blocks and fix comment a little bit
Sepherosa Ziehau [Mon, 29 Dec 2014 13:55:28 +0000 (21:55 +0800)]
in_control: Merge two switch blocks and fix comment a little bit

5 years agoin6_control: Fix comment
Sepherosa Ziehau [Mon, 29 Dec 2014 13:55:03 +0000 (21:55 +0800)]
in6_control: Fix comment

5 years agoswapcache - Allow cleaning to proceed if disabled
Matthew Dillon [Tue, 30 Dec 2014 01:07:41 +0000 (17:07 -0800)]
swapcache - Allow cleaning to proceed if disabled

* Allow swapcache cleaning to proceed even if swapcache
  is disabled.

5 years agokernel - Fix a major (pageable) memory leak
Matthew Dillon [Tue, 30 Dec 2014 00:56:23 +0000 (16:56 -0800)]
kernel - Fix a major (pageable) memory leak

* Under certain relatively easy to reproduce conditions an extra ref_count
  can be added to a VM object during a fork(), preventing the object from
  ever being destroyed.  It's pages may even be paged out, but the system
  will eventually run out of swap space too.

* The actual fix is to assign 'map_object = object' in vm_map_insert()
  (see the diff).  The rest of this commit is conditionalized debugging
  code and code documentation.

* Because this change implements a relatively esoteric feature in the VM
  system by allowing an anonymous VM object to be extended to cover an
  area even though it might have a gap (so a new VM object does not have
  to be allocated), further testing is needed before we can MFC this to
  the RELEASE branch.

5 years agovkernel - Forward SIGTERM to the child vkernel process.
Antonio Huete Jimenez [Mon, 29 Dec 2014 14:42:47 +0000 (15:42 +0100)]
vkernel - Forward SIGTERM to the child vkernel process.

- Fixes a problem that occurred when sending SIGTERM to the
  parent vkernel process. It died and left child running in
  the background instead of initiating the shutdown.

5 years agodrm: Only define struct drm_sysctl_info once
François Tigeot [Mon, 29 Dec 2014 13:51:15 +0000 (14:51 +0100)]
drm: Only define struct drm_sysctl_info once

5 years agoin6_mask2len: Constfy parameters
Sepherosa Ziehau [Sun, 28 Dec 2014 13:38:11 +0000 (21:38 +0800)]
in6_mask2len: Constfy parameters

5 years agoinet6: Simplify in6ifa_ifpwithaddr()
Sepherosa Ziehau [Sun, 28 Dec 2014 13:13:35 +0000 (21:13 +0800)]
inet6: Simplify in6ifa_ifpwithaddr()

5 years agoin6_control: Cosmetic cleanup
Sepherosa Ziehau [Sun, 28 Dec 2014 12:44:51 +0000 (20:44 +0800)]
in6_control: Cosmetic cleanup

5 years agoin6_control: Serialize some SIOCs using netisr0
Sepherosa Ziehau [Sun, 28 Dec 2014 08:28:36 +0000 (16:28 +0800)]
in6_control: Serialize some SIOCs using netisr0

The serialized SIOCs are:
- IPv6 multicast routing.
- Source address selection policy (not used yet).
- Scope6.
- IPv6 address changes.

5 years agoCheck __BSD_VISIBLE's actual value, not just if it is defined.
Sascha Wildner [Sun, 28 Dec 2014 21:51:20 +0000 (22:51 +0100)]
Check __BSD_VISIBLE's actual value, not just if it is defined.

It could be defined to 0, per <sys/cdefs.h>. Only the few cases which
this commit fixes were wrong.

5 years agou4b - implement usb_filter_write(), fix issues w/apcupsd
Matthew Dillon [Sun, 28 Dec 2014 22:13:05 +0000 (14:13 -0800)]
u4b - implement usb_filter_write(), fix issues w/apcupsd

* Implement usb_filter_write() (poll, kqueue).

* This fixes a live loop in apcupsd when it is configured
  to talk to the UPS over a usb port.

5 years agodebug - Add -v option to vmobjinfo and memory/swap dump
Matthew Dillon [Sun, 28 Dec 2014 21:17:09 +0000 (13:17 -0800)]
debug - Add -v option to vmobjinfo and memory/swap dump

* If the -v option is used, the contents of the memory AND swap space
  associated with the VM object to be dumped.

* Allow swap devices to be specified on the command line.  If not specified,
  only active memory is dumped with -v.

* Fixups for new VM object hash table in the kernel.

5 years agoRemove <netinet6/in6_prefix.h> via make upgrade.
Sascha Wildner [Sun, 28 Dec 2014 16:37:04 +0000 (17:37 +0100)]
Remove <netinet6/in6_prefix.h> via make upgrade.

5 years agokernel/acpi: Some fixes from FreeBSD.
Sascha Wildner [Sun, 28 Dec 2014 03:59:29 +0000 (04:59 +0100)]
kernel/acpi: Some fixes from FreeBSD.

* OsdInterrupt.c: InterruptNumber is unsigned so remove unnecessary
    "< 0" check.

* acpi.c: Use correct size of the end tag in a resource buffer.

* acpi_acad.c: Don't hold the acad lock when changing the power

5 years agoin6_control: Filter unsupported commands in earlier place.
Sepherosa Ziehau [Sun, 28 Dec 2014 03:25:18 +0000 (11:25 +0800)]
in6_control: Filter unsupported commands in earlier place.

5 years agokernel - Register CAM swi as MPSAFE
Matthew Dillon [Sun, 28 Dec 2014 00:50:31 +0000 (16:50 -0800)]
kernel - Register CAM swi as MPSAFE

* Register the CAM swi as being MPSAFE, which should improve disk
  performance when multiple drives are being hit concurrently.

Reported-by: Venkatesh Srinivas
5 years agovkernel - Add 'fsck' target to build
Matthew Dillon [Sun, 28 Dec 2014 00:49:22 +0000 (16:49 -0800)]
vkernel - Add 'fsck' target to build

* Add an fsck target to the /usr/src/test/vkernel Makefile.  This will
  fsck the rootfs image.

5 years agokernel - Remove vm_wait_nominal() from VM object cleaning path
Matthew Dillon [Sun, 28 Dec 2014 00:48:36 +0000 (16:48 -0800)]
kernel - Remove vm_wait_nominal() from VM object cleaning path

* Remove this call to vm_wait_nominal() which can wind up deadlocking
  the system in a low memory situation.

5 years agodrm - Add safety to ttm_eu_reserve_buffers()
Matthew Dillon [Sun, 28 Dec 2014 00:47:39 +0000 (16:47 -0800)]
drm - Add safety to ttm_eu_reserve_buffers()

* Add a safety to the unlock/relock sequence in ttm_eu_reserve_buffers().
  It is unclear whether all call paths are holding the lock.

5 years agohammer2 - Add debugging
Matthew Dillon [Sun, 28 Dec 2014 00:45:06 +0000 (16:45 -0800)]
hammer2 - Add debugging

* Dump bref->flags in hammer2 service debug output.

5 years agokernel - Fix old UFS optimization that should no longer be used
Matthew Dillon [Sun, 28 Dec 2014 00:41:06 +0000 (16:41 -0800)]
kernel - Fix old UFS optimization that should no longer be used

* Fix bcopy() calls which cover two fields in the UFS dinode.  Modern
  compilers may barf on the intentional field overflow.

* Also needed for UFS2 support (but we don't have it so this is more
  to fix possible future issues that might arise).

Submitted-by: Pedro Giffuni
5 years agokernel - Fix incorrect assertion in ffs_reallocblks()
Matthew Dillon [Sat, 27 Dec 2014 22:44:14 +0000 (14:44 -0800)]
kernel - Fix incorrect assertion in ffs_reallocblks()

* When softupdates is not enabled reallocblks should not try to free
  an unallocated block.  This appears to be possible if the reallocation
  range covers part of a file with a hole in it.  FSX appears to reveal
  this case.

* It is also possible that this case is due to some interaction between
  the DragonFly buffer cache and UFS that breaks b_offset assignment
  assumptions made by UFS, but I couldn't find any particular vector
  for the possibility.

5 years agoAllow reading with small uio->uio_resid or uio->uio_offset > 0 from /proc/X/map
Markus Pfeiffer [Sat, 27 Dec 2014 22:55:51 +0000 (22:55 +0000)]
Allow reading with small uio->uio_resid or uio->uio_offset > 0 from /proc/X/map

Currently map file in procfs cannot be read with programs like cat
sometimes. It happens if the buffer to be read into cannot hold the entire
content of map file. Call to read returns EFBIG on this occasion, which is
somewhat confusing.

Submitted-By: Vasily Postnicov <shamaz.mazum@gmail.com>
5 years agoinet6: Remove in6_prefix.[ch]
Sepherosa Ziehau [Sat, 27 Dec 2014 13:32:52 +0000 (21:32 +0800)]
inet6: Remove in6_prefix.[ch]

They have not been used for a while.

5 years agoinet: Merge in_control() and in_control_redispatch()
Sepherosa Ziehau [Sat, 27 Dec 2014 03:47:27 +0000 (11:47 +0800)]
inet: Merge in_control() and in_control_redispatch()

This also brings SIOC[DAG]LIFADDR ioctls back to the userland.

5 years agotcp: Enable path mtu discovery by default
Sepherosa Ziehau [Thu, 25 Dec 2014 11:55:41 +0000 (19:55 +0800)]
tcp: Enable path mtu discovery by default

This also eases the adoption of the RFC6864.

5 years agoinet/inet6: Don't allow different users to bind to the same port
Sepherosa Ziehau [Thu, 25 Dec 2014 11:34:38 +0000 (19:34 +0800)]
inet/inet6: Don't allow different users to bind to the same port

It is really wrong to allow different users to bind to the same port,
if the original 'reuseport' binding is using wildcard address and the
new binding is also using wildcard address; this serves no purpose and
imposes security risk (port theft).

5 years agosocket: Add KTR_SOWAKEUP
Sepherosa Ziehau [Thu, 25 Dec 2014 11:16:46 +0000 (19:16 +0800)]
socket: Add KTR_SOWAKEUP

Define 2 pairs of children nodes for this KTR, which are used to tracking
extra IPIs for accept(2).

The tracked sorwakeup() and the wakeup(so_timeo) does not generate extra
(wakeup) IPIs.

5 years agotools/accept_server: Add option to bind processes to CPUs
Sepherosa Ziehau [Thu, 25 Dec 2014 11:03:58 +0000 (19:03 +0800)]
tools/accept_server: Add option to bind processes to CPUs

According to the listen socket's CPU hint.

5 years agotools/kq_accept_server: Allow binding to a specific IPv4 address
Sepherosa Ziehau [Thu, 25 Dec 2014 11:02:41 +0000 (19:02 +0800)]
tools/kq_accept_server: Allow binding to a specific IPv4 address

5 years agoinet/inet6: Remove the v4-mapped address support
Sepherosa Ziehau [Thu, 18 Dec 2014 13:06:42 +0000 (21:06 +0800)]
inet/inet6: Remove the v4-mapped address support

This greatly simplies the code (even the IPv4 code) and avoids all kinds
of possible port theft.

- Nuke IN6P_IPV6_V6ONLY, which is always on after this commit.
- Change inp_vflag into inp_af (AF_INET or AF_INET6), since the socket
  is either IPv6 or IPv4, but never both.  Set inpcb.inp_af in
  in_pcballoc() instead of in every pru_attach methods.  Add INP_ISIPV4()
  and INP_ISIPV6() macros to check inpcb family (socket family and
  inpcb.inp_af are same).
- Nuke the convoluted code in in_pcbbind() and in6_pcbbind() which is used
  to allow wildcard binding to accepting IPv4 connections on IPv6 wildcard
  bound sockets.
- Nuke the code in in_pcblookup_pkthash() to match IPv4 faddr with IPv6
  wildcard bound socket.
- Nuke in6_mapped_{peeraddr,sockaddr,savefaddr}(); use in6_{setpeeraddr,
  setsockaddr,savefaddr}() directly.
- Nuke v4-mapped address convertion functions.
- Don't allow binding to v4-mapped address in in6_pcbind().
- Don't allow connecting to v4-mapped address in in6_pcbconnect().

- Nuke the code in tcp_output() which takes care of the IP header TTL
  setting for v4-mapped IPv6 socket.
- Don't allow binding to v4-mapped address (through in6_pcbbind()).
- Don't allow connecting to v4-mapped address and nuke the related code
- Nuke the code (PRUC_FALLBACK etc.) to fallback to IPv4 connection if
  IPv6 connection fails, which is wrong.
- Nuke the code for v4-mapped IPv6 socket in tcp6_soport().

- Nuke the code for v4-mapped IPv6 socket in udp_input() and udp_append().
- Don't allow binding to v4-mapped address (through in6_pcbbind()).
- Don't allow connecting to v4-mapped address.
- Don't allow sending datagrams to v4-mapped address and nuke the related
  code in udp6_output().
- Nuke the code for v4-mapped IPv6 socket in udp6_disconnect()

- Don't allow sending packets to v4-mapped address.
- Don't allow binding to v4-mapped address.
- Don't allow connecting to v4-mapped address.

Misc fixup:
- Don't force rip pru_attach method to return 0.  If in_pcballoc() fails,
  just return the error code.

5 years agohammer(8): Fix closing brace indent in 'show' output.
Sascha Wildner [Sat, 27 Dec 2014 00:53:35 +0000 (01:53 +0100)]
hammer(8): Fix closing brace indent in 'show' output.

Commit 39e88285cb81d7847bb54a08e0f50a61be890e08 extended the bad
indication to two chars ("B " or "BM") but forgot to adjust the
indent of the closing brace.

5 years agokernel - Add backlight sysctls to i915
Matthew Dillon [Wed, 24 Dec 2014 18:30:57 +0000 (10:30 -0800)]
kernel - Add backlight sysctls to i915

* Add sysctl hw.backlight_level and hw.backlight_max for i915
  (incls haswell chromebooks).

Submitted-by: yellowrabbit2010 / #2749
5 years agodrm/i915: Use struct pci_dev and Linux pci functions
François Tigeot [Wed, 24 Dec 2014 16:11:27 +0000 (17:11 +0100)]
drm/i915: Use struct pci_dev and Linux pci functions

5 years agodrm: Improve linux/pci.h
François Tigeot [Tue, 23 Dec 2014 19:57:23 +0000 (20:57 +0100)]
drm: Improve linux/pci.h

5 years agodrm: Add linux/io.h
François Tigeot [Tue, 23 Dec 2014 19:46:48 +0000 (20:46 +0100)]
drm: Add linux/io.h

5 years agodrm: Add linux/device.h
François Tigeot [Tue, 23 Dec 2014 19:23:05 +0000 (20:23 +0100)]
drm: Add linux/device.h

5 years agokernel/netmap: Switch sysctls over to dev.netmap like in FreeBSD.
Sascha Wildner [Mon, 22 Dec 2014 20:12:27 +0000 (21:12 +0100)]
kernel/netmap: Switch sysctls over to dev.netmap like in FreeBSD.

5 years ago<sys/sysctl.h>: Add missing declaration for dev.*
Sascha Wildner [Mon, 22 Dec 2014 20:11:59 +0000 (21:11 +0100)]
<sys/sysctl.h>: Add missing declaration for dev.*

5 years agokernel: Don't confuse kmalloc() and mbuf flags.
Sascha Wildner [Mon, 22 Dec 2014 11:49:03 +0000 (12:49 +0100)]
kernel: Don't confuse kmalloc() and mbuf flags.

5 years agoip6.4: Mention that IPV6_V6ONLY cannot be set to 0.
Sascha Wildner [Mon, 22 Dec 2014 01:15:41 +0000 (02:15 +0100)]
ip6.4: Mention that IPV6_V6ONLY cannot be set to 0.

5 years agoAdd quotes to ${MACHINE_ARCH} checks in Makefiles.
Sascha Wildner [Sun, 21 Dec 2014 22:31:51 +0000 (23:31 +0100)]
Add quotes to ${MACHINE_ARCH} checks in Makefiles.

Also s/amd64/x86_64/ in one case.

5 years ago<sys/file2.h>: Correct include guard check.
Sascha Wildner [Sun, 21 Dec 2014 18:28:26 +0000 (19:28 +0100)]
<sys/file2.h>: Correct include guard check.

5 years agoAdjust for the removal of the net.inet6.ip6.v6only sysctl.
Sascha Wildner [Sun, 21 Dec 2014 11:45:35 +0000 (12:45 +0100)]
Adjust for the removal of the net.inet6.ip6.v6only sysctl.

5 years agoinet6: Only allow setting IPV6_V6ONLY sockopt to 1.
Sepherosa Ziehau [Thu, 18 Dec 2014 12:46:53 +0000 (20:46 +0800)]
inet6: Only allow setting IPV6_V6ONLY sockopt to 1.

5 years agoinet6: Don't allow setting net.inet6.ip6.v6only to 0
Sepherosa Ziehau [Thu, 18 Dec 2014 12:35:17 +0000 (20:35 +0800)]
inet6: Don't allow setting net.inet6.ip6.v6only to 0

5 years agotcp: Increase default IW to 4.
Sepherosa Ziehau [Thu, 18 Dec 2014 12:10:51 +0000 (20:10 +0800)]
tcp: Increase default IW to 4.

This helps ACK loss case and will not cause obvious buffer bloating.

OKed-by: dillon@
5 years agosavecore - Fix a resource leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 23:20:24 +0000 (00:20 +0100)]
savecore - Fix a resource leak

- Detected by cppcheck

5 years agosvc - Fix a couple memory leaks
Antonio Huete Jimenez [Thu, 18 Dec 2014 23:13:52 +0000 (00:13 +0100)]
svc - Fix a couple memory leaks

- Detected by cppcheck

5 years agolibc/regex - Fix a memory leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 22:17:30 +0000 (23:17 +0100)]
libc/regex - Fix a memory leak

- Detected by cppcheck

5 years agolibc/db - Fix a resource leak
Antonio Huete Jimenez [Thu, 18 Dec 2014 22:01:13 +0000 (23:01 +0100)]
libc/db - Fix a resource leak

- Detected by cppcheck

5 years agokernel/acpica: Separate kernel and userland code in headers better.
Sascha Wildner [Thu, 18 Dec 2014 23:21:49 +0000 (00:21 +0100)]
kernel/acpica: Separate kernel and userland code in headers better.

Clean up a bit, use standard types, etc.

5 years agolibc - Initialise ret before use
Antonio Huete Jimenez [Thu, 18 Dec 2014 21:41:45 +0000 (22:41 +0100)]
libc - Initialise ret before use

5 years agoicmp: Asynchonize ctlinput/mtudisc/redirect processing
Sepherosa Ziehau [Mon, 24 Nov 2014 01:59:41 +0000 (09:59 +0800)]
icmp: Asynchonize ctlinput/mtudisc/redirect processing

Supportive facilities added:
- Embed netmsg_ctlinput into mbuf (used by input ICMP datagram) so that
  we don't need to do additional memory allocation to forward the
  pr_ctlinput to all netisrs for certain types of ICMP datagrams.
- Add/Expose so_pr_ctlport().
- Return target netisr's cpuid from pr_ctlport.  If the returned cpuid
  equals to ncpus, it means that pr_ctlinput needs to be run in all
- Support 'direct' mode for TCP/UDP's pr_ctlinput.  The caller of the
  'direct' mode pr_ctlinput will do the message forwarding.

ICMP pr_ctlinput/mtudisc/redirect processing changes:
- For mtudisc and redirect we unconditionally forward the message
  embedded in input ICMP datagram to all netisrs, and call pr_ctlinput
  in 'direct' mode.
- For pr_ctlinput, we first call so_pr_ctlport() to see whether we need
  to forward the message embedded in input ICMP datagram to all netisrs,
  and act accordingly.
- Once pr_ctlinput/mtudisc/redirect processing is done, the message
  embedded in the input ICMP datagram is forwarded back to the netisr0
  to run rip_input().

After this commit, netisr0 will not be blocked for ICMP pr_ctlinput/
mtudisc/redirect processing.  This also fixes the mtudisc (originally
only cpu0's routes get mtu updates).

5 years agoroute/inet: Set the mtu if it is _not_ configured, i.e. is 0
Sepherosa Ziehau [Wed, 17 Dec 2014 12:52:22 +0000 (20:52 +0800)]
route/inet: Set the mtu if it is _not_ configured, i.e. is 0

5 years agodrm/i915: Reduce GEM code differences with Linux 3.8.13
François Tigeot [Tue, 16 Dec 2014 20:51:38 +0000 (21:51 +0100)]
drm/i915: Reduce GEM code differences with Linux 3.8.13

5 years agotwa(4): Fix a crash with TWA_DEBUG >= 3.
Sascha Wildner [Mon, 15 Dec 2014 22:34:16 +0000 (23:34 +0100)]
twa(4): Fix a crash with TWA_DEBUG >= 3.

tw_osli_dbg_dprintf() uses device_printf(sc->bus_dev, ...) so we can't
use it before sc->bus_dev is actually set.

5 years agoUpdate the pciconf(8) database.
Sascha Wildner [Mon, 15 Dec 2014 10:27:06 +0000 (11:27 +0100)]
Update the pciconf(8) database.

December 14, 2014 snapshot from http://pciids.sourceforge.net/

5 years agosys/dev/misc/ipmi: Implement watchdog functionality
Markus Pfeiffer [Sun, 14 Dec 2014 17:50:27 +0000 (17:50 +0000)]
sys/dev/misc/ipmi: Implement watchdog functionality

Unfortunately wdog(9) cannot handle how ipmi's watchdog works, so
we roll our own callout based solution.

5 years agokernel: Import the IPMI driver from FreeBSD.
Sascha Wildner [Sun, 14 Dec 2014 18:55:28 +0000 (19:55 +0100)]
kernel: Import the IPMI driver from FreeBSD.

Many thanks to Markus Pfeiffer <profmakx@dragonflybsd.org> for testing,
bug hunting and fixing the watchdog (this will be pushed in a separate

5 years agodrm/i915: use i915_ggtt_clear_range()
François Tigeot [Sun, 14 Dec 2014 12:51:42 +0000 (13:51 +0100)]
drm/i915: use i915_ggtt_clear_range()

5 years agodrm/i915: Make struct intel_gtt more compatible with Linux 3.8.13
François Tigeot [Sun, 14 Dec 2014 09:46:07 +0000 (10:46 +0100)]
drm/i915: Make struct intel_gtt more compatible with Linux 3.8.13

5 years agodevfs: Improve devfs_alias_getvp()
François Tigeot [Sun, 14 Dec 2014 08:08:01 +0000 (09:08 +0100)]
devfs: Improve devfs_alias_getvp()

* Resolve indirect alias nodes up to a relatively large limit

* Code taken from devfs_vop_nresolve()

Suggested-by: alexh
5 years agoinstaller: Fix IMG detection.
Sascha Wildner [Sat, 13 Dec 2014 22:21:21 +0000 (23:21 +0100)]
installer: Fix IMG detection.

IMGs count as live CDs too, from installer.sh's perspective.

5 years agodevfs: Remove alias nodes first
François Tigeot [Sat, 13 Dec 2014 17:30:20 +0000 (18:30 +0100)]
devfs: Remove alias nodes first

Fix a crash at unmount time where some device nodes were being removed
before their aliases.

5 years agobuild.7: Document installworld-force target.
Robin Hahling [Fri, 12 Dec 2014 11:08:37 +0000 (12:08 +0100)]
build.7: Document installworld-force target.

5 years agotrek(6): Fix bounds checking.
Sascha Wildner [Sat, 13 Dec 2014 10:51:56 +0000 (11:51 +0100)]
trek(6): Fix bounds checking.

The number of sectors was being used to check input for the quadrant,

Taken-from:  FreeBSD ports (games/bsdgames)
Reported-by: marino
5 years agokernel/x86_64: Add a bios.c with only bios_sigsearch().
Sascha Wildner [Sat, 13 Dec 2014 10:36:27 +0000 (11:36 +0100)]
kernel/x86_64: Add a bios.c with only bios_sigsearch().

Unlike i386, bios16/bios32 calls are not supported in x86_64, but
searching for ROM signatures is still useful for certain drivers.

We could use it in powernow(4) and also the (upcoming) IPMI driver
uses it.

Taken-from: FreeBSD

5 years agoFix the default path where modules reside in various manual pages.
Sascha Wildner [Fri, 12 Dec 2014 09:51:26 +0000 (10:51 +0100)]
Fix the default path where modules reside in various manual pages.

Reported-by: Yellow Rabbit <yrabbit@sdf.lonestar.org>
5 years agodrm: Sync drm_pci_alloc() with Linux 3.8.13
François Tigeot [Wed, 10 Dec 2014 07:07:44 +0000 (08:07 +0100)]
drm: Sync drm_pci_alloc() with Linux 3.8.13

5 years agobuild - add installworld-force target and better checks
Matthew Dillon [Wed, 10 Dec 2014 21:33:32 +0000 (13:33 -0800)]
build - add installworld-force target and better checks

* Add better checks to installworld.  Print an error and exit if the
  base system is too old, directing users to run installworld-force.

* Add installworld-force.  This automates installing the world on a
  base system which is too old and thus has chicken-and-egg problems
  with binaries and libraries.

  This install target will install to a temporary directory, compile up
  a static cpdup, and then use it to just blast copy /bin, /sbin, /lib,
  /libexec, /usr/bin, /usr/sbin, /usr/lib, and /usr/libexec.  It will
  then execute a normal make installworld and make upgrade.

5 years agopkg - Adjust pkg-bootstrap-force
Matthew Dillon [Wed, 10 Dec 2014 21:05:57 +0000 (13:05 -0800)]
pkg - Adjust pkg-bootstrap-force

* Adjust the pkg-bootstrap-force target to also remove
  "/usr/local/etc/pkg.conf".  Older pkg.conf files (e.g. 3.5 or earlier,
  possibly 3.6 or earlier) can interfere with newer pkg bootstraps.

5 years agobuildworld - bootstrap compatibility with older dragonfly's
Matthew Dillon [Wed, 10 Dec 2014 20:29:41 +0000 (12:29 -0800)]
buildworld - bootstrap compatibility with older dragonfly's

* Fix buildworld issue bootstrapping grep related utilities which expect
  newer header files.

5 years agoMention the disk device file names in a few disk/RAID driver manpages.
Sascha Wildner [Wed, 10 Dec 2014 18:48:59 +0000 (19:48 +0100)]
Mention the disk device file names in a few disk/RAID driver manpages.

All others mentioned it.

Reported-by: amonk on IRC
5 years agomdoc.local: We dropped libskey in 2009.
Sascha Wildner [Wed, 10 Dec 2014 18:13:44 +0000 (19:13 +0100)]
mdoc.local: We dropped libskey in 2009.

5 years agopstat.8: Fix list of flags that are valid for swapinfo.
Sascha Wildner [Wed, 10 Dec 2014 18:01:51 +0000 (19:01 +0100)]
pstat.8: Fix list of flags that are valid for swapinfo.

5 years agobsd.libnames.mk: Comment out libdmsg until it is hooked back in.
Sascha Wildner [Wed, 10 Dec 2014 17:59:53 +0000 (18:59 +0100)]
bsd.libnames.mk: Comment out libdmsg until it is hooked back in.

5 years agolibusb{,20}.3: Add libusb to mdoc.local and adjust LIBRARY section.
Sascha Wildner [Wed, 10 Dec 2014 15:51:10 +0000 (16:51 +0100)]
libusb{,20}.3: Add libusb to mdoc.local and adjust LIBRARY section.

5 years agoichwd: Add support for Ivy-Bridge EP and Haswell chipsets
François Tigeot [Mon, 10 Nov 2014 08:45:16 +0000 (09:45 +0100)]
ichwd: Add support for Ivy-Bridge EP and Haswell chipsets

* Add support for the Coleto Creek Ivy-Bridge EP chipset

* Add support for the Intel Lynx Point and Wildcat Point Haswell chipsets

Obtained-from: FreeBSD

5 years agodevfs - Fix a vkernel panic on shutdown
Antonio Huete Jimenez [Wed, 10 Dec 2014 00:08:20 +0000 (01:08 +0100)]
devfs - Fix a vkernel panic on shutdown

5 years agohammer - Fix 'history' directive
Antonio Huete Jimenez [Tue, 9 Dec 2014 00:10:27 +0000 (01:10 +0100)]
hammer - Fix 'history' directive

- Directive options '@offset,len' work now as they are
  supposed to.

5 years agousb4bsd/if_rum: Add missing locking around rum_start_locked().
Imre Vadasz [Mon, 8 Dec 2014 15:01:24 +0000 (16:01 +0100)]
usb4bsd/if_rum: Add missing locking around rum_start_locked().

5 years agoinstaller - Use bit 'flags' for additional options
Antonio Huete Jimenez [Mon, 8 Dec 2014 01:16:10 +0000 (02:16 +0100)]
installer - Use bit 'flags' for additional options

- Use a flags field to i_fn_args struct instead of single
  int fields to specify different options.
- No functional change

5 years agokernel/usb4bsd: Change a pointer back to NULL.
Sascha Wildner [Sat, 6 Dec 2014 19:46:20 +0000 (20:46 +0100)]
kernel/usb4bsd: Change a pointer back to NULL.

5 years agokernel/usb4bsd: Remove no longer needed dependencies on 'usb' in 'files'.
Sascha Wildner [Sat, 6 Dec 2014 19:20:11 +0000 (20:20 +0100)]
kernel/usb4bsd: Remove no longer needed dependencies on 'usb' in 'files'.

We used it (along with 'oldusb') to differentiate between the former
USB stack and USB4BSD. This is no longer necessary now.

5 years agoRemove some obsolete manpages (from oldusb).
Sascha Wildner [Sat, 6 Dec 2014 18:58:04 +0000 (19:58 +0100)]
Remove some obsolete manpages (from oldusb).

5 years agoFWIW, port and hook in the urio(4) storage driver.
Sascha Wildner [Sat, 6 Dec 2014 18:57:40 +0000 (19:57 +0100)]
FWIW, port and hook in the urio(4) storage driver.

Taken-from: FreeBSD

5 years agoAdd missing includes for prototypes in various manual pages.
Sascha Wildner [Sat, 6 Dec 2014 01:13:20 +0000 (02:13 +0100)]
Add missing includes for prototypes in various manual pages.

5 years agokobj.9: Remove information about non-public functions.
Sascha Wildner [Sat, 6 Dec 2014 01:12:38 +0000 (02:12 +0100)]
kobj.9: Remove information about non-public functions.

5 years agokprintf.9: tprintf()'s prototype is in <sys/tprintf.h>.
Sascha Wildner [Sat, 6 Dec 2014 00:27:16 +0000 (01:27 +0100)]
kprintf.9: tprintf()'s prototype is in <sys/tprintf.h>.

5 years agodevfs: Fix namecache invalidation for alias nodes
François Tigeot [Fri, 5 Dec 2014 18:28:57 +0000 (19:28 +0100)]
devfs: Fix namecache invalidation for alias nodes

* The devfs alias nodes don't have a directly associated vnode, they
  use the vnode of their target link.

* Unfortunately, the namecache invalidation code in devfs_freep() only
  processed vnodes registered in the devfs_node structure, missing the

* Put the namecache invalidation code in devfs_unlinkp() and make sure
  devfs alias node entries are properly invalidated.