194153 Commits

Author SHA1 Message Date
gavin
02c40422cc Merge r256294 (by adrian) from head:
Fix the "am I a net80211 vap" check for bpf listeners.

  I changed it to use if_transmit a while ago but apparently with monitor
  mode the if_transmit method is overridden.

  This is (mostly) a workaround until a more permanent solution can be
  found.

Candidate for 10.0.

Submitted by:	Patrick Kelsey <kelsey@ieee.org>
2013-12-10 13:38:39 +00:00
gavin
a26c2c1c13 Merge r258758 (by adrian) from head:
Make sure any waiters on the scan results get notified if the scan task
  decides to do nothing.

  If this isn't done, then a scan request whilst a scan occurs in an
  active channel set or a completed channel set will hang.

Candidate for 10.0.
2013-12-10 13:36:56 +00:00
gavin
977caa62b9 Merge r257754 (by adrian) from head:
Don't return ENOBUFS if the transmit path handles the frame but queues
  it (eg in power save.)

10.0 candidate.

PR:		kern/183727
2013-12-10 13:35:04 +00:00
dim
837dce1466 MFC r259083:
For WARNS <= 3, change the clang warning flag -Wno-conversion to
-Wno-enum-conversion.  In earlier clang versions (before 3.2), the
latter did not exist, and suppressing enum conversion warnings was
really the goal of this warning suppression flag.

This should enable the same kind of warning again as was fixed by
r259072 ("incompatible integer to pointer conversion passing 'Elf_Addr'
(aka 'unsigned int') to parameter of type 'void *'"), and which was only
emitted by gcc.

Noticed by:	kib
2013-12-10 07:28:26 +00:00
dim
f972f6b92d MFC r259053:
Pull in r196590 from upstream clang trunk (by rdivacky):

  Move the body of GCCInstallationDetector ctor into an init() function
  and call it from its only user. The linux toolchain. This saves quite
  a lot of directory searching on other platforms.

See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the
original discussion.  With this fix, the search for gcc installations is
completely eliminated on FreeBSD.

Reported by:	Kurt Lidl <lidl@pix.net>
2013-12-10 07:25:25 +00:00
gjb
fca381ba6d MFC r259079:
Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
  passed to 'make release'.

Sponsored by:	The FreeBSD Foundation
2013-12-10 00:35:33 +00:00
np
7777b8aff6 MFC r257654, r257772, r258441, r258689, r258698, r258879, r259048, and
r259103.

r257654:
cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump.  Turns
out it's a write-only register with strange side effects on read.

r257772:
cxgbe(4): Tidy up the display for payload memory statistics (pm_stats).

r258441:
cxgbe(4): update the internal list of device features.

r258689:
Disable an assertion that relies on some code[1] that isn't in HEAD yet.

r258698:
cxgbetool: "modinfo" command to display SFP+ module information.

r258879:
cxgbe(4):  T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

r259048:
Two new cxgbetool subcommands to set up scheduler classes and to bind
them to NIC queues.

r259103:
cxgbe(4): save a copy of the RSS map for each port for the driver's use.
2013-12-09 22:40:22 +00:00
peter
44822de64a MFC r259094 - Fix undocumented side effect of r256256 that changes/breaks
existing jails.  This burned us in the freebsd cluster yesterday.
2013-12-09 21:32:36 +00:00
bdrewery
fd4e78a5f4 Regenerate after r259138
Approved by:	bapt (implicit)
2013-12-09 21:07:57 +00:00
bdrewery
dee271d9cb MFC r258924:
Add missing period for WITHOUT_PKGBOOTSTRAP so that it matches all
  other entries.

Approved by:	bapt (implicit)
2013-12-09 20:47:50 +00:00
peter
57a89d6c38 Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only.  All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root.  Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x.  This confuses the coalescing
code and prevents it from doing its job.

Approved by:	re (gjb, implicit)
2013-12-07 18:23:29 +00:00
gjb
5d113d96e5 Bump __FreeBSD_version to 1000700, to set it higher than what is in
releng/10.0 now.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-12-07 13:06:14 +00:00
gjb
945df93442 Set stable/10 to -PRERELEASE, now that releng/10.0 has been branched.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-12-07 11:33:07 +00:00
dteske
17574f5acb MFC r258927: Fix a regression introduced by SVN r257842 that prevents
Encryption from being enabled.

Approved by:	re (gjb)
2013-12-07 00:33:10 +00:00
delphij
4490be87f5 MFC r258948:
Support Hyper-V on i386:

 - Add 'hyperv' module into build;
 - Allow building Hyper-V support as part of the kernel;
 - Hook Hyper-V build into NOTES.

Approved by:	re (rodrigc)
2013-12-06 23:40:50 +00:00
delphij
335a1d42b1 MFC r258941:
Apply vendor improvements to oce(4) driver:

 - Add support to 40Gbps devices;
 - Add support to control adaptive interrupt coalescing (AIC)
   via sysctl;
 - Improve support of BE3 devices;

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Approved by:	re (rodrigc)
2013-12-06 23:30:46 +00:00
cperciva
3cc5015bda MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.
The rc system aggressively caches the contents of /etc/rc.conf in order to
improve boot performance; this produces arguably astonishing (non-)results
if /etc/rc.conf is modified during the boot process.  This commit provides
a mechanism for explicitly requesting that rc.conf be reloaded.

Approved by:	re (rodrigc)
2013-12-06 20:48:53 +00:00
royger
dd1133fe21 MFC 258178:
Improve robustness of the Xen balloon driver.

sys/dev/xen/balloon/balloon.c:
	Remove unused and commented out code.

	Fix deadlock caused by performing a sleepable malloc
	while holding the balloon mutex.

	Perform proper accounting of the memory used by the domain.

Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
2013-12-05 18:09:48 +00:00
royger
00083cffc4 MFC 258176:
Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
	The value reported by FreeBSD as "real memory" when booting
	doesn't match what is later reported by sysctl as hw.realmem.
	This is due to the fact that the value printed during the
	boot process is fetched from smbios data (when possible),
	and accounts for holes in physical memory. On the other
	hand, the value of hw.realmem is unconditionally set to be
	one larger than the highest page of the physical address
	space.

	Fix this by setting hw.realmem to the same value printed
	during boot, this makes hw.realmem honour it's name and
	account properly for physical memory present in the system.

Submitted by:	Roger Pau Monné
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
2013-12-05 18:08:05 +00:00
royger
2cbf074029 MFC 257876:
On XenServer the "halt" message is used instead of "poweroff", which
makes FreeBSD halt but not poweroff (as expected when issuing a
shutdown from the VM manager). Fix this by using the same handler
for both "halt" and "poweroff".

NB: The "halt" signal seems to be used on XenServer only.  The OSS
    Xen toolstack (xl) uses "poweroff" instead.

Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
2013-12-05 18:06:12 +00:00
sbruno
07f179266d MFC r257769 to stable/10
Fix powerd/states on AMD cpus.  Resolves issues with system reporting:
hwpstate0: set freq failed, err 6

Tested on FX-8150 and others.

PR:		kern/167018
Submitted by:	avg@
Approved by:	re (gjb)
2013-12-05 17:57:51 +00:00
trasz
d3ef2c7747 MFC r258842:
Grammar fix.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-05 16:29:22 +00:00
trasz
f6339a17f9 MFC r258841:
Fix typos.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-05 16:14:56 +00:00
yongari
10c81ac71b MFC r258830:
Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787.
  PR:	184304
  Approved by:	re (rodrigc)
2013-12-05 06:13:59 +00:00
rodrigc
9a59cf510b MFC r258914
Update release notes.

Submitted by: skreuzer
Approved by: re (delphij)
2013-12-05 01:21:45 +00:00
gjb
5ddf02a63e MFC r258854:
Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since
  the format of 'pkg -vv' output has changed.

Approved by:	re (hrs)
Sponsored by:	The FreeBSD Foundation
2013-12-05 01:06:05 +00:00
gjb
190b91ee4b MFC r258786, r258796, r258797, r258847, r258853, r258949:
r258786:
  Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise
  the textproc/docproj port build fails.

r258796 (hrs):
  - Prevent TARGET and TARGET_ARCH from being defined as empty when
    TARGET="" and/or TARGET_ARCH="" is specified.
  - Remove extra ().

r258797 (hrs):
  Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk.

r258847:
  Provide reproducibility between builds by building pkg(8) from ports,
  instead of using pkg-bootstrap.

  This should resolve a problem that was discovered during 10.0-BETA4
  freebsd-update(8) builds,

r258853:
  Turn off the dvdrom target by default.  dvd1.iso is now built by
  specifying 'WITH_DVD=1' during 'make release'.

  This caused some problems during the freebsd-update builds for
  10.0-BETA4.

r258949:
  Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating
  to true.

Approved by:	re (hrs)
Sponsored by:	The FreeBSD Foundation
2013-12-05 00:59:29 +00:00
peter
9b21716e78 MFC: r258718: fix emulated jail_v0 byte order
Approved by:	re (gjb)
2013-12-04 18:25:04 +00:00
mav
d0d1c645c4 MFC r258495:
Update description of logical CPU handling in the latest releases and
remove obsolete sysctl variable machdep.hlt_logical_cpus.

Approved by:	re (hrs)
2013-12-04 10:54:23 +00:00
trasz
80dc28ceef MFC r258790:
Fix hang on reboot with active iSCSI connections.

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
2013-12-04 09:46:27 +00:00
rodrigc
a19b1d3a58 MFC 258591
In vnet_route_uninit(), free some memory that is allocated in vnet_route_init().

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html
            http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html

This doesn't eliminate all the "Freed UMA keg was not empty" warning messages
on the console, but it helps.

Approved by: re (gjb)
2013-12-04 07:55:49 +00:00
rodrigc
85a1f61056 MFC r258588
In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);".
This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit().

Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(),
but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions.
In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c,
IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN
and
IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER

Consequently, if VIMAGE is enabled, and jails are created and destroyed,
the system sometimes crashes, because we are trying to use a deleted lock.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL,
so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit().

Approved by: re (gjb)
2013-12-04 07:50:18 +00:00
rodrigc
84898ef06b MFC r258737
In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty"
message printed to the console.  This makes it easier to track down
the source of certain memory leaks.

Suggested by: adrian
Approved by: re (gjb)
2013-12-04 07:46:53 +00:00
rodrigc
9dd37e2e68 MFC r258738
Also mention that drill(1) can be used, now that nslookup and dig are no
longer in the base system.

Suggested by: peter
Approved by: re (gjb)
2013-12-04 07:45:08 +00:00
tuexen
cfa2934865 MFC r258574:
Only initialize some mutexes for the default VNET.

In r208160, sctp_it_ctl was made a global variable, across all VNETs.
However, sctp_init() is called for every VNET that is created.  This results
in the same global mutexes which are part of sctp_it_ctl being initialized.  This can result
in crashes if many jails are created.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Witness will warn about the same mutex being initialized.

Fix the problem by only initializing these mutexes in the default VNET.

MFC r258765:

In
http://svnweb.freebsd.org/changeset/base/258221
I introduced a bug which initialized global locks
whenever the SCTP stack initialized. This was fixed in
http://svnweb.freebsd.org/changeset/base/258574
by rodrigc@. He just initialized the locks for
the default vnet. This fix reverts to the old
behaviour before r258221, which explicitly makes
sure it is only called once, because this works also on
other platforms.

Approved by: re@ (gjb)
2013-12-03 20:55:37 +00:00
kib
34987b9cca MFC r258663:
Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline
location for the native amd64 ABI.  This fixes unwinding over the
signal frame after trampoline was moved to the shared page.

Approved by:	re (gjb)
2013-12-03 19:42:46 +00:00
kib
9934b5683d MFC r258660:
Fix sys/sysctl.h use for cc -m32 on amd64.

Approved by:	re (gjb)
2013-12-03 19:41:48 +00:00
kib
b3b0fb1cda MFC r258661:
Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the
given process.

Approved by:	re (gjb)
2013-12-03 19:40:32 +00:00
trasz
fd6f73d3a2 MFC r258043:
Fix typo.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-03 18:35:17 +00:00
trasz
cf3929b055 MFC r258042:
Fix description to actually make sense.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-03 18:28:18 +00:00
trasz
2f5fcb8328 MFC r258041:
Mention acl_get_brand_np(3).

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2013-12-03 18:18:35 +00:00
gjb
f16613078b Update stable/10 to BETA4 as part of the 10.0-RELEASE cycle.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-11-30 17:40:48 +00:00
gjb
b7e8f6268b MFC r258550:
Do not create pkg.conf, as it is not necessary anymore
  and packagesite is deprecated

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
2013-11-30 17:33:49 +00:00
kib
be650673e4 MFC r258499:
Fix for the spurious signal handler call with zero signo in the threaded
process.

Approved by:	re (hrs)
2013-11-30 14:36:32 +00:00
delphij
5a0de0a477 MFC r258664:
Create /var/cache with mode 0755 instead of 0750.

This directory is used by many third party applications and having
permission 0750 makes it impossible to drop group privileges.

Approved by:	re (glebius)
2013-11-30 07:03:18 +00:00
gjb
2df32cfdca MFC r258669:
Document the dvdrom target and NODVD variable.

Approved by:	re (delphij)
Sponsored by:	The FreeBSD Foundation
2013-11-30 03:31:40 +00:00
bdrewery
b8eaeebf21 MFC r258347,r258349:
Support SNI in libfetch

  SNI is Server Name Indentification which is a protocol for TLS that
  indicates the host that is being connected to at the start of the
  handshake. It allows to use Virtual Hosts on HTTPS.

PR:		kern/183583
Approved by:	bapt (implicit)
Approved by:	re (gjb)
2013-11-29 21:13:30 +00:00
bdrewery
8769ca5500 MFC r258348:
Document 'enabled' as boolean instead of string.

Approved by:	bapt (implicit)
Approved by:	re (gjb)
2013-11-29 21:12:35 +00:00
gjb
79d300c715 MFC r258537, r258587:
r258537 (hrs):
  Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl.  GNU iconv returns
  EILSEQ when there is an invalid character in the output codeset
  while it is valid in the input.  However, POSIX requires iconv()
  to perform an implementation-defined conversion on the character.
  So, Citrus iconv converts such a character to a special character
  which means it is invalid in the output codeset.

  This is not a problem in most cases but some software like libxml2
  depends on GNU's behavior to determine if a character is output
  as-is or another form such as a character entity (&#NNN;).

r258587 (peter):
  Move the iconv wrapper source from libc_nonshared to libc/iconv so
  that it is all in the one place again.  Rename libc/iconv/iconv.c
  to bsd_iconv.c. Compile the wrappers into libc.a so that
  WITHOUT_DYNAMICROOT works again.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2013-11-29 19:44:30 +00:00
dim
3dff623eb7 MFC r258620:
Pull in r195558 from upstream clang trunk:

  Fix a SSE2 intrinsics typo

  Full discourse at:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
   http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

  Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by:	danfe
Approved by:	re (gjb)
2013-11-29 18:06:02 +00:00