Commit Graph

158936 Commits

Author SHA1 Message Date
Jilles Tjoelker
6c38071288 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)
2010-10-28 22:34:49 +00:00
Ulrich Spörlein
02ac77f222 Fix another "string" typo.
MFC after:	3 days
2010-10-28 22:28:45 +00:00
Jilles Tjoelker
9cec947f3f sh: Make double-quotes quote a '}' inside ${v#...} and ${v%...}.
Exp-run done by:	pav (with some other sh(1) changes)
PR:			bin/57554
2010-10-28 21:51:14 +00:00
Ulrich Spörlein
ac203a768d 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.
2010-10-28 20:18:26 +00:00
Rui Paulo
c2ab553ee5 Remove useless stuff. 2010-10-28 19:10:15 +00:00
Rui Paulo
636720d7bc Update for the new tcpdump 4.1.1. The man page is a result of running
tcpdump's autoconf on FreeBSD.
2010-10-28 19:08:56 +00:00
Rui Paulo
27df3f5ddd Merge tcpdump-4.1.1. 2010-10-28 19:06:17 +00:00
Attilio Rao
ba2a27351b Merge nexus.c from amd64 and i386 to x86 subtree.
Sponsored by:	Sandvine Incorporated
Tested by:	gianni
2010-10-28 16:31:39 +00:00
Rui Paulo
6d59e2f382 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)
2010-10-28 16:23:25 +00:00
John Baldwin
b94e6f0ef6 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
2010-10-28 14:17:06 +00:00
John Baldwin
89d84a4055 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
2010-10-28 13:44:19 +00:00
Bjoern A. Zeeb
9398643636 Correct a typo.
MFC after:	3 days
2010-10-28 11:09:12 +00:00
Attilio Rao
a3da97926d Merge the mptable support from MD bits to x86 subtree.
Sponsored by:	Sandvine Incorporated
Discussed with:	jhb
2010-10-28 07:58:06 +00:00
Warner Losh
1adaedf5cd Turns out we need functions.sh in this file for convert_to_megabytes call. 2010-10-28 06:45:20 +00:00
Justin T. Gibbs
8f1382d1f2 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
2010-10-28 04:14:28 +00:00
David Xu
1200ef56b5 Follow the change made in libthr, add ERANGE error code and more
EINVAL error cases.
2010-10-28 02:59:25 +00:00
Jack F Vogel
35928b338e 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!
2010-10-28 00:16:54 +00:00
Jamie Gritton
b81422ef7f Find a jail's type as part of jailparam_init rather than waiting until
it's absolutely necessary.

MFC after:	1 week
2010-10-27 21:01:53 +00:00
Pyun YongHyeon
36fe384754 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
2010-10-27 19:01:09 +00:00
Dag-Erling Smørgrav
1f9d174116 Language cleanup. 2010-10-27 18:48:23 +00:00
Rui Paulo
8399e5f307 Use ${PICFLAG} instead of -fpic. 2010-10-27 18:46:56 +00:00
Hans Petter Selasky
8427ed847d Add support for setting per-interface PnP information.
Submitted by:	Nick Hibma
Approved by:	thompsa (mentor)
2010-10-27 17:38:05 +00:00
Pyun YongHyeon
1108273af4 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
2010-10-27 17:20:19 +00:00
Pyun YongHyeon
f8d8720ebc Add BCM5717C 10/100/1000TX PHY id. 2010-10-27 17:16:40 +00:00
Xin LI
49727e098f Add a short note about kernel modules in FIXIT mode.
MFC after:	1 month
2010-10-27 17:13:38 +00:00
Alan Cox
92ababa777 [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
2010-10-27 16:46:37 +00:00
Jaakko Heinonen
baa0988a1e Correct a typo.
PR:		151321
Submitted by:	Simon Walton
MFC after:	3 days
2010-10-27 14:11:11 +00:00
Jaakko Heinonen
843ab5514d Add missing "readahead" to the nfs_opts list.
PR:		151321
Tested by:	Simon Walton
MFC after:	2 weeks
2010-10-27 14:08:37 +00:00
Baptiste Daroussin
f631a04d26 Add attachement to my mentors
Reporter by: wxs (on irc)
2010-10-27 12:51:36 +00:00
David Xu
67753965a8 Check small set and reject it, this is how kernel did. Always use the
size kernel is using.
2010-10-27 09:59:43 +00:00
David Xu
4a5478709b - Revert r214409.
- Use long word to figure out sizeof kernel cpuset, hope it works.
2010-10-27 09:29:03 +00:00
Edwin Groothuis
f8768d2a1a 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
2010-10-27 07:14:46 +00:00
David Xu
e96b4de80e 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.
2010-10-27 04:19:07 +00:00
David Xu
1676b42546 If input parameter cpusetsize is zero, give userland size of cpuset mask
kernel is using.
2010-10-27 02:32:54 +00:00
Rick Macklem
c5dd9d8c37 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
2010-10-26 23:18:37 +00:00
Pawel Jakub Dawidek
240dd5b5aa 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
2010-10-26 22:46:15 +00:00
Jung-uk Kim
66f369d023 Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".
2010-10-26 21:22:55 +00:00
John Baldwin
c02999d982 - 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
2010-10-26 19:11:09 +00:00
Rebecca Cran
827f816c80 Fix formatting.
Reported by: yongari
2010-10-26 19:10:59 +00:00
Jung-uk Kim
ae19af49e0 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"
2010-10-26 18:59:50 +00:00
Benedict Reuschling
503538eec1 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
2010-10-26 18:32:51 +00:00
Attilio Rao
b2724beede Style fix.
Reported by:	bde, dim
2010-10-26 18:01:28 +00:00
Rebecca Cran
01486632e9 Add information about the values and default setting of the
kern.cam.ada.spindown_shutdown sysctl.

MFC after:	3 weeks
2010-10-26 16:49:18 +00:00
Attilio Rao
61ba91df0d Remove usage of PRI* macro for style compliancy.
Requested by:	bde, jhb
Sponsored by:	Sandvine Incorporated
2010-10-26 16:16:15 +00:00
Martin Matuska
e25376bdd0 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 6830541, 6696242, 6785914)
MFC after:	2 weeks
2010-10-26 15:48:03 +00:00
Glen Barber
7d6af40d1c Minor grammar fix.
Submitted by:	arundel (via email)
Approved by:	jkois (mentor)
Patch by:	arundel
MFC after:	5 days
2010-10-26 13:07:01 +00:00
Attilio Rao
256439c972 Merge dump_machdep.c i386/amd64 under the x86 subtree.
Sponsored by:	Sandvine Incorporated
Tested by:	gianni
2010-10-26 12:46:26 +00:00
Jack F Vogel
7deff7f9b4 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.
2010-10-26 00:07:58 +00:00
Ivan Voras
8e431dd6f1 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
2010-10-25 21:46:23 +00:00
Marius Strobl
36c7255a81 - 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.
2010-10-25 20:52:33 +00:00