]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
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

13 years agoMFC r213197, r213198:
mm [Mon, 18 Oct 2010 08:54:33 +0000 (08:54 +0000)]
MFC r213197, r213198:

MFC r213197:
Enable offlining of log devices.

OpenSolaris revision and Bug IDs:

9701:cc5b64682e64
6803605 should be able to offline log devices
6726045 vdev_deflate_ratio is not set when offlining a log device
6599442 zpool import has faults in the display

MFC r213198:
Properly handle IO with B_FAILFAST
Retry IO once with ZIO_FLAG_TRYHARD before declaring a pool faulted

OpenSolaris revision and Bug IDs:

9725:0bf7402e8022
6843014 ZFS B_FAILFAST handling is broken

As FreeBSD does not support B_FAILFAST and we don't use vdev_disk.c,
MFC of r213198 is a no-op with the purpose of diff reduction against
latest ZFS code and making future updates easier.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6803605672604565994426843014)

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

13 years agoMFC r213133,r213135,r213136,r213137,r213245:
pjd [Sun, 17 Oct 2010 20:10:00 +0000 (20:10 +0000)]
MFC r213133,r213135,r213136,r213137,r213245:

r213133:

Add three GPT attributes:

GPT_ENT_ATTR_BOOTME - this is bootable partition

GPT_ENT_ATTR_BOOTONCE - try to boot only once from this partition

GPT_ENT_ATTR_BOOTFAILED - set this flag if we cannot boot from partition
containing GPT_ENT_ATTR_BOOTONCE flag; note that if we cannot
boot from partition that contains only GPT_ENT_ATTR_BOOTME flag,
the GPT_ENT_ATTR_BOOTFAILED flag won't be set

According to wikipedia Microsoft TechNet says that attributes are divided into
two halves: the lower 4 bytes representing partition independent attributes,
and the upper 4 bytes are partition type dependent. Microsoft is already using
bits 60 (read-only), 62 (hidden) and 63 (do not automount) and I'd like to not
collide with those, so we are using bit 59 (bootme), 58 (bootonce) and 57
(bootfailed).

Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>)

r213135:

Allow to configure GPT attributes. It shouldn't be allowed to set bootfailed
attribute (it should be allowed only to unset it), but for test purposes it
might be useful, so the current code allows it.

Reviewed by: arch@ (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>)

r213136:

- Split code shared by almost any boot loader into separate files and
  clean up most layering violations:

sys/boot/i386/common/rbx.h:

RBX_* defines
OPT_SET()
OPT_CHECK()

sys/boot/common/util.[ch]:

memcpy()
memset()
memcmp()
bcpy()
bzero()
bcmp()
strcmp()
strncmp() [new]
strcpy()
strcat()
strchr()
strlen()
printf()

sys/boot/i386/common/cons.[ch]:

ioctrl
putc()
xputc()
putchar()
getc()
xgetc()
keyhit() [now takes number of seconds as an argument]
getstr()

sys/boot/i386/common/drv.[ch]:

struct dsk
drvread()
drvwrite() [new]
drvsize() [new]

sys/boot/common/crc32.[ch] [new]

sys/boot/common/gpt.[ch] [new]

- Teach gptboot and gptzfsboot about new files. I haven't touched the
  rest, but there is still a lot of code duplication to be removed.

- Implement full GPT support. Currently we just read primary header and
  partition table and don't care about checksums, etc. After this change we
  verify checksums of primary header and primary partition table and if
  there is a problem we fall back to backup header and backup partition
  table.

- Clean up most messages to use prefix of boot program, so in case of an
  error we know where the error comes from, eg.:

gptboot: unable to read primary GPT header

- If we can't boot, print boot prompt only once and not every five
  seconds.

- Honour newly added GPT attributes:

bootme - this is bootable partition
bootonce - try to boot from this partition only once
bootfailed - we failed to boot from this partition

- Change boot order of gptboot to the following:

1. Try to boot from all the partitions that have both 'bootme'
   and 'bootonce' attributes one by one.
2. Try to boot from all the partitions that have only 'bootme'
   attribute one by one.
3. If there are no partitions with 'bootme' attribute, boot from
   the first UFS partition.

- The 'bootonce' functionality is implemented in the following way:

1. Walk through all the partitions and when 'bootonce'
   attribute is found without 'bootme' attribute, remove
   'bootonce' attribute and set 'bootfailed' attribute.
   'bootonce' attribute alone means that we tried to boot from
   this partition, but boot failed after leaving gptboot and
   machine was restarted.
2. Find partition with both 'bootme' and 'bootonce' attributes.
3. Remove 'bootme' attribute.
4. Try to execute /boot/loader or /boot/kernel/kernel from that
   partition. If succeeded we stop here.
5. If execution failed, remove 'bootonce' and set 'bootfailed'.
6. Go to 2.

   If whole boot succeeded there is new /etc/rc.d/gptboot script coming
   that will log all partitions that we failed to boot from (the ones with
   'bootfailed' attribute) and will remove this attribute. It will also
   find partition with 'bootonce' attribute - this is the partition we
   booted from successfully. The script will log success and remove the
   attribute.

   All the GPT updates we do here goes to both primary and backup GPT if
   they are valid. We don't touch headers or partition tables when
   checksum doesn't match.

Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>)
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213137:

Add gptboot script that is responsible for:
- looking for partition with 'bootonce' attribute alone (without 'bootme'
  attribute), removing it and logging that we successfully booted from this
  partition.
- looking for partitions with 'bootfailed' attribute, removing it and
  logging that we failed to boot from this partition.

Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>)
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213245:

Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by: simon, rpaulo

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

13 years agoMerge from head 213480,213481,213717:
glebius [Sun, 17 Oct 2010 17:39:54 +0000 (17:39 +0000)]
Merge from head 213480,213481,213717:

  Add support to Alcatel/TCTMobile X080S USB 3G modem. The device needs
  special eject command to reappear as modem. It also requires DIR_IN flag
  in the command message, so we supply some dummy data along with the command.

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

13 years agoMFC r213183,r213428,r213429,r213430,r213529,r213530,r213531,r213533,r213579,
pjd [Sun, 17 Oct 2010 16:43:20 +0000 (16:43 +0000)]
MFC r213183,r213428,r213429,r213430,r213529,r213530,r213531,r213533,r213579,
  r213580,r213938,r213939,r213981:

r213183:

Plug memory leak on fork(2) failure.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

r213428:

We can't mask ignored signal, so install dummy signal hander for SIGCHLD before
masking it.

This fixes bogus reports about hooks running for too long and other problems
related to garbage-collecting child processes.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>

r213429:

hook_check() is now only used to report about long-running hooks, so the
argument is redundant, remove it.

r213430:

Decrease report interval to 5 seconds, as this also means we will check for
signals every 5 seconds and not every 10 seconds as before.

r213529:

Don't close local component on exit as we can hang waiting on g_waitidle.
I'm unable to reproduce the race described in comment anymore and also the
comment is incorrect - localfd represents local component from configuration
file, eg. /dev/da0 and not HAST provider.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>

r213530:

Start the guard thread first, so we can handle signals from the very begining.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>

r213531:

Log error message when we fail to destroy ggate provider.

r213533:

Clear ggate structures before using them. We don't initialize all the field
and there can be some garbage from the stack.

r213579:

We close the event socketpair early in the mainloop to prevent spaming with
error messages, so when we clean up after child process, we have to check if
the event socketpair is still there.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

r213580:

We can't zero out ggio request, as we have some fields in there we initialize
once during start-up.

Reported by: Mikolaj Golub <to.my.trociny@gmail.com>

r213938:

Clear signal mask before executing a hook.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

r213939:

Use one fprintf() instead of two.

r213981:

Log correct connection when canceling half-open connection.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>

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

13 years agoMFC r213360:
nwhitehorn [Sun, 17 Oct 2010 15:55:46 +0000 (15:55 +0000)]
MFC r213360:

Missed some changes in the last commit required to build LINT.

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

13 years agoMerge 213831:
glebius [Sun, 17 Oct 2010 15:25:33 +0000 (15:25 +0000)]
Merge 213831:
  Enable the shared memory reference clock driver. The GPS devices are
  getting more and more popular, as source of precise time, and the gpsd
  daemon from ports is using the shared memory to synchronize with ntpd.

  Reviewed by:  roberto

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

13 years agoMFC r213307,213335:
nwhitehorn [Sun, 17 Oct 2010 15:22:59 +0000 (15:22 +0000)]
MFC r213307,213335:

Add support for memory attributes (pmap_mapdev_attr() and friends) on
PowerPC/AIM. This is currently stubbed out on Book-E, since I have no
idea how to implement it there.

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

13 years agoMFC r213298:
jh [Sun, 17 Oct 2010 14:48:53 +0000 (14:48 +0000)]
MFC r213298:

Fix printing of the "rw" mount option in fstab(5) format (-p option).
fstab(5) format requires that one of "rw", "rq" or "ro" is always
specified.

PR: bin/123021

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

13 years agoMFC: r213868
marius [Sun, 17 Oct 2010 14:25:55 +0000 (14:25 +0000)]
MFC: r213868

- In the spirit of r212559 add a comment describing what will eventually
  lower the PIL.
- Just as with the AP ensure that the (S)TICK timer(s) are in a known
  state when starting BSPs.

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

13 years agoMFC r213846:
kib [Sun, 17 Oct 2010 13:47:03 +0000 (13:47 +0000)]
MFC r213846:
Remove stale comment.

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

13 years agoMFC: r213578
marius [Sun, 17 Oct 2010 13:41:09 +0000 (13:41 +0000)]
MFC: r213578

In the replacement text of the __bswapN_const() macros cast the argument
to the expected type so they work like the corresponding __bswapN_var()
functions and the compiler doesn't complain when arguments of different
width are passed.

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

13 years agoMFC: r213575
marius [Sun, 17 Oct 2010 13:13:13 +0000 (13:13 +0000)]
MFC: r213575

Just use the sparc64 version of this header rather than duplicating it.

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

13 years agoMFC: r213361
marius [Sun, 17 Oct 2010 12:33:15 +0000 (12:33 +0000)]
MFC: r213361

Try to adhere to style(9) and be consistent within this file.

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

13 years agoMFC: r213229
marius [Sun, 17 Oct 2010 12:29:57 +0000 (12:29 +0000)]
MFC: r213229

Use the mii_data provided via mii_attach_args and mii_pdata respectively
instead of reaching out for the softc of the parent.

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

13 years agoMFC: r213188
marius [Sun, 17 Oct 2010 12:16:36 +0000 (12:16 +0000)]
MFC: r213188

- Remove clause 3 and 4 from TNF licenses.
- Remove closes 3 & 4 from Manuel Bouyer's license.

Obtained from: NetBSD

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

13 years agoMFC: r204646
marius [Sun, 17 Oct 2010 12:11:42 +0000 (12:11 +0000)]
MFC: r204646

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from: NetBSD

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

13 years agoMFC: r213104
marius [Sun, 17 Oct 2010 12:05:37 +0000 (12:05 +0000)]
MFC: r213104

minor simplifications and cosmetics

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

13 years agoMFC: r213873
marius [Sun, 17 Oct 2010 11:51:55 +0000 (11:51 +0000)]
MFC: r213873

Explicitly lower the PIL to 0 as part of enabling interrupts, similar to
what is done on other platforms. Unlike as with the sched_throw(NULL)
called on BSPs during their startup apparently there's nothing which will
reliably lower it on APs. I'm unsure why this only came up on V215 though,
breaking these with r207248. My best guess is that these are the only
supported ones so far fast enough to lose some race.

PR: 151404

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

13 years agoMFC r213835: Add FreeBSD 8.2.
jh [Sun, 17 Oct 2010 11:40:29 +0000 (11:40 +0000)]
MFC r213835: Add FreeBSD 8.2.

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

13 years agoMFC r213837:
bz [Sun, 17 Oct 2010 09:13:47 +0000 (09:13 +0000)]
MFC r213837:

  Remove dead code:
  assignment to a local variable not used anywhere after that.

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

13 years agoMFC r213836:
bz [Sun, 17 Oct 2010 08:59:02 +0000 (08:59 +0000)]
MFC r213836:

  Style: make the asterisk go with the variable name, not the type.

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

13 years agoMFC r213832:
bz [Sun, 17 Oct 2010 08:46:34 +0000 (08:46 +0000)]
MFC r213832:

  Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not
  interested in the result and would leak a reference otherwise.

PR: kern/151435
Submitted by: Andrew Boyer (aboyer averesystems.com)

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

13 years agoRevert r213261 (MFC of r212652): vm_page_sleep change has not been MFCed yet
avg [Sat, 16 Oct 2010 20:13:15 +0000 (20:13 +0000)]
Revert r213261 (MFC of r212652): vm_page_sleep change has not been MFCed yet

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

13 years agoMFC r213648: panic_cpu variable should be volatile
avg [Sat, 16 Oct 2010 19:58:49 +0000 (19:58 +0000)]
MFC r213648: panic_cpu variable should be volatile

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

13 years agoMFC r213735: tmpfs + sendfile: do not produce partially valid pages for
avg [Sat, 16 Oct 2010 19:56:46 +0000 (19:56 +0000)]
MFC r213735: tmpfs + sendfile: do not produce partially valid pages for
vnode's tail

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

13 years agoMFC r213730: zfs + sendfile: do not produce partially valid pages for
avg [Sat, 16 Oct 2010 11:52:43 +0000 (11:52 +0000)]
MFC r213730: zfs + sendfile: do not produce partially valid pages for
vnode's tail

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

13 years agoMFC r213651: add kmem_map_free sysctl: query largest contiguous free range in kmem_map
avg [Sat, 16 Oct 2010 11:24:27 +0000 (11:24 +0000)]
MFC r213651: add kmem_map_free sysctl: query largest contiguous free range in kmem_map

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

13 years agoMFC r213527: vm.kmem_map_size: a sysctl to query current kmem_map->size
avg [Sat, 16 Oct 2010 11:19:31 +0000 (11:19 +0000)]
MFC r213527: vm.kmem_map_size: a sysctl to query current kmem_map->size

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

13 years agoMFC r213359:
kib [Sat, 16 Oct 2010 08:43:23 +0000 (08:43 +0000)]
MFC r213359:
Release the vnode lock and close the linker file vnode earlier in the
linker_load_file methods. This prevents the LOR between kernel linker sx
xlock and vnode lock.

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

13 years agoMFC r213354:
kib [Sat, 16 Oct 2010 08:38:12 +0000 (08:38 +0000)]
MFC r213354:
Cosmetic: make it less confusing when displaying RAID 1 level, that might
be 1+0 as well.

PR: kern/150936

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

13 years agoMFC r209866:
kib [Fri, 15 Oct 2010 18:07:45 +0000 (18:07 +0000)]
MFC r209866:
Fix spacing.

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

13 years agoMFC r209862:
kib [Fri, 15 Oct 2010 17:56:51 +0000 (17:56 +0000)]
MFC r209862:
For both i386 and amd64 pmap,
- change the type of pm_active to cpumask_t, which it is;
- in pmap_remove_pages(), compare with PCPU(curpmap), instead of
  dereferencing the long chain of pointers [1].
For amd64 pmap, remove the unneeded checks for validity of curpmap
in pmap_activate(), since curpmap should be always valid after
r209789.

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

13 years agoMFC r213284: tr: Fix '[=]=]' equivalence class.
jilles [Fri, 15 Oct 2010 15:37:16 +0000 (15:37 +0000)]
MFC r213284: tr: Fix '[=]=]' equivalence class.

A closing bracket immediately after '[=' should not be treated as special.

Different from the submitted patch, a string ending with '[=' does not cause
access beyond the terminating '\0'.

PR: bin/150384
Submitted by: Richard Lowe

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

13 years agoMFC r209605
alc [Fri, 15 Oct 2010 05:42:35 +0000 (05:42 +0000)]
MFC r209605
  Improve bufdone_finish()'s handling of the bogus page.  Specifically, if
  one or more mappings to the bogus page must be replaced, call pmap_qenter()
  just once.  Previously, pmap_qenter() was called for each mapping to the
  bogus page.

MFC r209902
  Change the implementation of vm_hold_free_pages() so that it performs at
  most one call to pmap_qremove(), and thus one TLB shootdown, instead of one
  call and TLB shootdown per page.

  Simplify the interface to vm_hold_free_pages().

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

13 years agoMFC of r204697 r204706 r204849 r204908 r205071 r205427 r212032
edwin [Fri, 15 Oct 2010 05:17:48 +0000 (05:17 +0000)]
MFC of r204697 r204706 r204849 r204908 r205071 r205427 r212032

r212032:

    Use basename(3) to determine the name of the program.

    Submitted by:   Alexander Best <arundel@>

r205427:

    Replace -b with -C and -B (as proposed by Alexander).
    Add -3, -A and -B to the usage.
    Update regression test for the new parameters.

r205071:

    - With the introduction of -A, -B and -3, not all combinations of
      arguments makes sense anymore. For example, what would a combination
      of -3 (show three months) and -y (show the whole year) do?
      We will abort on these cases.
    - Move the debug option -d to -H (from highlight), while -d is now
      used for setting the day of "today" so that -y and friends can
      be tested.

r204908:

    - Fix the highlighting for non-terminals when the last week is not
      7 days long.
    - "-m <N> <YYYY>" now prints only the month, not the whole year.

r204849:

    - document the -3, -A and -B properly in Synopsis.
    - add highlight of current date for non-terminals.
    - fix -J option.
    - code cleanup.

r204706:

Remove no-op of WARNS?=

    Submitted by:   Ulrich Sp??rlein <uqs@spoerlein.net>

r204697:

    - Implement -3 option (show previous, this and next month) option.
    - Add -A option (months after this month).
    - Add -B option (months before this month).
    - Fix highlighting of today in year overview.
    - Fix aligning of "foreign" characters.

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

13 years agoMFC r210124
alc [Fri, 15 Oct 2010 04:02:07 +0000 (04:02 +0000)]
MFC r210124
  Optimize pmap_remove()'s handling of PG_G mappings.

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

13 years agoMFC r209789
alc [Fri, 15 Oct 2010 03:23:53 +0000 (03:23 +0000)]
MFC r209789
  Correctly maintain the per-cpu field "curpmap" on amd64 just like we
  do on i386.  The consequences of not doing so on amd64 became apparent
  with the introduction of the COUNT_IPIS and COUNT_XINVLTLB_HITS
  options.  Specifically, single-threaded applications were generating
  unnecessary IPIs to shoot-down the TLB on other processors.

MFC r209887
  Reduce the number of global TLB shootdowns generated by pmap_qenter().
  Specifically, teach pmap_qenter() to recognize the case when it is being
  asked to replace a mapping with the very same mapping and not generate
  a shootdown.

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

13 years agoMFC r212873
alc [Fri, 15 Oct 2010 02:58:49 +0000 (02:58 +0000)]
MFC r212873
  Allow a POSIX shared memory object that is opened for read but not for
  write to nonetheless be mapped PROT_WRITE and MAP_PRIVATE, i.e.,
  copy-on-write.

PR: 150260

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

13 years agoMFC of r213875
edwin [Thu, 14 Oct 2010 21:58:51 +0000 (21:58 +0000)]
MFC of r213875

Update manual with regarding to the status of calendars/calendar.judaic.

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

13 years agoMFC of r211517 r212035
edwin [Thu, 14 Oct 2010 21:38:20 +0000 (21:38 +0000)]
MFC of r211517 r212035

r211517:
'\0' -> 0

Fix silly mistake by being overly zeaolous[sp] of applying the style rules.

r212035:
For calendars which don't match the solar-based Gregorian calendar,
be able to specify a year string in an entry.

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

13 years agoMFC of r213032 r213033
edwin [Thu, 14 Oct 2010 21:16:14 +0000 (21:16 +0000)]
MFC of r213032 r213033

Fix location and year of the Battle of the Plains of Abraham

PR:             150504
Submitted by:   Douglas Berry <bitnix@bitnix.ca>

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

13 years agoMFC r213406:
nwhitehorn [Thu, 14 Oct 2010 13:56:26 +0000 (13:56 +0000)]
MFC r213406:

Fix two subtle problems in PPC32 RTLD. The first is a concurrency issue
where long PLT calls in multi-threaded environments could end up with
incorrect jmptab values. The second is that, after the addition of extended
PLT support, I forgot to update the PLT icache synchronization code to cover
the extended PLT instead of just the basic PLT.

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

13 years agoMFC r213508:
kib [Thu, 14 Oct 2010 09:29:59 +0000 (09:29 +0000)]
MFC r213508:
Explicitely call cache_purge(fvp) when msdosfs_rename() succeeded, to flush
aliases created due to msdosfs being case-insensitive.

MFC r213543:
Add a comment describing the reason for calling cache_purge(fvp).

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

13 years agoMFC r212832: update manpage
obrien [Thu, 14 Oct 2010 03:11:41 +0000 (03:11 +0000)]
MFC r212832: update manpage

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

13 years agoMFC r212771:
obrien [Thu, 14 Oct 2010 02:10:49 +0000 (02:10 +0000)]
MFC r212771:
  Increase the hostname display width to >12 characters.

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

13 years agoMFC r212770 & r212832:
obrien [Thu, 14 Oct 2010 01:21:44 +0000 (01:21 +0000)]
MFC r212770 & r212832:
  + Add the SCRIPT environmental variable to the sub-shell.
  + Add the 'command' argument (if supplied on the command line)
    to the typescript file.

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

13 years agoMFC r212594:
emaste [Thu, 14 Oct 2010 00:46:33 +0000 (00:46 +0000)]
MFC r212594:

  Avoid repeatedly spamming the console while a timed out command is waiting
  to complete.  Instead, print one message after the timeout period expires,
  and one more when (if) the command eventually completes.

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

13 years agoMFC r200036 by scottl:
jh [Wed, 13 Oct 2010 14:02:45 +0000 (14:02 +0000)]
MFC r200036 by scottl:

Fix several cases where the periph lock was held over malloc.

PR: kern/130735

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

13 years agoMFC r213476:
kib [Wed, 13 Oct 2010 11:39:36 +0000 (11:39 +0000)]
MFC r213476:
Add cross-references to lrand48(3) and arc4random(3) from rand(3)
and random(3).

MFC r213477:
Missed space.

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

13 years agoMFC 213691:
gnn [Tue, 12 Oct 2010 22:10:07 +0000 (22:10 +0000)]
MFC 213691:

Add code to print the number and type of the CPU that is present in
the system as well has how many PMCs there are per CPU.  In this code
CPU and core are equivalent.

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

13 years agoMFC 213226:
jhb [Tue, 12 Oct 2010 19:28:20 +0000 (19:28 +0000)]
MFC 213226:
Rewrite the i386 memory probe:
- Check for SMAP data from the loader first.  If it exists, don't bother
  doing any VM86 calls at all.  This will be more friendly for non-BIOS
  boot environments such as EFI, etc.
- Move the base memory setup into a new basemem_setup() routine instead
  of duplicating it.
- Simplify the XEN case by removing all of the VM86/SMAP parsing code rather
  than just jumping over it.
- Adjust some comments to better explain the code flow.

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

13 years agoMFC 204310:
gnn [Tue, 12 Oct 2010 19:07:36 +0000 (19:07 +0000)]
MFC 204310:

Moved mcgrab(1) into a separate directory -- our .mk infrastructure
doesn't currently have support for building multiple programs in a
single makefile.

While here, fixed manpages and makefiles (missing dependencies).

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

13 years agoMFC 213300:
jhb [Tue, 12 Oct 2010 17:12:13 +0000 (17:12 +0000)]
MFC 213300:
If an RCS file is truncated, rcsfile_getdelta() will return NULL.  Instead
of faulting, check for NULL.  However, returning an error would cause csup
to just abort the entire update.  Instead, break out of the loop and
return ok.  The attempts to update the file will trigger a MD5 failure which
will cause csup to download the entire file as a fixup.

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

13 years agoMFC 213268:
jhb [Tue, 12 Oct 2010 16:23:50 +0000 (16:23 +0000)]
MFC 213268:
If rt2560_bbp_init() fails, don't drop the lock as the callers of
rt2560_init_locked() expect the lock to be held on return.

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

13 years agoMFC 213028,213328:
jhb [Tue, 12 Oct 2010 16:08:20 +0000 (16:08 +0000)]
MFC 213028,213328:
- Expand scope of tun/tap softc locks to cover more softc fields and
  driver-maintained ifnet fields (such as if_drv_flags).
- Use soft locks as the mutex that protects each interface's knote list
  rather than using the global knote list lock.  Also, use the softc
  for kn_hook instead of the cdev.
- Use mtx_sleep() instead of tsleep() when blocking in the read routines.
  This fixes a lost wakeup race.
- Remove D_NEEDGIANT now that the cdevsw routines use the softc lock
  where locking is needed.
- Lock IFQ when calculating the result for FIONREAD in tap(4).  tun(4)
  already did this.
- Remove remaining spl calls.

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

13 years agoMFC 213271:
jhb [Tue, 12 Oct 2010 15:48:14 +0000 (15:48 +0000)]
MFC 213271:
Account for unlocking a spin mutex in the lock profiling code in the !SMP
case.

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

13 years agoMFC 212974:
jhb [Tue, 12 Oct 2010 15:26:13 +0000 (15:26 +0000)]
MFC 212974:
Comment nit, set TDF_NEEDRESCHED after the comment describing why it is
done rather than before.

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

13 years agoMFC 205021:
jhb [Tue, 12 Oct 2010 13:13:20 +0000 (13:13 +0000)]
MFC 205021:
- Use an initializer macro to initialize fields in 'fake' FILE objects used
  by *sprintf(), etc.
- Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE
  objects.  This is currently a nop on FreeBSD, but is import for other
  platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply
  zero.

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

13 years agoMFC r213452:
kib [Tue, 12 Oct 2010 09:10:24 +0000 (09:10 +0000)]
MFC r213452:
Display PCID capability of CPU and add CPUID define for it.

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

13 years agoMFC r210977:
avg [Mon, 11 Oct 2010 22:46:15 +0000 (22:46 +0000)]
MFC r210977:

When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.

On behalf of: jkim

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

13 years agoMFC r208722: Remove unnecessary pointer type castings, shift operations
avg [Mon, 11 Oct 2010 22:41:01 +0000 (22:41 +0000)]
MFC r208722: Remove unnecessary pointer type castings, shift operations
and dead code.

On behalf of: jkim

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

13 years agoMFC 213409:
gnn [Mon, 11 Oct 2010 21:23:07 +0000 (21:23 +0000)]
MFC 213409:

Fix two aliases that had the same name but were pointing to different
events.  These are now disamiguated.

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

13 years agoMFC 213402:
gnn [Mon, 11 Oct 2010 16:55:17 +0000 (16:55 +0000)]
MFC 213402:
Fix punctuation and grammar, mostly by ending sentences with a period.

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

13 years agoMFC r213225:
delphij [Mon, 11 Oct 2010 11:25:37 +0000 (11:25 +0000)]
MFC r213225:

Add a bandaid for a long-standing race condition during route entry
un-expiring.

The previous version of code have no locking when testing rt_refcnt.
The result of the lack of locking may result in a condition where
a routing entry have a reference count but at the same time have
RTPRF_OURS bit set and an expiration timer.  These would eventually
lead to a panic:

panic: rtqkill route really not free

When the system have ICMP redirects accepted from local gateway
in a moderate frequency, for instance.

Commit this workaround for now until we have some better solution.

PR: kern/149804
Reviewed by: bz
Tested by: Zhao Xin, Pete French

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

13 years agoRegen.
kib [Mon, 11 Oct 2010 09:42:30 +0000 (09:42 +0000)]
Regen.

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

13 years agoMFC r213544:
kib [Mon, 11 Oct 2010 09:41:24 +0000 (09:41 +0000)]
MFC r213544:
Fix typo.

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

13 years agoGPART's control interface between kernel and user space has been
ae [Mon, 11 Oct 2010 09:39:32 +0000 (09:39 +0000)]
GPART's control interface between  kernel and user space has been
changed in r212614. Perform partial MFC of r213097 adapted to the
stable ABI:

  Implement "force" (-F) option for gpart destroy verb.
  This option doesn't passed to kernel and handled in user-space.
  With -F option gpart creates new "delete" request for each
  partition in table. Each request has flags="X" that disables
  auto-commit feature. Last request is the original "destroy" request.
  It has own flags and can have disabled or enabled auto-commit feature.
  If error is occurred when deleting partitions, then new "undo" request
  is created and all changes will be rolled back.

Approved by: kib (mentor)

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

13 years agoMFC r210470:
mm [Mon, 11 Oct 2010 09:34:46 +0000 (09:34 +0000)]
MFC r210470:

Import two changesets from OpenSolaris to make future updates easier.

The changes do not affect FreeBSD code because
zfs_znode_move(), cleanlocks() and cleanshares() are not used.

OpenSolaris onnv changeset: 9788:f660bc44f2e8, 9909:aa280f585a3e

Approved by: pjd, delphij (mentor)
Obtained from: OpenSolaris (Bug ID 68437006790232)

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

13 years agoMFC r212373:
kaiw [Sun, 10 Oct 2010 12:20:04 +0000 (12:20 +0000)]
MFC r212373:

  libelf is overly strict about the type and alignment of Elf_Data
  objects inside one ELF section, which prevents the creation of a ELF
  section with mixed data types. For example, gcc LTO use libelf to
  create a .gnu_lto_XXX section that contains integers and a string
  table, which doesn't work with our libelf implementation.

  The changes made in this commit include:
  * Allow Elf_Data type to be different than section type.
  * Relax Elf_Data alignment check.
  * Align each Elf_Data by their own alignment instead of section alignment.

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

13 years agoMove HAVE_LIBLZMA from Makefile to config_freebsd.h
mm [Sun, 10 Oct 2010 12:18:53 +0000 (12:18 +0000)]
Move HAVE_LIBLZMA from Makefile to config_freebsd.h

Approved by: delphij (mentor)

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

13 years ago- Add liblzma support to libarchive and usr.bin/tar
mm [Sun, 10 Oct 2010 08:41:08 +0000 (08:41 +0000)]
- Add liblzma support to libarchive and usr.bin/tar
- Do not link usr.bin/ar to liblzma if building bootstrap-tools and
the local system doesn't include liblzma (fixes world build on FreeBSD 7.x)

This is a direct commit.

Approved by: delphij (mentor)

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

13 years agoMFC r213382:
kib [Sun, 10 Oct 2010 07:07:21 +0000 (07:07 +0000)]
MFC r213382:
In makectx(), always use the tf_rsp from trap frame. %rsp is pushed
unconditionally by hardware on the trap.

PR:   amd64/151167

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

13 years agoMFC r212608 (by pjd):
ae [Sat, 9 Oct 2010 20:06:35 +0000 (20:06 +0000)]
MFC r212608 (by pjd):
  All gpart(8) subcommands apart from the 'bootcode' subcommand handle
  given geom/provider names with and without /dev/ prefix. Teach the
  'bootcode' subcommand to handle /dev/<foo> names as well.

Approved by: kib (mentor)

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

13 years agoMerge r213061 from head:
gavin [Sat, 9 Oct 2010 13:03:32 +0000 (13:03 +0000)]
Merge r213061 from head:
  Various changes from various sources:

  - Add "children" [1]
  - Add "acknowledgement", "acknowledgment", "Austria" and "haunted" [2]
  - Add "near", "antidisestablishmentarianism" and "Persephone" [2]
  - "Transvaal" should be capitalized [2]
  - Correct spelling of "structurelessness" and "Athena" [2]
  - Add missing atomic elements [3]
  - Add various words from "word of the day" lists [3]

PR: conf/149756 [1]
Submitted by: Nick Johnson <freebsd spatula.net> [1]
Obtained from: NetBSD [2], OpenBSD [3]

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