]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r214131.
pluknet [Thu, 28 Oct 2010 15:41:28 +0000 (15:41 +0000)]
MFC r214131.
Enable copyback and system PD states.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214130.
pluknet [Thu, 28 Oct 2010 15:31:18 +0000 (15:31 +0000)]
MFC r214130.
Update PD state firmware definitions: add copyback, system.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 214124
edwin [Thu, 28 Oct 2010 00:54:18 +0000 (00:54 +0000)]
MFC of 214124

Fix printing of files located on ZFS filesystem with an st_dev or
st_ino larger than 2**31.

From the PR:

   Printing from a ZFS filesystem using 'lp' fails and returns an
   email reporting "Your printer job was not printed because it was
   not linked to the original file".

   In order to protect against files being switched when files
   are printed using 'lp' or 'lpr -s', the st_dev and st_ino
   values for the original file are saved by lpr and verified
   by lpd before the file is printed. Unfortunately, lpr prints
   both values using '%d' (although both fields are unsigned)
   and lpd(8) assumes a string of decimal digits.

   ZFS (at least) generates st_dev values greater than 2^31-1,
   resulting in negative values being printed - which lpd cannot
   parse, leading it to report that the file has been switched.

   A similar problem would occur with large inode numbers.

   How-To-Repeat:

   Find a file with either st_dev or st_ino greater than 2^31-1
   (stat(1) will report both numbers) and print it with 'lpq -s'.
   This should generate an email reporting that the file could
   not be printed because it was not linked to the original file

PR:           bin/151567
Submitted by: Peter Jeremy <Peter.Jeremy@alcatel-lucent.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@214442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213983:
kib [Wed, 27 Oct 2010 16:01:57 +0000 (16:01 +0000)]
MFC r213983:
Document vunref(9), add some important notes for vrele(9) and vput(9).
Merge all three manpages to one, removing separate file for vput(9).

MFC r214061 (by uqs):
mdoc: fix markup typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213716:
kib [Wed, 27 Oct 2010 15:57:17 +0000 (15:57 +0000)]
MFC r213716:
Add macro DECLARE_MODULE_TIED to denote a module as requiring the
kernel of exactly the same __FreeBSD_version as the headers module was
compiled against.

Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules
use kernel interfaces that the Release Engineering Team feel are not
stable enough to guarantee they will not change during the life cycle
of a STABLE branch. In particular, the layout of struct sysentvec is
declared to be not part of the STABLE KBI.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213664:
kib [Wed, 27 Oct 2010 15:44:49 +0000 (15:44 +0000)]
MFC r213664:
The r184588 changed the layout of struct export_args, causing an ABI
breakage for old mount(2) syscall, since most struct <filesystem>_args
embed export_args. The mount(2) is supposed to provide ABI
compatibility for pre-nmount mount(8) binaries, so restore ABI to
pre-r184588.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213756
rmacklem [Wed, 27 Oct 2010 13:10:08 +0000 (13:10 +0000)]
MFC: r213756
Fix the krpc so that it can handle NFSv3,UDP mounts with a read/write
data size greater than 8192. Since soreserve(so, 256*1024, 256*1024)
would always fail for the default value of sb_max, modify clnt_dg.c
so that it uses the calculated values and checks for an error return
from soreserve(). Also, add a check for error return from soreserve()
to clnt_vc.c and change __rpc_get_t_size() to use sb_max_adj instead of
the bogus maxsize == 256*1024.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213796:
yongari [Wed, 27 Oct 2010 02:04:24 +0000 (02:04 +0000)]
MFC r213796:
  Rewrite interrupt handler to give fairness for both RX and TX.
  Previously rl(4) continuously checked whether there are RX events
  or TX completions in forever loop. This caused TX starvation under
  high RX load as well as consuming too much CPU cycles in the
  interrupt handler. If interrupt was shared with other devices which
  may be always true due to USB devices in these days, rl(4) also
  tried to process the interrupt. This means polling(4) was the only
  way to mitigate the these issues.

  To address these issues, rl(4) now disables interrupts when it
  knows the interrupt is ours and limit the number of iteration of
  the loop to 16. The interrupt would be enabled again before exiting
  interrupt handler if the driver is still running. Because RX buffer
  is 64KB in size, the number of iterations in the loop has nothing
  to do with number of RX packets being processed. This change
  ensures sending TX frames under high RX load.

  RX handler drops a driver lock to pass received frames to upper
  stack such that there is a window that user can down the interface.
  So rl(4) now checks whether driver is still running before serving
  RX or TX completion in the loop.

  While I'm here, exit interrupt handler when driver initialized
  controller.

  With this change, now rl(4) can send frames under high RX load even
  though the TX performance is still not good(rl(4) controllers can't
  queue more than 4 frames at a time so low TX performance was one of
  design issue of rl(4) controllers). It's much better than previous
  TX starvation and you should not notice RX performance drop with
  this change. Controller still shows poor performance under high
  network load but for many cases it's now usable without resorting
  to polling(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@214407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r202976,r211927,r212845,r212846,r212934,r213055,r213056,r213057,r213058,
pjd [Tue, 26 Oct 2010 23:06:53 +0000 (23:06 +0000)]
MFC r202976,r211927,r212845,r212846,r212934,r213055,r213056,r213057,r213058,
    r213059,r213060,r213062,r213063,r213067,r213070,r213071,r213072,r213073,
    r213164,r213165,r213172,r214116,r214118,r214133,r214163,r214225,r214226,
    r214227,r214228,r214229,r214404:

r202976 (by trasz):

Remove pointless assignment.

Found with: clang

r211927:

Correct offset conversion to little endian. It was implemented in version 2,
but because of a bug it was a no-op, so we were still using offsets in native
byte order for the host. Do it properly this time, bump version to 4 and set
the G_ELI_FLAG_NATIVE_BYTE_ORDER flag when version is under 4.

Reported by: ivoras

r212845 (by brian):

Support attaching version 4 metadata

Reviewed by: pjd

r212846:

Fix indent.

r212934 (by brian):

Add a geli resize subcommand to resize encrypted filesystems prior
to growing the filesystem.

Refuse to attach providers where the metadata provider size is
wrong.  This makes post-boot attaches behave consistently with
pre-boot attaches.  Also refuse to restore metadata to a provider
of the wrong size without the new -f switch.  The new -f switch
forces the metadata restoration despite the provider size, and
updates the provider size in the restored metadata to the correct
value.

Helped by: pjd
Reviewed by: pjd

r213055:

When trashing metadata, flush after each write.

r213056:

Simplify code a bit by using g_*() API from libgeom.

r213057:

- Make use of g_*() API.
- Flush cache after writing metadata.

r213058:

Because we first write metadata into new place and then trash old place we
don't want situation where old size is equal to new size, as we will trash
newly written metadata.

r213059:

- Use g_*() API when doing backups.
- fsync() created files.

r213060:

- When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.
- Flush write cache after each write.

r213062:

Define default overwrite count, so that userland can use it.

r213063:

Make the code similar to the code in g_eli_integrity.c.

r213067:

Implement switching of data encryption key every 2^20 blocks.
This ensures the same encryption key won't be used for more than
2^20 blocks (sectors). This will be the default now.

r213070:

Add support for AES-XTS. This will be the default now.

r213071:

Document AES-XTS.

r213072:

Update copyright years.

r213073:

Update copyright years.

r213164:

Ignore errors from BIO_FLUSH. It might confuse users that provider wasn't
really killed. What we really care about are write errors only.

r213165:

Change g_eli_debug to int, so one can turn off any GELI output by setting
kern.geom.eli.debug sysctl to -1.

r213172:

- Add support for loading passphrase from a file (-J and -j options).
  This is especially useful for things like installers, where regular
  geli prompt can't be used.
- Add support for specifing multiple -K or -k options, so there is no
  need to cat all keyfiles and read them from standard input.

Requested by: Kris Moore <kris@pcbsd.org>, thompsa

r214116:

- Add missing comments.
- Make a comment consistent with others.

r214118:

Bring in geli suspend/resume functionality (finally).

Before this change if you wanted to suspend your laptop and be sure that your
encryption keys are safe, you had to stop all processes that use file system
stored on encrypted device, unmount the file system and detach geli provider.

This isn't very handy. If you are a lucky user of a laptop where suspend/resume
actually works with FreeBSD (I'm not!) you most likely want to suspend your
laptop, because you don't want to start everything over again when you turn
your laptop back on.

And this is where geli suspend/resume steps in. When you execute:

# geli suspend -a

geli will wait for all in-flight I/O requests, suspend new I/O requests, remove
all geli sensitive data from the kernel memory (like encryption keys) and will
wait for either 'geli resume' or 'geli detach'.

Now with no keys in memory you can suspend your laptop without stopping any
processes or unmounting any file systems.

When you resume your laptop you have to resume geli devices using 'geli resume'
command. You need to provide your passphrase, etc. again so the keys can be
restored and suspended I/O requests released.

Of course you need to remember that 'geli suspend' won't clear file system
cache and other places where data from your geli-encrypted file system might be
present. But to get rid of those stopping processes and unmounting file system
won't help either - you have to turn your laptop off. Be warned.

Also note, that suspending geli device which contains file system with geli
utility (or anything used by 'geli resume') is not very good idea, as you won't
be able to resume it - when you execute geli(8), the kernel will try to read it
and this read I/O request will be suspended.

r214133:

Fix a bug introduced in r213067 where we use authentication key before
initializing it.

r214163:

Free opencrypto sessions on suspend, as they also might keep encryption keys.

r214225:

Move sc_akeyctx and sc_ivctx initialization to the g_eli_mkey_propagate()
function which eliminates code duplication and will ensure proper order
of operation.

r214226:

Encryption keys array might be NULL if device is suspended. Check for this, so
we don't panic when we detach suspended device.

r214227:

Add State tag, so 'geli status' will report active/suspended status, eg:

# geli status
   Name     Status  Components
da0.eli  SUSPENDED  da0
da1.eli     ACTIVE  da1

r214228:

Close a race between checking if device is already suspended and suspending it.

r214229:

- Improve error messages, so instead of 'Not fully done', the user will get
  information that device is already suspended or that device is using
  one-time key and suspend is not supported.
- 'geli suspend -a' silently skips devices that use one-time key, this is fine,
  but because we log which device were suspended on the console, log also which
  devices were skipped.

r214404:

Use fprintf(stderr) instead of gctl_error() to print a warning about too
big sector size. When gctl error is set gctl_has_param() always returns
'false', which prevents geli(8) from finding some arguments and also masks
an error, which is generates in such case.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years ago- Make it possible for default value to be const.
pjd [Tue, 26 Oct 2010 21:23:55 +0000 (21:23 +0000)]
- Make it possible for default value to be const.
- Default number is now also a string.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214069:
bschmidt [Tue, 26 Oct 2010 20:23:29 +0000 (20:23 +0000)]
MFC r214069:
Fix an undefined behaviour if the desired ratectl algo is not available.
This can happen if the algos are built as modules but are not loaded. If
the selected ratectl algo is not available, try to load it (The load
module functions does nothing currently). Add a dummy ratectl algo which
always selects the first available rate. Use that one if the desired algo
is not available.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214056:
rpaulo [Tue, 26 Oct 2010 19:56:53 +0000 (19:56 +0000)]
MFC r214056:
  Revert r206418

git-svn-id: svn://svn.freebsd.org/base/stable/8@214398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:210600
rrs [Tue, 26 Oct 2010 19:12:37 +0000 (19:12 +0000)]
MFC:210600

Fix the comment block that has the nice
table to really have the nice table :-)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214397 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:210599
rrs [Tue, 26 Oct 2010 19:08:26 +0000 (19:08 +0000)]
MFC:210599
 PR SCTP Bugs. Basically a full sized frame of
 PR SCTP FWD-TSN's would not be sent and thus
 cause a stalled connection. Also the rwnd
 Calculation was also off on the receiver side for
 PR-SCTP.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214394 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:210494
rrs [Tue, 26 Oct 2010 19:06:31 +0000 (19:06 +0000)]
MFC:210494

Make sure that we report chunks if a socket
still exists that were not sent. In either
case carefully remove the data if it does not
get taken by the reporting routines.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:210493
rrs [Tue, 26 Oct 2010 19:04:05 +0000 (19:04 +0000)]
MFC:210493

When counting the number of chunks in the
retransmission queue to validate the retran count, we
need to include the chunks in the control send queue
too. Otherwise the count will not match and you will get
the invarient warning if invarients are on.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214392 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: 209760
rrs [Tue, 26 Oct 2010 19:01:56 +0000 (19:01 +0000)]
MFC: 209760

If a user calls sctp_sendx() with a NULL
sinfo we will crash. Instead we should provide
our own temp structure to use internally.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 209663
rrs [Tue, 26 Oct 2010 18:59:36 +0000 (18:59 +0000)]
MFC of 209663
This fixes a crash in SCTP. It was possible to have a
large number of packets queued to a crashing process.
In a specific case you may get 2 ABORT's back (from
say two packets in flight). If the aborts happened to
be processed at the same time its possible to have
one free the association while the other is trying
to report all the outbound packets. When this occured
it could lead to a crash.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 209644
rrs [Tue, 26 Oct 2010 18:56:55 +0000 (18:56 +0000)]
MFC of 209644
Log is:
Fix a bug that will cause a panic. Basically
a read-lock is being called to check the vtag-timewait cache.
Then in two cases (where a vtag is bad i.e. in the time-wait
state) the write-unlokc is called NOT the read-unlock. Under
conditions where lots of associations are coming and going
this willc ause the system to panic with invariants on.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214070:
bschmidt [Tue, 26 Oct 2010 17:38:45 +0000 (17:38 +0000)]
MFC r214070:
There is no reason to call rt_ifmsg(), remove it.

Submitted by: Paul B Mahol <onemda at gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@214384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213729:
bschmidt [Tue, 26 Oct 2010 17:30:34 +0000 (17:30 +0000)]
MFC r213729:
Fix monitor mode which is implemented by doing a firmware scan. This
is a port from stable/6, seems like the code got lost during the
background scan changes in r170530.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214147:
bcr [Tue, 26 Oct 2010 16:04:23 +0000 (16:04 +0000)]
MFC r214147:

Sync with OpenBSD rev. 1.13:
strtonum does not require limits.h

Obtained from:  OpenBSD
Discussed with: ru@

git-svn-id: svn://svn.freebsd.org/base/stable/8@214379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212360:
nwhitehorn [Tue, 26 Oct 2010 14:59:35 +0000 (14:59 +0000)]
MFC r212360:
On architectures with non-tree-based page tables like PowerPC, every page
in a range must be checked when calling pmap_remove(). Calling
pmap_remove() from vm_pageout_map_deactivate_pages() with the entire range
of the map could result in attempting to demap an extraordinary number
of pages (> 10^15), so iterate through each map entry and unmap each of
them individually.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213456:
nwhitehorn [Tue, 26 Oct 2010 14:56:46 +0000 (14:56 +0000)]
MFC r213456:
Handle vector assist traps without a kernel panic, by setting denormalized
values to zero. A correct solution would involve emulating vector
operations on denormalized values, but this has little effect on accuracy
and is much less complicated for now.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213241, r213257:
davidxu [Tue, 26 Oct 2010 09:25:29 +0000 (09:25 +0000)]
MFC r213241, r213257:
In current code, statically initialized and destroyed object have
same null value, the code can not distinguish between them, to
fix the problem, now a destroyed object is assigned to a non-null
value, and it will be rejected by some pthread functions.
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that
adaptive mutex can be statically initialized correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC part of r213103:
attilio [Tue, 26 Oct 2010 08:50:09 +0000 (08:50 +0000)]
MFC part of r213103:
Introduce the new files that were left behind in actual merge.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213272 by emaste:
attilio [Tue, 26 Oct 2010 01:20:30 +0000 (01:20 +0000)]
MFC r213272 by emaste:
Previously, the aac driver did not handle enclosure management AIFs,
which were raised during hot-swap events. Now such events trigger cam
rescans.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212773 by emaste:
attilio [Tue, 26 Oct 2010 00:58:15 +0000 (00:58 +0000)]
MFC r212773 by emaste:
Use device_printf where possible, and otherwise at least include the
driver name in printf strings.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212628 by emaste:
attilio [Tue, 26 Oct 2010 00:56:23 +0000 (00:56 +0000)]
MFC r212628 by emaste:
Add some enums and constants from Adaptec's driver.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r206540 by emaste:
attilio [Tue, 26 Oct 2010 00:46:02 +0000 (00:46 +0000)]
MFC r206540 by emaste:
Sync some minor items with the upstream driver.  Should have no functional
change.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213536 by emaste:
attilio [Tue, 26 Oct 2010 00:21:31 +0000 (00:21 +0000)]
MFC r213536 by emaste:
Make a thread's address available via the kern proc sysctl, just like the
process address.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213236 by emaste:
attilio [Mon, 25 Oct 2010 23:59:56 +0000 (23:59 +0000)]
MFC r213236 by emaste:
Style fix.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213235 by emaste:
attilio [Mon, 25 Oct 2010 23:58:16 +0000 (23:58 +0000)]
MFC r213235 by emaste:
Increase maximum network timeout from 20s to 120s.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213712
rmacklem [Mon, 25 Oct 2010 17:05:14 +0000 (17:05 +0000)]
MFC: r213712
Try and make the nfsrv_localunlock() function in the experimental
NFSv4 server more readable. Mostly changes to comments, but a
case of >= is changed to >, since == can never happen. Also, I've
added a couple of KASSERT()s and a slight optimization, since
once the "else if" case happens, subsequent locks in the list can't
have any effect. None of these changes fixes a known bug.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214353 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213181 by emaste:
attilio [Mon, 25 Oct 2010 15:17:31 +0000 (15:17 +0000)]
MFC r213181 by emaste:
Protect the watchdog daemon against swap OOM killer.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213080 by emaste:
attilio [Mon, 25 Oct 2010 15:11:10 +0000 (15:11 +0000)]
MFC r213080 by emaste:
merge metadata of a revision that could have been included into r214339
MFC's time.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213012 by emaste:
attilio [Mon, 25 Oct 2010 15:01:40 +0000 (15:01 +0000)]
MFC r213012 by emaste:
Correct sort order.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212148 by emaste:
attilio [Mon, 25 Oct 2010 14:04:21 +0000 (14:04 +0000)]
MFC r212148 by emaste:
Remove trailing whitespace.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212096 by emaste:
attilio [Mon, 25 Oct 2010 14:02:14 +0000 (14:02 +0000)]
MFC r212096 by emaste:
As long as we are going to panic anyway, there's no need to hide additional
information behind DIAGNOSTIC.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213103:
attilio [Mon, 25 Oct 2010 13:34:55 +0000 (13:34 +0000)]
MFC r213103:
Make the RPC specific __rpc_inet_ntop() and __rpc_inet_pton() general
in the kernel.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214339 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoIP_BINDANY is not correctly handled in getsockopt() case.
attilio [Mon, 25 Oct 2010 13:16:11 +0000 (13:16 +0000)]
IP_BINDANY is not correctly handled in getsockopt() case.
Fix it by specifying the correct bits.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212661 and r212756:
attilio [Mon, 25 Oct 2010 13:01:19 +0000 (13:01 +0000)]
MFC r212661 and r212756:
Implement correct refcounting of cdevsw open/close pair and detach
stopping for it.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@214336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212754:
mav [Mon, 25 Oct 2010 08:18:29 +0000 (08:18 +0000)]
MFC r212754:
Add support for dumping kernel to gconcat.
Dumping goes to the component, where dump partition begins.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214330 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agostable/8: add options KDB and KDB_TRACE to GENERIC kernels
avg [Mon, 25 Oct 2010 07:58:37 +0000 (07:58 +0000)]
stable/8: add options KDB and KDB_TRACE to GENERIC kernels

Now that we have code for printing a stack trace on panic using stack(9)
facility without any debugger backend configured, use this ability
in GENERIC kernels to slightly increase amount of debugging information
available in default installations.

This change should not break anything for those who include GENERIC into
a custom kernel config file and have the above options already enabled.
They should only get a warning about duplicate options.

This commit should not change behavior of GENERIC kernels for panics and
traps with respect to core dumping and automatic reset.
As no debugger backend is configured, enter-to-debugger key combination
should still be ignored.

With this commit the sizes of GENERIC kernels increase by one to two KB.

This is a direct commit to the branch.

Approved by: re
No objections: core, secteam

git-svn-id: svn://svn.freebsd.org/base/stable/8@214326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoadd dates along with revision numbers in UPDATING entry for 20101022
avg [Mon, 25 Oct 2010 07:36:39 +0000 (07:36 +0000)]
add dates along with revision numbers in UPDATING entry for 20101022

This is a direct commit.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214097: catch up manual pages with rename of vm_page_sleep_busy to
avg [Mon, 25 Oct 2010 07:30:14 +0000 (07:30 +0000)]
MFC r214097: catch up manual pages with rename of vm_page_sleep_busy to
vm_page_sleep_if_busy

git-svn-id: svn://svn.freebsd.org/base/stable/8@214322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214096: VOP_GETPAGES.9: clarify and correct description of parameters
avg [Mon, 25 Oct 2010 07:11:37 +0000 (07:11 +0000)]
MFC r214096: VOP_GETPAGES.9: clarify and correct description of parameters
and requirements

git-svn-id: svn://svn.freebsd.org/base/stable/8@214320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214095: PG_BUSY -> VPO_BUSY, PG_WANTED -> VPO_WANTED in manual
avg [Mon, 25 Oct 2010 07:06:24 +0000 (07:06 +0000)]
MFC r214095: PG_BUSY -> VPO_BUSY, PG_WANTED -> VPO_WANTED in manual
pages and comments

git-svn-id: svn://svn.freebsd.org/base/stable/8@214319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 196811
julian [Mon, 25 Oct 2010 06:33:19 +0000 (06:33 +0000)]
MFC of 196811
Slight cleanup to pcpu macros to better match amd64 and to improve readability
of the output.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 199812
julian [Mon, 25 Oct 2010 06:28:19 +0000 (06:28 +0000)]
MFC of 199812
allow tinybsd to abort of a step fails.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214001:
kevlo [Mon, 25 Oct 2010 06:16:27 +0000 (06:16 +0000)]
MFC r214001:
Fix a possible, but very unlikely race where the directory dirent is
moved to the location that was used by ".." entry.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 200614
julian [Mon, 25 Oct 2010 05:37:12 +0000 (05:37 +0000)]
MFC of 200614
make man page match the output of lock profiling.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of 206632
julian [Mon, 25 Oct 2010 01:22:36 +0000 (01:22 +0000)]
MFC of 206632
If both ALQ and KTR are defined, allow KTR buffer to be used when
ALQ is disabled by sysctl.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of svn change 206639.
julian [Mon, 25 Oct 2010 01:02:34 +0000 (01:02 +0000)]
MFC of svn change 206639.
replace a couple of instances of the same definitions with one in
an include file

git-svn-id: svn://svn.freebsd.org/base/stable/8@214310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213696:
yongari [Sun, 24 Oct 2010 21:28:58 +0000 (21:28 +0000)]
MFC r213696:
  Do not setup interrupt endpoint for axe(4).
  It seems axe(4) controllers support interrupt endpoint such that
  enabling interrupt endpoint generates about 1000 interrupts/sec.
  Controllers transfer 8 bytes data through interrupt endpoint and
  the data include link UP/DOWN state as well as some PHY related
  information. Previously axe(4) didn't use the transferred data and
  didn't even try to read the data. Because axe(4) counts on mii(4)
  to detect link state changes there is no need to use interrupt
  endpoint here.

  This change fixes generation of unnecessary interrupts which was
  seen when interface is brought to UP.

  No objections from: hselasky

git-svn-id: svn://svn.freebsd.org/base/stable/8@214301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213438:
yongari [Sun, 24 Oct 2010 21:26:41 +0000 (21:26 +0000)]
MFC r213438:
  RX buffer allocation failure is not an input error. Controller
  successfully received a frame but we failed to pass it to upper
  stack due to lack of resources. So update if_iqdrops counter
  instead of updating if_ierrors counter.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213436:
yongari [Sun, 24 Oct 2010 21:25:15 +0000 (21:25 +0000)]
MFC r213436:
  Don't count input error twice. uether_rxbuf() already updated that
  counter.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213424:
yongari [Sun, 24 Oct 2010 21:23:27 +0000 (21:23 +0000)]
MFC r213424:
  Make upper stack know driver's output status. This change increased
  TX performance from 221kpps to 231kpps.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213423:
yongari [Sun, 24 Oct 2010 21:22:00 +0000 (21:22 +0000)]
MFC r213423:
  Move updating TX packet counter to the inside of send loop. axe(4)
  controllers combine multiple TX requests into single one if there
  is room in TX buffer of controller. Updating TX packet counter at
  the end of TX completion resulted in incorrect TX packet counter as
  axe(4) thought it sent 1 packet. There is no easy way to know how
  many combined TX were completed in the callback.
  Because this change updates TX packet counter before actual
  transmission, it may not be ideal one. But I believe it's better
  than showing fake 8kpps under high TX load. With this change, TX
  shows 221kpps on Linksus USB200M.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213844:
yongari [Sun, 24 Oct 2010 21:14:01 +0000 (21:14 +0000)]
MFC r213844:
  Make sure to not use stale ip/tcp header pointers. The ip/tcp
  header parser uses m_pullup(9) to get access to mbuf chain.
  m_pullup(9) can allocate new mbuf chain and free old one if the
  space left in the mbuf chain is not enough to hold requested
  contiguous bytes. Previously drivers can use stale ip/tcp header
  pointer if m_pullup(9) returned new mbuf chain.

  Reported by: Andrew Boyer (aboyer <> averesystems dot com)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213842:
yongari [Sun, 24 Oct 2010 21:07:13 +0000 (21:07 +0000)]
MFC r213842:
  Backout r204230. TX mbuf parser for VLAN is still required to
  enable TX checksum offloading if VLAN hardware tagging is disabled.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213567:
ed [Sun, 24 Oct 2010 18:12:11 +0000 (18:12 +0000)]
MFC r213567:

  Import ee 1.5.2 into HEAD.

PR: bin/145921

git-svn-id: svn://svn.freebsd.org/base/stable/8@214287 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213509:
mav [Sun, 24 Oct 2010 17:42:41 +0000 (17:42 +0000)]
MFC r213509:
Add ID for Vodafone (ZTE) Mobile Broadband K3565-Z modem.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212991:
mav [Sun, 24 Oct 2010 17:40:19 +0000 (17:40 +0000)]
MFC r212991:
Decrease poll interval from 1000 to 100us. This significantly reduces
kernel dump time, especially with minidump.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213385
marius [Sun, 24 Oct 2010 13:43:45 +0000 (13:43 +0000)]
MFC: r213385

Remove a header that apart from the license is empty.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213384
marius [Sun, 24 Oct 2010 13:41:38 +0000 (13:41 +0000)]
MFC: r213384

Consistently always explicitly set IFM_HDX for half-duplex.

Obtained from: OpenBSD (mostly)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213364
marius [Sun, 24 Oct 2010 13:39:19 +0000 (13:39 +0000)]
MFC: r213364

- In the spirit of previous simplifications factor out the checks for a
  different PHY instance being selected and isolation out into the wrappers
  around the service methods rather than duplicating them over and over
  again (besides, a PHY driver shouldn't need to care about which instance
  it actually is).
- Centralize the check for the need to isolate a non-zero PHY instance not
  supporting isolation in mii_mediachg() and just ignore it rather than
  panicing, which should sufficient given that a) things are likely to
  just work anyway if one doesn't plug in more than one port at a time and
  b) refusing to attach in this case just leaves us in a unknown but most
  likely also not exactly correct configuration (besides several drivers
  setting MIIF_NOISOLATE didn't care about these anyway, probably due to
  setting this flag for no real reason).
- Minor fixes like removing unnecessary setting of sc->mii_anegticks,
  using sc->mii_anegticks instead of hardcoded values etc.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213065,r213068:
pjd [Sat, 23 Oct 2010 22:11:30 +0000 (22:11 +0000)]
MFC r213065,r213068:

r213065:

Remove redundant space.

r213068:

Add support for AES-XTS.

Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@214254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoConstify go_val field.
pjd [Sat, 23 Oct 2010 22:04:37 +0000 (22:04 +0000)]
Constify go_val field.

(Should've been MFC of r212547.)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoImplement G_TYPE_MULTI and G_VAL_OPTIONAL for stable/8.
pjd [Sat, 23 Oct 2010 21:56:50 +0000 (21:56 +0000)]
Implement G_TYPE_MULTI and G_VAL_OPTIONAL for stable/8.

This should have been MFC, but I've no green light from marcel to remove
G_TYPE_ASCNUM and gc_argname and to modify geom_part in stable/8, so this is
reimplementation that doesn't touch gpart and hopefully doesn't break anything.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214252 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213926: sh(1): Clarify subshells/processes for pipelines.
jilles [Sat, 23 Oct 2010 13:36:09 +0000 (13:36 +0000)]
MFC r213926: sh(1): Clarify subshells/processes for pipelines.

For multi-command pipelines,
1. all commands are direct children of the shell (unlike the original
   Bourne shell)
2. all commands are executed in a subshell (unlike the real Korn shell)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214089:
yongari [Sat, 23 Oct 2010 00:41:26 +0000 (00:41 +0000)]
MFC r214089:
  Correct handling of shared interrupt in sis_intr(). r212116 incorrectly
  released a drver lock for shared interrupt case such that it caused
  panic. While I'm here check whether driver is still running before
  serving TX/RX handler.

  Reported by: Jerahmy Pocott < QUAKENET1 <> optusnet dot com dot au >
  Tested by: Jerahmy Pocott < QUAKENET1 <> optusnet dot com dot au >

git-svn-id: svn://svn.freebsd.org/base/stable/8@214231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r214062:
mdf [Fri, 22 Oct 2010 16:00:00 +0000 (16:00 +0000)]
MFC r214062:

uma_zfree(zone, NULL) should do nothing, to match free(9).

Noticed by: Ron Steinke <rsteinke at isilon dot com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@214206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213528: opensolaris_kmem kmem_size(): report lesser of vm_kmem_size
avg [Fri, 22 Oct 2010 08:57:25 +0000 (08:57 +0000)]
MFC r213528: opensolaris_kmem kmem_size(): report lesser of vm_kmem_size
and available physical memory

git-svn-id: svn://svn.freebsd.org/base/stable/8@214201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoadd UPDATING entry for r214198: removed ld bug workaround
avg [Fri, 22 Oct 2010 08:46:22 +0000 (08:46 +0000)]
add UPDATING entry for r214198: removed ld bug workaround

This is a direct commit to the branch.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212647: sys/pcpu.h: remove a workaround for a fixed ld bug
avg [Fri, 22 Oct 2010 08:42:44 +0000 (08:42 +0000)]
MFC r212647: sys/pcpu.h: remove a workaround for a fixed ld bug

git-svn-id: svn://svn.freebsd.org/base/stable/8@214198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r204955,205885: Various and sundry style, whitespace, and comment
avg [Fri, 22 Oct 2010 08:36:26 +0000 (08:36 +0000)]
MFC r204955,205885: Various and sundry style, whitespace, and comment
fixes.

On behalf of: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@214197 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoReduce diff to 9-CURRENT.
obrien [Fri, 22 Oct 2010 06:56:11 +0000 (06:56 +0000)]
Reduce diff to 9-CURRENT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213814: Do not assume in growstackstr() that a "precious" character
obrien [Thu, 21 Oct 2010 23:45:57 +0000 (23:45 +0000)]
MFC r213814: Do not assume in growstackstr() that a "precious" character
will be immediately written into the stack after the call.  Instead let
the caller manage the "space left".

git-svn-id: svn://svn.freebsd.org/base/stable/8@214190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoFix typo: Offlaod -> Offload.
pluknet [Thu, 21 Oct 2010 10:11:39 +0000 (10:11 +0000)]
Fix typo: Offlaod -> Offload.

PR: docs/150756
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214126 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC
obrien [Thu, 21 Oct 2010 01:13:41 +0000 (01:13 +0000)]
MFC
  r211281: don't shadow sigset
  r212243: improve comments in expand.c
  r213925: use <stddef.h> rather than <sys/stddef.h>

git-svn-id: svn://svn.freebsd.org/base/stable/8@214123 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213811: c89 linkage and storage class (also covers r213744, r213760)
obrien [Wed, 20 Oct 2010 18:25:00 +0000 (18:25 +0000)]
MFC r213811: c89 linkage and storage class (also covers r213744, r213760)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214113 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212100 (emaste),213632,214066:
delphij [Wed, 20 Oct 2010 17:42:10 +0000 (17:42 +0000)]
MFC r212100 (emaste),213632,214066:

Add a new syslog knob, net.link.lagg.failover_rx_all, to control
whether to accept input packets on any link in a failover lagg,
and add the corresponding documentation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214111 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211992: some programs could send broadcast/multicast traffic to
maxim [Wed, 20 Oct 2010 12:38:05 +0000 (12:38 +0000)]
MFC r211992: some programs could send broadcast/multicast traffic to
ipfw pseudo-interface.  This leads to a panic due to uninitialized
if_broadcastaddr address.  Initialize it and implement ip_output()
method to prevent mbuf leak later.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214108 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:
obrien [Wed, 20 Oct 2010 07:54:43 +0000 (07:54 +0000)]
MFC:
  r213774: DEBUG_FLAGS should be used to enable extra debugging rather than
           frobbing CFLAGS directly.
  r213798: do not inline static functions if debugging

git-svn-id: svn://svn.freebsd.org/base/stable/8@214104 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212138: csup(1) does not have -g flag.
maxim [Wed, 20 Oct 2010 07:54:27 +0000 (07:54 +0000)]
MFC r212138: csup(1) does not have -g flag.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212094: sync the man page with the reality: nfs/ includes
maxim [Wed, 20 Oct 2010 07:40:23 +0000 (07:40 +0000)]
MFC r212094: sync the man page with the reality: nfs/ includes
are under include/ and include/fs/.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214101 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213815: only need to look as far as '..' to find 'test/'
obrien [Wed, 20 Oct 2010 07:32:25 +0000 (07:32 +0000)]
MFC r213815: only need to look as far as '..' to find 'test/'

git-svn-id: svn://svn.freebsd.org/base/stable/8@214100 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213929:
bz [Wed, 20 Oct 2010 01:22:04 +0000 (01:22 +0000)]
MFC r213929:
  lltable_drain() has never been used so far, thus #if 0 it for now.
  While touching it add the missing locking to the now disabled code
  for the time when we'll resurrect it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214092 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r213903: default to 'sh' from PATH if 'SH' env is not set.
obrien [Wed, 20 Oct 2010 00:24:30 +0000 (00:24 +0000)]
MFC: r213903: default to 'sh' from PATH if 'SH' env is not set.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214090 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213738: allow one to regression test 'sh' changes without having to
obrien [Tue, 19 Oct 2010 23:57:34 +0000 (23:57 +0000)]
MFC r213738: allow one to regression test 'sh' changes without having to
             install a potentially bad /bin/sh first.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213326: libc: Remove the i386 assembler version of strlen(3).
jilles [Tue, 19 Oct 2010 22:11:50 +0000 (22:11 +0000)]
MFC r213326: libc: Remove the i386 assembler version of strlen(3).

On anything modern, the C version, which processes a word at a time, is much
faster. The Intel optimization manual explicitly warns against using REP
prefixes with SCAS or CMPS, which is exactly what the assembler version
does.

A simple test on a Phenom II showed the C version, compiled with -O2, to be
about twice as fast determining the length of 100000 strings between 0 and
255 bytes long.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC of r207830
edwin [Tue, 19 Oct 2010 21:04:45 +0000 (21:04 +0000)]
MFC of r207830

strptime(3) confused July with June with the fr_FR locale.

When parsing the month "juillet" (abbr "jul"), %B recognized it as
"juin" (abbr "jui") because the full name of the month names is
checked at the same time as the abbrevation.

The new behaviour checks the full names first before checking the
abbrevation names.

PR:             kern/141939
Submitted by:   Denis Chatelain <denis@tikuts.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@214079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213574:
pluknet [Tue, 19 Oct 2010 14:09:17 +0000 (14:09 +0000)]
MFC r213574:
- tcpconnect incorrectly uses err() in usage() with errx() semantics [1]
- 64-bit aware fixes in printf() usage [2]
o   netrate/juggle: time_t has arch-dependent size
o   netrate/tcpconnect: don't assume %ll has always 64bit.

PR: 146088 [1], 146086 [2] (modified)
Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214057 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213451:
emaste [Tue, 19 Oct 2010 13:06:26 +0000 (13:06 +0000)]
MFC r213451:

  Handle null return from XML_ParserCreate and fix a few memory leaks on
  error conditions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214055 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r213514:
pluknet [Tue, 19 Oct 2010 10:51:18 +0000 (10:51 +0000)]
MFC r213514:
Wrap lines for SiS and Promise entries to 80 columns.

PR: docs/146195
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@214051 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212723 (by des):
kib [Tue, 19 Oct 2010 09:25:58 +0000 (09:25 +0000)]
MFC r212723 (by des):
Implement proc/$$/environment.

MFC r213246:
Rework linprocfs_doprocenviron() and linprocfs_doproccmdline().

git-svn-id: svn://svn.freebsd.org/base/stable/8@214050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:
obrien [Mon, 18 Oct 2010 23:10:32 +0000 (23:10 +0000)]
MFC:
  r199955: disable job control when running 'sh -i' in the testsuite
  r204801: make sure to popredir() even if a special builtin caused an error
  r204802: make sure to popredir() even if a function caused an error
  r211399: get rid of unnecessary non-standard empty lists.
  r211609: add a test for breaking from a loop outside the current function
  r211622: test that all bytes from 128 to 255 can be used in IFS
  r211973: weaken builtins/command4 test to only require a non-0 exit status

git-svn-id: svn://svn.freebsd.org/base/stable/8@214045 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212407:
pjd [Mon, 18 Oct 2010 12:12:38 +0000 (12:12 +0000)]
MFC r212407:

Forgot to commit this file. Add ZPOOL_CONFIG_IS_LOG.

Reported by: keramida, dhw

git-svn-id: svn://svn.freebsd.org/base/stable/8@214017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212382,r212383,r212384,r212387:
pjd [Mon, 18 Oct 2010 09:26:39 +0000 (09:26 +0000)]
MFC r212382,r212383,r212384,r212387:

r212382:

Remove duplicated code.

r212383:

Allow to boot from a pool within which replacing is in progress.
Before the change it wasn't possible and the following error was printed:

ZFS: can only boot from disk, mirror or raidz vdevs

Now if the original vdev (the one we are replacing) is still present we will
read from it, but if it is not present we won't read from the new vdev, as it
might not have enough valid data yet.

r212384:

Ignore log vdevs.

r212387:

Remove empty lines committed by accident.

git-svn-id: svn://svn.freebsd.org/base/stable/8@214014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f