]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd trivial resize handling to gnop(8).
trasz [Sat, 7 Jul 2012 22:22:13 +0000 (22:22 +0000)]
Add trivial resize handling to gnop(8).

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoAdd trivial resize handling to gmountver(8).
trasz [Sat, 7 Jul 2012 22:20:47 +0000 (22:20 +0000)]
Add trivial resize handling to gmountver(8).

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoMake the da(4) driver notify GEOM about LUN size change.
trasz [Sat, 7 Jul 2012 22:19:51 +0000 (22:19 +0000)]
Make the da(4) driver notify GEOM about LUN size change.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoAdd disk_resize(), to make it possible for the disk drivers such as da(4)
trasz [Sat, 7 Jul 2012 21:28:31 +0000 (21:28 +0000)]
Add disk_resize(), to make it possible for the disk drivers such as da(4)
to notify GEOM about LUN size change.

Reviewed by: mav (earlier version)
Sponsored by: FreeBSD Foundation

12 years agoMake it possible to resize md(4) devices.
trasz [Sat, 7 Jul 2012 20:32:21 +0000 (20:32 +0000)]
Make it possible to resize md(4) devices.

Reviewed by: kib
Sponsored by: FreeBSD Foundation

12 years agoChange the interface to the Energy Efficient Ethernet (EEE)
jfv [Sat, 7 Jul 2012 20:21:05 +0000 (20:21 +0000)]
Change the interface to the Energy Efficient Ethernet (EEE)
setting in the igb and em driver. This was necessitated by
a shared code change that I was given late in the game, a data
type changed from bool to int, in the last update I dealt with
it by a cast, but it was pointed out (thanks jhb) that there
was a potential problem with this. John suggested this safer
approach, and it is fine with me...

MFC after:2 days (to catch the 9.1 update)

12 years agoAdd a new GEOM method, resize(), which is called after provider size changes.
trasz [Sat, 7 Jul 2012 20:13:40 +0000 (20:13 +0000)]
Add a new GEOM method, resize(), which is called after provider size changes.
Add a new routine, g_resize_provider(), to use to notify GEOM about provider
change.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoDrop page queues mutex on each iteration of vm_pageout_scan over the
kib [Sat, 7 Jul 2012 19:39:08 +0000 (19:39 +0000)]
Drop page queues mutex on each iteration of vm_pageout_scan over the
inactive queue, unless busy page is found.

Dropping the mutex often should allow the other lock acquires to
proceed without waiting for whole inactive scan to finish. On machines
with lot of physical memory scan often need to iterate a lot before it
finishes or finds a page which requires laundring, causing high
latency for other lock waiters.

Suggested and reviewed by: alc
MFC after: 3 weeks

12 years agoAdd missing sleep stat increase
eadler [Sat, 7 Jul 2012 17:46:11 +0000 (17:46 +0000)]
Add missing sleep stat increase

PR: kern/168211
Submitted by: linimon
Reviewed by: alc
Approved by: cperciva
MFC after: 3 days

12 years agoAdd a description of the Spanish Dvorak keymap added in r235251
eadler [Sat, 7 Jul 2012 17:35:34 +0000 (17:35 +0000)]
Add a description of the Spanish Dvorak keymap added in r235251

PR: conf/160235
Submitted by: gavin
Approved by: cperciva
MFC after: 3 days

12 years agoRemove unneeded variable reported by gcc46 which stopped being used in
eadler [Sat, 7 Jul 2012 17:25:36 +0000 (17:25 +0000)]
Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by: cperciva
MFC after: 3 days

12 years agoRemove variables which are initialized but never used thereafter
eadler [Sat, 7 Jul 2012 17:20:52 +0000 (17:20 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoRemove ancient vnconfig symlink
eadler [Sat, 7 Jul 2012 17:20:27 +0000 (17:20 +0000)]
Remove ancient vnconfig symlink

Submitted by: ak
Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
eadler [Sat, 7 Jul 2012 17:20:24 +0000 (17:20 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
eadler [Sat, 7 Jul 2012 17:17:43 +0000 (17:17 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Reviewed by: scottl
Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
eadler [Sat, 7 Jul 2012 17:13:09 +0000 (17:13 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoFix orphan() methods of several GEOM classes to not assume that there
trasz [Sat, 7 Jul 2012 17:09:44 +0000 (17:09 +0000)]
Fix orphan() methods of several GEOM classes to not assume that there
is an error set on the provider.  With GEOM resizing, class can become
orphaned when it doesn't implement resize() method and the provider size
decreases.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoFix spelling
eadler [Sat, 7 Jul 2012 17:05:55 +0000 (17:05 +0000)]
Fix spelling

PR: bin/167480
Submitted by: zeising
Approved by: cperciva

12 years agoacpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too
avg [Sat, 7 Jul 2012 08:19:34 +0000 (08:19 +0000)]
acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too

although by default only C1 is enabled (cx_lowest=0) and enabling deeper
states goes through acpi_cpu_set_cx_lowest which re-evaluates cpu_non_c3

MFC after: 2 weeks

12 years agoacpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here
avg [Sat, 7 Jul 2012 08:12:51 +0000 (08:12 +0000)]
acpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here

cpu_non_c3 is already evaluated in acpi_cpu_cx_cst and in
acpi_cpu_set_cx_lowest.
Besides acpi_cpu_cx_list is not protected by any locking.

As a result also move setting of cpu_can_deep_sleep to more appropriate
places.

MFC after: 2 weeks

12 years agoacpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration
avg [Sat, 7 Jul 2012 07:59:14 +0000 (07:59 +0000)]
acpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration

cpu_cx_count is an index into accepted states, while i is an index into
original _CST states

MFC after: 1 week

12 years agoImplement ia64_physmem_alloc() and use it consistently to get memory
marcel [Sat, 7 Jul 2012 05:17:43 +0000 (05:17 +0000)]
Implement ia64_physmem_alloc() and use it consistently to get memory
before VM has been initialized. This includes:
1.  Replacing pmap_steal_memory(),
2.  Replace the handcrafted logic to allocate a naturally aligned VHPT,
3.  Properly allocate the DPCPU for the BSP.

Ad 3: Appending the DPCPU to kernend worked as long as we wouldn't
      cross into the next PBVM page. If we were to cross into the next
      page, then there wouldn't be a PTE entry on the page table for it
      and we would end up with a MCA following a page fault. As such,
      this commit fixes MCAs occasionally seen.

12 years agoCreate a generic way to support multiple boards within an
imp [Sat, 7 Jul 2012 05:02:39 +0000 (05:02 +0000)]
Create a generic way to support multiple boards within an
arm platform.  Add all the atmel boards to the ATMEL kernel for
testing purposes.  Until boot loader arg parsing of baord type
is done, this won't actually be able to do the runtime selection.

12 years agoGeneralize this for loading the loader into the SPI. Plus trim about
imp [Sat, 7 Jul 2012 04:55:42 +0000 (04:55 +0000)]
Generalize this for loading the loader into the SPI. Plus trim about
100 bytes from the binary with silly tricks.  Hope to get this small
enough to run on the models that have 4k SRAM.  We are close compiled
for the at91rm9200, but still need to trim for the target.

12 years agoAllow other SOCs to be compiled in, first step.
imp [Sat, 7 Jul 2012 04:51:59 +0000 (04:51 +0000)]
Allow other SOCs to be compiled in, first step.

12 years agoStrip out the useless junk. All we really care about is the text,
imp [Sat, 7 Jul 2012 04:49:53 +0000 (04:49 +0000)]
Strip out the useless junk.  All we really care about is the text,
data and bss sections.  All the rest is needed for normal binaries,
but boot loaders aren't normal.

12 years agoUnbreak building WITH_ICONV=yes and new yacc.
kientzle [Sat, 7 Jul 2012 04:14:28 +0000 (04:14 +0000)]
Unbreak building WITH_ICONV=yes and new yacc.

12 years agoHide the creation of phys_avail behind an API to make it easier to do it
marcel [Sat, 7 Jul 2012 00:25:17 +0000 (00:25 +0000)]
Hide the creation of phys_avail behind an API to make it easier to do it
correctly. We now iterate the EFI memory descriptors once and collect all
the information in a single pass. This includes:
1.  The I/O port base address,
2.  The PAL memory region. Have the physmem API track this.
3.  Memory descriptors of memory we can't use, like bad memory, runtime
    services code & data, etc. Have the physmem API track these.
4.  memory descriptors of memory we can use or re-use, such as free
    memory, boot time services code & data, loader code & data, etc.
    These are added by the physmem API.

Since the PBVM page table and pages are in memory described as loader
data, inform the physmem API of chunks that need to be delated from the
available physical memory.

While here, remove Maxmem and replace it with the better named paddr_max.
Maxmem was defined as physmem, which is generally wrong. Now, paddr_max
is properly defined as the largesty physical address.

The upshot of all this is that:
1.  We properly determine realmem.
2.  We maximize physmem by re-using memory where possible.
3.  We remove complexity from ia64_init() in machdep.c.
4.  Remove confusion about realmem, physmem & Maxmem.

The new ia64_physmem_alloc() is to replace pmap_steal_memory() in pmap.c,
as well as replace the handcrafted allocation of the VHPT for the BSP in
pmap_bootstrap() in pmap.c. This is step 2 and addresses the manipulation
of phys_avail after it is being created.

12 years agoImplement SIOCGIFMEDIA for if_tap(4)
emaste [Fri, 6 Jul 2012 23:17:30 +0000 (23:17 +0000)]
Implement SIOCGIFMEDIA for if_tap(4)

Appease certain if_tap(4) consumers by providing simulated Ethernet
media status.

DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3

Obtained from:  DragonFly BSD

12 years agoRestore the __collate_load_error global that was accidentally removed in the
theraven [Fri, 6 Jul 2012 20:16:22 +0000 (20:16 +0000)]
Restore the __collate_load_error global that was accidentally removed in the
xlocale refactoring.

MFC after: 1 week

12 years agoAdd a source file needed for module linking.
kib [Fri, 6 Jul 2012 20:14:27 +0000 (20:14 +0000)]
Add a source file needed for module linking.

MFC after:   4 days

12 years agoStyle.
kib [Fri, 6 Jul 2012 20:13:16 +0000 (20:13 +0000)]
Style.

Reviewed by: alc (previous version)
MFC after: 1 week

12 years agoUse assembler mnemonic instead of manually assembling, contination for r238142.
kib [Fri, 6 Jul 2012 20:11:58 +0000 (20:11 +0000)]
Use assembler mnemonic instead of manually assembling, contination for r238142.

Reviewed by: jhb
MFC after: 1 month

12 years agoMerge a small update from NetBSD.
pfg [Fri, 6 Jul 2012 19:30:50 +0000 (19:30 +0000)]
Merge a small update from NetBSD.

Feb 15 21:55:23 2009 - chared.c chared.h
pass lint on _LP64.

MFC after: 1 week

12 years agoAllow continuous packet transmission (via -t 0)
emaste [Fri, 6 Jul 2012 17:03:43 +0000 (17:03 +0000)]
Allow continuous packet transmission (via -t 0)

Also add a missing check for the cancel flag while waiting for the first
packet in receive mode.

12 years agoFix issue resizing bin/sh
pfg [Fri, 6 Jul 2012 16:43:56 +0000 (16:43 +0000)]
Fix issue resizing bin/sh

This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .

Reverted changes from NetBSD are:

Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.

Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.

Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous

PR: 169603
Reported by: Peter Jeremy, David Shao
MFC after: 3 days

12 years agoagp.c:
marcel [Fri, 6 Jul 2012 15:57:03 +0000 (15:57 +0000)]
agp.c:
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.

agp_i810.c:
While arguably the use of Maxmem can be considered correct, replace its use
with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which
have a dense physical memory layout. Avoiding Maxmem here is done with an
eye on copy-n-paste behaviour in general and to avoid confusion caused by
using realmem in agp.c and Maxmem in agp_i810.c.

In both cases, remove the inclusion of md_var.h

12 years agoFix typo in the comment.
trasz [Fri, 6 Jul 2012 15:46:38 +0000 (15:46 +0000)]
Fix typo in the comment.

12 years agoAlso report tx bandwidth with Ethernet overhead
emaste [Fri, 6 Jul 2012 15:36:39 +0000 (15:36 +0000)]
Also report tx bandwidth with Ethernet overhead

12 years agor237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers
avg [Fri, 6 Jul 2012 14:45:30 +0000 (14:45 +0000)]
r237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers

To do: proper merge with Illumos vendor area.

Reported by: emaste
Tested by: emaste
Obtained from: Illumos commit 13442:4adbe6de60c8
MFC after: 5 days

12 years agor237748 continuation: segment-override prefixes are not invalid in long mode
avg [Fri, 6 Jul 2012 14:41:02 +0000 (14:41 +0000)]
r237748 continuation: segment-override prefixes are not invalid in long mode

Update DTrace disassembler accordingly.  The code to treat the prefixes
as null prefixes was already in place.
Although in practice compilers seem to generate only cs-prefix for use
in long NOPs, the same treatment is applied to all of cs, ds, es, ss for
consistency.

Reported by: emaste
Tested by: emaste
Obtained from: Illumos commit 13442:4adbe6de60c8 (+ local changes)
MFC after: 5 days

12 years agoAdd support for the 'invept' and 'invvpid' instructions. Beyond simply
jhb [Fri, 6 Jul 2012 14:28:18 +0000 (14:28 +0000)]
Add support for the 'invept' and 'invvpid' instructions.  Beyond simply
adding appropriate table entries, the assembler had to be adjusted as
these are the first non-SSE instructions to use a 3-byte opcode (and a
mandatory prefix to boot).

MFC after: 1 month

12 years agoSeveral fixes to the amd64 disassembler:
jhb [Fri, 6 Jul 2012 14:25:59 +0000 (14:25 +0000)]
Several fixes to the amd64 disassembler:
- Add generic support for opcodes that are escape bytes used for
  multi-byte opcodes (such as the 0x0f prefix).  Use this to replace
  the hard-coded 0x0f special case and add support for three-byte
  opcodes that use the 0x0f38 prefix.
- Decode all Intel VMX instructions.  invept and invvpid in particular are
  three-byte opcodes that use the 0x0f38 escape prefix.
- Rework how the special 'SDEP' size flag works such that the default
  instruction name (i_name) is the instruction when the data size
  prefix (0x66) is not specified, and the alternate name in i_extra is
  used when the prefix is included.
- Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses
  between i_name and i_extra based on the address size prefix (0x67).
  Use this to fix the decoding for jrcxz vs jecxz which is determined
  by the address size prefix, not the operand size prefix.  Also, jcxz
  is not possible in 64-bit mode, but jrcxz is the default instruction
  for that opcode.
- Add support for handling instructions that have a mandatory 'rep'
  prefix (this means not outputting the 'repe ' prefix until determining
  if it is used as part of an opcode).  Make 'pause' less of a special
  case this way.
- Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions
  but with a REX.W prefix.

MFC after: 1 month

12 years agoAllow threads to finish up when terminated by user
emaste [Fri, 6 Jul 2012 13:21:23 +0000 (13:21 +0000)]
Allow threads to finish up when terminated by user

Set a flag and allow worker threads to finish upon ^C, instead of
immediately cancelling them, so that final packet count and rate
stats can be displayed.

12 years agoAdd another PS/2 keyboard PNP ID. This ID is listed as
jhb [Fri, 6 Jul 2012 12:13:28 +0000 (12:13 +0000)]
Add another PS/2 keyboard PNP ID.  This ID is listed as
"Reserved by Microsoft" in the standard PNP ID table, but has been seen
in the wild on at least one laptop.

PR: kern/169571
Submitted by: Matthias Apitz  guru unixarea de
MFC after: 3 days

12 years agoMake pmap_enter()'s management of PV entries consistent with the other pmap
alc [Fri, 6 Jul 2012 06:42:25 +0000 (06:42 +0000)]
Make pmap_enter()'s management of PV entries consistent with the other pmap
functions that manage PV entries.  Specifically, remove the PV entry from
the containing PV list only after the corresponding PTE is destroyed.

Update the pmap's wired mapping count in pmap_enter() before the PV list
lock is acquired.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
alc [Fri, 6 Jul 2012 02:18:49 +0000 (02:18 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tested by: andreast, jhibbits

12 years agoCorrect small regressions pointed out by jhb, thanks John.
jfv [Thu, 5 Jul 2012 23:36:17 +0000 (23:36 +0000)]
Correct small regressions pointed out by jhb, thanks John.

MFC after:5 days

12 years agoUpdate to the ixgbe driver:
jfv [Thu, 5 Jul 2012 20:51:44 +0000 (20:51 +0000)]
Update to the ixgbe driver:
  - Add a couple of new devices
  - Flow control changes in shared and core code
  - Bug fix to Flow Director for 82598
  - Shared code sync to internal with required core change

Thanks to those helping in the testing and improvements to this driver!

MFC after:5 days

12 years agoSync with Intel internal source:
jfv [Thu, 5 Jul 2012 20:26:57 +0000 (20:26 +0000)]
Sync with Intel internal source:
   shared code update and small changes in core required
Add support for new i210/i211 devices
Improve queue calculation based on mac type

MFC after:5 days

12 years agoRemove the "funny targets" make check. We no longer need embedded :: targets
obrien [Thu, 5 Jul 2012 18:23:36 +0000 (18:23 +0000)]
Remove the "funny targets" make check.  We no longer need embedded :: targets
to build FreeBSD (they are used in Perl man pages).  We never needed embedded
"!" in targets that I can find.

We got this from OpenBSD and I cannot find any other make that supports
such things -- contrary to their commit message claim: "This behaviour
is also consistent with other versions of make.".

12 years agoNow that our assembler supports the xsave family of instructions, use them
jhb [Thu, 5 Jul 2012 18:19:35 +0000 (18:19 +0000)]
Now that our assembler supports the xsave family of instructions, use them
natively rather than hand-assembled versions.  For xgetbv/xsetbv, add a
wrapper API to deal with xcr* registers: rxcr() and load_xcr().

Reviewed by: kib
MFC after: 1 month

12 years agoDocument the behavior (from 4.4-lite) that tokens returned by telldir() are
brooks [Thu, 5 Jul 2012 17:02:20 +0000 (17:02 +0000)]
Document the behavior (from 4.4-lite) that tokens returned by telldir() are
single use.

Sponsored by: DARPA, AFRL
MFC after: 3 days

12 years agoFix LINT.
marcel [Thu, 5 Jul 2012 15:23:45 +0000 (15:23 +0000)]
Fix LINT.

Obtained from: Juniper Networks, Inc.

12 years agoCalculate the new PTE value in pmap_enter() before acquiring any locks.
alc [Thu, 5 Jul 2012 07:20:16 +0000 (07:20 +0000)]
Calculate the new PTE value in pmap_enter() before acquiring any locks.

Move an assertion to the beginning of pmap_enter().

12 years agoRestore r211786 by rpaulo:
emaste [Thu, 5 Jul 2012 00:52:23 +0000 (00:52 +0000)]
Restore r211786 by rpaulo:

  Port dtruss to FreeBSD.

  Sponsored by:   The FreeBSD Foundation

It appears the change was reverted by r235380.

12 years agoCorrect an error in r237513. The call to reserve_pv_entries() must come
alc [Thu, 5 Jul 2012 00:08:47 +0000 (00:08 +0000)]
Correct an error in r237513.  The call to reserve_pv_entries() must come
before pmap_demote_pde() updates the PDE.  Otherwise, pmap_pv_demote_pde()
can crash.

Crash reported by: kib
Patch tested by: kib

12 years agoAdd support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
jhb [Wed, 4 Jul 2012 22:12:10 +0000 (22:12 +0000)]
Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
instructions.  I reimplemented this from scratch based on the Intel
manuals and the existing support for handling the fxsave and fxrstor
instructions.  This will let us use these instructions natively with GCC
rather than hardcoding the opcodes in hex.

Reviewed by: kib
MFC after: 1 month

12 years agoUse consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.
tuexen [Wed, 4 Jul 2012 20:59:30 +0000 (20:59 +0000)]
Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.

MFC after: 3 days

12 years agoUse CSUM_SCTP_IPV6 for IPv6.
tuexen [Wed, 4 Jul 2012 20:29:16 +0000 (20:29 +0000)]
Use CSUM_SCTP_IPV6 for IPv6.

MFC after: 3 days

12 years agoMake use of GEOM Gate direct reads feature. This allows HAST to serve
pjd [Wed, 4 Jul 2012 20:20:48 +0000 (20:20 +0000)]
Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
   node, which means secondary node has more recent data and we should read
   from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
   secondary node.

Sponsored by: Panzura, http://www.panzura.com
MFC after: 1 month

12 years agoExtend GEOM Gate class to handle read I/O requests directly within the kernel.
pjd [Wed, 4 Jul 2012 20:16:28 +0000 (20:16 +0000)]
Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.

Sponsored by: Panzura, http://www.panzura.com
MFC after: 1 month

12 years agoPrefer sysctl to open/read/close for obtaining random data.
pjd [Wed, 4 Jul 2012 19:51:25 +0000 (19:51 +0000)]
Prefer sysctl to open/read/close for obtaining random data.
This method is more sandbox-friendly and also should be faster as only
one syscall is needed instead of three.
In case of an error fall back to the old method.

Reviewed by: simon, gleb
MFC after: 2 weeks

12 years agoImprove description of various key used by GELI.
pjd [Wed, 4 Jul 2012 17:59:26 +0000 (17:59 +0000)]
Improve description of various key used by GELI.

PR: docs/169089
Submitted by: John W. O'Brien <john@saltant.com>
MFC after: 3 days

12 years agoUse correct part of the Master-Key for generating encryption keys.
pjd [Wed, 4 Jul 2012 17:54:17 +0000 (17:54 +0000)]
Use correct part of the Master-Key for generating encryption keys.
Before this change the IV-Key was used to generate encryption keys,
which was incorrect, but safe - for the XTS mode this key was unused
anyway and for CBC mode it was used differently to generate IV
vectors, so there is no risk that IV vector collides with encryption
key somehow.

Bump version number and keep compatibility for older versions.

MFC after: 2 weeks

12 years agoCorrect comment.
pjd [Wed, 4 Jul 2012 17:44:39 +0000 (17:44 +0000)]
Correct comment.

MFC after: 3 days

12 years agoCorrect a comment and correct style of a flag check.
pjd [Wed, 4 Jul 2012 17:43:25 +0000 (17:43 +0000)]
Correct a comment and correct style of a flag check.

MFC after: 3 days

12 years agovdev_io_done stage is not used for ioctls.
pjd [Wed, 4 Jul 2012 17:39:29 +0000 (17:39 +0000)]
vdev_io_done stage is not used for ioctls.

MFC after: 1 week

12 years agoFix an obvious typo.
pjd [Wed, 4 Jul 2012 17:36:26 +0000 (17:36 +0000)]
Fix an obvious typo.

MFC after: 3 days

12 years agoThe register_printf_render_std() function expects regular string.
pjd [Wed, 4 Jul 2012 17:35:07 +0000 (17:35 +0000)]
The register_printf_render_std() function expects regular string.
Change argument type from 'const unsigned char *' to 'const char *'.

MFC after: 2 weeks

12 years agoRecognize 'none' or '0' as no flags.
pjd [Wed, 4 Jul 2012 17:31:53 +0000 (17:31 +0000)]
Recognize 'none' or '0' as no flags.

12 years agoDecode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and
jhb [Wed, 4 Jul 2012 16:47:39 +0000 (16:47 +0000)]
Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and
'rdtscp' instructions.

MFC after: 1 month

12 years ago- Change --nthreads parameter to --parallel for GNU compatibility
gabor [Wed, 4 Jul 2012 16:25:11 +0000 (16:25 +0000)]
- Change --nthreads parameter to --parallel for GNU compatibility
- Change default sort method to mergesort, which has a better worst case
  performance than qsort

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>

12 years agoName jails automatically.
des [Wed, 4 Jul 2012 13:37:44 +0000 (13:37 +0000)]
Name jails automatically.

MFC after: 1 week

12 years agoRemove end of line whitespace.
joel [Wed, 4 Jul 2012 10:17:02 +0000 (10:17 +0000)]
Remove end of line whitespace.

12 years agoAdd the possibility to specify a threshold for the number of negative cache
se [Wed, 4 Jul 2012 09:02:12 +0000 (09:02 +0000)]
Add the possibility to specify a threshold for the number of negative cache
results required to have the cache return lookup failure.

A new configuration parameter is introduced, which must be set to a value
greater than 1 to activate this feature. The default behavior is unchanged.

The purpose of this change is to allow probes for the existence of an entry
(which are expected to fail), before that entry is added to one of the
queried databases, without the cache returning the stale information from
the probe query until that cache entry expires. If, for example, a new user
account is created after checking that the new account name is available,
the negative cache entry would prevent immediate access to the account.

For that example, the new configuration option

negative-confidence-threshold passwd 2

will require a second negative query result to consider the negative cache
entry for a passwd entry valid, but if the user account has been created
between the queries, then the positive query result from the second query
will be cached and returned.

12 years agoDocument RO_RTFREE() macro.
glebius [Wed, 4 Jul 2012 07:42:12 +0000 (07:42 +0000)]
Document RO_RTFREE() macro.

12 years agoWhen ip_output()/ip6_output() is supplied a struct route *ro argument,
glebius [Wed, 4 Jul 2012 07:37:53 +0000 (07:37 +0000)]
When ip_output()/ip6_output() is supplied a struct route *ro argument,
it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning
here: it may be supplied to provide route, and it may be supplied to
store and return to caller the route that ip_output()/ip6_output()
finds. In the latter case skipping FLOWTABLE lookup is pessimisation.

The difference between struct route filled by FLOWTABLE and filled
by rtalloc() family is that the former doesn't hold a reference on
its rtentry. Reference is hold by flow entry, and it is about to
be released in future. Thus, route filled by FLOWTABLE shouldn't
be passed to RTFREE() macro.

- Introduce new flag for struct route/route_in6, that marks route
  not holding a reference on rtentry.
- Introduce new macro RO_RTFREE() that cleans up a struct route
  depending on its kind.
- All callers to ip_output()/ip6_output() that do supply non-NULL
  but empty route should use RO_RTFREE() to free results of
  lookup.
- ip_output()/ip6_output() now do FLOWTABLE lookup always when
  ro->ro_rt == NULL.

Tested by: tuexen (SCTP part)

12 years agoIniitialize a variable.
tuexen [Tue, 3 Jul 2012 21:41:19 +0000 (21:41 +0000)]
Iniitialize a variable.

MFC after: 3 days

12 years agoFix style.
trociny [Tue, 3 Jul 2012 19:11:38 +0000 (19:11 +0000)]
Fix style.

MFC after: 3 days

12 years agoFix KASSERT message.
trociny [Tue, 3 Jul 2012 19:08:02 +0000 (19:08 +0000)]
Fix KASSERT message.

MFC after: 3 days

12 years agoDon't check for ifp != NULL before KASSERT, as ifp may not be NULL here
trociny [Tue, 3 Jul 2012 19:04:18 +0000 (19:04 +0000)]
Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here
(it is dereferenced below).

Discussed with: jhb
MFC after: 1 week

12 years agoFix RTTVAR scale in net.inet.tcp.hostcache.list sysctl.
trociny [Tue, 3 Jul 2012 18:59:13 +0000 (18:59 +0000)]
Fix RTTVAR scale in net.inet.tcp.hostcache.list sysctl.

Reviewed by: andre
MFC after: 3 days

12 years agoUpdate comment to reflect function's actual operation
emaste [Tue, 3 Jul 2012 17:50:44 +0000 (17:50 +0000)]
Update comment to reflect function's actual operation

12 years agoAdd new USB device ID.
hselasky [Tue, 3 Jul 2012 16:32:47 +0000 (16:32 +0000)]
Add new USB device ID.

Submitted by: Erich Dollansky
MFC after: 1 week

12 years agoAdd more quirks for USB mass storage adapters.
hselasky [Tue, 3 Jul 2012 16:29:41 +0000 (16:29 +0000)]
Add more quirks for USB mass storage adapters.

Submitted by: Erich Dollansky
MFC after: 1 week

12 years agoFix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
jhb [Tue, 3 Jul 2012 16:12:57 +0000 (16:12 +0000)]
Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver.  As a result, the user pointer
is treated as the buffer length.  mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map.  Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
  otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user.  For now
  it fails any user attempts to use a buffer larger than 1MB.

While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.

MFC after: 3 days

12 years agoDo not include <sys/types.h> in the local headers. The .c files including
obrien [Tue, 3 Jul 2012 15:15:41 +0000 (15:15 +0000)]
Do not include <sys/types.h> in the local headers.  The .c files including
them have already included <sys/param.h> before these headers are included.

12 years agoFix clang warning, introduced in the recent dtrace import.
dim [Tue, 3 Jul 2012 12:08:55 +0000 (12:08 +0000)]
Fix clang warning, introduced in the recent dtrace import.

MFC after:    3 days

12 years ago- Make ipfw's sched rules case insensitive, for user-friendliness.
issyl0 [Tue, 3 Jul 2012 08:42:48 +0000 (08:42 +0000)]
- Make ipfw's sched rules case insensitive, for user-friendliness.
- Add a note to the ipfw(8) man page about the rules no longer being
case sensitive.
- Fix some typos in the man page.

PR: docs/164772
Reviewed by: bz
Approved by: gabor (doc mentor, src committer)
MFC after: 2 weeks

12 years agoFix a typo
kevlo [Tue, 3 Jul 2012 08:03:07 +0000 (08:03 +0000)]
Fix a typo

12 years agoAdd myself to commiters-[doc,ports].dot and calendar.freebsd
zeising [Tue, 3 Jul 2012 07:28:57 +0000 (07:28 +0000)]
Add myself to commiters-[doc,ports].dot and calendar.freebsd

Approved by: joel (doc/www mentor) kwm (ports mentor)

12 years agoLink in the new RX EDMA routines.
adrian [Tue, 3 Jul 2012 07:01:12 +0000 (07:01 +0000)]
Link in the new RX EDMA routines.

12 years agoBegin abstracting out the RX path in preparation for RX EDMA support.
adrian [Tue, 3 Jul 2012 06:59:12 +0000 (06:59 +0000)]
Begin abstracting out the RX path in preparation for RX EDMA support.

The RX EDMA support requires a modified approach to the RX descriptor
handling.

Specifically:

* There's now two RX queues - high and low priority;
* The RX queues are implemented as FIFOs; they're now an array of pointers
  to buffers;
* .. and the RX buffer and descriptor are in the same "buffer", rather than
  being separate.

So to that end, this commit abstracts out most of the RX related functions
from the bulk of the driver.  Notably, the RX DMA/buffer allocation isn't
updated, primarily because I haven't yet fleshed out what it should look
like.

Whilst I'm here, create a set of matching but mostly unimplemented EDMA
stubs.

Tested:

  * AR9280, station mode

TODO:

  * Thorough AP and other mode testing for non-EDMA chips;
  * Figure out how to allocate RX buffers suitable for RX EDMA, including
    correctly setting the mbuf length to compensate for the RX descriptor
    and completion status area.

12 years agoFix inverted test that resulted in incorrect multicast hw programming.
np [Tue, 3 Jul 2012 06:56:11 +0000 (06:56 +0000)]
Fix inverted test that resulted in incorrect multicast hw programming.

12 years agoAdd "hier" as an alternate spelling of "hierarchy" to match hier(9).
obrien [Tue, 3 Jul 2012 06:41:00 +0000 (06:41 +0000)]
Add "hier" as an alternate spelling of "hierarchy" to match hier(9).

12 years agoRevert r222186 per instructions for FreeBSD 10.
obrien [Tue, 3 Jul 2012 05:01:00 +0000 (05:01 +0000)]
Revert r222186 per instructions for FreeBSD 10.
(a 10-CURRENT share/mk is already required to build a 10-CURRENT kernel
 on 9-STABLE)

12 years agoAdd a driver for the Freescale FCM module in the localbus controller.
marcel [Tue, 3 Jul 2012 01:00:29 +0000 (01:00 +0000)]
Add a driver for the Freescale FCM module in the localbus controller.
This driver does not yet handle multiple chip selects properly.

Note that the NAND infrastructure does not perform full page
reads or writes, which means that this driver cannot make use
of the hardware ECC that is otherwise present.

12 years agoSupport lbc interrupts:
marcel [Tue, 3 Jul 2012 00:06:14 +0000 (00:06 +0000)]
Support lbc interrupts:
o   Save and clear the LTESR register in the interrupt handler.
o   In lbc_read_reg(), return the saved LTESR register value if applicable
    (i.e. when the saved value is not invalid (read: ~0U)).
o   In lbc_write_reg(), clear the bits in the saved register when when it's
    written to and when the asved value is not invalid.
o   Also in lbc_write_reg(), the LTESR register is unlocked (in H/W) when
    bit 1 of LTEATR is cleared. We use this to invalidate our saved LTESR
    register value. Subsequent reads and write go to H/W directly.

While here:
o   In lbc_read_reg() & lbc_write_reg(), add some belts and suspenders to
    catch when register offsets are out of range.
o   In lbc_attach(), initialize completely and don't leave something left
    for lbc_banks_enable().

12 years agoSimplify simplebus_setup_intr and don't call MD code directly. We can
marcel [Mon, 2 Jul 2012 23:53:08 +0000 (23:53 +0000)]
Simplify simplebus_setup_intr and don't call MD code directly. We can
(and have to) trust our parent to handle interrupt configuration.