dragonfly.git
2 years agokernel -- vm_page_dontneed: Fix interaction with vm_page_madvise and pagedaemon
Venkatesh Srinivas [Sat, 24 Sep 2011 13:41:13 +0000 (06:41 -0700)]
kernel -- vm_page_dontneed: Fix interaction with vm_page_madvise and pagedaemon

vm_page_dontneed didn't clear the PG_REFERENCED flag on pages it is
deactivating. The pagedaemon would see references on the page (via
PG_REFERENCED) and reactivate it, undoing the effect of vm_page_dontneed.

2 years agostdio: Add __printflike for dprintf(3) and vdprintf(3)
Sepherosa Ziehau [Fri, 23 Sep 2011 08:54:59 +0000 (16:54 +0800)]
stdio: Add __printflike for dprintf(3) and vdprintf(3)

Noticed-by: "Xia Zuoling" <zeroxia@gmail.com>
2 years agokevent: Restore old EV_EOF semantics
Sepherosa Ziehau [Fri, 23 Sep 2011 06:23:53 +0000 (14:23 +0800)]
kevent: Restore old EV_EOF semantics

- EV_EOF should be set when the other side closed the connection, even
  if there are data pending in the read buffer (the old semantics).
- EV_NODATA is added to indicate there are no more data pending in the
  buffer and EOF is detected (EV_EOF is also set in this situation).

Kernel code now tests EV_NODATA instead of EV_EOF, since EV_NODATA
delivers the information which was delivered by the EV_EOF before
this commit.

DragonFly-Bug: http://bugs.dragonflybsd.org/issue1998

2 years agoselect(2)/kevent: Bail out immediately if EV_ERROR is set.
Sepherosa Ziehau [Fri, 23 Sep 2011 03:54:02 +0000 (11:54 +0800)]
select(2)/kevent: Bail out immediately if EV_ERROR is set.

By setting *res to -1, if kevent registration failed, select(2)
will return error properly.

2 years agoAdd header guard to mntopts.h
Venkatesh Srinivas [Fri, 23 Sep 2011 03:52:47 +0000 (20:52 -0700)]
Add header guard to mntopts.h

2 years agokevent(2): Set errno properly
Sepherosa Ziehau [Fri, 23 Sep 2011 01:51:05 +0000 (09:51 +0800)]
kevent(2): Set errno properly

If we can't deliver the registration failure information in the
changelist, then we should set the errno properly.

2 years ago<ucontext.h>: Conditionalize prototypes for {get,set,make,swap}context().
Sascha Wildner [Wed, 21 Sep 2011 05:48:43 +0000 (07:48 +0200)]
<ucontext.h>: Conditionalize prototypes for {get,set,make,swap}context().

They are gone per OpenGroup Specifications Issue 7.

However, keep them visible in our default environment.

2 years agoUpdate files for file-5.09 import.
Peter Avalos [Wed, 21 Sep 2011 02:34:55 +0000 (19:34 -0700)]
Update files for file-5.09 import.

2 years agoMerge branch 'vendor/FILE'
Peter Avalos [Wed, 21 Sep 2011 02:34:15 +0000 (19:34 -0700)]
Merge branch 'vendor/FILE'

2 years agoImport file-5.09.
Peter Avalos [Wed, 21 Sep 2011 02:25:31 +0000 (19:25 -0700)]
Import file-5.09.

* Don't wait for any subprocess, just the one we forked.
* If the application name is not set in a cdf file, try to see
  if it has a directory with the application name on it.
* Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza
* Don't use variable string formats.
* Fix detection of Zip files (Mantis #128).
* Make some minor improvements to file(1).
* Rename MIME types for filesystem objects for consistency with
  xdg-utils. Typically this means that application/x-foo becomes
  inode/foo, but some names also change slightly, e.g.
  application/x-character-device becomes inode/chardevice.

2 years agoUpdate files for OpenSSL-1.0.0e import.
Peter Avalos [Wed, 21 Sep 2011 02:14:37 +0000 (19:14 -0700)]
Update files for OpenSSL-1.0.0e import.

2 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Wed, 21 Sep 2011 00:38:06 +0000 (17:38 -0700)]
Merge branch 'vendor/OPENSSL'

2 years agoImport OpenSSL-1.0.0e.
Peter Avalos [Wed, 21 Sep 2011 00:22:53 +0000 (17:22 -0700)]
Import OpenSSL-1.0.0e.

      o Fix for CRL vulnerability issue CVE-2011-3207
      o Fix for ECDH crashes CVE-2011-3210
      o Protection against EC timing attacks.
      o Support ECDH ciphersuites for certificates using SHA2 algorithms.
      o Various DTLS fixes.

2 years agoUpdate files for OpenSSH-5.9p1 import.
Peter Avalos [Tue, 20 Sep 2011 23:58:41 +0000 (16:58 -0700)]
Update files for OpenSSH-5.9p1 import.

2 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Tue, 20 Sep 2011 23:41:15 +0000 (16:41 -0700)]
Merge branch 'vendor/OPENSSH'

2 years agoBring in a compat file needed for latest OpenSSH import.
Peter Avalos [Tue, 20 Sep 2011 23:39:31 +0000 (16:39 -0700)]
Bring in a compat file needed for latest OpenSSH import.

2 years agoMerge branch 'vendor/OPENSSH'
Peter Avalos [Tue, 20 Sep 2011 22:50:56 +0000 (15:50 -0700)]
Merge branch 'vendor/OPENSSH'

2 years agoImport OpenSSH-5.9p1.
Peter Avalos [Tue, 20 Sep 2011 22:19:10 +0000 (15:19 -0700)]
Import OpenSSH-5.9p1.

 * Introduce sandboxing of the pre-auth privsep child using an optional
   sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables
   mandatory restrictions on the syscalls the privsep child can perform.
   This intention is to prevent a compromised privsep child from being
   used to attack other hosts (by opening sockets and proxying) or
   probing local kernel attack surface.

   The rlimit sandbox is a fallback choice for platforms that don't
   support a better one; it uses setrlimit() to reset the hard-limit
   of file descriptors and processes to zero, which should prevent
   the privsep child from forking or opening new network connections.

 * Add new SHA256-based HMAC transport integrity modes from
   http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt
   These modes are hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512,
   and hmac-sha2-512-96, and are available by default in ssh(1) and
   sshd(8)

 * The pre-authentication sshd(8) privilege separation slave process
   now logs via a socket shared with the master process, avoiding the
   need to maintain /dev/log inside the chroot.

 * ssh(1) now warns when a server refuses X11 forwarding

 * sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths,
   separated by whitespace. The undocumented AuthorizedKeysFile2
   option is deprecated (though the default for AuthorizedKeysFile
   includes .ssh/authorized_keys2)

 * sshd_config(5): similarly deprecate UserKnownHostsFile2 and
   GlobalKnownHostsFile2 by making UserKnownHostsFile and
   GlobalKnownHostsFile accept multiple options and default to
   include known_hosts2

 * Retain key comments when loading v.2 keys. These will be visible
   in "ssh-add -l" and other places. bz#439

 * ssh(1) and sshd(8): set IPv6 traffic class from IPQoS (as well as
   IPv4 ToS/DSCP). bz#1855

 * ssh_config(5)'s ControlPath option now expands %L to the host
   portion of the destination host name.

 * ssh_config(5) "Host" options now support negated Host matching, e.g.

     Host *.example.org !c.example.org
        User mekmitasdigoat

   Will match "a.example.org", "b.example.org", but not "c.example.org"

 * ssh_config(5): a new RequestTTY option provides control over when a
   TTY is requested for a connection, similar to the existing -t/-tt/-T
   ssh(1) commandline options.

 * sshd(8): allow GSSAPI authentication to detect when a server-side
   failure causes authentication failure and don't count such failures
   against MaxAuthTries; bz#1244

 * ssh-keygen(1): Add -A option. For each of the key types (rsa1, rsa,
   dsa and ecdsa) for which host keys do not exist, generate the host
   keys with the default key file path, an empty passphrase, default
   bits for the key type, and default comment. This is useful for
   system initialization scripts.

 * ssh(1): Allow graceful shutdown of multiplexing: request that a mux
   server removes its listener socket and refuse future multiplexing
   requests but don't kill existing connections. This may be requested
   using "ssh -O stop ..."

 * ssh-add(1) now accepts keys piped from standard input. E.g.
   "ssh-add - < /path/to/key"

 * ssh-keysign(8) now signs hostbased authentication
   challenges correctly using ECDSA keys; bz#1858

 * sftp(1): document that sftp accepts square brackets to delimit
   addresses (useful for IPv6); bz#1847a

 * ssh(1): when using session multiplexing, the master process will
   change its process title to reflect the control path in use and
   when a ControlPersist-ed master is waiting to close; bz#1883 and
   bz#1911

 * Other minor bugs fixed: 1849 1861 1862 1869 1875 1878 1879 1892
   1900 1905 1913

2 years agolibarchive: Bump WARNS down for vendor-induced warnings.
Peter Avalos [Tue, 20 Sep 2011 21:51:40 +0000 (14:51 -0700)]
libarchive: Bump WARNS down for vendor-induced warnings.

2 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Tue, 20 Sep 2011 21:36:20 +0000 (14:36 -0700)]
Merge branch 'vendor/LIBARCHIVE'

2 years agoImport libarchive-2.8.5.
Peter Avalos [Tue, 20 Sep 2011 21:15:23 +0000 (14:15 -0700)]
Import libarchive-2.8.5.

* Now reads ISO images created by NetBSD makefs and other tools.
* Relax an lzma compression test to remove false negatives.
* Better handling of open failures and interrupted writes.
* Corrected compile warnings on various platforms.

2 years agolibc/x86_64: Remove duplicate file in a Makefile.
Sascha Wildner [Tue, 20 Sep 2011 20:20:26 +0000 (22:20 +0200)]
libc/x86_64: Remove duplicate file in a Makefile.

2 years agoubsec(4) - update man page
Alex Hornung [Tue, 20 Sep 2011 10:00:23 +0000 (11:00 +0100)]
ubsec(4) - update man page

Obtained-from: FreeBSD

2 years agoubsec - Fix & update
Alex Hornung [Tue, 20 Sep 2011 09:14:29 +0000 (10:14 +0100)]
ubsec - Fix & update

 * Fix ubsec(4) to work with our updated opencrypto. The main problem
   was that the argument to newsession, freesession, process and
   kprocess changed from an arbitrary arg (set to softc) to a device_t.

 * Update bits and pieces from FreeBSD, such as cleaning up the code a
   bit and adding support for bcm5825.

Tested with a BCM5821 PCI-x card.

2 years agomachintr/x86_64: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 18 Sep 2011 13:10:32 +0000 (21:10 +0800)]
machintr/x86_64: Function renaming; no functional changes

2 years agoclock: register_int and unregister_int will enable/disable interrupt
Sepherosa Ziehau [Sun, 18 Sep 2011 13:14:42 +0000 (21:14 +0800)]
clock: register_int and unregister_int will enable/disable interrupt

2 years agomachintr/i386: Function renaming; no functional changes
Sepherosa Ziehau [Sun, 18 Sep 2011 12:05:32 +0000 (20:05 +0800)]
machintr/i386: Function renaming; no functional changes

2 years agotcp.4: Add document for TCP_KEEP{INIT,IDLE,INTVL,CNT}
Sepherosa Ziehau [Fri, 16 Sep 2011 08:44:56 +0000 (16:44 +0800)]
tcp.4: Add document for TCP_KEEP{INIT,IDLE,INTVL,CNT}

2 years agotcp.4: Document net.inet.tcp.keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 08:27:17 +0000 (16:27 +0800)]
tcp.4: Document net.inet.tcp.keepcnt

2 years agotcp: Add comment for the keepinit and keepalive related stuffs
Sepherosa Ziehau [Fri, 16 Sep 2011 08:13:23 +0000 (16:13 +0800)]
tcp: Add comment for the keepinit and keepalive related stuffs

2 years agotcp: Remove no longer used tcp_slowtimo
Sepherosa Ziehau [Fri, 16 Sep 2011 08:06:03 +0000 (16:06 +0800)]
tcp: Remove no longer used tcp_slowtimo

2 years agotcp: Allow per-tcpcb keepintvl and keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 07:53:37 +0000 (15:53 +0800)]
tcp: Allow per-tcpcb keepintvl and keepcnt

- Expose tcp_keepcnt
- Add t_keepintvl, t_keepcnt and t_maxidle to tcpcb.  t_keepintvl and
  t_keepcnt is initialized to tcp_keepintvl and tcp_keepcnt respectively.
  t_maxidle is initialized to t_keepcnt * t_keepintvl
- The accepted socket's t_keepintvl, t_keepcnt and t_maxidle is inherited
  from the listen socket
- Add IPPROTO_TCP/TCP_KEEPINTVL and IPPROTO_TCP.TCP_KEEPCNT socket options
  to get and set t_keepintvl and t_keepcnt.  TCP_KEEPINTVL's unit is
  milliseconds, which is as same as the unit of the sysctl node
  net.inet.tcp.keepintvl
- Remove no longer used tcp_maxidle

2 years agotcp: Allow per-tcpcb keepidle
Sepherosa Ziehau [Fri, 16 Sep 2011 07:13:22 +0000 (15:13 +0800)]
tcp: Allow per-tcpcb keepidle

- Add t_keepidle to tcpcb, it is initialized to tcp_keepidle
- The accepted socket's t_keepidle is inherited from the listen socket
- Add IPPROTO_TCP/TCP_KEEPIDLE socket option to get and set t_keepidle.
  The unit is milliseconds, which is as same as the unit of the sysctl
  node net.inet.tcp.keepidle

2 years agotcp: Allow per-tcpcb keepinit
Sepherosa Ziehau [Fri, 16 Sep 2011 06:41:13 +0000 (14:41 +0800)]
tcp: Allow per-tcpcb keepinit

- Add t_keepinit to tcpcb, it is initialized to tcp_keepinit
- The accepted socket's t_keepinit is inherited from the listen socket
- Add IPPROTO_TCP/TCP_KEEPINIT socket option to get and set t_keepinit.
  The unit is milliseconds, which is as same as the unit of the sysctl
  node net.inet.tcp.keepinit

2 years agotcp: Expose tcp_keepcnt through sysctl net.inet.tcp.keepcnt
Sepherosa Ziehau [Fri, 16 Sep 2011 06:06:46 +0000 (14:06 +0800)]
tcp: Expose tcp_keepcnt through sysctl net.inet.tcp.keepcnt

2 years agokernel - Fix various memory & swap leaks in tmpfs
Matthew Dillon [Thu, 15 Sep 2011 06:25:03 +0000 (23:25 -0700)]
kernel - Fix various memory & swap leaks in tmpfs

* tmpfs was using a vref() instead of a vget() (cache_vget() to be precise)
  which does not necessarily reactivate an inactive vnode.  This can cause
  the vnode to languish in the vnode cache even when the underlying file
  has been removed and no longer has any open() descriptors.

* tmpfs_nrmdir(), tmpfs_nremove(), and tmpfs_nrename() (for target replacement
  renames) was effected.

Reported-by: sephe and others, tested by sephe, dillon
2 years agoMachIntrABI: Field rename; no functional changes
Sepherosa Ziehau [Wed, 14 Sep 2011 13:32:37 +0000 (21:32 +0800)]
MachIntrABI: Field rename; no functional changes

2 years agoi386/files: isa/clock.c is clean enough to compile w/ -Werror
Sepherosa Ziehau [Wed, 14 Sep 2011 13:31:12 +0000 (21:31 +0800)]
i386/files: isa/clock.c is clean enough to compile w/ -Werror

2 years agoopen_memstream.3: A little bit of cleanup.
Sascha Wildner [Tue, 13 Sep 2011 02:33:35 +0000 (04:33 +0200)]
open_memstream.3: A little bit of cleanup.

2 years agolibc: Prototype and manual page for open_memstream.
Venkatesh Srinivas [Mon, 12 Sep 2011 20:35:15 +0000 (13:35 -0700)]
libc: Prototype and manual page for open_memstream.

2 years agoSync zoneinfo database with tzdata2011j from elsie.nci.nih.gov
Sascha Wildner [Mon, 12 Sep 2011 14:02:12 +0000 (16:02 +0200)]
Sync zoneinfo database with tzdata2011j from elsie.nci.nih.gov

africa:         8.32 -> 8.33
australasia:    8.25 -> 8.27

* africa: Four instances of 2:44:45 changed to 2:45 (one in a comment,
    one each in zones Africa/Dar_es_Salaam, Africa/Kampala, Africa/Nairobi)
    (thanks to Jules Descartes)

* australasia: Samoa uses DST in 2011-2012 (thanks to Laupue Raymond Hughes)

2 years agoMachIntrABI: Split vectorctl into intr_setup and intr_teardown
Sepherosa Ziehau [Mon, 12 Sep 2011 12:57:34 +0000 (20:57 +0800)]
MachIntrABI: Split vectorctl into intr_setup and intr_teardown

2 years agoUPDATING: Add some words about the ISA only drivers I removed recently.
Sascha Wildner [Mon, 12 Sep 2011 11:53:09 +0000 (13:53 +0200)]
UPDATING: Add some words about the ISA only drivers I removed recently.

2 years agolibc: Initial implementation of open_memstream.
Venkatesh Srinivas [Mon, 12 Sep 2011 05:12:47 +0000 (22:12 -0700)]
libc: Initial implementation of open_memstream.

open_memstream allows wrapping a buffer via the FILE * interface; the
buffer is dynamically allocated and automatically expanding. The interface
appeared in POSIX 2008.

This implementation doesn't validate seek offsets and doesn't currently
handle SEEK_END.

2 years agokernel: mmap -- Return EINVAL for len = 0 mmap.
Venkatesh Srinivas [Mon, 12 Sep 2011 03:46:07 +0000 (20:46 -0700)]
kernel: mmap -- Return EINVAL for len = 0 mmap.

Closes bug: 2131

2 years agoUpdate fmemopen from NetBSD.
Venkatesh Srinivas [Mon, 12 Sep 2011 02:33:22 +0000 (19:33 -0700)]
Update fmemopen from NetBSD.

NetBSD's version of fmemopen() was more correct than our own wrt error
handling and handling seeks at the tail of buffers. We now pass the ATF
fmemopen test set, with the exception of test08; that problem is related to
malloc return for SIZE_MAX requests.

Changes:
* Modified NetBSD's fmemopen to work with our libc's private FILE struct
* Modified fmemopen_read() to use bcopy() rather than a byte-at-a-time loop

2 years agoSome cleanup in the ndis manpages.
Sascha Wildner [Sat, 10 Sep 2011 18:13:00 +0000 (20:13 +0200)]
Some cleanup in the ndis manpages.

2 years agondis(4): Remove comment that doesn't apply to us.
Sascha Wildner [Sat, 10 Sep 2011 18:12:24 +0000 (20:12 +0200)]
ndis(4): Remove comment that doesn't apply to us.

2 years agokernel: Fix UP remove the "race averted" msg in callout_terminate().
Sascha Wildner [Fri, 9 Sep 2011 16:42:16 +0000 (18:42 +0200)]
kernel: Fix UP remove the "race averted" msg in callout_terminate().

2 years agoFix the VKERNEL/VKERNEL64 build.
Sascha Wildner [Thu, 8 Sep 2011 17:16:42 +0000 (19:16 +0200)]
Fix the VKERNEL/VKERNEL64 build.

Stuff dt_lock into <machine/segments.h>.

2 years agokernel - Add missing prototype for last commit
Matthew Dillon [Wed, 7 Sep 2011 22:54:54 +0000 (15:54 -0700)]
kernel - Add missing prototype for last commit

* Add missing prototype for last commit

2 years agokernel - Fix panic related to kqueue-based timers
Matthew Dillon [Wed, 7 Sep 2011 22:48:07 +0000 (15:48 -0700)]
kernel - Fix panic related to kqueue-based timers

* Fix a panic related to kqueue-based timers.  When a knote is destroyed it
  is possible for the callout_stop() to race a callout on another cpu that
  is blocked on a lock.

* Introduce callout_terminate() which stops a callout and ensures that no
  function calls for the callout is still in progress before returning.
  The kevent code now uses this function instead of callout_stop().

* We can't have this assurance for the normal callout_stop() function because
  it can deadlock a backend stuck waiting for a lock when a frontend holding
  that lock calls callout_stop().

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
2 years agoSync ndis(4) and tools with FreeBSD and hook it all back into the build.
Sascha Wildner [Wed, 7 Sep 2011 20:28:06 +0000 (22:28 +0200)]
Sync ndis(4) and tools with FreeBSD and hook it all back into the build.

It supports NDIS 5.x drivers, that means Windows XP and Server 2003.
The latter is an educated guess by me. No testing has actually been
done using Windows Server 2003 drivers.

It is tested on i386 with the following PCI adapters:

* D-Link DWL-G520+ (Texas Instruments ACX111 chip), aka acx(4).

* Linksys WMP600N (Ralink RT2860 chip).

* Planex GW-DS54GR (Realtek RTL8185 chip) which was kindly donated by
  sephe.

Thanks to Max Herrgard <herrgard@gmail.com> for testing it on x86_64
with a CNet CWP-854 (Ralink RT2561T chip), aka ral(4).

Note that this port has the following caveats:

* PCI adapters need hw.ioapic_enable=0 in /boot/loader.conf but worked
  great then. Without it, the box will completely freeze after a while.
  This has been observed on both my own testing box as well as on a
  different box by Max Herrgard. The cause is yet unknown. :-(

* PC Card adapters are untested (they might just work).

* USB adapters are not yet stable at all. Panics might ensue.

Taken-from: FreeBSD

2 years agokernel: Add dt_lock (for GDT and LDT).
Sascha Wildner [Wed, 7 Sep 2011 20:10:53 +0000 (22:10 +0200)]
kernel: Add dt_lock (for GDT and LDT).

2 years agokernel: Add m_extadd().
Sascha Wildner [Thu, 30 Dec 2010 08:16:56 +0000 (09:16 +0100)]
kernel: Add m_extadd().

2 years agoFix some typos: in to -> into.
Sascha Wildner [Wed, 7 Sep 2011 14:11:08 +0000 (16:11 +0200)]
Fix some typos: in to -> into.

2 years agoetc/rc.d/wpa_supplicant: Fix broken check for ndis(4) interfaces.
Sascha Wildner [Wed, 7 Sep 2011 13:26:53 +0000 (15:26 +0200)]
etc/rc.d/wpa_supplicant: Fix broken check for ndis(4) interfaces.

With the new wlan stack, we need to check a sysctl to determine if it
is an ndis(4) interface because it is now wlanX that gets passed to
the script.

Depending on this, wpa_supplicant(8) will be started with either
"-D bsd" or "-D ndis".

Reported-by: Max Herrgard <herrgard@gmail.com>
Taken-from:  FreeBSD

2 years agoinstall.1: One more markup fix.
Sascha Wildner [Wed, 7 Sep 2011 09:00:53 +0000 (11:00 +0200)]
install.1: One more markup fix.

2 years agoinstall.1: A little cleanup.
Sascha Wildner [Wed, 7 Sep 2011 08:53:18 +0000 (10:53 +0200)]
install.1: A little cleanup.

2 years agoAdd a -D option to install(1)
François Tigeot [Wed, 7 Sep 2011 07:37:22 +0000 (09:37 +0200)]
Add a -D option to install(1)

This option is implemented for compatibility with the NetBSD version of
install(1). Even though its code is fully operating, it is only useful
when used in combination with the non-implemented -M NetBSD flag.

Thus, it is effectively a dummy as of the present commit.

2 years agokernel: Add linker_file_foreach() (taken from FreeBSD).
Sascha Wildner [Wed, 29 Dec 2010 16:39:38 +0000 (17:39 +0100)]
kernel: Add linker_file_foreach() (taken from FreeBSD).

2 years ago<net/ethernet.h>: Add ETHER_MAX_FRAME (taken from FreeBSD).
Sascha Wildner [Wed, 29 Dec 2010 15:55:59 +0000 (16:55 +0100)]
<net/ethernet.h>: Add ETHER_MAX_FRAME (taken from FreeBSD).

2 years agomachintr.h: Add header guardian
Sepherosa Ziehau [Mon, 5 Sep 2011 11:52:13 +0000 (19:52 +0800)]
machintr.h: Add header guardian

2 years agoMachIntrABI: Remove unused setvar/getvar interfaces
Sepherosa Ziehau [Mon, 5 Sep 2011 11:42:41 +0000 (19:42 +0800)]
MachIntrABI: Remove unused setvar/getvar interfaces

2 years agomachintr.h: Remove unnecessary inclusion
Sepherosa Ziehau [Mon, 5 Sep 2011 11:21:24 +0000 (19:21 +0800)]
machintr.h: Remove unnecessary inclusion

3 years agobfq.4: Fix and improve a bit.
Sascha Wildner [Sat, 3 Sep 2011 18:18:32 +0000 (20:18 +0200)]
bfq.4: Fix and improve a bit.

3 years agodsched.4: Add a reference to bfq(4).
Sascha Wildner [Sat, 3 Sep 2011 18:17:13 +0000 (20:17 +0200)]
dsched.4: Add a reference to bfq(4).

3 years agopsm.4: Use %O for URLs. We don't have %U yet.
Sascha Wildner [Sat, 3 Sep 2011 18:16:25 +0000 (20:16 +0200)]
psm.4: Use %O for URLs. We don't have %U yet.

3 years agousb.4: Add a reference to lgue(4).
Sascha Wildner [Fri, 2 Sep 2011 20:12:30 +0000 (22:12 +0200)]
usb.4: Add a reference to lgue(4).

3 years agokernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).
Sascha Wildner [Fri, 2 Sep 2011 20:07:03 +0000 (22:07 +0200)]
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).

3 years agonetif/e1000: Add a missing include file to the Makefile.
Sascha Wildner [Fri, 2 Sep 2011 18:41:12 +0000 (20:41 +0200)]
netif/e1000: Add a missing include file to the Makefile.

Reported-by: Miro Svetlik <miro@svetlik.be>
3 years agoacpi/pcib: Use DEFINE_CLASS_1 to define acpi_pcib driver
Sepherosa Ziehau [Fri, 2 Sep 2011 11:48:11 +0000 (19:48 +0800)]
acpi/pcib: Use DEFINE_CLASS_1 to define acpi_pcib driver

This avoids code duplication and maintenance headache

3 years agopci: Declare pcib_driver
Sepherosa Ziehau [Fri, 2 Sep 2011 11:47:56 +0000 (19:47 +0800)]
pci: Declare pcib_driver

3 years agoThird parameter of VFS_STATFS is no longer struct proc *
François Tigeot [Thu, 1 Sep 2011 21:48:59 +0000 (23:48 +0200)]
Third parameter of VFS_STATFS is no longer struct proc *

3 years agogdb: Remove previous local modification
John Marino [Thu, 1 Sep 2011 18:17:20 +0000 (20:17 +0200)]
gdb: Remove previous local modification

Due to a previous effort that saw binutils support DragonFly, the
config.bfd file no longer needs to be modified.  Unfortunately the
official binutils version wasn't modified the same way as it was in
base, so the auto-merge didn't catch that there were two versions of
each DragonFly entry.  Luckily the good version came first, so this
is simply a cleanup.

Also the README.DRAGONFLY file was updated to include a new set of
local modifications introduced with the FAKE_PROCESS_ID changes.

3 years agokgdb: Tweak to avoid extra inferior
John Marino [Tue, 12 Jul 2011 22:57:53 +0000 (00:57 +0200)]
kgdb: Tweak to avoid extra inferior

Since one inferior exists when kgdb launches, the code was changed to
update the pid of the first inferior rather than to add it outright.

3 years agogdb: Improve concept of FAKE_PROCESS_ID to fix JIT crash
John Marino [Tue, 12 Jul 2011 22:06:43 +0000 (00:06 +0200)]
gdb: Improve concept of FAKE_PROCESS_ID to fix JIT crash

The fix for 7.2 seems to break on gdb 7.3 with addition of JIT
initialization which assumes at least one inferior defined.  The problem
is that this inferior isn't defined before the JIT routine is run.

Changing the fake process ID from zero has a lot of risk (miss some,
accidently change zero's that need to remain zero, etc), but it seems to
be the only way to fix it cleanly.

3 years agogdb: Adjust makefiles for gdb 7.3
John Marino [Tue, 12 Jul 2011 18:42:26 +0000 (20:42 +0200)]
gdb: Adjust makefiles for gdb 7.3

3 years agoMerge branch 'vendor/GDB'
John Marino [Thu, 1 Sep 2011 17:50:06 +0000 (19:50 +0200)]
Merge branch 'vendor/GDB'

Conflicts:
contrib/gdb-7/gdb/charset.c

3 years agoImport gdb 7.3 into vendor branch
John Marino [Wed, 31 Aug 2011 21:22:16 +0000 (23:22 +0200)]
Import gdb 7.3 into vendor branch

3 years agompt(4): Properly lock mpt_timeout().
Sascha Wildner [Wed, 31 Aug 2011 16:24:44 +0000 (18:24 +0200)]
mpt(4): Properly lock mpt_timeout().

I had removed it with an assertion (like in FreeBSD) as part of the
last sync I did, but I had overlooked that FreeBSD initializes their
callout with callout_init_mtx().

For now, just put back locking like it was.

Reported-by: G.Isenmann
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2127>

3 years agomfi(4): Remove another debug message.
Sascha Wildner [Wed, 31 Aug 2011 09:49:44 +0000 (11:49 +0200)]
mfi(4): Remove another debug message.

3 years agoioapic/x86_64: Rearrange pin information for ioapic low level intrhandler
Sepherosa Ziehau [Wed, 31 Aug 2011 09:09:06 +0000 (17:09 +0800)]
ioapic/x86_64: Rearrange pin information for ioapic low level intrhandler

- Remove unused field, thus reduce the information size from 32 bytes
  to 16bytes.
- Struct, field and macro renaming

3 years agointr/x86_64: Define ISA_IRQ_CNT; use it consistently instead of magic number
Sepherosa Ziehau [Wed, 31 Aug 2011 08:37:22 +0000 (16:37 +0800)]
intr/x86_64: Define ISA_IRQ_CNT; use it consistently instead of magic number

3 years agointr/x86_64: Define IDT_HWI_VECTORS
Sepherosa Ziehau [Wed, 31 Aug 2011 08:11:35 +0000 (16:11 +0800)]
intr/x86_64: Define IDT_HWI_VECTORS

This macro defines how many IDT vectors that could be setup as hardware
interrupts.  Use this macro instead of MAX_HARDINTS and APIC_INTMAPSIZE.

3 years agoicu/x86_64: Remove unnecessary header inclusion
Sepherosa Ziehau [Wed, 31 Aug 2011 06:58:02 +0000 (14:58 +0800)]
icu/x86_64: Remove unnecessary header inclusion

3 years agomfi(4): Remove some debug messages.
Sascha Wildner [Wed, 31 Aug 2011 06:53:31 +0000 (08:53 +0200)]
mfi(4): Remove some debug messages.

3 years agomkdir(1): Don't reference memory beyond the end of the path
Sepherosa Ziehau [Wed, 31 Aug 2011 06:24:05 +0000 (14:24 +0800)]
mkdir(1): Don't reference memory beyond the end of the path

3 years agoLINT/LINT64: Add SAFE_NO_RNG.
Sascha Wildner [Tue, 30 Aug 2011 19:51:31 +0000 (21:51 +0200)]
LINT/LINT64: Add SAFE_NO_RNG.

3 years agoioapic/i386: Rearrange pin information for ioapic low level intrhandler
Sepherosa Ziehau [Mon, 29 Aug 2011 11:54:51 +0000 (19:54 +0800)]
ioapic/i386: Rearrange pin information for ioapic low level intrhandler

- Remove unused field, thus reduce the information size from 32 bytes
  to 16bytes.
- Struct, field and macro renaming

3 years agointr/i386: Define ISA_IRQ_CNT; use it consistently instead of magic number
Sepherosa Ziehau [Sun, 28 Aug 2011 08:18:41 +0000 (16:18 +0800)]
intr/i386: Define ISA_IRQ_CNT; use it consistently instead of magic number

3 years agoSync zoneinfo database with tzdata2011i from elsie.nci.nih.gov
Sascha Wildner [Mon, 29 Aug 2011 11:08:07 +0000 (13:08 +0200)]
Sync zoneinfo database with tzdata2011i from elsie.nci.nih.gov

africa:         8.31 -> 8.32
australasia:    8.23 -> 8.25
europe:         8.33 -> 8.34
iso3166.tab:    8.9  -> 8.11
northamerica:   8.42 -> 8.48
zone.tab:       8.45 -> 8.47

* africa: Add Africa/Juba (South Sudan) zone.

* australasia: Samoa moves from east to west of the international date line
    (changes from UTC-11 to UTC+13). It will skip December 30, 2011.
    Thanks to David Zuelke and Mark Sim-Smith.

* europe: Use KALT as abbreviation for Europe/Kalinigrad from spring 2011
    forward (thanks to Yoshito Umaoka).

* iso3166.tab: Add SS (South Sudan) entry.

* northamerica:
    - Newfoundland changes time of day for DST start and end to 2:00 a.m.
      starting fall 2011 and forward (thanks to Michael Pelley).
    - Change America/Resolute use of EST to 2006-2007 only (thanks to
      Chris Walton).
    - Assume Metlakatla abandoned use of daylight saving as a result of
      its 1983 vote.
    - Avoid unnecessary use of US rule in America/Honolulu; fix two
      typos in America/Honolulu comments.
    - Adjust America/Goose_Bay as well as America/St_Johns from fall 2011
      forward (thanks to Chris Walton).

* zone.tab:
    - Change America/Resolute entry to Central Standard Time.
      (thanks to Chris Walton).
    - Add SS (South Sudan, Africa/Juba) entry.

3 years agobce(4): Flush BCE_PCICFG_INT_ACK_CMD in interrupt handler
Sepherosa Ziehau [Mon, 29 Aug 2011 09:37:36 +0000 (17:37 +0800)]
bce(4): Flush BCE_PCICFG_INT_ACK_CMD in interrupt handler

This could avoid possible spurious interrupts due to the PCI write
to BCE_PCICFG_INT_ACK_CMD is still pending after we leave interrupt
handler.

Obtained-from: Linux bnx2

3 years agoatkbd/x86_64: Do the same AT controller check on x86_64 as on i386
Sepherosa Ziehau [Mon, 29 Aug 2011 07:18:16 +0000 (15:18 +0800)]
atkbd/x86_64: Do the same AT controller check on x86_64 as on i386

DragonFly-bug:
    http://bugs.dragonflybsd.org/issue2052
    http://bugs.dragonflybsd.org/issue2065

3 years agomfi(4): Fix a bug in the disk initialization code.
Sascha Wildner [Mon, 29 Aug 2011 03:19:54 +0000 (05:19 +0200)]
mfi(4): Fix a bug in the disk initialization code.

This ultimately caused a panic when kldunloading.

Reported-by: Tomi Juvonen <tomi.juvonen@kenou.biz>
3 years agokernel: Bring in safe(4), for SafeNet crypto accelerators.
Sascha Wildner [Sun, 28 Aug 2011 22:39:54 +0000 (00:39 +0200)]
kernel: Bring in safe(4), for SafeNet crypto accelerators.

Yet untested.

Taken-from: FreeBSD

3 years agodsched - increase max size of diskctx
Alex Hornung [Sun, 28 Aug 2011 21:57:45 +0000 (21:57 +0000)]
dsched - increase max size of diskctx

3 years agoadd missing DSCHED_BFQ option
Alex Hornung [Sun, 28 Aug 2011 21:51:26 +0000 (21:51 +0000)]
add missing DSCHED_BFQ option

 * fixes LINT build

Reported-by: Sascha Wildner
3 years agodm - Add device type for future raid1
Alex Hornung [Sun, 28 Aug 2011 08:45:12 +0000 (08:45 +0000)]
dm - Add device type for future raid1

Submitted-by: Adam Hoka
Sponsored-by: Google Summer of Code
3 years agodm - Move the target unbusy to the dm_table_destroy function
Adam Hoka [Tue, 21 Jun 2011 01:23:21 +0000 (03:23 +0200)]
dm - Move the target unbusy to the dm_table_destroy function

Sponsored-by: Google Summer of Code