]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMerge libpcap-1.1.1.
rpaulo [Fri, 29 Oct 2010 18:43:23 +0000 (18:43 +0000)]
Merge libpcap-1.1.1.

13 years agoSync DLTs with the latest pcap version.
rpaulo [Fri, 29 Oct 2010 18:41:09 +0000 (18:41 +0000)]
Sync DLTs with the latest pcap version.

13 years agoMerging mptable under x86 left this option undefined for amd64 case.
attilio [Fri, 29 Oct 2010 18:38:36 +0000 (18:38 +0000)]
Merging mptable under x86 left this option undefined for amd64 case.
Fix that.

Sponsored by: Sandvine Incorporated
Reported by: jkim

13 years ago- Merge ram_attach() implementation for i386 and amd64
attilio [Fri, 29 Oct 2010 18:33:43 +0000 (18:33 +0000)]
- Merge ram_attach() implementation for i386 and amd64
- Rename RES_BUS_SPACE_* into BUS_SPACE_* for consistency
- Trim out an unnecessary checking condition

Sponsored by: Sandvine Incorporated
Requested and reviewed by: jhb

13 years ago- Note that non-superusers are not allowed to set the SF_ARCHIVED
jh [Fri, 29 Oct 2010 15:03:29 +0000 (15:03 +0000)]
- Note that non-superusers are not allowed to set the SF_ARCHIVED
  flag. [1]
- Note that also fchflags(2) will return EPERM for attempts to set or
  unset the SF_SNAPSHOT flag.

Submitted by: Garrett Cooper [1]
MFC after: 1 week

13 years agoModify nfs_open() in the experimental NFS client to be compatible
rmacklem [Fri, 29 Oct 2010 13:46:21 +0000 (13:46 +0000)]
Modify nfs_open() in the experimental NFS client to be compatible
with the regular NFS client. Also, fix a couple of mutex lock issues.

MFC after: 1 week

13 years agosh: Do IFS splitting on word in ${v+word} and ${v-word}.
jilles [Fri, 29 Oct 2010 13:42:18 +0000 (13:42 +0000)]
sh: Do IFS splitting on word in ${v+word} and ${v-word}.

The code is inspired by NetBSD sh somewhat, but different because we
preserve the old Almquist/Bourne/Korn ability to have an unquoted part in a
quoted ${v+word}. For example, "${v-"*"}" expands to $v as a single field if
v is set, but generates filenames otherwise.

Note that this is the only place where we split text literally from the
script (the similar ${v=word} assigns to v and then expands $v). The parser
must now add additional markers to allow the expansion code to know whether
arbitrary characters in substitutions are quoted.

Example:
  for i in ${$+a b c}; do echo $i; done

Exp-run done by: pav (with some other sh(1) changes)

13 years agoAdd a call for nfsrpc_close() to ncl_reclaim() in the experimental
rmacklem [Fri, 29 Oct 2010 13:34:57 +0000 (13:34 +0000)]
Add a call for nfsrpc_close() to ncl_reclaim() in the experimental
NFSv4 client, since the call in ncl_inactive() might be missed
because VOP_INACTIVE() is not guaranteed to be called before
VOP_RECLAIM().

MFC after: 1 week

13 years agoAdd sysctl kern.sched.cpusetsize to export the size of kernel cpuset,
davidxu [Fri, 29 Oct 2010 13:31:10 +0000 (13:31 +0000)]
Add sysctl kern.sched.cpusetsize to export the size of kernel cpuset,
also add sysconf() key _SC_CPUSET_SIZE to get sysctl value.

Submitted by: gcooper

13 years agoRemove meaningless XXXXX, that is a remain of comment, removed in r186200.
glebius [Fri, 29 Oct 2010 11:13:42 +0000 (11:13 +0000)]
Remove meaningless XXXXX, that is a remain of comment, removed in r186200.

13 years agoRevert a small part of the r198301, that is entirely unrelated to the
glebius [Fri, 29 Oct 2010 10:57:18 +0000 (10:57 +0000)]
Revert a small part of the r198301, that is entirely unrelated to the
r198301 itself. It also broke the logic of not sending more than one
ARP request per second, that consequently lead to a potential problem
of flooding network with broadcast packets.

MFC after: 1 week

13 years agoReturn previous sigaction correctly.
davidxu [Fri, 29 Oct 2010 09:35:36 +0000 (09:35 +0000)]
Return previous sigaction correctly.

Submitted by: avg

13 years agoRemove local variable 'first', instead check signal number in memory,
davidxu [Fri, 29 Oct 2010 07:04:45 +0000 (07:04 +0000)]
Remove local variable 'first', instead check signal number in memory,
because the variable can be in register, second checking the variable
may still return true, however this is unexpected.

13 years agoFix the printf() in init_heap so that it can run before the console is up.
nwhitehorn [Fri, 29 Oct 2010 00:37:35 +0000 (00:37 +0000)]
Fix the printf() in init_heap so that it can run before the console is up.

Pointed out by: marius

13 years agoFix netboot on some Apple machines on which calling dma-free on the
nwhitehorn [Fri, 29 Oct 2010 00:36:44 +0000 (00:36 +0000)]
Fix netboot on some Apple machines on which calling dma-free on the
network device can hang the machine. This causes the loss of 64 KB of
accessible memory on netbooted machines.

13 years agoFix some memory management issues discovered when trying to boot the PPC
nwhitehorn [Thu, 28 Oct 2010 23:46:05 +0000 (23:46 +0000)]
Fix some memory management issues discovered when trying to boot the PPC
OF loader on systems where address cells and size cells are both 2 (the
Mambo simulator) and fix an error where cons_probe() was called before
init_heap() but used malloc() to set environment variables.

MFC after: 1 month

13 years agosh: Only accept a '}' inside ${v+-=?...} if double-quote state matches.
jilles [Thu, 28 Oct 2010 22:34:49 +0000 (22:34 +0000)]
sh: Only accept a '}' inside ${v+-=?...} if double-quote state matches.
If double-quote state does not match, treat the '}' literally.

This ensures double-quote state remains the same before and after a
${v+-=?...} which helps with expand.c.

It makes things like
  ${foo+"\${bar}"}
which I have seen in the wild work as expected.

Exp-run done by: pav (with some other sh(1) changes)

13 years agoFix another "string" typo.
uqs [Thu, 28 Oct 2010 22:28:45 +0000 (22:28 +0000)]
Fix another "string" typo.

MFC after: 3 days

13 years agosh: Make double-quotes quote a '}' inside ${v#...} and ${v%...}.
jilles [Thu, 28 Oct 2010 21:51:14 +0000 (21:51 +0000)]
sh: Make double-quotes quote a '}' inside ${v#...} and ${v%...}.

Exp-run done by: pav (with some other sh(1) changes)
PR: bin/57554

13 years agoFix CPU load reporting independent of scheduler used.
uqs [Thu, 28 Oct 2010 20:18:26 +0000 (20:18 +0000)]
Fix CPU load reporting independent of scheduler used.

- Sample CPU usage data from kern.cp_times, this makes for a far more
  accurate and scheduler independent algorithm.
- Rip out the process list scraping that is no longer required.
- Don't update CPU usage sampling on every request, but every 15s
  instead. This makes it impossible for an attacker to hide the CPU load
  by triggering 4 samplings in short succession when the system is idle.
- After reaching the steady-state, the system will always report the
  average CPU load of the last 60 sampled seconds.
- Untangling of call graph.

PR: kern/130222
Tested by: Julian Dunn <jdunn@aquezada.com>
Gustau Pérez <gperez@entel.upc.edu>
Jürgen Weiß <weiss@uni-mainz.de>
MFC after: 2 weeks

I'm unsure if some MIB standard states this must be the load average
for, eg. 300s, it looks like net-snmp isn't even bothering to implement
the CPU load reporting at all.

13 years agoRemove useless stuff.
rpaulo [Thu, 28 Oct 2010 19:10:15 +0000 (19:10 +0000)]
Remove useless stuff.

13 years agoUpdate for the new tcpdump 4.1.1. The man page is a result of running
rpaulo [Thu, 28 Oct 2010 19:08:56 +0000 (19:08 +0000)]
Update for the new tcpdump 4.1.1. The man page is a result of running
tcpdump's autoconf on FreeBSD.

13 years agoMerge tcpdump-4.1.1.
rpaulo [Thu, 28 Oct 2010 19:06:17 +0000 (19:06 +0000)]
Merge tcpdump-4.1.1.

13 years agoMerge nexus.c from amd64 and i386 to x86 subtree.
attilio [Thu, 28 Oct 2010 16:31:39 +0000 (16:31 +0000)]
Merge nexus.c from amd64 and i386 to x86 subtree.

Sponsored by: Sandvine Incorporated
Tested by: gianni

13 years agoUpdate tcpdump to 4.1.1.
rpaulo [Thu, 28 Oct 2010 16:23:25 +0000 (16:23 +0000)]
Update tcpdump to 4.1.1.

Changes:

Thu.    April 1, 2010.  guy@alum.mit.edu.
  Summary for 4.1.1 tcpdump release
        Fix build on systems with PF, such as FreeBSD and OpenBSD.
        Don't blow up if a zero-length link-layer address is passed to
          linkaddr_string().

Thu.    March 11, 2010.  ken@netfunctional.ca/guy@alum.mit.edu.
  Summary for 4.1.0 tcpdump release
        Fix printing of MAC addresses for VLAN frames with a length
          field
        Add some additional bounds checks and use the EXTRACT_ macros
          more
        Add a -b flag to print the AS number in BGP packets in ASDOT
          notation rather than ASPLAIN notation
        Add ICMPv6 RFC 5006 support
        Decode the access flags in NFS access requests
        Handle the new DLT_ for memory-mapped USB captures on Linux
        Make the default snapshot (-s) the maximum
        Print name of device (when -L is used)
        Support for OpenSolaris (and SXCE build 125 and later)
        Print new TCP flags
        Add support for RPL DIO
        Add support for TCP User Timeout (UTO)
        Add support for non-standard Ethertypes used by 3com PPPoE gear
        Add support for 802.11n and 802.11s
        Add support for Transparent Ethernet Bridge ethertype in GRE
        Add 4 byte AS support for BGP printer
        Add support for the MDT SAFI 66 BG printer
        Add basic IPv6 support to print-olsr
        Add USB printer
        Add printer for ForCES
        Handle frames with an FCS
        Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames
        Fix TCP sequence number printing
        Report 802.2 packets as 802.2 instead of 802.3
        Don't include -L/usr/lib in LDFLAGS
        On x86_64 Linux, look in lib64 directory too
        Lots of code clean ups
        Autoconf clean ups
        Update testcases to make output changes
        Fix compiling with/out smi (--with{,out}-smi)
        Fix compiling without IPv6 support (--disable-ipv6)

13 years agoUpdate libpcap to 1.1.1.
rpaulo [Thu, 28 Oct 2010 16:22:13 +0000 (16:22 +0000)]
Update libpcap to 1.1.1.

Changes:

Thu.    April 1, 2010.  guy@alum.mit.edu.
Summary for 1.1.1 libpcap release
        Update CHANGES to reflect more of the changes in 1.1.0.
        Fix build on RHEL5.
        Fix shared library build on AIX.

Thu.    March 11, 2010.  ken@netfunctional.ca/guy@alum.mit.edu.
Summary for 1.1.0 libpcap release
        Add SocketCAN capture support
        Add Myricom SNF API support
        Update Endace DAG and ERF support
        Add support for shared libraries on Solaris, HP-UX, and AIX
        Build, install, and un-install shared libraries by default;
          don't build/install shared libraries on platforms we don't support
        Fix building from a directory other than the source directory
        Fix compiler warnings and builds on some platforms
        Update config.guess and config.sub
        Support monitor mode on mac80211 devices on Linux
        Fix USB memory-mapped capturing on Linux; it requires a new DLT_
          value
        On Linux, scan /sys/class/net for devices if we have it; scan
          it, or /proc/net/dev if we don't have /sys/class/net, even if
          we have getifaddrs(), as it'll find interfaces with no
          addresses
        Add limited support for reading pcap-ng files
        Fix BPF driver-loading error handling on AIX
        Support getting the full-length interface description on FreeBSD
        In the lexical analyzer, free up any addrinfo structure we got back
          from getaddrinfo().
        Add support for BPF and libdlpi in OpenSolaris (and SXCE)
        Hyphenate "link-layer" everywhere
        Add /sys/kernel/debug/usb/usbmon to the list of usbmon locations
        In pcap_read_linux_mmap(), if there are no frames available, call
          poll() even if we're in non-blocking mode, so we pick up
          errors, and check for the errors in question.
        Note that poll() works on BPF devices is Snow Leopard
        If an ENXIO or ENETDOWN is received, it may mean the device has
          gone away.  Deal with it.
        For BPF, raise the default capture buffer size to from 32k to 512k
        Support ps_ifdrop on Linux
        Added a bunch of #ifdef directives to make wpcap.dll (WinPcap) compile
         under cygwin.
        Changes to Linux mmapped captures.
        Fix bug where create_ring would fail for particular snaplen and
          buffer size combinations
        Update pcap-config so that it handles libpcap requiring
          additional libraries
        Add workaround for threadsafeness on Windows
        Add missing mapping for DLT_ENC <-> LINKTYPE_ENC
        DLT: Add DLT_CAN_SOCKETCAN
        DLT: Add Solaris ipnet
        Don't check for DLT_IPNET if it's not defined
        Add link-layer types for Fibre Channel FC-2
        Add link-layer types for Wireless HART
        Add link-layer types for AOS
        Add link-layer types for DECT
        Autoconf fixes (AIX, HP-UX, OSF/1, Tru64 cleanups)
        Install headers unconditionally, and include vlan.h/bluetooth.h if
          enabled
        Autoconf fixes+cleanup
        Support enabling/disabling bluetooth (--{en,dis}able-bluetooth)
        Support disabling SITA support (--without-sita)
        Return -1 on failure to create packet ring (if supported but
          creation failed)
        Fix handling of 'any' device, so that it can be opened, and no longer
          attempt to open it in Monitor mode
        Add support for snapshot length for USB Memory-Mapped Interface
        Fix configure and build on recent Linux kernels
        Fix memory-mapped Linux capture to support pcap_next() and
          pcap_next_ex()
        Fixes for Linux USB capture
        DLT: Add DLT_LINUX_EVDEV
        DLT: Add DLT_GSMTAP_UM
        DLT: Add DLT_GSMTAP_ABIS

13 years agoSet bootverbose directly in mi_startup() rather than via a SYSINIT. This
jhb [Thu, 28 Oct 2010 14:17:06 +0000 (14:17 +0000)]
Set bootverbose directly in mi_startup() rather than via a SYSINIT.  This
ensures 'bootverbose' is in a valid state for all SYSINITs.

Reported by: avg
MFC after: 1 week

13 years agoUse 'PCPU_GET(apic_id)' to determine the BSP's APIC ID on a UP machine
jhb [Thu, 28 Oct 2010 13:44:19 +0000 (13:44 +0000)]
Use 'PCPU_GET(apic_id)' to determine the BSP's APIC ID on a UP machine
when routing interrupts instead of cpu_apic_ids[0] since cpu_apic_ids[]
is only populated for multiple-CPU machines.  This also matches what the
code does when SMP is not enabled.

PR: bin/151616
Tested by: "Damian S. Kolodziejczyk"  damkol | gmail
Submitted by: avg
MFC after: 1 week

13 years agoCorrect a typo.
bz [Thu, 28 Oct 2010 11:09:12 +0000 (11:09 +0000)]
Correct a typo.

MFC after: 3 days

13 years agoMerge the mptable support from MD bits to x86 subtree.
attilio [Thu, 28 Oct 2010 07:58:06 +0000 (07:58 +0000)]
Merge the mptable support from MD bits to x86 subtree.

Sponsored by: Sandvine Incorporated
Discussed with: jhb

13 years agoTurns out we need functions.sh in this file for convert_to_megabytes call.
imp [Thu, 28 Oct 2010 06:45:20 +0000 (06:45 +0000)]
Turns out we need functions.sh in this file for convert_to_megabytes call.

13 years agosys/dev/xen/blkback/blkback.c:
gibbs [Thu, 28 Oct 2010 04:14:28 +0000 (04:14 +0000)]
sys/dev/xen/blkback/blkback.c:
In xbb_detach() only perform cleanup of our taskqueue and
device statistics structures if they have been initialized.
This avoids a panic when xbb_detach() is called on a partially
initialized device instance, due to an early failure in
attach.

Sponsored by: Spectra Logic Corporation

13 years agoFollow the change made in libthr, add ERANGE error code and more
davidxu [Thu, 28 Oct 2010 02:59:25 +0000 (02:59 +0000)]
Follow the change made in libthr, add ERANGE error code and more
EINVAL error cases.

13 years agoIn the data setup code for doing offloads the
jfv [Thu, 28 Oct 2010 00:16:54 +0000 (00:16 +0000)]
In the data setup code for doing offloads the
ip and tcp pointers were not reset after some
pullups. In practice this led to an NFS mount
failure when using UDP reported by Kevin Lo,
thanks Kevin. Fix from yongari, thank you!

13 years agoFind a jail's type as part of jailparam_init rather than waiting until
jamie [Wed, 27 Oct 2010 21:01:53 +0000 (21:01 +0000)]
Find a jail's type as part of jailparam_init rather than waiting until
it's absolutely necessary.

MFC after: 1 week

13 years agoUse shorten model name and add RTL8168, RTL8111 to the list of
yongari [Wed, 27 Oct 2010 19:01:09 +0000 (19:01 +0000)]
Use shorten model name and add RTL8168, RTL8111 to the list of
supported device. re(4) had been supported all variants of RTL8168,
RTL8111 and RTL810x. I think this change will cover all controllers
supported by re(4).

MFC after: 1 week

13 years agoLanguage cleanup.
des [Wed, 27 Oct 2010 18:48:23 +0000 (18:48 +0000)]
Language cleanup.

13 years agoUse ${PICFLAG} instead of -fpic.
rpaulo [Wed, 27 Oct 2010 18:46:56 +0000 (18:46 +0000)]
Use ${PICFLAG} instead of -fpic.

13 years agoAdd support for setting per-interface PnP information.
hselasky [Wed, 27 Oct 2010 17:38:05 +0000 (17:38 +0000)]
Add support for setting per-interface PnP information.

Submitted by: Nick Hibma
Approved by: thompsa (mentor)

13 years agoAdd initial BCM5718 family support. The BCM5718 family includes
yongari [Wed, 27 Oct 2010 17:20:19 +0000 (17:20 +0000)]
Add initial BCM5718 family support. The BCM5718 family includes
the dual port BCM5717 and BCM5718 devices which are intended for
mainstream workstation and entry-level server designs and
represents the twelfth generation of NetXtreme Ethernet controllers.
This family is the successor to the BCM5714/BCM5715 family and
supports IPv4/IPv6 checksum offloading, TSO, VLAN hardware tagging,
jumbo frames, MSI/MSIX, IOV, RSS and TSS.

This change set supports all hardware features except IOV and
RSS/TSS. Unlike its predecessors, only extended RX buffer
descriptors can be posted to the jumbo producer ring. Single RX
buffer descriptors for jumbo frame are not supported. RSS requires
a more substantial set of changes and will apply to a larger set
of NetXtreme devices so RSS/TSS multi-queue support will be
implemented in a future releases.

Special thanks to Broadcom who kindly sent a sample board to me
and to davidch who gave provided the initial support code.

Submitted by: davidch (initial version)
HW donated by: Broadcom

13 years agoAdd BCM5717C 10/100/1000TX PHY id.
yongari [Wed, 27 Oct 2010 17:16:40 +0000 (17:16 +0000)]
Add BCM5717C 10/100/1000TX PHY id.

13 years agoAdd a short note about kernel modules in FIXIT mode.
delphij [Wed, 27 Oct 2010 17:13:38 +0000 (17:13 +0000)]
Add a short note about kernel modules in FIXIT mode.

MFC after: 1 month

13 years ago[1] According to the x86 architectural specifications, no virtual-to-
alc [Wed, 27 Oct 2010 16:46:37 +0000 (16:46 +0000)]
[1] According to the x86 architectural specifications, no virtual-to-
physical page mapping should span two or more MTRRs of different types.
Add a pmap function, pmap_demote_DMAP(), by which the MTRR module can
ensure that the direct map region doesn't have such a mapping.

[2] Fix a couple of nearby style errors in amd64_mrset().

[3] Re-enable the use of 1GB page mappings for implementing the direct
map.  (See also r197580 and r213897.)

Tested by: kib@ on a Westmere-family processor [3]
MFC after: 3 weeks

13 years agoCorrect a typo.
jh [Wed, 27 Oct 2010 14:11:11 +0000 (14:11 +0000)]
Correct a typo.

PR: 151321
Submitted by: Simon Walton
MFC after: 3 days

13 years agoAdd missing "readahead" to the nfs_opts list.
jh [Wed, 27 Oct 2010 14:08:37 +0000 (14:08 +0000)]
Add missing "readahead" to the nfs_opts list.

PR: 151321
Tested by: Simon Walton
MFC after: 2 weeks

13 years agoAdd attachement to my mentors
bapt [Wed, 27 Oct 2010 12:51:36 +0000 (12:51 +0000)]
Add attachement to my mentors

Reporter by: wxs (on irc)

13 years agoCheck small set and reject it, this is how kernel did. Always use the
davidxu [Wed, 27 Oct 2010 09:59:43 +0000 (09:59 +0000)]
Check small set and reject it, this is how kernel did. Always use the
size kernel is using.

13 years ago- Revert r214409.
davidxu [Wed, 27 Oct 2010 09:29:03 +0000 (09:29 +0000)]
- Revert r214409.
- Use long word to figure out sizeof kernel cpuset, hope it works.

13 years agoSync code with tzcode2010m
edwin [Wed, 27 Oct 2010 07:14:46 +0000 (07:14 +0000)]
Sync code with tzcode2010m

asctime.c:
* Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if
  asctime_r is called with a NULL struct tm pointer.  (Note that
  asctime_r is called by ctime_r and asctime; asctime is called by
  ctime.)

localtime.c:
* Set errno to EINVAL and return WRONG if time1 is called with a
  NULL struct tm pointer; avoid dereference if a NULL struct tm
  pointer is passed to timelocal, timegm, or timeoff.  (Note that
  time1 is called by mktime, timegm, and timeoff; mktime is called
  by timelocal.)
* more core-avoidance work
* Change to set timezone and altzone based on time types with
  greatest transition times (for the benefit of Asia/Seoul).

zic.8:
* Warning about case-sensitivity of names, but not of abbrevations

zic.c:
* Conditionally output extra types with most-recently-use offsets
  last (for use by systems with pre-2011 versions of localtime.c,
  helping to ensure that globals "altzone and "timezone" get set
  correctly).

The code has been running for nearly four weeks on my laptop running
FreeBSD 8.1 without a problem.

MFC after: 1 month

13 years agoRemove locking and unlock in pthread_mutex_destroy, because
davidxu [Wed, 27 Oct 2010 04:19:07 +0000 (04:19 +0000)]
Remove locking and unlock in pthread_mutex_destroy, because
it can not fix race condition in application code, as a result,
the problem described in PR threads/151767 is avoided.

13 years agoIf input parameter cpusetsize is zero, give userland size of cpuset mask
davidxu [Wed, 27 Oct 2010 02:32:54 +0000 (02:32 +0000)]
If input parameter cpusetsize is zero, give userland size of cpuset mask
kernel is using.

13 years agoAdd a flag to the experimental NFSv4 client to indicate when
rmacklem [Tue, 26 Oct 2010 23:18:37 +0000 (23:18 +0000)]
Add a flag to the experimental NFSv4 client to indicate when
delegations are being returned for reasons other than a Recall.
Also, re-organize nfscl_recalldeleg() slightly, so that it leaves
clearing NMODIFIED to the ncl_flush() call and invalidates the
attribute cache after flushing. It is hoped that these changes
might fix the problem others have seen when using the NFSv4
client with delegations enabled, since I can't reliably reproduce
the problem. These changes only affect the client when doing NFSv4
mounts with delegations enabled.

MFC after: 10 days

13 years agoUse fprintf(stderr) instead of gctl_error() to print a warning about too
pjd [Tue, 26 Oct 2010 22:46:15 +0000 (22:46 +0000)]
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.

MFC after: 3 days

13 years agoDocument newly added loader tunables "hw.acpi.install_interface" and
jkim [Tue, 26 Oct 2010 21:22:55 +0000 (21:22 +0000)]
Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".

13 years ago- Save errno values before calling warn(3) so that errors are correctly
jhb [Tue, 26 Oct 2010 19:11:09 +0000 (19:11 +0000)]
- Save errno values before calling warn(3) so that errors are correctly
  reported.
- Use powerof2() from <sys/param.h> rather than a copy and paste version.

Submitted by: gcooper
MFC after: 1 week

13 years agoFix formatting.
brucec [Tue, 26 Oct 2010 19:10:59 +0000 (19:10 +0000)]
Fix formatting.

Reported by: yongari

13 years agoAdd two new loader tunables 'hw.acpi.install_interface' and
jkim [Tue, 26 Oct 2010 18:59:50 +0000 (18:59 +0000)]
Add two new loader tunables 'hw.acpi.install_interface' and
'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
interfaces from the pre-defined list in ACPICA.  For example,

hw.acpi.install_interface="FreeBSD"

lets _OSI("FreeBSD") method to return 0xffffffff (or success) and

hw.acpi.remove_interface="Windows 2009"

lets _OSI("Windows 2009") method to return zero (or failure).  Both are
comma-separated lists and leading white spaces are ignored.  For example,
the following examples are valid:

hw.acpi.install_interface="Linux, FreeBSD"
hw.acpi.remove_interface="Windows 2006, Windows 2006.1"

13 years agoAdd some missing documentation to the man page:
bcr [Tue, 26 Oct 2010 18:32:51 +0000 (18:32 +0000)]
Add some missing documentation to the man page:

- FILES section ref: ~/nsmb.conf
- use of password in examples section
- use of simple encryption for password in examples section

PR:                 docs/132311
Submitted by:       David Horn (dhorn2000 at gmail dot com)
Patch corrected by: trhodes
Approved by:        trhodes
MFC after:          5 days

13 years agoStyle fix.
attilio [Tue, 26 Oct 2010 18:01:28 +0000 (18:01 +0000)]
Style fix.

Reported by: bde, dim

13 years agoAdd information about the values and default setting of the
brucec [Tue, 26 Oct 2010 16:49:18 +0000 (16:49 +0000)]
Add information about the values and default setting of the
kern.cam.ada.spindown_shutdown sysctl.

MFC after: 3 weeks

13 years agoRemove usage of PRI* macro for style compliancy.
attilio [Tue, 26 Oct 2010 16:16:15 +0000 (16:16 +0000)]
Remove usage of PRI* macro for style compliancy.

Requested by: bde, jhb
Sponsored by: Sandvine Incorporated

13 years agoBugfix merge from OpenSolaris:
mm [Tue, 26 Oct 2010 15:48:03 +0000 (15:48 +0000)]
Bugfix merge from OpenSolaris:

OpenSolaris onnv-revision: 10209:91f47f0e7728
6830541 zfs_get_data_trips on a verify
6696242 multiple zfs_fillpage() zfs: accessing past end of object panics
6785914 zfs fails to drop dn_struct_rwlock in recovery code path

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 683054166962426785914)
MFC after: 2 weeks

13 years agoMinor grammar fix.
gjb [Tue, 26 Oct 2010 13:07:01 +0000 (13:07 +0000)]
Minor grammar fix.

Submitted by: arundel (via email)
Approved by: jkois (mentor)
Patch by: arundel
MFC after: 5 days

13 years agoMerge dump_machdep.c i386/amd64 under the x86 subtree.
attilio [Tue, 26 Oct 2010 12:46:26 +0000 (12:46 +0000)]
Merge dump_machdep.c i386/amd64 under the x86 subtree.

Sponsored by: Sandvine Incorporated
Tested by: gianni

13 years agoBug fix delta to the em driver:
jfv [Tue, 26 Oct 2010 00:07:58 +0000 (00:07 +0000)]
Bug fix delta to the em driver:
- Chasin down bogus watchdogs has led to an improved
  design to this handling, the hang decision takes
  place in the tx cleanup, with only a simple report
  check in local_timer. Our tests have shown no false
  watchdogs with this code.
- VLAN fixes from jhb, the shadow vfta should be per
  interface, but as global it was not. Thanks John.
- Bug fixes in the support for new PCH2 hardware.
- Thanks for all the help and feedback on the driver,
  changes to lem with be coming shortly as well.

13 years agoBring vfs.ufs.dirhash_maxmem into the age of the fruitbat and make it
ivoras [Mon, 25 Oct 2010 21:46:23 +0000 (21:46 +0000)]
Bring vfs.ufs.dirhash_maxmem into the age of the fruitbat and make it
autotuned. It is only an upper bound (the memory is not always allocated)
and the system contains a vm_lowmem handler so nothing will crash and burn
if it's tuned too high.

Reviewed by: mckusick

13 years ago- Given that in one-shot mode tick_et_start() also is called frequently
marius [Mon, 25 Oct 2010 20:52:33 +0000 (20:52 +0000)]
- Given that in one-shot mode tick_et_start() also is called frequently
  introduce function pointers once set up to the respective implementation
  for reading the (S)TICK and writing the (S)STICK_COMPARE registers as a
  compromise between duplicating code and selecting between different
  implementations during execution over and over again, similar to what is
  done elsewhere in the MD in order to support different CPU models that
  won't ever change at runtime.
- In the remaining tick interrupt handler further push down disabling of
  interrupts to the periodic case as it isn't necessary here in one-shot
  mode at all.

13 years agoReimplemented "gpart destroy -F". Now it does all work in kernel.
ae [Mon, 25 Oct 2010 16:23:35 +0000 (16:23 +0000)]
Reimplemented "gpart destroy -F". Now it does all work in kernel.
This was needed for recover implementation.

Implement the recover command for GPT. Now GPT will marked as
corrupt when any of three types of corruption will be detected:
1. Damaged primary GPT header or table
2. Damaged secondary GPT header or table
3. Secondary header is not located in the last LBA
Marked GPT becomes read-only. Any changes with corrupt table
are prohibited. Only "destroy" and "recover" commands are allowed.

Discussed with: geom@ (mostly silence)
Tested by: Ilya A. Arhipov
Approved by: mav (mentor)
MFC after: 2 weeks

13 years agoFix typo in comment.
thomas [Mon, 25 Oct 2010 16:11:37 +0000 (16:11 +0000)]
Fix typo in comment.

13 years agoThe EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers
nwhitehorn [Mon, 25 Oct 2010 15:51:43 +0000 (15:51 +0000)]
The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers
within the first 4 bytes of the EHCI memory space. For controllers that
use big-endian MMIO, reading them with 1- and 2-byte reads would then
return the wrong values. Instead, read the combined register with a 4-byte
read and mask out the interesting quantities.

13 years agoDon't create spurious /dev entries.
nwhitehorn [Mon, 25 Oct 2010 15:41:12 +0000 (15:41 +0000)]
Don't create spurious /dev entries.

Submitted by: andreast

13 years agoUse 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
jhb [Mon, 25 Oct 2010 15:31:13 +0000 (15:31 +0000)]
Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().

Requested by: bde

13 years agoUse intr_disable() and intr_restore() instead of frobbing the flags register
jhb [Mon, 25 Oct 2010 15:28:03 +0000 (15:28 +0000)]
Use intr_disable() and intr_restore() instead of frobbing the flags register
directly to disable interrupts.

Reviewed by: bde (earlier version)
MFC after: 2 weeks

13 years agoReduce the difference between hirunningspace and lorunningspace,
ivoras [Mon, 25 Oct 2010 14:05:25 +0000 (14:05 +0000)]
Reduce the difference between hirunningspace and lorunningspace,
it should help interactivity in edge cases.

13 years agoUse function tdfind() to find a thread.
davidxu [Mon, 25 Oct 2010 13:13:16 +0000 (13:13 +0000)]
Use function tdfind() to find a thread.

13 years agoFix typo.
davidxu [Mon, 25 Oct 2010 11:16:50 +0000 (11:16 +0000)]
Fix typo.

13 years agoGet cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy().
davidxu [Mon, 25 Oct 2010 09:16:04 +0000 (09:16 +0000)]
Get cpuset in pthread_attr_get_np() and free it in pthread_attr_destroy().

MFC after: 7 days

13 years agoFactor out DDB commands from r204145, r204279 into if_debug.c for further
bz [Mon, 25 Oct 2010 08:30:19 +0000 (08:30 +0000)]
Factor out DDB commands from r204145, r204279 into if_debug.c for further
enhancements (1).  Switch to a standard 2-clause BSD license for this (2).

Unfortunately we have to un-static the ifindex_table for this but do not
publicly export it.

Suggested by: rwatson (1) a while back.
Approved by: thompsa (2) for the change from r204279.
MFC after: 6 days

13 years agoMake hw.snd.vpc_0db to be also a loader tunable.
mav [Mon, 25 Oct 2010 08:25:44 +0000 (08:25 +0000)]
Make hw.snd.vpc_0db to be also a loader tunable.

13 years agoAdd missing mtx_destroy() on channel attach failure.
mav [Mon, 25 Oct 2010 07:41:21 +0000 (07:41 +0000)]
Add missing mtx_destroy() on channel attach failure.

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

13 years agoDo some whitespace and `identify` output cleanup.
mav [Mon, 25 Oct 2010 07:17:07 +0000 (07:17 +0000)]
Do some whitespace and `identify` output cleanup.

Submitted by: arundel
MFC after: 2 weeks

13 years agoAdd Makefile entry to install two new example files.
julian [Sun, 24 Oct 2010 23:25:14 +0000 (23:25 +0000)]
Add Makefile entry to install two new example files.

MFC after: 2 weeks

13 years agoAdd a jails directory in the examples section
julian [Sun, 24 Oct 2010 23:19:11 +0000 (23:19 +0000)]
Add a jails directory in the examples section

MFC after: 2 weeks

13 years agoAdd two scripts that demonstrate how to make and
julian [Sun, 24 Oct 2010 22:59:38 +0000 (22:59 +0000)]
Add two scripts that demonstrate how to make and
hook together jails using teh vortual networking feature.

Submitted by: Yavuz Gokirmak
MFC after: 2 weeks

13 years agosh: Ignore double-quotes in arithmetic rather than treating them as quotes.
jilles [Sun, 24 Oct 2010 22:25:38 +0000 (22:25 +0000)]
sh: Ignore double-quotes in arithmetic rather than treating them as quotes.

This provides similar behaviour, but allows a simpler parser.

This changes r206473.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Do not allow overriding a special builtin with a function.
jilles [Sun, 24 Oct 2010 22:03:21 +0000 (22:03 +0000)]
sh: Do not allow overriding a special builtin with a function.
This is a syntax error.

POSIX does not say explicitly whether defining a function with the same name
as a special builtin is allowed, but it does say that it is impossible to
call such a function.

A special builtin can still be overridden with an alias.

This commit is part of a set of changes that will ensure that when
something looks like a special builtin to the parser, it is one. (Not the
other way around, as it remains possible to call a special builtin named
by a variable or other substitution.)

Exp-run done by: pav (with some other sh(1) changes)

13 years agoAdd initial inet DDB support for show in_ifaddr and show sin commands which
bz [Sun, 24 Oct 2010 22:02:36 +0000 (22:02 +0000)]
Add initial inet DDB support for show in_ifaddr and show sin commands which
proved to be useful while debugging address list problems.

MFC after: 6 days

13 years agoAdd TSO support over VLAN for i82550/i82551. Controller requires
yongari [Sun, 24 Oct 2010 21:59:51 +0000 (21:59 +0000)]
Add TSO support over VLAN for i82550/i82551. Controller requires
VLAN hardware tagging to make TSO work over VLAN. So if VLAN
hardware tagging is disabled explicitly clear TSO over VLAN. While
I'm here allow disabling VLAN TX checksum offloading.

Tested by: Liudas < liudasb <> centras dot lt >
MFC after: 10 days

13 years agoUse bge_chipid to compare controller ids. r214251 incorrectly used
yongari [Sun, 24 Oct 2010 20:54:46 +0000 (20:54 +0000)]
Use bge_chipid to compare controller ids. r214251 incorrectly used
bge_chiprev.

Reported by: Buganini <buganini <> gmail dot com >

13 years agosh: Make sure defined functions can actually be called.
jilles [Sun, 24 Oct 2010 20:45:13 +0000 (20:45 +0000)]
sh: Make sure defined functions can actually be called.

Add some conservative checks on function names:
- Disallow expansions or quoting characters; these can only be called via
  strange control characters
- Disallow '/'; these functions cannot be called anyway, as exec.c assumes
  they are pathnames
- Make the CTL* bytes work properly in function names.

These are syntax errors.

POSIX does not require us to support more than names (letters, digits and
underscores, not starting with a digit), but I do not want to restrict it
that much at this time.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Check whether dup2 was successful for >&FD and <&FD.
jilles [Sun, 24 Oct 2010 20:09:49 +0000 (20:09 +0000)]
sh: Check whether dup2 was successful for >&FD and <&FD.

A failure (usually caused by FD not being open) is a redirection error.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Add a test trying to close a descriptor that is not open.
jilles [Sun, 24 Oct 2010 19:56:34 +0000 (19:56 +0000)]
sh: Add a test trying to close a descriptor that is not open.

In stable/8 and older, this fails. Some of the redirection changes in head
have fixed it.

13 years agoMake da driver to handle some probably broken Android devices, returning
mav [Sun, 24 Oct 2010 18:53:16 +0000 (18:53 +0000)]
Make da driver to handle some probably broken Android devices, returning
zero media and sector size instead of "Medium not present" error,
until some confirmation button is tapped on device.

13 years agoBefore this change on first connect between primary and secondary we
pjd [Sun, 24 Oct 2010 17:28:25 +0000 (17:28 +0000)]
Before this change on first connect between primary and secondary we
initialize all the data. This is huge waste of time and resources if
there were no writes yet, as there is no real data to synchronize.

Optimize this by sending "virgin" argument to secondary, which gives it a hint
that synchronization is not needed.

In the common case (where noth nodes are configured at the same time) instead
of synchronizing everything, we don't synchronize at all.

MFC after: 1 week

13 years agoImplement nv_exists() function that returns true if argument of the given
pjd [Sun, 24 Oct 2010 17:24:08 +0000 (17:24 +0000)]
Implement nv_exists() function that returns true if argument of the given
name exists.

MFC after: 3 days

13 years agoMove all NV defines into nv.c, they are not used externally thus there is
pjd [Sun, 24 Oct 2010 17:22:34 +0000 (17:22 +0000)]
Move all NV defines into nv.c, they are not used externally thus there is
no need to make then visible from outside.

MFC after: 3 days

13 years agosh: Change ! within a pipeline to start a new pipeline instead.
jilles [Sun, 24 Oct 2010 17:06:49 +0000 (17:06 +0000)]
sh: Change ! within a pipeline to start a new pipeline instead.

This is how ksh93 treats ! within a pipeline and makes the ! in
  a | ! b | c
negate the exit status of the pipeline, as if it were
  a | { ! b | c; }

Side effect: something like
  f() ! a
is now a syntax error, because a function definition takes a command,
not a pipeline.

Exp-run done by: pav (with some other sh(1) changes)

13 years agosh: Add some testcases for alias expansion.
jilles [Sun, 24 Oct 2010 16:55:17 +0000 (16:55 +0000)]
sh: Add some testcases for alias expansion.

13 years agoMostly revert r203420, and add similar functionality into ada(4) since the
brucec [Sun, 24 Oct 2010 16:31:57 +0000 (16:31 +0000)]
Mostly revert r203420, and add similar functionality into ada(4) since the
existing code caused problems with some SCSI controllers.

A new sysctl kern.cam.ada.spindown_shutdown has been added that controls
whether or not to spin-down disks when shutting down.
Spinning down the disks unloads/parks the heads - this is
much better than removing power when the disk is still
spinning because otherwise an Emergency Unload occurs which may cause damage
to the actuator.

PR: kern/140752
Submitted by:   olli
Reviewed by: arundel
Discussed with: mav
MFC after: 2 weeks