dragonfly.git
2 years agokernel/acpi: Fix a reference to an uninitialized ptr.
Sascha Wildner [Sun, 22 Jan 2012 12:29:29 +0000 (13:29 +0100)]
kernel/acpi: Fix a reference to an uninitialized ptr.

2 years agosendfile: Block or return EAGAIN, iff we are really short of space
Sepherosa Ziehau [Sun, 22 Jan 2012 13:59:30 +0000 (21:59 +0800)]
sendfile: Block or return EAGAIN, iff we are really short of space

Send sockbuf's lowat could be quite "high" (hiwat/2), the originally
code actually only uses 1/2 of the send sockbuf space, thus poor
performance.

2 years agosockbuf: Pre-alloc sockbuf space, so asynchronized pru_send could be used.
Sepherosa Ziehau [Sun, 22 Jan 2012 13:29:29 +0000 (21:29 +0800)]
sockbuf: Pre-alloc sockbuf space, so asynchronized pru_send could be used.

When doing asynchronized pru_send, it is quite possible that we could
break the send sockbuf's upper limit, if we only use ssb_space() to
calculate the remaining sockbuf space.

Now, we add another two counters into sockbuf, when we send a mbuf
chain to the netisr, we update the these two counters to reflect how
much mbufs will be pending on the send sockbuf.  When calculating the
remaining space of the send sockbuf we also take these two counters
into consideration, so we will not break the upper limit of the send
sockbuf.  These two counter will also be updated when the mbufs in
the sockbuf is to be dropped/freed.

Reenable the asynchronized pru_send in sendfile and sosendtcp

2 years agopru_send: Disable asynchornized pru_send usage by default
Sepherosa Ziehau [Sun, 22 Jan 2012 09:36:07 +0000 (17:36 +0800)]
pru_send: Disable asynchornized pru_send usage by default

It may cause problem, e.g. too many mbufs sitting in the TCP send buffer,
when facing with certain attacks, e.g. FIN_WAIT_1 DoS.

Reported-by: pavalos@
2 years agosendfile: Add sysctl to disable the usage of the asynchronized pru_send
Sepherosa Ziehau [Sun, 22 Jan 2012 09:33:08 +0000 (17:33 +0800)]
sendfile: Add sysctl to disable the usage of the asynchronized pru_send

2 years agocarp: BGL -> CARP global token
Sepherosa Ziehau [Sun, 22 Jan 2012 03:54:14 +0000 (11:54 +0800)]
carp: BGL -> CARP global token

2 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Sat, 21 Jan 2012 21:46:56 +0000 (14:46 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

2 years agorc - Add a default setting for udevd_early, silences warning at boot
Samuel J. Greear [Sat, 21 Jan 2012 21:46:24 +0000 (14:46 -0700)]
rc - Add a default setting for udevd_early, silences warning at boot

2 years agoMerge commit 'crater/master'
Thomas Nikolajsen [Sat, 21 Jan 2012 20:27:27 +0000 (21:27 +0100)]
Merge commit 'crater/master'

2 years agoetc/auth.conf: Add sha512/sha256/blf
Thomas Nikolajsen [Sat, 21 Jan 2012 18:54:12 +0000 (19:54 +0100)]
etc/auth.conf: Add sha512/sha256/blf

2 years agologin.conf.5: Add sha256/sha512
Thomas Nikolajsen [Sat, 21 Jan 2012 18:51:03 +0000 (19:51 +0100)]
login.conf.5: Add sha256/sha512

2 years agopam_unix.c: Change default hash
Thomas Nikolajsen [Sat, 21 Jan 2012 18:26:10 +0000 (19:26 +0100)]
pam_unix.c: Change default hash

Change to sha512; same as in etc/login.conf.

2 years agologin.conf.5: Fix mdoc problems
Thomas Nikolajsen [Sat, 21 Jan 2012 17:57:10 +0000 (18:57 +0100)]
login.conf.5: Fix mdoc problems

Fix problems identified by mandoc(1).

To get both groff(1) and mandoc(1) to format nice
headlines changed from TAB changed to Ta use.
This seems like a groff(1) bug.

2 years agocrypt.3: Update algorithm numbers ($N$)
Thomas Nikolajsen [Sat, 21 Jan 2012 17:43:40 +0000 (18:43 +0100)]
crypt.3: Update algorithm numbers ($N$)

Fix algorithm number for Blowfish, SHA256 and SHA512,
note that existing SHA256 and SHA512 implementations
are deprecated and add new implementations.

While here add missing line breaks at end of sentence.

2 years agoFix buildkernel -j N
Thomas Nikolajsen [Sat, 21 Jan 2012 17:10:32 +0000 (18:10 +0100)]
Fix buildkernel -j N

Work around build ordering issue which caused
`make -j N buildkernel' to fail on some systems.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue2279>
Submitted-by: YONETANI Tomokazu
2 years agonataraid(4): Add devstat support.
Sascha Wildner [Sat, 21 Jan 2012 16:34:46 +0000 (17:34 +0100)]
nataraid(4): Add devstat support.

2 years agoinstaller: Warn <10GB HAMMER filesystems are unsupported
Francois Tigeot [Sat, 21 Jan 2012 12:04:31 +0000 (13:04 +0100)]
installer: Warn <10GB HAMMER filesystems are unsupported

2 years agoAdd a copyright notice to cpputil.h
Aggelos Economopoulos [Fri, 20 Jan 2012 23:13:24 +0000 (00:13 +0100)]
Add a copyright notice to cpputil.h

Claim copyright inasmuch as there is any to claim for this trivial file.

Reminded-by: swildner@
2 years agokernel: Remove some more old major number related stuff.
Sascha Wildner [Fri, 20 Jan 2012 22:27:01 +0000 (23:27 +0100)]
kernel: Remove some more old major number related stuff.

2 years agocrypt(3) - Forgotten string in last commit
Samuel J. Greear [Fri, 20 Jan 2012 20:12:55 +0000 (13:12 -0700)]
crypt(3) - Forgotten string in last commit

2 years agocrypt(3) - Paper over sizeof()/strlen() bug causing 32/64-bit issues
Samuel J. Greear [Fri, 20 Jan 2012 20:04:56 +0000 (13:04 -0700)]
crypt(3) - Paper over sizeof()/strlen() bug causing 32/64-bit issues

* In one place sizeof() was used instead of strlen(), causing the password
  to be muxed with 4 bytes of random stack data on 64-bit machines. Codify
  this behavior for reverse compatibility.

2 years agokernel - Fix AHCI callout timer race (2)
Matthew Dillon [Fri, 20 Jan 2012 19:23:54 +0000 (11:23 -0800)]
kernel - Fix AHCI callout timer race (2)

* Fix minor bug in last commit.  If the serial number does not match
  after the timeout is stopped we don't want to mess with the xa at
  all.

2 years agokernel - Fix race in callout_stop_sync()
Matthew Dillon [Fri, 20 Jan 2012 18:23:06 +0000 (10:23 -0800)]
kernel - Fix race in callout_stop_sync()

* When callout_stop_sync() races a timeout callback which re-arms the
  callout it can hit an assertion.  The assertion is incorrect.  Instead
  of asserting we have to loop up and try again.

2 years agokernel - Fix AHCI callout timer race
Matthew Dillon [Fri, 20 Jan 2012 18:20:20 +0000 (10:20 -0800)]
kernel - Fix AHCI callout timer race

* callout_stop_sync() can block.  If this occurs a race can cause a
  CCB to be processed for completion twice.

* Add a serial number to detect this situation.

Reported-by: "G. Isenmann via Redmine"
2 years agokernel - Fix pmap_release() bug for i386
Matthew Dillon [Fri, 20 Jan 2012 17:56:51 +0000 (09:56 -0800)]
kernel - Fix pmap_release() bug for i386

* Fix 'pmap_release: page should already be gone' panic

* There is a race condition which can result in the case.  Release the
  page normally instead of panicing.

Reported-by: tuxillo
2 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Fri, 20 Jan 2012 13:16:44 +0000 (06:16 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

2 years agocrypt(3) - Switch SHA256/512 to the Linux implementation
Samuel J. Greear [Fri, 20 Jan 2012 12:24:33 +0000 (05:24 -0700)]
crypt(3) - Switch SHA256/512 to the Linux implementation

* The existing SHA backends have been shown to be more susceptible to brute-
  force attacks than we would prefer --
  http://www.openwall.com/lists/oss-security/2012/01/16/2

* Bring in the reference implementation used in Linux, code is in the public
  domain.

* Add required (standard) functions mempcpy and stpcpy.

* Change default for future installs to SHA512, this is the default on at
  least archlinux and fedora.

* Add some minor hacks to libcrypt/crypt.c to ensure that
  a) All existing passwords continue to work
  b) All future passwords will be more secure with no changes required

* To update passwords to the new format use passwd(1) for each user, and to
  change your default password type to SHA512 (default for new installations)
  change the passwd_format setting under default to "sha512".

2 years agoicu_abi/x86_64: {msi,msix}_release returns nothing
Sepherosa Ziehau [Fri, 20 Jan 2012 06:37:59 +0000 (14:37 +0800)]
icu_abi/x86_64: {msi,msix}_release returns nothing

2 years agoi386: Implement MSI-X allocation and release support
Sepherosa Ziehau [Fri, 20 Jan 2012 06:35:34 +0000 (14:35 +0800)]
i386: Implement MSI-X allocation and release support

2 years agoicu/x86_64: Implement MSI-X alloc/release
Sepherosa Ziehau [Fri, 20 Jan 2012 05:09:05 +0000 (13:09 +0800)]
icu/x86_64: Implement MSI-X alloc/release

2 years agokernel: Remove two more major numbers.
Sascha Wildner [Fri, 20 Jan 2012 04:28:10 +0000 (05:28 +0100)]
kernel: Remove two more major numbers.

2 years agokernel: Remove some old major numbers.
Sascha Wildner [Fri, 20 Jan 2012 04:15:50 +0000 (05:15 +0100)]
kernel: Remove some old major numbers.

2 years agoLINT/LINT64: Add snd_gusc.
Sascha Wildner [Fri, 20 Jan 2012 03:58:59 +0000 (04:58 +0100)]
LINT/LINT64: Add snd_gusc.

2 years agoGENERIC: Add back COMPAT_DF12.
Sascha Wildner [Fri, 20 Jan 2012 03:58:35 +0000 (04:58 +0100)]
GENERIC: Add back COMPAT_DF12.

It's a good thing, because it allows for running FreeBSD 4 binaries.

Requested-by: vsrinivas
2 years agokernel: Fix building of snd_gusc.
Sascha Wildner [Fri, 20 Jan 2012 03:56:16 +0000 (04:56 +0100)]
kernel: Fix building of snd_gusc.

2 years agojme: Support multiple MSI-X interrupt model
Sepherosa Ziehau [Fri, 20 Jan 2012 03:00:16 +0000 (11:00 +0800)]
jme: Support multiple MSI-X interrupt model

2 years agoahci(4)/sili(4): Fix some comments.
Sascha Wildner [Fri, 20 Jan 2012 02:13:44 +0000 (03:13 +0100)]
ahci(4)/sili(4): Fix some comments.

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/1692>

2 years agoRemove empty DragonFly CVS IDs.
Sascha Wildner [Fri, 20 Jan 2012 02:07:02 +0000 (03:07 +0100)]
Remove empty DragonFly CVS IDs.

2 years agoUpdate files for OpenSSL-1.0.0g import.
Peter Avalos [Fri, 20 Jan 2012 00:19:17 +0000 (16:19 -0800)]
Update files for OpenSSL-1.0.0g import.

2 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Fri, 20 Jan 2012 00:17:27 +0000 (16:17 -0800)]
Merge branch 'vendor/OPENSSL'

2 years agoImport OpenSSL-1.0.0g.
Peter Avalos [Fri, 20 Jan 2012 00:11:16 +0000 (16:11 -0800)]
Import OpenSSL-1.0.0g.

o Fix for DTLS DoS issue CVE-2012-0050

2 years agovquota(8): Remove unneeded braces
François Tigeot [Thu, 19 Jan 2012 10:57:20 +0000 (11:57 +0100)]
vquota(8): Remove unneeded braces

2 years agovquota(8): Display full user and group names
François Tigeot [Thu, 19 Jan 2012 10:03:41 +0000 (11:03 +0100)]
vquota(8): Display full user and group names

* Full user and group names are now displayed by default

* add a -n flag to show the raw user and group ids

* refactor the code to use common id printing functions

2 years agoi386: Unbreak LINT building
Sepherosa Ziehau [Thu, 19 Jan 2012 08:10:02 +0000 (16:10 +0800)]
i386: Unbreak LINT building

2 years agobus: Pass intsrerupt description to setup_intr bus method
Sepherosa Ziehau [Thu, 19 Jan 2012 07:49:17 +0000 (15:49 +0800)]
bus: Pass intsrerupt description to setup_intr bus method

If no interrupt description is supplied, then the device's name
will be used.

Add bus_setup_intr_descr(), which allow device drivers to pass
interrupt description.  Reimplement bus_setup_intr() using
bus_setup_intr_descr().

2 years agojme: Split ifnet serializer; in preparation for multiple MSI-X support
Sepherosa Ziehau [Thu, 19 Jan 2012 03:37:37 +0000 (11:37 +0800)]
jme: Split ifnet serializer; in preparation for multiple MSI-X support

2 years agoDisable HAMMER live dedup, mark as experimental
François Tigeot [Wed, 18 Jan 2012 09:36:56 +0000 (10:36 +0100)]
Disable HAMMER live dedup, mark as experimental

* Comment out mentions to it in the hammer(8) manpage

* Live-dedup is a relatively new feature that has not undergone
  extensive testing.

* It may have some issues with HAMMER bigblocks, we do not want
  users to run it on production machines yet.

2 years agocarp: Add comment about carp_update_addrs()
Sepherosa Ziehau [Wed, 18 Jan 2012 08:46:10 +0000 (16:46 +0800)]
carp: Add comment about carp_update_addrs()

2 years agonexus/x86_64: Implement {alloc,release}_msix pcib methods
Sepherosa Ziehau [Wed, 18 Jan 2012 01:32:29 +0000 (09:32 +0800)]
nexus/x86_64: Implement {alloc,release}_msix pcib methods

2 years agoioapic_abi/x86_64: Implement MSI-X alloc/release
Sepherosa Ziehau [Tue, 17 Jan 2012 10:05:21 +0000 (18:05 +0800)]
ioapic_abi/x86_64: Implement MSI-X alloc/release

2 years agomsix/pci: Enable MSI-X by default
Sepherosa Ziehau [Tue, 17 Jan 2012 08:52:36 +0000 (16:52 +0800)]
msix/pci: Enable MSI-X by default

2 years agomsix: Use msix_table_res to determine whether MSI-X is used or not
Sepherosa Ziehau [Tue, 17 Jan 2012 08:03:14 +0000 (16:03 +0800)]
msix: Use msix_table_res to determine whether MSI-X is used or not

2 years agomsix: Make sure vectors are not allocated before setup/teardown
Sepherosa Ziehau [Tue, 17 Jan 2012 07:56:06 +0000 (15:56 +0800)]
msix: Make sure vectors are not allocated before setup/teardown

2 years agomsix: Rework MSI-X allocation, step 5/5
Sepherosa Ziehau [Tue, 17 Jan 2012 07:40:11 +0000 (15:40 +0800)]
msix: Rework MSI-X allocation, step 5/5

Add release_msix_vector pci method

2 years agomxge: Unbreak LINT building due to recent MSI-X allocation changes
Sepherosa Ziehau [Tue, 17 Jan 2012 06:09:44 +0000 (14:09 +0800)]
mxge: Unbreak LINT building due to recent MSI-X allocation changes

2 years agomsix: Rework MSI-X allocation, step 4/many
Sepherosa Ziehau [Tue, 17 Jan 2012 03:57:40 +0000 (11:57 +0800)]
msix: Rework MSI-X allocation, step 4/many

Save MSI-X vector information for resuming and verification

2 years agouname - Allow varsym overrides
Matthew Dillon [Tue, 17 Jan 2012 02:42:26 +0000 (18:42 -0800)]
uname - Allow varsym overrides

* A varsym named UNAME_<opt> will override a uname option, similar to
  how environment variables override a uname option.  Environment variables
  take priority.

2 years agovarsym - Add -x option
Matthew Dillon [Tue, 17 Jan 2012 02:41:24 +0000 (18:41 -0800)]
varsym - Add -x option

* Add the -x option which causes varsym to set per-process variables and
  then exec the command line from the first non-varsym-assign.  For example:

  varsym -x UNAME_n=fubar uname
  varsym -x UNAME_n=fubar /bin/csh
  etc

2 years agoFix the ktr(4) formats for pid_t and lwpid_t on x86_64
Aggelos Economopoulos [Mon, 16 Jan 2012 20:58:37 +0000 (12:58 -0800)]
Fix the ktr(4) formats for pid_t and lwpid_t on x86_64

2 years agoFix a few bugs in the new ktrdump code
Aggelos Economopoulos [Mon, 16 Jan 2012 20:57:05 +0000 (12:57 -0800)]
Fix a few bugs in the new ktrdump code

- Pass in the correct machine_valist pointer on i386 (which means we need
  some indirection on x86_64).
- Keep references to all memory blocks that we allocate and free them
  when we're done with the machine_valist.
- Make sure we don't leak any memory on the error paths either.

2 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Mon, 16 Jan 2012 20:03:13 +0000 (12:03 -0800)]
Merge branch 'vendor/LIBARCHIVE'

2 years agoImport libarchive-3.0.3.
Peter Avalos [Mon, 16 Jan 2012 19:55:56 +0000 (11:55 -0800)]
Import libarchive-3.0.3.

-Errors saving sparse files to pax archives.
-allow archive_*_free(NULL)
-empty contents extracting Zip files with bsdcpio
-truncated filenames in listings

2 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Mon, 16 Jan 2012 19:54:36 +0000 (20:54 +0100)]
bsd-family-tree: Sync with FreeBSD.

2 years agokernel - Fix 3:00 a.m. crashes (deadlocks) related to HAMMER VM use
Matthew Dillon [Mon, 16 Jan 2012 19:33:33 +0000 (11:33 -0800)]
kernel - Fix 3:00 a.m. crashes (deadlocks) related to HAMMER VM use

When memory is low and the pageout daemon needs to write things out we still
need to have at least some reserve to perform the supporting operations for
the pageout.  HAMMER is particularly memory intensive and could get into a
situation where insufficient reserve memory was available, deadlocking the
system.

With these changes DragonFly should run stable on systems with as little
as 256M of ram, and possibly a bit lower.

* The getblk/bread/bwrite/etc brelse/bqrelse sequence used to manage buffers
  had several bugs in it that prevented the low memory handling code from
  operating properly.  The b[q]relse() sequence was not properly detecting
  the low memory condition and freeing or caching the underlying VM pages
  (when possible).

* Also change the low memory test used by the buffer cache from 'severe'
  to 'min' in kern/vfs_bio.c.  We may be able to change this back to 'severe'
  at a later date with further testing.  These tests are in brelse(),
  bqrelse(), and vfs_vmio_release().

* Rewrite bio_page_alloc().  It effectively does the same thing that it did
  before but should operate more smoothly.  We also no longer try to recover
  pages from unrelated buffer cache buffers from this function, which could
  lead to deadlocks.  The warning kprintf is now also rate-limited.

* Add a buffer overload test in the hammer dedup ioctl.  A hammer dedup
  could cause a buffer cache deadlock by allowing too many dirty buffers
  to build up.

* Add a VM memory test to the core hammer flusher code that was previously
  only checking for the UNDO meta-data and buffer overload limits.  This
  is now done on a per-record basis and should prevent HAMMER from allocating
  too much memory during a flusher operation when the VM system is already
  too low on memory.

* Add some vm_wait_nominal() calls in critical I/O paths, but make sure we
  do not use these calls in any I/O path used by the HAMMER pageout code.

  Probably the most important path is the vm_object_page_clean*() code
  path, effectively called via either msync() or via the 30-60 second
  system sync.

* Properly bawrite() a buffer in hammer_vop_write() when IO_ASYNC is set
  (which is used by the pageout daemon), otherwise the pageout daemon will
  not be able to directly recover memory in low memory situations when
  paging to a HAMMER file mapped SHARED/RW.

Testing-by: tuxillo, lentferj, ftigeot, dillon
2 years agohammer - Properly pass -S option to hammer run via remote ssh
Matthew Dillon [Mon, 16 Jan 2012 19:30:22 +0000 (11:30 -0800)]
hammer - Properly pass -S option to hammer run via remote ssh

* Properly pass -S option to hammer run via remote ssh

Reported-by: someone not me, sorry I forgot.
2 years agoumass(4): Remove an unneeded include.
Sascha Wildner [Mon, 16 Jan 2012 19:21:28 +0000 (20:21 +0100)]
umass(4): Remove an unneeded include.

2 years agokern: Update traps, sigbus->sigsegv, cleanup and fixes
John Marino [Mon, 16 Jan 2012 14:56:07 +0000 (15:56 +0100)]
kern: Update traps, sigbus->sigsegv, cleanup and fixes

The primary purpose of this changeset is to change the signal from
bus error to segfault when an attempt to access protected memory is
made.  In the process of doing this, it was noticed that there were
differences between i386 and x86_64 as well as differences between
the actual and virtual kernels.

Several of these differences were addressed.  Extra whitespace was
removed and some syncing between the divergent FreeBSD version was
made.  Some "#if 0" sections were removed.  The virtual kernels were
tested along with the real kernels.  A conservative approach was
taken as there seems to more cruft that could come out.

2 years agortld: add RELRO support
John Marino [Mon, 16 Jan 2012 14:39:15 +0000 (15:39 +0100)]
rtld: add RELRO support

"RELRO" means PLT (partial) or PLT+GOT (full) data is shifted to a
dedicated page by the linker which triggers the dynamic linker to
protect the page by setting the memory to read-only.  This feature
assists in detecting memory corruption and also prevents some types
of buffer overflow exploits.

Until now, this feature was only supported by Linux's glibc.  No BSD
had relro support in their dynamic linker.  I proposed the patch and
it was reviewed by a FreeBSD dynamic linker expert.  Attempts to
access protected data currently results in a bus error signal, but the
next commit will update the kernel trap files to cause the segfault
signal to be emitted instead.

Reviewed-by: Kostik Belousov
2 years agortld: Reorganize reloc_plt and reloc_jmpslots
John Marino [Sat, 14 Jan 2012 15:19:06 +0000 (16:19 +0100)]
rtld: Reorganize reloc_plt and reloc_jmpslots

In the future, more reloc types than just R_$ARCH_JMP_SLOT will be
supported.  FreeBSD already has them and converted to a switch statement
and introduced a new rtld_error message rather than use an ASSERT.
Follow suit and fix a mismatching const as well.

2 years agoMakefile_upgrade.inc: Remove some MLINKS added in 2008 which do now exist.
Sascha Wildner [Mon, 16 Jan 2012 11:15:43 +0000 (12:15 +0100)]
Makefile_upgrade.inc: Remove some MLINKS added in 2008 which do now exist.

2 years agohptiop(4): Sync with FreeBSD.
Sascha Wildner [Mon, 16 Jan 2012 11:11:47 +0000 (12:11 +0100)]
hptiop(4): Sync with FreeBSD.

Set the sense residual properly.

2 years agohptiop(4): Add MODULE_VERSION.
Sascha Wildner [Sun, 15 Jan 2012 11:36:18 +0000 (12:36 +0100)]
hptiop(4): Add MODULE_VERSION.

2 years agohptiop(4): Remove an unused define.
Sascha Wildner [Sat, 14 Jan 2012 22:58:55 +0000 (23:58 +0100)]
hptiop(4): Remove an unused define.

2 years agohptiop(4): Remove an unneeded variable.
Sascha Wildner [Sat, 14 Jan 2012 22:38:26 +0000 (23:38 +0100)]
hptiop(4): Remove an unneeded variable.

device_printf() will already print the unit.

2 years agomsi/msix: Don't allocate MSI/MSI-X if the device does not support any messages
Sepherosa Ziehau [Mon, 16 Jan 2012 10:56:23 +0000 (18:56 +0800)]
msi/msix: Don't allocate MSI/MSI-X if the device does not support any messages

2 years agomsix: Remove MSI-X allocation, step 3/many
Sepherosa Ziehau [Mon, 16 Jan 2012 10:41:49 +0000 (18:41 +0800)]
msix: Remove MSI-X allocation, step 3/many

Add alloc_msix_vector pci method, which allocate one MSI-X at the
specified position on the target CPU

2 years agomsix: Rework MSI-X allocation, step 2/3
Sepherosa Ziehau [Mon, 16 Jan 2012 08:38:36 +0000 (16:38 +0800)]
msix: Rework MSI-X allocation, step 2/3

Add pci_{enable,disable}_msix(), which enable/disable MSI-X globally

2 years agomsix: Rework MSI-X allocation, step 1/3
Sepherosa Ziehau [Mon, 16 Jan 2012 07:10:27 +0000 (15:10 +0800)]
msix: Rework MSI-X allocation, step 1/3

Add pci_{setup,teardown}_msix(), which prepare/cleanup necessary
information for MSI-X allocation operation.

2 years agomsix/pcib: Pass cpuid to {alloc,release}_msix pcib methods
Sepherosa Ziehau [Mon, 16 Jan 2012 05:34:47 +0000 (13:34 +0800)]
msix/pcib: Pass cpuid to {alloc,release}_msix pcib methods

2 years agombuf: Don't raise mbuf limit for jcluster
Sepherosa Ziehau [Mon, 16 Jan 2012 04:06:10 +0000 (12:06 +0800)]
mbuf: Don't raise mbuf limit for jcluster

jcluster's space is shared with normal cluster's space

2 years agombuf: Avoid kmalloc "limit" overflow
Sepherosa Ziehau [Mon, 16 Jan 2012 03:51:54 +0000 (11:51 +0800)]
mbuf: Avoid kmalloc "limit" overflow

Cast stack variable cl_limit and mb_limit to size_t when calculate
the kmalloc limit, so large kern.ipc.nmbclusters will not cause
the calculated value overflow.

2 years agovmstat: ks_limit is size_t not ssize_t
Sepherosa Ziehau [Mon, 16 Jan 2012 03:48:39 +0000 (11:48 +0800)]
vmstat: ks_limit is size_t not ssize_t

2 years agoroute: Add net.route.kmalloc_limit tunable to raise M_RTABLE limit
Sepherosa Ziehau [Mon, 16 Jan 2012 03:11:52 +0000 (11:11 +0800)]
route: Add net.route.kmalloc_limit tunable to raise M_RTABLE limit

2 years agoAdd vfs_accounting to etc/rc.d/Makefile
François Tigeot [Sun, 15 Jan 2012 23:02:35 +0000 (00:02 +0100)]
Add vfs_accounting to etc/rc.d/Makefile

2 years agorc.d: default values for vfs_accounting variables
François Tigeot [Sun, 15 Jan 2012 22:09:27 +0000 (23:09 +0100)]
rc.d: default values for vfs_accounting variables

2 years agorc.d: Add a vfs_accounting script
François Tigeot [Sun, 15 Jan 2012 21:33:08 +0000 (22:33 +0100)]
rc.d: Add a vfs_accounting script

* Its only function for now is to synchronize counters with the real
  disk usage of a list of mount points

* Small rc.conf example:
  vfs_accounting_enable="YES"
  vfs_accounting_sync="/home /mnt/data"

2 years agomake upgrade: Remove some more libarchive manpages.
Sascha Wildner [Sun, 15 Jan 2012 20:38:34 +0000 (21:38 +0100)]
make upgrade: Remove some more libarchive manpages.

2 years agoatphy: Explicitly clear 1000baseT control register for 10/100 only F1 PHY
Sepherosa Ziehau [Sun, 15 Jan 2012 14:04:18 +0000 (22:04 +0800)]
atphy: Explicitly clear 1000baseT control register for 10/100 only F1 PHY

Obtained-from: FreeBSD 221817

  "Explicitly clear 1000baseT control register for F1 PHY used in
   AR8132 FastEthernet controller.  The PHY has no ability to
   establish a gigabit link. Previously only link parters which
   support down-shifting was able to establish link.
   This change should fix a long standing link establishment issue
   of AR8132."

2 years agoatphy: Recognize another F1 PHY
Sepherosa Ziehau [Sun, 15 Jan 2012 13:33:18 +0000 (21:33 +0800)]
atphy: Recognize another F1 PHY

2 years agomiidev: regen
Sepherosa Ziehau [Sun, 15 Jan 2012 13:32:46 +0000 (21:32 +0800)]
miidev: regen

2 years agomiidev: Add PHY ID for Atheros F1 10/100/1000
Sepherosa Ziehau [Sun, 15 Jan 2012 13:32:05 +0000 (21:32 +0800)]
miidev: Add PHY ID for Atheros F1 10/100/1000

2 years agomsi-x: Suffix operation on vectors w/ _vector
Sepherosa Ziehau [Sun, 15 Jan 2012 13:15:53 +0000 (21:15 +0800)]
msi-x: Suffix operation on vectors w/ _vector

2 years agomsi: Don't release MSI-X on MSI releasing path
Sepherosa Ziehau [Sun, 15 Jan 2012 11:59:12 +0000 (19:59 +0800)]
msi: Don't release MSI-X on MSI releasing path

2 years agopci; Remove pci_remap_msix_method declaration; it was nuked
Sepherosa Ziehau [Sun, 15 Jan 2012 11:46:59 +0000 (19:46 +0800)]
pci; Remove pci_remap_msix_method declaration; it was nuked

2 years agortld: Fix TLS inconsistency, cleanups
John Marino [Sat, 14 Jan 2012 13:32:07 +0000 (14:32 +0100)]
rtld: Fix TLS inconsistency, cleanups

Fixes FreeBSD PR kern/160721: TLS is inconsistent
Uses the proper TLS block to calculate the TLS variable address in the
event the TLS data generation was updated.  (FreeBSD SVN 225582)

Also cleaned up a typo and added some parentheses around return
values to sync up with FreeBSD.

2 years agortld: Clang fixes
John Marino [Sat, 14 Jan 2012 12:28:14 +0000 (13:28 +0100)]
rtld: Clang fixes

1) Fix clang warnings
2) Fix r_debug_state function

The r_debug_state function is a hook required for gdb.  Clang will inline
the function, but because it is empty, it won't generate any calls to it.
This results in gdb backtraces being corrupted.  Fixed with the following
hack obtained from FreeBSD SVN 225366.

Fix it by marking the function __noinline, and inserting an empty asm
statement that pretends to clobber memory.  This forces the compiler to
emit calls to the r_debug_state() function throughout rtld.c

2 years agopci: Remove unused MSI remap method
Sepherosa Ziehau [Sat, 14 Jan 2012 12:49:37 +0000 (20:49 +0800)]
pci: Remove unused MSI remap method

2 years agortld: remove broken functionality to build exec. version
John Marino [Sat, 14 Jan 2012 11:38:01 +0000 (12:38 +0100)]
rtld: remove broken functionality to build exec. version

If anyone had tried to build an executable version of the dynamic linker
using the source makefiles, it would have failed.  The i386 version had
bad CFLAGS and the x86_64 was missing the ldscript.  Moreever, as the
gold linker doesn't use ldscripts, it was GNU linker (ld.bfd) specific.

If somebody decides this functionality is still desired, the ldscript
files from FreeBSD (elf_rtld.x) can be imported from FreeBSD likely
without modification.  The now-dummy makefiles were alterated with
similar comments.

2 years agortld: fix some typos
John Marino [Sat, 14 Jan 2012 11:07:49 +0000 (12:07 +0100)]
rtld: fix some typos

2 years agortld: Fix improper sync of map_object.c (17 July 2009)
John Marino [Fri, 13 Jan 2012 20:13:59 +0000 (21:13 +0100)]
rtld: Fix improper sync of map_object.c (17 July 2009)

DragonFly rtld synced FreeBSD commit SVN 195743, but this minor
condition change was missed.