]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoSpeed up pmcstat by improving string hash
emaste [Fri, 16 May 2014 03:05:53 +0000 (03:05 +0000)]
Speed up pmcstat by improving string hash

In one case generating callgraph output from a 24MB system-wide sampling
data file took 17.4 seconds on average.  Profiling showed pmcstat
spending a lot of time in strcmp, due to hash collisions.

Replacing the XOR-only hash with FNV-1a reduces the run time for my
test by 40%.

10 years agoReview pass through jail.8
bjk [Fri, 16 May 2014 01:50:04 +0000 (01:50 +0000)]
Review pass through jail.8

Replace usage of "prison" with "jail", since that term has mostly dropped
out of use.  Note once at the beginning that the "prison" term is equivalent,
but do not use it otherwise. [1]

Some grammar issues.

Some mdoc formatting fixes.

Consistently use \(em for em dashes, with spaces around it.

Avoid contractions.

Prefer ssh to telnet.

PR: docs/176832 [1]
Approved by: hrs (mentor)

10 years agoRemove the function tcp_twrecycleable; it has been #if 0'd for
silby [Fri, 16 May 2014 01:38:38 +0000 (01:38 +0000)]
Remove the function tcp_twrecycleable; it has been #if 0'd for
eight years.  The original concept was to improve the
corner case where you run out of ephemeral ports, but it
was causing performance problems and the mechanism
of limiting the number of time_wait sockets serves
the same purpose in the end.

Reviewed by: bz

10 years agoRemove some prototypes for undefined functions.
markj [Thu, 15 May 2014 21:19:13 +0000 (21:19 +0000)]
Remove some prototypes for undefined functions.

MFC after: 3 days

10 years agoldns_axfr_abort is apparently an undocumented API function. Unstaticize
des [Thu, 15 May 2014 20:41:16 +0000 (20:41 +0000)]
ldns_axfr_abort is apparently an undocumented API function.  Unstaticize
and add a prototype + documentation to the relevant header.

10 years agoregenerate
des [Thu, 15 May 2014 19:48:52 +0000 (19:48 +0000)]
regenerate

10 years agodiff reduction
des [Thu, 15 May 2014 19:48:13 +0000 (19:48 +0000)]
diff reduction

10 years ago- Do not override sin6_scope_id in LLA when it is already set to non-zero.
hrs [Thu, 15 May 2014 19:26:20 +0000 (19:26 +0000)]
- Do not override sin6_scope_id in LLA when it is already set to non-zero.
  This fixes destination list in output of netstat -r.
- Plug a memory leak.
- Add RTM_VERSION check.
- Minor style fixes.

10 years agoMFuser/marcel/mkimg:
marcel [Thu, 15 May 2014 19:19:57 +0000 (19:19 +0000)]
MFuser/marcel/mkimg:
Add support for different output formats:
1.  The output file that was previously written is now called the raw format.
2.  Add the vmdk output format to create VMDK images.

When the format is not given, the raw output format is assumed.

10 years agoUpgrade the default callchain depth
gnn [Thu, 15 May 2014 18:53:02 +0000 (18:53 +0000)]
Upgrade the default callchain depth

MFC after: 2 weeks

10 years agomake a note that FNBUFF cannot overflow as long as LNBUFF is smaller..
jmg [Thu, 15 May 2014 18:51:01 +0000 (18:51 +0000)]
make a note that FNBUFF cannot overflow as long as LNBUFF is smaller..

MFC after: 2 weeks

10 years agoUpdate the amount of data we can collect for hwpmc(4) by default
gnn [Thu, 15 May 2014 18:46:16 +0000 (18:46 +0000)]
Update the amount of data we can collect for hwpmc(4) by default
to work with modern processors and available memory.

Submitted by: Julien Charbon
MFC after: 2 weeks

10 years agoRemove unused variable.
trasz [Thu, 15 May 2014 18:34:31 +0000 (18:34 +0000)]
Remove unused variable.

10 years agoExtend the size of the function or symbol that can be annotated.
gnn [Thu, 15 May 2014 18:12:47 +0000 (18:12 +0000)]
Extend the size of the function or symbol that can be annotated.

MFC after: 2 weeks

10 years agoRemove documention of WITHOUT_NCURSES removed in r266157.
brooks [Thu, 15 May 2014 16:51:45 +0000 (16:51 +0000)]
Remove documention of WITHOUT_NCURSES removed in r266157.

Remove a bit of whitespace from WITHOUT_BINUTILS.

Catch up with a bunch of other commits to tools/build/options that
weren't merged to src.conf.5.

10 years agoRevert r261296. This removes the WITHOUT_NCURSESW option.
brooks [Thu, 15 May 2014 16:44:25 +0000 (16:44 +0000)]
Revert r261296.  This removes the WITHOUT_NCURSESW option.

It was the wrong direction.  We will instead remove use of the
non-wide-character supporting libncurses.

10 years agoBump FreeBSD_version for src.opts.mk changes (about a week late).
imp [Thu, 15 May 2014 15:50:37 +0000 (15:50 +0000)]
Bump FreeBSD_version for src.opts.mk changes (about a week late).

10 years agoMFV: re-add svn:mime-type where needed
des [Thu, 15 May 2014 15:49:16 +0000 (15:49 +0000)]
MFV: re-add svn:mime-type where needed

10 years agoMFV: re-add svn:mime-type where needed
des [Thu, 15 May 2014 15:49:12 +0000 (15:49 +0000)]
MFV: re-add svn:mime-type where needed

10 years agoMakefile.inc is also included by the tests subdirectory, which results
imp [Thu, 15 May 2014 15:45:45 +0000 (15:45 +0000)]
Makefile.inc is also included by the tests subdirectory, which results
in SUBDIRS having tests added to it, which fails. Work around this by
checking to make sure tests exists before adding it to subdirs and
work to get the generated file fixed so we can rename Makefile.inc to
something else so it isn't automatically included by subdirs...

10 years agoMFV: nuke autprops
des [Thu, 15 May 2014 15:28:49 +0000 (15:28 +0000)]
MFV: nuke autprops

10 years agoMFV: nuke autprops
des [Thu, 15 May 2014 15:28:43 +0000 (15:28 +0000)]
MFV: nuke autprops

10 years agoRemove dead files.
des [Thu, 15 May 2014 15:22:32 +0000 (15:22 +0000)]
Remove dead files.

10 years agoCompile on x86 (ILP32).
marcel [Thu, 15 May 2014 15:20:43 +0000 (15:20 +0000)]
Compile on x86 (ILP32).

10 years agooea64 uses 4k pages, too.
jhibbits [Thu, 15 May 2014 15:17:44 +0000 (15:17 +0000)]
oea64 uses 4k pages, too.

MFC after: 1 week
X-MFC-with: r266116

10 years agoMention -f vmdk and the VMDK output format in the example section.
marcel [Thu, 15 May 2014 15:14:37 +0000 (15:14 +0000)]
Mention -f vmdk and the VMDK output format in the example section.

10 years agoReplace unchecked calls to write(2) and lseek(2) with calls to
marcel [Thu, 15 May 2014 14:48:25 +0000 (14:48 +0000)]
Replace unchecked calls to write(2) and lseek(2) with calls to
sparse_write() and make sure to check for errors. In particular,
lseek(2) may not be possible (e.g. the output file is stdout)
and sparse_write(2) will do what is optimal (i.e. use lseek(2)
when possible).

10 years agoGive sparse_write() the same prototype as write(2) as it's supposed to
marcel [Thu, 15 May 2014 14:37:35 +0000 (14:37 +0000)]
Give sparse_write() the same prototype as write(2) as it's supposed to
be a drop-in replacement.

10 years agoImplement a PCI interrupt router to route PCI legacy INTx interrupts to
jhb [Thu, 15 May 2014 14:16:55 +0000 (14:16 +0000)]
Implement a PCI interrupt router to route PCI legacy INTx interrupts to
the legacy 8259A PICs.
- Implement an ICH-comptabile PCI interrupt router on the lpc device with
  8 steerable pins configured via config space access to byte-wide
  registers at 0x60-63 and 0x68-6b.
- For each configured PCI INTx interrupt, route it to both an I/O APIC
  pin and a PCI interrupt router pin.  When a PCI INTx interrupt is
  asserted, ensure that both pins are asserted.
- Provide an initial routing of PCI interrupt router (PIRQ) pins to
  8259A pins (ISA IRQs) and initialize the interrupt line config register
  for the corresponding PCI function with the ISA IRQ as this matches
  existing hardware.
- Add a global _PIC method for OSPM to select the desired interrupt routing
  configuration.
- Update the _PRT methods for PCI bridges to provide both APIC and legacy
  PRT tables and return the appropriate table based on the configured
  routing configuration.  Note that if the lpc device is not configured, no
  routing information is provided.
- When the lpc device is enabled, provide ACPI PCI link devices corresponding
  to each PIRQ pin.
- Add a VMM ioctl to adjust the trigger mode (edge vs level) for 8259A
  pins via the ELCR.
- Mark the power management SCI as level triggered.
- Don't hardcode the number of elements in Packages in the source for
  the DSDT.  iasl(8) will fill in the actual number of elements, and
  this makes it simpler to generate a Package with a variable number of
  elements.

Reviewed by: tycho

10 years agoCheck allocation errors and free memory we allocated.
marcel [Thu, 15 May 2014 14:01:34 +0000 (14:01 +0000)]
Check allocation errors and free memory we allocated.

10 years agoAdd the missing coma
bapt [Thu, 15 May 2014 11:30:17 +0000 (11:30 +0000)]
Add the missing coma

10 years agoAdd project name to the arc config it is still required when arcanist is used with SVN
bapt [Thu, 15 May 2014 11:21:38 +0000 (11:21 +0000)]
Add project name to the arc config it is still required when arcanist is used with SVN

10 years agoFix return value. Should be logic one or zero.
br [Thu, 15 May 2014 10:06:59 +0000 (10:06 +0000)]
Fix return value. Should be logic one or zero.

10 years agounits(1): Fix minor typos
eadler [Thu, 15 May 2014 05:35:00 +0000 (05:35 +0000)]
units(1): Fix minor typos

Obtained From: DragonflyBSD

10 years agoA page mask size is 12-bits, not 11.
jhibbits [Thu, 15 May 2014 04:18:06 +0000 (04:18 +0000)]
A page mask size is 12-bits, not 11.

MFC after: 1 week

10 years agoAdd a new target cscope-hook.
rpaulo [Thu, 15 May 2014 03:47:52 +0000 (03:47 +0000)]
Add a new target cscope-hook.

This adds a Mercurial hook to automatically update the cscope data base every
time you pull, switch branch, or update.

10 years agoUpgrade to latest ldns (1.6.17) and unbound (1.4.22).
des [Thu, 15 May 2014 03:30:03 +0000 (03:30 +0000)]
Upgrade to latest ldns (1.6.17) and unbound (1.4.22).

MFC after: 3 weeks

10 years agoAs it appears the image must be rounded to the nearest megabyte,
marcel [Thu, 15 May 2014 03:18:22 +0000 (03:18 +0000)]
As it appears the image must be rounded to the nearest megabyte,

10 years agoFix typo. Note that although this file is under contrib, it has diverged
gavin [Thu, 15 May 2014 03:08:20 +0000 (03:08 +0000)]
Fix typo.  Note that although this file is under contrib, it has diverged
sufficiently from upstream (including a full whitespace commit and large
portions rewritten) that this change does not move us further from the
upstream.

PR: docs/186608
Submitted by: Jamie Landeg-Jones <jamie@dyslexicfish.net>
MFC after: 3 days

10 years agoFix the "disks" variable reuse.
roberto [Thu, 15 May 2014 02:37:59 +0000 (02:37 +0000)]
Fix the "disks" variable reuse.

It starts off being used to track the grammar for the number of disks
(singular vs plural) and then it is reused as the list of available disks.

Replace the variable with disks_grammar and move 'disk' and 'disks' to
msg_ vars so they can be translated in the future.

Submitted by: Allan Jude <freebsd@allanjude.com>
Reviewed by: roberto
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

10 years agoUpdates to the datasets created by zfsboot.
roberto [Thu, 15 May 2014 02:31:02 +0000 (02:31 +0000)]
Updates to the datasets created by zfsboot.

Set compress=lz4 for the entire pool, removing it from the individual
datasets

Remove exec=no from /usr/src, breaks the test suite.

Submitted by: Allan Jude <freebsd@allanjude.com>
Reviewed by: roberto
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

10 years agoHere is a patch for the bsdinstall root-on-zfs stuff that adds optional
roberto [Thu, 15 May 2014 02:27:10 +0000 (02:27 +0000)]
Here is a patch for the bsdinstall root-on-zfs stuff that adds optional
encryption for swap, and optional gmirror for swap (which can be combined)

Submitted by: Allan Jude <freebsd@allanjude.com>
Requested By: roberto
Sponsored By: ScaleEngine Inc.
MFC after: 2 weeks

10 years agoUndo changes to the generated Makefile. Move tests directory to proper
imp [Thu, 15 May 2014 01:27:24 +0000 (01:27 +0000)]
Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

10 years agoUpdate dis_tables.c to the latest Illumos version.
grehan [Thu, 15 May 2014 01:06:27 +0000 (01:06 +0000)]
Update dis_tables.c to the latest Illumos version.

This includes decodes of recent Intel instructions, in particular
VT-x and related instructions. This allows the FBT provider to
locate the exit points of routines that include these new
instructions.

Illumos issues:
 3414 Need a new word of AT_SUN_HWCAP bits
 3415 Add isainfo support for f16c and rdrand
 3416 Need disassembler support for rdrand and f16c
 3413 isainfo -v overflows 80 columns
 3417 mdb disassembler confuses rdtscp for invlpg
 1518 dis should support AMD SVM/AMD-V/Pacifica instructions
 1096 i386 disassembler should understand complex nops
 1362 add kvmstat for monitoring of KVM statistics
 1363 add vmregs[] variable to DTrace
 1364 need disassembler support for VMX instructions
 1365 mdb needs 16-bit disassembler support

This corresponds to Illumos-gate (github) version
eb23829ff08a873c612ac45d191d559394b4b408

Reviewed by: markj
MFC after: 1 week

10 years agoHave the format resize twice. The first time is before we call
marcel [Thu, 15 May 2014 00:48:05 +0000 (00:48 +0000)]
Have the format resize twice. The first time is before we call
scheme_write(). The second time is immediately before we call
the format's write function. The first call is needed to have
the scheme know the right image size. The second call is needed
to compensate for the scheme adjusting the size while writing.

10 years agoCommit rough but working code:
marcel [Thu, 15 May 2014 00:24:49 +0000 (00:24 +0000)]
Commit rough but working code:
o   The VMDK image can be queried and comverted by qemu-img
o   VMware Fusion finds no errors when recovering using
    'vmware-vdiskmanager -R' and the disk can be added to any
    vortual machine.

10 years agoIncrease the TSS limit by one byte. The processor requires an additional byte
neel [Wed, 14 May 2014 22:24:09 +0000 (22:24 +0000)]
Increase the TSS limit by one byte. The processor requires an additional byte
with all bits set to 1 beyond the I/O permission bitmap.

Prior to this change accessing I/O ports [0xFFF8-0xFFFF] would trigger a
#GP fault even though the I/O bitmap allowed access to those ports.

For more details see section "I/O Permission Bit Map" in the Intel SDM, Vol 1.

Reviewed by: kib

10 years agogpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.
loos [Wed, 14 May 2014 21:54:14 +0000 (21:54 +0000)]
gpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.

10 years agoConnect vt.4 to the build.
wblock [Wed, 14 May 2014 21:45:16 +0000 (21:45 +0000)]
Connect vt.4 to the build.

Reviewed by: emaste

10 years agoGive suitably-endowed ARMs a register similar to the x86 TSC register.
markm [Wed, 14 May 2014 19:11:15 +0000 (19:11 +0000)]
Give suitably-endowed ARMs a register similar to the x86 TSC register.

Here, "suitably endowed" means that the System Control Coprocessor
(#15) has Performance Monitoring Registers, including a CCNT (Cycle
Count) register.

The CCNT register is used in a way similar to the TSC register in
x86 processors by the get_cyclecount(9) function. The entropy-harvesting
thread is a heavy user of this function, and will benefit from not
having to call binuptime(9) instead.

One problem with the CCNT register is that it is 32-bit only, so
the upper 32-bits of the returned number are always 0. The entropy
harvester does not care, but in case any one else does, follow-up
work may include an interrup trap to increment an upper-32-bit
counter on CCNT overflow.

Another problem is that the CCNT register is not readable in user-mode
code; in can be made readable by userland, but then it is also
writable, and so is a good chunk of the PMU system. For that reason,
the CCNT is not enabled for user-mode access in this commit.

Like the x86, there is one CCNT per core, so they don't all run in
perfect sync.

Reviewed by: ian@ (an earlier version)
Tested by: ian@ (same earlier version)
Committed from: WANDBOARD-QUAD

10 years agoBind ip/tcp/udp provider translators and symbols to the same versions as in
markj [Wed, 14 May 2014 19:02:00 +0000 (19:02 +0000)]
Bind ip/tcp/udp provider translators and symbols to the same versions as in
illumos, rather than using "1.0" everywhere.

Some of the translators use D functions that are not present in version
1.0 (e.g. inet_ntoa()) which can result in libdtrace crashing when running
scripts that restrict themselves to version 1.0
(e.g. with "-x version=1.0").

MFC after: 1 week

10 years agoimport unbound 1.4.22
des [Wed, 14 May 2014 18:44:22 +0000 (18:44 +0000)]
import unbound 1.4.22

10 years agoimport unbound 1.4.21
des [Wed, 14 May 2014 18:43:20 +0000 (18:43 +0000)]
import unbound 1.4.21

10 years agoMove old fmake tests into bmake and hook them to the build.
jmmv [Wed, 14 May 2014 18:43:13 +0000 (18:43 +0000)]
Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs.  Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet.  In the interim, just put them under usr.bin/bmake/
while we sort things out.  The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

10 years agoimport ldns 1.6.17
des [Wed, 14 May 2014 18:41:34 +0000 (18:41 +0000)]
import ldns 1.6.17

10 years agoUse the new -d option that was added to tblgen between llvm/clang 3.3
dim [Wed, 14 May 2014 17:11:57 +0000 (17:11 +0000)]
Use the new -d option that was added to tblgen between llvm/clang 3.3
and 3.4 to generate dependency files for the '.inc.h' files generated
from .td files, and .sinclude those dependency files in clang.build.mk.

This will make future incremental builds of lib/clang and usr.bin/clang
work correctly, whenever any of the .td files get modified.

Note that this will not fix any problems with incremental builds from
*before* this revision, since there will not yet be any generated
dependency files.  A quick workaround is to run the following:

  find /usr/obj -type f -name '*.inc.h' | xargs rm

and then a regular incremental buildworld (e.g. with -DNO_CLEAN).

MFC after: 3 days

10 years agoImplement USB device side driver code for SAF1761 and compatible
hselasky [Wed, 14 May 2014 17:04:02 +0000 (17:04 +0000)]
Implement USB device side driver code for SAF1761 and compatible
chips, based on datasheet and existing USS820 DCI driver. This code is
not yet tested.

Sponsored by: DARPA, AFRL

10 years agoGive output formats a chance to (re-)size the image before the
marcel [Wed, 14 May 2014 15:46:07 +0000 (15:46 +0000)]
Give output formats a chance to (re-)size the image before the
scheme adds the partitioning metadata. This is needed by VMDK
to round the image size to the grain size.

10 years agoDocument r265995, Blowfish crypt(3) format change.
gjb [Wed, 14 May 2014 15:31:18 +0000 (15:31 +0000)]
Document r265995, Blowfish crypt(3) format change.

Sponsored by: The FreeBSD Foundation

10 years agoDocument r265876, power management bug with Intel Turbo Boost.
gjb [Wed, 14 May 2014 15:31:16 +0000 (15:31 +0000)]
Document r265876, power management bug with Intel Turbo Boost.

Sponsored by: The FreeBSD Foundation

10 years agoFix typo.
br [Wed, 14 May 2014 14:19:57 +0000 (14:19 +0000)]
Fix typo.

10 years agoDisable configuration of the host frame interval register until
hselasky [Wed, 14 May 2014 11:32:15 +0000 (11:32 +0000)]
Disable configuration of the host frame interval register until
further, hence it breaks USB support on some non-RPI platforms.

10 years agoMake sure the USB audio driver is loaded last. This is important when
hselasky [Wed, 14 May 2014 11:25:59 +0000 (11:25 +0000)]
Make sure the USB audio driver is loaded last. This is important when
built as part of a kernel module to prevent panics when the USB audio
driver kernel module is unloaded.

Suggested by: marius @
MFC after: 1 week

10 years agoRemove extra newlines.
ray [Wed, 14 May 2014 11:15:48 +0000 (11:15 +0000)]
Remove extra newlines.
No functional changes.

Sponsored by: The FreeBSD Foundation

10 years agoInitialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.
trasz [Wed, 14 May 2014 09:03:02 +0000 (09:03 +0000)]
Initialize loginclass mutex using MTX_SYSINIT instead of using SI_SUB_CPU.

Suggested by: rwatson@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

10 years agoChange the USB audio kernel module linking order, so that the USB
hselasky [Wed, 14 May 2014 07:33:06 +0000 (07:33 +0000)]
Change the USB audio kernel module linking order, so that the USB
audio device driver is detached first and not its children. This fixes
a panic in some cases when unloading "snd_uaudio" while a USB device
is plugged. The linking order affects the order in which the module
dependencies are registered.

MFC after: 1 week

10 years agoSwitch using the new $2b$ format by default, when bcrypt is used.
delphij [Wed, 14 May 2014 00:50:31 +0000 (00:50 +0000)]
Switch using the new $2b$ format by default, when bcrypt is used.

MFC after: 2 weeks
Relnotes: default Blowfish crypt(3) format have been changed to $2b$.

10 years agoFix OpenSSL NULL pointer deference vulnerability.
delphij [Tue, 13 May 2014 23:17:24 +0000 (23:17 +0000)]
Fix OpenSSL NULL pointer deference vulnerability.

Obtained from: OpenBSD
Security: FreeBSD-SA-14:09.openssl
Security: CVE-2014-0198

10 years agoMFV of 265975, tzdata2014c
edwin [Tue, 13 May 2014 21:25:59 +0000 (21:25 +0000)]
MFV of 265975, tzdata2014c

- Egypt will go into DST on 15 May 2014

10 years agoprintf: Fix missing arguments for %u/%o/%x/%X after r265592.
jilles [Tue, 13 May 2014 21:24:55 +0000 (21:24 +0000)]
printf: Fix missing arguments for %u/%o/%x/%X after r265592.

If a numeric argument is missing, zero should be assumed, for signed as well
as unsigned conversions.

This fixes the 'zero' regression tests.

r265592 erroneously reverted r244407.

10 years agoDon't include the guest memory segments in the bhyve(8) process core dump.
neel [Tue, 13 May 2014 16:40:27 +0000 (16:40 +0000)]
Don't include the guest memory segments in the bhyve(8) process core dump.
This has not added a lot of value when debugging bhyve issues while greatly
increasing the time and space required to store the core file.

Passing the "-C" option to bhyve(8) will change the default and dump guest
memory in the core dump.

Requested by: grehan
Reviewed by: grehan

10 years agoAdd mention of metadata version 7 in FreeBSD 10.0
thomas [Tue, 13 May 2014 15:46:52 +0000 (15:46 +0000)]
Add mention of metadata version 7 in FreeBSD 10.0

Reviewed by: pjd
MFC after: 1 day

10 years ago- Isochronous transfers should use the alternate next transfer
hselasky [Tue, 13 May 2014 13:46:38 +0000 (13:46 +0000)]
- Isochronous transfers should use the alternate next transfer
descriptor upon receiving a short packet, in host and device mode.
- Correct some comments.

10 years agoOn a fork allow read-only wired pages to be copy-on-write shared between the
alc [Tue, 13 May 2014 13:20:23 +0000 (13:20 +0000)]
On a fork allow read-only wired pages to be copy-on-write shared between the
parent and child processes.  Previously, we copied these pages even though
they are read only.  However, the reason for copying them is historical and
no longer exists.  In recent times, vm_map_protect() has developed the
ability to copy pages when write access is added to wired copy-on-write
pages.  So, in this case, copy-on-write sharing of wired pages is not to be
feared.  It is not going to lead to copy-on-write faults on wired memory.

Reviewed by: kib
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

10 years agoDisable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
yongari [Tue, 13 May 2014 05:19:29 +0000 (05:19 +0000)]
Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
Previously only TX IP checksum offloading was disabled but it's
reported that TX checksum offloading for UDP datagrams with IP
options also generates corrupted frames.  Reporter's controller is
RTL8168CP but I guess RTL8168C also have the same issue since it
shall share the same core.

Reported and tested by: tuexen

10 years agoFix checksum computation. Previously it didn't include carry.
yongari [Tue, 13 May 2014 05:07:03 +0000 (05:07 +0000)]
Fix checksum computation.  Previously it didn't include carry.

Reviewed by: tuexen

10 years agoabort(3) the process in response to a VMEXIT_ABORT. This usually happens in
neel [Mon, 12 May 2014 23:35:10 +0000 (23:35 +0000)]
abort(3) the process in response to a VMEXIT_ABORT. This usually happens in
response to an unhandled VM exit or an unexpected error so a core is useful.

Remove unused macro VMEXIT_SWITCH.

Reviewed by: grehan

10 years agoFix delete-old when WITH_TESTS is set.
jmmv [Mon, 12 May 2014 21:21:32 +0000 (21:21 +0000)]
Fix delete-old when WITH_TESTS is set.

r265423 removed the WITHOUT_BMAKE option, which in turn broke a conditional
in OptionalObsoleteFiles.inc that inspected MK_BMAKE.

10 years agoBe even more paranoid about overflow.
truckman [Mon, 12 May 2014 20:22:42 +0000 (20:22 +0000)]
Be even more paranoid about overflow.

Requested by: ache

10 years agoUpdate terminal sizes in any case when new vt(4) driver arrive.
ray [Mon, 12 May 2014 19:29:38 +0000 (19:29 +0000)]
Update terminal sizes in any case when new vt(4) driver arrive.
(Plus remove one unused newline)

Sponsored by: The FreeBSD Foundation

10 years ago(NANO_CONFIG): New variable containing path of config file, so that
thomas [Mon, 12 May 2014 19:11:39 +0000 (19:11 +0000)]
(NANO_CONFIG): New variable containing path of config file, so that
the configuration can reference additional files relative to its own
location.

(NANO_MODULES): If set to "default", install all built modules.

Reviewed by: imp
MFC after: 1 week

10 years agoUpgrade our copy of llvm/clang to 3.4.1 release. This release contains
dim [Mon, 12 May 2014 18:45:56 +0000 (18:45 +0000)]
Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after: 2 weeks

10 years agoBump copyright date
skreuzer [Mon, 12 May 2014 17:58:17 +0000 (17:58 +0000)]
Bump copyright date

Approved by: hrs@ (mentor)

10 years agoNuke a couple of unnecessary assigments. Nothing uses the values of rstart
truckman [Mon, 12 May 2014 17:56:52 +0000 (17:56 +0000)]
Nuke a couple of unnecessary assigments.  Nothing uses the values of rstart
and rend after this point.

MFC after: 1 week

10 years agoBuild modules in parallel. This has been tested by several people at
ian [Mon, 12 May 2014 13:33:12 +0000 (13:33 +0000)]
Build modules in parallel.  This has been tested by several people at
various -j levels from 6 to 48 without problems.

10 years agoCleanup some style nits.
ian [Mon, 12 May 2014 13:08:37 +0000 (13:08 +0000)]
Cleanup some style nits.

10 years agoInterrupts need to be disabled on entry to cpu_sleep() for ARM. Given
ian [Mon, 12 May 2014 13:05:03 +0000 (13:05 +0000)]
Interrupts need to be disabled on entry to cpu_sleep() for ARM.  Given
that and the need to be in a critical section when switching to idleclock
mode for event timers, use spinlock_enter()/exit() to achieve both needs.

The ARM WFI (wait for interrupt) instruction blocks until an interrupt is
asserted, and it will unblock even if interrupts are masked, and it will
unblock immediately if an interrupt is already pending.  It is necessary
to execute it with interrupts disabled, otherwise the interrupt that
should unblock it may occur and be serviced just prior to executing the
instruction.  At that point the system is inappropriately asleep until
the next timer tick or some other random interrupt happens.

In general, interrupts need to be disabled continuously from the time the
decision is made that there is no work to be done and sleeping is needed
until actually going to sleep, to avoid a race where handling a new
interrupt changes the basis for deciding there is no work to be done.

Submitted by: hps@ (in slightly different form)

10 years agoDisable TX checksum offload for UDP-Lite completely. It wasn't used for
tuexen [Mon, 12 May 2014 09:46:48 +0000 (09:46 +0000)]
Disable TX checksum offload for UDP-Lite completely. It wasn't used for
partial checksum coverage, but even for full checksum coverage it doesn't
work.
This was discussed with Kevin Lo (kevlo@).

10 years agoCreate driver file templates, kernel module Makefile and add initial
hselasky [Mon, 12 May 2014 09:05:07 +0000 (09:05 +0000)]
Create driver file templates, kernel module Makefile and add initial
version of register definitions for ISP1761 and SAF1761 compatible
chips.

Sponsored by: DARPA, AFRL

10 years agounits(1): call el_end()
eadler [Mon, 12 May 2014 07:14:09 +0000 (07:14 +0000)]
units(1): call el_end()

Add missing el_end() call

10 years agounits(1): unbreak -f option, fix some style, increase compatibility.
eadler [Mon, 12 May 2014 06:14:14 +0000 (06:14 +0000)]
units(1): unbreak -f option, fix some style, increase compatibility.

- Unbreak the -f option: it was missing a ':'
- gunits -V spits out more information than just its version: attempt to do so
  as well.

10 years agounits(1): use common functions
eadler [Mon, 12 May 2014 05:44:55 +0000 (05:44 +0000)]
units(1): use common functions

No need to replicate strdup

10 years agoRepair some races in IPI handling:
nwhitehorn [Mon, 12 May 2014 02:56:27 +0000 (02:56 +0000)]
Repair some races in IPI handling:
1. Make sure IPI mask is set before sending the IPI
2. Operate atomically on PS3 PIC outstanding interrupt list
3. Make sure IPIs are EOI'ed before, not after, processing. Without this,
   a second IPI could be sent partway through processing the first one,
   get erroneously acknowledge by the EOI to the first, and be lost. In
   particular in the case of smp_rendezvous(), this can be fatal.

In combination, this makes the PS3 boot SMP again. It probably also fixes
some latent bugs elsewhere.

MFC after: 2 weeks

10 years agos/JIRA/Jenkins/g in comments. I was confused.
imp [Mon, 12 May 2014 01:47:45 +0000 (01:47 +0000)]
s/JIRA/Jenkins/g in comments. I was confused.

10 years agoAttempt to walk a fine line between current usage (/usr/ports which
imp [Sun, 11 May 2014 23:22:32 +0000 (23:22 +0000)]
Attempt to walk a fine line between current usage (/usr/ports which
does an out-of-tree build without setting MAKESYSPATH) and recently
added requirements (JIRA's building the modules in a non-standard
layout). So, when MAKESYSPATH is defined, trust that it will do the
right thing (to catch the JIRA use case). When it isn't defined,
assume a standard FreeBSD tree and reach over to grab bsd.mkopt.mk (to
fix the /usr/ports use case). Both camps cannot be appeased otherwise,
so we have this kludge until it can be sorted out.

10 years agoaccept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].
jilles [Sun, 11 May 2014 21:21:14 +0000 (21:21 +0000)]
accept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].

If the underlying protocol reported an error (e.g. because a connection was
closed while waiting in the queue), this error was also indicated by
returning a zero-length address. For all other kinds of errors (e.g.
[EAGAIN], [ENFILE], [EMFILE]), *addrlen is unmodified and there are
successful cases where a zero-length address is returned (e.g. a connection
from an unbound Unix-domain socket), so this error indication is not
reliable.

As reported in Austin Group bug #836, modifying *addrlen on error may cause
subtle bugs if applications retry the call without resetting *addrlen.

10 years agoAllow libstdc++ and libsupc++ to compile with clang again, after the
dim [Sun, 11 May 2014 21:07:00 +0000 (21:07 +0000)]
Allow libstdc++ and libsupc++ to compile with clang again, after the
bsd.*.mk infrastructure changes.  Apparently, you must now modify
CXXFLAGS *before* including bsd.lib.mk, or your changes will be lost.

10 years agoMinor fixes to previous change introducing switch -H, as per comments
thomas [Sun, 11 May 2014 18:49:18 +0000 (18:49 +0000)]
Minor fixes to previous change introducing switch -H, as per comments
on -arch.

Reviewed by: gleb

10 years agoOF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.
nwhitehorn [Sun, 11 May 2014 18:22:05 +0000 (18:22 +0000)]
OF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.

10 years agoFix locking. The dst_object must remain locked on the retry of the
kib [Sun, 11 May 2014 18:07:07 +0000 (18:07 +0000)]
Fix locking.  The dst_object must remain locked on the retry of the
loop iteration.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 6 days